pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/logrotate



Module Name:    pkgsrc
Committed By:   fhajny
Date:           Mon Mar  6 12:59:53 UTC 2017

Modified Files:
        pkgsrc/sysutils/logrotate: MESSAGE Makefile PLIST distinfo
        pkgsrc/sysutils/logrotate/patches: patch-examples_logrotate-default
            patch-examples_logrotate.cron
Added Files:
        pkgsrc/sysutils/logrotate/patches: patch-logrotate.c

Log Message:
* Fix compilation with GCC, based on https://github.com/joyent/pkgsrc/pull/470.
* Use proper Github support, use tagged releases.
* Use upstream install target.
* Cleanup and legibility.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/logrotate/MESSAGE
cvs rdiff -u -r1.15 -r1.16 pkgsrc/sysutils/logrotate/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/logrotate/PLIST
cvs rdiff -u -r1.13 -r1.14 pkgsrc/sysutils/logrotate/distinfo
cvs rdiff -u -r1.4 -r1.5 \
    pkgsrc/sysutils/logrotate/patches/patch-examples_logrotate-default
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/sysutils/logrotate/patches/patch-examples_logrotate.cron
cvs rdiff -u -r0 -r1.3 pkgsrc/sysutils/logrotate/patches/patch-logrotate.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/logrotate/MESSAGE
diff -u pkgsrc/sysutils/logrotate/MESSAGE:1.2 pkgsrc/sysutils/logrotate/MESSAGE:1.3
--- pkgsrc/sysutils/logrotate/MESSAGE:1.2       Thu Jan 10 18:16:29 2013
+++ pkgsrc/sysutils/logrotate/MESSAGE   Mon Mar  6 12:59:53 2017
@@ -1,5 +1,5 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.2 2013/01/10 18:16:29 wiz Exp $
+$NetBSD: MESSAGE,v 1.3 2017/03/06 12:59:53 fhajny Exp $
 To set up ${PKGNAME}:
 
 1/ modify ${PKG_SYSCONFDIR}/logrotate.conf to your needs,
@@ -8,6 +8,6 @@ ${PKG_SYSCONFDIR}/logrotate.d/
 
 2/ set up a daily cron job for logrotate in ${ROOT_USER}'s crontab;
 this can be done with one of the following line:
-0 0 * * * /bin/sh ${EGDIR}/logrotate.cron
+0 0 * * * /bin/sh ${PREFIX}/${EGDIR}/logrotate.cron
 0 0 * * * ${PREFIX}/sbin/logrotate ${PKG_SYSCONFDIR}/logrotate.conf
 ===========================================================================

Index: pkgsrc/sysutils/logrotate/Makefile
diff -u pkgsrc/sysutils/logrotate/Makefile:1.15 pkgsrc/sysutils/logrotate/Makefile:1.16
--- pkgsrc/sysutils/logrotate/Makefile:1.15     Thu Jan 26 20:12:32 2017
+++ pkgsrc/sysutils/logrotate/Makefile  Mon Mar  6 12:59:53 2017
@@ -1,23 +1,22 @@
-# $NetBSD: Makefile,v 1.15 2017/01/26 20:12:32 nils Exp $
+# $NetBSD: Makefile,v 1.16 2017/03/06 12:59:53 fhajny Exp $
 
-DISTNAME=              ${GHCOMMIT}
-PKGNAME=               logrotate-3.11.0
+DISTNAME=              logrotate-3.11.0
+PKGREVISION=           1
 CATEGORIES=            sysutils
-MASTER_SITES=          ${MASTER_SITE_GITHUB:=logrotate/logrotate/archive/}
+MASTER_SITES=          ${MASTER_SITE_GITHUB:=logrotate/}
 
 MAINTAINER=            nils%NetBSD.org@localhost
 HOMEPAGE=              https://github.com/logrotate/logrotate/
 COMMENT=               Daemon to rotate, compress, remove and mail system log files
 LICENSE=               gnu-gpl-v2
 
