summaryrefslogtreecommitdiffstats
path: root/abs/core
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core')
-rw-r--r--abs/core/logrotate/PKGBUILD44
-rw-r--r--abs/core/logrotate/logrotate-3.8.1-noasprintf.patch53
-rw-r--r--abs/core/logrotate/logrotate.conf9
-rw-r--r--[-rwxr-xr-x]abs/core/logrotate/logrotate.cron.daily16
-rw-r--r--abs/core/logrotate/paths.patch25
5 files changed, 64 insertions, 83 deletions
diff --git a/abs/core/logrotate/PKGBUILD b/abs/core/logrotate/PKGBUILD
index 2e38d80..0730219 100644
--- a/abs/core/logrotate/PKGBUILD
+++ b/abs/core/logrotate/PKGBUILD
@@ -1,47 +1,45 @@
-# $Id: PKGBUILD 162089 2012-06-19 15:44:03Z allan $
+# $Id: PKGBUILD 196792 2013-10-19 09:14:49Z pierre $
# Maintainer: Pierre Schmitz <pierre@archlinux.de>
pkgname=logrotate
-pkgver=3.8.1
-pkgrel=2
+pkgver=3.8.7
+pkgrel=1
pkgdesc="Rotates system logs automatically"
arch=('i686' 'x86_64')
url="https://fedorahosted.org/logrotate/"
license=('GPL')
groups=('base')
-depends=('popt' 'cron' 'gzip')
+depends=('popt' 'gzip' 'acl')
+optdepends=('cron: scheduled log rotation')
backup=('etc/logrotate.conf')
source=("https://fedorahosted.org/releases/l/o/logrotate/logrotate-${pkgver}.tar.gz"
- 'logrotate-3.8.1-noasprintf.patch'
+ 'paths.patch'
'logrotate.conf'
'logrotate.cron.daily')
-md5sums=('bd2e20d8dc644291b08f9215397d28a5'
- 'fc8e4e15211d8aefd431d0e2e96223c4'
- '462a5f364717461537eb2ae6394ad23e'
- 'aa8ac8283908b6114483a293adcb650f')
build() {
- cd "$srcdir/${pkgname}-${pkgver}"
+ cd "$srcdir/${pkgname}-${pkgver}"
- patch -p1 -i "$srcdir"/logrotate-3.8.1-noasprintf.patch
+ patch -p0 -i "$srcdir/paths.patch"
- sed -e 's|#define DEFAULT_MAIL_COMMAND .*|#define DEFAULT_MAIL_COMMAND "/usr/bin/mail"|'\
- -e 's|#define COMPRESS_COMMAND .*|#define COMPRESS_COMMAND "/usr/bin/gzip"|'\
- -e 's|#define UNCOMPRESS_COMMAND .*|#define UNCOMPRESS_COMMAND "/usr/bin/gunzip"|'\
- -i config.h
-
- make RPM_OPT_FLAGS="$CFLAGS" EXTRA_LDFLAGS="$LDFLAGS"
+ make WITH_ACL=yes RPM_OPT_FLAGS="$CFLAGS" EXTRA_LDFLAGS="$LDFLAGS"
}
check() {
- cd "$srcdir/${pkgname}-${pkgver}"
- make test
+ cd "$srcdir/${pkgname}-${pkgver}"
+ make test
}
package() {
- cd "$srcdir/${pkgname}-${pkgver}"
- make PREFIX="$pkgdir" MANDIR="usr/share/man" install
+ cd "$srcdir/${pkgname}-${pkgver}"
+ make PREFIX="$pkgdir" MANDIR="/usr/share/man" install
+ mv ${pkgdir}/usr/sbin ${pkgdir}/usr/bin
- install -Dm644 "$srcdir/logrotate.conf" "$pkgdir/etc/logrotate.conf"
- install -Dm744 "$srcdir/logrotate.cron.daily" "$pkgdir/etc/cron.daily/logrotate"
+ install -dm755 "$pkgdir/etc/logrotate.d"
+ install -Dm644 "$srcdir/logrotate.conf" "$pkgdir/etc/logrotate.conf"
+ install -Dm744 "$srcdir/logrotate.cron.daily" "$pkgdir/etc/cron.daily/logrotate"
}
+md5sums=('99e08503ef24c3e2e3ff74cc5f3be213'
+ 'e76526bcd6fc33c9d921e1cb1eff1ffb'
+ '86209d257c8b8bc0ae34d6f6ef057c0f'
+ 'dd5fd26724274fd9c827eadad60ff4c5')
diff --git a/abs/core/logrotate/logrotate-3.8.1-noasprintf.patch b/abs/core/logrotate/logrotate-3.8.1-noasprintf.patch
deleted file mode 100644
index be0c080..0000000
--- a/abs/core/logrotate/logrotate-3.8.1-noasprintf.patch
+++ /dev/null
@@ -1,53 +0,0 @@
---- logrotate-3.8.0.orig/config.c 2011-06-21 04:12:02.000000000 -0400
-+++ logrotate-3.8.0/config.c 2011-07-12 13:47:36.274319050 -0400
-@@ -41,39 +41,6 @@
- #include "asprintf.c"
- #endif
-
--#if !defined(asprintf)
--#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)
- {
---- logrotate-3.8.0.orig/logrotate.h 2011-06-21 04:12:02.000000000 -0400
-+++ logrotate-3.8.0/logrotate.h 2011-07-12 13:47:38.949285608 -0400
-@@ -66,8 +66,5 @@ extern int numLogs;
- extern int debug;
-
- int readAllConfigPaths(const char **paths);
--#if !defined(asprintf)
--int asprintf(char **string_ptr, const char *format, ...);
--#endif
-
- #endif
diff --git a/abs/core/logrotate/logrotate.conf b/abs/core/logrotate/logrotate.conf
index 88b4935..9c1927f 100644
--- a/abs/core/logrotate/logrotate.conf
+++ b/abs/core/logrotate/logrotate.conf
@@ -25,7 +25,14 @@ include /etc/logrotate.d
/var/log/wtmp {
monthly
- create 0664 root root
+ create 0664 root utmp
+ minsize 1M
rotate 1
}
+/var/log/btmp {
+ missingok
+ monthly
+ create 0600 root utmp
+ rotate 1
+}
diff --git a/abs/core/logrotate/logrotate.cron.daily b/abs/core/logrotate/logrotate.cron.daily
index ee0eeeb..11fe09c 100755..100644
--- a/abs/core/logrotate/logrotate.cron.daily
+++ b/abs/core/logrotate/logrotate.cron.daily
@@ -9,16 +9,20 @@ IONICE_CLASS=2
# 0-7 (for IONICE_CLASS 1 and 2 only), 0=highest, 7=lowest
IONICE_PRIORITY=7
-CMD_LOGROTATE="/usr/sbin/logrotate /etc/logrotate.conf"
-
+CMD_LOGROTATE="/usr/bin/logrotate /etc/logrotate.conf"
+
if [ -x /usr/bin/nice ]; then
CMD_LOGROTATE="/usr/bin/nice -n ${NICE:-19} ${CMD_LOGROTATE}"
fi
-
+
if [ -x /usr/bin/ionice ]; then
- CMD_LOGROTATE="/usr/bin/ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} ${CMD_LOGROTATE}"
+ IONICE_CMD="/usr/bin/ionice -c ${IONICE_CLASS:-2}"
+ if [ $IONICE_CLASS -ne 3 ]; then
+ IONICE_CMD="${IONICE_CMD} -n ${IONICE_PRIORITY:-7}"
+ fi
+ CMD_LOGROTATE="${IONICE_CMD} ${CMD_LOGROTATE}"
fi
-
+
${CMD_LOGROTATE}
-
+
exit 0
diff --git a/abs/core/logrotate/paths.patch b/abs/core/logrotate/paths.patch
new file mode 100644
index 0000000..83166b0
--- /dev/null
+++ b/abs/core/logrotate/paths.patch
@@ -0,0 +1,25 @@
+--- config.h 2012-08-01 12:56:47.000000000 +0200
++++ config.h 2012-08-03 09:53:05.025039199 +0200
+@@ -27,11 +27,11 @@
+ * Default settings for Linux - leave these last.
+ */
+ #ifndef DEFAULT_MAIL_COMMAND
+-#define DEFAULT_MAIL_COMMAND "/bin/mail"
++#define DEFAULT_MAIL_COMMAND "/usr/bin/mail"
+ #endif
+
+ #ifndef COMPRESS_COMMAND
+-#define COMPRESS_COMMAND "/bin/gzip"
++#define COMPRESS_COMMAND "/usr/bin/gzip"
+ #endif
+
+ #ifndef COMPRESS_EXT
+@@ -39,7 +39,7 @@
+ #endif
+
+ #ifndef UNCOMPRESS_COMMAND
+-#define UNCOMPRESS_COMMAND "/bin/gunzip"
++#define UNCOMPRESS_COMMAND "/usr/bin/gunzip"
+ #endif
+
+ #ifndef STATEFILE