public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/files/, app-admin/logrotate/
@ 2015-09-12  3:40 Mike Frysinger
  0 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger @ 2015-09-12  3:40 UTC (permalink / raw
  To: gentoo-commits

commit:     c33b760cccb8a4167f6ea3c02cb0d7756125e8c3
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 12 03:39:15 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Sep 12 03:40:45 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c33b760c

app-admin/logrotate: add LFS support #559572

This way we properly handle 2GiB+ log files.

 .../logrotate/files/logrotate-3.9.1-lfs.patch      | 15 ++++
 app-admin/logrotate/logrotate-3.9.1-r1.ebuild      | 83 ++++++++++++++++++++++
 2 files changed, 98 insertions(+)

diff --git a/app-admin/logrotate/files/logrotate-3.9.1-lfs.patch b/app-admin/logrotate/files/logrotate-3.9.1-lfs.patch
new file mode 100644
index 0000000..57449d0f
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.9.1-lfs.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/559572
+
+make sure we can handle large files properly (like log files over 2GiB)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -10,6 +10,8 @@
+ AC_STRUCT_ST_BLKSIZE
+ AC_STRUCT_ST_BLOCKS
+ 
++AC_SYS_LARGEFILE
++
+ AC_CHECK_LIB([popt],[poptParseArgvString],,
+   AC_MSG_ERROR([libpopt required but not found]))
+ 

diff --git a/app-admin/logrotate/logrotate-3.9.1-r1.ebuild b/app-admin/logrotate/logrotate-3.9.1-r1.ebuild
new file mode 100644
index 0000000..44e6437
--- /dev/null
+++ b/app-admin/logrotate/logrotate-3.9.1-r1.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="Rotates, compresses, and mails system logs"
+HOMEPAGE="https://fedorahosted.org/logrotate/"
+SRC_URI="https://fedorahosted.org/releases/l/o/logrotate/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="acl +cron selinux"
+
+CDEPEND="
+	>=dev-libs/popt-1.5
+	selinux? (
+		sys-libs/libselinux
+	)
+	acl? ( virtual/acl )"
+
+DEPEND="${CDEPEND}
+	>=sys-apps/sed-4"
+
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-logrotate )
+	cron? ( virtual/cron )"
+
+install_cron_file() {
+	exeinto /etc/cron.daily
+	newexe "${S}"/examples/logrotate.cron "${PN}"
+}
+
+src_prepare() {
+	epatch \
+		"${FILESDIR}"/${P}-ignore-hidden.patch \
+		"${FILESDIR}"/${P}-fbsd.patch \
+		"${FILESDIR}"/${P}-noasprintf.patch \
+		"${FILESDIR}"/${P}-atomic-create.patch \
+		"${FILESDIR}"/${P}-Werror.patch \
+		"${FILESDIR}"/${P}-lfs.patch
+	eautoreconf
+}
+
+src_configure() {
+	econf $(use_with acl) $(use_with selinux)
+}
+
+src_compile() {
+	emake ${myconf} RPM_OPT_FLAGS="${CFLAGS}"
+}
+
+src_test() {
+	emake test
+}
+
+src_install() {
+	insinto /usr
+	dosbin logrotate
+	doman logrotate.8
+	dodoc CHANGES examples/logrotate*
+
+	insinto /etc
+	doins "${FILESDIR}"/logrotate.conf
+
+	use cron && install_cron_file
+
+	keepdir /etc/logrotate.d
+}
+
+pkg_postinst() {
+	if [[ -z ${REPLACING_VERSIONS} ]] ; then
+		elog "If you wish to have logrotate e-mail you updates, please"
+		elog "emerge virtual/mailx and configure logrotate in"
+		elog "/etc/logrotate.conf appropriately"
+		elog
+		elog "Additionally, /etc/logrotate.conf may need to be modified"
+		elog "for your particular needs.  See man logrotate for details."
+	fi
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/files/, app-admin/logrotate/
@ 2016-08-03 22:03 José María Alonso
  0 siblings, 0 replies; 12+ messages in thread
From: José María Alonso @ 2016-08-03 22:03 UTC (permalink / raw
  To: gentoo-commits

commit:     563975acb08ae298814c7db17c110ec02e8f66a9
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  3 22:03:18 2016 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Wed Aug  3 22:03:18 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=563975ac

app-admin/logrotate: Bump to version 3.10.0

Package-Manager: portage-2.2.28

 app-admin/logrotate/Manifest                       |  1 +
 .../logrotate/files/logrotate-3.10.0-Werror.patch  |  9 +++
 .../files/logrotate-3.10.0-atomic-create.patch     | 43 +++++++++++
 .../logrotate/files/logrotate-3.10.0-fbsd.patch    | 57 ++++++++++++++
 .../files/logrotate-3.10.0-ignore-hidden.patch     | 14 ++++
 .../logrotate/files/logrotate-3.10.0-lfs.patch     | 11 +++
 .../files/logrotate-3.10.0-noasprintf.patch        | 55 +++++++++++++
 app-admin/logrotate/logrotate-3.10.0.ebuild        | 90 ++++++++++++++++++++++
 8 files changed, 280 insertions(+)

diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest
index e2370a2..e8d5a2e 100644
--- a/app-admin/logrotate/Manifest
+++ b/app-admin/logrotate/Manifest
@@ -1,2 +1,3 @@
+DIST logrotate-3.10.0.tar.gz 162640 SHA256 dbc76cae5d4912455b5221654bb6114e43d91a3a0879ce3e20a62a157532912e SHA512 ec0328fbf4410c7a2f1386ebb7bd266d2fd7702eb1e3859e7cfb98fd0fcf313140bd1ad46aff1672a6613c0c524b2f98f1e6b9836858961c6e1ecdcd0988b6cd WHIRLPOOL bccf0d434b09f4777e8aca7150cecf81582d85017fc9688f5a652d7373c158a885be6a1d452dc360b3d053065f3522e498a5ea1aa9be36835dec8764215b9996
 DIST logrotate-3.9.1.tar.gz 79061 SHA256 022769e3288c80981559a8421703c88e8438b447235e36dd3c8e97cd94c52545 SHA512 e6da7c7f067befaf2441e9c6ce77e53cf5ddb4f56cc3304c3e50873b6f20c68520f4a0e50ec466cbebcbed20bfd77bf6dfc489975a8131e9573fb19856c0fe28 WHIRLPOOL 9b3558bb03c6c95f8f386ea75ca09bfda802ae4c45b9ef8408692e3aa7a2ee57447cf15ce04d0289946b9cae2266acb5509d8151d15ac6ea0ad9113aeb32dc17
 DIST logrotate-3.9.2.tar.gz 80711 SHA256 2de00c65e23fa9d7909cae6594e550b9abe9a7eb1553669ddeaca92d30f97009 SHA512 62c84a98ec3373562a5c0ab0abd68e33620787cbbafbcf442cb5c7bdc1a41a7f673ee5dabc5f905ad4dd3fffebcbee0dab2ea8698f20de04cc13950212aaab33 WHIRLPOOL b77338f2cc88e6bd03310cea40c26cd4d890238455b4d9507f64a3f8de1006bf98e0d3b783f6536da963f3d695ab604ab3f9bb0e6aa1ae9575005a665b497ec1

diff --git a/app-admin/logrotate/files/logrotate-3.10.0-Werror.patch b/app-admin/logrotate/files/logrotate-3.10.0-Werror.patch
new file mode 100644
index 0000000..86b45a4
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.10.0-Werror.patch
@@ -0,0 +1,9 @@
+diff -Nuar a/Makefile.am b/Makefile.am
+--- a/Makefile.am	2016-08-03 12:25:47.000000000 +0200
++++ b/Makefile.am	2016-08-03 23:28:16.420071763 +0200
+@@ -1,4 +1,4 @@
+-AM_CFLAGS = -Wall -Werror
++AM_CFLAGS = -Wall
+ sbin_PROGRAMS = logrotate
+ logrotate_SOURCES = basenames.c config.c log.c logrotate.c \
+ 		    basenames.h config.h log.h logrotate.h queue.h

diff --git a/app-admin/logrotate/files/logrotate-3.10.0-atomic-create.patch b/app-admin/logrotate/files/logrotate-3.10.0-atomic-create.patch
new file mode 100644
index 0000000..46c36b8
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.10.0-atomic-create.patch
@@ -0,0 +1,43 @@
+diff -Nuar a/logrotate.c b/logrotate.c
+--- a/logrotate.c	2016-08-03 23:20:52.900062834 +0200
++++ b/logrotate.c	2016-08-03 23:25:18.080068173 +0200
+@@ -368,15 +368,18 @@
+ int createOutputFile(char *fileName, int flags, struct stat *sb, acl_type acl, int force_mode)
+ {
+     int fd;
+-	struct stat sb_create;
+-	int acl_set = 0;
+-
+-	fd = open(fileName, (flags | O_EXCL | O_NOFOLLOW),
+-		(S_IRUSR | S_IWUSR) & sb->st_mode);
++    int acl_set = 0;
++    struct stat sb_create;
++    char template[PATH_MAX + 1];
++    mode_t umask_value;
++    snprintf(template, PATH_MAX, "%s/logrotate_temp.XXXXXX", ourDirName(fileName));
++    umask_value = umask(0000);
++    fd = mkostemp(template, (flags | O_EXCL | O_NOFOLLOW));
++    umask(umask_value);
+ 
+     if (fd < 0) {
+-	message(MESS_ERROR, "error creating output file %s: %s\n",
+-		fileName, strerror(errno));
++       message(MESS_ERROR, "error creating unique temp file: %s\n",
++       strerror(errno));
+ 	return -1;
+     }
+     if (fchmod(fd, (S_IRUSR | S_IWUSR) & sb->st_mode)) {
+@@ -427,6 +430,13 @@
+ 		}
+ 	}
+ 
++    if (rename(template, fileName)) {
++        message(MESS_ERROR, "error renaming temp file to %s: %s\n",
++        fileName, strerror(errno));
++        close(fd);
++        return -1;
++    }
++
+     return fd;
+ }
+ 

diff --git a/app-admin/logrotate/files/logrotate-3.10.0-fbsd.patch b/app-admin/logrotate/files/logrotate-3.10.0-fbsd.patch
new file mode 100644
index 0000000..4952ab8
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.10.0-fbsd.patch
@@ -0,0 +1,57 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c	2016-08-03 23:19:33.730061240 +0200
++++ b/config.c	2016-08-03 23:20:31.200062397 +0200
+@@ -1,6 +1,6 @@
+ #include "queue.h"
+ /* Alloca is defined in stdlib.h in NetBSD */
+-#ifndef __NetBSD__
++#if !defined(__NetBSD__) && !defined(__FreeBSD__)
+ #include <alloca.h>
+ #endif
+ #include <limits.h>
+@@ -24,6 +24,10 @@
+ #include <fnmatch.h>
+ #include <sys/mman.h>
+ 
++#if !defined(PATH_MAX) && defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "basenames.h"
+ #include "log.h"
+ #include "logrotate.h"
+diff -Nuar a/logrotate.c b/logrotate.c
+--- a/logrotate.c	2016-08-03 12:25:47.000000000 +0200
++++ b/logrotate.c	2016-08-03 23:20:52.900062834 +0200
+@@ -1,6 +1,6 @@
+ #include "queue.h"
+ /* alloca() is defined in stdlib.h in NetBSD */
+-#ifndef __NetBSD__
++#if !defined(__NetBSD__) && !defined(__FreeBSD__)
+ #include <alloca.h>
+ #endif
+ #include <limits.h>
+@@ -26,6 +27,10 @@
+ #include <limits.h>
+ #endif
+ 
++#if !defined(PATH_MAX) && defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "basenames.h"
+ #include "log.h"
+ #include "logrotate.h"
+diff -Nuar a/Makefile.legacy b/Makefile.legacy
+--- a/Makefile.legacy	2016-08-03 12:25:47.000000000 +0200
++++ b/Makefile.legacy	2016-08-03 23:21:07.370063125 +0200
+@@ -22,7 +22,9 @@
+ 
+ ifeq ($(WITH_ACL),yes)
+ CFLAGS += -DWITH_ACL
++ifneq ($(OS_NAME),FreeBSD)
+ LOADLIBES += -lacl
++endif
+ # See pretest
+ TEST_ACL=1
+ else

diff --git a/app-admin/logrotate/files/logrotate-3.10.0-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.10.0-ignore-hidden.patch
new file mode 100644
index 0000000..3496a6d
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.10.0-ignore-hidden.patch
@@ -0,0 +1,14 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c	2016-08-03 12:25:47.000000000 +0200
++++ b/config.c	2016-08-03 23:19:33.730061240 +0200
+@@ -359,7 +359,9 @@
+ 	char *pattern;
+ 
+ 	/* Check if fname is '.' or '..'; if so, return false */
+-	if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2])))
++    /* Don't include 'hidden' files either; this breaks Gentoo
++       portage config file management http://bugs.gentoo.org/87683 */
++    if (fname[0] == '.')
+ 		return 0;
+ 
+ 	/* Check if fname is ending in a taboo-extension; if so, return false */

diff --git a/app-admin/logrotate/files/logrotate-3.10.0-lfs.patch b/app-admin/logrotate/files/logrotate-3.10.0-lfs.patch
new file mode 100644
index 0000000..9c7b360
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.10.0-lfs.patch
@@ -0,0 +1,11 @@
+diff -Nuar a/configure.ac b/configure.ac
+--- a/configure.ac	2016-08-03 12:25:47.000000000 +0200
++++ b/configure.ac	2016-08-03 23:29:44.540073537 +0200
+@@ -9,6 +9,7 @@
+ AC_PROG_CC_STDC
+ AC_STRUCT_ST_BLKSIZE
+ AC_STRUCT_ST_BLOCKS
++AC_SYS_LARGEFILE
+ 
+ AC_CHECK_LIB([popt],[poptParseArgvString],,
+   AC_MSG_ERROR([libpopt required but not found]))

diff --git a/app-admin/logrotate/files/logrotate-3.10.0-noasprintf.patch b/app-admin/logrotate/files/logrotate-3.10.0-noasprintf.patch
new file mode 100644
index 0000000..608a109
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.10.0-noasprintf.patch
@@ -0,0 +1,55 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c	2016-08-03 23:20:31.200062397 +0200
++++ b/config.c	2016-08-03 23:22:52.830065248 +0200
+@@ -49,39 +49,6 @@
+ #include "asprintf.c"
+ #endif
+ 
+-#if !defined(asprintf) && !defined(_FORTIFY_SOURCE)
+-#include <stdarg.h>
+-
+-int asprintf(char **string_ptr, const char *format, ...)
+-{
+-	va_list arg;
+-	char *str;
+-	int size;
+-	int rv;
+-
+-	va_start(arg, format);
+-	size = vsnprintf(NULL, 0, format, arg);
+-	size++;
+-	va_start(arg, format);
+-	str = malloc(size);
+-	if (str == NULL) {
+-		va_end(arg);
+-		/*
+-		 * Strictly speaking, GNU asprintf doesn't do this,
+-		 * but the caller isn't checking the return value.
+-		 */
+-		fprintf(stderr, "failed to allocate memory\\n");
+-		exit(1);
+-	}
+-	rv = vsnprintf(str, size, format, arg);
+-	va_end(arg);
+-
+-	*string_ptr = str;
+-	return (rv);
+-}
+-
+-#endif
+-
+ #if !defined(strndup)
+ char *strndup(const char *s, size_t n)
+ {
+diff -Nuar a/logrotate.h b/logrotate.h
+--- a/logrotate.h	2016-08-03 12:25:47.000000000 +0200
++++ b/logrotate.h	2016-08-03 23:23:15.220065699 +0200
+@@ -80,8 +80,5 @@
+ extern int debug;
+ 
+ int readAllConfigPaths(const char **paths);
+-#if !defined(asprintf) && !defined(_FORTIFY_SOURCE)
+-int asprintf(char **string_ptr, const char *format, ...);
+-#endif
+ 
+ #endif

diff --git a/app-admin/logrotate/logrotate-3.10.0.ebuild b/app-admin/logrotate/logrotate-3.10.0.ebuild
new file mode 100644
index 0000000..6a7ff74
--- /dev/null
+++ b/app-admin/logrotate/logrotate-3.10.0.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="Rotates, compresses, and mails system logs"
+HOMEPAGE="https://github.com/logrotate/logrotate"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="acl +cron selinux"
+
+CDEPEND="
+	>=dev-libs/popt-1.5
+	selinux? (
+		sys-libs/libselinux
+	)
+	acl? ( virtual/acl )"
+
+DEPEND="${CDEPEND}
+	>=sys-apps/sed-4"
+
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-logrotate )
+	cron? ( virtual/cron )"
+
+install_cron_file() {
+	sed -i 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.cron
+	exeinto /etc/cron.daily
+	newexe "${S}"/examples/logrotate.cron "${PN}"
+}
+
+PATCHES=(
+	"${FILESDIR}"/"${P}"-ignore-hidden.patch \
+	"${FILESDIR}"/"${P}"-fbsd.patch \
+	"${FILESDIR}"/"${P}"-noasprintf.patch \
+	"${FILESDIR}"/"${P}"-atomic-create.patch \
+	"${FILESDIR}"/"${P}"-Werror.patch \
+	"${FILESDIR}"/"${P}"-lfs.patch
+)
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+src_configure() {
+	econf $(use_with acl) $(use_with selinux)
+}
+
+src_compile() {
+	emake ${myconf} RPM_OPT_FLAGS="${CFLAGS}"
+}
+
+src_test() {
+	emake test
+}
+
+src_install() {
+	insinto /usr
+	dobin logrotate
+	doman logrotate.8
+	dodoc CHANGES examples/logrotate*
+
+	insinto /etc
+	doins "${FILESDIR}"/logrotate.conf
+
+	use cron && install_cron_file
+
+	keepdir /etc/logrotate.d
+}
+
+pkg_postinst() {
+	elog "The ${PN} binary is now installed under /usr/bin. Please"
+	elog "update your links"
+	elog
+	if [[ -z ${REPLACING_VERSIONS} ]] ; then
+		elog "If you wish to have logrotate e-mail you updates, please"
+		elog "emerge virtual/mailx and configure logrotate in"
+		elog "/etc/logrotate.conf appropriately"
+		elog
+		elog "Additionally, /etc/logrotate.conf may need to be modified"
+		elog "for your particular needs.  See man logrotate for details."
+	fi
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/files/, app-admin/logrotate/
@ 2016-12-02 22:57 José María Alonso
  0 siblings, 0 replies; 12+ messages in thread
From: José María Alonso @ 2016-12-02 22:57 UTC (permalink / raw
  To: gentoo-commits

commit:     3c29e6efb3b7d074d21985f0c4e7b4ce3a08461f
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  2 22:57:09 2016 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Fri Dec  2 22:57:38 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c29e6ef

app-admin/logrotate: Bumps version to 3.11.0

Package-Manager: portage-2.3.0

 app-admin/logrotate/Manifest                       |  1 +
 .../logrotate/files/logrotate-3.11.0-Werror.patch  | 12 +++
 .../logrotate/files/logrotate-3.11.0-fbsd.patch    | 57 ++++++++++++++
 .../files/logrotate-3.11.0-ignore-hidden.patch     | 14 ++++
 .../logrotate/files/logrotate-3.11.0-lfs.patch     | 11 +++
 .../files/logrotate-3.11.0-noasprintf.patch        | 55 +++++++++++++
 app-admin/logrotate/logrotate-3.11.0.ebuild        | 89 ++++++++++++++++++++++
 7 files changed, 239 insertions(+)

diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest
index e8d5a2e..3731e2d 100644
--- a/app-admin/logrotate/Manifest
+++ b/app-admin/logrotate/Manifest
@@ -1,3 +1,4 @@
 DIST logrotate-3.10.0.tar.gz 162640 SHA256 dbc76cae5d4912455b5221654bb6114e43d91a3a0879ce3e20a62a157532912e SHA512 ec0328fbf4410c7a2f1386ebb7bd266d2fd7702eb1e3859e7cfb98fd0fcf313140bd1ad46aff1672a6613c0c524b2f98f1e6b9836858961c6e1ecdcd0988b6cd WHIRLPOOL bccf0d434b09f4777e8aca7150cecf81582d85017fc9688f5a652d7373c158a885be6a1d452dc360b3d053065f3522e498a5ea1aa9be36835dec8764215b9996
+DIST logrotate-3.11.0.tar.gz 176488 SHA256 7dcb440ed2f1937459e1e06f841c6af1e564b77b2df8009147b56c8649197910 SHA512 67ceb2e18c175a5935c81e7699af7a5e6625cef50a3f52e993d49d6c10d9c433f6c7354a8dd05cb35ab28e4393d1db198f2e46e5f6eafd3e6f040b6518438cc1 WHIRLPOOL 0a581aa5922386b84a7c40a9490364287f4e162f7180fd0e15bf191694294168b663947c7081e92755406fe4f0b3b8792b6f0c5f0e646afa5505a17995a86858
 DIST logrotate-3.9.1.tar.gz 79061 SHA256 022769e3288c80981559a8421703c88e8438b447235e36dd3c8e97cd94c52545 SHA512 e6da7c7f067befaf2441e9c6ce77e53cf5ddb4f56cc3304c3e50873b6f20c68520f4a0e50ec466cbebcbed20bfd77bf6dfc489975a8131e9573fb19856c0fe28 WHIRLPOOL 9b3558bb03c6c95f8f386ea75ca09bfda802ae4c45b9ef8408692e3aa7a2ee57447cf15ce04d0289946b9cae2266acb5509d8151d15ac6ea0ad9113aeb32dc17
 DIST logrotate-3.9.2.tar.gz 80711 SHA256 2de00c65e23fa9d7909cae6594e550b9abe9a7eb1553669ddeaca92d30f97009 SHA512 62c84a98ec3373562a5c0ab0abd68e33620787cbbafbcf442cb5c7bdc1a41a7f673ee5dabc5f905ad4dd3fffebcbee0dab2ea8698f20de04cc13950212aaab33 WHIRLPOOL b77338f2cc88e6bd03310cea40c26cd4d890238455b4d9507f64a3f8de1006bf98e0d3b783f6536da963f3d695ab604ab3f9bb0e6aa1ae9575005a665b497ec1

diff --git a/app-admin/logrotate/files/logrotate-3.11.0-Werror.patch b/app-admin/logrotate/files/logrotate-3.11.0-Werror.patch
new file mode 100644
index 00000000..43c0eba
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.11.0-Werror.patch
@@ -0,0 +1,12 @@
+diff -Nuar a/Makefile.am b/Makefile.am
+--- a/Makefile.am	2016-11-30 13:05:55.000000000 +0100
++++ b/Makefile.am	2016-12-02 23:46:15.288908073 +0100
+@@ -8,7 +8,7 @@
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ #
+-AM_CFLAGS = -Wall -Werror
++AM_CFLAGS = -Wall
+ sbin_PROGRAMS = logrotate
+ logrotate_SOURCES = basenames.c config.c log.c logrotate.c \
+ 		    basenames.h config.h log.h logrotate.h queue.h

diff --git a/app-admin/logrotate/files/logrotate-3.11.0-fbsd.patch b/app-admin/logrotate/files/logrotate-3.11.0-fbsd.patch
new file mode 100644
index 00000000..f5aa652
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.11.0-fbsd.patch
@@ -0,0 +1,57 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c	2016-12-02 23:33:36.768905615 +0100
++++ b/config.c	2016-12-02 23:36:15.568906130 +0100
+@@ -1,6 +1,6 @@
+ #include "queue.h"
+ /* Alloca is defined in stdlib.h in NetBSD */
+-#ifndef __NetBSD__
++#if !defined(__NetBSD__) && !defined(__FreeBSD__)
+ #include <alloca.h>
+ #endif
+ #include <limits.h>
+@@ -24,6 +24,10 @@
+ #include <fnmatch.h>
+ #include <sys/mman.h>
+ 
++#if !defined(PATH_MAX) && defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "basenames.h"
+ #include "log.h"
+ #include "logrotate.h"
+diff -Nuar a/logrotate.c b/logrotate.c
+--- a/logrotate.c	2016-11-30 14:07:15.000000000 +0100
++++ b/logrotate.c	2016-12-02 23:36:44.218906223 +0100
+@@ -1,6 +1,6 @@
+ #include "queue.h"
+ /* alloca() is defined in stdlib.h in NetBSD */
+-#ifndef __NetBSD__
++#if !defined(__NetBSD__) && !defined(__FreeBSD__)
+ #include <alloca.h>
+ #endif
+ #include <limits.h>
+@@ -26,6 +26,10 @@
+ #include <limits.h>
+ #endif
+ 
++#if !defined(PATH_MAX) && defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "basenames.h"
+ #include "log.h"
+ #include "logrotate.h"
+diff -Nuar a/Makefile.legacy b/Makefile.legacy
+--- a/Makefile.legacy	2016-11-30 13:05:55.000000000 +0100
++++ b/Makefile.legacy	2016-12-02 23:37:33.938906384 +0100
+@@ -22,7 +22,9 @@
+ 
+ ifeq ($(WITH_ACL),yes)
+ CFLAGS += -DWITH_ACL
++ifneq ($(OS_NAME),FreeBSD)
+ LOADLIBES += -lacl
++endif
+ # See pretest
+ TEST_ACL=1
+ else

diff --git a/app-admin/logrotate/files/logrotate-3.11.0-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.11.0-ignore-hidden.patch
new file mode 100644
index 00000000..104f202
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.11.0-ignore-hidden.patch
@@ -0,0 +1,14 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c	2016-11-30 13:05:55.000000000 +0100
++++ b/config.c	2016-12-02 23:33:36.768905615 +0100
+@@ -383,7 +383,9 @@
+ 	int i;
+ 
+ 	/* Check if fname is '.' or '..'; if so, return false */
+-	if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2])))
++    /* Don't include 'hidden' files either; this breaks Gentoo
++       portage config file management http://bugs.gentoo.org/87683 */
++    if (fname[0] == '.')
+ 		return 0;
+ 
+ 	/* Check if fname is ending in a taboo-extension; if so, return false */

diff --git a/app-admin/logrotate/files/logrotate-3.11.0-lfs.patch b/app-admin/logrotate/files/logrotate-3.11.0-lfs.patch
new file mode 100644
index 00000000..9cd5745
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.11.0-lfs.patch
@@ -0,0 +1,11 @@
+diff -Nuar a/configure.ac b/configure.ac
+--- a/configure.ac	2016-12-02 14:08:40.000000000 +0100
++++ b/configure.ac	2016-12-02 23:48:03.878908425 +0100
+@@ -12,6 +12,7 @@
+ AC_PROG_CC_STDC
+ AC_STRUCT_ST_BLKSIZE
+ AC_STRUCT_ST_BLOCKS
++AC_SYS_LARGEFILE
+ 
+ dnl Use 64-bit file offsets on 32-bit systems (defines C macros if necessary)
+ AC_SYS_LARGEFILE

diff --git a/app-admin/logrotate/files/logrotate-3.11.0-noasprintf.patch b/app-admin/logrotate/files/logrotate-3.11.0-noasprintf.patch
new file mode 100644
index 00000000..36733a2
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.11.0-noasprintf.patch
@@ -0,0 +1,55 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c	2016-12-02 23:36:15.568906130 +0100
++++ b/config.c	2016-12-02 23:41:17.438907108 +0100
+@@ -49,39 +49,6 @@
+ #include "asprintf.c"
+ #endif
+ 
+-#if !defined(HAVE_ASPRINTF) && !defined(_FORTIFY_SOURCE)
+-#include <stdarg.h>
+-
+-int asprintf(char **string_ptr, const char *format, ...)
+-{
+-	va_list arg;
+-	char *str;
+-	int size;
+-	int rv;
+-
+-	va_start(arg, format);
+-	size = vsnprintf(NULL, 0, format, arg);
+-	size++;
+-	va_start(arg, format);
+-	str = malloc(size);
+-	if (str == NULL) {
+-		va_end(arg);
+-		/*
+-		 * Strictly speaking, GNU asprintf doesn't do this,
+-		 * but the caller isn't checking the return value.
+-		 */
+-		fprintf(stderr, "failed to allocate memory\\n");
+-		exit(1);
+-	}
+-	rv = vsnprintf(str, size, format, arg);
+-	va_end(arg);
+-
+-	*string_ptr = str;
+-	return (rv);
+-}
+-
+-#endif
+-
+ #if !defined(HAVE_STRNDUP)
+ char *strndup(const char *s, size_t n)
+ {
+diff -Nuar a/logrotate.h b/logrotate.h
+--- a/logrotate.h	2016-11-30 13:05:55.000000000 +0100
++++ b/logrotate.h	2016-12-02 23:40:54.518907034 +0100
+@@ -82,8 +82,5 @@
+ extern int debug;
+ 
+ int readAllConfigPaths(const char **paths);
+-#if !defined(asprintf) && !defined(_FORTIFY_SOURCE)
+-int asprintf(char **string_ptr, const char *format, ...);
+-#endif
+ 
+ #endif

diff --git a/app-admin/logrotate/logrotate-3.11.0.ebuild b/app-admin/logrotate/logrotate-3.11.0.ebuild
new file mode 100644
index 00000000..a3eef31
--- /dev/null
+++ b/app-admin/logrotate/logrotate-3.11.0.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="Rotates, compresses, and mails system logs"
+HOMEPAGE="https://github.com/logrotate/logrotate"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="acl +cron selinux"
+
+CDEPEND="
+	>=dev-libs/popt-1.5
+	selinux? (
+		sys-libs/libselinux
+	)
+	acl? ( virtual/acl )"
+
+DEPEND="${CDEPEND}
+	>=sys-apps/sed-4"
+
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-logrotate )
+	cron? ( virtual/cron )"
+
+install_cron_file() {
+	sed -i 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.cron || die
+	exeinto /etc/cron.daily
+	newexe "${S}"/examples/logrotate.cron "${PN}"
+}
+
+PATCHES=(
+	"${FILESDIR}/${P}-ignore-hidden.patch"
+	"${FILESDIR}/${P}-fbsd.patch"
+	"${FILESDIR}/${P}-noasprintf.patch"
+	"${FILESDIR}/${P}-Werror.patch"
+	"${FILESDIR}/${P}-lfs.patch"
+)
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+src_configure() {
+	econf $(use_with acl) $(use_with selinux)
+}
+
+src_compile() {
+	emake ${myconf} RPM_OPT_FLAGS="${CFLAGS}"
+}
+
+src_test() {
+	emake test
+}
+
+src_install() {
+	insinto /usr
+	dobin logrotate
+	doman logrotate.8
+	dodoc ChangeLog.md examples/logrotate*
+
+	insinto /etc
+	doins "${FILESDIR}"/logrotate.conf
+
+	use cron && install_cron_file
+
+	keepdir /etc/logrotate.d
+}
+
+pkg_postinst() {
+	elog "The ${PN} binary is now installed under /usr/bin. Please"
+	elog "update your links"
+	elog
+	if [[ -z ${REPLACING_VERSIONS} ]] ; then
+		elog "If you wish to have logrotate e-mail you updates, please"
+		elog "emerge virtual/mailx and configure logrotate in"
+		elog "/etc/logrotate.conf appropriately"
+		elog
+		elog "Additionally, /etc/logrotate.conf may need to be modified"
+		elog "for your particular needs.  See man logrotate for details."
+	fi
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/files/, app-admin/logrotate/
@ 2017-04-22 22:12 José María Alonso
  0 siblings, 0 replies; 12+ messages in thread
From: José María Alonso @ 2017-04-22 22:12 UTC (permalink / raw
  To: gentoo-commits

commit:     5d2f077380c83dec1845cdd21323d2364724625c
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 22 22:12:00 2017 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Sat Apr 22 22:12:21 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d2f0773

app-admin/logrotate: Bumps version to 3.12.1

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 app-admin/logrotate/Manifest                       |  1 +
 .../logrotate/files/logrotate-3.12.1-Werror.patch  | 12 ++++
 .../logrotate/files/logrotate-3.12.1-fbsd.patch    | 36 ++++++++++
 .../files/logrotate-3.12.1-ignore-hidden.patch     | 14 ++++
 app-admin/logrotate/logrotate-3.12.1.ebuild        | 84 ++++++++++++++++++++++
 5 files changed, 147 insertions(+)

diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest
index 81aeda95da8..6e6a419c13e 100644
--- a/app-admin/logrotate/Manifest
+++ b/app-admin/logrotate/Manifest
@@ -1,2 +1,3 @@
 DIST logrotate-3.11.0.tar.gz 176488 SHA256 7dcb440ed2f1937459e1e06f841c6af1e564b77b2df8009147b56c8649197910 SHA512 67ceb2e18c175a5935c81e7699af7a5e6625cef50a3f52e993d49d6c10d9c433f6c7354a8dd05cb35ab28e4393d1db198f2e46e5f6eafd3e6f040b6518438cc1 WHIRLPOOL 0a581aa5922386b84a7c40a9490364287f4e162f7180fd0e15bf191694294168b663947c7081e92755406fe4f0b3b8792b6f0c5f0e646afa5505a17995a86858
+DIST logrotate-3.12.1.tar.gz 202420 SHA256 2f439241355cab306ed6b2e6c9450347a35806ee0377d86ef0eb1048ab3969a2 SHA512 3d84c835be9b3a394f5c0e6abd2519d572e4e2c49f807a31f94894adc0908457cdb3e33cb832f34febc25ce8e34be1e7091b489c14e84c59d58ad42787f91b16 WHIRLPOOL 282c98e66d5a723dcdbbf1ec20b0196e56523a7f3a05a9071ac56c841e88f1745fa35af78f43171e3e1de4c76566537a844e05f305373b5da28f83099ff4e27b
 DIST logrotate-3.9.1.tar.gz 79061 SHA256 022769e3288c80981559a8421703c88e8438b447235e36dd3c8e97cd94c52545 SHA512 e6da7c7f067befaf2441e9c6ce77e53cf5ddb4f56cc3304c3e50873b6f20c68520f4a0e50ec466cbebcbed20bfd77bf6dfc489975a8131e9573fb19856c0fe28 WHIRLPOOL 9b3558bb03c6c95f8f386ea75ca09bfda802ae4c45b9ef8408692e3aa7a2ee57447cf15ce04d0289946b9cae2266acb5509d8151d15ac6ea0ad9113aeb32dc17

diff --git a/app-admin/logrotate/files/logrotate-3.12.1-Werror.patch b/app-admin/logrotate/files/logrotate-3.12.1-Werror.patch
new file mode 100644
index 00000000000..b8054e50a02
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.12.1-Werror.patch
@@ -0,0 +1,12 @@
+diff -Nuar a/Makefile.am b/Makefile.am
+--- a/Makefile.am	2017-04-21 12:58:48.000000000 +0200
++++ b/Makefile.am	2017-04-23 00:02:39.312011684 +0200
+@@ -9,7 +9,7 @@
+ # GNU General Public License for more details.
+ #
+ AM_CPPFLAGS = -include config.h
+-AM_CFLAGS = -Wall -Werror
++AM_CFLAGS = -Wall
+ sbin_PROGRAMS = logrotate
+ logrotate_SOURCES = config.c log.c logrotate.c \
+ 		    log.h logrotate.h queue.h

diff --git a/app-admin/logrotate/files/logrotate-3.12.1-fbsd.patch b/app-admin/logrotate/files/logrotate-3.12.1-fbsd.patch
new file mode 100644
index 00000000000..67a60e3af17
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.12.1-fbsd.patch
@@ -0,0 +1,36 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c	2017-04-22 23:46:08.201991730 +0200
++++ b/config.c	2017-04-22 23:49:43.021996055 +0200
+@@ -25,6 +25,10 @@
+ #include <sys/mman.h>
+ #include <libgen.h>
+ 
++#if !defined(PATH_MAX) && defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "log.h"
+ #include "logrotate.h"
+ 
+diff -Nuar a/logrotate.c b/logrotate.c
+--- a/logrotate.c	2017-04-21 10:52:10.000000000 +0200
++++ b/logrotate.c	2017-04-22 23:50:20.691996814 +0200
+@@ -1,6 +1,6 @@
+ #include "queue.h"
+ /* alloca() is defined in stdlib.h in NetBSD */
+-#ifndef __NetBSD__
++#if !defined(__NetBSD__) && !defined(__FreeBSD__)
+ #include <alloca.h>
+ #endif
+ #include <limits.h>
+@@ -27,6 +27,10 @@
+ #include <limits.h>
+ #endif
+ 
++#if !defined(PATH_MAX) && defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "log.h"
+ #include "logrotate.h"
+ 

diff --git a/app-admin/logrotate/files/logrotate-3.12.1-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.12.1-ignore-hidden.patch
new file mode 100644
index 00000000000..0bbb91dcb4f
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.12.1-ignore-hidden.patch
@@ -0,0 +1,14 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c	2017-04-18 14:57:02.000000000 +0200
++++ b/config.c	2017-04-22 23:46:08.201991730 +0200
+@@ -389,7 +389,9 @@
+ 	int i;
+ 
+ 	/* Check if fname is '.' or '..'; if so, return false */
+-	if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2])))
++  /* Don't include 'hidden' files either; this breaks Gentoo
++     portage config file management http://bugs.gentoo.org/87683 */
++  if (fname[0] == '.')
+ 		return 0;
+ 
+ 	/* Check if fname is ending in a taboo-extension; if so, return false */

diff --git a/app-admin/logrotate/logrotate-3.12.1.ebuild b/app-admin/logrotate/logrotate-3.12.1.ebuild
new file mode 100644
index 00000000000..a034036f397
--- /dev/null
+++ b/app-admin/logrotate/logrotate-3.12.1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="Rotates, compresses, and mails system logs"
+HOMEPAGE="https://github.com/logrotate/logrotate"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="acl +cron selinux"
+
+CDEPEND="
+	>=dev-libs/popt-1.5
+	selinux? ( sys-libs/libselinux )
+	acl? ( virtual/acl )"
+
+DEPEND="${CDEPEND}
+	>=sys-apps/sed-4"
+
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-logrotate )
+	cron? ( virtual/cron )"
+
+install_cron_file() {
+	sed -i 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.cron || die
+	exeinto /etc/cron.daily
+	newexe "${S}"/examples/logrotate.cron "${PN}"
+}
+
+PATCHES=(
+	"${FILESDIR}/${P}-ignore-hidden.patch"
+	"${FILESDIR}/${P}-fbsd.patch"
+	"${FILESDIR}/${P}-Werror.patch"
+)
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+src_configure() {
+	econf $(use_with acl) $(use_with selinux)
+}
+
+src_compile() {
+	emake ${myconf} RPM_OPT_FLAGS="${CFLAGS}"
+}
+
+src_test() {
+	emake test
+}
+
+src_install() {
+	insinto /usr
+	dobin logrotate
+	doman logrotate.8
+	dodoc ChangeLog.md examples/logrotate*
+
+	insinto /etc
+	doins "${FILESDIR}"/logrotate.conf
+
+	use cron && install_cron_file
+
+	keepdir /etc/logrotate.d
+}
+
+pkg_postinst() {
+	elog "The ${PN} binary is now installed under /usr/bin. Please"
+	elog "update your links"
+	elog
+	if [[ -z ${REPLACING_VERSIONS} ]] ; then
+		elog "If you wish to have logrotate e-mail you updates, please"
+		elog "emerge virtual/mailx and configure logrotate in"
+		elog "/etc/logrotate.conf appropriately"
+		elog
+		elog "Additionally, /etc/logrotate.conf may need to be modified"
+		elog "for your particular needs.  See man logrotate for details."
+	fi
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/files/, app-admin/logrotate/
@ 2017-05-04  8:44 José María Alonso
  0 siblings, 0 replies; 12+ messages in thread
From: José María Alonso @ 2017-05-04  8:44 UTC (permalink / raw
  To: gentoo-commits

commit:     48c1796c0deb0f21834fa1af43b93ebdf5ef104b
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Thu May  4 08:43:27 2017 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Thu May  4 08:44:19 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48c1796c

app-admin/logrotate: Bumps version to 3.12.2

Package-Manager: Portage-2.3.5, Repoman-2.3.1

 app-admin/logrotate/Manifest                       |  1 +
 .../logrotate/files/logrotate-3.12.2-fbsd.patch    | 36 ++++++++++
 .../files/logrotate-3.12.2-ignore-hidden.patch     | 14 ++++
 app-admin/logrotate/logrotate-3.12.2.ebuild        | 83 ++++++++++++++++++++++
 4 files changed, 134 insertions(+)

diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest
index 6e6a419c13e..071199755e3 100644
--- a/app-admin/logrotate/Manifest
+++ b/app-admin/logrotate/Manifest
@@ -1,3 +1,4 @@
 DIST logrotate-3.11.0.tar.gz 176488 SHA256 7dcb440ed2f1937459e1e06f841c6af1e564b77b2df8009147b56c8649197910 SHA512 67ceb2e18c175a5935c81e7699af7a5e6625cef50a3f52e993d49d6c10d9c433f6c7354a8dd05cb35ab28e4393d1db198f2e46e5f6eafd3e6f040b6518438cc1 WHIRLPOOL 0a581aa5922386b84a7c40a9490364287f4e162f7180fd0e15bf191694294168b663947c7081e92755406fe4f0b3b8792b6f0c5f0e646afa5505a17995a86858
 DIST logrotate-3.12.1.tar.gz 202420 SHA256 2f439241355cab306ed6b2e6c9450347a35806ee0377d86ef0eb1048ab3969a2 SHA512 3d84c835be9b3a394f5c0e6abd2519d572e4e2c49f807a31f94894adc0908457cdb3e33cb832f34febc25ce8e34be1e7091b489c14e84c59d58ad42787f91b16 WHIRLPOOL 282c98e66d5a723dcdbbf1ec20b0196e56523a7f3a05a9071ac56c841e88f1745fa35af78f43171e3e1de4c76566537a844e05f305373b5da28f83099ff4e27b
+DIST logrotate-3.12.2.tar.gz 202700 SHA256 754777ada2ef2f34378e8f6025cdb0c0725e212f12195d59971c42df0ae0597f SHA512 ba8c3d7c7134b9ab5968c0dc8a1c5d24d7287a3204e1c6eed080b537d6a0ed7765a47c69b3067493304994e3f4238dc0173b593e4628316bfadf3decd002da16 WHIRLPOOL a299bc2bd50ab36acdd4ab747a479c5b94e84ac92bf55b71a8a8a7d4e1b55eb909dce94c22a5fdadda946dc783376923de5f46729084e21b54811489ce97c482
 DIST logrotate-3.9.1.tar.gz 79061 SHA256 022769e3288c80981559a8421703c88e8438b447235e36dd3c8e97cd94c52545 SHA512 e6da7c7f067befaf2441e9c6ce77e53cf5ddb4f56cc3304c3e50873b6f20c68520f4a0e50ec466cbebcbed20bfd77bf6dfc489975a8131e9573fb19856c0fe28 WHIRLPOOL 9b3558bb03c6c95f8f386ea75ca09bfda802ae4c45b9ef8408692e3aa7a2ee57447cf15ce04d0289946b9cae2266acb5509d8151d15ac6ea0ad9113aeb32dc17

diff --git a/app-admin/logrotate/files/logrotate-3.12.2-fbsd.patch b/app-admin/logrotate/files/logrotate-3.12.2-fbsd.patch
new file mode 100644
index 00000000000..67a60e3af17
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.12.2-fbsd.patch
@@ -0,0 +1,36 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c	2017-04-22 23:46:08.201991730 +0200
++++ b/config.c	2017-04-22 23:49:43.021996055 +0200
+@@ -25,6 +25,10 @@
+ #include <sys/mman.h>
+ #include <libgen.h>
+ 
++#if !defined(PATH_MAX) && defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "log.h"
+ #include "logrotate.h"
+ 
+diff -Nuar a/logrotate.c b/logrotate.c
+--- a/logrotate.c	2017-04-21 10:52:10.000000000 +0200
++++ b/logrotate.c	2017-04-22 23:50:20.691996814 +0200
+@@ -1,6 +1,6 @@
+ #include "queue.h"
+ /* alloca() is defined in stdlib.h in NetBSD */
+-#ifndef __NetBSD__
++#if !defined(__NetBSD__) && !defined(__FreeBSD__)
+ #include <alloca.h>
+ #endif
+ #include <limits.h>
+@@ -27,6 +27,10 @@
+ #include <limits.h>
+ #endif
+ 
++#if !defined(PATH_MAX) && defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "log.h"
+ #include "logrotate.h"
+ 

diff --git a/app-admin/logrotate/files/logrotate-3.12.2-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.12.2-ignore-hidden.patch
new file mode 100644
index 00000000000..0bbb91dcb4f
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.12.2-ignore-hidden.patch
@@ -0,0 +1,14 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c	2017-04-18 14:57:02.000000000 +0200
++++ b/config.c	2017-04-22 23:46:08.201991730 +0200
+@@ -389,7 +389,9 @@
+ 	int i;
+ 
+ 	/* Check if fname is '.' or '..'; if so, return false */
+-	if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2])))
++  /* Don't include 'hidden' files either; this breaks Gentoo
++     portage config file management http://bugs.gentoo.org/87683 */
++  if (fname[0] == '.')
+ 		return 0;
+ 
+ 	/* Check if fname is ending in a taboo-extension; if so, return false */

