[arch-commits] Commit in logrotate/repos (10 files)

Eric Bélanger eric at archlinux.org
Wed Sep 28 06:05:56 UTC 2011


    Date: Wednesday, September 28, 2011 @ 02:05:56
  Author: eric
Revision: 138778

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  logrotate/repos/testing-i686/
  logrotate/repos/testing-i686/PKGBUILD
    (from rev 138777, logrotate/trunk/PKGBUILD)
  logrotate/repos/testing-i686/logrotate-3.8.1-noasprintf.patch
    (from rev 138777, logrotate/trunk/logrotate-3.8.1-noasprintf.patch)
  logrotate/repos/testing-i686/logrotate.conf
    (from rev 138777, logrotate/trunk/logrotate.conf)
  logrotate/repos/testing-i686/logrotate.cron.daily
    (from rev 138777, logrotate/trunk/logrotate.cron.daily)
  logrotate/repos/testing-x86_64/
  logrotate/repos/testing-x86_64/PKGBUILD
    (from rev 138777, logrotate/trunk/PKGBUILD)
  logrotate/repos/testing-x86_64/logrotate-3.8.1-noasprintf.patch
    (from rev 138777, logrotate/trunk/logrotate-3.8.1-noasprintf.patch)
  logrotate/repos/testing-x86_64/logrotate.conf
    (from rev 138777, logrotate/trunk/logrotate.conf)
  logrotate/repos/testing-x86_64/logrotate.cron.daily
    (from rev 138777, logrotate/trunk/logrotate.cron.daily)

-------------------------------------------------+
 testing-i686/PKGBUILD                           |   48 +++++++++++++++++++
 testing-i686/logrotate-3.8.1-noasprintf.patch   |   53 ++++++++++++++++++++++
 testing-i686/logrotate.conf                     |   31 ++++++++++++
 testing-i686/logrotate.cron.daily               |    3 +
 testing-x86_64/PKGBUILD                         |   48 +++++++++++++++++++
 testing-x86_64/logrotate-3.8.1-noasprintf.patch |   53 ++++++++++++++++++++++
 testing-x86_64/logrotate.conf                   |   31 ++++++++++++
 testing-x86_64/logrotate.cron.daily             |    3 +
 8 files changed, 270 insertions(+)

