[pkg-ntp-maintainers] Bug#696390: ntp: misbuilds with multiarch libssl-dev

Colin Watson cjwatson at ubuntu.com
Thu Dec 20 10:07:57 UTC 2012


Package: ntp
Version: 1:4.2.6.p5+dfsg-2
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch raring

In #689093, we've been trying to work out how best to make libssl-dev
Multi-Arch: same; the obstacle is that the <openssl/opensslconf.h>
header file has architecture-dependent contents.  Lots of packages
detect OpenSSL headers in rather dubious ways at build time, so we have
to be quite careful about moving them.

The best approach seems to be to move /usr/include/openssl/opensslconf.h
to /usr/include/$(DEB_HOST_MULTIARCH)/openssl/opensslconf.h, and leave
all other files in their current locations.  This causes the fewest
problems of any solution I've been able to find, but it does cause two
packages (m2crypto and opendkim) to fail to build, and it causes ntp to
incorrectly build without OpenSSL support.

The following patch fixes this.  I've tested that this still builds with
the current non-multiarch libssl-dev, so it should be safe to apply this
any time, and it would be helpful to do so as soon as possible to
unblock the libssl-dev change.

  * Look for <openssl/opensslv.h> rather than <openssl/opensslconf.h>, which
    is due to move to a different location in order to support multiarch.

diff -Nru ntp-4.2.6.p5+dfsg/debian/patches/autotools.patch ntp-4.2.6.p5+dfsg/debian/patches/autotools.patch
--- ntp-4.2.6.p5+dfsg/debian/patches/autotools.patch	2012-02-22 20:11:53.000000000 +0000
+++ ntp-4.2.6.p5+dfsg/debian/patches/autotools.patch	2012-12-20 09:49:55.000000000 +0000
@@ -1068,6 +1068,19 @@
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking VARITEXT clock" >&5
  $as_echo_n "checking VARITEXT clock... " >&6; }
+@@ -22915,10 +22964,10 @@
+ case "$ans" in
+  no)
+     ;;
+- *) # look for openssl/opensslconf.h:
++ *) # look for openssl/opensslv.h:
+     for i in $ans no
+     do
+-	test -f $i/openssl/opensslconf.h && break
++	test -f $i/openssl/opensslv.h && break
+     done
+     case "$i" in
+      no)
 @@ -25112,8 +25161,6 @@
  
  ac_config_files="$ac_config_files Makefile"
@@ -4432,6 +4445,19 @@
          ac_config_commands="$ac_config_commands libtool"
  
  
+@@ -14857,10 +14930,10 @@
+ case "$ans" in
+  no)
+     ;;
+- *) # look for openssl/opensslconf.h:
++ *) # look for openssl/opensslv.h:
+     for i in $ans no
+     do
+-	test -f $i/openssl/opensslconf.h && break
++	test -f $i/openssl/opensslv.h && break
+     done
+     case "$i" in
+      no)
 @@ -16881,6 +16954,7 @@
  enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
  SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
diff -Nru ntp-4.2.6.p5+dfsg/debian/patches/openssl-headers.patch ntp-4.2.6.p5+dfsg/debian/patches/openssl-headers.patch
--- ntp-4.2.6.p5+dfsg/debian/patches/openssl-headers.patch	1970-01-01 01:00:00.000000000 +0100
+++ ntp-4.2.6.p5+dfsg/debian/patches/openssl-headers.patch	2012-12-20 09:48:20.000000000 +0000
@@ -0,0 +1,23 @@
+Description: Make OpenSSL header detection more reliable
+ <openssl/opensslconf.h> is architecture-dependent and so may reside in a
+ different location on multiarch-capable systems.  Check for
+ <openssl/opensslv.h> instead.
+Author: Colin Watson <cjwatson at ubuntu.com>
+Forwarded: no
+Last-Update: 2012-12-20
+
+--- a/m4/ntp_openssl.m4
++++ b/m4/ntp_openssl.m4
+@@ -86,10 +86,10 @@
+ case "$ans" in
+  no)
+     ;;
+- *) # look for openssl/opensslconf.h:
++ *) # look for openssl/opensslv.h:
+     for i in $ans no
+     do
+-	test -f $i/openssl/opensslconf.h && break
++	test -f $i/openssl/opensslv.h && break
+     done
+     case "$i" in
+      no)
diff -Nru ntp-4.2.6.p5+dfsg/debian/patches/series ntp-4.2.6.p5+dfsg/debian/patches/series
--- ntp-4.2.6.p5+dfsg/debian/patches/series	2011-11-27 19:25:56.000000000 +0000
+++ ntp-4.2.6.p5+dfsg/debian/patches/series	2012-12-20 09:42:29.000000000 +0000
@@ -6,6 +6,7 @@
 ntpd-ni-maxhost.patch
 openssl-disable-check.patch
 libedit.patch
-autotools.patch
 format-security.patch
 sntp-manpage.patch
+openssl-headers.patch
+autotools.patch

Thanks,

-- 
Colin Watson                                       [cjwatson at ubuntu.com]



More information about the pkg-ntp-maintainers mailing list