Merge lp:~zulcss/glance/glance-add-group into lp:~openstack-ubuntu-packagers/glance/diablo

Proposed by Chuck Short
Status: Merged
Merged at revision: 66
Proposed branch: lp:~zulcss/glance/glance-add-group
Merge into: lp:~openstack-ubuntu-packagers/glance/diablo
Diff against target: 50 lines (+16/-2)
3 files modified
debian/changelog (+7/-0)
debian/glance.postinst (+5/-2)
debian/glance.postrm (+4/-0)
To merge this branch: bzr merge lp:~zulcss/glance/glance-add-group
Reviewer Review Type Date Requested Status
Clint Byrum (community) Approve
Dave Walker Pending
Review via email: mp+76036@code.launchpad.net
To post a comment you must log in.
lp:~zulcss/glance/glance-add-group updated
65. By Chuck Short

Delete group as well

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hi Chuck,

This late in the cycle, with beta's having already been tested, we probably need to fix any files in /var/lib/glance that are 'glance.nogroup' to be 'glance.glance' if the version is <= 2011.3~rc~20110915.r1007-0ubuntu1.

review: Needs Fixing
lp:~zulcss/glance/glance-add-group updated
66. By Chuck Short

Change group on /var/lib/glance as well

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

Ok I have added the chown -R glance:glance /var/lib/glance /var/log/glance

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Wow I had overlooked the fact that we were already doing a blanket chown on every upgrade.

Is that necessary?

Anyway, that is a separate issue which we can raise as a bug somewhere else. The rest looks good. +1

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-09-19 17:04:18 +0000
3+++ debian/changelog 2011-09-21 13:18:25 +0000
4@@ -1,3 +1,10 @@
5+glance (2011.3~rc~20110915.r1007-0ubuntu2) UNRELEASED; urgency=low
6+
7+ * debian/glance.postinst: Add glance group and add glance user
8+ to it. (LP: #851860)
9+
10+ -- Chuck Short <zulcss@ubuntu.com> Mon, 19 Sep 2011 09:36:26 -0400
11+
12 glance (2011.3~rc~20110915.r1007-0ubuntu1) oneiric; urgency=low
13
14 [ Chuck Short ]
15
16=== modified file 'debian/glance.postinst'
17--- debian/glance.postinst 2011-08-11 11:50:38 +0000
18+++ debian/glance.postinst 2011-09-21 13:18:25 +0000
19@@ -4,11 +4,14 @@
20
21 if [ "$1" = "configure" ]
22 then
23+ if ! getent group glance > /dev/null 2>&1
24+ addgroup --system glance >/dev/nul
25+ fi
26 if ! getent passwd glance > /dev/null 2>&1
27 then
28- adduser --system --home /var/lib/glance --no-create-home --shell /bin/bash glance
29+ adduser --system --home /var/lib/glance --ingroup glance --no-create-home --shell /bin/bash glance
30 fi
31- chown glance -R /var/lib/glance/ /var/log/glance/
32+ chown glance:glance -R /var/lib/glance/ /var/log/glance/
33 if ! grep sql_connection /etc/glance/glance-registry.conf | grep -qv "sql_connection = sqlite:////var/lib/glance/glance.sqlite"
34 then
35 su -c 'glance-manage db_sync' glance
36
37=== modified file 'debian/glance.postrm'
38--- debian/glance.postrm 2011-08-24 19:55:31 +0000
39+++ debian/glance.postrm 2011-09-21 13:18:25 +0000
40@@ -10,6 +10,10 @@
41 deluser --system --quiet --backup-to /var/lib glance
42 fi
43
44+ if which delgroup > /dev/nul 2>&1; then
45+ delgroup --system --quiet glance
46+ fi
47+
48 [ -e /var/lib/glance ] && rm -rf /var/lib/glance
49 [ -e /var/log/glance ] && rm -rf /var/log/glance
50 ;;

Subscribers

People subscribed via source and target branches