[141858] trunk/dports/net/unbound/Portfile
snc at macports.org
snc at macports.org
Sat Dec 12 03:18:27 PST 2015
Revision: 141858
https://trac.macports.org/changeset/141858
Author: snc at macports.org
Date: 2015-10-29 14:59:06 -0700 (Thu, 29 Oct 2015)
Log Message:
-----------
unbound: place dnssec root key into chroot, #49264
Modified Paths:
--------------
trunk/dports/net/unbound/Portfile
Modified: trunk/dports/net/unbound/Portfile
===================================================================
--- trunk/dports/net/unbound/Portfile 2015-10-29 20:39:49 UTC (rev 141857)
+++ trunk/dports/net/unbound/Portfile 2015-10-29 21:59:06 UTC (rev 141858)
@@ -5,6 +5,7 @@
name unbound
version 1.5.6
+revision 1
categories net
license BSD
maintainers snc
@@ -34,7 +35,7 @@
sha256 ad3823f5895f59da9e408ea273fcf81d8a76914c18864fba256d7f140b83e404
configure.args-append --with-pidfile=${prefix}/var/run/${name}/${name}.pid \
- --with-rootkey-file=${prefix}/var/run/${name}/root.key
+ --with-rootkey-file=${prefix}/etc/${name}/root.key
if {${os.major} == 10} {
configure.compiler macports-clang-3.4
@@ -51,19 +52,21 @@
post-destroot {
xinstall -o ${unbounduser} -g ${unboundgroup} -m 755 -d ${destroot}${prefix}/var/run/${name}
move ${destroot}${prefix}/etc/${name}/${name}.conf ${destroot}${prefix}/etc/${name}/${name}.conf-dist
+ reinplace -W ${destroot}${prefix}/etc/${name} "s/# auto-trust-anchor-file:/auto-trust-anchor-file:/g" ${name}.conf-dist
touch ${destroot}${prefix}/var/run/${name}/${name}.pid
file attributes ${destroot}${prefix}/var/run/${name}/${name}.pid -owner ${unbounduser} -group ${unboundgroup}
+ file attributes ${destroot}${prefix}/etc/${name} -group ${unboundgroup} -permissions 0775
}
post-activate {
- system "${prefix}/sbin/unbound-anchor -a \"${prefix}/var/run/${name}/root.key\" || :"
+ system "${prefix}/sbin/unbound-anchor -a \"${prefix}/etc/${name}/root.key\" || :"
file attributes ${prefix}/var/run/${name}/root.key -owner ${unbounduser} -group ${unboundgroup}
}
# Make it run on boot
startupitem.create yes
startupitem.name unbound
-startupitem.start "${prefix}/sbin/unbound-anchor -a ${prefix}/var/run/${name}/root.key || : && chown ${unbounduser}:${unboundgroup} ${prefix}/var/run/${name}/root.key && ${prefix}/sbin/unbound"
+startupitem.start "${prefix}/sbin/unbound-anchor -a ${prefix}/etc/${name}/root.key || : && chown ${unbounduser}:${unboundgroup} ${prefix}/etc/${name}/root.key && ${prefix}/sbin/unbound"
startupitem.stop "/bin/kill \$(cat ${prefix}/var/run/${name}/unbound.pid)"
livecheck.type regex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/7a760376/attachment-0001.html>
More information about the macports-changes
mailing list