Unblock request: opendnssec 1.1.1-2
Hi,
opendnssec 1.1.1-1 has some creapy debian packaging bugs:
- missing files in packages, because I redid whole packaging from
separate packages to one big upstream tarball.
- invalid pidfile name
- invalid paths in binaries because of pregenerated upstream config.h files
- add --as-needed linker flag to avoid unnecessary dependencies
Could you please unblock 1.1.1-2, I have only changed packaging. Only
upstream change is a patch to fix manpage (lines starting with dot).
Interversion patch generated from my git is attached.
Ondrej
--
Ondřej Surý <ondrej@sury.org>
diff --git a/debian/changelog b/debian/changelog
index 515ba8d..b399556 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+opendnssec (1.1.1-2) unstable; urgency=low
+
+ * Don't build libhsm twice for sqlite3/mysql
+ * Apply directory fixes in common directory as well
+ * Remove all pregenerated config.h before building
+ + This fixes bad paths in binaries
+ * Install common scripts (ods-control) and man pages
+ * Fix signerd init.d script by adding missing d in pidfile (Closes: #592791)
+ * Add some useful linker flags to not link unneccessary libraries
+ * Fix ods-timing.5 manpage
+
+ -- Ondřej Surý <ondrej@debian.org> Tue, 10 Aug 2010 15:25:40 +0200
+
opendnssec (1.1.1-1) unstable; urgency=low
* New upstream release
diff --git a/debian/opendnssec-common.install b/debian/opendnssec-common.install
index eb18093..871484b 100644
--- a/debian/opendnssec-common.install
+++ b/debian/opendnssec-common.install
@@ -2,3 +2,8 @@ etc/opendnssec/*.xml /usr/share/opendnssec/
usr/share/opendnssec/*.rnc
usr/share/opendnssec/*.rng
usr/share/opendnssec/kasp2html.xsl
+usr/bin/ods-kasp2html
+usr/sbin/ods-control
+usr/share/man/man5/ods-timing.5
+usr/share/man/man7/opendnssec.7
+usr/share/man/man8/ods-control.8
diff --git a/debian/opendnssec-signer.init b/debian/opendnssec-signer.init
index aab4042..8998580 100644
--- a/debian/opendnssec-signer.init
+++ b/debian/opendnssec-signer.init
@@ -19,7 +19,7 @@ DESC="OpenDNSSEC Signer"
NAME=ods-signerd
DAEMON=/usr/sbin/$NAME
DAEMON_ARGS=""
-PIDFILE=/var/run/opendnssec/signer.pid
+PIDFILE=/var/run/opendnssec/signerd.pid
SCRIPTNAME=/etc/init.d/opendnssec-signer
# Exit if the package is not installed
diff --git a/debian/patches/001-fix_localstate_dir.patch b/debian/patches/001-fix_localstate_dir.patch
index 835f990..426f59b 100644
--- a/debian/patches/001-fix_localstate_dir.patch
+++ b/debian/patches/001-fix_localstate_dir.patch
@@ -47,3 +47,14 @@
- $(INSTALL) -d $(DESTDIR)$(localstatedir)/opendnssec/signed
- $(INSTALL) -d $(DESTDIR)$(localstatedir)/run
- $(INSTALL) -d $(DESTDIR)$(localstatedir)/run/opendnssec
+--- a/m4/opendnssec_common.m4
++++ b/m4/opendnssec_common.m4
+@@ -18,7 +18,7 @@ OPENDNSSEC_LIB_DIR=$full_libdir/opendnss
+ OPENDNSSEC_LIBEXEC_DIR=$full_libexecdir/opendnssec
+ OPENDNSSEC_DATA_DIR=$full_datadir/opendnssec
+ OPENDNSSEC_SYSCONF_DIR=$full_sysconfdir/opendnssec
+-OPENDNSSEC_LOCALSTATE_DIR="$full_localstatedir/opendnssec"
++OPENDNSSEC_LOCALSTATE_DIR="$full_localstatedir/lib/opendnssec"
+ OPENDNSSEC_PID_DIR="$full_localstatedir/run/opendnssec"
+
+ AC_SUBST([OPENDNSSEC_BIN_DIR])
diff --git a/debian/patches/009-fix_ods-timing_manpage.patch b/debian/patches/009-fix_ods-timing_manpage.patch
new file mode 100644
index 0000000..3e2aa1c
--- /dev/null
+++ b/debian/patches/009-fix_ods-timing_manpage.patch
@@ -0,0 +1,24 @@
+--- a/tools/ods-timing.5.in
++++ b/tools/ods-timing.5.in
+@@ -18,15 +18,12 @@ notably for periods. These descriptions
+ for the duration of a month and a year, as these periods would be allowed
+ to vary if ISO 8601 were strictly adhered to.
+ .PP
+-Durations are represented by the format
+-.B P[n]Y[n]M[n]DT[n]H[n]M[n]S
+-. In these representations, the
+-.B [n]
+-is replaced by the value for each of the date and time elements that follow the
+-.B [n]
+-. Leading zeros are not required. The capital letters \fBP\fR, \fBY\fR,
+-\fBM\fR, \fBW\fR, \fBD\fR, \fBT\fR, \fBH\fR, \fBM\fR and \fBS\fR
+-are designators for each of the date and time elements and are not replaced.
++Durations are represented by the format \fBP[n]Y[n]M[n]DT[n]H[n]M[n]S\fR.
++In these representations, the \fB[n]\fR is replaced by the value for each
++of the date and time elements that follow the \fB[n]\fR. Leading zeros are
++not required. The capital letters \fBP\fR, \fBY\fR, \fBM\fR, \fBW\fR,
++\fBD\fR, \fBT\fR, \fBH\fR, \fBM\fR and \fBS\fR are designators for each of
++the date and time elements and are not replaced.
+ .TP
+ .B P
+ is the duration designator (historically called "period") placed at the start of the duration representation.
diff --git a/debian/patches/series b/debian/patches/series
index bcd91f4..3b5f979 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@
006-fail_build_on_failed_test.patch
007-fix_ods-ksmutil_manpage.patch
008-tools_install_path.patch
+009-fix_ods-timing_manpage.patch
diff --git a/debian/rules b/debian/rules
index da91bdf..869d3f1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,14 @@ export DH_OPTIONS
export DEB_BUILD_HARDENING=1
+CFLAGS = -Wl,-z,defs -Wl,--as-needed
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+CFLAGS += -O0
+else
+CFLAGS += -O2
+endif
+
+
TRANG_VERSION ?= $(shell dpkg-query -W trang | cut -f 2)
%:
@@ -14,14 +22,22 @@ TRANG_VERSION ?= $(shell dpkg-query -W trang | cut -f 2)
override_dh_auto_clean:
dh_auto_clean -Bbuild-sqlite3
- dh_auto_clean -Denforcer -Bbuild-enforcer-mysql
+ dh_auto_clean -Denforcer -Bbuild-mysql/enforcer
+ rm -rf build-mysql build-sqlite3
+ if test -f auditor/common/config.h.orig; then mv auditor/common/config.h.orig auditor/common/config.h; fi
if test -f enforcer/common/config.h.orig; then mv enforcer/common/config.h.orig enforcer/common/config.h; fi
+ if test -f signer/tools/config.h.orig; then mv signer/tools/config.h.orig signer/tools/config.h; fi
override_dh_auto_configure:
autoreconf
if test -f auditor/common/config.h; then mv auditor/common/config.h auditor/common/config.h.orig; fi
+ if test -f enforcer/common/config.h; then mv enforcer/common/config.h enforcer/common/config.h.orig; fi
+ if test -f signer/tools/config.h; then mv signer/tools/config.h signer/tools/config.h.orig; fi
+
dh_auto_configure -Bbuild-sqlite3 -- --with-ruby=/usr/bin/ruby1.8 --with-ldns=/usr --with-database-backend=sqlite3 --with-sqlite3=/usr --libexecdir=/usr/lib/opendnssec/ --with-pkcs11-opensc=/usr/lib/opensc-pkcs11.so
- dh_auto_configure -Denforcer -Bbuild-enforcer-mysql -- --with-ldns=/usr --with-database-backend=mysql --with-mysql=/usr
+ mkdir build-mysql
+ ln -s ../build-sqlite3/libhsm build-mysql/libhsm
+ dh_auto_configure -Denforcer -Bbuild-mysql/enforcer -- --with-ldns=/usr --with-database-backend=mysql --with-mysql=/usr --libexecdir=/usr/lib/opendnssec/
# Only rebuild RNG files if we have recent trang
@if dpkg --compare-versions "$(TRANG_VERSION)" ge "20091111-1"; then \
@@ -30,13 +46,13 @@ override_dh_auto_configure:
override_dh_auto_build:
dh_auto_build -Bbuild-sqlite3
- dh_auto_build -Denforcer -Bbuild-enforcer-mysql
+ dh_auto_build -Denforcer -Bbuild-mysql/enforcer
override_dh_auto_install:
# Comment out example zone after regression testing
(cd build-sqlite3; patch -p1 -i $(CURDIR)/debian/signconf.xml.patch)
dh_auto_install -Bbuild-sqlite3 -- DESTDIR=$(CURDIR)/debian/tmp
- dh_auto_install -Bbuild-enforcer-mysql -- DESTDIR=$(CURDIR)/debian/opendnssec-enforcer-mysql
+ dh_auto_install -Bbuild-mysql/enforcer -- DESTDIR=$(CURDIR)/debian/opendnssec-enforcer-mysql
rm -rf $(CURDIR)/debian/opendnssec-enforcer-mysql/usr/share/man/
rm -rf $(CURDIR)/debian/opendnssec-enforcer-mysql/var/run/opendnssec/
Reply to: