Merge lp:~xnox/ubiquity/fix-oem-user into lp:ubiquity

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 6029
Proposed branch: lp:~xnox/ubiquity/fix-oem-user
Merge into: lp:ubiquity
Diff against target: 104 lines (+26/-16)
5 files modified
bin/oem-config-firstboot (+12/-0)
bin/oem-config-wrapper (+0/-5)
debian/changelog (+13/-0)
debian/control (+1/-1)
debian/oem-config.oem-config.upstart (+0/-10)
To merge this branch: bzr merge lp:~xnox/ubiquity/fix-oem-user
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+191005@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

* dbus-launch --exit-with session leaves around defunct dbus-launch processes after exiting with session. Later userdel complains that it cannot remove user used by that process. There are no other processes by oem user left, hence using killall -u oem || true, before removing the user. I've tried tracking the pid imperically from the PID that dbus-launch prints on stdout, but that's not the pid that is left around hanging. Not sure if there are any better ways to kill that stray dbus. I guess for T-series we should look into why dbus-launch is leaving defunct process around.

Revision history for this message
Colin Watson (cjwatson) wrote :

I'd prefer using pkill rather than killall on general principles, but this adjustment to my change looks fine to me.

review: Approve
lp:~xnox/ubiquity/fix-oem-user updated
6028. By Dimitri John Ledkov

Use pkill instead, and depend on it

6029. By Dimitri John Ledkov

releasing package ubiquity version 2.15.24

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/oem-config-firstboot'
--- bin/oem-config-firstboot 2012-10-19 17:03:08 +0000
+++ bin/oem-config-firstboot 2013-10-14 17:19:43 +0000
@@ -70,6 +70,14 @@
70 /usr/sbin/oem-config-wrapper $DEBUG $AUTOMATIC --only || CODE=$?70 /usr/sbin/oem-config-wrapper $DEBUG $AUTOMATIC --only || CODE=$?
71 fi71 fi
72 if [ "$CODE" -eq 0 ]; then72 if [ "$CODE" -eq 0 ]; then
73 # Remove the temporary OEM configuration user, if possible
74 # and desired.
75 RET="$(echo GET oem-config/remove | debconf-communicate)"
76 if [ "${RET#* }" = true ] && getent passwd oem >/dev/null; then
77 pkill -u oem || true
78 userdel --force --remove oem || true
79 ps -axf
80 fi
73 exit 081 exit 0
74 elif [ "$CODE" -eq 10 ]; then82 elif [ "$CODE" -eq 10 ]; then
75 cat <<EOF83 cat <<EOF
@@ -119,6 +127,10 @@
119 rm -f /var/lib/oem-config/run127 rm -f /var/lib/oem-config/run
120 RET="$(echo GET oem-config/remove | debconf-communicate)"128 RET="$(echo GET oem-config/remove | debconf-communicate)"
121 if [ "${RET#* }" = true ]; then129 if [ "${RET#* }" = true ]; then
130 if getent passwd oem >/dev/null; then
131 pkill -u oem || true
132 userdel --force --remove oem || true
133 fi
122 apt-get -y purge ubiquity >>/var/log/oem-config.log 2>&1134 apt-get -y purge ubiquity >>/var/log/oem-config.log 2>&1
123 fi135 fi
124136
125137
=== modified file 'bin/oem-config-wrapper'
--- bin/oem-config-wrapper 2011-10-01 01:06:43 +0000
+++ bin/oem-config-wrapper 2013-10-14 17:19:43 +0000
@@ -9,11 +9,6 @@
9# Don't run again.9# Don't run again.
10rm -f /var/lib/oem-config/run10rm -f /var/lib/oem-config/run
1111
12# Remove the temporary OEM configuration user, if possible.
13if getent passwd oem >/dev/null; then
14 userdel --force --remove oem || true
15fi
16
17# Cleanup from anything the early command prepared12# Cleanup from anything the early command prepared
18RET="$(echo GET oem-config/late_command | debconf-communicate)" || true13RET="$(echo GET oem-config/late_command | debconf-communicate)" || true
19if [ "${RET%% *}" = 0 ]; then14if [ "${RET%% *}" = 0 ]; then
2015
=== modified file 'debian/changelog'
--- debian/changelog 2013-10-11 14:37:36 +0000
+++ debian/changelog 2013-10-14 17:19:43 +0000
@@ -1,3 +1,16 @@
1ubiquity (2.15.24) saucy; urgency=low
2
3 [ Colin Watson ]
4 * Move oem user removal from upstart & wrapper into
5 oem-config-firstboot, after ubiquity-dm finished executing. (LP:
6 #1231166) (LP: #1239471)
7
8 [ Dmitrijs Ledkovs ]
9 * Kill any remaining oem user process before removing oem user (session
10 dbus leaves zombies). (LP: #1231166)
11
12 -- Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> Mon, 14 Oct 2013 18:19:27 +0100
13
1ubiquity (2.15.23) saucy; urgency=low14ubiquity (2.15.23) saucy; urgency=low
215
3 * Attempt to remove oem user again in the oem-config/post-start, after16 * Attempt to remove oem user again in the oem-config/post-start, after
417
=== modified file 'debian/control'
--- debian/control 2013-09-25 11:56:53 +0000
+++ debian/control 2013-10-14 17:19:43 +0000
@@ -81,7 +81,7 @@
8181
82Package: oem-config82Package: oem-config
83Architecture: all83Architecture: all
84Depends: ${misc:Depends}, ubiquity (= ${binary:Version}), oem-config-frontend-${mangled-version}84Depends: ${misc:Depends}, ubiquity (= ${binary:Version}), oem-config-frontend-${mangled-version}, procps
85Conflicts: oem-config-keyboard, oem-config-locale, oem-config-timezone85Conflicts: oem-config-keyboard, oem-config-locale, oem-config-timezone
86Replaces: oem-config-keyboard, oem-config-locale, oem-config-timezone, oem-config-gtk (<< 1.54.13), oem-config-kde (<< 1.54.13)86Replaces: oem-config-keyboard, oem-config-locale, oem-config-timezone, oem-config-gtk (<< 1.54.13), oem-config-kde (<< 1.54.13)
87Description: Perform end-user configuration after initial OEM installation87Description: Perform end-user configuration after initial OEM installation
8888
=== modified file 'debian/oem-config.oem-config.upstart'
--- debian/oem-config.oem-config.upstart 2013-10-11 09:14:15 +0000
+++ debian/oem-config.oem-config.upstart 2013-10-14 17:19:43 +0000
@@ -24,8 +24,6 @@
24task24task
25normal exit 0 125normal exit 0 1
2626
27console output
28
29script27script
30 [ -f /var/lib/oem-config/run ]28 [ -f /var/lib/oem-config/run ]
3129
@@ -59,11 +57,3 @@
5957
60 exec oem-config-firstboot $debug $automatic58 exec oem-config-firstboot $debug $automatic
61end script59end script
62
63post-start script
64# Remove the temporary OEM configuration user, again, if possible.
65# If and when oem-config-wrapper fails http://pad.lv/1231166
66if getent passwd oem >/dev/null; then
67 userdel --force --remove oem || true
68fi
69end script

Subscribers

People subscribed via source and target branches

to status/vote changes: