[arch-commits] Commit in ntp/trunk (PKGBUILD install ntpd.conf)
Gaetan Bisson
bisson at archlinux.org
Wed Feb 29 01:31:28 UTC 2012
Date: Tuesday, February 28, 2012 @ 20:31:28
Author: bisson
Revision: 151632
fix FS#28704
Modified:
ntp/trunk/PKGBUILD
ntp/trunk/install
ntp/trunk/ntpd.conf
-----------+
PKGBUILD | 10 +++++-----
install | 15 +++++++++++++++
ntpd.conf | 4 ++--
3 files changed, 22 insertions(+), 7 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2012-02-29 01:24:10 UTC (rev 151631)
+++ PKGBUILD 2012-02-29 01:31:28 UTC (rev 151632)
@@ -5,7 +5,7 @@
pkgname=ntp
pkgver=4.2.6.p5
_realver=4.2.6p5
-pkgrel=3
+pkgrel=4
pkgdesc='Network Time Protocol reference implementation'
url='http://www.ntp.org/'
license=('custom')
@@ -22,8 +22,8 @@
sha1sums=('4a5353a4791b6f4315a66c28d504ec6c7926b192'
'4e324e625c1f080b5c028be5092aa71adbf9bd99'
'01394b8a952f5edc85d19df8335eeac3980320f4'
- 'f358e99a6b27e73a955b7c369781b27aab17731c'
- '6cfcb7bbd34499b30e31dffca2f3e1a036010271'
+ 'c18b0e35068a06500e1556889b54194e3a63a056'
+ '4537d1f58b299d463db5048129cb264511474b0b'
'4f76f7f9ffc8315ff9924f793f272d4f6939b816')
install=install
@@ -34,7 +34,7 @@
./configure \
--prefix=/usr \
--mandir=/usr/share/man \
- --enable-linux-caps \
+ --enable-linuxcaps \
make
}
@@ -45,7 +45,7 @@
make DESTDIR="${pkgdir}" install
rmdir "${pkgdir}"/usr/{lib,sbin}
- install -d "${pkgdir}"/var/lib/ntp
+ install -d -o 87 "${pkgdir}"/var/lib/ntp
install -Dm755 ../ntpd "${pkgdir}"/etc/rc.d/ntpd
install -Dm755 ../ntpdate "${pkgdir}"/etc/rc.d/ntpdate
install -Dm644 ../ntp.conf "${pkgdir}"/etc/ntp.conf
Modified: install
===================================================================
--- install 2012-02-29 01:24:10 UTC (rev 151631)
+++ install 2012-02-29 01:31:28 UTC (rev 151632)
@@ -1,3 +1,9 @@
+post_install() {
+ getent group ntp &>/dev/null || groupadd -g 87 ntp >/dev/null
+ getent passwd ntp &>/dev/null || useradd -u 87 -g ntp -d /var/lib/ntp -c 'Network Time Protocol' -s /bin/false ntp >/dev/null
+ true
+}
+
post_upgrade() {
if [[ $(vercmp $2 4.2.6.p3) -le 0 ]]; then
cat <<EOF
@@ -16,4 +22,13 @@
EOF
fi
+ if [[ $(vercmp $2 4.2.6.p5-3) -le 0 ]]; then
+ post_install
+ fi
}
+
+post_remove() {
+ getent passwd ntp &>/dev/null && userdel ntp >/dev/null
+ getent group ntp &>/dev/null && groupdel ntp >/dev/null
+ true
+}
Modified: ntpd.conf
===================================================================
--- ntpd.conf 2012-02-29 01:24:10 UTC (rev 151631)
+++ ntpd.conf 2012-02-29 01:31:28 UTC (rev 151632)
@@ -1,5 +1,5 @@
# client options for "ntpd -q" - ntpdate equivalent
-NTP_CLIENT_OPTION="-g"
+NTP_CLIENT_OPTION="-g -u ntp"
# arguments passed to ntpd when started
-NTPD_ARGS="-g"
+NTPD_ARGS="-g -u ntp"
More information about the arch-commits
mailing list