Commit 718f9079 authored by AlmAck's avatar AlmAck

ntp rebuild with new ntpdate.service

parent a6becfd3
# maintainer abveritas[at]chakra-project[dot]org>
# maintainer almack[at]chakraos[dot]org>
pkgname=ntp
pkgver=4.2.6.p5
_realver=4.2.6p5
pkgrel=5
pkgrel=6
pkgdesc="NTP (Network Time Protocol) tries to keep servers in sync"
arch=('x86_64')
license=('custom')
url="http://www.ntp.org/"
depends=('openssl' 'readline' 'libcap')
depends=('openssl' 'libedit' 'libcap')
makedepends=('perl-html-parser')
backup=('etc/ntp.conf' 'etc/conf.d/ntpd.conf')
backup=('etc/ntp.conf')
install=install
source=("http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${_realver}.tar.gz"
'ntp.conf'
'ntpd.conf'
'ntpd.service')
'ntpdate.service'
'ntpd.service')
md5sums=('00df80a84ec9528fcfb09498075525bc'
'ac884ad959850731d8f27667681bbdf8'
'41d077a48d06e66678b52abbc56af142'
'06ae4a88dd7b9e0bc9679aebf2241167')
'11c7dea7e35034ffc370dafae49f1d45'
'47e56748b360693c7ebe3de990ff7e7c')
build() {
cd "${srcdir}/${pkgname}-${_realver}"
./configure --prefix=/usr \
--mandir=/usr/share/man \
--enable-linuxcaps
--enable-linuxcaps \
--enable-ntp-signd
make
}
......@@ -38,8 +40,8 @@ package() {
rmdir "${pkgdir}"/usr/{lib,sbin}
install -d -o 87 "${pkgdir}/var/lib/ntp"
install -Dm644 ../ntp.conf "${pkgdir}"/etc/ntp.conf
install -Dm644 ../ntpd.conf "${pkgdir}"/etc/conf.d/ntpd.conf
install -Dm644 ../ntpd.service "${pkgdir}"/usr/lib/systemd/system/ntpd.service
install -Dm644 ../ntpdate.service "${pkgdir}"/usr/lib/systemd/system/ntpdate.service
install -Dm644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
cd html
......
......@@ -14,6 +14,15 @@ post_upgrade() {
if [[ $(vercmp $2 4.2.6.p5-5) -le 0 ]]; then
chown -R ntp /var/lib/ntp
fi
if [[ $(vercmp $2 4.2.6.p5-6) -le 0 ]]; then
cat <<EOF
==> The PID file /var/run/ntpd.pid has been renamed /run/ntpd.pid
==> and the new systemd service only takes the latter into account.
==> To stop your old ntpd process, please kill it manually.
EOF
fi
}
pre_remove() {
......
# client options for "ntpd -q" - ntpdate equivalent
NTP_CLIENT_OPTION="-g -u ntp"
# arguments passed to ntpd when started
NTPD_ARGS="-g -u ntp"
......@@ -5,7 +5,8 @@ After=network.target nss-lookup.target
[Service]
Type=forking
PrivateTmp=true
ExecStart=/usr/bin/ntpd -g -u ntp:ntp
PIDFile=/run/ntpd.pid
ExecStart=/usr/bin/ntpd -g -u ntp:ntp -p /run/ntpd.pid
ControlGroup=cpu:/
Restart=always
......
[Unit]
Description=One-Shot Network Time Service
After=network.target nss-lookup.target
Before=ntpd.service
[Service]
Type=oneshot
PrivateTmp=true
ExecStart=/usr/bin/ntpd -q -n -g -u ntp:ntp
[Install]
WantedBy=multi-user.target
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment