- Don't symlink udev doc directories.
- Add epoch to gudev packages; Ubuntu packaged the standalone gudev before
it got merged into udev.
+ - Add Apport hooks for udev and systemd.
-- Martin Pitt <mpitt@debian.org> Fri, 12 Dec 2014 20:32:32 +0200
--- /dev/null
+'''apport package hook for systemd
+
+(c) 2014 Canonical Ltd.
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+'''
+
+import os.path
+import apport.hookutils
+
+def add_info(report):
+ apport.hookutils.attach_hardware(report)
+
+ report['SystemdDelta'] = apport.hookutils.command_output(['systemd-delta'])
+
+ if not os.path.exists('/run/systemd/system'):
+ return
+
+ # Add details about all failed units, if any
+ out = apport.hookutils.command_output(['systemctl', '--failed', '--full',
+ '--no-legend']).strip()
+ if out:
+ failed = ''
+ for line in out.splitlines():
+ unit = line.split()[0]
+ if failed:
+ failed += '------\n'
+ failed += apport.hookutils.command_output(['systemctl', 'status', '--full', unit])
+ report['SystemdFailedUnits'] = failed
+
--- /dev/null
+'''apport package hook for udev
+
+(c) 2009 Canonical Ltd.
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+'''
+
+import os
+import apport.hookutils
+
+def add_info(report):
+ apport.hookutils.attach_hardware(report)
+
+ user_rules = []
+ for f in os.listdir('/etc/udev/rules.d'):
+ if not f.startswith('70-persistent-') and f != 'README':
+ user_rules.append(f)
+
+ if user_rules:
+ report['CustomUdevRuleFiles'] = ' '.join(user_rules)
rm debian/udev/lib/udev/rules.d/73-seat-late.rules
rm debian/udev/lib/udev/rules.d/71-seat.rules
rm debian/udev/lib/udev/rules.d/99-systemd.rules
+ # Ubuntu specific files
+ if dpkg-vendor --is ubuntu; then \
+ install -D --mode=644 debian/extra/udev.py debian/udev/usr/share/apport/package-hooks/udev.py; \
+ install -D --mode=644 debian/extra/systemd.py debian/systemd/usr/share/apport/package-hooks/systemd.py; \
+ fi
# use symlinked doc directories on Debian as the old udev package did
override_dh_installdocs: