mail-filter/opendkim: new revision to set sysconfdir consistently.
authorMichael Orlitzky <mjo@gentoo.org>
Wed, 24 Apr 2019 21:23:44 +0000 (17:23 -0400)
committerMichael Orlitzky <mjo@gentoo.org>
Wed, 24 Apr 2019 21:24:15 +0000 (17:24 -0400)
In the previous revision -r11, we tried to unite the configuration for
OpenRC and systemd. But, I made a mistake: the upstream location for
e.g. the main configuration file is @sysconfdir@/opendkim.conf, but in
Gentoo we install it to @sysconfdir@/opendkim/opendkim.conf. That path
is overridden in the OpenRC service script, but not in the systemd
service, which now crashes upon starting.

The error, however, is in the OpenRC script (and in our ebuild). The
correct way to relocate the configuration files is to pass a different
value to --sysconfdir in src_configure(). This new revision does that,
and updates the OpenRC service script to use the built-in location,
rather than a custom Gentoo-defined one. That's how it should have
been all along.

This also fixes an unreported bug, wherein all of the installed
documentation like opendkim.conf(5) pointed to the wrong path.

Thanks to Ralph Seichter who built a systemd virtual machine in order
to test everything.

Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11

mail-filter/opendkim/files/opendkim-2.10.3-openrc.patch
mail-filter/opendkim/opendkim-2.10.3-r12.ebuild [moved from mail-filter/opendkim/opendkim-2.10.3-r11.ebuild with 96% similarity]

index 9033b84281ca99fa7581d6dbc01d82ab8ae0b5b0..9b645ba0f0ce6fda3659f3ecac7e75090f33bcab 100644 (file)
@@ -119,17 +119,9 @@ index 76df01cd..401130bb 100644
 +SUBDIRS = convert docs init ldap lua patches repute spec stats
  
  dist_doc_DATA = README
-diff --git a/contrib/OpenRC/.gitignore b/contrib/OpenRC/.gitignore
-new file mode 100644
-index 00000000..af0aa700
---- /dev/null
-+++ b/contrib/OpenRC/.gitignore
-@@ -0,0 +1,2 @@
-+opendkim.openrc
-+opendkim.openrc.in
 diff --git a/contrib/OpenRC/opendkim.openrc.in.in b/contrib/OpenRC/opendkim.openrc.in.in
 new file mode 100644
-index 00000000..d9631cdf
+index 00000000..4b783615
 --- /dev/null
 +++ b/contrib/OpenRC/opendkim.openrc.in.in
 @@ -0,0 +1,54 @@
@@ -137,7 +129,7 @@ index 00000000..d9631cdf
 +# Copyright 1999-2019 Gentoo Authors
 +# Distributed under the terms of the GNU General Public License v2
 +
-+CONFFILE="@SYSCONFDIR@/opendkim/${RC_SVCNAME}.conf"
++CONFFILE="@SYSCONFDIR@/${RC_SVCNAME}.conf"
 +required_files="${CONFFILE}"
 +
 +command="@SBINDIR@/opendkim"
similarity index 96%
rename from mail-filter/opendkim/opendkim-2.10.3-r11.ebuild
rename to mail-filter/opendkim/opendkim-2.10.3-r12.ebuild
index 0db960be3c696e75687959f1174c96212c57d25b..ee5908da59c4f0f46077104690c45bc4c625b533 100644 (file)
@@ -80,6 +80,12 @@ src_configure() {
        if use ldap; then
                myconf+=( $(use_with sasl) )
        fi
+
+       # We install the our configuration filed under e.g. /etc/opendkim,
+       # so the next line is necessary to point the daemon and all of its
+       # documentation to the right location by default.
+       myconf+=( --sysconfdir="${EPREFIX}/etc/${PN}" )
+
        econf \
                $(use_with berkdb db) \
                $(use_with opendbx odbx) \