Ticket #49264: move_root.key_patch.diff

File move_root.key_patch.diff, 2.0 KB (added by danielluke (Daniel J. Luke), 9 years ago)

move root.key inside of chroot

  • Portfile

     
    55
    66name                unbound
    77version             1.5.6
     8revision            1
    89categories          net
    910license             BSD
    1011maintainers         snc
     
    3435                    sha256  ad3823f5895f59da9e408ea273fcf81d8a76914c18864fba256d7f140b83e404
    3536
    3637configure.args-append   --with-pidfile=${prefix}/var/run/${name}/${name}.pid \
    37                         --with-rootkey-file=${prefix}/var/run/${name}/root.key
     38                        --with-rootkey-file=${prefix}/etc/${name}/root.key
    3839
    3940if {${os.major} == 10} {
    4041        configure.compiler  macports-clang-3.4
     
    5354    move ${destroot}${prefix}/etc/${name}/${name}.conf ${destroot}${prefix}/etc/${name}/${name}.conf-dist
    5455    touch ${destroot}${prefix}/var/run/${name}/${name}.pid
    5556    file attributes ${destroot}${prefix}/var/run/${name}/${name}.pid -owner ${unbounduser} -group ${unboundgroup}
     57    file attributes ${destroot}${prefix}/etc/${name} -group ${unboundgroup} -permissions 0775
    5658}
    5759
    5860post-activate {
    59     system "${prefix}/sbin/unbound-anchor -a \"${prefix}/var/run/${name}/root.key\" || :"
     61    system "${prefix}/sbin/unbound-anchor -a \"${prefix}/etc/${name}/root.key\" || :"
    6062    file attributes ${prefix}/var/run/${name}/root.key -owner ${unbounduser} -group ${unboundgroup}
    6163}
    6264
     
    6365# Make it run on boot
    6466startupitem.create  yes
    6567startupitem.name    unbound
    66 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"
     68startupitem.start   "${prefix}/sbin/unbound-anchor -a ${prefix}/etc/${name}/root.key || : && chown ${unbounduser}:${unboundgroup} ${prefix}/etc/${name}/root.key && ${prefix}/sbin/unbound"
    6769startupitem.stop    "/bin/kill \$(cat ${prefix}/var/run/${name}/unbound.pid)"
    6870
    6971livecheck.type      regex