Merge lp:~smoser/glance/merge-from-ubuntu into lp:~openstack-ubuntu-packagers/glance/ubuntu

Proposed by Scott Moser
Status: Merged
Merged at revision: 73
Proposed branch: lp:~smoser/glance/merge-from-ubuntu
Merge into: lp:~openstack-ubuntu-packagers/glance/ubuntu
Diff against target: 60 lines (+22/-3)
3 files modified
debian/changelog (+11/-0)
debian/glance.postinst (+6/-2)
debian/glance.postrm (+5/-1)
To merge this branch: bzr merge lp:~smoser/glance/merge-from-ubuntu
Reviewer Review Type Date Requested Status
Chuck Short (community) Approve
Review via email: mp+77190@code.launchpad.net

Description of the change

pull in changes from Ubuntu's oneiric branch

This pulls in 2 bug fixes from Oneiric's 2011.3 branch.

  * debian/glance.postinst: Add glance group and add glance user to it.
    (LP: #851860)
  * Only remove user/group in .postrm if they exist. (LP: #857021)

To post a comment you must log in.
lp:~smoser/glance/merge-from-ubuntu updated
70. By Scott Moser

merge from current packaging branch

Revision history for this message
Chuck Short (zulcss) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-11-16 06:10:14 +0000
3+++ debian/changelog 2011-12-07 19:18:25 +0000
4@@ -1,3 +1,14 @@
5+glance (2012.1~e1~20110919.1021-0ubuntu2) UNRELEASED; urgency=low
6+
7+ [ Chuck Short ]
8+ * debian/glance.postinst: Add glance group and add glance user to it.
9+ (LP: #851860)
10+
11+ [ Adam Gandelman ]
12+ * Only remove user/group in .postrm if they exist. (LP: #857021)
13+
14+ -- Scott Moser <smoser@ubuntu.com> Wed, 07 Dec 2011 14:10:28 -0500
15+
16 glance (2012.1~e1~20110919.1021-0ubuntu1) natty; urgency=low
17
18 * New upstream release
19
20=== modified file 'debian/glance.postinst'
21--- debian/glance.postinst 2011-08-11 11:50:38 +0000
22+++ debian/glance.postinst 2011-12-07 19:18:25 +0000
23@@ -4,11 +4,15 @@
24
25 if [ "$1" = "configure" ]
26 then
27+ if ! getent group glance > /dev/null 2>&1
28+ then
29+ addgroup --system glance >/dev/null
30+ fi
31 if ! getent passwd glance > /dev/null 2>&1
32 then
33- adduser --system --home /var/lib/glance --no-create-home --shell /bin/bash glance
34+ adduser --system --home /var/lib/glance --ingroup glance --no-create-home --shell /bin/bash glance
35 fi
36- chown glance -R /var/lib/glance/ /var/log/glance/
37+ chown glance:glance -R /var/lib/glance/ /var/log/glance/
38 if ! grep sql_connection /etc/glance/glance-registry.conf | grep -qv "sql_connection = sqlite:////var/lib/glance/glance.sqlite"
39 then
40 su -c 'glance-manage db_sync' glance
41
42=== modified file 'debian/glance.postrm'
43--- debian/glance.postrm 2011-08-24 19:55:31 +0000
44+++ debian/glance.postrm 2011-12-07 19:18:25 +0000
45@@ -6,10 +6,14 @@
46 purge)
47 echo "Purging glance. Backup of /var/lib/glance can be found at /var/lib/glance.tar.bz2"
48
49- if which deluser > /dev/null 2>&1; then
50+ if (which deluser && getent passwd glance) > /dev/null 2>&1; then
51 deluser --system --quiet --backup-to /var/lib glance
52 fi
53
54+ if (which delgroup && getent group glance) > /dev/null 2>&1; then
55+ delgroup --system --quiet glance
56+ fi
57+
58 [ -e /var/lib/glance ] && rm -rf /var/lib/glance
59 [ -e /var/log/glance ] && rm -rf /var/log/glance
60 ;;

Subscribers

People subscribed via source and target branches