-GHCOMMIT=              f16495b3e5f3e5f333956a384fdc9917fc8ec81a
-USE_TOOLS+=            gmake gzip:run gunzip:run mail:run automake autoconf
+GITHUB_RELEASE=                ${PKGVERSION_NOREV}
+
+USE_TOOLS+=            gmake gzip:run gunzip:run mail:run
 USE_LIBTOOL=           yes
 GNU_CONFIGURE=         yes
-HAS_CONFIGURE=         yes
 NO_EXPORT_CPP=         yes
 
-WRKSRC=                        ${WRKDIR}/logrotate-${GHCOMMIT}
 CONFIGURE_ENV+=                STATEFILE=\"${VARBASE}/db/logrotate.status\"
 CONFIGURE_ENV+=                DEFAULT_MAIL_COMMAND=\"${MAIL_CMD:Q}\"
 CONFIGURE_ENV+=                COMPRESS_COMMAND=\"${GZIP_CMD:[1]:Q}\"
@@ -25,37 +24,27 @@ CONFIGURE_ENV+=             UNCOMPRESS_COMMAND=\"${
 CONFIGURE_ARGS+=       --with-state-file-path="${VARBASE}/db/logrotate.status"
 
 BUILD_DEFS+=           VARBASE
-EGDIR=                 ${PREFIX}/share/examples/logrotate
-CONF_FILES=            ${EGDIR}/logrotate.conf ${PKG_SYSCONFDIR}/logrotate.conf
-OWN_DIRS=              ${PKG_SYSCONFDIR}/logrotate.d
-MESSAGE_SUBST+=                EGDIR=${EGDIR}
-INSTALLATION_DIRS+=    ${EGDIR} ${PKG_SYSCONFDIR} ${OWN_DIRS}
-AUTO_MKDIRS=           yes
 
+MESSAGE_SUBST+=                EGDIR=${EGDIR}
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     pre-build
 SUBST_MESSAGE.paths=   Substituting paths variables.
 SUBST_FILES.paths=     examples/logrotate-default
 SUBST_FILES.paths+=    examples/logrotate.cron
-SUBST_VARS.paths=      PREFIX
-SUBST_VARS.paths+=     VARBASE
-SUBST_VARS.paths+=     PKG_SYSCONFDIR
-
-DOCDIR=                        share/doc/logrotate
-
-pre-configure:
-       cd ${WRKSRC} && \
-               ${SETENV} ${CONFIGURE_ENV} ./autogen.sh
-
-do-install:
-       ${INSTALL_PROGRAM} ${WRKSRC}/logrotate ${DESTDIR}${PREFIX}/sbin
-       ${INSTALL_DATA} ${WRKSRC}/examples/logrotate-default ${DESTDIR}${EGDIR}/logrotate.conf
-       ${INSTALL_DATA} ${WRKSRC}/examples/logrotate.cron ${DESTDIR}/${EGDIR}
-       ${INSTALL_DATA} ${WRKSRC}/README.* ${DESTDIR}${PREFIX}/${DOCDIR}
-       ${INSTALL_DATA} ${WRKSRC}/ChangeLog.md ${DESTDIR}${PREFIX}/${DOCDIR}
-       ${INSTALL_DATA} ${WRKSRC}/COPYING ${DESTDIR}${PREFIX}/${DOCDIR}
-       ${INSTALL_MAN} ${WRKSRC}/logrotate.conf.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
-       ${INSTALL_MAN} ${WRKSRC}/logrotate.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
+SUBST_VARS.paths=      PREFIX PKG_SYSCONFDIR
+
+CONF_FILES=            ${EGDIR}/logrotate.conf ${PKG_SYSCONFDIR}/logrotate.conf
+OWN_DIRS=              ${PKG_SYSCONFDIR}/logrotate.d
+
+EGDIR=                 share/examples/logrotate
+
+INSTALLATION_DIRS+=    ${EGDIR}
+
+post-install:
+       ${INSTALL_DATA} ${WRKSRC}/examples/logrotate-default \
+               ${DESTDIR}${PREFIX}/${EGDIR}/logrotate.conf
+       ${INSTALL_DATA} ${WRKSRC}/examples/logrotate.cron \
+               ${DESTDIR}${PREFIX}/${EGDIR}
 
 .include "../../devel/popt/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/sysutils/logrotate/PLIST
