Merge ~mwhudson/ubuntu/+source/apport:subiquity-hook into ubuntu/+source/apport:ubuntu/focal-proposed

Proposed by Michael Hudson-Doyle
Status: Needs review
Proposed branch: ~mwhudson/ubuntu/+source/apport:subiquity-hook
Merge into: ubuntu/+source/apport:ubuntu/focal-proposed
Diff against target: 63 lines (+49/-0)
2 files modified
data/package-hooks/subiquity.py (+42/-0)
debian/changelog (+7/-0)
Reviewer Review Type Date Requested Status
Brian Murray (community) Disapprove
Ubuntu Server Dev import team Pending
Review via email: mp+381486@code.launchpad.net
To post a comment you must log in.
dc4922c... by Michael Hudson-Doyle

add changelog

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Haven't tested this, the package does at least build though.

Revision history for this message
Brian Murray (brian-murray) wrote :
review: Disapprove

Unmerged commits

dc4922c... by Michael Hudson-Doyle

add changelog

9033b71... by Michael Hudson-Doyle

one more file

b124881... by Michael Hudson-Doyle

add a hook for subiquity

0cf82a4... by Brian Murray

Import patches-unapplied version 2.20.11-0ubuntu21 to ubuntu/focal-proposed

Imported using git-ubuntu import.

Changelog parent: bda6839ae07b0fecfb01292a5a553ac9f94799b9

New changelog entries:
  [ Brian Murray ]
  * backends/packaging-apt-dpkg.py: allow mirrors which are accessed via https
    in sources.list. Thanks to Launchpad user Esokrates for the fix.
    (LP: #1866996)
  * backends/packaging-apt-dpkg.py: when downloading packages from Launchpad
    do not require them to be authenticated.
  * test/test_backend_apt_dpkg.py: Fix check for connectivity and modify
    install from PPA test for a change in the PPA being tested.
  [ Matthieu Clemenceau ]
  * test/test_ui.py: Removed linux package version to fix autopkgtest with
    focal. Changed linux-5.4 and linux-signed-5.4 to linux and linux-signed

bda6839... by Brian Murray

Import patches-unapplied version 2.20.11-0ubuntu20 to ubuntu/focal-proposed

Imported using git-ubuntu import.

Changelog parent: b4476242bf0f24abd8063b3685f9bda01ef39006

New changelog entries:
  * test/test_report.py: resolve test failure with new glibc output.

b447624... by Brian Murray

Import patches-unapplied version 2.20.11-0ubuntu19 to ubuntu/focal-proposed

Imported using git-ubuntu import.

Changelog parent: 1ff0a79fe31bcbfe416ef9976daec9e58b0a6ff3

New changelog entries:
  * apport/report.py: do not return a duplicate signature when we are unable
    to access ProcMaps as that is necessary to create one. (LP: #1866347)
  * apport/ui.py: Always allow users to use ubuntu-bug or apport-collect
    regardless of the Problem Reporting setting as they are manually invoked
    and not automatically generated like a crash report. (LP: #1814611)

1ff0a79... by Brian Murray

Import patches-unapplied version 2.20.11-0ubuntu18 to ubuntu/focal-proposed

Imported using git-ubuntu import.

Changelog parent: b83e23763f17f40407ba90f082b6bfff94336166

New changelog entries:
  * data/whoopsie-upload-all: append to the crash report using fdopen and open
    from os to cope with protected_regular being set to 1. (LP: #1848064)

b83e237... by Brian Murray

Import patches-unapplied version 2.20.11-0ubuntu17 to ubuntu/focal-proposed

Imported using git-ubuntu import.

Changelog parent: b45889378cb6b446e01c58863c445b23070efefc

New changelog entries:
  [ Brian Murray ]
  * Add in a source package hook symlinks for linux-signed-5.4,
    linux-signed-oem-5.4, linux-oem-5.4, and linux-5.4. (LP: #1861446)
  * Remove obsolete package hook for Nexus 7 devices.
  [ Tiago Stürmer Daitx ]
  * Fix Python 2/3 support. (LP: #1853383)

b458893... by =?utf-8?q?Tiago_St=C3=BCrmer_Daitx?= <email address hidden>

Import patches-unapplied version 2.20.11-0ubuntu16 to ubuntu/focal-proposed

Imported using git-ubuntu import.

Changelog parent: 786f607c01f3b9e7dd7a7d0f99176154ec114b58

New changelog entries:
  * SECURITY REGRESSION: 'module' object has no attribute 'O_PATH'
    (LP: #1851806)
    - apport/report.py, apport/ui.py: use file descriptors for /proc/pid
      directory access only when running under python 3; prevent reading /proc
      maps under python 2 as it does not provide a secure way to do so; use
      io.open for better compatibility between python 2 and 3.
  * data/apport: fix number of arguments passed through socks into a container.
  * test/test_report.py: test login session with both pid and proc_pid_fd.

786f607... by Brian Murray

Import patches-unapplied version 2.20.11-0ubuntu15 to ubuntu/focal-proposed

Imported using git-ubuntu import.

Changelog parent: e2c1efb3538c5ab86bae6b9c2ebe3212652446f9

New changelog entries:
   * etc/apport/crashdb.conf: Enable Launchpad crash reports for focal.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/data/package-hooks/subiquity.py b/data/package-hooks/subiquity.py
2new file mode 100644
3index 0000000..caffe28
4--- /dev/null
5+++ b/data/package-hooks/subiquity.py
6@@ -0,0 +1,42 @@
7+'''
8+Send reports about subiquity to the correct Launchpad project.
9+
10+'''
11+import os
12+
13+from apport import hookutils
14+
15+
16+def add_info(report, ui):
17+ # TODO: read the version from the log file?
18+ logfile = os.path.realpath('/var/log/installer/subiquity-debug.log')
19+ revision = 'unknown'
20+ if os.path.exists(logfile):
21+ hookutils.attach_file(report, 'logfile', 'InstallerLog')
22+ with open(logfile) as fp:
23+ first_line = logfile.readline()
24+ marker = 'Starting Subiquity revision'
25+ if marker in first_line:
26+ revision = first_line.split(marker)[1].strip()
27+ report['Package'] = 'subiquity ({})'.format(revision)
28+ report['SourcePackage'] = 'subiquity'
29+ # rewrite this section so the report goes to the project in Launchpad
30+ report['CrashDB'] = '''{
31+ "impl": "launchpad",
32+ "project": "subiquity",
33+ "bug_pattern_url": "http://people.canonical.com/~ubuntu-archive/bugpatterns/bugpatterns.xml"
34+ }'''
35+
36+ # add in subiquity stuff
37+ hookutils.attach_file_if_exists(
38+ report,
39+ '/var/log/installer/subiquity-curtin-install.conf',
40+ 'CurtinConfig')
41+ hookutils.attach_file_if_exists(
42+ report,
43+ '/var/log/installer/curtin-install.log',
44+ 'CurtinLog')
45+ hookutils.attach_file_if_exists(
46+ report,
47+ '/var/log/installer/block/probe-data.json',
48+ 'ProbeData')
49diff --git a/debian/changelog b/debian/changelog
50index 09efa81..5246552 100644
51--- a/debian/changelog
52+++ b/debian/changelog
53@@ -1,3 +1,10 @@
54+apport (2.20.11-0ubuntu22) UNRELEASED; urgency=medium
55+
56+ * Add a package hook to allow subiquity problems to be reported from the
57+ installed system.
58+
59+ -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Wed, 01 Apr 2020 16:24:54 +1300
60+
61 apport (2.20.11-0ubuntu21) focal; urgency=medium
62
63 [ Brian Murray ]

Subscribers

People subscribed via source and target branches