[pkg-ntp-maintainers] [Git][pkg-ntp-team/ntp][master] 9 commits: Revert "New binary package sntp-hooks, drop historic Breaks/Pre-Depends"

Bernhard Schmidt gitlab at salsa.debian.org
Wed Jan 24 21:58:15 UTC 2018


Bernhard Schmidt pushed to branch master at NTP Maintainers / ntp


Commits:
2a60b223 by Bernhard Schmidt at 2018-01-24T22:13:13+01:00
Revert "New binary package sntp-hooks, drop historic Breaks/Pre-Depends"

This reverts commit 9fbd121ffa66af1b4013145b3dcdc891bf638c3d.
It is not ready for unstable yet.

- - - - -
80715706 by Bernhard Schmidt at 2018-01-24T22:17:28+01:00
Drop historic Breaks/Pre-Depends again, adjust ntpdate description

- - - - -
bcff9224 by Bernhard Schmidt at 2018-01-24T22:18:30+01:00
Move Vcs-* to salsa

- - - - -
20c81954 by Bernhard Schmidt at 2018-01-24T22:21:05+01:00
Bump Standards-Version to 4.1.3.0, no changes necessary

- - - - -
f622ba7e by Bernhard Schmidt at 2018-01-24T22:26:23+01:00
Cherry-pick patch from upstream to increase stack size

Hopefully fixes random segfaults on startup on some machines

Thanks: Frederic Endner-Dühr for testing
Closes: #887385

- - - - -
597af75b by Bernhard Schmidt at 2018-01-24T22:30:52+01:00
Temporarily add ntpdate lock for systemd wrapper