diff --git a/app-admin/logrotate/logrotate-3.12.2.ebuild b/app-admin/logrotate/logrotate-3.12.2.ebuild
new file mode 100644
index 00000000000..aec656ec036
--- /dev/null
+++ b/app-admin/logrotate/logrotate-3.12.2.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="Rotates, compresses, and mails system logs"
+HOMEPAGE="https://github.com/logrotate/logrotate"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="acl +cron selinux"
+
+CDEPEND="
+	>=dev-libs/popt-1.5
+	selinux? ( sys-libs/libselinux )
+	acl? ( virtual/acl )"
+
+DEPEND="${CDEPEND}
+	>=sys-apps/sed-4"
+
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-logrotate )
+	cron? ( virtual/cron )"
+
+install_cron_file() {
+	sed -i 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.cron || die
+	exeinto /etc/cron.daily
+	newexe "${S}"/examples/logrotate.cron "${PN}"
+}
+
+PATCHES=(
+	"${FILESDIR}/${P}-ignore-hidden.patch"
+	"${FILESDIR}/${P}-fbsd.patch"
+)
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+src_configure() {
+	econf $(use_with acl) $(use_with selinux)
+}
+
+src_compile() {
+	emake ${myconf} RPM_OPT_FLAGS="${CFLAGS}"
+}
+
+src_test() {
+	emake test
+}
+
+src_install() {
+	insinto /usr
+	dobin logrotate
+	doman logrotate.8
+	dodoc ChangeLog.md examples/logrotate*
+
+	insinto /etc
+	doins "${FILESDIR}"/logrotate.conf
+
+	use cron && install_cron_file
+
+	keepdir /etc/logrotate.d
+}
+
+pkg_postinst() {
+	elog "The ${PN} binary is now installed under /usr/bin. Please"
+	elog "update your links"
+	elog
+	if [[ -z ${REPLACING_VERSIONS} ]] ; then
+		elog "If you wish to have logrotate e-mail you updates, please"
+		elog "emerge virtual/mailx and configure logrotate in"
+		elog "/etc/logrotate.conf appropriately"
+		elog
+		elog "Additionally, /etc/logrotate.conf may need to be modified"
+		elog "for your particular needs.  See man logrotate for details."
+	fi
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/files/, app-admin/logrotate/
@ 2017-07-02 14:09 José María Alonso
  0 siblings, 0 replies; 12+ messages in thread
From: José María Alonso @ 2017-07-02 14:09 UTC (permalink / raw
  To: gentoo-commits

commit:     f902818573513baad78ba32fb46ca7946ffd8d03
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Sun Jul  2 14:08:26 2017 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Sun Jul  2 14:09:13 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9028185

app-admin/logrotate: Bumps version to 3.12.3 and fixes some bugs.

Bug: https://bugs.gentoo.org/show_bug.cgi?id=525418
Bug: https://bugs.gentoo.org/show_bug.cgi?id=621850
Closes: https://github.com/gentoo/gentoo/pull/4994

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 app-admin/logrotate/Manifest                       |  1 +
 .../logrotate/files/logrotate-3.12.3-fbsd.patch    | 36 +++++++++
 .../files/logrotate-3.12.3-ignore-hidden.patch     | 14 ++++
 app-admin/logrotate/logrotate-3.12.3.ebuild        | 88 ++++++++++++++++++++++
 app-admin/logrotate/metadata.xml                   |  1 +
 5 files changed, 140 insertions(+)

diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest
index 071199755e3..ff140485d8e 100644
--- a/app-admin/logrotate/Manifest
+++ b/app-admin/logrotate/Manifest
@@ -1,4 +1,5 @@
 DIST logrotate-3.11.0.tar.gz 176488 SHA256 7dcb440ed2f1937459e1e06f841c6af1e564b77b2df8009147b56c8649197910 SHA512 67ceb2e18c175a5935c81e7699af7a5e6625cef50a3f52e993d49d6c10d9c433f6c7354a8dd05cb35ab28e4393d1db198f2e46e5f6eafd3e6f040b6518438cc1 WHIRLPOOL 0a581aa5922386b84a7c40a9490364287f4e162f7180fd0e15bf191694294168b663947c7081e92755406fe4f0b3b8792b6f0c5f0e646afa5505a17995a86858
 DIST logrotate-3.12.1.tar.gz 202420 SHA256 2f439241355cab306ed6b2e6c9450347a35806ee0377d86ef0eb1048ab3969a2 SHA512 3d84c835be9b3a394f5c0e6abd2519d572e4e2c49f807a31f94894adc0908457cdb3e33cb832f34febc25ce8e34be1e7091b489c14e84c59d58ad42787f91b16 WHIRLPOOL 282c98e66d5a723dcdbbf1ec20b0196e56523a7f3a05a9071ac56c841e88f1745fa35af78f43171e3e1de4c76566537a844e05f305373b5da28f83099ff4e27b
 DIST logrotate-3.12.2.tar.gz 202700 SHA256 754777ada2ef2f34378e8f6025cdb0c0725e212f12195d59971c42df0ae0597f SHA512 ba8c3d7c7134b9ab5968c0dc8a1c5d24d7287a3204e1c6eed080b537d6a0ed7765a47c69b3067493304994e3f4238dc0173b593e4628316bfadf3decd002da16 WHIRLPOOL a299bc2bd50ab36acdd4ab747a479c5b94e84ac92bf55b71a8a8a7d4e1b55eb909dce94c22a5fdadda946dc783376923de5f46729084e21b54811489ce97c482
+DIST logrotate-3.12.3.tar.gz 202991 SHA256 435a3f9a534a37e11657532a090f6bf521d8696bdf9cb799a360c1750ba3aea9 SHA512 ab700a50736c7ce8a6e5b9dc2504919c6d3e6ae48a7f112f6980253df5c6bab7fc507c82a0cd961d73ed1312c930da46d96d9f27046996644e0759c84c6a1ae9 WHIRLPOOL ceadd2a748850f0035702156b9a566bf3a38749edf823062f1c867e60cac1c7b40d770d6c923eed79972ce58394b3220e16e40e97e192a6a7046cf09c5fcbf77
 DIST logrotate-3.9.1.tar.gz 79061 SHA256 022769e3288c80981559a8421703c88e8438b447235e36dd3c8e97cd94c52545 SHA512 e6da7c7f067befaf2441e9c6ce77e53cf5ddb4f56cc3304c3e50873b6f20c68520f4a0e50ec466cbebcbed20bfd77bf6dfc489975a8131e9573fb19856c0fe28 WHIRLPOOL 9b3558bb03c6c95f8f386ea75ca09bfda802ae4c45b9ef8408692e3aa7a2ee57447cf15ce04d0289946b9cae2266acb5509d8151d15ac6ea0ad9113aeb32dc17

diff --git a/app-admin/logrotate/files/logrotate-3.12.3-fbsd.patch b/app-admin/logrotate/files/logrotate-3.12.3-fbsd.patch
new file mode 100644
index 00000000000..67a60e3af17
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.12.3-fbsd.patch
@@ -0,0 +1,36 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c	2017-04-22 23:46:08.201991730 +0200
++++ b/config.c	2017-04-22 23:49:43.021996055 +0200
+@@ -25,6 +25,10 @@
+ #include <sys/mman.h>
+ #include <libgen.h>
+ 
++#if !defined(PATH_MAX) && defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "log.h"
+ #include "logrotate.h"
+ 
+diff -Nuar a/logrotate.c b/logrotate.c
+--- a/logrotate.c	2017-04-21 10:52:10.000000000 +0200
++++ b/logrotate.c	2017-04-22 23:50:20.691996814 +0200
+@@ -1,6 +1,6 @@
+ #include "queue.h"
+ /* alloca() is defined in stdlib.h in NetBSD */
+-#ifndef __NetBSD__
++#if !defined(__NetBSD__) && !defined(__FreeBSD__)
+ #include <alloca.h>
+ #endif
+ #include <limits.h>
+@@ -27,6 +27,10 @@
+ #include <limits.h>
+ #endif
+ 
++#if !defined(PATH_MAX) && defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "log.h"
+ #include "logrotate.h"
+ 

diff --git a/app-admin/logrotate/files/logrotate-3.12.3-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.12.3-ignore-hidden.patch
new file mode 100644
index 00000000000..0bbb91dcb4f
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.12.3-ignore-hidden.patch
@@ -0,0 +1,14 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c	2017-04-18 14:57:02.000000000 +0200
++++ b/config.c	2017-04-22 23:46:08.201991730 +0200
+@@ -389,7 +389,9 @@
+ 	int i;
+ 
+ 	/* Check if fname is '.' or '..'; if so, return false */
+-	if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2])))
++  /* Don't include 'hidden' files either; this breaks Gentoo
++     portage config file management http://bugs.gentoo.org/87683 */
++  if (fname[0] == '.')
+ 		return 0;
+ 
+ 	/* Check if fname is ending in a taboo-extension; if so, return false */

diff --git a/app-admin/logrotate/logrotate-3.12.3.ebuild b/app-admin/logrotate/logrotate-3.12.3.ebuild
new file mode 100644
index 00000000000..d455e749b40
--- /dev/null
+++ b/app-admin/logrotate/logrotate-3.12.3.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd
+
+DESCRIPTION="Rotates, compresses, and mails system logs"
+HOMEPAGE="https://github.com/logrotate/logrotate"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="acl +cron selinux bzip2"
+
+CDEPEND="
+	>=dev-libs/popt-1.5
+	selinux? ( sys-libs/libselinux )
+	acl? ( virtual/acl )"
+
+DEPEND="${CDEPEND}
+	>=sys-apps/sed-4"
+
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-logrotate )
+	cron? ( virtual/cron )
+	bzip2? ( app-arch/bzip2 )"
+
+install_cron_file() {
+	exeinto /etc/cron.daily
+	newexe "${S}"/examples/logrotate.cron "${PN}"
+}
+
+PATCHES=(
+	"${FILESDIR}/${P}-ignore-hidden.patch"
+	"${FILESDIR}/${P}-fbsd.patch"
+)
+
+src_prepare() {
+	default
+	sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.cron || die
+}
+
+src_configure() {
+	if use bzip2 ; then
+		compressconf="--with-compress-command=/bin/bzip2 --with-uncompress-command=/bin/bunzip2 --with-compress-extension=.bz2"
+	fi
+	econf $(use_with acl) $(use_with selinux) ${compressconf}
+}
+
+src_compile() {
+	emake RPM_OPT_FLAGS="${CFLAGS}"
+}
+
+src_test() {
+	emake test
+}
+
+src_install() {
+	insinto /usr
+	dobin logrotate
+	doman logrotate.8
+	dodoc ChangeLog.md examples/logrotate-default
+
+	insinto /etc
+	doins "${FILESDIR}"/logrotate.conf
+
+	use cron && install_cron_file
+
+	systemd_dounit examples/logrotate.{service,timer}
+
+	keepdir /etc/logrotate.d
+}
+
+pkg_postinst() {
+	elog "The ${PN} binary is now installed under /usr/bin. Please"
+	elog "update your links"
+	elog
+	if [[ -z ${REPLACING_VERSIONS} ]] ; then
+		elog "If you wish to have logrotate e-mail you updates, please"
+		elog "emerge virtual/mailx and configure logrotate in"
+		elog "/etc/logrotate.conf appropriately"
+		elog
+		elog "Additionally, /etc/logrotate.conf may need to be modified"
+		elog "for your particular needs.  See man logrotate for details."
+	fi
+}

diff --git a/app-admin/logrotate/metadata.xml b/app-admin/logrotate/metadata.xml
index e5648d41d70..de61486807a 100644
--- a/app-admin/logrotate/metadata.xml
+++ b/app-admin/logrotate/metadata.xml
@@ -22,6 +22,7 @@
 		<flag name="acl">Installs acl support</flag>
 		<flag name="cron">Installs cron file</flag>
 		<flag name="selinux">Installs Security Enhanced Linux support</flag>
+		<flag name="bzip2">Compresses rotated log files with bzip2 instead of gzip</flag>
 	</use>
 	<upstream>
 		<remote-id type="github">logrotate/logrotate</remote-id>


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/files/, app-admin/logrotate/
@ 2017-08-18 14:35 José María Alonso
  0 siblings, 0 replies; 12+ messages in thread
From: José María Alonso @ 2017-08-18 14:35 UTC (permalink / raw
  To: gentoo-commits

commit:     aaf7ec1743d56bd52596121a58f9659e3682c0e3
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 18 14:35:35 2017 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Fri Aug 18 14:35:35 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aaf7ec17

app-admin/logrotate: Drops old version

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 app-admin/logrotate/Manifest                       |  1 -
 .../logrotate/files/logrotate-3.12.1-Werror.patch  | 12 ----
 .../logrotate/files/logrotate-3.12.1-fbsd.patch    | 36 ----------
 .../files/logrotate-3.12.1-ignore-hidden.patch     | 14 ----
 app-admin/logrotate/logrotate-3.12.1.ebuild        | 84 ----------------------
 5 files changed, 147 deletions(-)

diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest
index ff140485d8e..7878d432a5c 100644
--- a/app-admin/logrotate/Manifest
+++ b/app-admin/logrotate/Manifest
@@ -1,5 +1,4 @@
 DIST logrotate-3.11.0.tar.gz 176488 SHA256 7dcb440ed2f1937459e1e06f841c6af1e564b77b2df8009147b56c8649197910 SHA512 67ceb2e18c175a5935c81e7699af7a5e6625cef50a3f52e993d49d6c10d9c433f6c7354a8dd05cb35ab28e4393d1db198f2e46e5f6eafd3e6f040b6518438cc1 WHIRLPOOL 0a581aa5922386b84a7c40a9490364287f4e162f7180fd0e15bf191694294168b663947c7081e92755406fe4f0b3b8792b6f0c5f0e646afa5505a17995a86858
-DIST logrotate-3.12.1.tar.gz 202420 SHA256 2f439241355cab306ed6b2e6c9450347a35806ee0377d86ef0eb1048ab3969a2 SHA512 3d84c835be9b3a394f5c0e6abd2519d572e4e2c49f807a31f94894adc0908457cdb3e33cb832f34febc25ce8e34be1e7091b489c14e84c59d58ad42787f91b16 WHIRLPOOL 282c98e66d5a723dcdbbf1ec20b0196e56523a7f3a05a9071ac56c841e88f1745fa35af78f43171e3e1de4c76566537a844e05f305373b5da28f83099ff4e27b
 DIST logrotate-3.12.2.tar.gz 202700 SHA256 754777ada2ef2f34378e8f6025cdb0c0725e212f12195d59971c42df0ae0597f SHA512 ba8c3d7c7134b9ab5968c0dc8a1c5d24d7287a3204e1c6eed080b537d6a0ed7765a47c69b3067493304994e3f4238dc0173b593e4628316bfadf3decd002da16 WHIRLPOOL a299bc2bd50ab36acdd4ab747a479c5b94e84ac92bf55b71a8a8a7d4e1b55eb909dce94c22a5fdadda946dc783376923de5f46729084e21b54811489ce97c482
 DIST logrotate-3.12.3.tar.gz 202991 SHA256 435a3f9a534a37e11657532a090f6bf521d8696bdf9cb799a360c1750ba3aea9 SHA512 ab700a50736c7ce8a6e5b9dc2504919c6d3e6ae48a7f112f6980253df5c6bab7fc507c82a0cd961d73ed1312c930da46d96d9f27046996644e0759c84c6a1ae9 WHIRLPOOL ceadd2a748850f0035702156b9a566bf3a38749edf823062f1c867e60cac1c7b40d770d6c923eed79972ce58394b3220e16e40e97e192a6a7046cf09c5fcbf77
 DIST logrotate-3.9.1.tar.gz 79061 SHA256 022769e3288c80981559a8421703c88e8438b447235e36dd3c8e97cd94c52545 SHA512 e6da7c7f067befaf2441e9c6ce77e53cf5ddb4f56cc3304c3e50873b6f20c68520f4a0e50ec466cbebcbed20bfd77bf6dfc489975a8131e9573fb19856c0fe28 WHIRLPOOL 9b3558bb03c6c95f8f386ea75ca09bfda802ae4c45b9ef8408692e3aa7a2ee57447cf15ce04d0289946b9cae2266acb5509d8151d15ac6ea0ad9113aeb32dc17

diff --git a/app-admin/logrotate/files/logrotate-3.12.1-Werror.patch b/app-admin/logrotate/files/logrotate-3.12.1-Werror.patch
deleted file mode 100644
index b8054e50a02..00000000000
--- a/app-admin/logrotate/files/logrotate-3.12.1-Werror.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nuar a/Makefile.am b/Makefile.am
---- a/Makefile.am	2017-04-21 12:58:48.000000000 +0200
-+++ b/Makefile.am	2017-04-23 00:02:39.312011684 +0200
-@@ -9,7 +9,7 @@
- # GNU General Public License for more details.
- #
- AM_CPPFLAGS = -include config.h
--AM_CFLAGS = -Wall -Werror
-+AM_CFLAGS = -Wall
- sbin_PROGRAMS = logrotate
- logrotate_SOURCES = config.c log.c logrotate.c \
- 		    log.h logrotate.h queue.h

diff --git a/app-admin/logrotate/files/logrotate-3.12.1-fbsd.patch b/app-admin/logrotate/files/logrotate-3.12.1-fbsd.patch
deleted file mode 100644
index 67a60e3af17..00000000000
--- a/app-admin/logrotate/files/logrotate-3.12.1-fbsd.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c	2017-04-22 23:46:08.201991730 +0200
-+++ b/config.c	2017-04-22 23:49:43.021996055 +0200
-@@ -25,6 +25,10 @@
- #include <sys/mman.h>
- #include <libgen.h>
- 
-+#if !defined(PATH_MAX) && defined(__FreeBSD__)
-+#include <sys/param.h>
-+#endif
-+
- #include "log.h"
- #include "logrotate.h"
- 
-diff -Nuar a/logrotate.c b/logrotate.c
---- a/logrotate.c	2017-04-21 10:52:10.000000000 +0200
-+++ b/logrotate.c	2017-04-22 23:50:20.691996814 +0200
-@@ -1,6 +1,6 @@
- #include "queue.h"
- /* alloca() is defined in stdlib.h in NetBSD */
--#ifndef __NetBSD__
-+#if !defined(__NetBSD__) && !defined(__FreeBSD__)
- #include <alloca.h>
- #endif
- #include <limits.h>
-@@ -27,6 +27,10 @@
- #include <limits.h>
- #endif
- 
-+#if !defined(PATH_MAX) && defined(__FreeBSD__)
-+#include <sys/param.h>
-+#endif
-+
- #include "log.h"
- #include "logrotate.h"
- 

diff --git a/app-admin/logrotate/files/logrotate-3.12.1-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.12.1-ignore-hidden.patch
deleted file mode 100644
index 0bbb91dcb4f..00000000000
--- a/app-admin/logrotate/files/logrotate-3.12.1-ignore-hidden.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c	2017-04-18 14:57:02.000000000 +0200
-+++ b/config.c	2017-04-22 23:46:08.201991730 +0200
-@@ -389,7 +389,9 @@
- 	int i;
- 
- 	/* Check if fname is '.' or '..'; if so, return false */
--	if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2])))
-+  /* Don't include 'hidden' files either; this breaks Gentoo
-+     portage config file management http://bugs.gentoo.org/87683 */
-+  if (fname[0] == '.')
- 		return 0;
- 
- 	/* Check if fname is ending in a taboo-extension; if so, return false */

