Your message dated Fri, 06 Jan 2023 07:35:04 +0000
with message-id <[email protected]>
and subject line Bug#1024721: fixed in dh-lua 29
has caused the Debian Bug report #1024721,
regarding dh-lua: stop using libtool-bin
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1024721: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1024721
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: dh-lua
Version: 27+nmu1
Tags: patch
X-Debbugs-Cc: [email protected]

Hi,

I would like to delete the libtool-bin package. The next paragraph
explains why. You may skip it if you don't care.

libtool-bin used to be part of libtool. When we started cross building
stuff, we wanted to mark libtool Multi-Arch foreign, but it contained
/usr/bin/libtool which very much is architecture-dependent, so that was
wrong. The way forward was to move /usr/bin/libtool out of libtool into
a new package libtool-bin. Back then, we did an archive rebuild and lots
of places actually didn't need /usr/bin/libtool. Another pile was
converted to avoid needing libtool. The rest simply got a libtool-bin
dependency. Now /usr/bin/libtool is not how libtool is meant to be used.
In theory, you're supposed to libtoolize and create a libtool as part of
the build. In particular, /usr/bin/libtool cannot be used for cross
builds, but if you create a libtool during build, it will support cross
builds. Thus we want to remove the libtool-bin package and
/usr/bin/libtool from the archive.

I've come up with a patch that creates a libtool when needed in
debian/.dh_lua-libtool. With this patch applied, I can drop the
libtool-bin dependency. I've done a test build of lua-geoip using this
the patched dh-lua and see that it builds successfully without pulling
the libtool-bin package.

So I went ahead and used ratt to check for possible failures in those
103 reverse dependencies and found the following failures:
 - axtls is broken by my patch, because it injects -laxtls into compiler
   flags picked up by configure.
 - elektra #956949
 - hamlib is broken by my patch, because it injects a non-existent
   object file into compiler flags picked up by configure.
 - libguestfs FTBFS on buildds
 - lua-apr #935271
 - lua-cyrussasl is broken by my patch, because it injects shell code
   into compiler flags picked up by configure and configure passes that
   code to the compiler verbatim.
 - lua-zip is broken by my patch, because it injects shell code
   into compiler flags picked up by configure and configure passes that
   code to the compiler verbatim.
 - luasocket is broken by my patch, because of a quoting issue in the
   generated configure arising from LTCFGFLAGS containing quotes.
 - neomutt #1023767
 - rrdtool is broken by my patch, because it injects -lrrd into compiler
   flags picked up by configure.

So applying this patch would make six additional packages FTBFS. Of
those, axtls and rrdtool try adding their library via CLIB_LDFLAGS. Both
of them use a relative path with -L, which becomes invalid in configure.
Adding $(CURDIR) may be a way to go here. hamlib could likewise prefix
its object file with $(CURDIR). cyrus-sasl should use $(shell ...)
instead of $$(...) to perform the shell evaluation. Likewise, lua-zip
should use $(shell ...) in place of `...`. Finally, luasocket is
difficult. Getting the quoting through the flags seems next to
impossible, so I'd suggest moving the affected macros to a file and pass
an -include flag via CFLAGS.

Does this sound like we can move forward with this patch? I know it is
not of the "it just works" kind.

Helmut
diff --minimal -Nru dh-lua-27+nmu1/Makefile dh-lua-27+nmu2/Makefile
--- dh-lua-27+nmu1/Makefile     2020-06-30 18:22:21.000000000 +0200
+++ dh-lua-27+nmu2/Makefile     2022-11-23 16:21:50.000000000 +0100
@@ -31,6 +31,7 @@
        cp test/5.2/* $(DESTDIR)/$(DH_LUA_HOME)/test/5.2/
        cp test/5.3/* $(DESTDIR)/$(DH_LUA_HOME)/test/5.3/
        cp test/5.4/* $(DESTDIR)/$(DH_LUA_HOME)/test/5.4/
+       cp data/configure.ac $(DESTDIR)/$(DH_LUA_HOME)/
        cp debhelper7/buildsystem/* $(DESTDIR)/$(DH_HOME)/Buildsystem/
        cp debhelper7/sequence/* $(DESTDIR)/$(DH_HOME)/Sequence/
        cat doc/policy.txt | sed 's/@@V@@/$(POLICY_VERSION)/' \
diff --minimal -Nru dh-lua-27+nmu1/data/configure.ac 
dh-lua-27+nmu2/data/configure.ac
--- dh-lua-27+nmu1/data/configure.ac    1970-01-01 01:00:00.000000000 +0100
+++ dh-lua-27+nmu2/data/configure.ac    2022-11-23 16:21:50.000000000 +0100
@@ -0,0 +1,4 @@
+dnl this is a minimal configure.ac for creating a libtool
+AC_INIT([dummy],[1.0])
+LT_INIT
+AC_OUTPUT
diff --minimal -Nru dh-lua-27+nmu1/debian/changelog 
dh-lua-27+nmu2/debian/changelog
--- dh-lua-27+nmu1/debian/changelog     2022-09-03 11:25:48.000000000 +0200
+++ dh-lua-27+nmu2/debian/changelog     2022-11-23 16:21:50.000000000 +0100
@@ -1,3 +1,10 @@
+dh-lua (27+nmu2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Stop using libtool-bin. (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Wed, 23 Nov 2022 16:21:50 +0100
+
 dh-lua (27+nmu1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff --minimal -Nru dh-lua-27+nmu1/debian/control dh-lua-27+nmu2/debian/control
--- dh-lua-27+nmu1/debian/control       2020-06-30 18:22:21.000000000 +0200
+++ dh-lua-27+nmu2/debian/control       2022-11-23 16:21:50.000000000 +0100
@@ -11,7 +11,7 @@
 
 Package: dh-lua
 Architecture: all
-Depends: ${misc:Depends}, ${perl:Depends}, debhelper (>= 8.0.0), dctrl-tools, 
libtool, libtool-bin, pkg-config, libfile-find-rule-perl,
+Depends: ${misc:Depends}, ${perl:Depends}, debhelper (>= 8.0.0), dctrl-tools, 
libtool, pkg-config, libfile-find-rule-perl,
  liblua5.4-dev, lua5.4,
  liblua5.3-dev, lua5.3,
  liblua5.2-dev, lua5.2,
diff --minimal -Nru dh-lua-27+nmu1/make/dh-lua.Makefile.single 
dh-lua-27+nmu2/make/dh-lua.Makefile.single
--- dh-lua-27+nmu1/make/dh-lua.Makefile.single  2022-09-03 11:25:39.000000000 
+0200
+++ dh-lua-27+nmu2/make/dh-lua.Makefile.single  2022-11-23 16:21:50.000000000 
+0100
@@ -2,6 +2,9 @@
 # License: MIT/X
 # vim: foldmethod=marker:ft=make
 
+include /usr/share/dpkg/architecture.mk
+include /usr/share/dpkg/buildtools.mk
+
 # override for more verbose output
 ifeq "$(DH_VERBOSE)-$(findstring verbose,$(DH_LUA_OPTS))" "-"
 H=@
@@ -44,7 +47,9 @@
 LUA=lua$(LUA_VERSION)
 C_TEST_FILE=$(DH_LUA_SUPPORT_FILES)test/$(LUA_VERSION)/app.c
 PREFIX=$(DESTDIR)/usr/
-LBTL=libtool --tag=CC
+LBTL_DIR=$(CURDIR)/debian/.dh_lua-libtool
+LBTL_EXE=$(LBTL_DIR)/libtool
+LBTL=$(LBTL_EXE) --tag=CC
 ifeq "$(LUA_SOURCES_MANGLER)" ""
        LUA_SOURCES_MANGLER:=cat
 endif
@@ -52,13 +57,13 @@
 # .pc
 PKG_CONF_NAME=$(LUA)-$(PKG_NAME_DASH).pc
 DEB_PKGCONFIG_TEMPL=$(DH_LUA_SUPPORT_FILES)/template/pkg-config.pc.in
-PKGCONF=pkg-config $(LUA) --define-variable=prefix=$(PREFIX)
+PKGCONF=$(PKG_CONFIG) $(LUA) --define-variable=prefix=$(PREFIX)
 ifeq "$(PKG_VERSION)" ""
 PKG_VERSION=$(shell dpkg-parsechangelog|grep ^Ver|cut -d ' ' -f 2|cut -d '-' 
-f 1)
 endif
 
 # sanity check
-ifneq "$(shell pkg-config $(LUA) --exists; echo $$?)" "0"
+ifneq "$(shell $(PKG_CONFIG) $(LUA) --exists; echo $$?)" "0"
 $(error "pkg-config file for $(LUA) not found") 
 endif
 
@@ -83,7 +88,6 @@
 # /usr/lib/, /usr/lib/lua/5.1, /usr/share/lua/5.1/
 LUA_CPATH:=$(shell $(PKGCONF) --define-variable=abiver=$(LUA_VERSION) 
--variable=INSTALL_CMOD)
 LUA_SPATH:=$(shell $(PKGCONF) --define-variable=abiver=$(LUA_VERSION) 
--variable=INSTALL_LMOD)
-DEB_HOST_MULTIARCH:=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 LUA_LPATH=$(PREFIX)/lib/$(DEB_HOST_MULTIARCH)
 
 # /usr/include/lua5.1
@@ -129,10 +133,6 @@
 # where to find stuff
 LUA_INIT=' package.path="$(UID)/?.lua;$(UID)/?/init.lua;"..package.path; 
package.cpath="$(UID)/?.so;"..package.cpath; '
 
-# to help crosscompiling
-DEB_BUILD_ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
-DEB_HOST_ARCH:=$(shell dpkg-architecture -qDEB_HOST_ARCH)
-
 # lua5.2 specific
 ifeq "$(LUA_VERSION)" "5.2"
        LUA_TEST := $(subst /usr/bin/shake,,$(LUA_TEST))
@@ -173,6 +173,7 @@
 clean: sanity
        $(H)$(RM) -rf $(UID)/
        $(H)$(call empty_trash)
+       $(H)$(RM) -rf $(LBTL_DIR)
        # fix for leftovers of dh-lua < 14
        $(H)$(RM) -f debian/backup
 autopkgtest: sanity test-lua-dynamic-apkgt-$(LUA_TEST_KIND)
@@ -185,6 +186,11 @@
                exit 1;\
        fi
 
+$(LBTL_EXE):
+       $(H)mkdir -p $(LBTL_DIR)
+       $(H)cp /usr/share/dh-lua/configure.ac $(LBTL_DIR)/configure.ac
+       $(H)cd $(LBTL_DIR) && LIBTOOLIZE='libtoolize -i' autoreconf -f -i
+       $(H)dh_auto_configure --buildsystem=autoconf 
--sourcedirectory=$(LBTL_DIR)
 # }}}
 
 # {{{ helper macros
@@ -331,7 +337,7 @@
        $(H)$(call run_multiple_tests,$(LUA_TEST),$(UID)/app-static)
        @echo "**************************************************"
 
-test-app-dynamic-real: $(UID)/app-dynamic
+test-app-dynamic-real: $(UID)/app-dynamic $(LBTL_EXE)
        @echo "********************** app dynamic ($(LUA_VERSION)) *********"
        $(H)$(call run_multiple_tests,$(LUA_TEST),\
                        $(LBTL) --mode=execute -dlopen $(UID)/$(LIBNAME).la \
@@ -368,7 +374,7 @@
 # ------------------------- Installation 
---------------------------------------
   
 # {{{ install static and dynamic libraries for module to global location
-installso: $(UID)/$(LIBNAME).la $(UID)/$(PKG_CONF_NAME) $(LUA_HEADER)
+installso: $(UID)/$(LIBNAME).la $(UID)/$(PKG_CONF_NAME) $(LUA_HEADER) 
$(LBTL_EXE)
        # .so
        $(H)echo Installing $(LIBNAME)
        $(H)mkdir -p $(LUA_CPATH)
@@ -435,10 +441,10 @@
 # ------------------------- C compilation 
--------------------------------------
 
 # {{{ compilation rules: .lo .la app
-$(UID)/%.lo: %.c
+$(UID)/%.lo: %.c $(LBTL_EXE)
        $(LBTL) --mode=compile $(CC) -c $(CFLAGS) -o $@ $< 
 
-$(UID)/$(LIBNAME).la $(UID)/$(LUA_MODNAME_PATH).so: $(addprefix 
$(UID)/,$(CLIB_OBJS))
+$(UID)/$(LIBNAME).la $(UID)/$(LUA_MODNAME_PATH).so: $(addprefix 
$(UID)/,$(CLIB_OBJS)) $(LBTL_EXE)
        $(LBTL) --mode=link $(CC) \
            -rpath $(LUA_LPATH) -version-info $(VERSION_INFO) 
-Wl,--no-add-needed \
                -o $(UID)/$(LIBNAME).la \
@@ -449,14 +455,14 @@
                $(UID)/$(LUA_MODNAME_PATH).so
        ldd $(UID)/$(LUA_MODNAME_PATH).so
 
-$(UID)/app-static: $(UID)/$(LIBNAME).la
+$(UID)/app-static: $(UID)/$(LIBNAME).la $(LBTL_EXE)
        $(LBTL) --mode=link $(CC) $(CFLAGS) -Wl,--no-add-needed \
                -static -o $@ -I . -I $(UID)/ \
                $(C_TEST_FILE) $(UID)/$(LIBNAME).la \
                $(LDFLAGS_STATIC) $(LUA_LBTL_S)
        ldd $(UID)/app-static
 
-$(UID)/app-dynamic: $(UID)/$(LIBNAME).la
+$(UID)/app-dynamic: $(UID)/$(LIBNAME).la $(LBTL_EXE)
        $(LBTL) --mode=link $(CC) $(CFLAGS) -Wl,--no-add-needed \
                -o $@ -I . -I $(UID)/ \
                $(C_TEST_FILE) $(UID)/$(LIBNAME).la \

--- End Message ---
--- Begin Message ---
Source: dh-lua
Source-Version: 29
Done: Sergei Golovan <[email protected]>

We believe that the bug you reported is fixed in the latest version of
dh-lua, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sergei Golovan <[email protected]> (supplier of updated dh-lua package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 06 Jan 2023 10:08:06 +0300
Source: dh-lua
Architecture: source
Version: 29
Distribution: unstable
Urgency: medium
Maintainer: Debian Lua Team <[email protected]>
Changed-By: Sergei Golovan <[email protected]>
Closes: 995544 1024721
Changes:
 dh-lua (29) unstable; urgency=medium
 .
   * Remove Enrico Tassi from the uploaders list (closes: #995544).
   * Don't use deprecated `which`, use `command -v` instead in Makefile.single.
   * Put versioned policy.txt to the doc directory.
   * Add a patch by Helmut Grohne to stop using libtool-bin. (closes: #1024721).
   * Switch build dependency to debhelper-compat.
   * Bump Debhelper compatibility level to 13.
   * Bump Standards-Version to 4.6.1.
Checksums-Sha1:
 b7aed102f3cf2a65257f8eb47b217e03d0fb74b0 1684 dh-lua_29.dsc
 34311850406cfdba24b3caf47d5fa0ff9ca0d7b6 23476 dh-lua_29.tar.xz
 d1a1885c43e6ac3c5b99b4abb449c65e699dec14 6209 dh-lua_29_amd64.buildinfo
Checksums-Sha256:
 e1d61ac368f578ce51fcae5d89ead3ccfa0a5dae08f4bb5cdeb5a1770ebbb4c3 1684 
dh-lua_29.dsc
 d53c2d0c59a5971786a53dd68b5f5e5f695c8205b02bcbb94c05dd3deb1e0a08 23476 
dh-lua_29.tar.xz
 fae55a35ee20a973c9e5f8184739a7a6ff1fd9f0bbef5f04412e9bc565a49f4b 6209 
dh-lua_29_amd64.buildinfo
Files:
 cad8a7ae555556be5bf519cc233ef763 1684 interpreters optional dh-lua_29.dsc
 3d762d7b79da78620d1d071efd4c9621 23476 interpreters optional dh-lua_29.tar.xz
 89f78db6e814d9c54b5b110dac1ee3f7 6209 interpreters optional 
dh-lua_29_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE/SYPsyDB+ShSnvc4Tyrk60tj54cFAmO3ylEACgkQTyrk60tj
54dQ1w//UT02dX3i5zSBCXe3LNphZc2HjmjJBfoGwgPxNERjEZFKd9JK9LLe2mDz
4EttvNUYku9x4YYpH6ccq9Pox0MdyLttDSyK+Z0xVUWwG+wyC3lErmjMTOHFDvJ3
kj0H3YW1PBlCGdoUj1aOXdzqt6PIALZoAb56c3KBTmhSJjj73mWfUVY1YJ2/K4ux
qNRHPdF4DqF2ozfcq00rdHqtgaeb8kvxB2wRAwG7jwWUeiTA5QavhOs3LfXMHujF
oSwcElm8H5RW8DgrtNSwm3dxffskX9IdPG3K6sPp5/LH1GYI98edvUQwGZ3R5C6X
Q1PuHDAMkO/tNIMkW/Lj47an8/9RjadKgBryi1mTy+FI6KDasKZUVgproRcAdT4x
XsUxS+VrMiC90h3zDi2+xc0dg62PW9/RJVv9lIJKHZ1i88BlBU3ao/v6EknUvOLJ
PI+AVfUgtGfSvzlcNoQYygb8852J1k1N735I++ScwyMHNHVfRLu5OVCN1g8jwG5T
iDGnD1qbQlhJpJTt4VyA4Hbol1gbxznUpTYJYEYq3ixYjHRW8mvT4gFgUYm+91ul
LkIy/zg2xa5xuu4x8EKb4+K7k5a3b/OpFqyP9MtNbNsa+wIeUrM5myb6a8dW6JRx
k+pFU2a8zxYhvS/Dcav7XK3TM0TjB5Wig2rkPnScg7pKOuK8y44=
=IzSw
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to