]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/commitdiff
pdns-recursor: Create tmpfiles in package.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 1 Nov 2011 19:37:42 +0000 (20:37 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 1 Nov 2011 19:37:42 +0000 (20:37 +0100)
References #280.

pdns-recursor/pdns-recursor.nm

index 80f295211fcba26cc143cc97f624b01c0f34a120..bc0b950a350748ec67d69f5339e729851bc20ce7 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = pdns-recursor
 version    = 3.3
-release    = 5
+release    = 6
 
 groups     = Networking/DNS
 url        = http://powerdns.com/
@@ -17,7 +17,7 @@ description
        package if you need a dns cache for your network.
 end
 
-source_dl  =
+source_dl  = http://downloads.powerdns.com/releases/
 sources    = %{thisapp}.tar.bz2
 
 build
@@ -25,6 +25,11 @@ build
                gcc-c++
                boost-devel
                lua-devel
+               shadow-utils
+       end
+
+       prepare_cmds
+               %{create_user}
        end
 
        build
@@ -47,9 +52,20 @@ build
 
                # Create folder for chroot
                mkdir -pv %{BUILDROOT}/var/lib/pdns-recursor
+
+               # Create directory for socket and stuff.
+               mkdir -pv %{BUILDROOT}/run/pdns-recursor
+               chown -v pdns-recursor.pdns-recursor %{BUILDROOT}/run/pdns-recursor
        end
 end
 
+create_user
+       getent group pdns-recursor >/dev/null || groupadd -r pdns-recursor
+       getent passwd pdns-recursor >/dev/null || \
+               useradd -r -g pdns-recursor -d /var/lib/pdns-recursor -s /sbin/nologin \
+                       pdns-recursor
+end
+
 packages
        package %{name}
                configfiles
@@ -59,10 +75,7 @@ packages
                prerequires = shadow-utils systemd-units
 
                script prein
-                       getent group pdns-recursor >/dev/null || groupadd -r pdns-recursor
-                       getent passwd pdns-recursor >/dev/null || \
-                               useradd -r -g pdns-recursor -d /var/lib/pdns-recursor -s /sbin/nologin \
-                                       pdns-recursor
+                       %{create_user}
                end
 
                script postin