mail-filter/opendkim: new revision with a consistent config file.
authorMichael Orlitzky <mjo@gentoo.org>
Wed, 27 Mar 2019 16:28:12 +0000 (12:28 -0400)
committerMichael Orlitzky <mjo@gentoo.org>
Wed, 27 Mar 2019 17:18:08 +0000 (13:18 -0400)
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 <mjo@gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11

mail-filter/opendkim/opendkim-2.10.3-r8.ebuild [moved from mail-filter/opendkim/opendkim-2.10.3-r7.ebuild with 93% similarity]

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 9a16abcce519c8c83d37e824e5ce9aa8b512bbb6..c45d7104150b4d0c2e07593d7364148470a4eea5 100644 (file)
@@ -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() {