[pkg-ntp-maintainers] Bug#821872: ntp 4.2.8p4+dfsg-3 fails with dpkg-buildpackage

Kalnozols, Andris andris at hpl.hp.com
Wed Apr 20 05:04:36 UTC 2016


Package: ntp
Version: 4.2.8p4+dfsg-3

I downloaded the "stretch" source package for ntp on my Proliant server
running "jessie" since we have a Spectracom Tsync card; support for
this card only began with ntp release 4.2.7p266.

Building this package with "dpkg-buildpackage -b -us -uc" fails to
complete unless the following patches are applied:


> --- debian/rules.orig  2015-07-25 07:36:54.000000000 -0700
> +++ debian/rules       2016-04-14 01:22:51.000000000 -0700
> @@ -20,7 +20,7 @@
>                 --with-sntp=no \
>                 --with-lineeditlibs=edit \
>                 --without-ntpsnmpd \
> -               --disable-local-libopts \
> +               --enable-local-libopts \
>                 --enable-ntp-signd \
>                 --disable-dependency-tracking \
>                 --with-openssl-libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
> @@ -50,13 +50,8 @@
> 
>         $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
> 
> -       # move the administrator programs from /usr/bin to /usr/sbin
> -       for file in ntpdate ntp-wait ntpd ntptime ntp-keygen; do \
> -               mv debian/tmp/usr/bin/$$file debian/tmp/usr/sbin/$$file || exit; \
> -       done
> -
>         # don't install tickadj
> -       rm debian/tmp/usr/bin/tickadj
> +       rm debian/tmp/usr/sbin/tickadj
> 
>         install -D -m 0755 scripts/ntpsweep/ntpsweep debian/ntp/usr/bin/ntpsweep
>         install -D -m 0644 debian/ntp.dhcp debian/ntp/etc/dhcp/dhclient-exit-hooks.d/ntp
> @@ -66,7 +61,8 @@
>         install -D -m 0644 debian/ntp.conf debian/ntp/etc/ntp.conf
> 
>         # remove upstream man pages, which are currently not as nice as ours / ntpsnmpd we don't want
> -       rm $(addprefix debian/tmp/usr/share/man/man1/,ntpd.1 ntpdc.1 ntp-keygen.1 ntpq.1)
> +       rm $(addprefix debian/tmp/usr/share/man/man1/,ntpdc.1 ntpq.1)
> +       rm $(addprefix debian/tmp/usr/share/man/man8/,ntpd.8 ntp-keygen.8)
> 
>         # Remove empty directory (/usr/libexec/)
>         find debian/tmp -type d -empty -delet


> --- debian/ntp.install.orig    2015-07-25 07:36:53.000000000 -0700
> +++ debian/ntp.install         2016-04-13 22:59:08.000000000 -0700
> @@ -1,12 +1,12 @@
> -debian/tmp/usr/bin/calc_tickadj
>  debian/tmp/usr/bin/ntpdc
>  debian/tmp/usr/bin/ntpq
>  debian/tmp/usr/bin/ntptrace
> -debian/tmp/usr/bin/update-leap
> +debian/tmp/usr/sbin/calc_tickadj
>  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/update-leap
>  debian/tmp/usr/share/ntp/lib/NTP/Util.pm
>  debian/tmp/usr/share/doc/ntp/ntp-wait.html
>  debian/tmp/usr/share/doc/ntp/ntp.conf.html
> @@ -18,8 +18,8 @@
>  debian/tmp/usr/share/doc/ntp/ntpsweep.html
>  debian/tmp/usr/share/doc/ntp/ntptrace.html
>  debian/tmp/usr/share/doc/ntp/update-leap.html
> -debian/tmp/usr/share/man/man1/calc_tickadj.1
> -debian/tmp/usr/share/man/man1/ntp-wait.1
>  debian/tmp/usr/share/man/man1/sntp.1
> -debian/tmp/usr/share/man/man1/update-leap.1
>  debian/tmp/usr/share/man/man5/ntp.keys.5
> +debian/tmp/usr/share/man/man8/calc_tickadj.8
> +debian/tmp/usr/share/man/man8/ntp-wait.8
> +debian/tmp/usr/share/man/man8/update-leap.8


1. "--enable-local-libopts" was necessary for "util/ntp-keygen-opts.c"
   to compile.  Without this option, the wrong header file was chosen;

     /usr/include/autoopts/options.h
       instead of
     ./sntp/libopts/autoopts/options.h

   and the compile failed due to the VOIDP macro being undefined.
   I don't have access to a system running "stretch" - perhaps the
   VOIDP macro is defined in the /usr/include/autoopts/options.h
   header file in which case "--disable-local-libopts" can be left
   as-is.

2. The loop to move the administrator programs from "tmp/usr/bin"
   to "/tmp/usr/sbin" is unnecessary since they're already in "sbin".

3. The paths for removing the upstream man pages needed fixing.

4. The paths for various files in "ntp.install" were not correct.

Regards,
Andris



More information about the pkg-ntp-maintainers mailing list