Source: apq Version: 3.2.0-2 Severity: serious Tags: patch Justification: FTBFS
Hello. Because of the Debian gnat-6 migration, the APQ package currently fails to build from source. The attached patch also fixes various less important issues.
From: Nicolas Boulenguez <[email protected]> Date: Tue, 24 May 2016 13:18:16 +0200 Subject: suggestion for APQ Debian package * Rebuild with gnat-6. Rename lib and -dev packages per Ada policy. Update ALI version, SO version and -dev dependencies accordingly. * Switch to gprbuild because gnatmake is dropping support for GNAT projects. * library-options.patch: most LDFLAGS need to be listed before -l options. * Switch from manual -dbg package to automatic -dbgsym package. * Enable all hardening flags. * Update Homepage, Standards-Version, Testsuite. Note: even if diff does not encode this properly, the debian/libapq*.install files are renamed, not modified. diff --git a/debian/control b/debian/control index 8184299..2d687f0 100644 --- a/debian/control +++ b/debian/control @@ -4,16 +4,19 @@ Priority: optional Maintainer: Adrian-Ken Rueegsegger <[email protected]> Uploaders: Reto Buerki <[email protected]>, Nicolas Boulenguez <[email protected]> -Build-Depends: debhelper (>= 9), gnat, gnat-4.9 +Build-Depends: debhelper (>= 9), gnat, gnat-6, + dpkg-dev (>= 1.16.1), +# providing /usr/share/dpkg/buildflags.mk + gprbuild (>= 2015-2) +# handling gnat-6 Build-Depends-Indep: texlive-latex-recommended, texlive-fonts-recommended, latex-xcolor, texlive-latex-extra -Standards-Version: 3.9.5 -Homepage: https://bitbucket.org/kowframework/ +Standards-Version: 3.9.8 +Homepage: https://github.com/ada-apq/apq/ Vcs-Browser: http://git.codelabs.ch/?p=debian/apq.git Vcs-Git: http://git.codelabs.ch/git/debian/apq.git -XS-Testsuite: autopkgtest -Package: libapq3.2.0.1 +Package: libapq3.2.0.2 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Pluggable Ada 95 Binding to various database systems (library) @@ -21,12 +24,10 @@ Description: Pluggable Ada 95 Binding to various database systems (library) PostgreSQL or MySQL. This is the core package providing the plugin loading support. -Package: libapq4-dev +Package: libapq5-dev Section: libdevel Architecture: any -Depends: ${misc:Depends}, libapq3.2.0.1 (= ${binary:Version}), gnat, gnat-4.9 -Breaks: libapq3.2.0-dev -Replaces: libapq3.2.0-dev +Depends: ${misc:Depends}, libapq3.2.0.2 (= ${binary:Version}), gnat, gnat-6 Description: Pluggable Ada 95 Binding to various database systems (development) APQ is a pluggable Ada 95 Binding to various database systems like PostgreSQL or MySQL. This is the core package providing the plugin @@ -34,20 +35,6 @@ Description: Pluggable Ada 95 Binding to various database systems (development) . This package contains the development files. -Package: libapq-dbg -Section: debug -Priority: extra -Architecture: any -Depends: ${misc:Depends}, libapq3.2.0.1 (= ${binary:Version}) -Recommends: libapq4-dev (= ${binary:Version}) -Suggests: gnat -Description: Pluggable Ada 95 Binding to various database systems (debug) - APQ is a pluggable Ada 95 Binding to various database systems like - PostgreSQL or MySQL. This is the core package providing the plugin - loading support. - . - This package contains the debugging symbols. - Package: libapq-doc Section: doc Architecture: all diff --git a/debian/copyright b/debian/copyright index 07d0889..9134cf2 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,7 +1,7 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: APQ Upstream-Contact: Marcelo Coraça de Freitas <[email protected]> -Source: http://bitbucket.org/kowframework/apq/src +Source: https://github.com/ada-apq/apq/ Files: * Copyright: @@ -35,7 +35,7 @@ License: GPL-2+ with Ada exception Files: debian/* Copyright: (C) 2009-2014 Adrian-Ken Rueegsegger <[email protected]> - (C) 2014 Nicolas Boulenguez <[email protected]> + (C) 2014-2016 Nicolas Boulenguez <[email protected]> License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/debian/libapq3.2.0.1.install b/debian/libapq3.2.0.1.install deleted file mode 100644 index 49cc562..0000000 --- a/debian/libapq3.2.0.1.install +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/*.so.* diff --git a/debian/libapq3.2.0.2.install b/debian/libapq3.2.0.2.install new file mode 100644 index 0000000..49cc562 --- /dev/null +++ b/debian/libapq3.2.0.2.install @@ -0,0 +1 @@ +/usr/lib/*.so.* diff --git a/debian/libapq4-dev.install b/debian/libapq4-dev.install deleted file mode 100644 index c733a12..0000000 --- a/debian/libapq4-dev.install +++ /dev/null @@ -1,4 +0,0 @@ -/usr/lib/*.a -/usr/lib/*.so -/usr/lib/ada -/usr/share/ada diff --git a/debian/libapq5-dev.install b/debian/libapq5-dev.install new file mode 100644 index 0000000..c733a12 --- /dev/null +++ b/debian/libapq5-dev.install @@ -0,0 +1,4 @@ +/usr/lib/*.a +/usr/lib/*.so +/usr/lib/ada +/usr/share/ada diff --git a/debian/patches/enable-setting-of-soname.patch b/debian/patches/enable-setting-of-soname.patch index 2cf5496..213a2b1 100644 --- a/debian/patches/enable-setting-of-soname.patch +++ b/debian/patches/enable-setting-of-soname.patch @@ -10,5 +10,5 @@ Description: Enable setting of library soname - for Library_Version use "lib" & Project'Library_Name & ".so." & Version; + for Library_Version use "lib" & Project'Library_Name & ".so." & External ("SOVERSION", Version); for Externally_Built use External( "APQ_EXTERNALLY_BUILT", "true" ); - for Library_Options use External_As_List ("LDFLAGS", " "); + for Leading_Library_Options use External_As_List ("LDFLAGS", " "); diff --git a/debian/patches/fix-version.patch b/debian/patches/fix-version.patch index 05d607f..7c5473e 100644 --- a/debian/patches/fix-version.patch +++ b/debian/patches/fix-version.patch @@ -8,7 +8,7 @@ Description: Sync version of sample project with library version. project APQ.Samples is - version := "2.3.0"; -+ version := "3.2.0"; ++ version := "3.2.0.2"; type Supported_OS is ("Windows_NT", "GNU/Linux"); diff --git a/debian/patches/library-options.patch b/debian/patches/library-options.patch index 82c553d..f7fc14f 100644 --- a/debian/patches/library-options.patch +++ b/debian/patches/library-options.patch @@ -11,7 +11,7 @@ Description: Enable configurable Library_Options and Compiler switches. for Library_Version use "lib" & Project'Library_Name & ".so." & Version; for Externally_Built use External( "APQ_EXTERNALLY_BUILT", "true" ); - -+ for Library_Options use External_As_List ("LDFLAGS", " "); ++ for Leading_Library_Options use External_As_List ("LDFLAGS", " "); diff --git a/debian/rules b/debian/rules index bbfdfa5..bdc2d98 100755 --- a/debian/rules +++ b/debian/rules @@ -3,12 +3,13 @@ PN = apq LIBDIR = debian/tmp/usr/lib/$(PN)/relocatable +DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie include /usr/share/dpkg/buildflags.mk -include /usr/share/ada/debian_packaging.mk +include /usr/share/ada/debian_packaging*.mk export LDFLAGS export ADAFLAGS -SOVERSION=3.2.0.1 +SOVERSION=3.2.0.2 export SOVERSION POLICY_TARGETS := binary binary-arch binary-indep build build-arch \ @@ -38,7 +39,7 @@ override_dh_auto_clean: override_dh_auto_build-arch: # -j in BUILDER_OPTIONS override the one in scripts/buildutils.sh. - ./configure --prefix=./debian/tmp/usr/ --gprbuild=gnatmake \ + ./configure --prefix=./debian/tmp/usr/ \ --gprbuild-params="$(BUILDER_OPTIONS)" dh_auto_build @@ -79,8 +80,3 @@ override_dh_auto_install-arch: .PHONY: override_dh_install override_dh_install: dh_install --all --fail-missing - -.PHONY: override_dh_strip -override_dh_strip: - dh_strip --dbg-package=lib$(PN)-dbg - dh_strip --remaining-packages diff --git a/debian/tests/control b/debian/tests/control index c792658..fdf42b4 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1 +1,2 @@ Tests: link-with-shared +Depends: @, gprbuild diff --git a/debian/tests/link-with-shared b/debian/tests/link-with-shared index c95d32d..3efb470 100644 --- a/debian/tests/link-with-shared +++ b/debian/tests/link-with-shared @@ -18,5 +18,5 @@ begin end M; EOF -gnatmake -q -P p.gpr +gprbuild p.gpr ./m

