summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/bridge-utils/PKGBUILD16
-rw-r--r--core/coreutils/PKGBUILD11
-rw-r--r--core/dbus-core/PKGBUILD6
-rw-r--r--core/glib2/PKGBUILD4
-rw-r--r--core/inetutils/PKGBUILD8
-rw-r--r--core/libsasl/PKGBUILD6
-rw-r--r--core/logrotate/logrotate-3.8.0-noasprintf.patch55
-rw-r--r--core/mpfr/PKGBUILD17
-rw-r--r--core/mpfr/mpfr-3.0.1.p4.patch367
-rw-r--r--core/mpfr/mpfr-3.1.0.p1.patch50
-rw-r--r--core/syslog-ng/PKGBUILD65
-rw-r--r--core/syslog-ng/cap_syslog.patch101
-rw-r--r--core/syslog-ng/non-blocking-systemd-fds.patch32
-rw-r--r--core/syslog-ng/syslog-ng.conf6
-rwxr-xr-xcore/syslog-ng/syslog-ng.rc55
15 files changed, 144 insertions, 655 deletions
diff --git a/core/bridge-utils/PKGBUILD b/core/bridge-utils/PKGBUILD
index d54b6ccd2..7b2d6bbca 100644
--- a/core/bridge-utils/PKGBUILD
+++ b/core/bridge-utils/PKGBUILD
@@ -1,26 +1,26 @@
-# $Id: PKGBUILD 112055 2011-03-03 12:52:38Z stephane $
+# $Id: PKGBUILD 140510 2011-10-16 05:39:52Z eric $
# Maintainer:
# Contributor: Judd Vinet <judd@archlinux.org>
pkgname=bridge-utils
-pkgver=1.4
-pkgrel=4
+pkgver=1.5
+pkgrel=1
pkgdesc="Utilities for configuring the Linux ethernet bridge"
arch=('i686' 'x86_64' 'mips64el')
-url="http://www.linuxfoundation.org/en/Net:Bridge"
-license=('GPL2')
-backup=('etc/conf.d/bridges')
+url="http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge"
+license=('GPL')
depends=('glibc')
+backup=('etc/conf.d/bridges')
source=(http://downloads.sourceforge.net/bridge/bridge-utils-$pkgver.tar.gz
bridges.conf.d)
-md5sums=('0182fcac3a2b307113bbec34e5f1c673'
+md5sums=('ec7b381160b340648dede58c31bb2238'
'f5d691282653580dd5fd4a1092ef365b')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
aclocal
autoconf
- ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man
+ ./configure --prefix=/usr --sysconfdir=/etc
make
}
diff --git a/core/coreutils/PKGBUILD b/core/coreutils/PKGBUILD
index 6d605164a..a7d830e1e 100644
--- a/core/coreutils/PKGBUILD
+++ b/core/coreutils/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 137787 2011-09-11 01:35:08Z allan $
+# $Id: PKGBUILD 140430 2011-10-14 06:04:29Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
pkgname=coreutils
-pkgver=8.13
-pkgrel=2
+pkgver=8.14
+pkgrel=1
pkgdesc="The basic file, shell and text manipulation utilities of the GNU operating system"
arch=('i686' 'x86_64' 'mips64el')
license=('GPL3')
@@ -15,11 +15,12 @@ replaces=('mktemp')
backup=('etc/pam.d/su')
install=${pkgname}.install
options=('!emptydirs')
-source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz
+source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}
coreutils-uname.patch
coreutils-pam.patch
su.pam)
-md5sums=('8e1675c6c336ff55557c698706a63d6c'
+md5sums=('bcb135ce553493a45aba01b39eb3920a'
+ '279712f9afc954beaff0d99194c8f462'
'c4fcca138b6abf6d443d48a6f0cd8833'
'aad79a2aa6d566c375d7bdd1b0767278'
'fa85e5cce5d723275b14365ba71a8aad')
diff --git a/core/dbus-core/PKGBUILD b/core/dbus-core/PKGBUILD
index a40373afa..5d82719ae 100644
--- a/core/dbus-core/PKGBUILD
+++ b/core/dbus-core/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 134377 2011-08-03 11:19:59Z ibiru $
+# $Id: PKGBUILD 140075 2011-10-06 07:35:37Z ibiru $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Link Dupont <link@subpop.net>
#
pkgname=dbus-core
-pkgver=1.4.14
+pkgver=1.4.16
pkgrel=1
pkgdesc="Freedesktop.org message bus system"
url="http://www.freedesktop.org/Software/dbus"
@@ -16,7 +16,7 @@ options=(!libtool)
install=dbus.install
source=(http://dbus.freedesktop.org/releases/dbus/dbus-${pkgver}.tar.gz
dbus)
-md5sums=('ae6de2562a57516cfabaf56903375ba9'
+md5sums=('44a2a10678e7e50460879c3eb4453a65'
'08f93dd19cffd1b45ab05c1fd4efb560')
build() {
diff --git a/core/glib2/PKGBUILD b/core/glib2/PKGBUILD
index 175bf1d7a..58314f6ab 100644
--- a/core/glib2/PKGBUILD
+++ b/core/glib2/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 139207 2011-10-01 18:53:04Z ibiru $
+# $Id: PKGBUILD 140113 2011-10-07 08:18:56Z ibiru $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=glib2
@@ -21,7 +21,7 @@ sha256sums=('d64c00b43409eabb89aad78501fcb1a992b002b314a4414a9bd069585cb7cdc1'
build() {
cd "${srcdir}/glib-${pkgver}"
- ./configure --prefix=/usr \
+ PYTHON=/usr/bin/python2 ./configure --prefix=/usr \
--sysconfdir=/etc \
--with-pcre=system \
--disable-fam
diff --git a/core/inetutils/PKGBUILD b/core/inetutils/PKGBUILD
index de4da05e1..2831344f4 100644
--- a/core/inetutils/PKGBUILD
+++ b/core/inetutils/PKGBUILD
@@ -1,13 +1,13 @@
-# $Id: PKGBUILD 139637 2011-10-04 00:28:34Z eric $
+# $Id: PKGBUILD 140458 2011-10-14 20:15:14Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>
pkgname=inetutils
pkgver=1.8
-pkgrel=5
+pkgrel=6
pkgdesc="A collection of common network programs"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.gnu.org/software/inetutils/"
-license=('GPL')
+license=('GPL3')
groups=('base')
depends=('readline' 'ncurses' 'pam')
provides=('netkit-ftp' 'netkit-rsh' 'netkit-telnet' 'netkit-ntalk')
@@ -35,7 +35,7 @@ sha1sums=('598445859b511f73681e4d74a41d65cd6ae0f83e'
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./configure --prefix=/usr --libexec=/usr/sbin --localstatedir=/var \
- --mandir=/usr/share/man --infodir=/usr/share/info \
+ --sysconfdir=/etc --mandir=/usr/share/man --infodir=/usr/share/info \
--without-wrap --with-pam \
--enable-ftp --enable-ftpd \
--enable-telnet --enable-telnetd \
diff --git a/core/libsasl/PKGBUILD b/core/libsasl/PKGBUILD
index 4ea188ad9..0170f973a 100644
--- a/core/libsasl/PKGBUILD
+++ b/core/libsasl/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 134437 2011-08-03 20:35:03Z jgc $
+# $Id: PKGBUILD 140271 2011-10-11 21:27:38Z jgc $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# This package spans multiple repositories.
@@ -8,7 +8,7 @@
#pkgname=('cyrus-sasl' 'cyrus-sasl-gssapi' 'cyrus-sasl-ldap' 'cyrus-sasl-sql')
pkgname=libsasl
pkgver=2.1.23
-pkgrel=7
+pkgrel=8
pkgdesc="Cyrus Simple Authentication Service Layer (SASL) library"
arch=('i686' 'x86_64' 'mips64el')
url="http://cyrusimap.web.cmu.edu/downloads.html#sasl"
@@ -133,7 +133,6 @@ build() {
package_libsasl() {
pkgdesc="Cyrus Simple Authentication Service Layer (SASL) Library"
depends=('openssl')
- provides=('cyrus-sasl-plugins')
conflicts=('cyrus-sasl-plugins')
cd "${srcdir}/cyrus-sasl-${pkgver}"
@@ -152,6 +151,7 @@ package_libsasl() {
package_cyrus-sasl() {
depends=("libsasl=${pkgver}-${pkgrel}")
pkgdesc="Cyrus saslauthd SASL authentication daemon"
+ backup=('etc/conf.d/saslauthd')
cd "${srcdir}/cyrus-sasl-${pkgver}/saslauthd"
make DESTDIR="${pkgdir}" install
diff --git a/core/logrotate/logrotate-3.8.0-noasprintf.patch b/core/logrotate/logrotate-3.8.0-noasprintf.patch
deleted file mode 100644
index b9464e230..000000000
--- a/core/logrotate/logrotate-3.8.0-noasprintf.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN logrotate-3.8.0.orig/config.c logrotate-3.8.0/config.c
---- 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 @@
- #endif
- #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
--
- enum {
- STATE_DEFAULT = 2,
- STATE_SKIP_LINE = 4,
-diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN logrotate-3.8.0.orig/logrotate.h logrotate-3.8.0/logrotate.h
---- 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/core/mpfr/PKGBUILD b/core/mpfr/PKGBUILD
index 8fd636c86..0ed1392cb 100644
--- a/core/mpfr/PKGBUILD
+++ b/core/mpfr/PKGBUILD
@@ -1,13 +1,12 @@
-# $Id: PKGBUILD 139750 2011-10-04 21:10:35Z allan $
+# $Id: PKGBUILD 140252 2011-10-11 00:43:43Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: damir <damir@archlinux.org>
pkgname=mpfr
_pkgver=3.1.0
-pkgver=${_pkgver}
-#_patchlevel=p4
-#pkgver=${_pkgver}.${_patchlevel}
-pkgrel=2
+_patchlevel=p1
+pkgver=${_pkgver}.${_patchlevel}
+pkgrel=1
pkgdesc="Multiple-precision floating-point library"
license=('LGPL')
arch=('i686' 'x86_64' 'mips64el')
@@ -16,12 +15,14 @@ license=('LGPL')
depends=('gmp>=5.0')
options=('!libtool')
install=mpfr.install
-source=(http://www.mpfr.org/mpfr-current/mpfr-${_pkgver}.tar.xz)
-md5sums=('6e495841bb026481567006cec0f821c3')
+source=(http://www.mpfr.org/mpfr-current/mpfr-${_pkgver}.tar.xz
+ mpfr-${_pkgver}.${_patchlevel}.patch)
+md5sums=('6e495841bb026481567006cec0f821c3'
+ 'ec988293368d4988c76f50d6a3460166')
build() {
cd "${srcdir}/${pkgname}-${_pkgver}"
- #patch -Np1 -i $srcdir/mpfr-${_pkgver}.${_patchlevel}.patch
+ patch -Np1 -i $srcdir/mpfr-${_pkgver}.${_patchlevel}.patch
./configure --prefix=/usr --enable-thread-safe --enable-shared
make
}
diff --git a/core/mpfr/mpfr-3.0.1.p4.patch b/core/mpfr/mpfr-3.0.1.p4.patch
deleted file mode 100644
index 9604635a2..000000000
--- a/core/mpfr/mpfr-3.0.1.p4.patch
+++ /dev/null
@@ -1,367 +0,0 @@
-diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES
---- mpfr-3.0.1-a/PATCHES 2011-04-12 10:50:02.000000000 +0000
-+++ mpfr-3.0.1-b/PATCHES 2011-04-12 10:50:02.000000000 +0000
-@@ -0,0 +1 @@
-+asin_exprange
-diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION
---- mpfr-3.0.1-a/VERSION 2011-04-04 10:19:18.000000000 +0000
-+++ mpfr-3.0.1-b/VERSION 2011-04-12 10:50:02.000000000 +0000
-@@ -1 +1 @@
--3.0.1
-+3.0.1-p1
-diff -Naurd mpfr-3.0.1-a/asin.c mpfr-3.0.1-b/asin.c
---- mpfr-3.0.1-a/asin.c 2011-04-04 10:19:18.000000000 +0000
-+++ mpfr-3.0.1-b/asin.c 2011-04-12 10:50:02.000000000 +0000
-@@ -63,11 +63,14 @@
-
- compared = mpfr_cmp_ui (xp, 1);
-
-+ MPFR_SAVE_EXPO_MARK (expo);
-+
- if (MPFR_UNLIKELY (compared >= 0))
- {
- mpfr_clear (xp);
- if (compared > 0) /* asin(x) = NaN for |x| > 1 */
- {
-+ MPFR_SAVE_EXPO_FREE (expo);
- MPFR_SET_NAN (asin);
- MPFR_RET_NAN;
- }
-@@ -80,13 +83,11 @@
- inexact = -mpfr_const_pi (asin, MPFR_INVERT_RND(rnd_mode));
- MPFR_CHANGE_SIGN (asin);
- }
-- mpfr_div_2ui (asin, asin, 1, rnd_mode); /* May underflow */
-- return inexact;
-+ mpfr_div_2ui (asin, asin, 1, rnd_mode);
- }
- }
--
-- MPFR_SAVE_EXPO_MARK (expo);
--
-+ else
-+ {
- /* Compute exponent of 1 - ABS(x) */
- mpfr_ui_sub (xp, 1, xp, MPFR_RNDD);
- MPFR_ASSERTD (MPFR_GET_EXP (xp) <= 0);
-@@ -115,6 +116,7 @@
- inexact = mpfr_set (asin, xp, rnd_mode);
-
- mpfr_clear (xp);
-+ }
-
- MPFR_SAVE_EXPO_FREE (expo);
- return mpfr_check_range (asin, inexact, rnd_mode);
-diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h
---- mpfr-3.0.1-a/mpfr.h 2011-04-04 10:19:18.000000000 +0000
-+++ mpfr-3.0.1-b/mpfr.h 2011-04-12 10:50:02.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 0
- #define MPFR_VERSION_PATCHLEVEL 1
--#define MPFR_VERSION_STRING "3.0.1"
-+#define MPFR_VERSION_STRING "3.0.1-p1"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.0.1-a/tests/tasin.c mpfr-3.0.1-b/tests/tasin.c
---- mpfr-3.0.1-a/tests/tasin.c 2011-04-04 10:19:17.000000000 +0000
-+++ mpfr-3.0.1-b/tests/tasin.c 2011-04-12 10:50:02.000000000 +0000
-@@ -219,6 +219,49 @@
- mpfr_clear (y);
- }
-
-+static void
-+reduced_expo_range (void)
-+{
-+ mpfr_exp_t emin, emax;
-+ mpfr_t x, y, ex_y;
-+ int inex, ex_inex;
-+ unsigned int flags, ex_flags;
-+
-+ emin = mpfr_get_emin ();
-+ emax = mpfr_get_emax ();
-+
-+ mpfr_inits2 (4, x, y, ex_y, (mpfr_ptr) 0);
-+ mpfr_set_str (x, "-0.1e1", 2, MPFR_RNDN);
-+
-+ mpfr_set_emin (1);
-+ mpfr_set_emax (1);
-+ mpfr_clear_flags ();
-+ inex = mpfr_asin (y, x, MPFR_RNDA);
-+ flags = __gmpfr_flags;
-+ mpfr_set_emin (emin);
-+ mpfr_set_emax (emax);
-+
-+ mpfr_set_str (ex_y, "-0.1101e1", 2, MPFR_RNDN);
-+ ex_inex = -1;
-+ ex_flags = MPFR_FLAGS_INEXACT;
-+
-+ if (SIGN (inex) != ex_inex || flags != ex_flags ||
-+ ! mpfr_equal_p (y, ex_y))
-+ {
-+ printf ("Error in reduced_expo_range\non x = ");
-+ mpfr_dump (x);
-+ printf ("Expected y = ");
-+ mpfr_out_str (stdout, 2, 0, ex_y, MPFR_RNDN);
-+ printf ("\n inex = %d, flags = %u\n", ex_inex, ex_flags);
-+ printf ("Got y = ");
-+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN);
-+ printf ("\n inex = %d, flags = %u\n", SIGN (inex), flags);
-+ exit (1);
-+ }
-+
-+ mpfr_clears (x, y, ex_y, (mpfr_ptr) 0);
-+}
-+
- int
- main (void)
- {
-@@ -226,6 +269,7 @@
-
- special ();
- special_overflow ();
-+ reduced_expo_range ();
-
- test_generic (2, 100, 15);
-
-diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c
---- mpfr-3.0.1-a/version.c 2011-04-04 10:19:18.000000000 +0000
-+++ mpfr-3.0.1-b/version.c 2011-04-12 10:50:02.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.0.1";
-+ return "3.0.1-p1";
- }
-diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES
---- mpfr-3.0.1-a/PATCHES 2011-05-04 11:18:33.000000000 +0000
-+++ mpfr-3.0.1-b/PATCHES 2011-05-04 11:18:33.000000000 +0000
-@@ -0,0 +1 @@
-+rec_sqrt-carry
-diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION
---- mpfr-3.0.1-a/VERSION 2011-04-12 10:50:02.000000000 +0000
-+++ mpfr-3.0.1-b/VERSION 2011-05-04 11:18:33.000000000 +0000
-@@ -1 +1 @@
--3.0.1-p1
-+3.0.1-p2
-diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h
---- mpfr-3.0.1-a/mpfr.h 2011-04-12 10:50:02.000000000 +0000
-+++ mpfr-3.0.1-b/mpfr.h 2011-05-04 11:18:33.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 0
- #define MPFR_VERSION_PATCHLEVEL 1
--#define MPFR_VERSION_STRING "3.0.1-p1"
-+#define MPFR_VERSION_STRING "3.0.1-p2"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.0.1-a/rec_sqrt.c mpfr-3.0.1-b/rec_sqrt.c
---- mpfr-3.0.1-a/rec_sqrt.c 2011-04-04 10:19:18.000000000 +0000
-+++ mpfr-3.0.1-b/rec_sqrt.c 2011-05-04 11:18:33.000000000 +0000
-@@ -375,20 +375,37 @@
- MPFR_ASSERTD(un == ln + 1 || un == ln + 2);
- /* the high un-ln limbs of u will overlap the low part of {x+ln,xn},
- we need to add or subtract the overlapping part {u + ln, un - ln} */
-+ /* Warning! th may be 0, in which case the mpn_add_1 and mpn_sub_1
-+ below (with size = th) mustn't be used. In such a case, the limb
-+ (carry) will be 0, so that this is semantically a no-op, but if
-+ mpn_add_1 and mpn_sub_1 are used, GMP (currently) still does a
-+ non-atomic read/write in a place that is not always allocated,
-+ with the possible consequences: a crash if the corresponding
-+ address is not mapped, or (rather unlikely) memory corruption
-+ if another process/thread writes at the same place; things may
-+ be worse with future GMP versions. Hence the tests carry != 0. */
- if (neg == 0)
- {
- if (ln > 0)
- MPN_COPY (x, u, ln);
- cy = mpn_add (x + ln, x + ln, xn, u + ln, un - ln);
- /* add cu at x+un */
-- cy += mpn_add_1 (x + un, x + un, th, cu);
-+ if (cu != 0)
-+ {
-+ MPFR_ASSERTD (th != 0);
-+ cy += mpn_add_1 (x + un, x + un, th, cu);
-+ }
- }
- else /* negative case */
- {
- /* subtract {u+ln, un-ln} from {x+ln,un} */
- cy = mpn_sub (x + ln, x + ln, xn, u + ln, un - ln);
- /* carry cy is at x+un, like cu */
-- cy = mpn_sub_1 (x + un, x + un, th, cy + cu); /* n - un = th */
-+ if (cy + cu != 0)
-+ {
-+ MPFR_ASSERTD (th != 0);
-+ cy = mpn_sub_1 (x + un, x + un, th, cy + cu); /* n - un = th */
-+ }
- /* cy cannot be zero, since the most significant bit of Xh is 1,
- and the correction is bounded by 2^{-h+3} */
- MPFR_ASSERTD(cy == 0);
-diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c
---- mpfr-3.0.1-a/version.c 2011-04-12 10:50:02.000000000 +0000
-+++ mpfr-3.0.1-b/version.c 2011-05-04 11:18:33.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.0.1-p1";
-+ return "3.0.1-p2";
- }
-diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES
---- mpfr-3.0.1-a/PATCHES 2011-05-05 00:00:35.000000000 +0000
-+++ mpfr-3.0.1-b/PATCHES 2011-05-05 00:00:35.000000000 +0000
-@@ -0,0 +1 @@
-+atan-expo-range
-diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION
---- mpfr-3.0.1-a/VERSION 2011-05-04 11:18:33.000000000 +0000
-+++ mpfr-3.0.1-b/VERSION 2011-05-05 00:00:35.000000000 +0000
-@@ -1 +1 @@
--3.0.1-p2
-+3.0.1-p3
-diff -Naurd mpfr-3.0.1-a/atan.c mpfr-3.0.1-b/atan.c
---- mpfr-3.0.1-a/atan.c 2011-04-04 10:19:18.000000000 +0000
-+++ mpfr-3.0.1-b/atan.c 2011-05-05 00:00:35.000000000 +0000
-@@ -431,5 +431,5 @@
- MPFR_GROUP_CLEAR (group);
-
- MPFR_SAVE_EXPO_FREE (expo);
-- return mpfr_check_range (arctgt, inexact, rnd_mode);
-+ return mpfr_check_range (atan, inexact, rnd_mode);
- }
-diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h
---- mpfr-3.0.1-a/mpfr.h 2011-05-04 11:18:33.000000000 +0000
-+++ mpfr-3.0.1-b/mpfr.h 2011-05-05 00:00:35.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 0
- #define MPFR_VERSION_PATCHLEVEL 1
--#define MPFR_VERSION_STRING "3.0.1-p2"
-+#define MPFR_VERSION_STRING "3.0.1-p3"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.0.1-a/tests/tatan.c mpfr-3.0.1-b/tests/tatan.c
---- mpfr-3.0.1-a/tests/tatan.c 2011-04-04 10:19:17.000000000 +0000
-+++ mpfr-3.0.1-b/tests/tatan.c 2011-05-05 00:00:35.000000000 +0000
-@@ -535,6 +535,52 @@
- mpfr_clears (a, x, y, (mpfr_ptr) 0);
- }
-
-+/* http://websympa.loria.fr/wwsympa/arc/mpfr/2011-05/msg00008.html
-+ * Incorrect flags (in debug mode on a 32-bit machine, assertion failure).
-+ */
-+static void
-+reduced_expo_range (void)
-+{
-+ mpfr_exp_t emin, emax;
-+ mpfr_t x, y, ex_y;
-+ int inex, ex_inex;
-+ unsigned int flags, ex_flags;
-+
-+ emin = mpfr_get_emin ();
-+ emax = mpfr_get_emax ();
-+
-+ mpfr_inits2 (12, x, y, ex_y, (mpfr_ptr) 0);
-+ mpfr_set_str (x, "0.1e-5", 2, MPFR_RNDN);
-+
-+ mpfr_set_emin (-5);
-+ mpfr_set_emax (-5);
-+ mpfr_clear_flags ();
-+ inex = mpfr_atan (y, x, MPFR_RNDN);
-+ flags = __gmpfr_flags;
-+ mpfr_set_emin (emin);
-+ mpfr_set_emax (emax);
-+
-+ mpfr_set_str (ex_y, "0.1e-5", 2, MPFR_RNDN);
-+ ex_inex = 1;
-+ ex_flags = MPFR_FLAGS_INEXACT;
-+
-+ if (SIGN (inex) != ex_inex || flags != ex_flags ||
-+ ! mpfr_equal_p (y, ex_y))
-+ {
-+ printf ("Error in reduced_expo_range\non x = ");
-+ mpfr_dump (x);
-+ printf ("Expected y = ");
-+ mpfr_out_str (stdout, 2, 0, ex_y, MPFR_RNDN);
-+ printf ("\n inex = %d, flags = %u\n", ex_inex, ex_flags);
-+ printf ("Got y = ");
-+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN);
-+ printf ("\n inex = %d, flags = %u\n", SIGN (inex), flags);
-+ exit (1);
-+ }
-+
-+ mpfr_clears (x, y, ex_y, (mpfr_ptr) 0);
-+}
-+
- int
- main (int argc, char *argv[])
- {
-@@ -546,6 +592,7 @@
- smallvals_atan2 ();
- atan2_bug_20071003 ();
- atan2_different_prec ();
-+ reduced_expo_range ();
-
- test_generic_atan (2, 200, 17);
- test_generic_atan2 (2, 200, 17);
-diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c
---- mpfr-3.0.1-a/version.c 2011-05-04 11:18:33.000000000 +0000
-+++ mpfr-3.0.1-b/version.c 2011-05-05 00:00:35.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.0.1-p2";
-+ return "3.0.1-p3";
- }
-diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES
---- mpfr-3.0.1-a/PATCHES 2011-05-09 14:48:24.000000000 +0000
-+++ mpfr-3.0.1-b/PATCHES 2011-05-09 14:48:24.000000000 +0000
-@@ -0,0 +1 @@
-+texp-zero
-diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION
---- mpfr-3.0.1-a/VERSION 2011-05-05 00:00:35.000000000 +0000
-+++ mpfr-3.0.1-b/VERSION 2011-05-09 14:48:24.000000000 +0000
-@@ -1 +1 @@
--3.0.1-p3
-+3.0.1-p4
-diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h
---- mpfr-3.0.1-a/mpfr.h 2011-05-05 00:00:35.000000000 +0000
-+++ mpfr-3.0.1-b/mpfr.h 2011-05-09 14:48:24.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 0
- #define MPFR_VERSION_PATCHLEVEL 1
--#define MPFR_VERSION_STRING "3.0.1-p3"
-+#define MPFR_VERSION_STRING "3.0.1-p4"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.0.1-a/tests/texp.c mpfr-3.0.1-b/tests/texp.c
---- mpfr-3.0.1-a/tests/texp.c 2011-04-04 10:19:17.000000000 +0000
-+++ mpfr-3.0.1-b/tests/texp.c 2011-05-09 14:48:24.000000000 +0000
-@@ -170,7 +170,9 @@
- mpfr_set_prec (x, prec);
- mpfr_set_prec (y, prec);
- mpfr_set_prec (z, prec);
-- mpfr_urandomb (x, RANDS);
-+ do
-+ mpfr_urandomb (x, RANDS);
-+ while (MPFR_IS_ZERO (x)); /* 0 is handled by mpfr_exp only */
- rnd = RND_RAND ();
- mpfr_exp_2 (y, x, rnd);
- mpfr_exp_3 (z, x, rnd);
-diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c
---- mpfr-3.0.1-a/version.c 2011-05-05 00:00:35.000000000 +0000
-+++ mpfr-3.0.1-b/version.c 2011-05-09 14:48:24.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.0.1-p3";
-+ return "3.0.1-p4";
- }
diff --git a/core/mpfr/mpfr-3.1.0.p1.patch b/core/mpfr/mpfr-3.1.0.p1.patch
new file mode 100644
index 000000000..437b1a278
--- /dev/null
+++ b/core/mpfr/mpfr-3.1.0.p1.patch
@@ -0,0 +1,50 @@
+diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
+--- mpfr-3.1.0-a/PATCHES 2011-10-05 21:39:57.000000000 +0000
++++ mpfr-3.1.0-b/PATCHES 2011-10-05 21:39:57.000000000 +0000
+@@ -0,0 +1 @@
++mpfr_unlikely
+diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
+--- mpfr-3.1.0-a/VERSION 2011-10-03 08:17:15.000000000 +0000
++++ mpfr-3.1.0-b/VERSION 2011-10-05 21:39:57.000000000 +0000
+@@ -1 +1 @@
+-3.1.0
++3.1.0-p1
+diff -Naurd mpfr-3.1.0-a/src/mpfr-impl.h mpfr-3.1.0-b/src/mpfr-impl.h
+--- mpfr-3.1.0-a/src/mpfr-impl.h 2011-10-03 08:17:09.000000000 +0000
++++ mpfr-3.1.0-b/src/mpfr-impl.h 2011-10-05 21:39:57.000000000 +0000
+@@ -988,10 +988,11 @@
+ ******************************************************/
+
+ /* Theses macros help the compiler to determine if a test is
+- * likely or unlikely. */
++ likely or unlikely. The !! is necessary in case x is larger
++ than a long. */
+ #if __MPFR_GNUC(3,0) || __MPFR_ICC(8,1,0)
+ # define MPFR_LIKELY(x) (__builtin_expect(!!(x),1))
+-# define MPFR_UNLIKELY(x) (__builtin_expect((x),0))
++# define MPFR_UNLIKELY(x) (__builtin_expect(!!(x),0))
+ #else
+ # define MPFR_LIKELY(x) (x)
+ # define MPFR_UNLIKELY(x) (x)
+diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
+--- mpfr-3.1.0-a/src/mpfr.h 2011-10-03 08:17:09.000000000 +0000
++++ mpfr-3.1.0-b/src/mpfr.h 2011-10-05 21:39:57.000000000 +0000
+@@ -27,7 +27,7 @@
+ #define MPFR_VERSION_MAJOR 3
+ #define MPFR_VERSION_MINOR 1
+ #define MPFR_VERSION_PATCHLEVEL 0
+-#define MPFR_VERSION_STRING "3.1.0"
++#define MPFR_VERSION_STRING "3.1.0-p1"
+
+ /* Macros dealing with MPFR VERSION */
+ #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
+--- mpfr-3.1.0-a/src/version.c 2011-10-03 08:17:09.000000000 +0000
++++ mpfr-3.1.0-b/src/version.c 2011-10-05 21:39:57.000000000 +0000
+@@ -25,5 +25,5 @@
+ const char *
+ mpfr_get_version (void)
+ {
+- return "3.1.0";
++ return "3.1.0-p1";
+ }
diff --git a/core/syslog-ng/PKGBUILD b/core/syslog-ng/PKGBUILD
index 8d048cac8..b83a5a570 100644
--- a/core/syslog-ng/PKGBUILD
+++ b/core/syslog-ng/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 131638 2011-07-13 03:09:27Z dreisner $
+# $Id: PKGBUILD 140503 2011-10-15 23:07:16Z dreisner $
# Maintainer: Dave Reisner <dreisner@archlinux.org>
# Maintainer: Eric Bélanger <eric@archlinux.org>
# Maintainer: Aaron Griffin <aaron@archlinux.org>
pkgname=syslog-ng
-pkgver=3.2.4
-pkgrel=3
+pkgver=3.3.1
+pkgrel=1
pkgdesc="Next-generation syslogd with advanced networking and filtering capabilities"
arch=('i686' 'x86_64' 'mips64el')
license=('GPL2')
@@ -18,49 +18,38 @@ provides=('logger')
options=('!libtool')
backup=('etc/syslog-ng/modules.conf' 'etc/syslog-ng/scl.conf' \
'etc/syslog-ng/syslog-ng.conf' 'etc/logrotate.d/syslog-ng')
-source=(http://www.balabit.com/downloads/files/syslog-ng/sources/${pkgver}/source/${pkgname}_${pkgver}.tar.gz
- non-blocking-systemd-fds.patch
- syslog-ng.conf syslog-ng.logrotate syslog-ng.rc cap_syslog.patch)
-md5sums=('5995f7dad0053a478b60a63f6f754203'
- '25e43afe51eb2223c25168e3c3e7aaf6'
- '344dddfff946300f5576b13a7e8ea19f'
- '735636090be4582885974542d2a75855'
- '8b4441343d859c2f01c2cf799a7e6f98'
- '46e5dcff71f820d497898331a3f608fe')
-sha1sums=('ff732f7223bd2bd0424d4b9028b523cf62133af1'
- '73b83deae9a8b945dfb13adf331e6bf6f119b83e'
- 'b9eb8c61f7cccda543fc5c97fe1d40a8d15e713f'
+source=("http://www.balabit.com/downloads/files/syslog-ng/sources/$pkgver/source/${pkgname}_$pkgver.tar.gz"
+ syslog-ng.conf
+ syslog-ng.logrotate
+ syslog-ng.rc)
+sha1sums=('f084d66754c7fa1eada56946f77ef3066faa27a1'
+ '98074e0facfc6ef036202662cc86d04b38a2c142'
'ac997b25d7d8e69e66782d3771a0e12aff55ae7f'
- '4481819762fd1b6f25903016a8878e63c0058fcb'
- 'f093a09626a528d23f0f2aeece018cab15a735a9')
+ 'a6ad26912b5bcbe1b47b003309945d733613b98f')
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd "$srcdir/$pkgname-$pkgver"
- # fix #22555 for kernels >=2.6.38
- patch -p1 -i ../cap_syslog.patch
-
- # fix systemd blocking FD bug
- # https://bugzilla.balabit.com/show_bug.cgi?id=125
- patch -Np1 < "$srcdir/non-blocking-systemd-fds.patch"
-
- ./configure --prefix=/usr --sysconfdir=/etc/syslog-ng \
- --libexecdir=/usr/lib --localstatedir=/var/lib/syslog-ng \
- --enable-tcp-wrapper \
- --with-pidfile-dir=/var/run \
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc/syslog-ng \
+ --libexecdir=/usr/lib \
+ --localstatedir=/var/lib/syslog-ng \
+ --with-pidfile-dir=/run \
--disable-spoof-source \
- --disable-tcp-wrapper \
- --enable-systemd
+ --enable-systemd \
+ --with-systemdsystemunitdir=/lib/systemd/system
make
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" install
- install -dm755 "${pkgdir}/var/lib/syslog-ng" "${pkgdir}/etc/syslog-ng/patterndb.d"
- install -Dm644 "${srcdir}/syslog-ng.conf" "${pkgdir}/etc/syslog-ng/syslog-ng.conf"
- install -Dm644 "${srcdir}/syslog-ng.logrotate" "${pkgdir}/etc/logrotate.d/syslog-ng"
- install -Dm755 "${srcdir}/syslog-ng.rc" "${pkgdir}/etc/rc.d/syslog-ng"
- install -Dm644 "doc/examples/syslog-ng.service" "$pkgdir/lib/systemd/system/syslog-ng.service"
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+
+ install -dm755 "$pkgdir/var/lib/syslog-ng" "$pkgdir/etc/syslog-ng/patterndb.d"
+ install -Dm644 "$srcdir/syslog-ng.conf" "$pkgdir/etc/syslog-ng/syslog-ng.conf"
+ install -Dm644 "$srcdir/syslog-ng.logrotate" "$pkgdir/etc/logrotate.d/syslog-ng"
+ install -Dm755 "$srcdir/syslog-ng.rc" "$pkgdir/etc/rc.d/syslog-ng"
}
diff --git a/core/syslog-ng/cap_syslog.patch b/core/syslog-ng/cap_syslog.patch
deleted file mode 100644
index b6e6db6e4..000000000
--- a/core/syslog-ng/cap_syslog.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-diff --git a/lib/gprocess.h b/lib/gprocess.h
-index cda35b0..5c449f7 100644
---- a/lib/gprocess.h
-+++ b/lib/gprocess.h
-@@ -28,9 +28,14 @@
- #include "syslog-ng.h"
-
- #include <sys/types.h>
-+#include <sys/utsname.h>
-
- #if ENABLE_LINUX_CAPS
- # include <sys/capability.h>
-+#
-+# ifndef CAP_SYSLOG
-+# define CAP_SYSLOG 34
-+# endif
- #endif
-
- typedef enum
-@@ -78,5 +83,8 @@ void g_process_finish(void);
-
- void g_process_add_option_group(GOptionContext *ctx);
-
-+extern int kernel_version;
-+extern void get_kernel_version(void);
-+#define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z)
-
- #endif
-diff --git a/modules/affile/affile.c b/modules/affile/affile.c
-index e145324..886fa72 100644
---- a/modules/affile/affile.c
-+++ b/modules/affile/affile.c
-@@ -59,7 +59,12 @@ affile_open_file(gchar *name, gint flags,
- if (privileged)
- {
- g_process_cap_modify(CAP_DAC_READ_SEARCH, TRUE);
-- g_process_cap_modify(CAP_SYS_ADMIN, TRUE);
-+ if (!kernel_version)
-+ get_kernel_version();
-+ if (kernel_version < LINUX_VERSION(2, 6, 38))
-+ g_process_cap_modify(CAP_SYS_ADMIN, TRUE);
-+ else
-+ g_process_cap_modify(CAP_SYSLOG, TRUE);
- }
- else
- {
-diff --git a/syslog-ng/main.c b/syslog-ng/main.c
-index 9880c1f..ee5031b 100644
---- a/syslog-ng/main.c
-+++ b/syslog-ng/main.c
-@@ -67,6 +67,7 @@ static gboolean syntax_only = FALSE;
- static gboolean display_version = FALSE;
- static gchar *ctlfilename = PATH_CONTROL_SOCKET;
- static gchar *preprocess_into = NULL;
-+int kernel_version;
-
- static volatile sig_atomic_t sig_hup_received = FALSE;
- static volatile sig_atomic_t sig_term_received = FALSE;
-@@ -363,6 +364,20 @@ version(void)
- ON_OFF_STR(ENABLE_PACCT_MODULE));
- }
-
-+void
-+get_kernel_version(void) {
-+ static struct utsname uts;
-+ int x = 0, y = 0, z = 0;
-+
-+ if (uname(&uts) == -1) {
-+ fprintf(stderr, "Unable to retrieve kernel version.\n");
-+ exit(1);
-+ }
-+
-+ sscanf(uts.release, "%d.%d.%d", &x, &y, &z);
-+ kernel_version = LINUX_VERSION(x, y, z);
-+}
-+
- int
- main(int argc, char *argv[])
- {
-@@ -379,9 +394,20 @@ main(int argc, char *argv[])
- * indicate readability. Enabling/disabling cap_sys_admin on every poll
- * invocation seems to be too expensive. So I enable it for now. */
-
-- g_process_set_caps("cap_net_bind_service,cap_net_broadcast,cap_net_raw,"
-+ if (!kernel_version)
-+ get_kernel_version();
-+ if (kernel_version < LINUX_VERSION(2, 6, 34))
-+ g_process_set_caps("cap_net_bind_service,cap_net_broadcast,cap_net_raw,"
- "cap_dac_read_search,cap_dac_override,cap_chown,cap_fowner=p "
- "cap_sys_admin=ep");
-+ else if (kernel_version < LINUX_VERSION(2, 6, 38))
-+ g_process_set_caps("cap_net_bind_service,cap_net_broadcast,cap_net_raw,"
-+ "cap_dac_read_search,cap_dac_override,cap_chown,cap_fowner,"
-+ "cap_sys_admin=p");
-+ else
-+ g_process_set_caps("cap_net_bind_service,cap_net_broadcast,cap_net_raw,"
-+ "cap_dac_read_search,cap_dac_override,cap_chown,cap_fowner,"
-+ "cap_syslog=p");
- ctx = g_option_context_new("syslog-ng");
- g_process_add_option_group(ctx);
- msg_add_option_group(ctx);
diff --git a/core/syslog-ng/non-blocking-systemd-fds.patch b/core/syslog-ng/non-blocking-systemd-fds.patch
deleted file mode 100644
index bd056088b..000000000
--- a/core/syslog-ng/non-blocking-systemd-fds.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 2f214c4f87d944aa28d53e331a67b1fd88d9840f Mon Sep 17 00:00:00 2001
-From: Balazs Scheidler <bazsi@balabit.hu>
-Date: Wed, 22 Jun 2011 12:50:53 +0200
-Subject: [PATCH] systemd: make sure the acquired fd is in non-blocking mode
-
-The fd acquired from systemd is in blocking mode, and syslog-ng
-didn't explicitly set it to non-blocking, causing syslog-ng
-to stall. This patch changes that, explicitly enables
-O_NONBLOCK and O_CLOEXEC on systemd acquired fds.
-
-Reported-By: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
-Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
----
- modules/afsocket/afunix.c | 2 ++
- 1 files changed, 2 insertions(+), 0 deletions(-)
-
-diff --git a/modules/afsocket/afunix.c b/modules/afsocket/afunix.c
-index cd9c205..9a4e37b 100644
---- a/modules/afsocket/afunix.c
-+++ b/modules/afsocket/afunix.c
-@@ -108,6 +108,8 @@ afunix_sd_acquire_socket(AFSocketSourceDriver *s, gint *result_fd)
-
- if (*result_fd != -1)
- {
-+ g_fd_set_nonblock(*result_fd, TRUE);
-+ g_fd_set_cloexec(*result_fd, TRUE);
- msg_verbose("Acquired systemd socket",
- evt_tag_str("filename", self->filename),
- evt_tag_int("systemd-sock-fd", *result_fd),
---
-1.7.5.4
-
diff --git a/core/syslog-ng/syslog-ng.conf b/core/syslog-ng/syslog-ng.conf
index 6e3362681..8f86eac2f 100644
--- a/core/syslog-ng/syslog-ng.conf
+++ b/core/syslog-ng/syslog-ng.conf
@@ -1,4 +1,4 @@
-@version: 3.2
+@version: 3.3
#
# /etc/syslog-ng/syslog-ng.conf
#
@@ -7,8 +7,8 @@ options {
stats_freq (0);
flush_lines (0);
time_reopen (10);
- log_fifo_size (1000);
- long_hostnames(off);
+ log_fifo_size (10000);
+ chain_hostnames (off);
use_dns (no);
use_fqdn (no);
create_dirs (no);
diff --git a/core/syslog-ng/syslog-ng.rc b/core/syslog-ng/syslog-ng.rc
index bb5320b2c..516b03da3 100755
--- a/core/syslog-ng/syslog-ng.rc
+++ b/core/syslog-ng/syslog-ng.rc
@@ -4,51 +4,55 @@
. /etc/rc.d/functions
checkconfig() {
- syslog-ng -s -f /etc/syslog-ng/syslog-ng.conf
- if [ $? -gt 0 ]; then
- stat_busy "Configuration error. Please fix your config file (/etc/syslog-ng/syslog-ng.conf)."
- stat_fail
- exit 0
- fi
+ if ! syslog-ng -s -f /etc/syslog-ng/syslog-ng.conf; then
+ stat_fail
+ exit 1
+ fi
}
-PID=`pidof -o %PPID /usr/sbin/syslog-ng`
-case "$1" in
+pidfile=/run/syslog-ng.pid
+if [[ -r $pidfile ]]; then
+ read -r PID < "$pidfile"
+ if [[ $PID && ! -d /proc/$PID ]]; then
+ # stale pidfile
+ unset PID
+ rm -f "$pidfile"
+ fi
+fi
+
+case $1 in
start)
stat_busy "Starting Syslog-NG"
checkconfig
- [ -z "$PID" ] && /usr/sbin/syslog-ng
- if [ $? -gt 0 ]; then
- stat_fail
- else
+ if [[ -z $PID ]] && /usr/sbin/syslog-ng; then
add_daemon syslog-ng
stat_done
+ else
+ stat_fail
+ exit 1
fi
;;
stop)
stat_busy "Stopping Syslog-NG"
- [ ! -z "$PID" ] && kill $PID &> /dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm -f /var/run/syslog-ng.pid
-# Removing stale syslog-ng.persist file. Its new location, as of 2.0.6-1, is /var/lib/syslog-ng/
- rm -f /var/syslog-ng.persist
+ if [[ $PID ]] && kill $PID &>/dev/null; then
rm_daemon syslog-ng
stat_done
+ else
+ stat_fail
+ exit 1
fi
;;
reload)
stat_busy "Reloading Syslog-NG configuration and re-opening log files"
- if [ -z "$PID" ]; then
+ if [[ -z $PID ]]; then
stat_fail
else
checkconfig
- kill -HUP $PID &> /dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
+ if kill -HUP $PID &>/dev/null; then
stat_done
+ else
+ stat_fail
+ exit 1
fi
fi
;;
@@ -58,6 +62,5 @@ case "$1" in
$0 start
;;
*)
- echo "usage: $0 {start|stop|restart|reload}"
+ echo "usage: $0 {start|stop|restart|reload}"
esac
-exit 0