Copied: logrotate/repos/testing-i686/PKGBUILD (from rev 138777, logrotate/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2011-09-28 06:05:56 UTC (rev 138778)
@@ -0,0 +1,48 @@
+# $Id$
+# Maintainer: Aaron Griffin <aaron at archlinux.org>
+# Contributor: Judd Vinet <jvinet at zeroflux.org>
+
+pkgname=logrotate
+pkgver=3.8.1
+pkgrel=1
+pkgdesc="Rotates system logs automatically"
+arch=('i686' 'x86_64')
+url="https://fedorahosted.org/logrotate/"
+license=('GPL')
+groups=('base')
+depends=('popt' 'cron' 'gzip')
+backup=('etc/logrotate.conf')
+source=(https://fedorahosted.org/releases/l/o/logrotate/logrotate-${pkgver}.tar.gz
+        logrotate-3.8.1-noasprintf.patch
+        logrotate.conf
+        logrotate.cron.daily)
+md5sums=('bd2e20d8dc644291b08f9215397d28a5'
+         'fc8e4e15211d8aefd431d0e2e96223c4'
+         '462a5f364717461537eb2ae6394ad23e'
+         '8e23d5d4cc29b1e055b24df87e355cdc')
+
+build() {
+  cd "$srcdir/${pkgname}-${pkgver}"
+
+  patch -p1 -i "$srcdir"/logrotate-3.8.1-noasprintf.patch
+
+  sed -i 's|#define DEFAULT_MAIL_COMMAND .*|#define DEFAULT_MAIL_COMMAND "/usr/bin/mail"|'\
+    config.h
+  sed -i "s|CFLAGS = -Wall|CFLAGS = -Wall $CFLAGS|" Makefile
+  sed -i 's|$(BASEDIR)/man|$(BASEDIR)/share/man|' Makefile
+  
+  make
+}
+
+check() {
+  cd "$srcdir/${pkgname}-${pkgver}"
+  make test
+}
+
+package() {
+  cd "$srcdir/${pkgname}-${pkgver}"
+  make PREFIX="$pkgdir" install
+
+  install -Dm644 "$srcdir/logrotate.conf" "$pkgdir/etc/logrotate.conf"
+  install -Dm744 "$srcdir/logrotate.cron.daily" "$pkgdir/etc/cron.daily/logrotate"
+}

Copied: logrotate/repos/testing-i686/logrotate-3.8.1-noasprintf.patch (from rev 138777, logrotate/trunk/logrotate-3.8.1-noasprintf.patch)
===================================================================
--- testing-i686/logrotate-3.8.1-noasprintf.patch	                        (rev 0)
+++ testing-i686/logrotate-3.8.1-noasprintf.patch	2011-09-28 06:05:56 UTC (rev 138778)
@@ -0,0 +1,53 @@
+--- 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

Copied: logrotate/repos/testing-i686/logrotate.conf (from rev 138777, logrotate/trunk/logrotate.conf)
===================================================================
--- testing-i686/logrotate.conf	                        (rev 0)
+++ testing-i686/logrotate.conf	2011-09-28 06:05:56 UTC (rev 138778)
@@ -0,0 +1,31 @@
+# see "man logrotate" for details
+# rotate log files weekly
+weekly
+
+# keep 4 weeks worth of backlogs
+rotate 4
+
+# restrict maximum size of log files
+#size 20M
+
+# create new (empty) log files after rotating old ones
+create
+
+# uncomment this if you want your log files compressed
+#compress
+
+# Logs are moved into directory for rotation
+# olddir /var/log/archive
+
+# Ignore pacman saved files
+tabooext + .pacorig .pacnew .pacsave
+
+# Arch packages drop log rotation information into this directory
+include /etc/logrotate.d
+
+/var/log/wtmp {
+    monthly
+    create 0664 root root
+    rotate 1
+}
+

Copied: logrotate/repos/testing-i686/logrotate.cron.daily (from rev 138777, logrotate/trunk/logrotate.cron.daily)
===================================================================
--- testing-i686/logrotate.cron.daily	                        (rev 0)
+++ testing-i686/logrotate.cron.daily	2011-09-28 06:05:56 UTC (rev 138778)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/usr/sbin/logrotate /etc/logrotate.conf

Copied: logrotate/repos/testing-x86_64/PKGBUILD (from rev 138777, logrotate/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2011-09-28 06:05:56 UTC (rev 138778)
@@ -0,0 +1,48 @@
+# $Id$
+# Maintainer: Aaron Griffin <aaron at archlinux.org>
+# Contributor: Judd Vinet <jvinet at zeroflux.org>
+
+pkgname=logrotate
+pkgver=3.8.1
+pkgrel=1
+pkgdesc="Rotates system logs automatically"
+arch=('i686' 'x86_64')
+url="https://fedorahosted.org/logrotate/"
+license=('GPL')
+groups=('base')
+depends=('popt' 'cron' 'gzip')
+backup=('etc/logrotate.conf')
+source=(https://fedorahosted.org/releases/l/o/logrotate/logrotate-${pkgver}.tar.gz
+        logrotate-3.8.1-noasprintf.patch
+        logrotate.conf
+        logrotate.cron.daily)
+md5sums=('bd2e20d8dc644291b08f9215397d28a5'
+         'fc8e4e15211d8aefd431d0e2e96223c4'
+         '462a5f364717461537eb2ae6394ad23e'
+         '8e23d5d4cc29b1e055b24df87e355cdc')
+
+build() {
+  cd "$srcdir/${pkgname}-${pkgver}"
+
+  patch -p1 -i "$srcdir"/logrotate-3.8.1-noasprintf.patch
+
+  sed -i 's|#define DEFAULT_MAIL_COMMAND .*|#define DEFAULT_MAIL_COMMAND "/usr/bin/mail"|'\
+    config.h
+  sed -i "s|CFLAGS = -Wall|CFLAGS = -Wall $CFLAGS|" Makefile
+  sed -i 's|$(BASEDIR)/man|$(BASEDIR)/share/man|' Makefile
+  
+  make
+}
+
+check() {
+  cd "$srcdir/${pkgname}-${pkgver}"
+  make test
+}
+
+package() {
+  cd "$srcdir/${pkgname}-${pkgver}"
+  make PREFIX="$pkgdir" install
+
+  install -Dm644 "$srcdir/logrotate.conf" "$pkgdir/etc/logrotate.conf"
+  install -Dm744 "$srcdir/logrotate.cron.daily" "$pkgdir/etc/cron.daily/logrotate"
+}

Copied: logrotate/repos/testing-x86_64/logrotate-3.8.1-noasprintf.patch (from rev 138777, logrotate/trunk/logrotate-3.8.1-noasprintf.patch)
===================================================================
--- testing-x86_64/logrotate-3.8.1-noasprintf.patch	                        (rev 0)
+++ testing-x86_64/logrotate-3.8.1-noasprintf.patch	2011-09-28 06:05:56 UTC (rev 138778)
@@ -0,0 +1,53 @@
+--- 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

Copied: logrotate/repos/testing-x86_64/logrotate.conf (from rev 138777, logrotate/trunk/logrotate.conf)
===================================================================
--- testing-x86_64/logrotate.conf	                        (rev 0)
+++ testing-x86_64/logrotate.conf	2011-09-28 06:05:56 UTC (rev 138778)
@@ -0,0 +1,31 @@
+# see "man logrotate" for details
+# rotate log files weekly
+weekly
+
+# keep 4 weeks worth of backlogs
+rotate 4
+
+# restrict maximum size of log files
+#size 20M
+
+# create new (empty) log files after rotating old ones
+create
+
+# uncomment this if you want your log files compressed
+#compress
+
+# Logs are moved into directory for rotation
+# olddir /var/log/archive
+
+# Ignore pacman saved files
+tabooext + .pacorig .pacnew .pacsave
+
+# Arch packages drop log rotation information into this directory
+include /etc/logrotate.d
+
+/var/log/wtmp {
+    monthly
+    create 0664 root root
+    rotate 1
+}
+

Copied: logrotate/repos/testing-x86_64/logrotate.cron.daily (from rev 138777, logrotate/trunk/logrotate.cron.daily)
===================================================================
--- testing-x86_64/logrotate.cron.daily	                        (rev 0)
+++ testing-x86_64/logrotate.cron.daily	2011-09-28 06:05:56 UTC (rev 138778)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/usr/sbin/logrotate /etc/logrotate.conf




More information about the arch-commits mailing list