From: Roy Marples Date: Tue, 1 May 2007 12:49:04 +0000 (+0000) Subject: Bump for a baselayout-2 compliant init script, #176661. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a63060905f8b73bb8f3004dc0e37a0566af476e6;p=gentoo.git Bump for a baselayout-2 compliant init script, #176661. Package-Manager: portage-2.1.2.5 --- 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 files/sysklogd.rc6, + +sysklogd-1.4.2_pre20061230-r1.ebuild: + Bump for a baselayout-2 compliant init script, #176661. 15 Apr 2007; Markus Rothe sysklogd-1.4.2_pre20061230.ebuild: diff --git a/app-admin/sysklogd/Manifest b/app-admin/sysklogd/Manifest index f9120e7f880e..2860bad04006 100644 --- a/app-admin/sysklogd/Manifest +++ b/app-admin/sysklogd/Manifest @@ -42,10 +42,10 @@ AUX sysklogd.confd 113 RMD160 08edc849adba1b6678832f50fb822b6338c464d5 SHA1 edb7 MD5 e25d7b583b7e4bd8be503b89e1771e90 files/sysklogd.confd 113 RMD160 08edc849adba1b6678832f50fb822b6338c464d5 files/sysklogd.confd 113 SHA256 11a1eeb9edd09639d5143227bada137945822b23c5abb88fec5ebaef064b991d files/sysklogd.confd 113 -AUX sysklogd.rc6 1893 RMD160 a2313dd72487cf8a24b7aee9525c47074a54d034 SHA1 f531b40aa598c183cdbfc391aeba94b28ad5520b SHA256 8e7c01655444ee08145904febdb79ceb0481de4e4489990bbb6cb65f4ec85047 -MD5 076b94f99cc06543e18693ca3d8de4fd files/sysklogd.rc6 1893 -RMD160 a2313dd72487cf8a24b7aee9525c47074a54d034 files/sysklogd.rc6 1893 -SHA256 8e7c01655444ee08145904febdb79ceb0481de4e4489990bbb6cb65f4ec85047 files/sysklogd.rc6 1893 +AUX sysklogd.rc6 1575 RMD160 963226c78967f912735d9fc32945d71a9fcae04e SHA1 e37b494fa7580c7035784cb7e9193e5310eedc4c SHA256 d62ddc4d2750dca70c577f497bde69e30d9d258f709326aa4ecb8d75995f78a9 +MD5 da768a0350dc51b947ee50d292736428 files/sysklogd.rc6 1575 +RMD160 963226c78967f912735d9fc32945d71a9fcae04e files/sysklogd.rc6 1575 +SHA256 d62ddc4d2750dca70c577f497bde69e30d9d258f709326aa4ecb8d75995f78a9 files/sysklogd.rc6 1575 AUX syslog-cron 701 RMD160 d05e3345a59b96ab1446be171c0300fba7b2ca00 SHA1 550b238d5925bfe18221b49417c3e3fa2848e480 SHA256 97f22ed6ef785d396dcf0f67df43af30457f9155fc21a973f48b50b4981f4c74 MD5 ed1fec7ebbb4eb91447909e972f1a224 files/syslog-cron 701 RMD160 d05e3345a59b96ab1446be171c0300fba7b2ca00 files/syslog-cron 701 @@ -73,14 +73,18 @@ EBUILD sysklogd-1.4.2_pre20051017.ebuild 2016 RMD160 9d6b5b8dbdb9184a16085ea8220 MD5 945242f3601d1c73fcb04c724ff92638 sysklogd-1.4.2_pre20051017.ebuild 2016 RMD160 9d6b5b8dbdb9184a16085ea8220452eedb1b44a4 sysklogd-1.4.2_pre20051017.ebuild 2016 SHA256 93b3bcf34ccb58f0dac41c190034f674c5442c74600326ba6a29eec8c8790bc4 sysklogd-1.4.2_pre20051017.ebuild 2016 +EBUILD sysklogd-1.4.2_pre20061230-r1.ebuild 1819 RMD160 18bbc6859a62dfde7044e46ddb86ad7fe6cf1163 SHA1 67d3786ce46cdb77c4d7f9de3bad360fb220aa4a SHA256 36ec97a6728e09f474f3b28997734a6bcf1afcafd1d84dd3247b9264c840b5ec +MD5 75840fa52269713dfdc9036bd201901b sysklogd-1.4.2_pre20061230-r1.ebuild 1819 +RMD160 18bbc6859a62dfde7044e46ddb86ad7fe6cf1163 sysklogd-1.4.2_pre20061230-r1.ebuild 1819 +SHA256 36ec97a6728e09f474f3b28997734a6bcf1afcafd1d84dd3247b9264c840b5ec sysklogd-1.4.2_pre20061230-r1.ebuild 1819 EBUILD sysklogd-1.4.2_pre20061230.ebuild 1816 RMD160 33d8243d9de81c428e8336fcb6b2c2bb4a78e7f3 SHA1 7e297f4a3c3ae9b6fd247ccaf6c98ea8a231540d SHA256 bbf95787b09202ef074780968f26aaf476e6f6a528783caa0f4763d7930038dc MD5 874060f2420558f0454e224d94eef883 sysklogd-1.4.2_pre20061230.ebuild 1816 RMD160 33d8243d9de81c428e8336fcb6b2c2bb4a78e7f3 sysklogd-1.4.2_pre20061230.ebuild 1816 SHA256 bbf95787b09202ef074780968f26aaf476e6f6a528783caa0f4763d7930038dc sysklogd-1.4.2_pre20061230.ebuild 1816 -MISC ChangeLog 9046 RMD160 d6f10eeb58c7e099353de6a690fbc41034806043 SHA1 c8b2fd3b2bbb948d37f42d6a92018bf3b41b114d SHA256 d33bc58d2fb20aa2c87ccf7bfbc1220ab70c7650f2c6d62befb2b84d90023df9 -MD5 931325d822c5e70a3fb9570349308e64 ChangeLog 9046 -RMD160 d6f10eeb58c7e099353de6a690fbc41034806043 ChangeLog 9046 -SHA256 d33bc58d2fb20aa2c87ccf7bfbc1220ab70c7650f2c6d62befb2b84d90023df9 ChangeLog 9046 +MISC ChangeLog 9262 RMD160 bf07a17a8ce22b052ad5e5a58dd037c3ef68e4af SHA1 f1aff7e407b392d032e06fd66000693cfacec9c2 SHA256 14fd37384005fd9e2e08d05c8bf96f930a4c2701bcaefad7b97fccdbc51b7f19 +MD5 a6131af1cd4f627998b3d48e930309e5 ChangeLog 9262 +RMD160 bf07a17a8ce22b052ad5e5a58dd037c3ef68e4af ChangeLog 9262 +SHA256 14fd37384005fd9e2e08d05c8bf96f930a4c2701bcaefad7b97fccdbc51b7f19 ChangeLog 9262 MISC metadata.xml 165 RMD160 84307ea324cd4f0f46d52f2fa096a1873e2fbe53 SHA1 c7b83ef947fe7e8273cc512fee9bba06586a58f9 SHA256 23a8851c12bd4cf7cf0528250ad5605be6b0780bbec0c51331d6d2c618c13f6a MD5 6fe58567b648100d4ff11902921b6889 metadata.xml 165 RMD160 84307ea324cd4f0f46d52f2fa096a1873e2fbe53 metadata.xml 165 @@ -94,3 +98,6 @@ SHA256 f3786d59d56ab6eb740c66411c2dc2430628527c613e58f9904a0b2abd5c45c0 files/di MD5 2212b78743454390818dd85c9c162a15 files/digest-sysklogd-1.4.2_pre20061230 530 RMD160 1bbbbc7ff6ebb34c30041a2b3544f39048ffdf04 files/digest-sysklogd-1.4.2_pre20061230 530 SHA256 65b541b12c517c56b5377ad827e2162c786179e6d195de832f3da4737aa7615a files/digest-sysklogd-1.4.2_pre20061230 530 +MD5 2212b78743454390818dd85c9c162a15 files/digest-sysklogd-1.4.2_pre20061230-r1 530 +RMD160 1bbbbc7ff6ebb34c30041a2b3544f39048ffdf04 files/digest-sysklogd-1.4.2_pre20061230-r1 530 +SHA256 65b541b12c517c56b5377ad827e2162c786179e6d195de832f3da4737aa7615a files/digest-sysklogd-1.4.2_pre20061230-r1 530 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 +}