diff --git a/app-admin/logrotate/logrotate-3.12.1.ebuild b/app-admin/logrotate/logrotate-3.12.1.ebuild
deleted file mode 100644
index a034036f397..00000000000
--- a/app-admin/logrotate/logrotate-3.12.1.ebuild
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools eutils toolchain-funcs flag-o-matic
-
-DESCRIPTION="Rotates, compresses, and mails system logs"
-HOMEPAGE="https://github.com/logrotate/logrotate"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
-IUSE="acl +cron selinux"
-
-CDEPEND="
-	>=dev-libs/popt-1.5
-	selinux? ( sys-libs/libselinux )
-	acl? ( virtual/acl )"
-
-DEPEND="${CDEPEND}
-	>=sys-apps/sed-4"
-
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-logrotate )
-	cron? ( virtual/cron )"
-
-install_cron_file() {
-	sed -i 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.cron || die
-	exeinto /etc/cron.daily
-	newexe "${S}"/examples/logrotate.cron "${PN}"
-}
-
-PATCHES=(
-	"${FILESDIR}/${P}-ignore-hidden.patch"
-	"${FILESDIR}/${P}-fbsd.patch"
-	"${FILESDIR}/${P}-Werror.patch"
-)
-
-src_prepare() {
-	default
-	eautoreconf
-}
-
-src_configure() {
-	econf $(use_with acl) $(use_with selinux)
-}
-
-src_compile() {
-	emake ${myconf} RPM_OPT_FLAGS="${CFLAGS}"
-}
-
-src_test() {
-	emake test
-}
-
-src_install() {
-	insinto /usr
-	dobin logrotate
-	doman logrotate.8
-	dodoc ChangeLog.md examples/logrotate*
-
-	insinto /etc
-	doins "${FILESDIR}"/logrotate.conf
-
-	use cron && install_cron_file
-
-	keepdir /etc/logrotate.d
-}
-
-pkg_postinst() {
-	elog "The ${PN} binary is now installed under /usr/bin. Please"
-	elog "update your links"
-	elog
-	if [[ -z ${REPLACING_VERSIONS} ]] ; then
-		elog "If you wish to have logrotate e-mail you updates, please"
-		elog "emerge virtual/mailx and configure logrotate in"
-		elog "/etc/logrotate.conf appropriately"
-		elog
-		elog "Additionally, /etc/logrotate.conf may need to be modified"
-		elog "for your particular needs.  See man logrotate for details."
-	fi
-}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/files/, app-admin/logrotate/
@ 2017-10-04 20:48 José María Alonso
  0 siblings, 0 replies; 12+ messages in thread
From: José María Alonso @ 2017-10-04 20:48 UTC (permalink / raw
  To: gentoo-commits

commit:     23207c9e7edc2e79ba8675c5bfbe891611a785b3
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Wed Oct  4 20:48:06 2017 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Wed Oct  4 20:48:06 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23207c9e

app-admin/logrotate: Adds temporary directory for systemd

Gentoo-Bug: 357275
Package-Manager: Portage-2.3.8, Repoman-2.3.3

 app-admin/logrotate/files/logrotate.tmpfiles   |  1 +
 app-admin/logrotate/logrotate-3.12.3-r2.ebuild | 95 ++++++++++++++++++++++++++
 2 files changed, 96 insertions(+)

diff --git a/app-admin/logrotate/files/logrotate.tmpfiles b/app-admin/logrotate/files/logrotate.tmpfiles
new file mode 100644
index 00000000000..dfb4ab66c13
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate.tmpfiles
@@ -0,0 +1 @@
+d /var/lib/misc

diff --git a/app-admin/logrotate/logrotate-3.12.3-r2.ebuild b/app-admin/logrotate/logrotate-3.12.3-r2.ebuild
new file mode 100644
index 00000000000..89ad370fbf1
--- /dev/null
+++ b/app-admin/logrotate/logrotate-3.12.3-r2.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd
+
+DESCRIPTION="Rotates, compresses, and mails system logs"
+HOMEPAGE="https://github.com/logrotate/logrotate"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="acl +cron selinux"
+
+CDEPEND="
+	>=dev-libs/popt-1.5
+	selinux? ( sys-libs/libselinux )
+	acl? ( virtual/acl )"
+
+DEPEND="${CDEPEND}
+	>=sys-apps/sed-4"
+
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-logrotate )
+	cron? ( virtual/cron )"
+
+STATEFILE="/var/lib/misc/logrotate.status"
+OLDSTATEFILE="/var/lib/logrotate.status"
+
+move_old_state_file() {
+	elog "logrotate state file is now located at ${STATEFILE}"
+	elog "See bug #357275"
+	if [[ -e "${OLDSTATEFILE}" ]] ; then
+		elog "Moving your current state file to new location: ${STATEFILE}"
+		mv -n "${OLDSTATEFILE}" "${STATEFILE}"
+	fi
+}
+
+install_cron_file() {
+	exeinto /etc/cron.daily
+	newexe "${S}"/examples/logrotate.cron "${PN}"
+}
+
+PATCHES=(
+	"${FILESDIR}/${P}-ignore-hidden.patch"
+	"${FILESDIR}/${P}-fbsd.patch"
+)
+
+src_prepare() {
+	default
+	sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.{cron,service} || die
+}
+
+src_configure() {
+	econf $(use_with acl) $(use_with selinux) --with-state-file-path="${STATEFILE}"
+}
+
+src_test() {
+	emake test
+}
+
+src_install() {
+	insinto /usr
+	dobin logrotate
+	doman logrotate.8
+	dodoc ChangeLog.md examples/logrotate-default
+
+	insinto /etc
+	doins "${FILESDIR}"/logrotate.conf
+
+	use cron && install_cron_file
+
+	systemd_dounit examples/logrotate.{service,timer}
+	systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}".conf
+
+	keepdir /etc/logrotate.d
+}
+
+pkg_postinst() {
+	elog "The ${PN} binary is now installed under /usr/bin. Please"
+	elog "update your links"
+	elog
+	move_old_state_file
+	elog
+	if [[ -z ${REPLACING_VERSIONS} ]] ; then
+		elog "If you wish to have logrotate e-mail you updates, please"
+		elog "emerge virtual/mailx and configure logrotate in"
+		elog "/etc/logrotate.conf appropriately"
+		elog
+		elog "Additionally, /etc/logrotate.conf may need to be modified"
+		elog "for your particular needs. See man logrotate for details."
+	fi
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/files/, app-admin/logrotate/
@ 2017-10-24 19:21 José María Alonso
  0 siblings, 0 replies; 12+ messages in thread
From: José María Alonso @ 2017-10-24 19:21 UTC (permalink / raw
  To: gentoo-commits

commit:     2d250269ac4b8af6f18f04c51f0c6cd40bbc461e
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 24 19:20:54 2017 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Tue Oct 24 19:21:17 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d250269

app-admin/logrotate: Drops old versions

Package-Manager: Portage-2.3.8, Repoman-2.3.3

 app-admin/logrotate/Manifest                       |  2 -
 .../logrotate/files/logrotate-3.11.0-Werror.patch  | 12 ---
 .../logrotate/files/logrotate-3.11.0-fbsd.patch    | 57 -------------
 .../files/logrotate-3.11.0-ignore-hidden.patch     | 14 ----
 .../logrotate/files/logrotate-3.11.0-lfs.patch     | 11 ---
 .../files/logrotate-3.11.0-noasprintf.patch        | 55 ------------
 .../logrotate/files/logrotate-3.12.2-fbsd.patch    | 36 --------
 .../files/logrotate-3.12.2-ignore-hidden.patch     | 14 ----
 app-admin/logrotate/logrotate-3.11.0.ebuild        | 88 -------------------
 app-admin/logrotate/logrotate-3.12.2.ebuild        | 83 ------------------
 app-admin/logrotate/logrotate-3.12.3.ebuild        | 98 ----------------------
 11 files changed, 470 deletions(-)

diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest
index f43f755b54c..ead9fe510d7 100644
--- a/app-admin/logrotate/Manifest
+++ b/app-admin/logrotate/Manifest
@@ -1,5 +1,3 @@
-DIST logrotate-3.11.0.tar.gz 176488 SHA256 7dcb440ed2f1937459e1e06f841c6af1e564b77b2df8009147b56c8649197910 SHA512 67ceb2e18c175a5935c81e7699af7a5e6625cef50a3f52e993d49d6c10d9c433f6c7354a8dd05cb35ab28e4393d1db198f2e46e5f6eafd3e6f040b6518438cc1 WHIRLPOOL 0a581aa5922386b84a7c40a9490364287f4e162f7180fd0e15bf191694294168b663947c7081e92755406fe4f0b3b8792b6f0c5f0e646afa5505a17995a86858
-DIST logrotate-3.12.2.tar.gz 202700 SHA256 754777ada2ef2f34378e8f6025cdb0c0725e212f12195d59971c42df0ae0597f SHA512 ba8c3d7c7134b9ab5968c0dc8a1c5d24d7287a3204e1c6eed080b537d6a0ed7765a47c69b3067493304994e3f4238dc0173b593e4628316bfadf3decd002da16 WHIRLPOOL a299bc2bd50ab36acdd4ab747a479c5b94e84ac92bf55b71a8a8a7d4e1b55eb909dce94c22a5fdadda946dc783376923de5f46729084e21b54811489ce97c482
 DIST logrotate-3.12.3.tar.gz 202991 SHA256 435a3f9a534a37e11657532a090f6bf521d8696bdf9cb799a360c1750ba3aea9 SHA512 ab700a50736c7ce8a6e5b9dc2504919c6d3e6ae48a7f112f6980253df5c6bab7fc507c82a0cd961d73ed1312c930da46d96d9f27046996644e0759c84c6a1ae9 WHIRLPOOL ceadd2a748850f0035702156b9a566bf3a38749edf823062f1c867e60cac1c7b40d770d6c923eed79972ce58394b3220e16e40e97e192a6a7046cf09c5fcbf77
 DIST logrotate-3.13.0.tar.gz 213726 SHA256 2ea33f69176dd2668fb85307210d7ed0411ff2a0429e4a0a2d881e740160e4b0 SHA512 3dec2fcdd674d3337b71fd70339cb5e3dd06b4bc24bee191356a30c2a211a290ae7747e63b90581e32a6d6d1f73cf62d5b0ee5a91aa05bad4d6ee403a35d9e76 WHIRLPOOL 952c5eda18870876ea5109d4c5ae7ac1048d3ea07c89b4a0320a48baa8170fbc200f5b4a1cc193da0f6b0e1ef8dbdcdb82f74f23d4f12e5a19bb98650c1e7d5a
 DIST logrotate-3.9.1.tar.gz 79061 SHA256 022769e3288c80981559a8421703c88e8438b447235e36dd3c8e97cd94c52545 SHA512 e6da7c7f067befaf2441e9c6ce77e53cf5ddb4f56cc3304c3e50873b6f20c68520f4a0e50ec466cbebcbed20bfd77bf6dfc489975a8131e9573fb19856c0fe28 WHIRLPOOL 9b3558bb03c6c95f8f386ea75ca09bfda802ae4c45b9ef8408692e3aa7a2ee57447cf15ce04d0289946b9cae2266acb5509d8151d15ac6ea0ad9113aeb32dc17

diff --git a/app-admin/logrotate/files/logrotate-3.11.0-Werror.patch b/app-admin/logrotate/files/logrotate-3.11.0-Werror.patch
deleted file mode 100644
index 43c0ebaeb18..00000000000
--- a/app-admin/logrotate/files/logrotate-3.11.0-Werror.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nuar a/Makefile.am b/Makefile.am
---- a/Makefile.am	2016-11-30 13:05:55.000000000 +0100
-+++ b/Makefile.am	2016-12-02 23:46:15.288908073 +0100
-@@ -8,7 +8,7 @@
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- # GNU General Public License for more details.
- #
--AM_CFLAGS = -Wall -Werror
-+AM_CFLAGS = -Wall
- sbin_PROGRAMS = logrotate
- logrotate_SOURCES = basenames.c config.c log.c logrotate.c \
- 		    basenames.h config.h log.h logrotate.h queue.h

diff --git a/app-admin/logrotate/files/logrotate-3.11.0-fbsd.patch b/app-admin/logrotate/files/logrotate-3.11.0-fbsd.patch
deleted file mode 100644
index f5aa65272b8..00000000000
--- a/app-admin/logrotate/files/logrotate-3.11.0-fbsd.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c	2016-12-02 23:33:36.768905615 +0100
-+++ b/config.c	2016-12-02 23:36:15.568906130 +0100
-@@ -1,6 +1,6 @@
- #include "queue.h"
- /* Alloca is defined in stdlib.h in NetBSD */
--#ifndef __NetBSD__
-+#if !defined(__NetBSD__) && !defined(__FreeBSD__)
- #include <alloca.h>
- #endif
- #include <limits.h>
-@@ -24,6 +24,10 @@
- #include <fnmatch.h>
- #include <sys/mman.h>
- 
-+#if !defined(PATH_MAX) && defined(__FreeBSD__)
-+#include <sys/param.h>
-+#endif
-+
- #include "basenames.h"
- #include "log.h"
- #include "logrotate.h"
-diff -Nuar a/logrotate.c b/logrotate.c
---- a/logrotate.c	2016-11-30 14:07:15.000000000 +0100
-+++ b/logrotate.c	2016-12-02 23:36:44.218906223 +0100
-@@ -1,6 +1,6 @@
- #include "queue.h"
- /* alloca() is defined in stdlib.h in NetBSD */
--#ifndef __NetBSD__
-+#if !defined(__NetBSD__) && !defined(__FreeBSD__)
- #include <alloca.h>
- #endif
- #include <limits.h>
-@@ -26,6 +26,10 @@
- #include <limits.h>
- #endif
- 
-+#if !defined(PATH_MAX) && defined(__FreeBSD__)
-+#include <sys/param.h>
-+#endif
-+
- #include "basenames.h"
- #include "log.h"
- #include "logrotate.h"
-diff -Nuar a/Makefile.legacy b/Makefile.legacy
---- a/Makefile.legacy	2016-11-30 13:05:55.000000000 +0100
-+++ b/Makefile.legacy	2016-12-02 23:37:33.938906384 +0100
-@@ -22,7 +22,9 @@
- 
- ifeq ($(WITH_ACL),yes)
- CFLAGS += -DWITH_ACL
-+ifneq ($(OS_NAME),FreeBSD)
- LOADLIBES += -lacl
-+endif
- # See pretest
- TEST_ACL=1
- else

diff --git a/app-admin/logrotate/files/logrotate-3.11.0-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.11.0-ignore-hidden.patch
deleted file mode 100644
index 104f202efd2..00000000000
--- a/app-admin/logrotate/files/logrotate-3.11.0-ignore-hidden.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c	2016-11-30 13:05:55.000000000 +0100
-+++ b/config.c	2016-12-02 23:33:36.768905615 +0100
-@@ -383,7 +383,9 @@
- 	int i;
- 
- 	/* Check if fname is '.' or '..'; if so, return false */
--	if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2])))
-+    /* Don't include 'hidden' files either; this breaks Gentoo
-+       portage config file management http://bugs.gentoo.org/87683 */
-+    if (fname[0] == '.')
- 		return 0;
- 
- 	/* Check if fname is ending in a taboo-extension; if so, return false */

