Your message dated Sat, 15 Jul 2023 09:35:00 +0000
with message-id <e1qkbg4-002d3p...@fasolo.debian.org>
and subject line Bug#1039612: fixed in libtool 2.4.7-6
has caused the Debian Bug report #1039612,
regarding libtool: Incorrect check for += operator causes func_append to fail
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 ow...@bugs.debian.org
immediately.)
--
1039612: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1039612
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: libtool
Version: 2.4.6-15
Severity: grave
Tags: patch
Justification: renders package unusable
X-Debbugs-Cc: erjoa...@gmail.com
Dear Maintainer,
While building isc-dhcpd-server, I tried using autoreconf as per instructions
to generate the ./configure file.
But running `autoreconf -i` on this project failed with this error:
/usr/bin/libtoolize: 1: eval: hookable_fns+=: not found
/usr/bin/libtoolize: 1: eval: hookable_fns+=: not found
/usr/bin/libtoolize: 1: eval: hookable_fns+=: not found
/usr/bin/libtoolize: 1: eval: hookable_fns+=: not found
libtoolize: error: 'func_options_prep' does not accept hook functions.
autoreconf: libtoolize failed with exit status: 1
Some others have reported this error, but the solution mentioned in that thread
was to run as root, which I shouldn't have to do to build in a local directory:
https://github.com/libsndfile/libsndfile/issues/132#issue-153391414
Looking at the source, I noticed the problem is not that
`func_options_prep does not accept hook functions`,
but that the script assumes the append operator `+=` works when it doesn't.
This assumption is based on the value of BASH_VERSION, but unfortunately this
is not reliable:
if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
: ${_G_HAVE_ARITH_OP="yes"}
: ${_G_HAVE_XSI_OPS="yes"}
# The += operator was introduced in bash 3.1
case $BASH_VERSION in
[12].* | 3.0 | 3.0*) ;;
*)
: ${_G_HAVE_PLUSEQ_OP="yes"} # not really!
;;
esac
fi
It's not reliable because on my system, plain debian 11, /bin/sh is linked to
/usr/bin/dash, but the BASH_VERSION environment variable appears to have been
inherited from the bash process on my terminal and it is not
modified or deleted by dash. And += doesn't work in dash:
█[debian-x1-7th][isc-dhcp-4.4.1][0]$ ls -l /usr/bin/sh
lrwxrwxrwx 1 root root 4 Apr 27 17:06 /usr/bin/sh -> dash
█[debian-x1-7th][isc-dhcp-4.4.1][130]$ dash
\[\]█\[\][\h][\W][0]$ \[\]echo $BASH_VERSION
5.1.4(1)-release
\[\]█\[\][\h][\W][0]$ \[\]a=1
\[\]█\[\][\h][\W][0]$ \[\]a+=2
dash: 3: a+=2: not found
\[\]█\[\][\h][\W][127]$ \[\]
There's some advice online about how to find the true name of the shell:
https://stackoverflow.com/questions/23011370/ but I think it is too
complicated and error prone, and I think
the simplest way to correct this is to actually test for the feature directly
as is already being done in the script:
(eval 'x=a; x+=" b"; test "a b" = "$x"') && _G_HAVE_PLUSEQ_OP=yes
There is a comment expressing concern about speed of the test above and about
minimizing forks:
# We should try to minimise forks, especially on Windows where they are
# unreasonably slow, so skip the feature probes when bash or zsh are
# being used:
But I don't see any reason for needing a fork here:
if test -z "$_G_HAVE_PLUSEQ_OP" && \
__PLUSEQ_TEST="a" && \
__PLUSEQ_TEST+=" b" 2>/dev/null && \
test "a b" = "$__PLUSEQ_TEST"; then
_G_HAVE_PLUSEQ_OP=yes
fi
Even if a fork were needed, I don't think the possible speedup of avoiding the
a one-line feature probe is worth the risk of breaking users who
invoke this script from a parent bash terminal.
I'm including my suggested patch inline below:
527,547c527,535
< # We should try to minimise forks, especially on Windows where they are
< # unreasonably slow, so skip the feature probes when bash or zsh are
< # being used:
< if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
< : ${_G_HAVE_ARITH_OP="yes"}
< : ${_G_HAVE_XSI_OPS="yes"}
< # The += operator was introduced in bash 3.1
< case $BASH_VERSION in
< [12].* | 3.0 | 3.0*) ;;
< *)
< : ${_G_HAVE_PLUSEQ_OP="yes"}
< ;;
< esac
< fi
<
< # _G_HAVE_PLUSEQ_OP
< # Can be empty, in which case the shell is probed, "yes" if += is
< # useable or anything else if it does not work.
< test -z "$_G_HAVE_PLUSEQ_OP" \
< && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
< && _G_HAVE_PLUSEQ_OP=yes
---
> # _G_HAVE_PLUSEQ_OP
> # Can be empty, in which case the shell is probed, "yes" if += is
> # usable or anything else if it does not work.
> if test -z "$_G_HAVE_PLUSEQ_OP" && \
> __PLUSEQ_TEST="a" && \
> __PLUSEQ_TEST+=" b" 2>/dev/null && \
> test "$__PLUSEQ_TEST" = "a b"; then
> _G_HAVE_PLUSEQ_OP=yes
> fi
Thanks,
Ernesto
*** Reporter, please consider answering these questions, where appropriate ***
* What led up to the situation?
* What exactly did you do (or not do) that was effective (or
ineffective)?
* What was the outcome of this action?
* What outcome did you expect instead?
*** End of the template - remove these template lines ***
-- System Information:
Debian Release: 11.7
APT prefers oldstable-updates
APT policy: (500, 'oldstable-updates'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Kernel: Linux 5.10.0-22-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages libtool depends on:
ii autotools-dev 20180224.1+nmu1
ii cpp 4:10.2.1-1
ii file 1:5.39-3
ii gcc [c-compiler] 4:10.2.1-1
ii gcc-10 [c-compiler] 10.2.1-6
ii libc6-dev [libc-dev] 2.31-13+deb11u6
Versions of packages libtool recommends:
ii libltdl-dev 2.4.6-15
Versions of packages libtool suggests:
ii autoconf 2.69-14
ii automake [automaken] 1:1.16.3-2
pn gcj-jdk <none>
ii gfortran 4:10.2.1-1
ii gfortran-10 [fortran95-compiler] 10.2.1-6
pn libtool-doc <none>
-- no debconf information
527,547c527,535
< # We should try to minimise forks, especially on Windows where they are
< # unreasonably slow, so skip the feature probes when bash or zsh are
< # being used:
< if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
< : ${_G_HAVE_ARITH_OP="yes"}
< : ${_G_HAVE_XSI_OPS="yes"}
< # The += operator was introduced in bash 3.1
< case $BASH_VERSION in
< [12].* | 3.0 | 3.0*) ;;
< *)
< : ${_G_HAVE_PLUSEQ_OP="yes"}
< ;;
< esac
< fi
<
< # _G_HAVE_PLUSEQ_OP
< # Can be empty, in which case the shell is probed, "yes" if += is
< # useable or anything else if it does not work.
< test -z "$_G_HAVE_PLUSEQ_OP" \
< && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
< && _G_HAVE_PLUSEQ_OP=yes
---
> # _G_HAVE_PLUSEQ_OP
> # Can be empty, in which case the shell is probed, "yes" if += is
> # useable or anything else if it does not work.
> if test -z "$_G_HAVE_PLUSEQ_OP" && \
> __PLUSEQ_TEST="a" && \
> __PLUSEQ_TEST+=" b" 2>/dev/null && \
> test "a b" = "$__PLUSEQ_TEST"; then
> _G_HAVE_PLUSEQ_OP=yes
> fi
--- End Message ---
--- Begin Message ---
Source: libtool
Source-Version: 2.4.7-6
Done: Alastair McKinstry <mckins...@debian.org>
We believe that the bug you reported is fixed in the latest version of
libtool, 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 1039...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Alastair McKinstry <mckins...@debian.org> (supplier of updated libtool 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 ftpmas...@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Sat, 15 Jul 2023 09:09:39 +0100
Source: libtool
Architecture: source
Version: 2.4.7-6
Distribution: unstable
Urgency: medium
Maintainer: Alastair McKinstry <mckins...@debian.org>
Changed-By: Alastair McKinstry <mckins...@debian.org>
Closes: 1039583 1039612
Changes:
libtool (2.4.7-6) unstable; urgency=medium
.
* Incorrect check for += operator causes func_append to fail
Patch from Ernesto Alfonso. Closes: #1039612
* Standards-Version: 4.6.2
* Add Breaks/Replaces on libtldl3-dev. Closes: #1039583
Checksums-Sha1:
ed7fa31b4c6578341ae54c259d6e8fc961f61fc5 2257 libtool_2.4.7-6.dsc
9e3288021fb11ce26d85a2f173ea9f6bbad36292 40868 libtool_2.4.7-6.debian.tar.xz
Checksums-Sha256:
6bb0770dc9c58dd255050eea15ee3526b263320e91f47ac5cedc2e2c0e3d2c3f 2257
libtool_2.4.7-6.dsc
8994007979dbdfd14c09cf3c27aa38995f1357165bf21b7e22353b5b7c2ff890 40868
libtool_2.4.7-6.debian.tar.xz
Files:
dbc6f84e52cee4a4a7f34305ff1cc5e8 2257 devel optional libtool_2.4.7-6.dsc
e5a5bec8de937c7cdd3914d1722d25b0 40868 devel optional
libtool_2.4.7-6.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEgjg86RZbNHx4cIGiy+a7Tl2a06UFAmSyXS0ACgkQy+a7Tl2a
06X9qw//X4ftjL5X4pG9UZmAmdyNNK11HZpbTRCjrkNAOMOHDjyd18FXaWhZilKQ
w3YNE+BKJ27n7wzLcSxM4572YhFBAjRwf1/q8fk2XXfAny1JO/3Aowvx3XZwILXL
6aAZ2gfjFXgbGSZUzpBrHMhcuTiw51D3mXq3gr0hUwGvsD167qSvR8pf3azBAUBB
Kncl8br4BuhBfvlstRWgChT/3DF0FLPxD3ukzxdmE7goHby7tEuWJUKxaH/MhCpn
dTJtAOgse8ADAaTifBT1Yzvac6sxsTixg5EuSOxcvXvd+siglhzzeYro/Yq5ZuAT
LE8jiQEGgppahrufCTCVoTxNYD88x48bIsLnCkGJCnh2CmGN/3TWzhs6J0W9sxhR
elgCeRo/gDQ0Bzqv0rE3IhtMYyGQoGjsoxN1eMNpNLcGikDScicH9ma6R5JkMAzH
IF8Ixo2bFMUbaI7Iy4pLo0U0HNpEqOl/vvgzAmkBnQ2W3d2T9Qc6DignLT/eYj4g
YbbL9rt72m0Wn9VKtcYQsJDOJG/z9zCiQ8EP2qVbZTh3YmBtxwKOUQ/isWVse3WT
GN/OnTBtBlkzK05bRY1a4P1ehUHk/KR/EqHCNHW9a8oRDbBTY21fYAN5Jpw5hoHw
8GVVoY1YXS8Ctm+F11/agEg9wZv0ZKoqXqFl/3IvwOT0WJasw7Y=
=fkTe
-----END PGP SIGNATURE-----
--- End Message ---