Merge lp:~mfisch/lightdm/lightdm-various-fixes into lp:~ubuntu-desktop/lightdm/ubuntu

Proposed by Matt Fischer
Status: Merged
Merged at revision: 1124
Proposed branch: lp:~mfisch/lightdm/lightdm-various-fixes
Merge into: lp:~ubuntu-desktop/lightdm/ubuntu
Diff against target: 93 lines (+32/-8)
4 files modified
debian/lightdm.install (+1/-1)
debian/lightdm.postinst (+1/-1)
debian/lightdm.postrm (+9/-0)
debian/source_lightdm.py (+21/-6)
To merge this branch: bzr merge lp:~mfisch/lightdm/lightdm-various-fixes
Reviewer Review Type Date Requested Status
Ubuntu Desktop Pending
Review via email: mp+133141@code.launchpad.net

Description of the change

This review fixes the case where someone does a remove+purge and then attempts to re-install. Previous purges were not completely purging and leaving some odd ownership when done (ownership is also fixed on reinstall)

Apport:

The apport script wasn't in the package so it wasn't too useful, in addition it wasn't collecting the right stuff, nor was it asking for permission since the files need root priveleges and main contain sensitive info. I stole most of this from the source_xorg.py file at Bryce Harrington's suggestion. Tested this and it works well.

Here's a bug it generated (note: in this bug the users.conf was not collected properly):
https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1067591

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/lightdm.install'
--- debian/lightdm.install 2011-09-30 14:49:44 +0000
+++ debian/lightdm.install 2012-11-06 21:18:20 +0000
@@ -1,7 +1,6 @@
1usr/sbin/lightdm1usr/sbin/lightdm
2usr/share/man2usr/share/man
3usr/share/locale3usr/share/locale
4usr/share/man
5usr/lib/lightdm4usr/lib/lightdm
6usr/bin5usr/bin
7etc/dbus-1/6etc/dbus-1/
@@ -12,3 +11,4 @@
12debian/lightdm-session usr/sbin11debian/lightdm-session usr/sbin
13debian/guest-account usr/sbin12debian/guest-account usr/sbin
14debian/lightdm-greeter-session usr/lib/lightdm13debian/lightdm-greeter-session usr/lib/lightdm
14debian/source_lightdm.py usr/share/apport/package-hooks
1515
=== modified file 'debian/lightdm.postinst'
--- debian/lightdm.postinst 2012-03-05 12:02:39 +0000
+++ debian/lightdm.postinst 2012-11-06 21:18:20 +0000
@@ -37,7 +37,7 @@
37fi37fi
3838
39if [ -d /var/lib/lightdm ]; then39if [ -d /var/lib/lightdm ]; then
40 chown lightdm:lightdm /var/lib/lightdm40 chown -R lightdm:lightdm /var/lib/lightdm
41 chmod 0750 /var/lib/lightdm41 chmod 0750 /var/lib/lightdm
42fi42fi
4343
4444
=== modified file 'debian/lightdm.postrm'
--- debian/lightdm.postrm 2011-08-09 13:27:33 +0000
+++ debian/lightdm.postrm 2012-11-06 21:18:20 +0000
@@ -28,11 +28,20 @@
28 deluser --system lightdm28 deluser --system lightdm
29 fi29 fi
30 fi30 fi
31
31 if getent group lightdm >/dev/null; then32 if getent group lightdm >/dev/null; then
32 if [ -x /usr/sbin/delgroup ]; then33 if [ -x /usr/sbin/delgroup ]; then
33 delgroup --system lightdm34 delgroup --system lightdm
34 fi35 fi
35 fi36 fi
37
38 # we cannot use the --remove-home option when we delete the user above
39 # because it will refuse to remove things in /var, so clean it up this
40 # way
41 if [ -d /var/lib/lightdm ]; then
42 rm -r /var/lib/lightdm
43 fi
44
36fi45fi
37#DEBHELPER#46#DEBHELPER#
38exit 047exit 0
3948
=== modified file 'debian/source_lightdm.py'
--- debian/source_lightdm.py 2011-08-09 13:27:33 +0000
+++ debian/source_lightdm.py 2012-11-06 21:18:20 +0000
@@ -1,13 +1,28 @@
1import os1import os
2import re2import re
33
4import apport.packaging4from apport.hookutils import *
5import apport.hookutils
65
7def add_info(report, ui):6def add_info(report, ui):
87
9 report["Log"] = apport.hookutils.read_file("/var/log/lightdm/:0.log")8 if ui:
10 report["LightdmLog"] = apport.hookutils.read_file("/var/log/lightdm/lightdm.log")9 display_manager_files = {}
11 report["GreeterLog"] = apport.hookutils.read_file("/var/log/lightdm/:0-greeter.log")10 if os.path.lexists('/var/log/lightdm'):
12 report["XorgLog"] = apport.hookutils.read_file("/var/log/Xorg.0.log")11 display_manager_files['LightdmLog'] = \
12 'cat /var/log/lightdm/lightdm.log'
13 display_manager_files['LightdmDisplayLog'] = \
14 'cat /var/log/lightdm/x-0.log'
15 display_manager_files['LightdmGreeterLog'] = \
16 'cat /var/log/lightdm/x-0-greeter.log'
17 display_manager_files['LightdmGreeterLogOld'] = \
18 'cat /var/log/lightdm/x-0-greeter.log.old'
19 display_manager_files['LightdmConfig'] = \
20 'cat /etc/lightdm/lightdm.conf'
21 display_manager_files['LightdmUsersConfig'] = \
22 'cat /etc/lightdm/users.conf'
1323
24 if ui.yesno("Your display manager log files may help developers"\
25 " diagnose the bug, but may contain sensitive information"\
26 " such as your hostname or username. Do you want to"\
27 " include these logs in your bug report?") == True:
28 attach_root_command_outputs(report, display_manager_files)

Subscribers

People subscribed via source and target branches

to all changes: