diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2019-03-27 12:28:12 -0400 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2019-03-27 13:18:08 -0400 |
commit | 65005df6050d33d3eb5001d958aaae17bb72a962 (patch) | |
tree | 3a4752aadf35541b6ca523acfb1e532bba585000 /mail-filter | |
parent | mail-filter/opendkim: add a TODO question about a sed line. (diff) | |
download | gentoo-65005df6050d33d3eb5001d958aaae17bb72a962.tar.gz gentoo-65005df6050d33d3eb5001d958aaae17bb72a962.tar.bz2 gentoo-65005df6050d33d3eb5001d958aaae17bb72a962.zip |
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@gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11
Diffstat (limited to 'mail-filter')
-rw-r--r-- | mail-filter/opendkim/opendkim-2.10.3-r8.ebuild (renamed from mail-filter/opendkim/opendkim-2.10.3-r7.ebuild) | 20 |
1 files 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 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() { |