diff -Naur a/amavisd-new-2.8.1-r1.ebuild b/amavisd-new-2.8.1-r1.ebuild --- a/amavisd-new-2.8.1-r1.ebuild 2014-02-15 15:51:33.802946651 +0100 +++ b/amavisd-new-2.8.1-r1.ebuild 2014-02-15 16:01:59.607943706 +0100 @@ -70,6 +70,8 @@ S="${WORKDIR}/${MY_P}" src_prepare() { + # bug 501400, correct place for PID + epatch "${FILESDIR}"/${PN}-pid-location.patch if use courier ; then epatch amavisd-new-courier.patch fi @@ -124,6 +126,8 @@ keepdir "${AMAVIS_ROOT}/quarantine" keepdir "${AMAVIS_ROOT}/tmp" keepdir "${AMAVIS_ROOT}/var" + + mkdir "${ED}"/run/amavis dodoc AAAREADME.first INSTALL MANIFEST RELEASE_NOTES TODO \ amavisd.conf-default amavisd-custom.conf @@ -185,5 +189,6 @@ pkg_postinst() { chown root:amavis "${ROOT}/etc/amavisd.conf" + chown amavis:amavis "${ROOT}/run/amavis" chown -R amavis:amavis "${ROOT}/${AMAVIS_ROOT}" } diff -Naur a/files/amavisd-new-pid-location.patch b/files/amavisd-new-pid-location.patch --- a/files/amavisd-new-pid-location.patch 1970-01-01 01:00:00.000000000 +0100 +++ b/files/amavisd-new-pid-location.patch 2014-02-15 15:59:28.774944416 +0100 @@ -0,0 +1,14 @@ +diff -Naur a/amavisd.conf b/amavisd.conf +--- a/amavisd.conf 2014-02-15 15:44:54.589948529 +0100 ++++ b/amavisd.conf 2014-02-15 15:57:24.344945002 +0100 +@@ -33,6 +33,10 @@ + # $helpers_home = "$MYHOME/var"; # working directory for SpamAssassin, -S + # $lock_file = "$MYHOME/var/amavisd.lock"; # -L + # $pid_file = "$MYHOME/var/amavisd.pid"; # -P ++ ++# move PID file to /run gentoo bug #501400 ++$pid_file = "/run/amavis/amavisd.pid"; ++ + #NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually + + $log_level = 0; # verbosity 0..5, -d