summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-05-01 12:49:04 +0000
committerRoy Marples <uberlord@gentoo.org>2007-05-01 12:49:04 +0000
commit3c20c11b43b7c0af2594bc4303d6086d1c63fe96 (patch)
tree2205cdd9948d765a8de47dcb68004dd8807c2aab /app-admin
parentVersion bump. Clean up. (diff)
downloadgentoo-2-3c20c11b43b7c0af2594bc4303d6086d1c63fe96.tar.gz
gentoo-2-3c20c11b43b7c0af2594bc4303d6086d1c63fe96.tar.bz2
gentoo-2-3c20c11b43b7c0af2594bc4303d6086d1c63fe96.zip
Bump for a baselayout-2 compliant init script, #176661.
(Portage version: 2.1.2.5)
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/sysklogd/ChangeLog8
-rw-r--r--app-admin/sysklogd/files/digest-sysklogd-1.4.2_pre20061230-r16
-rw-r--r--app-admin/sysklogd/files/sysklogd.rc662
-rw-r--r--app-admin/sysklogd/sysklogd-1.4.2_pre20061230-r1.ebuild65
4 files changed, 99 insertions, 42 deletions
diff --git a/app-admin/sysklogd/ChangeLog b/app-admin/sysklogd/ChangeLog
index 29814efedad2..8c40aca23e36 100644
--- a/app-admin/sysklogd/ChangeLog
+++ b/app-admin/sysklogd/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-admin/sysklogd
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/sysklogd/ChangeLog,v 1.61 2007/04/15 19:42:35 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/sysklogd/ChangeLog,v 1.62 2007/05/01 12:49:04 uberlord Exp $
+
+*sysklogd-1.4.2_pre20061230-r1 (01 May 2007)
+
+ 01 May 2007; Roy Marples <uberlord@gentoo.org> files/sysklogd.rc6,
+ +sysklogd-1.4.2_pre20061230-r1.ebuild:
+ Bump for a baselayout-2 compliant init script, #176661.
15 Apr 2007; Markus Rothe <corsair@gentoo.org>
sysklogd-1.4.2_pre20061230.ebuild:
diff --git a/app-admin/sysklogd/files/digest-sysklogd-1.4.2_pre20061230-r1 b/app-admin/sysklogd/files/digest-sysklogd-1.4.2_pre20061230-r1
new file mode 100644
index 000000000000..c4359b3d0a05
--- /dev/null
+++ b/app-admin/sysklogd/files/digest-sysklogd-1.4.2_pre20061230-r1
@@ -0,0 +1,6 @@
+MD5 c3f301297d5b9d40f87e4157653650a4 sysklogd-1.4.1-cvs-20061230.patch.bz2 12584
+RMD160 50dd59916af80b84618b98229cfafc21b547d2c0 sysklogd-1.4.1-cvs-20061230.patch.bz2 12584
+SHA256 4ca2fd34dacd1c10018b6a786c24faa392d6fef57607e240e3bcaf925231e2b2 sysklogd-1.4.1-cvs-20061230.patch.bz2 12584
+MD5 d214aa40beabf7bdb0c9b3c64432c774 sysklogd-1.4.1.tar.gz 81784
+RMD160 5e60f1294c45932915a3dcd1018cdc02d005a3e0 sysklogd-1.4.1.tar.gz 81784
+SHA256 44357e0fae8c8f0e315bf130b4e86a4f96b91d66eeb4e473def4ce8336fff102 sysklogd-1.4.1.tar.gz 81784
diff --git a/app-admin/sysklogd/files/sysklogd.rc6 b/app-admin/sysklogd/files/sysklogd.rc6
index 375ba8b87f73..ad817742529b 100644
--- a/app-admin/sysklogd/files/sysklogd.rc6
+++ b/app-admin/sysklogd/files/sysklogd.rc6
@@ -1,12 +1,10 @@
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/app-admin/sysklogd/files/sysklogd.rc6,v 1.11 2006/05/25 00:54:56 merlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/sysklogd/files/sysklogd.rc6,v 1.12 2007/05/01 12:49:04 uberlord Exp $
opts="reload"
-opts="start stop reload restart"
-
depend() {
need clock hostname
provide logger
@@ -14,15 +12,14 @@ depend() {
start_daemon() {
local retval=0
- local daemon=$1
- local options=$2
+ local daemon="$1"
+ local options="$2"
- [[ -z ${daemon} ]] && return 1
- [[ -n ${options} ]] && options="-- ${options}"
+ [ -z "${daemon}" ] && return 1
ebegin "sysklogd -> start: ${daemon}"
- start-stop-daemon --start --quiet --background \
- --exec /usr/sbin/${daemon} ${options}
+ start-stop-daemon --start --exec /usr/sbin/"${daemon}" \
+ --pidfile /var/run/"${daemon}".pid -- ${options}
retval=$?
eend ${retval} "Failed to start ${daemon}"
@@ -31,21 +28,13 @@ start_daemon() {
stop_daemon() {
local retval=0
- local daemon=$1
-
- [[ -z ${daemon} ]] && return 1
+ local daemon="$1"
-
-reload(){
- ebegin "Reloading configuration"
- killall -HUP syslogd &>/dev/null
- killall -USR2 klogd &> /dev/null
- eend $?
-}
+ [ -z "${daemon}" ] && return 1
+
ebegin "sysklogd -> stop: ${daemon}"
# syslogd can be stubborn some times (--retry 15)...
- start-stop-daemon --stop --oknodo --retry 15 \
- --quiet --pidfile /var/run/${daemon}.pid
+ start-stop-daemon --stop --retry 15 --quiet --pidfile /var/run/"${daemon}".pid
retval=$?
eend ${retval} "Failed to stop ${daemon}"
@@ -58,38 +47,29 @@ start() {
# klogd do not always start proper if started too early
sleep 1
- start_daemon "klogd" "${KLOGD}" || {
- if [[ -n $(pidof syslogd) ]] ; then
- stop_daemon "syslogd"
- fi
+ if ! start_daemon "klogd" "${KLOGD}" ; then
+ stop_daemon "syslogd"
return 1
- }
+ fi
return 0
}
stop() {
stop_daemon "klogd" || return 1
-
- # Give klogd time to stop
- sleep 1
-
- stop_daemon "syslogd" || {
- if [[ -n $(pidof syslogd) ]] ; then
- # Not sure if we should really try to start
- # klogd again ...
- start_daemon "klogd" "${KLOGD}"
- fi
- return 1
- }
-
+ stop_daemon "syslogd" || return 1
return 0
}
reload() {
local ret=0
+
ebegin "Reloading configuration"
- killall -HUP syslogd &> /dev/null ; ret=$((ret+$?))
- killall -USR2 klogd &> /dev/null ; ret=$((ret+$?))
+
+ start-stop-daemon --stop --oknodo --signal HUP --pidfile /var/run/syslogd.pid
+ ret=$((${ret} + $?))
+ start-stop-daemon --stop --oknodo --signal USR1 --pidfile /var/run/klogd.pid
+ ret=$((${ret} + $?))
+
eend ${ret}
}
diff --git a/app-admin/sysklogd/sysklogd-1.4.2_pre20061230-r1.ebuild b/app-admin/sysklogd/sysklogd-1.4.2_pre20061230-r1.ebuild
new file mode 100644
index 000000000000..75671c341045
--- /dev/null
+++ b/app-admin/sysklogd/sysklogd-1.4.2_pre20061230-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/sysklogd/sysklogd-1.4.2_pre20061230-r1.ebuild,v 1.1 2007/05/01 12:49:04 uberlord Exp $
+
+inherit eutils flag-o-matic
+
+CVS_DATE=${PV#*_pre}
+MY_P=${PN}-1.4.1
+
+DESCRIPTION="Standard log daemons"
+HOMEPAGE="http://www.infodrom.org/projects/sysklogd/"
+SRC_URI="ftp://metalab.unc.edu/pub/Linux/system/daemons/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-cvs-${CVS_DATE}.patch.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86"
+IUSE=""
+RESTRICT="test"
+
+DEPEND=""
+RDEPEND="dev-lang/perl
+ sys-apps/debianutils"
+PROVIDE="virtual/logger"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${WORKDIR}"/${MY_P}-cvs-${CVS_DATE}.patch
+
+ epatch "${FILESDIR}"/${MY_P}-accept.patch
+ epatch "${FILESDIR}"/${MY_P}-querymod.patch
+ epatch "${FILESDIR}"/${MY_P}-punt-SO_BSDCOMPAT.patch
+ epatch "${FILESDIR}"/${MY_P}-ksym-headers.patch
+
+ # CAEN/OWL security patches
+ epatch "${FILESDIR}"/${MY_P}-caen-owl-syslogd-bind.diff
+ epatch "${FILESDIR}"/${MY_P}-caen-owl-syslogd-drop-root.diff
+ epatch "${FILESDIR}"/${MY_P}-caen-owl-klogd-drop-root.diff
+
+ append-lfs-flags
+ sed -i \
+ -e "s:-O3:${CFLAGS}:" \
+ Makefile || die "sed CFLAGS"
+}
+
+src_compile() {
+ emake LDFLAGS="${LDFLAGS}" || die
+}
+
+src_install() {
+ dosbin syslogd klogd "${FILESDIR}"/syslogd-listfiles || die "dosbin"
+ doman *.[1-9] "${FILESDIR}"/syslogd-listfiles.8
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/syslog-cron syslog.cron
+ dodoc ANNOUNCE CHANGES MANIFEST NEWS README.1st README.linux
+ dodoc "${FILESDIR}"/syslog.conf
+ insinto /etc
+ doins "${FILESDIR}"/syslog.conf
+ newinitd "${FILESDIR}"/sysklogd.rc6 sysklogd
+ newconfd "${FILESDIR}"/sysklogd.confd sysklogd
+}