Browse Source

Packaging cleanup

* Switch to debhelper compat level 11
* Declare compliance with policy 4.1.5
* Fix some wording and patch filenames
* Clean up debian/rules
Christoph Biedl 5 years ago
parent
commit
9f247e5114

debian/README.debian → debian/README.Debian


+ 1 - 1
debian/compat

@@ -1 +1 @@
-9
+11

+ 2 - 4
debian/control

@@ -1,13 +1,11 @@
 Source: bgpdump
 Maintainer: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
 Homepage: https://bitbucket.org/ripencc/bgpdump/wiki/Home
-Standards-Version: 3.9.8
-Build-Depends: debhelper (>= 9~),
+Standards-Version: 4.1.5
+Build-Depends: debhelper (>= 11~),
     asciidoctor,
-    dh-autoreconf,
     libbsd-dev,
     libbz2-dev,
-    xmlto,
     zlib1g-dev,
 Priority: optional
 Section: admin

+ 1 - 1
debian/patches/disable-cfr_strerror.patch

@@ -4,7 +4,7 @@ Bug: https://bitbucket.org/ripencc/bgpdump/issues/31/
 Last-Update: 2016-07-19
 
     This function does not check the asprintf return value but it's not
-    used anyany. So disable it.
+    used anyway. So disable it.
 
 --- a/cfile_tools.c
 +++ b/cfile_tools.c

+ 1 - 1
debian/patches/fix-unaligned-memory-access.patch

@@ -1,6 +1,6 @@
 Description: Fix unaligned memory access
 Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
-https://bitbucket.org/ripencc/bgpdump/issues/
+Bug: https://bitbucket.org/ripencc/bgpdump/issues/40
 Last-Update: 2016-10-30
 
     Causes FTBFS at least on sparc64

+ 2 - 2
debian/patches/increase-max-prefixes.patch

@@ -1,9 +1,9 @@
 Description: Increase limit of maximum prefixes
 Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
 Forwarded: No
-Last-Update: 2016-07-13
+Last-Update: 2016-10-30
 
-    Appearently update messages with more than 1000 prefixes to exist,
+    Appearently update messages with a lot of prefixes do exist,
     raise the limit.
 
 --- a/bgpdump_attr.h

+ 22 - 0
debian/patches/prefix-install-patch.patch

@@ -0,0 +1,22 @@
+Description: Use $(DESTDDIR) when installing files
+Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Forwarded: No
+Last-Update: 2017-11-18
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -48,10 +48,10 @@
+ 	rm -Rf $(PKG)
+ 
+ install: all
+-	install -d $(bindir) $(includedir) $(libdir)
+-	install bgpdump $(bindir)
+-	install $(LIB_H) $(includedir)
+-	install libbgpdump.so libbgpdump.a $(libdir)
++	install -d $(DESTDIR)/$(bindir) $(DESTDIR)/$(includedir) $(DESTDIR)/$(libdir)
++	install bgpdump $(DESTDIR)/$(bindir)
++	install $(LIB_H) $(DESTDIR)/$(includedir)
++	install libbgpdump.so libbgpdump.a $(DESTDIR)/$(libdir)
+ 
+ PKG=@PACKAGE_NAME@-@PACKAGE_VERSION@
+ dist:

+ 2 - 1
debian/patches/series

@@ -2,7 +2,8 @@
 disable-cfr_strerror.patch
 fix-crash-on-huge-prefix-lists.patch
 fix-buffer-weirdness.patch
-use-strlcat.patch
+use-libbsd.patch
+prefix-install-patch.patch
 
 # features
 increase-max-prefixes.patch

+ 11 - 1
debian/patches/use-strlcat.patch

@@ -1,8 +1,18 @@
 Description: Use strlcat provided by libbsd
 Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
 Forwarded: No
-Last-Update: 2016-07-21
+Last-Update: 2017-11-18
 
+--- a/configure.in
++++ b/configure.in
+@@ -25,6 +25,7 @@
+ 
+ AC_CHECK_LIB(z, gzopen, [], AC_MSG_ERROR([libz not found],1))
+ AC_CHECK_LIB(bz2, BZ2_bzReadOpen, [], AC_MSG_ERROR([libbzip2 not found],1))
++AC_CHECK_LIB(bsd, strlcat, [], AC_MSG_ERROR([libsd not found],1))
+ 
+ # Check for inet_ntoa in -lnsl if not found (Solaris)
+ AC_CHECK_FUNCS(inet_ntoa, [], AC_CHECK_LIB(nsl, inet_ntoa, [], AC_MSG_ERROR([inet_ntoa not found],1)))
 --- a/bgpdump_lib.c
 +++ b/bgpdump_lib.c
 @@ -37,6 +37,7 @@

+ 1 - 39
debian/rules

@@ -3,51 +3,13 @@
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 %:
-	dh $@ --with autoreconf
+	dh $@
 
 override_dh_clean:
 	dh_clean
 	-rm debian/bgpdump.1
 	-rm -rf debian/tests/test_out/
 
-override_dh_auto_clean:
-	# some extra loops for cleanup *after* build
-	if [ -d m4 ] ; then \
-		cp -v debian/Makefile.am debian/configure.ac . ; \
-	fi
-	dh_auto_clean
-	-rm Makefile.am configure.ac
-
-override_dh_autoreconf_clean:
-	dh_autoreconf_clean
-	# restore upstream files
-	for file in Makefile.in configure.in ; do \
-		if [ -f $$file.orig ] ; then \
-			mv -v $$file.orig $$file ; \
-		fi ; \
-	done
-
-override_dh_update_autotools_config:
-	cp -v debian/Makefile.am debian/configure.ac .
-	mkdir -p m4
-	# move upstream files out of the way
-	for file in Makefile.in configure.in ; do \
-		if [ -f $$file ] && [ ! -f $$file.orig ] ; then \
-			mv -v $$file $$file.orig ; \
-		fi ; \
-	done
-	dh_update_autotools_config
-
-override_dh_auto_configure:
-	dh_auto_configure
-	VERSION_AC="$$(awk '($$2=="VERSION"){print $$3}' bgpdump-config.h | cut -d'"' -f2)" ; \
-	VERSION_DEB="$$(dpkg-parsechangelog -SVersion | cut -d- -f1)" ; \
-	if [ "$$VERSION_AC" != "$$VERSION_DEB" ] ; then \
-		echo "Mismatch! Debian: $$VERSION_DEB, AC: $$VERSION_AC" ; \
-		echo "Fix debian/configure.ac to match debian/changelog" ; \
-		false ; \
-	fi
-
 override_dh_install:
 	dh_install
 	# don't ship the library for the time being, see README.Debian