From b7aa1f2e705f30ba74325bdb587e3024e04652bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20F=C3=B6rster?= Date: Sat, 9 Nov 2024 13:03:26 +0100 Subject: [PATCH] [net-dns/bind] sync --- ...-9.18.31.ebuild => bind-9.18.31-r1.ebuild} | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) rename net-dns/bind/{bind-9.18.31.ebuild => bind-9.18.31-r1.ebuild} (85%) diff --git a/net-dns/bind/bind-9.18.31.ebuild b/net-dns/bind/bind-9.18.31-r1.ebuild similarity index 85% rename from net-dns/bind/bind-9.18.31.ebuild rename to net-dns/bind/bind-9.18.31-r1.ebuild index 2d191de..6f6858f 100644 --- a/net-dns/bind/bind-9.18.31.ebuild +++ b/net-dns/bind/bind-9.18.31-r1.ebuild @@ -165,11 +165,11 @@ src_install() { pkg_postinst() { tmpfiles_process named.conf - if [[ ! -f '/etc/bind/rndc.key' && ! -f '/etc/bind/rndc.conf' ]]; then + if [[ -z ${ROOT} && ! -f ${EPREFIX}/etc/bind/rndc.key && ! -f ${EPREFIX}/etc/bind/rndc.conf ]]; then einfo "Generating rndc.key" - /usr/sbin/rndc-confgen -a - chown root:named /etc/bind/rndc.key || die - chmod 0640 /etc/bind/rndc.key || die + "${EPREFIX}"/usr/sbin/rndc-confgen -a || die + chown root:named "${EPREFIX}"/etc/bind/rndc.key || die + chmod 0640 "${EPREFIX}"/etc/bind/rndc.key || die fi einfo @@ -182,7 +182,7 @@ pkg_postinst() { einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`" einfo - CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT}) + CHROOT=$(source "${EROOT}"/etc/conf.d/named 2>/dev/null; echo ${CHROOT}) if [[ -n ${CHROOT} ]]; then elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" elog "To enable the old behaviour (without using mount) uncomment the" @@ -208,9 +208,9 @@ pkg_postinst() { } pkg_config() { - CHROOT=$(source /etc/conf.d/named; echo ${CHROOT}) - CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT}) - CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP}) + CHROOT=$(source "${EROOT}"/etc/conf.d/named; echo ${CHROOT}) + CHROOT_NOMOUNT=$(source "${EROOT}"/etc/conf.d/named; echo ${CHROOT_NOMOUNT}) + CHROOT_GEOIP=$(source "${EROOT}"/etc/conf.d/named; echo ${CHROOT_GEOIP}) if [[ -z "${CHROOT}" ]]; then eerror "This config script is designed to automate setting up" @@ -231,34 +231,34 @@ pkg_config() { echo; einfo "Setting up the chroot directory..." - mkdir -m 0750 -p ${CHROOT} || die - mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run} || die - mkdir -m 0750 -p ${CHROOT}/etc/bind || die - mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ || die + mkdir -m 0750 -p "${CHROOT}" || die + mkdir -m 0755 -p "${CHROOT}"/{dev,etc,var/log,run} || die + mkdir -m 0750 -p "${CHROOT}"/etc/bind || die + mkdir -m 0770 -p "${CHROOT}"/var/{bind,log/named} "${CHROOT}"/run/named/ || die chown root:named \ - ${CHROOT} \ - ${CHROOT}/var/{bind,log/named} \ - ${CHROOT}/run/named/ \ - ${CHROOT}/etc/bind \ + "${CHROOT}" \ + "${CHROOT}"/var/{bind,log/named} \ + "${CHROOT}"/run/named/ \ + "${CHROOT}"/etc/bind \ || die - mknod ${CHROOT}/dev/null c 1 3 || die - chmod 0666 ${CHROOT}/dev/null || die + mknod "${CHROOT}"/dev/null c 1 3 || die + chmod 0666 "${CHROOT}"/dev/null || die - mknod ${CHROOT}/dev/zero c 1 5 || die - chmod 0666 ${CHROOT}/dev/zero || die + mknod "${CHROOT}"/dev/zero c 1 5 || die + chmod 0666 "${CHROOT}"/dev/zero || die if [[ "${CHROOT_NOMOUNT:-0}" -ne 0 ]]; then - cp -a /etc/bind ${CHROOT}/etc/ || die - cp -a /var/bind ${CHROOT}/var/ || die + cp -a /etc/bind "${CHROOT}"/etc/ || die + cp -a /var/bind "${CHROOT}"/var/ || die fi if [[ "${CHROOT_GEOIP:-0}" -eq 1 ]]; then if use geoip; then - mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP || die + mkdir -m 0755 -p "${CHROOT}"/usr/share/GeoIP || die elif use geoip2; then - mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP2 || die + mkdir -m 0755 -p "${CHROOT}"/usr/share/GeoIP2 || die fi fi