This should be obsolete soon by replacing ntpdate with sntp
(see Bug#823533). Unfortunately this is not ready yet, so include
the locking from the former sysv initscript into the system wrapper

Thanks: Christian Ehrhardt
Closes: #874540

- - - - -
7e5ec2bd by Bernhard Schmidt at 2018-01-24T22:40:36+01:00
Add note about AppArmor tunable in README.Debian

Closes: #883949

- - - - -
9787031d by Bernhard Schmidt at 2018-01-24T22:51:50+01:00
Further improvement of ntpdate description

- - - - -
892cb60b by Bernhard Schmidt at 2018-01-24T22:53:03+01:00
Changelog for 1:4.2.8p10+dfsg-6

- - - - -


6 changed files:

- debian/README.Debian
- debian/changelog
- debian/control
- debian/ntp-systemd-wrapper
- + debian/patches/ntpd-increase-stack-size.patch
- debian/patches/series


Changes:

=====================================
debian/README.Debian
=====================================
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -119,3 +119,13 @@ works with the default installation, and changes in your configuration may
 require changes to the installed apparmor profile. Please see
 https://wiki.ubuntu.com/DebuggingApparmor before filing a bug against this
 software.
+
+If your ntpd configuration needs access to a device (for example for a local
+DCF clock) you may need to add this device to
+
+	/etc/apparmor.d/tunables/ntpd
+
+Afterwards you need to reload the AppArmor profile for the changes to take
+effect by executing
+
+	# apparmor_parser -r /etc/apparmor.d/usr.sbin.ntpd


=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,20 @@
+ntp (1:4.2.8p10+dfsg-6) unstable; urgency=medium
+
+  * Make sntp KoD path FHS-compliant.
+    Thanks to Aaron Smith (Closes: #863873)
+  * Drop historic Breaks/Pre-Depends
+  * Drop historic conffile handling from pre-jessie
+  * Adjust ntpdate description stating that it is deprecated
+  * Move Vcs-* to salsa
+  * Bump Standards-Version to 4.1.3.0, no changes necessary
+  * Cherry-pick patch from upstream to increase stack size.
+    Thanks to Frederic Endner-Dühr for testing (Closes: #887385)
+  * Temporarily add ntpdate lock for systemd wrapper.
+    Thanks to Christian Ehrhardt (Closes: #874540)
+  * Add note about AppArmor tunable in README.Debian (Closes: #883949)
+
+ -- Bernhard Schmidt <berni at debian.org>  Wed, 24 Jan 2018 22:42:13 +0100
+
 ntp (1:4.2.8p10+dfsg-5) unstable; urgency=medium
 
   * Fix arch:all FTBFS due to improper moving of sntp manpage (Closes: #865227)


=====================================
debian/control
=====================================
--- a/debian/control
+++ b/debian/control
@@ -5,10 +5,10 @@ Maintainer: Debian NTP Team <pkg-ntp-maintainers at lists.alioth.debian.org>
 Uploaders: Peter Eisentraut <petere at debian.org>, Kurt Roeckx <kurt at roeckx.be>, Bernhard Schmidt <berni at debian.org>
 Build-Depends: debhelper (>= 10), libedit-dev, libcap2-dev [linux-any], libssl-dev (>= 1.0.0e-1), autogen (>= 1:5.11), libopts25-dev (>= 1:5.11), pps-tools [linux-any], dh-apparmor
 Build-Conflicts: libavahi-compat-libdnssd-dev, libwww-dev, libwww-ssl-dev
-Standards-Version: 3.9.8
+Standards-Version: 4.1.3.0
 Homepage: http://support.ntp.org/
-Vcs-Browser: https://anonscm.debian.org/git/pkg-ntp/pkg-ntp.git/
-Vcs-Git: https://anonscm.debian.org/git/pkg-ntp/pkg-ntp.git/
+Vcs-Browser: https://salsa.debian.org/pkg-ntp-team/ntp
+Vcs-Git: https://salsa.debian.org/pkg-ntp-team/ntp.git
 
 Package: ntp
 Architecture: any
@@ -33,17 +33,20 @@ Description: Network Time Protocol daemon and utility programs
 
 Package: ntpdate
 Architecture: any
-Depends: netbase, sntp-hooks, ${misc:Depends}, ${shlibs:Depends}
+Depends: netbase, ${misc:Depends}, ${shlibs:Depends}
 Description: client for setting system time from NTP servers (deprecated)
  NTP, the Network Time Protocol, is used to keep computer clocks
  accurate by synchronizing them over the Internet or a local network,
  or by following an accurate hardware receiver that interprets GPS,
  DCF-77, NIST or similar time signals.
  .
- ntpdate is deprecated. Please use sntp instead.
+ ntpdate is deprecated. Please use sntp instead for manual or scripted
+ NTP queries/syncs.
  .
- The ifupdown hooks previously included in the ntpdate package have been
- migrated to the package sntp-hooks.
+ Historically this package also includes hooks for ifupdown and dhclient.
+ These will be migrated to sntp in the future. If the full NTP daemon from
+ the package "ntp" is installed, this package is not necessary and may cause
+ unwanted behaviour.
 
 Package: ntp-doc
 Architecture: all
@@ -75,23 +78,3 @@ Description: Network Time Protocol - sntp client
  sntp can be used as an SNTP client to query a NTP or SNTP server and
  either display the time or set the local system's time. It is not
  sufficient, however, for maintaining an accurate clock in the long run.
-
-Package: sntp-hooks
-Architecture: all
-Depends: sntp
-Description: Network Time Protocol - hooks for sntp
- NTP, the Network Time Protocol, is used to keep computer clocks
- accurate by synchronizing them over the Internet or a local network,
- or by following an accurate hardware receiver that interprets GPS,
- DCF-77, NIST or similar time signals.
- .
- sntp can be used as an SNTP client to query a NTP or SNTP server and
- either display the time or set the local system's time. It is not
- sufficient, however, for maintaining an accurate clock in the long run.
- .
- This package contains hooks to automatically sync the time _once_
- when a network interface comes up or dhclient obtains a new DHCP lease.
- It is meant to be a replacement for the legacy "ntpdate" package.
- .
- If the full NTP daemon from the package "ntp" is installed, then
- sntp-ifupdown is not necessary.


=====================================
debian/ntp-systemd-wrapper
=====================================
--- a/debian/ntp-systemd-wrapper
+++ b/debian/ntp-systemd-wrapper
@@ -2,6 +2,7 @@
 
 DAEMON=/usr/sbin/ntpd
 PIDFILE=/var/run/ntpd.pid
+LOCKFILE=/run/lock/ntpdate
 
 if [ -r /etc/default/ntp ]; then
         . /etc/default/ntp
@@ -17,5 +18,13 @@ if test "$(uname -s)" = "Linux"; then
         NTPD_OPTS="$NTPD_OPTS -u $UGID"
 fi
 
-exec $DAEMON -p $PIDFILE $NTPD_OPTS
+# Protect the service startup against concurrent ntpdate ifup hooks
+(
+	if flock -w 180 9; then
+		exec $DAEMON -p $PIDFILE $NTPD_OPTS
+	else
+		echo "Timeout waiting for $LOCKFILE"
+		exit 1
+	fi
+) 9>$LOCKFILE
 


=====================================
debian/patches/ntpd-increase-stack-size.patch
=====================================
--- /dev/null
+++ b/debian/patches/ntpd-increase-stack-size.patch
@@ -0,0 +1,30 @@
+From: Juergen Perlinger <perlinger at ntp.org>
+Subject:  increase stack size to at least 32kB
+Origin: upstream, http://bugs.ntp.org/show_bug.cgi?id=3391
+Bug: http://bugs.ntp.org/show_bug.cgi?id=3391
+Bug-Debian: https://bugs.debian.org/887385
+diff -Nru a/ntpd/ntpd.c b/ntpd/ntpd.c
+--- a/ntpd/ntpd.c	2017-03-27 08:33:16.690969527 +0200
++++ b/ntpd/ntpd.c	2017-03-27 08:33:16.690969527 +0200
+@@ -313,11 +313,16 @@
+ #if defined(HAVE_PTHREAD_ATTR_GETSTACKSIZE) && \
+     defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE) && \
+     defined(PTHREAD_STACK_MIN)
+-	rc = pthread_attr_setstacksize(&thr_attr, PTHREAD_STACK_MIN);
+-	if (0 != rc)
+-		msyslog(LOG_ERR,
+-			"my_pthread_warmup: pthread_attr_setstacksize() -> %s",
+-			strerror(rc));
++	{
++		size_t ssmin = 32*1024;	/* 32kB should be minimum */
++		if (ssmin < PTHREAD_STACK_MIN)
++			ssmin = PTHREAD_STACK_MIN;
++		rc = pthread_attr_setstacksize(&thr_attr, ssmin);
++		if (0 != rc)
++			msyslog(LOG_ERR,
++				"my_pthread_warmup: pthread_attr_setstacksize() -> %s",
++				strerror(rc));
++	}
+ #endif
+ 	rc = pthread_create(
+ 		&thread, &thr_attr, my_pthread_warmup_worker, NULL);


=====================================
debian/patches/series
=====================================
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ reproducible-build.patch
 sntp-sysexits.patch
 debian-locfile.patch
 sntp-kod-location.patch
+ntpd-increase-stack-size.patch



View it on GitLab: https://salsa.debian.org/pkg-ntp-team/ntp/compare/bae3ac635386a7550d4bc236576a5902a39991d1...892cb60bd5d557f9a67035267472aa13d892e205

---
View it on GitLab: https://salsa.debian.org/pkg-ntp-team/ntp/compare/bae3ac635386a7550d4bc236576a5902a39991d1...892cb60bd5d557f9a67035267472aa13d892e205
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-ntp-maintainers/attachments/20180124/085a1bea/attachment-0001.html>


More information about the pkg-ntp-maintainers mailing list