diff -Nru nginx-1.6.2/debian/apport/source_nginx.py nginx-1.6.2/debian/apport/source_nginx.py --- nginx-1.6.2/debian/apport/source_nginx.py 1970-01-01 00:00:00.000000000 +0000 +++ nginx-1.6.2/debian/apport/source_nginx.py 2015-07-10 20:13:07.000000000 +0000 @@ -0,0 +1,19 @@ +''' +apport package hook for nginx packages + +Copyright (c) 2015, Thomas Ward +''' + +import apport.hookutils +import os +import subprocess + +def add_info(report, ui): + if (report['Package'].split()[0] != 'nginx-common' + and report['ProblemType'] == 'Package' + and os.path.isdir('/run/systemd/system')): + report['Journalctl_Nginx.txt'] = apport.hookutils.command_output( + ['journalctl', '-xe', '--unit=nginx.service']) + report['SystemctlStatusFull_Nginx.txt'] = subprocess.Popen( + ['systemctl', '-l', 'status', 'nginx.service'], + stdout=subprocess.PIPE).communicate()[0] diff -Nru nginx-1.6.2/debian/changelog nginx-1.6.2/debian/changelog --- nginx-1.6.2/debian/changelog 2015-04-02 16:45:46.000000000 +0000 +++ nginx-1.6.2/debian/changelog 2015-07-10 20:17:37.000000000 +0000 @@ -1,3 +1,17 @@ +nginx (1.6.2-5ubuntu3.1) vivid; urgency=medium + + * debian/apport/source_nginx.py: + - Add apport hooks for additional bug information gathering, as a result + of non-useful reports due to postinstall script failure bugs. This is + necessary in order to be able to actually debug what is going on in the + bug reports, thanks to systemd not putting startup errors to stdout or + stderr anymore, like Upstart and others did. (LP: #1472683) + * debian/nginx-common.install: + - Add install rule for debian/apport/source_nginx.py, which is the new + apport hooks to gather additional 'Package' bugtype debug data. + + -- Thomas Ward Fri, 10 Jul 2015 11:14:00 -0400 + nginx (1.6.2-5ubuntu3) vivid-proposed; urgency=medium * debian/rules: diff -Nru nginx-1.6.2/debian/nginx-common.install nginx-1.6.2/debian/nginx-common.install --- nginx-1.6.2/debian/nginx-common.install 2014-10-19 05:24:13.000000000 +0000 +++ nginx-1.6.2/debian/nginx-common.install 2015-07-10 15:10:43.000000000 +0000 @@ -1,3 +1,4 @@ debian/conf/* etc/nginx debian/ufw/nginx etc/ufw/applications.d debian/index.html usr/share/nginx/html/ +debian/apport/source_nginx.py usr/share/apport/package-hooks/