ntpd now uses start-stop-daemon correctly.
Package-Manager: portage-2.1.2-r10
# ChangeLog for net-misc/ntp
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ChangeLog,v 1.91 2007/01/09 17:51:14 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ChangeLog,v 1.92 2007/02/23 11:26:26 uberlord Exp $
+
+*ntp-4.2.4-r1 (23 Feb 2007)
+
+ 23 Feb 2007; Roy Marples <uberlord@gentoo.org> files/ntp-client.rc,
+ files/ntpd.rc, +ntp-4.2.4-r1.ebuild:
+ Bump for non bash init scripts.
+ ntpd now uses start-stop-daemon correctly.
09 Jan 2007; Mike Frysinger <vapier@gentoo.org> files/ntp-client.confd,
files/ntp-client.rc, ntp-4.2.2_p3.ebuild, ntp-4.2.2_p4.ebuild,
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
AUX ntp-client.confd 542 RMD160 56a97ff793cafdc125150603332e7853689f2af7 SHA1 539bddeae804dfaf0bad9e57518ec238f268bbfd SHA256 dfff01e422d59081e2f09606163f5853009b1b41120748f5205023ac7579322d
MD5 499bd9dde3ba3550aec376984ffa448c files/ntp-client.confd 542
RMD160 56a97ff793cafdc125150603332e7853689f2af7 files/ntp-client.confd 542
SHA256 dfff01e422d59081e2f09606163f5853009b1b41120748f5205023ac7579322d files/ntp-client.confd 542
-AUX ntp-client.rc 833 RMD160 93c622ce79a180276c5a02c4e093884cf204f2c2 SHA1 b8557a790fa1fa251855e5b5a86c0ca6138c70ab SHA256 e24cb73c0cdf7c181c4c60f196ba79c5fbbb95888d57f4cbbd61086c163732d1
-MD5 e02867c7adb601efab9ffacfc90c47f8 files/ntp-client.rc 833
-RMD160 93c622ce79a180276c5a02c4e093884cf204f2c2 files/ntp-client.rc 833
-SHA256 e24cb73c0cdf7c181c4c60f196ba79c5fbbb95888d57f4cbbd61086c163732d1 files/ntp-client.rc 833
+AUX ntp-client.rc 848 RMD160 be6ac12fa0ef0b0ffe0c8b98aa967cc1c27bc29f SHA1 e4fc038e777d42762b8954b8fee141afb023e3fd SHA256 9eb4c20a21adfa365b43300f020433fda76bacd6e5341807d42631d5bf428d3e
+MD5 75ca5b7137602ac39c1e95577add0535 files/ntp-client.rc 848
+RMD160 be6ac12fa0ef0b0ffe0c8b98aa967cc1c27bc29f files/ntp-client.rc 848
+SHA256 9eb4c20a21adfa365b43300f020433fda76bacd6e5341807d42631d5bf428d3e files/ntp-client.rc 848
AUX ntp.conf 1451 RMD160 530166d0908cbe0a812cb3b5d5d59b8e1d8457c5 SHA1 3625ed2aa71d9e0dd04634f32e65d83b76cfe780 SHA256 4dd53d6c91aa7680b8e9d9f3fd9f2406463286377a2864ddfc7c005f9928f500
MD5 5bd3924f5720b97837969ec4ec4d5e09 files/ntp.conf 1451
RMD160 530166d0908cbe0a812cb3b5d5d59b8e1d8457c5 files/ntp.conf 1451
MD5 5e1591f145a63cf66ee20ab65495781a files/ntpd.confd 189
RMD160 f66902d8abf5180ac8cc24646d665597cec8ba43 files/ntpd.confd 189
SHA256 a3bc17ee0f7d41102d6c33e4281e22d312a42cc2ffd8848b08e9cd78d63f2d05 files/ntpd.confd 189
-AUX ntpd.rc 805 RMD160 5b8ab5a48bca9bdc8052d07092ecdda1a21f9c5b SHA1 1708ff0dbd6024c38863fb8dd788aabf44d08ca2 SHA256 26fe2367fc969cc0f7dc150d7ec218fef1e316eb0d72715e6f59344fe154673e
-MD5 299ea30653b1e0b93d51f19e07176bc4 files/ntpd.rc 805
-RMD160 5b8ab5a48bca9bdc8052d07092ecdda1a21f9c5b files/ntpd.rc 805
-SHA256 26fe2367fc969cc0f7dc150d7ec218fef1e316eb0d72715e6f59344fe154673e files/ntpd.rc 805
+AUX ntpd.rc 827 RMD160 b7155fb342453a108b7f6f3a89f0d01eda27fe57 SHA1 f2acf5591a991d5c448a2e714c90cd64ced9381c SHA256 3f1e27310bf09df5931cb4b3bac48b6b68b1a8b5a5db27db0953701fe97c66a5
+MD5 41b549e95a6201dce6229fd01070ffc1 files/ntpd.rc 827
+RMD160 b7155fb342453a108b7f6f3a89f0d01eda27fe57 files/ntpd.rc 827
+SHA256 3f1e27310bf09df5931cb4b3bac48b6b68b1a8b5a5db27db0953701fe97c66a5 files/ntpd.rc 827
DIST ntp-4.2.2p3-manpages.tar.bz2 48839 RMD160 ef4a57738db9978ba55d287795d866dad305bc38 SHA1 93a37e902fb1c1407dc72cfc3a0b319ecaa2f09d SHA256 c079192a64923de60d46a06f6e9c13aa6bd16f332deb287899e5f4286239ab90
DIST ntp-4.2.2p3.tar.gz 2563397 RMD160 fb377b5e7a561bca172e9ba71288a691c5f40f5e SHA1 3cbeea0c65e5346661301832c0484dfbf7395714 SHA256 385a606007eb14f5847f033ac6fa8ea48366597ad1f93aa99864e1f82e23ac88
DIST ntp-4.2.2p4-manpages.tar.bz2 48792 RMD160 f87e58acdd7c7d3ef2bc3e008f605a4ef4a94317 SHA1 3f451d3dad5b92dea91f8d3c550d6f8d36d840c6 SHA256 d0a127935129d68ca8192ae8c1879fd71b48bef559aa2cf3d795b49e3d08a079
MD5 f6029ff6a814add04ef20430aa1ceddb ntp-4.2.2_p4.ebuild 3826
RMD160 e654dd8831545dd73fbf202927be443a2cfe336c ntp-4.2.2_p4.ebuild 3826
SHA256 203168b1d78ed3a0ac0618ae72a89be678e15b0b6e3cae67447a6109405f5d1c ntp-4.2.2_p4.ebuild 3826
+EBUILD ntp-4.2.4-r1.ebuild 3833 RMD160 78179fcae9b5967b1f5fd8e9b969b417f6d5cac3 SHA1 d2b6ab8a2701db251bc2de0f9dc389ca087a9069 SHA256 577c04c445c0ddab3731cf4971e633e73970f4acf243d42446b5d9ce7c94698f
+MD5 6245545c43bd1114c8891073a229c214 ntp-4.2.4-r1.ebuild 3833
+RMD160 78179fcae9b5967b1f5fd8e9b969b417f6d5cac3 ntp-4.2.4-r1.ebuild 3833
+SHA256 577c04c445c0ddab3731cf4971e633e73970f4acf243d42446b5d9ce7c94698f ntp-4.2.4-r1.ebuild 3833
EBUILD ntp-4.2.4.ebuild 3828 RMD160 16f3a64bf70d764762ed6d98bdfff3ea34bd6a07 SHA1 388fd907ac310547f3a669e23fa3d389ebd4ce35 SHA256 495a84862be5a609e7e5f0c46b7e6fad88a09b8e9694d14138043c35a7458043
MD5 7820cb533679dbba167f348cd7a2f7cd ntp-4.2.4.ebuild 3828
RMD160 16f3a64bf70d764762ed6d98bdfff3ea34bd6a07 ntp-4.2.4.ebuild 3828
SHA256 495a84862be5a609e7e5f0c46b7e6fad88a09b8e9694d14138043c35a7458043 ntp-4.2.4.ebuild 3828
-MISC ChangeLog 13580 RMD160 4ab48e0679672fd0a85dce763445f5ecef77798e SHA1 cdd5c7333304ab0cd96879a37e55098669081029 SHA256 c9200dd5027550642596483425961984d9a8191da831f838e3b158368bcdd348
-MD5 ed38dba20ff7a466c24a8067cb9513d8 ChangeLog 13580
-RMD160 4ab48e0679672fd0a85dce763445f5ecef77798e ChangeLog 13580
-SHA256 c9200dd5027550642596483425961984d9a8191da831f838e3b158368bcdd348 ChangeLog 13580
+MISC ChangeLog 13800 RMD160 c8ab7f18418de1b8bbbec5d3040ac06d7ada2695 SHA1 a01bcb3f963adeb5db11e8bede4d7e1a92e4754f SHA256 b32d329a4a437ec797f9ffefdd87e8196d03292e50a6e1a463b51c89b24bf1c3
+MD5 cc99c7d586f43171e9cb71b0c4cf6047 ChangeLog 13800
+RMD160 c8ab7f18418de1b8bbbec5d3040ac06d7ada2695 ChangeLog 13800
+SHA256 b32d329a4a437ec797f9ffefdd87e8196d03292e50a6e1a463b51c89b24bf1c3 ChangeLog 13800
MISC metadata.xml 607 RMD160 f005595b482e97659d0dc42cf0af1c56d88ec3a7 SHA1 67aab04a0a7021caf7a78d9094315f3595f47409 SHA256 14dc7da8f6d0ccaafa8408e289acd1a23f7adff23ef45c2fdd0d8b89d97d0222
MD5 8d52071ded7c5d37f4823ac9a4fffb8e metadata.xml 607
RMD160 f005595b482e97659d0dc42cf0af1c56d88ec3a7 metadata.xml 607
MD5 e39395059089848ec999738d8e9a6bca files/digest-ntp-4.2.4 488
RMD160 47cc46be562bc1226f5aa5b5c0c75473c2cb2d5b files/digest-ntp-4.2.4 488
SHA256 0712d606ca90d45e71dd9b4cf2a675cbf6939f08d965c5fdd0e0cb7799098d0e files/digest-ntp-4.2.4 488
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.1 (GNU/Linux)
-
-iD8DBQFFo9YZ8bi6rjpTunYRAnQUAJ9R8adtXrJH0n3oLBo9vQzgiZvp9gCgi00/
-lei5qRJLDVFmZjPSW69Wxvo=
-=aIHE
------END PGP SIGNATURE-----
+MD5 e39395059089848ec999738d8e9a6bca files/digest-ntp-4.2.4-r1 488
+RMD160 47cc46be562bc1226f5aa5b5c0c75473c2cb2d5b files/digest-ntp-4.2.4-r1 488
+SHA256 0712d606ca90d45e71dd9b4cf2a675cbf6939f08d965c5fdd0e0cb7799098d0e files/digest-ntp-4.2.4-r1 488
--- /dev/null
+MD5 7634518362dff8528c6527646885d96e ntp-4.2.4-manpages.tar.bz2 49084
+RMD160 a0f58094502b309e777b0e227f8e8b0c316f6c26 ntp-4.2.4-manpages.tar.bz2 49084
+SHA256 47daa90cec64bb1796f2194732972ee94947c64e64e571b27d2b77b3741991d6 ntp-4.2.4-manpages.tar.bz2 49084
+MD5 eb9147d26cbe18bd8fbec07f1df55aef ntp-4.2.4.tar.gz 3417698
+RMD160 bd51211582958f7c7d14ecd5ba04f5815bdc7ef8 ntp-4.2.4.tar.gz 3417698
+SHA256 a8adc8134d692273673559da3a4181e12cfb166f2177c726f916d4a9ff18182f ntp-4.2.4.tar.gz 3417698
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntp-client.rc,v 1.9 2007/01/09 17:51:14 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntp-client.rc,v 1.10 2007/02/23 11:26:26 uberlord Exp $
depend() {
before cron portmap
}
checkconfig() {
- if ! type -p ${NTPCLIENT_CMD} > /dev/null ; then
+ if ! type "${NTPCLIENT_CMD}" >/dev/null 2>/dev/null ; then
eerror "Please edit /etc/conf.d/ntp-client"
eerror "Unable to locate the client command ${NTPCLIENT_CMD}!"
return 1
fi
- if [[ -z ${NTPCLIENT_OPTS} ]] ; then
+ if [ -z "${NTPCLIENT_OPTS}" ] ; then
eerror "Please edit /etc/conf.d/ntp-client"
eerror "I need to know what server/options to use!"
return 1
checkconfig || return $?
ebegin "Setting clock via the NTP client '${NTPCLIENT_CMD}'"
- ${NTPCLIENT_CMD} ${NTPCLIENT_OPTS} >/dev/null &
+ "${NTPCLIENT_CMD}" ${NTPCLIENT_OPTS} >/dev/null &
eend $? "Failed to set clock"
}
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd.rc,v 1.22 2005/08/20 04:10:15 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd.rc,v 1.23 2007/02/23 11:26:26 uberlord Exp $
depend() {
need net
checkconfig || return $?
ebegin "Starting ntpd"
- /usr/sbin/ntpd -p /var/run/ntpd.pid ${NTPD_OPTS}
+ start-stop-daemon --start --exec /usr/sbin/ntpd \
+ --pidfile /var/run/ntpd.pid \
+ -- -p /var/run/ntpd.pid ${NTPD_OPTS}
eend $? "Failed to start ntpd"
}
start-stop-daemon --stop \
--pidfile /var/run/ntpd.pid \
--exec /usr/sbin/ntpd
- local ret=$?
- eend ${ret} "Failed to stop ntpd"
- rm -f /var/run/ntpd.pid
- return ${ret}
+ eend $? "Failed to stop ntpd"
}
--- /dev/null
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.2.4-r1.ebuild,v 1.1 2007/02/23 11:26:26 uberlord Exp $
+
+inherit eutils toolchain-funcs
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-manpages.tar.bz2"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="parse-clocks caps selinux ssl ipv6 debug openntpd"
+
+RDEPEND=">=sys-libs/ncurses-5.2
+ >=sys-libs/readline-4.1
+ kernel_linux? ( caps? ( sys-libs/libcap ) )
+ !openntpd? ( !net-misc/openntpd )
+ ssl? ( dev-libs/openssl )
+ selinux? ( sec-policy/selinux-ntp )"
+DEPEND="${RDEPEND}
+ >=sys-apps/portage-2.0.51"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S=${WORKDIR}/${MY_P}
+
+hax_bitkeeper() {
+ # the makefiles have support for bk ...
+ # basically we have to do this or bk will try to write
+ # to files in /opt/bitkeeper causing sandbox violations ;(
+ mkdir "${T}"/fakebin
+ echo "#!/bin/sh"$'\n'"exit 1" > "${T}"/fakebin/bk
+ chmod a+x "${T}"/fakebin/bk
+ export PATH="${T}/fakebin:${PATH}"
+}
+
+pkg_setup() {
+ enewgroup ntp 123
+ enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Needs to be ported ...
+ #epatch "${FILESDIR}"/4.2.0.20040617-hostname.patch
+
+ sed -i \
+ -e 's:md5\.h:touch_not_my_md5:g' \
+ -e 's:-lelf:-la_doe_a_deer_a_female_deer:g' \
+ -e 's:-lmd5:-li_dont_want_no_stinkin_md5:g' \
+ configure || die "sed failed"
+}
+
+src_compile() {
+ hax_bitkeeper
+ econf \
+ $(use_enable caps linuxcaps) \
+ $(use_enable parse-clocks) \
+ $(use_enable ipv6) \
+ $(use_enable debug debugging) \
+ $(use_with ssl crypto) \
+ || die
+ emake || die
+}
+
+src_install() {
+ hax_bitkeeper
+ emake install DESTDIR="${D}" || die "install failed"
+ # move ntpd/ntpdate to sbin #66671
+ dodir /usr/sbin
+ mv "${D}"/usr/bin/{ntpd,ntpdate} "${D}"/usr/sbin/ || die "move to sbin"
+
+ dodoc ChangeLog INSTALL NEWS README TODO WHERE-TO-START
+ doman "${WORKDIR}"/man/*.[58]
+ dohtml -r html/*
+
+ insinto /usr/share/ntp
+ doins "${FILESDIR}"/ntp.conf
+ cp -r scripts/* "${D}"/usr/share/ntp/
+ chmod -R go-w "${D}"/usr/share/ntp
+ find "${D}"/usr/share/ntp \
+ '(' \
+ -name '*.in' -o \
+ -name 'Makefile*' -o \
+ -name 'rc[12]' -o \
+ -name support \
+ ')' \
+ -exec rm -r {} \;
+
+ insinto /etc
+ doins "${FILESDIR}"/ntp.conf
+ newinitd "${FILESDIR}"/ntpd.rc ntpd
+ newconfd "${FILESDIR}"/ntpd.confd ntpd
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+ use caps || dosed "s|-u ntp:ntp||" /etc/conf.d/ntpd
+ dosed "s:/usr/bin:/usr/sbin:" /etc/init.d/ntpd
+
+ keepdir /var/lib/ntp
+ fowners ntp:ntp /var/lib/ntp
+
+ if use openntpd ; then
+ cd "${D}"
+ rm usr/sbin/ntpd || die
+ rm -r var/lib
+ rm etc/{conf,init}.d/ntpd
+ rm usr/share/man/*/ntpd.8 || die
+ fi
+}
+
+pkg_preinst() {
+ if [[ -e ${ROOT}/etc/ntp.conf ]] ; then
+ rm -f "${D}"/etc/ntp.conf
+ fi
+}
+
+pkg_postinst() {
+ ewarn "You can find an example /etc/ntp.conf in /usr/share/ntp/"
+ ewarn "Review /etc/ntp.conf to setup server info."
+ ewarn "Review /etc/conf.d/ntpd to setup init.d info."
+ echo
+ einfo "The way ntp sets and maintains your system time has changed."
+ einfo "Now you can use /etc/init.d/ntp-client to set your time at"
+ einfo "boot while you can use /etc/init.d/ntpd to maintain your time"
+ einfo "while your machine runs"
+ if [[ -n $(egrep '^[^#].*notrust' "${ROOT}"/etc/ntp.conf) ]] ; then
+ echo
+ eerror "The notrust option was found in your /etc/ntp.conf!"
+ ewarn "If your ntpd starts sending out weird responses,"
+ ewarn "then make sure you have keys properly setup and see"
+ ewarn "http://bugs.gentoo.org/41827"
+ fi
+}