Revision: 120660 https://trac.macports.org/changeset/120660 Author: snc@macports.org Date: 2014-06-04 14:40:36 -0700 (Wed, 04 Jun 2014) Log Message: ----------- unbound: create/update dnssec key, #43881 Modified Paths: -------------- trunk/dports/net/unbound/Portfile Modified: trunk/dports/net/unbound/Portfile =================================================================== --- trunk/dports/net/unbound/Portfile 2014-06-04 21:07:33 UTC (rev 120659) +++ trunk/dports/net/unbound/Portfile 2014-06-04 21:40:36 UTC (rev 120660) @@ -5,6 +5,7 @@ name unbound version 1.4.22 +revision 1 categories net license BSD maintainers macports.org:snc \ @@ -32,7 +33,8 @@ checksums rmd160 e9b4ded75308ac2f2ed9ae6783e29411428626fc \ sha256 1caf5081b2190ecdb23fc4d998b7999e28640c941f53baff7aee03c092a7d29f -configure.args-append --with-pidfile=${prefix}/var/run/${name}/${name}.pid +configure.args-append --with-pidfile=${prefix}/var/run/${name}/${name}.pid \ + --with-rootkey-file=${prefix}/var/run/${name}/root.key variant libevent description {Build with libevent (slower, but allows use of large outgoing port ranges)} { depends_lib-append port:libevent @@ -44,17 +46,24 @@ 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 touch ${destroot}${prefix}/var/run/${name}/${name}.pid - file attributes ${destroot}${prefix}/var/run/${name}/${name}.pid -owner ${unbounduser} + file attributes ${destroot}${prefix}/var/run/${name}/${name}.pid -owner ${unbounduser} -group ${unboundgroup} } +post-activate { + system "${prefix}/sbin/unbound-anchor -a \"${prefix}/var/run/${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 -startupitem.stop "/bin/kill \$(cat ${prefix}/var/run/unbound/unbound.pid)" +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.stop "/bin/kill \$(cat ${prefix}/var/run/${name}/unbound.pid)" livecheck.type regex livecheck.url ${homepage}/download.html livecheck.regex "The latest version of unbound \\(currently (\\d+\\.\\d+(\\.\\d+))\\)" use_parallel_build no + +notes-append "An example configuration is provided at ${prefix}/etc/${name}/${name}.conf-dist."