diff -u pkgsrc/sysutils/logrotate/PLIST:1.4 pkgsrc/sysutils/logrotate/PLIST:1.5
--- pkgsrc/sysutils/logrotate/PLIST:1.4 Thu Jan 26 20:12:32 2017
+++ pkgsrc/sysutils/logrotate/PLIST     Mon Mar  6 12:59:53 2017
@@ -1,12 +1,6 @@
-@comment $NetBSD: PLIST,v 1.4 2017/01/26 20:12:32 nils Exp $
+@comment $NetBSD: PLIST,v 1.5 2017/03/06 12:59:53 fhajny Exp $
 man/man5/logrotate.conf.5
 man/man8/logrotate.8
 sbin/logrotate
-share/doc/logrotate/COPYING
-share/doc/logrotate/ChangeLog.md
-share/doc/logrotate/README.HPUX
-share/doc/logrotate/README.Solaris
-share/doc/logrotate/README.md
 share/examples/logrotate/logrotate.conf
 share/examples/logrotate/logrotate.cron
-@pkgdir etc/logrotate.d

Index: pkgsrc/sysutils/logrotate/distinfo
diff -u pkgsrc/sysutils/logrotate/distinfo:1.13 pkgsrc/sysutils/logrotate/distinfo:1.14
--- pkgsrc/sysutils/logrotate/distinfo:1.13     Thu Jan 26 20:12:32 2017
+++ pkgsrc/sysutils/logrotate/distinfo  Mon Mar  6 12:59:53 2017
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.13 2017/01/26 20:12:32 nils Exp $
+$NetBSD: distinfo,v 1.14 2017/03/06 12:59:53 fhajny Exp $
 
-SHA1 (f16495b3e5f3e5f333956a384fdc9917fc8ec81a.tar.gz) = 895fb10b66008c54fa49e7159bfbaed4eeb7f52c
-RMD160 (f16495b3e5f3e5f333956a384fdc9917fc8ec81a.tar.gz) = 70308f6d985b95c89d8ead8021c62265e870b21b
-SHA512 (f16495b3e5f3e5f333956a384fdc9917fc8ec81a.tar.gz) = f6a6c23a114e8e56cd0b432a2d41e5e85a568510cfa61482316b9bce63e88ecce5a388c5b485a118bbe14ff26f5b15ef8a9fa10dda34c6688c9c65a57d5cc797
-Size (f16495b3e5f3e5f333956a384fdc9917fc8ec81a.tar.gz) = 84155 bytes
+SHA1 (logrotate-3.11.0.tar.gz) = 6891c1024320d211386cdd400668435db47e4c18
+RMD160 (logrotate-3.11.0.tar.gz) = 6aec3505fde3b59a1ca95c0f9d66747884417bee
+SHA512 (logrotate-3.11.0.tar.gz) = 67ceb2e18c175a5935c81e7699af7a5e6625cef50a3f52e993d49d6c10d9c433f6c7354a8dd05cb35ab28e4393d1db198f2e46e5f6eafd3e6f040b6518438cc1
+Size (logrotate-3.11.0.tar.gz) = 176488 bytes
 SHA1 (patch-config.c) = a6c775599857f01fa11bb99113795794f46664f5
-SHA1 (patch-examples_logrotate-default) = 6d3f575cc6563dd8c00dad4b1baa4e9d5eadae3b
-SHA1 (patch-examples_logrotate.cron) = e7e7a3f0ff77b3ee5fbf69ee2acecac136b0be8f
+SHA1 (patch-examples_logrotate-default) = 16bb2350115e36aa3ed3f8ebf9625e3aadbb5950
+SHA1 (patch-examples_logrotate.cron) = 31a19e1b697e945299bbbe6701674d886379a49c
+SHA1 (patch-logrotate.c) = ad13f4a4e1ae61e66fb937b92bbc41769deaf86a

Index: pkgsrc/sysutils/logrotate/patches/patch-examples_logrotate-default
diff -u pkgsrc/sysutils/logrotate/patches/patch-examples_logrotate-default:1.4 pkgsrc/sysutils/logrotate/patches/patch-examples_logrotate-default:1.5
--- pkgsrc/sysutils/logrotate/patches/patch-examples_logrotate-default:1.4      Thu Jan 26 20:12:32 2017
+++ pkgsrc/sysutils/logrotate/patches/patch-examples_logrotate-default  Mon Mar  6 12:59:53 2017
@@ -1,4 +1,4 @@
-$NetBSD: patch-examples_logrotate-default,v 1.4 2017/01/26 20:12:32 nils Exp $
+$NetBSD: patch-examples_logrotate-default,v 1.5 2017/03/06 12:59:53 fhajny Exp $
 
 Add pkgsrc paths compatibility.
 
@@ -26,6 +26,6 @@ Add pkgsrc paths compatibility.
 -    rotate 1
 -}
 +# Packages drop log rotation information into this directory
-+include /usr/pkg/etc/logrotate.d
++include @PKG_SYSCONFDIR@/logrotate.d
  
  # system-specific logs may be also be configured here.

Index: pkgsrc/sysutils/logrotate/patches/patch-examples_logrotate.cron
diff -u pkgsrc/sysutils/logrotate/patches/patch-examples_logrotate.cron:1.2 pkgsrc/sysutils/logrotate/patches/patch-examples_logrotate.cron:1.3
--- pkgsrc/sysutils/logrotate/patches/patch-examples_logrotate.cron:1.2 Thu Jan 26 20:12:32 2017
+++ pkgsrc/sysutils/logrotate/patches/patch-examples_logrotate.cron     Mon Mar  6 12:59:53 2017
@@ -1,4 +1,4 @@
-$NetBSD: patch-examples_logrotate.cron,v 1.2 2017/01/26 20:12:32 nils Exp $
+$NetBSD: patch-examples_logrotate.cron,v 1.3 2017/03/06 12:59:53 fhajny Exp $
 
 Add pkgsrc paths compatibility
 
@@ -8,7 +8,7 @@ Add pkgsrc paths compatibility
  #!/bin/sh
  
 -/usr/sbin/logrotate /etc/logrotate.conf
-+/usr/pkg/sbin/logrotate /usr/pkg/etc/logrotate.conf
++@PREFIX@/sbin/logrotate @PKG_SYSCONFDIR@/logrotate.conf
  EXITVALUE=$?
  if [ $EXITVALUE != 0 ]; then
      /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"

Added files:

Index: pkgsrc/sysutils/logrotate/patches/patch-logrotate.c
diff -u /dev/null pkgsrc/sysutils/logrotate/patches/patch-logrotate.c:1.3
--- /dev/null   Mon Mar  6 12:59:53 2017
+++ pkgsrc/sysutils/logrotate/patches/patch-logrotate.c Mon Mar  6 12:59:53 2017
@@ -0,0 +1,25 @@
+$NetBSD: patch-logrotate.c,v 1.3 2017/03/06 12:59:53 fhajny Exp $
+
+Fixes GCC error:
+"error: missing sentinel in function call [-Werror=format=]"
+
+--- logrotate.c.orig   2016-11-30 13:07:15.000000000 +0000
++++ logrotate.c
+@@ -440,7 +440,7 @@ static int runScript(struct logInfo *log
+                               DOEXIT(1);
+                       }
+               }
+-              execl("/bin/sh", "sh", "-c", script, "logrotate_script", logfn, NULL);
++              execl("/bin/sh", "sh", "-c", script, "logrotate_script", logfn, (char *)NULL);
+               DOEXIT(1);
+       }
+ 
+@@ -800,7 +800,7 @@ static int mailLog(struct logInfo *log,
+                               DOEXIT(1);
+                       }
+ 
+-                      execlp(uncompressCommand, uncompressCommand, NULL);
++                      execlp(uncompressCommand, uncompressCommand, (char *)NULL);
+                       DOEXIT(1);
+               }
+ 



Home | Main Index | Thread Index | Old Index