Forwarded upstream: https://github.com/canonical/apport/pull/434

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/2097264

Title:
  FTBFS on LP buildd infrastructure

Status in apport package in Ubuntu:
  Invalid
Status in apport source package in Noble:
  In Progress

Bug description:
  [ Impact ]

  The package FTBFS on the LP builders due to the cloud build name
  containing the 'buildd' string, thus failing the anonymization test.
  This makes it difficult to do a Noble SRU :)

  It's a false positive, that particular field isn't relevant when
  looking for PII, it's just a side-effect of the extremely artificial
  build environment.

  The fix is to skip that test when such a case is detected.

  [ Test plan ]

  Check the build logs to see that the test has been skipped.
  Also build the package in a local schroot and check that the test has NOT 
been skipped and has passed.

  [ Where problems could occur ]

  Since we're skipping the tests we could have a regression on that very
  feature, which is the reason for the local build in the test plan.

  [ Original report ]
  This might be only in PPAs and/or a recent change in our build environment, 
but when trying to rebuild the package for an upcoming SRU I got a nice FTBFS.

  https://launchpadlibrarian.net/773820283/buildlog_ubuntu-noble-
  amd64.apport_2.28.1-0ubuntu3.4~ppa1_BUILDING.txt.gz

  The relevant log parts:

  self = <tests.integration.test_ui.T
  testMethod=test_run_crash_anonymity>

      def test_run_crash_anonymity(self):
          """run_crash() anonymization"""
          r = self._gen_test_crash()
          utf8_val = b"\xc3\xa4 " + os.uname()[1].encode("UTF-8") + b" 
\xe2\x99\xa5 "
          r["ProcUnicodeValue"] = utf8_val.decode("UTF-8")
          r["ProcByteArrayValue"] = utf8_val
          report_file = os.path.join(apport.fileutils.report_dir, "test.crash")
          with open(report_file, "wb") as f:
              r.write(f)
          self.ui = UserInterfaceMock()
          self.ui.present_details_response = apport.ui.Action(report=True)
          self.ui.run_crash(report_file)
          self.assertIsNone(self.ui.msg_severity, self.ui.msg_text)

          assert self.ui.report
          self.assertNotIn("ProcCwd", self.ui.report)

          dump = io.BytesIO()
          # this contains more or less random characters which might contain the
          # user name
          del self.ui.report["CoreDump"]
          self.ui.report.write(dump)
          report = dump.getvalue().decode("UTF-8")

          for s in self._get_sensitive_strings():
  >           self.assertIsNone(
                  re.search(rf"\b{re.escape(s)}\b", report),
                  f"dump contains sensitive word '{s}':\n{report}",
              )
  E           AssertionError: <re.Match object; span=(97, 103), match='buildd'> 
is not None : dump contains sensitive word 'buildd':
  E           ProblemType: Crash
  E           Architecture: amd64
  E           CasperMD5CheckResult: unknown
  E           CloudBuildName: ubuntu-base:buildd

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/2097264/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to