commit:     65005df6050d33d3eb5001d958aaae17bb72a962
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 27 16:28:12 2019 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Wed Mar 27 17:18:08 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65005df6

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 <mjo <AT> gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11

 ...im-2.10.3-r7.ebuild => opendkim-2.10.3-r8.ebuild} | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

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 9a16abcce51..c45d7104150 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() {

Reply via email to