diff --git a/app-admin/logrotate/files/logrotate-3.11.0-lfs.patch b/app-admin/logrotate/files/logrotate-3.11.0-lfs.patch
deleted file mode 100644
index 9cd5745e846..00000000000
--- a/app-admin/logrotate/files/logrotate-3.11.0-lfs.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Nuar a/configure.ac b/configure.ac
---- a/configure.ac	2016-12-02 14:08:40.000000000 +0100
-+++ b/configure.ac	2016-12-02 23:48:03.878908425 +0100
-@@ -12,6 +12,7 @@
- AC_PROG_CC_STDC
- AC_STRUCT_ST_BLKSIZE
- AC_STRUCT_ST_BLOCKS
-+AC_SYS_LARGEFILE
- 
- dnl Use 64-bit file offsets on 32-bit systems (defines C macros if necessary)
- AC_SYS_LARGEFILE

diff --git a/app-admin/logrotate/files/logrotate-3.11.0-noasprintf.patch b/app-admin/logrotate/files/logrotate-3.11.0-noasprintf.patch
deleted file mode 100644
index 36733a25d03..00000000000
--- a/app-admin/logrotate/files/logrotate-3.11.0-noasprintf.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c	2016-12-02 23:36:15.568906130 +0100
-+++ b/config.c	2016-12-02 23:41:17.438907108 +0100
-@@ -49,39 +49,6 @@
- #include "asprintf.c"
- #endif
- 
--#if !defined(HAVE_ASPRINTF) && !defined(_FORTIFY_SOURCE)
--#include <stdarg.h>
--
--int asprintf(char **string_ptr, const char *format, ...)
--{
--	va_list arg;
--	char *str;
--	int size;
--	int rv;
--
--	va_start(arg, format);
--	size = vsnprintf(NULL, 0, format, arg);
--	size++;
--	va_start(arg, format);
--	str = malloc(size);
--	if (str == NULL) {
--		va_end(arg);
--		/*
--		 * Strictly speaking, GNU asprintf doesn't do this,
--		 * but the caller isn't checking the return value.
--		 */
--		fprintf(stderr, "failed to allocate memory\\n");
--		exit(1);
--	}
--	rv = vsnprintf(str, size, format, arg);
--	va_end(arg);
--
--	*string_ptr = str;
--	return (rv);
--}
--
--#endif
--
- #if !defined(HAVE_STRNDUP)
- char *strndup(const char *s, size_t n)
- {
-diff -Nuar a/logrotate.h b/logrotate.h
---- a/logrotate.h	2016-11-30 13:05:55.000000000 +0100
-+++ b/logrotate.h	2016-12-02 23:40:54.518907034 +0100
-@@ -82,8 +82,5 @@
- extern int debug;
- 
- int readAllConfigPaths(const char **paths);
--#if !defined(asprintf) && !defined(_FORTIFY_SOURCE)
--int asprintf(char **string_ptr, const char *format, ...);
--#endif
- 
- #endif

diff --git a/app-admin/logrotate/files/logrotate-3.12.2-fbsd.patch b/app-admin/logrotate/files/logrotate-3.12.2-fbsd.patch
deleted file mode 100644
index 67a60e3af17..00000000000
--- a/app-admin/logrotate/files/logrotate-3.12.2-fbsd.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c	2017-04-22 23:46:08.201991730 +0200
-+++ b/config.c	2017-04-22 23:49:43.021996055 +0200
-@@ -25,6 +25,10 @@
- #include <sys/mman.h>
- #include <libgen.h>
- 
-+#if !defined(PATH_MAX) && defined(__FreeBSD__)
-+#include <sys/param.h>
-+#endif
-+
- #include "log.h"
- #include "logrotate.h"
- 
-diff -Nuar a/logrotate.c b/logrotate.c
---- a/logrotate.c	2017-04-21 10:52:10.000000000 +0200
-+++ b/logrotate.c	2017-04-22 23:50:20.691996814 +0200
-@@ -1,6 +1,6 @@
- #include "queue.h"
- /* alloca() is defined in stdlib.h in NetBSD */
--#ifndef __NetBSD__
-+#if !defined(__NetBSD__) && !defined(__FreeBSD__)
- #include <alloca.h>
- #endif
- #include <limits.h>
-@@ -27,6 +27,10 @@
- #include <limits.h>
- #endif
- 
-+#if !defined(PATH_MAX) && defined(__FreeBSD__)
-+#include <sys/param.h>
-+#endif
-+
- #include "log.h"
- #include "logrotate.h"
- 

diff --git a/app-admin/logrotate/files/logrotate-3.12.2-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.12.2-ignore-hidden.patch
deleted file mode 100644
index 0bbb91dcb4f..00000000000
--- a/app-admin/logrotate/files/logrotate-3.12.2-ignore-hidden.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c	2017-04-18 14:57:02.000000000 +0200
-+++ b/config.c	2017-04-22 23:46:08.201991730 +0200
-@@ -389,7 +389,9 @@
- 	int i;
- 
- 	/* Check if fname is '.' or '..'; if so, return false */
--	if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2])))
-+  /* Don't include 'hidden' files either; this breaks Gentoo
-+     portage config file management http://bugs.gentoo.org/87683 */
-+  if (fname[0] == '.')
- 		return 0;
- 
- 	/* Check if fname is ending in a taboo-extension; if so, return false */

diff --git a/app-admin/logrotate/logrotate-3.11.0.ebuild b/app-admin/logrotate/logrotate-3.11.0.ebuild
deleted file mode 100644
index 2570ecbb1bf..00000000000
--- a/app-admin/logrotate/logrotate-3.11.0.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools eutils toolchain-funcs flag-o-matic
-
-DESCRIPTION="Rotates, compresses, and mails system logs"
-HOMEPAGE="https://github.com/logrotate/logrotate"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
-IUSE="acl +cron selinux"
-
-CDEPEND="
-	>=dev-libs/popt-1.5
-	selinux? (
-		sys-libs/libselinux
-	)
-	acl? ( virtual/acl )"
-
-DEPEND="${CDEPEND}
-	>=sys-apps/sed-4"
-
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-logrotate )
-	cron? ( virtual/cron )"
-
-install_cron_file() {
-	sed -i 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.cron || die
-	exeinto /etc/cron.daily
-	newexe "${S}"/examples/logrotate.cron "${PN}"
-}
-
-PATCHES=(
-	"${FILESDIR}/${P}-ignore-hidden.patch"
-	"${FILESDIR}/${P}-fbsd.patch"
-	"${FILESDIR}/${P}-noasprintf.patch"
-	"${FILESDIR}/${P}-Werror.patch"
-	"${FILESDIR}/${P}-lfs.patch"
-)
-
-src_prepare() {
-	default
-	eautoreconf
-}
-
-src_configure() {
-	econf $(use_with acl) $(use_with selinux)
-}
-
-src_compile() {
-	emake ${myconf} RPM_OPT_FLAGS="${CFLAGS}"
-}
-
-src_test() {
-	emake test
-}
-
-src_install() {
-	insinto /usr
-	dobin logrotate
-	doman logrotate.8
-	dodoc ChangeLog.md examples/logrotate*
-
-	insinto /etc
-	doins "${FILESDIR}"/logrotate.conf
-
-	use cron && install_cron_file
-
-	keepdir /etc/logrotate.d
-}
-
-pkg_postinst() {
-	elog "The ${PN} binary is now installed under /usr/bin. Please"
-	elog "update your links"
-	elog
-	if [[ -z ${REPLACING_VERSIONS} ]] ; then
-		elog "If you wish to have logrotate e-mail you updates, please"
-		elog "emerge virtual/mailx and configure logrotate in"
-		elog "/etc/logrotate.conf appropriately"
-		elog
-		elog "Additionally, /etc/logrotate.conf may need to be modified"
-		elog "for your particular needs.  See man logrotate for details."
-	fi
-}

diff --git a/app-admin/logrotate/logrotate-3.12.2.ebuild b/app-admin/logrotate/logrotate-3.12.2.ebuild
deleted file mode 100644
index 15b0107f656..00000000000
--- a/app-admin/logrotate/logrotate-3.12.2.ebuild
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools eutils toolchain-funcs flag-o-matic
-
-DESCRIPTION="Rotates, compresses, and mails system logs"
-HOMEPAGE="https://github.com/logrotate/logrotate"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
-IUSE="acl +cron selinux"
-
-CDEPEND="
-	>=dev-libs/popt-1.5
-	selinux? ( sys-libs/libselinux )
-	acl? ( virtual/acl )"
-
-DEPEND="${CDEPEND}
-	>=sys-apps/sed-4"
-
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-logrotate )
-	cron? ( virtual/cron )"
-
-install_cron_file() {
-	sed -i 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.cron || die
-	exeinto /etc/cron.daily
-	newexe "${S}"/examples/logrotate.cron "${PN}"
-}
-
-PATCHES=(
-	"${FILESDIR}/${P}-ignore-hidden.patch"
-	"${FILESDIR}/${P}-fbsd.patch"
-)
-
-src_prepare() {
-	default
-	eautoreconf
-}
-
-src_configure() {
-	econf $(use_with acl) $(use_with selinux)
-}
-
-src_compile() {
-	emake ${myconf} RPM_OPT_FLAGS="${CFLAGS}"
-}
-
-src_test() {
-	emake test
-}
-
-src_install() {
-	insinto /usr
-	dobin logrotate
-	doman logrotate.8
-	dodoc ChangeLog.md examples/logrotate*
-
-	insinto /etc
-	doins "${FILESDIR}"/logrotate.conf
-
-	use cron && install_cron_file
-
-	keepdir /etc/logrotate.d
-}
-
-pkg_postinst() {
-	elog "The ${PN} binary is now installed under /usr/bin. Please"
-	elog "update your links"
-	elog
-	if [[ -z ${REPLACING_VERSIONS} ]] ; then
-		elog "If you wish to have logrotate e-mail you updates, please"
-		elog "emerge virtual/mailx and configure logrotate in"
-		elog "/etc/logrotate.conf appropriately"
-		elog
-		elog "Additionally, /etc/logrotate.conf may need to be modified"
-		elog "for your particular needs.  See man logrotate for details."
-	fi
-}

diff --git a/app-admin/logrotate/logrotate-3.12.3.ebuild b/app-admin/logrotate/logrotate-3.12.3.ebuild
deleted file mode 100644
index 34807c80e88..00000000000
--- a/app-admin/logrotate/logrotate-3.12.3.ebuild
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit systemd
-
-DESCRIPTION="Rotates, compresses, and mails system logs"
-HOMEPAGE="https://github.com/logrotate/logrotate"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
-IUSE="acl +cron selinux bzip2"
-
-CDEPEND="
-	>=dev-libs/popt-1.5
-	selinux? ( sys-libs/libselinux )
-	acl? ( virtual/acl )"
-
-DEPEND="${CDEPEND}
-	>=sys-apps/sed-4"
-
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-logrotate )
-	cron? ( virtual/cron )
-	bzip2? ( app-arch/bzip2 )"
-
-STATEFILE="/var/lib/misc/logrotate.status"
-OLDSTATEFILE="/var/lib/logrotate.status"
-
-move_old_state_file() {
-	elog "logrotate state file is now located at ${STATEFILE}"
-	elog "See bug #357275"
-	if [[ -e "${OLDSTATEFILE}" ]] ; then
-		elog "Moving your current state file to new location: ${STATEFILE}"
-		mv -n "${OLDSTATEFILE}" "${STATEFILE}"
-	fi
-}
-
-install_cron_file() {
-	exeinto /etc/cron.daily
-	newexe "${S}"/examples/logrotate.cron "${PN}"
-}
-
-PATCHES=(
-	"${FILESDIR}/${P}-ignore-hidden.patch"
-	"${FILESDIR}/${P}-fbsd.patch"
-)
-
-src_prepare() {
-	default
-	sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.{cron,service} || die
-}
-
-src_configure() {
-	if use bzip2 ; then
-		compressconf="--with-compress-command=/bin/bzip2 --with-uncompress-command=/bin/bunzip2 --with-compress-extension=.bz2"
-	fi
-	econf $(use_with acl) $(use_with selinux) ${compressconf} --with-state-file-path="${STATEFILE}"
-}
-
-src_test() {
-	emake test
-}
-
-src_install() {
-	insinto /usr
-	dobin logrotate
-	doman logrotate.8
-	dodoc ChangeLog.md examples/logrotate-default
-
-	insinto /etc
-	doins "${FILESDIR}"/logrotate.conf
-
-	use cron && install_cron_file
-
-	systemd_dounit examples/logrotate.{service,timer}
-
-	keepdir /etc/logrotate.d
-}
-
-pkg_postinst() {
-	elog "The ${PN} binary is now installed under /usr/bin. Please"
-	elog "update your links"
-	elog
-	move_old_state_file
-	elog
-	if [[ -z ${REPLACING_VERSIONS} ]] ; then
-		elog "If you wish to have logrotate e-mail you updates, please"
-		elog "emerge virtual/mailx and configure logrotate in"
-		elog "/etc/logrotate.conf appropriately"
-		elog
-		elog "Additionally, /etc/logrotate.conf may need to be modified"
-		elog "for your particular needs. See man logrotate for details."
-	fi
-}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/files/, app-admin/logrotate/
@ 2018-03-09 19:16 José María Alonso
  0 siblings, 0 replies; 12+ messages in thread
