Bug#1051431: libauthen-pam-perl FTCBFS: invokes ./configure without --host

Helmut Grohne helmut at subdivi.de
Thu Sep 7 21:30:35 BST 2023


Source: libauthen-pam-perl
Version: 0.16-5
Tags: patch
User: debian-cross at lists.debian.org
Usertags: ftcbfs

libauthen-pam-perl fails to cross build from source, because ./configure
is run without --host and fails that way. It is run from Makefile.PL
without any arguments and this makes injecting the --host flag
particularly difficult. I propose making that configure invocation from
Makefile.PL optional. If it sees a config.status, it may assume that
configure was successful and skip it. In the packaging, we can then
simply configure before handing off to Makefile.PL and let
dh_auto_configure pass the right flag. I'm attaching a patch for your
convenience. Does that work for you?

Helmut
-------------- next part --------------
diff --minimal -Nru libauthen-pam-perl-0.16/debian/changelog libauthen-pam-perl-0.16/debian/changelog
--- libauthen-pam-perl-0.16/debian/changelog	2022-06-15 17:58:51.000000000 +0200
+++ libauthen-pam-perl-0.16/debian/changelog	2023-09-07 22:23:44.000000000 +0200
@@ -1,3 +1,10 @@
+libauthen-pam-perl (0.16-5.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Call ./configure with --host. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Thu, 07 Sep 2023 22:23:44 +0200
+
 libauthen-pam-perl (0.16-5) unstable; urgency=medium
 
   * Team upload.
diff --minimal -Nru libauthen-pam-perl-0.16/debian/patches/cross.patch libauthen-pam-perl-0.16/debian/patches/cross.patch
--- libauthen-pam-perl-0.16/debian/patches/cross.patch	1970-01-01 01:00:00.000000000 +0100
+++ libauthen-pam-perl-0.16/debian/patches/cross.patch	2023-09-07 22:23:44.000000000 +0200
@@ -0,0 +1,15 @@
+--- libauthen-pam-perl-0.16.orig/Makefile.PL
++++ libauthen-pam-perl-0.16/Makefile.PL
+@@ -5,8 +5,10 @@
+     $ENV{'CC'} # If a compiler is not specified on the command line then
+       or $ENV{'CC'} = $Config{'cc'}; # use the one with which perl was built
+ 
+-    system("./configure") == 0 or
+-      die "Error in configuring the Authen::PAM module.\n";
++    if (! -e "./config.status") {
++      system("./configure") == 0 or
++        die "Error in configuring the Authen::PAM module.\n";
++    }
+ 
+     # returns a reference to anonymous hash which is then interpreted as
+     # additional options to the WriteMakeFile
diff --minimal -Nru libauthen-pam-perl-0.16/debian/patches/series libauthen-pam-perl-0.16/debian/patches/series
--- libauthen-pam-perl-0.16/debian/patches/series	2022-06-15 17:58:51.000000000 +0200
+++ libauthen-pam-perl-0.16/debian/patches/series	2023-09-07 22:23:44.000000000 +0200
@@ -1,2 +1,3 @@
 spelling.patch
 perl-inc.patch
+cross.patch
diff --minimal -Nru libauthen-pam-perl-0.16/debian/rules libauthen-pam-perl-0.16/debian/rules
--- libauthen-pam-perl-0.16/debian/rules	2022-06-15 17:58:51.000000000 +0200
+++ libauthen-pam-perl-0.16/debian/rules	2023-09-07 22:23:42.000000000 +0200
@@ -5,6 +5,7 @@
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 override_dh_auto_configure:
+	dh_auto_configure --buildsystem=autoconf
 	dh_auto_configure --buildsystem=perl_makemaker
 
 override_dh_auto_test:


More information about the pkg-perl-maintainers mailing list