Mail archive
alpine-aports

[alpine-aports] [PATCH 12/15] testing/[various]: Add group and use it as primary in .pre-* scripts.

From: Przemyslaw Pawelczyk <przemoc_at_zoho.com>
Date: Mon, 6 Jun 2016 02:05:12 +0200

Fixes the problem I unintentionally brought in commit ccc056dbf9d3:
system user creation doesn't add same named group and uses nogroup as
primary group unless explicitly specified via -G.

Brings status quo regarding primary groups of users created in packages:
- testing/dbmail
- testing/dspam
- testing/opensips
- testing/pdns
- testing/qpage
- testing/rrdbot
- testing/wt
---
 testing/dbmail/dbmail.pre-install     | 3 ++-
 testing/dspam/dspam.pre-install       | 3 ++-
 testing/opensips/opensips.pre-install | 3 ++-
 testing/pdns/pdns.pre-install         | 3 ++-
 testing/qpage/qpage.pre-install       | 3 ++-
 testing/rrdbot/rrdbot.pre-install     | 3 ++-
 testing/wt/wt.pre-install             | 3 ++-
 7 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/testing/dbmail/dbmail.pre-install b/testing/dbmail/dbmail.pre-install
index 21650fc..8a36d15 100644
--- a/testing/dbmail/dbmail.pre-install
+++ b/testing/dbmail/dbmail.pre-install
_at_@ -1,5 +1,6 @@
 #!/bin/sh
 
-adduser -S -D -H -h /var/lib/dbmail -s /bin/false -g dbmail dbmail 2>/dev/null
+addgroup -S dbmail 2>/dev/null
+adduser -S -D -H -h /var/lib/dbmail -s /bin/false -G dbmail -g dbmail dbmail 2>/dev/null
 
 exit 0
diff --git a/testing/dspam/dspam.pre-install b/testing/dspam/dspam.pre-install
index e78f1e6..8cffce8 100644
--- a/testing/dspam/dspam.pre-install
+++ b/testing/dspam/dspam.pre-install
_at_@ -1,6 +1,7 @@
 #!/bin/sh
 
-adduser -S -D -h /var/lib/dspam -s /bin/false -g dspam dspam 2>/dev/null
+addgroup -S dspam 2>/dev/null
+adduser -S -D -h /var/lib/dspam -s /bin/false -G dspam -g dspam dspam 2>/dev/null
 chown dspam:dspam /var/lib/dspam
 
 exit 0
diff --git a/testing/opensips/opensips.pre-install b/testing/opensips/opensips.pre-install
index 8eebc7b..1fcd8dc 100644
--- a/testing/opensips/opensips.pre-install
+++ b/testing/opensips/opensips.pre-install
_at_@ -1,5 +1,6 @@
 #!/bin/sh
 
-adduser -S -D -H -h /var/empty -s /bin/false -g opensips opensips 2>/dev/null
+addgroup -S opensips 2>/dev/null
+adduser -S -D -H -h /var/empty -s /bin/false -G opensips -g opensips opensips 2>/dev/null
 
 exit 0
diff --git a/testing/pdns/pdns.pre-install b/testing/pdns/pdns.pre-install
index e80add6..021b1e7 100644
--- a/testing/pdns/pdns.pre-install
+++ b/testing/pdns/pdns.pre-install
_at_@ -1,5 +1,6 @@
 #!/bin/sh
 
-adduser -S -D -H -h /var/empty -s /bin/false -g pdns pdns 2>/dev/null
+addgroup -S pdns 2>/dev/null
+adduser -S -D -H -h /var/empty -s /bin/false -G pdns -g pdns pdns 2>/dev/null
 
 exit 0
diff --git a/testing/qpage/qpage.pre-install b/testing/qpage/qpage.pre-install
index 45f03d0..c73b800 100644
--- a/testing/qpage/qpage.pre-install
+++ b/testing/qpage/qpage.pre-install
_at_@ -1,5 +1,6 @@
 #!/bin/sh
 
-adduser -S -D -h /var/lib/qpage -s /bin/false -G qpage -g qpage qpage 2>/dev/null
+addgroup -S qpage 2>/dev/null
+adduser -S -D -h /var/lib/qpage -s /bin/false -G qpage -G qpage -g qpage qpage 2>/dev/null
 
 exit 0
diff --git a/testing/rrdbot/rrdbot.pre-install b/testing/rrdbot/rrdbot.pre-install
index d73a197..4394576 100644
--- a/testing/rrdbot/rrdbot.pre-install
+++ b/testing/rrdbot/rrdbot.pre-install
_at_@ -1,5 +1,6 @@
 #!/bin/sh
 
-adduser -S -D -H -s /bin/false -g rrdbotd rrdbotd 2>/dev/null
+addgroup -S rrdbotd 2>/dev/null
+adduser -S -D -H -s /bin/false -G rrdbotd -g rrdbotd rrdbotd 2>/dev/null
 
 exit 0
diff --git a/testing/wt/wt.pre-install b/testing/wt/wt.pre-install
index b007724..35ff869 100644
--- a/testing/wt/wt.pre-install
+++ b/testing/wt/wt.pre-install
_at_@ -1,7 +1,8 @@
 #!/bin/sh
 
 addgroup -S -g 82 www-data 2>/dev/null
-adduser -S -D -H -s /sbin/nologin -g wt wt 2>/dev/null
+addgroup -S wt 2>/dev/null
+adduser -S -D -H -s /sbin/nologin -G wt -g wt wt 2>/dev/null
 addgroup wt www-data 2>/dev/null
 
 exit 0
-- 
2.6.6
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Jun 06 2016 - 02:05:12 GMT