Subject: [alpine-aports] [PATCH 1/2] main/distcc: create distcc user in .pre-install script

From: Sören Tempel <[email-masked]>
Date: Fri, 20 Nov 2015 21:43:24 +0100

---
 main/distcc/APKBUILD           | 6 ++++--
 main/distcc/distcc.pre-install | 5 +++++
 2 files changed, 9 insertions(+), 2 deletions(-)
 create mode 100644 main/distcc/distcc.pre-install

diff --git a/main/distcc/APKBUILD b/main/distcc/APKBUILD
index ea0198f..a685904 100644
--- a/main/distcc/APKBUILD
+++ b/main/distcc/APKBUILD
@@ -1,13 +1,15 @@
+# Contributor: Sören Tempel <[email-masked]>
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=distcc
 pkgver=3.1
-pkgrel=9
+pkgrel=10
 pkgdesc="A distributed C, C++, Obj C compiler"
 url="http://distcc.org"
 arch="all"
 license="GPL2"
-depends=
+depends=""
 makedepends="popt-dev python-dev"
+install="$pkgname.pre-install"
 source="http://$pkgname.googlecode.com/files/$pkgname-$pkgver.tar.bz2
 	distcc-3.1-clone.patch
 	distcc-hardened.patch
diff --git a/main/distcc/distcc.pre-install b/main/distcc/distcc.pre-install
new file mode 100644
index 0000000..bd7fba2
--- /dev/null
+++ b/main/distcc/distcc.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup -S distcc 2>/dev/null
+adduser -H -h /dev/null -s /sbin/nologin -G distcc -D distcc 2>/dev/null
+exit 0
-- 
2.6.3

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Sören Tempel <[email-masked]>
Date: Fri, 20 Nov 2015 21:43:25 +0100

Instead create it in the .pre-install script in the main/distcc package.
See the last commit for details.
---
 main/alpine-baselayout/APKBUILD | 2 +-
 main/alpine-baselayout/group    | 1 -
 main/alpine-baselayout/passwd   | 1 -
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/main/alpine-baselayout/APKBUILD b/main/alpine-baselayout/APKBUILD
index 2348234..3af7094 100644
--- a/main/alpine-baselayout/APKBUILD
+++ b/main/alpine-baselayout/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=alpine-baselayout
 pkgver=2.3.2
-pkgrel=7
+pkgrel=8
 pkgdesc="Alpine base dir structure and init scripts"
 url="http://git.alpinelinux.org/cgit/aports/tree/main/alpine-baselayout"
 arch="all"
diff --git a/main/alpine-baselayout/group b/main/alpine-baselayout/group
index 9eccb74..3fe3509 100644
--- a/main/alpine-baselayout/group
+++ b/main/alpine-baselayout/group
@@ -41,7 +41,6 @@ users:x:100:games
 ntp:x:123:
 nofiles:x:200:
 smmsp:x:209:smmsp
-distcc:x:240:
 locate:x:245:
 abuild:x:300:
 utmp:x:406:
diff --git a/main/alpine-baselayout/passwd b/main/alpine-baselayout/passwd
index 9165db6..f80ff2b 100644
--- a/main/alpine-baselayout/passwd
+++ b/main/alpine-baselayout/passwd
@@ -25,6 +25,5 @@ cyrus:x:85:12::/usr/cyrus:/sbin/nologin
 vpopmail:x:89:89::/var/vpopmail:/sbin/nologin
 ntp:x:123:123:NTP:/var/empty:/sbin/nologin
 smmsp:x:209:209:smmsp:/var/spool/mqueue:/sbin/nologin
-distcc:x:240:2:distccd:/dev/null:/sbin/nologin
 guest:x:405:100:guest:/dev/null:/sbin/nologin
 nobody:x:65534:65534:nobody:/:/sbin/nologin
-- 
2.6.3

---