On Wed, 13 Mar 2024 13:03:20 +0100 Lucas Nussbaum <lu...@debian.org>
wrote:
> Source: lftp
> Version: 4.9.2-2
> Severity: serious
> Justification: FTBFS
> Tags: trixie sid ftbfs
> User: lu...@debian.org
> Usertags: ftbfs-20240313 ftbfs-trixie
> 
> Hi,
> 
> During a rebuild of all packages in sid, your package failed to build
> on amd64.
> 
> 
> Relevant part (hopefully):
> > /bin/bash ../libtool --silent  --tag=CC   --mode=compile gcc -
DHAVE_CONFIG_H -I.   -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -
Werror=implicit-function-declaration -ffile-prefix-
map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection
-Wformat -Werror=format-security -fcf-protection -g -Wall -Wall -MT
argmatch.lo -MD -MP -MF $depbase.Tpo -c -o argmatch.lo argmatch.c &&\
> > mv -f $depbase.Tpo $depbase.Plo
> > In file included from argmatch.c:22:
> > ./config.h:2540:11: fatal error: trio.h: No such file or directory
> >  2540 | # include "trio.h"
> >       |           ^~~~~~~~
> > compilation terminated.
> > make[5]: *** [Makefile:2321: argmatch.lo] Error 1
> 
> 
> The full build log is available from:
> http://qa-logs.debian.net/2024/03/13/lftp_4.9.2-2_unstable.log
> 
> All bugs filed during this archive rebuild are listed at:
>
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lu...@debian.org
> or:
>
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240313&fusertaguser=lu...@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results
> 
> A list of current common problems and possible solutions is available
at
> http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to
contribute!
> 
> If you reassign this bug to another package, please mark it as
'affects'-ing
> this package. See https://www.debian.org/Bugs/server-control#affects
> 
> If you fail to reproduce this, please provide a build log and diff it
with mine
> so that we can identify if something relevant changed in the meantime.

We applied following changes in Ubuntu to fix the build failure (patch
attached):

  * Fix C99 compatibility issue (patch taken from upstream)
  * configure.ac: Bump gettext version to 0.21
  * d/rules: Switch to dh to regenerate the configure script
  * Replace obsolete pkg-config build dependency by pkgconf
  * Drop obsolete debian/menu (would be installed by dh)

-- 
Benjamin Drung
Debian & Ubuntu Developer
diff --git a/debian/control b/debian/control
index cea175a..0346640 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com>
 XSBC-Original-Maintainer: Noël Köthe <n...@debian.org>
 Standards-Version: 4.6.1
-Build-Depends: debhelper-compat (= 13), debhelper (>> 13.0.0), libncurses-dev, libreadline-dev, gettext, gawk, bison, libgnutls28-dev, pkg-config, libidn2-dev, zlib1g-dev
+Build-Depends: debhelper-compat (= 13), debhelper (>> 13.0.0), libncurses-dev, libreadline-dev, gettext, gawk, bison, libgnutls28-dev, pkgconf, libidn2-dev, zlib1g-dev
 Homepage: https://lftp.yar.ru
 Rules-Requires-Root: no
 
diff --git a/debian/menu b/debian/menu
deleted file mode 100644
index b0fee43..0000000
--- a/debian/menu
+++ /dev/null
@@ -1,4 +0,0 @@
-?package(lftp):needs="text" section="Apps/Net" \
-title="Lftp" command="/usr/bin/lftp" \
-hints="FTP" \
-description="Reliable, easy and powerful ftp command-line client"
diff --git a/debian/patches/Fix-C99-compatibility-issue.patch b/debian/patches/Fix-C99-compatibility-issue.patch
new file mode 100644
index 0000000..745a448
--- /dev/null
+++ b/debian/patches/Fix-C99-compatibility-issue.patch
@@ -0,0 +1,27 @@
+From: DJ Delorie <d...@redhat.com>
+Date: Wed, 8 Feb 2023 23:37:37 -0500
+Subject: Fix C99 compatibility issue
+
+Related to:
+
+  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
+  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
+
+Closes: #1066396
+Origin: upstream, https://github.com/lavv17/lftp/commit/8af97cc255c3d2488adb107515bd1047dbedadfe
+---
+ m4/needtrio.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/m4/needtrio.m4 b/m4/needtrio.m4
+index 45478f9..8b350a8 100644
+--- a/m4/needtrio.m4
++++ b/m4/needtrio.m4
+@@ -9,6 +9,7 @@ AC_DEFUN([LFTP_NEED_TRIO],[
+       else
+ 
+       AC_RUN_IFELSE([AC_LANG_SOURCE([[
++	 #include <stdio.h>
+ 	 int main()
+ 	 {
+ 	    unsigned long long x=0,x1;
diff --git a/debian/patches/configure.ac-Bump-gettext-version-to-0.21.patch b/debian/patches/configure.ac-Bump-gettext-version-to-0.21.patch
new file mode 100644
index 0000000..406de03
--- /dev/null
+++ b/debian/patches/configure.ac-Bump-gettext-version-to-0.21.patch
@@ -0,0 +1,44 @@
+From: Benjamin Drung <benjamin.dr...@canonical.com>
+Date: Tue, 9 Apr 2024 15:08:22 +0200
+Subject: configure.ac: Bump gettext version to 0.21
+
+After running autoreconf and configure on Ubuntu 24.04 (noble), the
+generated `po/Makefile` will fail to run `make install`:
+
+```
+$ make install DESTDIR=debian/lftp
+[...]
+Making install in po
+make[4]: Entering directory 'po'
+debian/lftp/usr/share
+make[4]: debian/lftp/usr/share: Permission denied
+```
+
+This failure is caused by `mkdir_p` pointing to `MKDIR_P` but `MKDIR_P`
+not being defined in `po/Makefile`.
+
+Upgrade to gettext version to 0.21. Then `po/Makefile` will be correct:
+
+```
+MKDIR_P = /usr/bin/mkdir -p
+mkdir_p = $(MKDIR_P)
+```
+
+Forwarded: https://github.com/lavv17/lftp/pull/727
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7fae422..5db5a17 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -138,7 +138,7 @@ AM_ICONV
+ 
+ ALL_LINGUAS="de es fr it ja ko pl pt_BR ru uk zh_CN zh_TW zh_HK cs"
+ AM_GNU_GETTEXT([external])
+-AM_GNU_GETTEXT_VERSION([0.15])
++AM_GNU_GETTEXT_VERSION([0.21])
+ test "$MSGFMT"  = "no" && MSGFMT  ="$missing_dir/missing msgfmt"
+ test "$GMSGFMT" = "no" && GMSGFMT ="$missing_dir/missing msgfmt"
+ test "$XGETTEXT" = ":" && XGETTEXT="$missing_dir/missing xgettext"
diff --git a/debian/patches/series b/debian/patches/series
index d019883..13aa6ec 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,5 @@
 config-dns-inet6_before_inet.patch
 lftp_sys-stdint-kfreebsd.patch
 lftp_gnutls_certificate_verify_peers2-verify_server_certificates.patch
+Fix-C99-compatibility-issue.patch
+configure.ac-Bump-gettext-version-to-0.21.patch
diff --git a/debian/rules b/debian/rules
index e0872ed..5866f3a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,95 +3,21 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-DEB_HOST_GNU_TYPE ?=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
-ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
-confflags= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
-else
-confflags= --build $(DEB_BUILD_GNU_TYPE)
-endif
+%:
+	dh $@
 
-DEB_BUILD_MAINT_OPTIONS = hardening=+all
-DPKG_EXPORT_BUILDFLAGS = 1
-include /usr/share/dpkg/buildflags.mk
-CFLAGS += -g -Wall
+override_dh_auto_configure:
+	dh_auto_configure -- --with-pager=/etc/alternatives/pager --disable-rpath --with-libidn2
 
-#configure: configure-stamp
-configure-stamp:
-	dh_testdir
-	# Add here commands to configure the package.
-	CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure \
-			--prefix=/usr \
-			--mandir=\$${prefix}/share/man \
-			--infodir=\$${prefix}/share/info \
-			--sysconfdir=/etc \
-			--with-pager=/etc/alternatives/pager \
-			--disable-rpath \
-			--with-libidn2 \
-			$(confflags)
-
-	touch configure-stamp
-
-build: build-arch build-indep
-
-build-arch: build-stamp
-
-build-indep: build-stamp
-
-build-stamp: configure-stamp
-	dh_testdir
-
-	# Add here commands to compile the package.
-	$(MAKE)
-
-	touch build-stamp
-
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp configure-stamp
-
-	# Add here commands to clean up after the build process.
-	[ ! -f Makefile ] || $(MAKE) distclean
+override_dh_auto_clean:
+	dh_auto_clean
 	rm -f doc/lftp.inf*
 
-	dh_clean
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_prep
-	dh_installdirs
-
-	# Add here commands to install the package into debian/lftp.
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/lftp
+override_dh_auto_install:
+	dh_auto_install
 	rm -rf $(CURDIR)/debian/lftp/usr/lib
 
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_installdebconf	
-	dh_installdocs
-	dh_installexamples
-	dh_installman
-	dh_installinfo -a
-	dh_installchangelogs NEWS
-	dh_link
-	dh_strip
-	dh_compress
-	dh_fixperms
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+# Skip tests, because they need Internet access.
+override_dh_auto_test:

Reply via email to