From: Michael Orlitzky Date: Wed, 27 Mar 2019 16:28:12 +0000 (-0400) Subject: mail-filter/opendkim: new revision with a consistent config file. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=65005df6050d33d3eb5001d958aaae17bb72a962;p=gentoo.git mail-filter/opendkim: new revision with a consistent config file. The previous revisions installed a variable config file, and only did so conditionally, based on the state of the live filesystem. The new revision always installs the same config file. This should be simpler and more predictable. In addition, the temporary directory "${T}" is now used as "scratch space" while mangling that config file. Signed-off-by: Michael Orlitzky Package-Manager: Portage-2.3.62, Repoman-2.3.11 --- diff --git a/mail-filter/opendkim/opendkim-2.10.3-r7.ebuild b/mail-filter/opendkim/opendkim-2.10.3-r8.ebuild similarity index 93% rename from mail-filter/opendkim/opendkim-2.10.3-r7.ebuild rename to mail-filter/opendkim/opendkim-2.10.3-r8.ebuild index 9a16abcce519..c45d7104150b 100644 --- a/mail-filter/opendkim/opendkim-2.10.3-r7.ebuild +++ b/mail-filter/opendkim/opendkim-2.10.3-r8.ebuild @@ -135,15 +135,17 @@ src_install() { fowners root:opendkim /var/lib/opendkim fperms 750 /var/lib/opendkim - # default configuration - if [ ! -f "${ROOT}"/etc/opendkim/opendkim.conf ]; then - grep ^[^#] "${S}"/opendkim/opendkim.conf.simple \ - > "${D}"/etc/opendkim/opendkim.conf - if use unbound; then - echo TrustAnchorFile /etc/dnssec/root-anchors.txt >> "${D}"/etc/opendkim/opendkim.conf - fi - echo UserID opendkim >> "${D}"/etc/opendkim/opendkim.conf - fi + # Strip the comments out of the "simple" example configuration... + grep ^[^#] "${S}"/opendkim/opendkim.conf.simple \ + > "${T}/opendkim.conf" || die + + # and tweak it a bit before installing it unconditionally. + echo "# For use with unbound" >> "${T}/opendkim.conf" || die + echo "#TrustAnchorFile /etc/dnssec/root-anchors.txt" \ + >> "${T}/opendkim.conf" || die + echo UserID opendkim >> "${T}/opendkim.conf" || die + insinto /etc/opendkim + doins "${T}/opendkim.conf" } pkg_postinst() {