From 5d2f077380c83dec1845cdd21323d2364724625c Mon Sep 17 00:00:00 2001 From: Chema Alonso Josa Date: Sun, 23 Apr 2017 00:12:00 +0200 Subject: 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(+) create mode 100644 app-admin/logrotate/files/logrotate-3.12.1-Werror.patch create mode 100644 app-admin/logrotate/files/logrotate-3.12.1-fbsd.patch create mode 100644 app-admin/logrotate/files/logrotate-3.12.1-ignore-hidden.patch create mode 100644 app-admin/logrotate/logrotate-3.12.1.ebuild diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest index 81aeda95da8d..6e6a419c13ed 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 000000000000..b8054e50a027 --- /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 000000000000..67a60e3af177 --- /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 + #include + ++#if !defined(PATH_MAX) && defined(__FreeBSD__) ++#include ++#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 + #endif + #include +@@ -27,6 +27,10 @@ + #include + #endif + ++#if !defined(PATH_MAX) && defined(__FreeBSD__) ++#include ++#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 000000000000..0bbb91dcb4fc --- /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 000000000000..a034036f3977 --- /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 +} -- cgit v1.2.3-65-gdbad