From: José María Alonso @ 2018-03-09 19:16 UTC (permalink / raw
  To: gentoo-commits

commit:     44443cb00e9b57dd4566bf845b45bbce77b06d4c
Author:     Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Fri Mar  9 19:16:08 2018 +0000
Commit:     José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Fri Mar  9 19:16:36 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44443cb0

app-admin/logrotate: Bumps version to 3.14.0

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 app-admin/logrotate/Manifest                       |  1 +
 .../files/logrotate-3.14.0-ignore-hidden.patch     | 14 ++++
 app-admin/logrotate/logrotate-3.14.0.ebuild        | 98 ++++++++++++++++++++++
 3 files changed, 113 insertions(+)

diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest
index c0753bf1cec..9fe40fb9471 100644
--- a/app-admin/logrotate/Manifest
+++ b/app-admin/logrotate/Manifest
@@ -1,2 +1,3 @@
 DIST logrotate-3.13.0.tar.gz 213726 BLAKE2B b9970a0fb49b9de9c83ee679fd4587b6a1623cf1aae2444e818339361c7b7762ce51fcbd124fefafbe47d529dd21ef346a6c9a267da20547914388db99dce003 SHA512 3dec2fcdd674d3337b71fd70339cb5e3dd06b4bc24bee191356a30c2a211a290ae7747e63b90581e32a6d6d1f73cf62d5b0ee5a91aa05bad4d6ee403a35d9e76
+DIST logrotate-3.14.0.tar.gz 215413 BLAKE2B 7914188922d81b1f8b6c4e493fae71d23bc9e65ebfcb190ebb4287c875af53204cbecb51c2731a3dc57530a30c685c3a626074265d9a2462714ff6ff077ea5ca SHA512 5f584d9be01737960eaffcf43746270a5395486d2161577a9ee3e757cb4dfe5a207c8b1d097181dd413560d76ecc0e3d526f87d1b123a52dc3e5e49d529a5fb5
 DIST logrotate-3.9.1.tar.gz 79061 BLAKE2B b07f8fd8eb59cc4d6c80441a3b5a8aab090bc13eb8fa5e35b111feb2203fb2c3092daa469e6fec02a29b1d377bca33fbbf5859bcd351a1f4a0d82343c5f65d3d SHA512 e6da7c7f067befaf2441e9c6ce77e53cf5ddb4f56cc3304c3e50873b6f20c68520f4a0e50ec466cbebcbed20bfd77bf6dfc489975a8131e9573fb19856c0fe28

diff --git a/app-admin/logrotate/files/logrotate-3.14.0-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.14.0-ignore-hidden.patch
new file mode 100644
index 00000000000..6745126259b
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.14.0-ignore-hidden.patch
@@ -0,0 +1,14 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c	2018-03-09 17:47:08.000000000 +0100
++++ b/config.c	2018-03-09 19:47:42.274696766 +0100
+@@ -440,7 +440,9 @@
+ 	int i;
+ 
+ 	/* Check if fname is '.' or '..'; if so, return false */
+-	if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2])))
++    /* Don't include 'hidden' files either; this breaks Gentoo
++       portage config file management http://bugs.gentoo.org/87683 */
++    if (fname[0] == '.')
+ 		return 0;
+ 
+ 	/* Check if fname is ending in a taboo-extension; if so, return false */

diff --git a/app-admin/logrotate/logrotate-3.14.0.ebuild b/app-admin/logrotate/logrotate-3.14.0.ebuild
new file mode 100644
index 00000000000..901ce887429
--- /dev/null
+++ b/app-admin/logrotate/logrotate-3.14.0.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd
+
+DESCRIPTION="Rotates, compresses, and mails system logs"
+HOMEPAGE="https://github.com/logrotate/logrotate"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="acl +cron selinux"
+
+CDEPEND="
+	>=dev-libs/popt-1.5
+	selinux? ( sys-libs/libselinux )
+	acl? ( virtual/acl )"
+
+DEPEND="${CDEPEND}
+	>=sys-apps/sed-4"
+
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-logrotate )
+	cron? ( virtual/cron )"
+
+STATEFILE="/var/lib/misc/logrotate.status"
+OLDSTATEFILE="/var/lib/logrotate.status"
+
+move_old_state_file() {
+	elog "logrotate state file is now located at ${STATEFILE}"
+	elog "See bug #357275"
+	if [[ -e "${OLDSTATEFILE}" ]] ; then
+		elog "Moving your current state file to new location: ${STATEFILE}"
+		mv -n "${OLDSTATEFILE}" "${STATEFILE}"
+	fi
+}
+
+install_cron_file() {
+	exeinto /etc/cron.daily
+	newexe "${S}"/examples/logrotate.cron "${PN}"
+}
+
+PATCHES=(
+	"${FILESDIR}/${P}-ignore-hidden.patch"
+)
+
+src_prepare() {
+	sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.{cron,service} || die
+	eapply_user
+}
+
+src_configure() {
+	econf $(use_with acl) $(use_with selinux) --with-state-file-path="${STATEFILE}"
+}
+
+src_test() {
+	emake test
+}
+
+src_install() {
+	insinto /usr
+	dobin logrotate
+	doman logrotate.8
+	dodoc ChangeLog.md examples/logrotate-default
+
+	insinto /etc
+	doins "${FILESDIR}"/logrotate.conf
+
+	use cron && install_cron_file
+
+	systemd_dounit examples/logrotate.{service,timer}
+	systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}".conf
+
+	keepdir /etc/logrotate.d
+}
+
+pkg_postinst() {
+	elog
+	elog "The ${PN} binary is now installed under /usr/bin. Please"
+	elog "update your links"
+	elog
+	move_old_state_file
+	elog "If you are running systemd you might need to run:"
+	elog "systemd-tmpfiles --create /usr/lib/tmpfiles.d/logrotate.conf"
+	elog "in order to create the new location of the logrotate state file"
+	elog
+	if [[ -z ${REPLACING_VERSIONS} ]] ; then
+		elog "If you wish to have logrotate e-mail you updates, please"
+		elog "emerge virtual/mailx and configure logrotate in"
+		elog "/etc/logrotate.conf appropriately"
+		elog
+		elog "Additionally, /etc/logrotate.conf may need to be modified"
+		elog "for your particular needs. See man logrotate for details."
+	fi
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/files/, app-admin/logrotate/
@ 2020-01-25 17:42 Mikle Kolyada
  0 siblings, 0 replies; 12+ messages in thread
From: Mikle Kolyada @ 2020-01-25 17:42 UTC (permalink / raw
  To: gentoo-commits

commit:     e238b6738bace0fa835d138ba15a6d1d6b11f83e
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 25 17:42:12 2020 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sat Jan 25 17:42:44 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e238b673

app-admin/logrotate: Drop old

Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 app-admin/logrotate/Manifest                       |  2 -
 .../logrotate/files/logrotate-3.13.0-fbsd.patch    | 36 --------
 .../files/logrotate-3.13.0-ignore-hidden.patch     | 14 ---
 app-admin/logrotate/logrotate-3.13.0.ebuild        | 99 ----------------------
 app-admin/logrotate/logrotate-3.14.0.ebuild        | 15 ++--
 app-admin/logrotate/logrotate-3.15.0.ebuild        | 98 ---------------------
 app-admin/logrotate/logrotate-3.15.1.ebuild        | 15 ++--
 7 files changed, 18 insertions(+), 261 deletions(-)

diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest
index 811a098c7fe..8c77d7ead09 100644
--- a/app-admin/logrotate/Manifest
+++ b/app-admin/logrotate/Manifest
@@ -1,4 +1,2 @@
-DIST logrotate-3.13.0.tar.gz 213726 BLAKE2B b9970a0fb49b9de9c83ee679fd4587b6a1623cf1aae2444e818339361c7b7762ce51fcbd124fefafbe47d529dd21ef346a6c9a267da20547914388db99dce003 SHA512 3dec2fcdd674d3337b71fd70339cb5e3dd06b4bc24bee191356a30c2a211a290ae7747e63b90581e32a6d6d1f73cf62d5b0ee5a91aa05bad4d6ee403a35d9e76
 DIST logrotate-3.14.0.tar.gz 215413 BLAKE2B 7914188922d81b1f8b6c4e493fae71d23bc9e65ebfcb190ebb4287c875af53204cbecb51c2731a3dc57530a30c685c3a626074265d9a2462714ff6ff077ea5ca SHA512 5f584d9be01737960eaffcf43746270a5395486d2161577a9ee3e757cb4dfe5a207c8b1d097181dd413560d76ecc0e3d526f87d1b123a52dc3e5e49d529a5fb5
-DIST logrotate-3.15.0.tar.gz 219496 BLAKE2B b9f9cd0b22b79c3da1ea6092c5f3ebf9fca39da3a4bb7e1da39a8bf96f0bdb573864b77681671ad227cfc444bbc3e64a518805780580adb954bfacd564f00e2f SHA512 9520f15eaec54da426699f1f5ce31949d1372fa25c5c127dfbf29ff717a1c15a6fd14437c1d7b67b116b12c8a5c28f6012e39ad4b3ca2b053c874d02efe98d84
 DIST logrotate-3.15.1.tar.gz 220263 BLAKE2B c164c542a0770965f5193f5816509f566b9afeb82ce8388a184d16c2b3e79aa0ef93be10d477c85f62037f01b3e626ea56d3173ca8cf017b8aa315f2e23b1a2b SHA512 72294607762751fb1aaaca1d62ebd87d109d837d50606176159a5e74782a993123321967b7a6185df6ca9c87a54febb832ac7537ceaa580a895901a995570cd5

diff --git a/app-admin/logrotate/files/logrotate-3.13.0-fbsd.patch b/app-admin/logrotate/files/logrotate-3.13.0-fbsd.patch
deleted file mode 100644
index 028dc0551f1..00000000000
--- a/app-admin/logrotate/files/logrotate-3.13.0-fbsd.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c	2017-10-14 18:52:56.829467653 +0200
-+++ b/config.c	2017-10-14 18:54:57.049467139 +0200
-@@ -25,6 +25,10 @@
- #include <sys/mman.h>
- #include <libgen.h>
- 
-+#if !defined(PATH_MAX) && defined(__FreeBSD__)
-+#include <sys/param.h>
-+#endif
-+
- #include "log.h"
- #include "logrotate.h"
- 
-diff -Nuar a/logrotate.c b/logrotate.c
---- a/logrotate.c	2017-10-12 17:19:41.000000000 +0200
-+++ b/logrotate.c	2017-10-14 18:56:23.419466769 +0200
-@@ -1,6 +1,6 @@
- #include "queue.h"
- /* alloca() is defined in stdlib.h in NetBSD */
--#ifndef __NetBSD__
-+#if !defined(__NetBSD__) && !defined(__FreeBSD__)
- #include <alloca.h>
- #endif
- #include <limits.h>
-@@ -27,6 +27,10 @@
- #include <limits.h>
- #endif
- 
-+#if !defined(PATH_MAX) && defined(__FreeBSD__)
-+#include <sys/param.h>
-+#endif
-+
- #include "log.h"
- #include "logrotate.h"
- 

diff --git a/app-admin/logrotate/files/logrotate-3.13.0-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.13.0-ignore-hidden.patch
deleted file mode 100644
index f3ade248d38..00000000000
--- a/app-admin/logrotate/files/logrotate-3.13.0-ignore-hidden.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c	2017-10-12 16:05:41.000000000 +0200
-+++ b/config.c	2017-10-14 18:52:56.829467653 +0200
-@@ -432,7 +432,9 @@
- 	int i;
- 
- 	/* Check if fname is '.' or '..'; if so, return false */
--	if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2])))
-+  /* Don't include 'hidden' files either; this breaks Gentoo
-+     portage config file management http://bugs.gentoo.org/87683 */
-+  if (fname[0] == '.')
- 		return 0;
- 
- 	/* Check if fname is ending in a taboo-extension; if so, return false */

diff --git a/app-admin/logrotate/logrotate-3.13.0.ebuild b/app-admin/logrotate/logrotate-3.13.0.ebuild
deleted file mode 100644
index 88d7a22eb14..00000000000
--- a/app-admin/logrotate/logrotate-3.13.0.ebuild
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit systemd
-
-DESCRIPTION="Rotates, compresses, and mails system logs"
-HOMEPAGE="https://github.com/logrotate/logrotate"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86"
-IUSE="acl +cron selinux"
-
-CDEPEND="
-	>=dev-libs/popt-1.5
-	selinux? ( sys-libs/libselinux )
-	acl? ( virtual/acl )"
-
-DEPEND="${CDEPEND}
-	>=sys-apps/sed-4"
-
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-logrotate )
-	cron? ( virtual/cron )"
-
-STATEFILE="/var/lib/misc/logrotate.status"
-OLDSTATEFILE="/var/lib/logrotate.status"
-
-move_old_state_file() {
-	elog "logrotate state file is now located at ${STATEFILE}"
-	elog "See bug #357275"
-	if [[ -e "${OLDSTATEFILE}" ]] ; then
-		elog "Moving your current state file to new location: ${STATEFILE}"
-		mv -n "${OLDSTATEFILE}" "${STATEFILE}"
-	fi
-}
-
-install_cron_file() {
-	exeinto /etc/cron.daily
-	newexe "${S}"/examples/logrotate.cron "${PN}"
-}
-
-PATCHES=(
-	"${FILESDIR}/${P}-ignore-hidden.patch"
-	"${FILESDIR}/${P}-fbsd.patch"
-)
-
-src_prepare() {
-	default
-	sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.{cron,service} || die
-}
-
-src_configure() {
-	econf $(use_with acl) $(use_with selinux) --with-state-file-path="${STATEFILE}"
-}
-
-src_test() {
-	emake test
-}
-
-src_install() {
-	insinto /usr
-	dobin logrotate
-	doman logrotate.8
-	dodoc ChangeLog.md examples/logrotate-default
-
-	insinto /etc
-	doins "${FILESDIR}"/logrotate.conf
-
-	use cron && install_cron_file
-
-	systemd_dounit examples/logrotate.{service,timer}
-	systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}".conf
-
-	keepdir /etc/logrotate.d
-}
-
-pkg_postinst() {
-	elog
-	elog "The ${PN} binary is now installed under /usr/bin. Please"
-	elog "update your links"
-	elog
-	move_old_state_file
-	elog "If you are running systemd you might need to run:"
-	elog "systemd-tmpfiles --create /usr/lib/tmpfiles.d/logrotate.conf"
-	elog "in order to create the new location of the logrotate state file"
-	elog
-	if [[ -z ${REPLACING_VERSIONS} ]] ; then
-		elog "If you wish to have logrotate e-mail you updates, please"
-		elog "emerge virtual/mailx and configure logrotate in"
-		elog "/etc/logrotate.conf appropriately"
-		elog
-		elog "Additionally, /etc/logrotate.conf may need to be modified"
-		elog "for your particular needs. See man logrotate for details."
-	fi
-}

diff --git a/app-admin/logrotate/logrotate-3.14.0.ebuild b/app-admin/logrotate/logrotate-3.14.0.ebuild
index a33ee2fb1e6..4cb39bde390 100644
--- a/app-admin/logrotate/logrotate-3.14.0.ebuild
+++ b/app-admin/logrotate/logrotate-3.14.0.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 inherit systemd
 
@@ -14,15 +14,15 @@ SLOT="0"
 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86"
 IUSE="acl +cron selinux"
 
-CDEPEND="
+COMMON_DEPEND="
 	>=dev-libs/popt-1.5
 	selinux? ( sys-libs/libselinux )
 	acl? ( virtual/acl )"
 
