<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[145613] trunk/dports/security/logwatch</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/145613">145613</a></dd>
<dt>Author</dt> <dd>khindenburg@macports.org</dd>
<dt>Date</dt> <dd>2016-02-10 15:31:55 -0800 (Wed, 10 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>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</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportssecuritylogwatchPortfile">trunk/dports/security/logwatch/Portfile</a></li>
<li><a href="#trunkdportssecuritylogwatchfilesorgmacportslogwatchplist">trunk/dports/security/logwatch/files/org.macports.logwatch.plist</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportssecuritylogwatchfilespatchconflogwatchconfdiff">trunk/dports/security/logwatch/files/patch-conf.logwatch.conf.diff</a></li>
<li><a href="#trunkdportssecuritylogwatchfilespatchscriptslogwatchpldiff">trunk/dports/security/logwatch/files/patch-scripts.logwatch.pl.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportssecuritylogwatchPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/security/logwatch/Portfile (145612 => 145613)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> 
</span><span class="cx"> name                logwatch
</span><span class="cx"> version             7.4.1
</span><del>-revision            4
</del><ins>+revision            5
</ins><span class="cx"> distname            logwatch-${version}
</span><span class="cx"> categories          security
</span><span class="cx"> license             MIT
</span><span class="lines">@@ -30,30 +30,53 @@
</span><span class="cx"> checksums           rmd160  dd9539b3880b3a9ce2d0772f09e52de238a89405 \
</span><span class="cx">                     sha256  35ec31f9fe981aaa727b144ab3ff2eb655997d8ccabaf66586458f5dfc3a56eb
</span><span class="cx"> 
</span><del>-patchfiles          scripts_logwatch.pl.diff \
</del><ins>+patchfiles          patch-scripts.logwatch.pl.diff \
+                    patch-conf.logwatch.conf.diff \
</ins><span class="cx">                     perl5.22-deprecations.diff
</span><span class="cx"> 
</span><span class="cx"> use_configure       no
</span><del>-build {
</del><ins>+
+post-patch {
+    reinplace &quot;s|@PREFIX@|${prefix}|g&quot; ${worksrcpath}/scripts/logwatch.pl
+    reinplace &quot;s|@PREFIX@|${prefix}|g&quot; ${worksrcpath}/conf/logwatch.conf
+
</ins><span class="cx">     reinplace s|#!/usr/bin/perl|#!${prefix}/bin/perl| ${worksrcpath}/scripts/logwatch.pl
</span><del>-    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
</del><span class="cx">     reinplace s|messages|system|g ${worksrcpath}/conf/logfiles/messages.conf
</span><ins>+
+    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
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-destroot.keepdirs   ${destroot}${prefix}/var/cache/${name}
</del><ins>+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
+
</ins><span class="cx"> destroot {
</span><ins>+    file mkdir ${destroot}${prefix}/var/cache/${name} \
+    file mkdir ${destroot}${prefix}/etc/${name}
</ins><span class="cx">     file mkdir ${destroot}${prefix}/etc/${name}/scripts
</span><span class="cx">     file mkdir ${destroot}${prefix}/etc/${name}/conf/logfiles
</span><span class="cx">     file mkdir ${destroot}${prefix}/etc/${name}/conf/services
</span><span class="cx">     file mkdir ${destroot}${prefix}/share/${name}/dist.conf/logfiles
</span><del>-    file mkdir ${destroot}${prefix}/var/cache/${name}
</del><span class="cx"> 
</span><span class="cx">     file copy ${worksrcpath}/conf    ${destroot}${prefix}/share/${name}/default.conf
</span><span class="cx">     file copy ${worksrcpath}/scripts ${destroot}${prefix}/share/${name}/scripts
</span><span class="cx">     file copy ${worksrcpath}/lib     ${destroot}${prefix}/share/${name}/lib
</span><span class="cx"> 
</span><ins>+    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/
+
</ins><span class="cx">     # startup item
</span><span class="cx">     file mkdir ${destroot}${prefix}/etc/LaunchDaemons/${name}
</span><span class="cx">     file copy ${filespath}/org.macports.${name}.plist ${destroot}${prefix}/etc/LaunchDaemons/${name}/org.macports.${name}.plist
</span></span></pre></div>
<a id="trunkdportssecuritylogwatchfilesorgmacportslogwatchplist"></a>
<div class="modfile"><h4>Modified: trunk/dports/security/logwatch/files/org.macports.logwatch.plist (145612 => 145613)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -11,8 +11,6 @@
</span><span class="cx">   &lt;key&gt;ProgramArguments&lt;/key&gt;
</span><span class="cx">   &lt;array&gt;
</span><span class="cx">     &lt;string&gt;@PREFIX@/bin/logwatch&lt;/string&gt;
</span><del>-        &lt;string&gt;--mailto&lt;/string&gt;
-        &lt;string&gt;root&lt;/string&gt;
</del><span class="cx">   &lt;/array&gt;
</span><span class="cx">   &lt;key&gt;ServiceDescription&lt;/key&gt;
</span><span class="cx">   &lt;string&gt;Periodic run of logwatch&lt;/string&gt;
</span></span></pre></div>
<a id="trunkdportssecuritylogwatchfilespatchconflogwatchconfdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/security/logwatch/files/patch-conf.logwatch.conf.diff (0 => 145613)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+--- 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.
</ins></span></pre></div>
<a id="trunkdportssecuritylogwatchfilespatchscriptslogwatchpldiff"></a>
<div class="addfile"><h4>Added: trunk/dports/security/logwatch/files/patch-scripts.logwatch.pl.diff (0 => 145613)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+--- 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, &quot;C&quot;);

+-my $BaseDir = &quot;/usr/share/logwatch&quot;;
+-my $ConfigDir = &quot;/etc/logwatch&quot;;
++my $BaseDir = &quot;@PREFIX@/share/logwatch&quot;;
++my $ConfigDir = &quot;@PREFIX@/etc/logwatch&quot;;
+ my $PerlVersion = &quot;$^X&quot;;

+ #############################################################################
+@@ -82,10 +82,10 @@
+ $Config{'range'} = &quot;yesterday&quot;;
+ $Config{'debug'} = 0;
+ $Config{'archives'} = 1;
+-$Config{'tmpdir'} = &quot;/var/cache/logwatch&quot;;
++$Config{'tmpdir'} = &quot;@PREFIX@/var/cache/logwatch&quot;;
+ $Config{'numeric'} = 0;
+ $Config{'pathtocat'} = &quot;cat&quot;;
+-$Config{'pathtozcat'} = &quot;zcat&quot;;
++$Config{'pathtozcat'} = &quot;gunzip -c&quot;;
+ $Config{'pathtobzcat'} = &quot;bzcat&quot;;
+ $Config{'output'} = &quot;stdout&quot;; #8.0
+ $Config{'format'} = &quot;text&quot;; #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'} = &quot;/var/log&quot;;
++$Config{'logdir'} = &quot;@PREFIX@/var/log&quot;;

+ #Added to create switches for different os options -mgt
+ #Changed to POSIX to remove calls to uname and hostname
</ins></span></pre>
</div>
</div>

</body>
</html>