[145613] trunk/dports/security/logwatch
khindenburg at macports.org
khindenburg at macports.org
Wed Feb 10 15:31:55 PST 2016
Revision: 145613
https://trac.macports.org/changeset/145613
Author: khindenburg at macports.org
Date: 2016-02-10 15:31:55 -0800 (Wed, 10 Feb 2016)
Log Message:
-----------
logwatch: #50589 fix included
- use patches for PREFIX instead of reinplaces
- try to fix all folder locations
- remove mailto=root in plist as that's the default
- add manual pages
Modified Paths:
--------------
trunk/dports/security/logwatch/Portfile
trunk/dports/security/logwatch/files/org.macports.logwatch.plist
Added Paths:
-----------
trunk/dports/security/logwatch/files/patch-conf.logwatch.conf.diff
trunk/dports/security/logwatch/files/patch-scripts.logwatch.pl.diff
Modified: trunk/dports/security/logwatch/Portfile
===================================================================
--- trunk/dports/security/logwatch/Portfile 2016-02-10 22:27:33 UTC (rev 145612)
+++ trunk/dports/security/logwatch/Portfile 2016-02-10 23:31:55 UTC (rev 145613)
@@ -5,7 +5,7 @@
name logwatch
version 7.4.1
-revision 4
+revision 5
distname logwatch-${version}
categories security
license MIT
@@ -30,30 +30,53 @@
checksums rmd160 dd9539b3880b3a9ce2d0772f09e52de238a89405 \
sha256 35ec31f9fe981aaa727b144ab3ff2eb655997d8ccabaf66586458f5dfc3a56eb
-patchfiles scripts_logwatch.pl.diff \
+patchfiles patch-scripts.logwatch.pl.diff \
+ patch-conf.logwatch.conf.diff \
perl5.22-deprecations.diff
use_configure no
-build {
+
+post-patch {
+ reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/scripts/logwatch.pl
+ reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/conf/logwatch.conf
+
reinplace s|#!/usr/bin/perl|#!${prefix}/bin/perl| ${worksrcpath}/scripts/logwatch.pl
- reinplace s|/usr/share/${name}|${prefix}/share/${name}|g ${worksrcpath}/scripts/logwatch.pl
- reinplace s|/var/cache/${name}|${prefix}/var/cache/${name}|g ${worksrcpath}/scripts/logwatch.pl
- reinplace s|/var/cache/${name}|${prefix}/var/cache/${name}|g ${worksrcpath}/conf/logwatch.conf
reinplace s|messages|system|g ${worksrcpath}/conf/logfiles/messages.conf
+
+ reinplace s|/usr/share/logwatch/default.conf|${prefix}/share/${name}/default.conf| ${worksrcpath}/logwatch.conf.5
+ reinplace s|/etc/logwatch/conf/ignore.conf|${prefix}/share/${name}/conf/ignore.conf| ${worksrcpath}/logwatch.conf.5
+ reinplace s|/etc/logwatch|${prefix}/etc/${name}| ${worksrcpath}/logwatch.conf.5
+
+ reinplace s|/usr/share|${prefix}/share| ${worksrcpath}/logwatch.8
+ reinplace s|/etc/${name}|${prefix}/etc/${name}| ${worksrcpath}/logwatch.8
}
-destroot.keepdirs ${destroot}${prefix}/var/cache/${name}
+build {}
+
+destroot.keepdirs ${destroot}${prefix}/var/cache/${name} \
+ ${destroot}${prefix}/etc/${name} \
+ ${destroot}${prefix}/etc/${name}/scripts \
+ ${destroot}${prefix}/etc/${name}/conf/logfiles \
+ ${destroot}${prefix}/etc/${name}/conf/services
+
destroot {
+ file mkdir ${destroot}${prefix}/var/cache/${name} \
+ file mkdir ${destroot}${prefix}/etc/${name}
file mkdir ${destroot}${prefix}/etc/${name}/scripts
file mkdir ${destroot}${prefix}/etc/${name}/conf/logfiles
file mkdir ${destroot}${prefix}/etc/${name}/conf/services
file mkdir ${destroot}${prefix}/share/${name}/dist.conf/logfiles
- file mkdir ${destroot}${prefix}/var/cache/${name}
file copy ${worksrcpath}/conf ${destroot}${prefix}/share/${name}/default.conf
file copy ${worksrcpath}/scripts ${destroot}${prefix}/share/${name}/scripts
file copy ${worksrcpath}/lib ${destroot}${prefix}/share/${name}/lib
+ xinstall -m 755 -d ${destroot}${prefix}/share/man/man5
+ xinstall -m 755 -d ${destroot}${prefix}/share/man/man8
+
+ xinstall -m 644 ${worksrcpath}/logwatch.conf.5 ${destroot}${prefix}/share/man/man5/
+ xinstall -m 644 ${worksrcpath}/logwatch.8 ${destroot}${prefix}/share/man/man8/
+
# startup item
file mkdir ${destroot}${prefix}/etc/LaunchDaemons/${name}
file copy ${filespath}/org.macports.${name}.plist ${destroot}${prefix}/etc/LaunchDaemons/${name}/org.macports.${name}.plist
Modified: trunk/dports/security/logwatch/files/org.macports.logwatch.plist
===================================================================
--- trunk/dports/security/logwatch/files/org.macports.logwatch.plist 2016-02-10 22:27:33 UTC (rev 145612)
+++ trunk/dports/security/logwatch/files/org.macports.logwatch.plist 2016-02-10 23:31:55 UTC (rev 145613)
@@ -11,8 +11,6 @@
<key>ProgramArguments</key>
<array>
<string>@PREFIX@/bin/logwatch</string>
- <string>--mailto</string>
- <string>root</string>
</array>
<key>ServiceDescription</key>
<string>Periodic run of logwatch</string>
Added: trunk/dports/security/logwatch/files/patch-conf.logwatch.conf.diff
===================================================================
--- trunk/dports/security/logwatch/files/patch-conf.logwatch.conf.diff (rev 0)
+++ trunk/dports/security/logwatch/files/patch-conf.logwatch.conf.diff 2016-02-10 23:31:55 UTC (rev 145613)
@@ -0,0 +1,11 @@
+--- conf/logwatch.conf 2014-09-23 07:52:47.000000000 -0400
++++ conf/logwatch.conf 2016-02-10 14:51:52.000000000 -0500
+@@ -27,7 +27,7 @@
+ LogDir = /var/log
+
+ # You can override the default temp directory (/tmp) here
+-TmpDir = /var/cache/logwatch
++TmpDir = @PREFIX@/var/cache/logwatch
+
+ #Output/Format Options
+ #By default Logwatch will print to stdout in text with no encoding.
Added: trunk/dports/security/logwatch/files/patch-scripts.logwatch.pl.diff
===================================================================
--- trunk/dports/security/logwatch/files/patch-scripts.logwatch.pl.diff (rev 0)
+++ trunk/dports/security/logwatch/files/patch-scripts.logwatch.pl.diff 2016-02-10 23:31:55 UTC (rev 145613)
@@ -0,0 +1,35 @@
+--- scripts/logwatch.pl 2014-09-23 07:52:51.000000000 -0400
++++ scripts/logwatch.pl 2016-02-10 12:55:27.000000000 -0500
+@@ -47,8 +47,8 @@
+ use POSIX qw(locale_h);
+ setlocale(LC_ALL, "C");
+
+-my $BaseDir = "/usr/share/logwatch";
+-my $ConfigDir = "/etc/logwatch";
++my $BaseDir = "@PREFIX@/share/logwatch";
++my $ConfigDir = "@PREFIX@/etc/logwatch";
+ my $PerlVersion = "$^X";
+
+ #############################################################################
+@@ -82,10 +82,10 @@
+ $Config{'range'} = "yesterday";
+ $Config{'debug'} = 0;
+ $Config{'archives'} = 1;
+-$Config{'tmpdir'} = "/var/cache/logwatch";
++$Config{'tmpdir'} = "@PREFIX@/var/cache/logwatch";
+ $Config{'numeric'} = 0;
+ $Config{'pathtocat'} = "cat";
+-$Config{'pathtozcat'} = "zcat";
++$Config{'pathtozcat'} = "gunzip -c";
+ $Config{'pathtobzcat'} = "bzcat";
+ $Config{'output'} = "stdout"; #8.0
+ $Config{'format'} = "text"; #8.0
+@@ -113,7 +113,7 @@
+ # Logwatch now does some basic searching for logs
+ # So if the log file is not in the log path it will check /var/adm
+ # and then /var/log -mgt
+-$Config{'logdir'} = "/var/log";
++$Config{'logdir'} = "@PREFIX@/var/log";
+
+ #Added to create switches for different os options -mgt
+ #Changed to POSIX to remove calls to uname and hostname
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160210/bf825b13/attachment.html>
More information about the macports-changes
mailing list