-DEPEND="${CDEPEND}
+DEPEND="${COMMON_DEPEND}
 	>=sys-apps/sed-4"
 
-RDEPEND="${CDEPEND}
+RDEPEND="${COMMON_DEPEND}
 	selinux? ( sec-policy/selinux-logrotate )
 	cron? ( virtual/cron )"
 
@@ -53,7 +53,10 @@ src_prepare() {
 }
 
 src_configure() {
-	econf $(use_with acl) $(use_with selinux) --with-state-file-path="${STATEFILE}"
+	econf \
+	$(use_with acl) \
+	$(use_with selinux) \
+	--with-state-file-path="${STATEFILE}"
 }
 
 src_test() {

diff --git a/app-admin/logrotate/logrotate-3.15.0.ebuild b/app-admin/logrotate/logrotate-3.15.0.ebuild
deleted file mode 100644
index c2bec14c848..00000000000
--- a/app-admin/logrotate/logrotate-3.15.0.ebuild
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit systemd
-
-DESCRIPTION="Rotates, compresses, and mails system logs"
-HOMEPAGE="https://github.com/logrotate/logrotate"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="acl +cron selinux"
-
-CDEPEND="
-	>=dev-libs/popt-1.5
-	selinux? ( sys-libs/libselinux )
-	acl? ( virtual/acl )"
-
-DEPEND="${CDEPEND}
-	>=sys-apps/sed-4"
-
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-logrotate )
-	cron? ( virtual/cron )"
-
-STATEFILE="/var/lib/misc/logrotate.status"
-OLDSTATEFILE="/var/lib/logrotate.status"
-
-move_old_state_file() {
-	elog "logrotate state file is now located at ${STATEFILE}"
-	elog "See bug #357275"
-	if [[ -e "${OLDSTATEFILE}" ]] ; then
-		elog "Moving your current state file to new location: ${STATEFILE}"
-		mv -n "${OLDSTATEFILE}" "${STATEFILE}"
-	fi
-}
-
-install_cron_file() {
-	exeinto /etc/cron.daily
-	newexe "${S}"/examples/logrotate.cron "${PN}"
-}
-
-PATCHES=(
-	"${FILESDIR}/${P}-ignore-hidden.patch"
-)
-
-src_prepare() {
-	sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.{cron,service} || die
-	default
-}
-
-src_configure() {
-	econf $(use_with acl) $(use_with selinux) --with-state-file-path="${STATEFILE}"
-}
-
-src_test() {
-	emake test
-}
-
-src_install() {
-	insinto /usr
-	dobin logrotate
-	doman logrotate.8
-	dodoc ChangeLog.md
-
-	insinto /etc
-	doins "${FILESDIR}"/logrotate.conf
-
-	use cron && install_cron_file
-
-	systemd_dounit examples/logrotate.{service,timer}
-	systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}".conf
-
-	keepdir /etc/logrotate.d
-}
-
-pkg_postinst() {
-	elog
-	elog "The ${PN} binary is now installed under /usr/bin. Please"
-	elog "update your links"
-	elog
-	move_old_state_file
-	elog "If you are running systemd you might need to run:"
-	elog "systemd-tmpfiles --create /usr/lib/tmpfiles.d/logrotate.conf"
-	elog "in order to create the new location of the logrotate state file"
-	elog
-	if [[ -z ${REPLACING_VERSIONS} ]] ; then
-		elog "If you wish to have logrotate e-mail you updates, please"
-		elog "emerge virtual/mailx and configure logrotate in"
-		elog "/etc/logrotate.conf appropriately"
-		elog
-		elog "Additionally, /etc/logrotate.conf may need to be modified"
-		elog "for your particular needs. See man logrotate for details."
-	fi
-}

diff --git a/app-admin/logrotate/logrotate-3.15.1.ebuild b/app-admin/logrotate/logrotate-3.15.1.ebuild
index ee5b360db5b..58b95631d2d 100644
--- a/app-admin/logrotate/logrotate-3.15.1.ebuild
+++ b/app-admin/logrotate/logrotate-3.15.1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 inherit systemd
 
@@ -14,15 +14,15 @@ SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
 IUSE="acl +cron selinux"
 
-CDEPEND="
+COMMON_DEPEND="
 	>=dev-libs/popt-1.5
 	selinux? ( sys-libs/libselinux )
 	acl? ( virtual/acl )"
 
-DEPEND="${CDEPEND}
+DEPEND="${COMMON_DEPEND}
 	>=sys-apps/sed-4"
 
-RDEPEND="${CDEPEND}
+RDEPEND="${COMMON_DEPEND}
 	selinux? ( sec-policy/selinux-logrotate )
 	cron? ( virtual/cron )"
 
@@ -53,7 +53,10 @@ src_prepare() {
 }
 
 src_configure() {
-	econf $(use_with acl) $(use_with selinux) --with-state-file-path="${STATEFILE}"
+	econf \
+	$(use_with acl) \
+	$(use_with selinux) \
+	--with-state-file-path="${STATEFILE}"
 }
 
 src_test() {


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/files/, app-admin/logrotate/
@ 2022-06-07  1:31 Sam James
  0 siblings, 0 replies; 12+ messages in thread
From: Sam James @ 2022-06-07  1:31 UTC (permalink / raw
  To: gentoo-commits

commit:     f22a1ea1d23806ba35b1fe2b4c7772819d1bb776
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  7 01:30:45 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun  7 01:30:45 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f22a1ea1

app-admin/logrotate: backport log setting tweaks

Should make things a bit less noisy w/ recent CVE fix.

Bug: https://bugs.gentoo.org/847382
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/logrotate-3.20.1-log-changes.patch       | 147 +++++++++++++++++++++
 app-admin/logrotate/logrotate-3.20.1-r1.ebuild     |  96 ++++++++++++++
 2 files changed, 243 insertions(+)

diff --git a/app-admin/logrotate/files/logrotate-3.20.1-log-changes.patch b/app-admin/logrotate/files/logrotate-3.20.1-log-changes.patch
new file mode 100644
index 000000000000..b7c4bb5275db
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.20.1-log-changes.patch
@@ -0,0 +1,147 @@
+https://bugs.gentoo.org/847382#c3
+https://github.com/logrotate/logrotate/commit/31cf1099ab8514dfcae5a980bc77352edd5292f8
+https://github.com/logrotate/logrotate/commit/7b1fa328bf70eb8434166f151bd075cd1440d0dc
+
+From 31cf1099ab8514dfcae5a980bc77352edd5292f8 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Fri, 27 May 2022 09:56:07 +0200
+Subject: [PATCH] lockState: do not print `error:` when exit code is unaffected
+
+Closes: https://github.com/logrotate/logrotate/pull/448
+--- a/logrotate.c
++++ b/logrotate.c
+@@ -3050,8 +3050,8 @@ static int lockState(const char *stateFilename, int skip_state_lock)
+     }
+ 
+     if (sb.st_mode & S_IROTH) {
+-        message(MESS_ERROR, "state file %s is world-readable and thus can"
+-                " be locked from other unprivileged users."
++        message(MESS_NORMAL, "warning: state file %s is world-readable"
++                " and thus can be locked from other unprivileged users."
+                 " Skipping lock acquisition...\n",
+                 stateFilename);
+         close(lockFd);
+
+From 7b1fa328bf70eb8434166f151bd075cd1440d0dc Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Fri, 27 May 2022 16:02:57 +0200
+Subject: [PATCH] log: unify handling of log levels
+
+Use MESS_WARN instead of MESS_NORMAL and make it always use
+the `warning:` prefix.  MESS_WARN is now mapped to LOG_WARNING
+for syslog.
+
+Also drop MESS_VERBOSE, which was not set anywhere.
+
+Closes: https://github.com/logrotate/logrotate/pull/239
+Closes: https://github.com/logrotate/logrotate/pull/449
+--- a/config.c
++++ b/config.c
+@@ -643,7 +643,7 @@ static void set_criterium(enum criterium *pDst, enum criterium src, int *pSet)
+ {
+     if (*pSet && (*pDst != src)) {
+         /* we are overriding a previously set criterium */
+-        message(MESS_VERBOSE, "warning: '%s' overrides previously specified '%s'\n",
++        message(MESS_DEBUG, "note: '%s' overrides previously specified '%s'\n",
+                 crit_to_string(src), crit_to_string(*pDst));
+     }
+     *pDst = src;
+@@ -1021,7 +1021,7 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
+ 
+     if (getuid() == ROOT_UID) {
+         if ((sb_config.st_mode & 07533) != 0400) {
+-            message(MESS_NORMAL,
++            message(MESS_WARN,
+                     "Potentially dangerous mode on %s: 0%o\n",
+                     configFile, (unsigned) (sb_config.st_mode & 07777));
+         }
+@@ -1386,7 +1386,7 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
+                             RAISE_ERROR();
+                         }
+                     } else if (!strcmp(key, "errors")) {
+-                        message(MESS_NORMAL,
++                        message(MESS_WARN,
+                                 "%s: %d: the errors directive is deprecated and no longer used.\n",
+                                 configFile, lineNum);
+                     } else if (!strcmp(key, "mail")) {
+--- a/log.c
++++ b/log.c
+@@ -40,9 +40,12 @@ static void log_once(FILE *where, int level, const char *format, va_list args)
+ {
+     switch (level) {
+         case MESS_DEBUG:
+-        case MESS_NORMAL:
+-        case MESS_VERBOSE:
+             break;
++
++        case MESS_WARN:
++            fprintf(where, "warning: ");
++            break;
++
+         default:
+             fprintf(where, "error: ");
+             break;
+@@ -78,10 +81,11 @@ void message(int level, const char *format, ...)
+                 priority |= LOG_DEBUG;
+                 break;
+             case MESS_DEBUG:
+-            case MESS_VERBOSE:
+-            case MESS_NORMAL:
+                 priority |= LOG_INFO;
+                 break;
++            case MESS_WARN:
++                priority |= LOG_WARNING;
++                break;
+             case MESS_ERROR:
+                 priority |= LOG_ERR;
+                 break;
+--- a/log.h
++++ b/log.h
+@@ -5,8 +5,7 @@
+ 
+ #define MESS_REALDEBUG  1
+ #define MESS_DEBUG      2
+-#define MESS_VERBOSE    3
+-#define MESS_NORMAL     4
++#define MESS_WARN       4
+ #define MESS_ERROR      5
+ #define MESS_FATAL      6
+ 
+--- a/logrotate.c
++++ b/logrotate.c
+@@ -3050,7 +3050,7 @@ static int lockState(const char *stateFilename, int skip_state_lock)
+     }
+ 
+     if (sb.st_mode & S_IROTH) {
+-        message(MESS_NORMAL, "warning: state file %s is world-readable"
++        message(MESS_WARN, "state file %s is world-readable"
+                 " and thus can be locked from other unprivileged users."
+                 " Skipping lock acquisition...\n",
+                 stateFilename);
+@@ -3106,7 +3106,7 @@ int main(int argc, const char **argv)
+         POPT_AUTOHELP { NULL, 0, 0, NULL, 0, NULL, NULL }
+     };
+ 
+-    logSetLevel(MESS_NORMAL);
++    logSetLevel(MESS_WARN);
+     setlocale (LC_ALL, "");
+ 
+     optCon = poptGetContext("logrotate", argc, argv, options, 0);
+@@ -3117,7 +3117,7 @@ int main(int argc, const char **argv)
+         switch (arg) {
+             case 'd':
+                 debug = 1;
+-                message(MESS_NORMAL, "WARNING: logrotate in debug mode does nothing"
++                message(MESS_WARN, "logrotate in debug mode does nothing"
+                         " except printing debug messages!  Consider using verbose"
+                         " mode (-v) instead if this is not what you want.\n\n");
+                 /* fallthrough */
+--- a/test/test-0080.sh
++++ b/test/test-0080.sh
+@@ -10,4 +10,4 @@ cleanup 80
+ preptest test.log 80 1 0
+ 
+ $RLR -d test-config.80 2>&1 | \
+-    grep -q "warning: 'daily' overrides previously specified 'size'"
++    grep -q "note: 'daily' overrides previously specified 'size'"
+

diff --git a/app-admin/logrotate/logrotate-3.20.1-r1.ebuild b/app-admin/logrotate/logrotate-3.20.1-r1.ebuild
new file mode 100644
index 000000000000..9023bd91b43b
--- /dev/null
+++ b/app-admin/logrotate/logrotate-3.20.1-r1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/kamildudka.asc
+inherit systemd tmpfiles verify-sig
+
+DESCRIPTION="Rotates, compresses, and mails system logs"
+HOMEPAGE="https://github.com/logrotate/logrotate"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.xz"
+SRC_URI+=" verify-sig? ( https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.xz.asc )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="acl +cron selinux"
+
+DEPEND=">=dev-libs/popt-1.5
+	selinux? ( sys-libs/libselinux )
+	acl? ( virtual/acl )"
+RDEPEND="${DEPEND}
+	selinux? ( sec-policy/selinux-logrotate )
+	cron? ( virtual/cron )"
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-kamildudka )"
+
+STATEFILE="${EPREFIX}/var/lib/misc/logrotate.status"
+OLDSTATEFILE="${EPREFIX}/var/lib/logrotate.status"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.15.0-ignore-hidden.patch
+	"${FILESDIR}"/${P}-log-changes.patch
+)
+
+move_old_state_file() {
+	elog "logrotate state file is now located at ${STATEFILE}"
+	elog "See bug #357275"
+	if [[ -e "${OLDSTATEFILE}" ]] ; then
+		elog "Moving your current state file to new location: ${STATEFILE}"
+		mv -n "${OLDSTATEFILE}" "${STATEFILE}" || die
+	fi
+}
+
+install_cron_file() {
+	exeinto /etc/cron.daily
+	newexe "${S}"/examples/logrotate.cron "${PN}"
+}
+
+src_prepare() {
+	default
+
+	sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' examples/logrotate.{cron,service} || die
+}
+
+src_configure() {
+	econf \
+		$(use_with acl) \
+		$(use_with selinux) \
+		--with-state-file-path="${STATEFILE}"
+}
+
+src_install() {
+	dobin logrotate
+	doman logrotate.8
+	dodoc ChangeLog.md
+
+	insinto /etc
+	doins "${FILESDIR}"/logrotate.conf
+
+	use cron && install_cron_file
+
+	systemd_dounit examples/logrotate.{service,timer}
+	newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
+
+	keepdir /etc/logrotate.d
+}
+
+pkg_postinst() {
+	elog
+	elog "The ${PN} binary is now installed under /usr/bin. Please"
+	elog "update your links"
+	elog
+
+	move_old_state_file
+
+	tmpfiles_process ${PN}.conf
+
+	if [[ -z ${REPLACING_VERSIONS} ]] ; then
+		elog "If you wish to have logrotate e-mail you updates, please"
+		elog "emerge virtual/mailx and configure logrotate in"
+		elog "/etc/logrotate.conf appropriately"
+		elog
+		elog "Additionally, /etc/logrotate.conf may need to be modified"
+		elog "for your particular needs. See man logrotate for details."
+	fi
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-06-07  1:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-02 22:57 [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/files/, app-admin/logrotate/ José María Alonso
  -- strict thread matches above, loose matches on Subject: below --
2022-06-07  1:31 Sam James
2020-01-25 17:42 Mikle Kolyada
2018-03-09 19:16 José María Alonso
2017-10-24 19:21 José María Alonso
2017-10-04 20:48 José María Alonso
2017-08-18 14:35 José María Alonso
2017-07-02 14:09 José María Alonso
2017-05-04  8:44 José María Alonso
2017-04-22 22:12 José María Alonso
2016-08-03 22:03 José María Alonso
2015-09-12  3:40 Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox