From f42c7316aee664298d9cac5c38523ea46b74cf04 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 3 Dec 2013 20:02:07 -0500 Subject: [PATCH] Replace the config patch with a sed invocation. --- net-mail/amavis-logwatch/Manifest | 3 +-- .../amavis-logwatch/amavis-logwatch-1.51.02.ebuild | 14 ++++++++++---- .../files/default_config_location.patch | 11 ----------- 3 files changed, 11 insertions(+), 17 deletions(-) delete mode 100644 net-mail/amavis-logwatch/files/default_config_location.patch diff --git a/net-mail/amavis-logwatch/Manifest b/net-mail/amavis-logwatch/Manifest index 31ae6ee..80c2c99 100644 --- a/net-mail/amavis-logwatch/Manifest +++ b/net-mail/amavis-logwatch/Manifest @@ -1,4 +1,3 @@ -AUX default_config_location.patch 439 SHA256 661abd73a49b83d47ca87f9ac61ef1b64e27f0baa279e2598a247e59ee4b744b SHA512 5aebcd582931ff083931dbd0b7914df79ef72521b10d855446b39ef76645dc987381587c58936c0cd5cca7af03d4c306ec0eeee06eb25b5fc75f8ae2ebc67fbc WHIRLPOOL eec9dfbfbfdd1542846ffe4052e2fa3eff2b82c9b6236dab2d869cd672c872ed34efeef1980957ca59a174a593526e6f1d3e752c5f39a7837db9dec8a76cae60 DIST amavis-logwatch-1.51.02.tgz 86314 SHA256 bdbb1c59d4ba08c1d8f2ff4a340d55f1063b4b7044158259cd7fc50cbde8b0fc SHA512 af1153dab6d01b47cd625358dead1ca3cd7b71aca00b43f65a822140b1dfdc9f5bb99d23a5908544f3ccd850a32e0d5600c87d1101b747ddf6600c67cae9019c WHIRLPOOL 2117bf9cc790a2c6bddf587b88f3275fb3f1204f6ec99db94228516becff639c8e720e8204773e4240f055a24cfbe7e9128c067bc52214a4b81ec368b760726e -EBUILD amavis-logwatch-1.51.02.ebuild 1335 SHA256 e19815596c625694069f49e3b98b4c692bad4e8277bb07ea3a68c085c28e619f SHA512 0a50b6b5de94dbec87bd4451e78524409bbecbe23fc24dd010a284e3c428456ecc6c367fb992a79d6382d5ff92a69c87774c684b675cc22d1bbd767f288993e4 WHIRLPOOL 5803d759679e13bc825e16180d956e0079a8ccd407b80f57bb2051ca76f00c08822f015c60e8252e51feb7c075bc6358281d6f7de03947c076fb23df8b8d6acd +EBUILD amavis-logwatch-1.51.02.ebuild 1671 SHA256 929599ce544c9014015b15d1b697c1cbed4afb168ff9fda9c7874b7c26d21253 SHA512 628522bb4604f97f5b2f0a40f52107686fc6ba6fd8121e836d67a20af0cf60e3667445a20a6ff3592b4cfa2c3d9e38ee1eda516c9ee7d4d54afcc519a664ee65 WHIRLPOOL 506005740f2d38a5ab9a78bdc2be8b4dd1f14f7c83075794b20dbb37352e712494f4a435b225a8027d5388961e9666721c473ecead21620da298b73869ae054e MISC metadata.xml 305 SHA256 d26b2b1ced185340a913e1e12a211c68edc8f5e563e7db2724637955147a791f SHA512 5dfdc3bc4e8be9ffb3695b59ea6ef330ef185185a9737d79fd2c067a2cf861dfc10b24a4b712774bdb240ac28ac4ef591d683d8c1e30a887b3476d5947105b97 WHIRLPOOL 4c6896d05e15a6f64d53d3cd8353c3df88ce9c8dd294fee0510fea71743783ec7958df2519eb4a209d31a50bb3b63e95ec91d509419fe05c69239b65335ef7f7 diff --git a/net-mail/amavis-logwatch/amavis-logwatch-1.51.02.ebuild b/net-mail/amavis-logwatch/amavis-logwatch-1.51.02.ebuild index fa0b005..566c515 100644 --- a/net-mail/amavis-logwatch/amavis-logwatch-1.51.02.ebuild +++ b/net-mail/amavis-logwatch/amavis-logwatch-1.51.02.ebuild @@ -4,8 +4,6 @@ EAPI=5 -inherit eutils - DESCRIPTION="A log analyzer for amavisd-new" HOMEPAGE="http://logreporters.sourceforge.net/" SRC_URI="mirror://sourceforge/logreporters/${P}.tgz" @@ -18,7 +16,11 @@ IUSE="logwatch" RDEPEND="dev-lang/perl" src_prepare() { - epatch "${FILESDIR}/default_config_location.patch" + # Replace the default config file location with ours. + local cfg_default='/usr/local/etc/${progname_prefix}-logwatch.conf' + local cfg_gentoo='/etc/${progname_prefix}-logwatch.conf'; + sed -i "s~${cfg_default}~${cfg_gentoo}~" ${PN} \ + || die 'failed to update the default config location' } src_compile() { @@ -42,8 +44,12 @@ src_install() { # Remove the taint mode (-T) switch from the header of the # standalone executable, and save the result as our logwatch # filter. + # + # We don't do this for the standalone script because it's nice + # to have the taint flag when it works. + # sed 's~^#!/usr/bin/perl -T$~#!/usr/bin/perl~' ${PN} > amavis \ - || die "failed to remove the perl taint switch" + || die 'failed to remove the perl taint switch' insinto /etc/logwatch/scripts/services doins amavis diff --git a/net-mail/amavis-logwatch/files/default_config_location.patch b/net-mail/amavis-logwatch/files/default_config_location.patch deleted file mode 100644 index bf6a459..0000000 --- a/net-mail/amavis-logwatch/files/default_config_location.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/amavis-logwatch 2010-11-12 21:35:02.000000000 -0500 -+++ b/amavis-logwatch 2011-07-12 12:57:18.005618573 -0400 -@@ -50,7 +50,7 @@ - our $progname_prefix = 'amavis'; - - # Specifies the default configuration file for use in standalone mode. --my $config_file = "/usr/local/etc/${progname_prefix}-logwatch.conf"; -+my $config_file = "/etc/${progname_prefix}-logwatch.conf"; - - #MODULE: ../Logreporters/Utils.pm - package Logreporters::Utils; -- 2.43.2