[pkg-ntp-maintainers] [pkg-ntp] 05/06: Build sntp
Bernhard Schmidt
berni at moszumanska.debian.org
Fri Mar 31 21:19:28 UTC 2017
This is an automated email from the git hooks/post-receive script.
berni pushed a commit to branch berni-wip
in repository pkg-ntp.
commit 4f8acae143245defacd57f1fa915c7dd5710a59f
Author: Bernhard Schmidt <berni at debian.org>
Date: Fri Mar 31 22:44:42 2017 +0200
Build sntp
Requires patch from NTP Bugzilla for building
Closes: #793837
---
debian/ntp.install | 2 ++
debian/patches/series | 1 +
debian/patches/sntp-sysexits.patch | 34 ++++++++++++++++++++++++++++++++++
debian/rules | 6 +-----
4 files changed, 38 insertions(+), 5 deletions(-)
diff --git a/debian/ntp.install b/debian/ntp.install
index af7071d..a794f1b 100644
--- a/debian/ntp.install
+++ b/debian/ntp.install
@@ -7,6 +7,7 @@ debian/tmp/usr/sbin/ntp-keygen
debian/tmp/usr/sbin/ntp-wait
debian/tmp/usr/sbin/ntpd
debian/tmp/usr/sbin/ntptime
+debian/tmp/usr/sbin/sntp
debian/tmp/usr/share/ntp/lib/NTP/Util.pm
debian/tmp/usr/share/doc/ntp/ntp-keygen.html
debian/tmp/usr/share/doc/ntp/ntp-wait.html
@@ -18,5 +19,6 @@ debian/tmp/usr/share/doc/ntp/ntpq.html
debian/tmp/usr/share/doc/ntp/ntpsnmpd.html
debian/tmp/usr/share/doc/ntp/ntpsweep.html
debian/tmp/usr/share/doc/ntp/ntptrace.html
+debian/tmp/usr/share/doc/sntp/sntp.html
debian/tmp/usr/share/doc/ntp/update-leap.html
debian/tmp/usr/share/man/man*/*
diff --git a/debian/patches/series b/debian/patches/series
index fd76e7d..040df97 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ ntpd-linux-caps-runtime.patch
openssl-disable-check.patch
libedit.patch
reproducible-build.patch
+sntp-sysexits.patch
diff --git a/debian/patches/sntp-sysexits.patch b/debian/patches/sntp-sysexits.patch
new file mode 100644
index 0000000..2282613
--- /dev/null
+++ b/debian/patches/sntp-sysexits.patch
@@ -0,0 +1,34 @@
+From: Miroslav Lichvar
+Subject: Building 4.2.8p8 with disabled local libopts fails
+Bug: http://bugs.ntp.org/show_bug.cgi?id=3132
+
+When trying to build 4.2.8p8 with the --disable-local-libopts option on Fedora,
+it fails with the following error:
+
+main.c: In function ‘sntp_main’:
+main.c:143:8: error: ‘EX_SOFTWARE’ undeclared (first use in this function)
+ exit(EX_SOFTWARE);
+ ^~~~~~~~~~~
+...
+
+
+It seems the problem is that sntp/main.c is missing "#include <sysexits.h>".
+The configure script detects that the system has sysexits.h, but then the sntp
+code doesn't use it, expecting the local definitions of the EX_* macros.
+
+The following patch fixes the problem for me:
+
+--- ntp-4.2.8p8/sntp/main.c.orig 2016-10-19 10:18:41.690800420 +0200
++++ ntp-4.2.8p8/sntp/main.c 2016-10-19 10:19:31.900966925 +0200
+@@ -8,6 +8,10 @@
+ # include <event2/thread.h>
+ #endif
+
++#ifdef HAVE_SYSEXITS_H
++#include <sysexits.h>
++#endif
++
+ #include "main.h"
+ #include "ntp_libopts.h"
+ #include "kod_management.h"
+
diff --git a/debian/rules b/debian/rules
index 04d9aa5..a30be35 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,7 +22,6 @@ endif
--prefix=/usr \
--enable-all-clocks --enable-parse-clocks --enable-SHM \
--disable-debugging --sysconfdir=/var/lib/ntp \
- --with-sntp=no \
--with-lineeditlibs=edit \
--without-ntpsnmpd \
--disable-local-libopts \
@@ -33,7 +32,7 @@ endif
override_dh_install:
# move the administrator programs from /usr/bin to /usr/sbin
- for file in ntpdate ntp-wait ntpd ntptime ntp-keygen; do \
+ for file in ntpdate ntp-wait ntpd ntptime ntp-keygen sntp; do \
mv debian/tmp/usr/bin/$$file debian/tmp/usr/sbin/$$file || exit; \
done
@@ -59,9 +58,6 @@ override_dh_install:
mv debian/tmp/usr/share/man/man1/ntp-wait.1 debian/tmp/usr/share/man/man8/ntp-wait.8
mv debian/tmp/usr/share/man/man1/ntpd.1 debian/tmp/usr/share/man/man8/ntpd.8
- # drop documentation for programs not shipped in Debian
- rm debian/tmp/usr/share/doc/sntp/sntp.html
-
# Remove empty directory (/usr/libexec/)
find debian/tmp -type d -empty -delete
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ntp/pkg-ntp.git
More information about the pkg-ntp-maintainers
mailing list