pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils/logrotate * Fix compilation with GCC, based o...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/43ff3fd9f72e
branches:  trunk
changeset: 359315:43ff3fd9f72e
user:      fhajny <fhajny%pkgsrc.org@localhost>
date:      Mon Mar 06 12:59:53 2017 +0000

description:
* 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.

diffstat:

 sysutils/logrotate/MESSAGE                                  |   4 +-
 sysutils/logrotate/Makefile                                 |  49 +++++-------
 sysutils/logrotate/PLIST                                    |   8 +-
 sysutils/logrotate/distinfo                                 |  15 ++-
 sysutils/logrotate/patches/patch-examples_logrotate-default |   4 +-
 sysutils/logrotate/patches/patch-examples_logrotate.cron    |   4 +-
 sysutils/logrotate/patches/patch-logrotate.c                |  25 ++++++
 7 files changed, 59 insertions(+), 50 deletions(-)

diffs (204 lines):

diff -r 6af56778e8c5 -r 43ff3fd9f72e sysutils/logrotate/MESSAGE
--- a/sysutils/logrotate/MESSAGE        Mon Mar 06 11:55:22 2017 +0000
+++ b/sysutils/logrotate/MESSAGE        Mon Mar 06 12:59:53 2017 +0000
@@ -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 @@
 
 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
 ===========================================================================
diff -r 6af56778e8c5 -r 43ff3fd9f72e sysutils/logrotate/Makefile
--- a/sysutils/logrotate/Makefile       Mon Mar 06 11:55:22 2017 +0000
+++ b/sysutils/logrotate/Makefile       Mon Mar 06 12:59:53 2017 +0000
@@ -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_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
-
 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
+SUBST_VARS.paths=      PREFIX PKG_SYSCONFDIR
 
-DOCDIR=                        share/doc/logrotate
+CONF_FILES=            ${EGDIR}/logrotate.conf ${PKG_SYSCONFDIR}/logrotate.conf
+OWN_DIRS=              ${PKG_SYSCONFDIR}/logrotate.d
 
-pre-configure:
-       cd ${WRKSRC} && \
-               ${SETENV} ${CONFIGURE_ENV} ./autogen.sh
+EGDIR=                 share/examples/logrotate
 
-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
+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"
diff -r 6af56778e8c5 -r 43ff3fd9f72e sysutils/logrotate/PLIST
--- a/sysutils/logrotate/PLIST  Mon Mar 06 11:55:22 2017 +0000
+++ b/sysutils/logrotate/PLIST  Mon Mar 06 12:59:53 2017 +0000
@@ -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
diff -r 6af56778e8c5 -r 43ff3fd9f72e sysutils/logrotate/distinfo
--- a/sysutils/logrotate/distinfo       Mon Mar 06 11:55:22 2017 +0000
+++ b/sysutils/logrotate/distinfo       Mon Mar 06 12:59:53 2017 +0000
@@ -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
diff -r 6af56778e8c5 -r 43ff3fd9f72e sysutils/logrotate/patches/patch-examples_logrotate-default
--- a/sysutils/logrotate/patches/patch-examples_logrotate-default       Mon Mar 06 11:55:22 2017 +0000
+++ b/sysutils/logrotate/patches/patch-examples_logrotate-default       Mon Mar 06 12:59:53 2017 +0000
@@ -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 @@
 -    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.
diff -r 6af56778e8c5 -r 43ff3fd9f72e sysutils/logrotate/patches/patch-examples_logrotate.cron
--- a/sysutils/logrotate/patches/patch-examples_logrotate.cron  Mon Mar 06 11:55:22 2017 +0000
+++ b/sysutils/logrotate/patches/patch-examples_logrotate.cron  Mon Mar 06 12:59:53 2017 +0000
@@ -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 @@
  #!/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]"
diff -r 6af56778e8c5 -r 43ff3fd9f72e sysutils/logrotate/patches/patch-logrotate.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/logrotate/patches/patch-logrotate.c      Mon Mar 06 12:59:53 2017 +0000
@@ -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