Source: cpmtools Version: 2.20-2 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
cpmtools fails to build from source. The immediate cause is failure to pass --host to configure. The easiest way of doing so is letting dh_auto_configure do it. Unfortunately, it also passes dpkg-buildflags, which adds -Werror=format-security and makes the build fail, but we can set hardening=-format to avoid that. Consider fixing the underlying issue though. Later it strips with the build architecture strip during make install. This also happens to break generation of -dbgsym packages as well as DEB_BUILD_OPTIONS=nostrip. I'm attaching a patch for all of these (except the actual causes of -Werror=format-security) for your convenience. Helmut
diff --minimal -Nru cpmtools-2.20/debian/changelog cpmtools-2.20/debian/changelog --- cpmtools-2.20/debian/changelog 2017-12-30 07:35:59.000000000 +0100 +++ cpmtools-2.20/debian/changelog 2023-01-15 22:02:41.000000000 +0100 @@ -1,3 +1,11 @@ +cpmtools (2.20-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Let dh_auto_configure pass --host and pass a non-stripping + install to make install. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Sun, 15 Jan 2023 22:02:41 +0100 + cpmtools (2.20-2) unstable; urgency=low * updated to policy 4.1.3 diff --minimal -Nru cpmtools-2.20/debian/rules cpmtools-2.20/debian/rules --- cpmtools-2.20/debian/rules 2017-12-30 07:35:59.000000000 +0100 +++ cpmtools-2.20/debian/rules 2023-01-15 22:02:41.000000000 +0100 @@ -1,5 +1,8 @@ #!/usr/bin/make -f +# FTBFS with -Werror=format-security +export DEB_BUILD_MAINT_OPTIONS=hardening=-format + # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 @@ -8,8 +11,7 @@ dh_testdir cp /usr/share/misc/config.sub config.sub cp /usr/share/misc/config.guess config.guess - ./configure --prefix=/usr --mandir=\$${prefix}/share/man \ - --datarootdir=/etc/cpmtools + dh_auto_configure -- --datarootdir=/etc/cpmtools touch configure-stamp build: build-arch build-indep @@ -33,7 +35,8 @@ dh_prep dh_installdirs $(MAKE) install prefix=$(CURDIR)/debian/cpmtools/usr \ - datarootdir=$(CURDIR)/debian/cpmtools/etc/cpmtools + datarootdir=$(CURDIR)/debian/cpmtools/etc/cpmtools \ + 'INSTALL=install --strip-program=true' # Build architecture-independent files here. binary-indep: build install