Package: lintian; Maintainer for lintian is Debian Lintian Maintainers <lintian-maint@debian.org>; Source for lintian is src:lintian (PTS, buildd, popcon).
Reported by: Helmut Grohne <helmut@subdivi.de>
Date: Tue, 19 Dec 2017 20:00:02 UTC
Severity: wishlist
Fixed in version lintian/2.5.66
Done: Chris Lamb <lamby@debian.org>
Bug is archived. No further changes may be made.
View this report as an mbox folder, status mbox, maintainer mbox
Report forwarded
to debian-bugs-dist@lists.debian.org, Debian Lintian Maintainers <lintian-maint@debian.org>:
Bug#884798; Package lintian.
(Tue, 19 Dec 2017 20:00:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Helmut Grohne <helmut@subdivi.de>:
New Bug report received and forwarded. Copy sent to Debian Lintian Maintainers <lintian-maint@debian.org>.
(Tue, 19 Dec 2017 20:00:05 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: lintian
Severity: wishlist
User: helmutg@debian.org
Usertags: rebootstrap
Hi lintian developers,
I would like to discuss a potentially new tag. If this makes sense, I'd
hope that someone can turn it into code. If not, please close as
wontfix.
After sending like 1000 cross build patches, I can tell that wrong use
of pkg-config in autotools projects is common and poses a significant
fraction of said patches. The common theme is some upstream is using
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
or some variant of it in its configure.ac or configure.in. This causes
PKG_CONFIG to be initialized to pkg-config. A later PKG_CHECK_MODULES
will pick up this value rather than ${ac_tool_prefix}pkg-config. Using
the wrong pkg-config typically results in cross builds failing to find
.pc files. This is common.
A slightly better way would be using AC_PATH_TOOL (with the same
arguments) and the only difference here is considering $ac_tool_prefix.
The recommended way is using the PKG_PROG_PKG_CONFIG macro from
pkg-config tough. This macro will result in an empty PKG_CONFIG variable
if pkg-config happens to not be found rather than the "no" value
depicted above.
Some configure.ac and configure.in use plain pkg-config directly and
this tends to be broken as well. The immediate fix often is inserting
soe PKG_PROG_PKG_CONFIG and then using $PKG_CONFIG rather than
pkg-config.
Of course this is an upstream-only tag, and
https://codesearch.debian.net/search?q=AC_PATH_PROG.*pkg-config
shows just how common it is. Would this be suitable for a lintian tag?
If yes, what would be a good check? Should it just check the toplevel
configure.ac and configure.in or any file found on any directory level?
Should it just complain about the typical
AC_PATH_PROG\s*\(\s*\[?\s*\S*\s*\]?\s*[A-Z_]+\s*\[?\s*pkg-config\s*[,)]
or rather simply flag any use of pkg-config? The latter would cover the
correct but not very idiomatic
AC_PATH_TOOL(PKG_CONFIG, pkg-config, no)
as well. Potentially flagging
(\$\(|`)pkg-config
may help to catch the hard coded variants. I haven't performed a whole
archive-analysis yet, so I cannot tell about the amount of fpos to be
expected.
Let me also help draft a tag description:
The package uses AC_PATH_PROG to discover pkg-config. This macro
fails to select the correct pkg-config for cross compilation. A
better macro for discovering pkg-config is PKG_PROG_PKG_CONFIG from
pkg.m4.
And for the other case maybe:
The package directly invokes pkg-config without considering an
architecture prefix ($ac_tool_prefix) for cross compilation. A
better way would be discovering the correct pkg-config using
PKG_PROG_PKG_CONFIG from pkg.m4 and then using the shell variable
$PKG_CONFIG.
These are up for your improvements of course.
Looking forward to your feedback.
Helmut
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Lintian Maintainers <lintian-maint@debian.org>:
Bug#884798; Package lintian.
(Wed, 20 Dec 2017 22:48:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Chris Lamb <lamby@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Lintian Maintainers <lintian-maint@debian.org>.
(Wed, 20 Dec 2017 22:48:03 GMT) (full text, mbox, link).
Message #10 received at 884798@bugs.debian.org (full text, mbox, reply):
Hi Helmut,
> If yes, what would be a good check? Should it just check the toplevel
> configure.ac and configure.in or any file found on any directory level?
This is my primary concern — warning about broken configure.{am,in} in
code copies etc. that are not used would just be annoying.
It might be safe to simply check ./configure.{am,in} or perhaps a
hardcoded list of subdirs such as src/configure.{am,in}. What do you
think?
> I haven't performed a whole archive-analysis yet, so I cannot tell
> about the amount of fpos to be expected.
Would this be easy for you to do? Please go ahead if so and let us know.
Best wishes,
--
,''`.
: :' : Chris Lamb
`. `'` lamby@debian.org / chris-lamb.co.uk
`-
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Lintian Maintainers <lintian-maint@debian.org>:
Bug#884798; Package lintian.
(Fri, 22 Dec 2017 15:30:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Helmut Grohne <helmut@subdivi.de>:
Extra info received and forwarded to list. Copy sent to Debian Lintian Maintainers <lintian-maint@debian.org>.
(Fri, 22 Dec 2017 15:30:03 GMT) (full text, mbox, link).
Message #15 received at 884798@bugs.debian.org (full text, mbox, reply):
Hi Chris,
On Wed, Dec 20, 2017 at 10:45:04PM +0000, Chris Lamb wrote:
> > If yes, what would be a good check? Should it just check the toplevel
> > configure.ac and configure.in or any file found on any directory level?
>
> This is my primary concern ??? warning about broken configure.{am,in} in
> code copies etc. that are not used would just be annoying.
Yeah, that's roughly what I thought when posing the question.
> It might be safe to simply check ./configure.{am,in} or perhaps a
> hardcoded list of subdirs such as src/configure.{am,in}. What do you
> think?
That'd catch the big fish and the big fish is what I'm after. I don't
think there is a silver bullet, but if this check results in 20 packages
fixing their checks, then the effort has certainly paid off on my side.
> > I haven't performed a whole archive-analysis yet, so I cannot tell
> > about the amount of fpos to be expected.
>
> Would this be easy for you to do? Please go ahead if so and let us know.
Hmm. My scraping tooling mainly focuses on binary packages and doesn't
work on source packages at all. So the easiest way forward might be
using an existing unpack. So I looked into using sor.d.o. I came up with
the following script:
#!/usr/bin/python
import os
from debian.debian_support import version_compare
base = "/srv/sources.debian.org/sources/main"
for d in os.listdir(base):
subdir = os.path.join(base, d)
for pkg in os.listdir(subdir):
pkgdir = os.path.join(subdir, pkg)
ver = None
for v in os.listdir(pkgdir):
if v.endswith(".done"):
v = v[:-5]
if ver is None or version_compare(v, ver) > 0 and os.path.isdir(os.path.join(pkgdir, v)):
ver = v
if not ver:
continue
verdir = os.path.join(pkgdir, ver)
for e in ("configure.ac", "configure.in", "src/configure.ac", "src/configure.in"):
fn = os.path.join(verdir, e)
if os.path.isfile(fn):
with open(fn) as f:
for line in f:
if "AC_PATH_PROG" in line and "pkg-config" in line:
print("%s_%s/%s:%s" % (pkg, ver, e, line.strip()))
The script tries hard to minimize the io operations incurred on sor.d.o.
Running it for some time yields the following output:
aide_0.16-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, "")
anjuta-extras_3.26.0-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config,no)
anyremote_6.6.1-1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
apache2_2.4.29-1/configure.in:AC_PATH_PROG(PKGCONFIG, pkg-config)
apertium_3.4.2~r68466-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
apertium-dan_0.5.0~r67099-1/configure.ac:AC_PATH_PROG([PKGCONFIG], [pkg-config], [false], [$PATH$PATH_SEPARATOR$with_pkg_config/bin])
apertium-hbs_0.5.0~r68212-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
apertium-hin_0.1.0~r59158-1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
apertium-isl_0.1.0~r65494-1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
apertium-kaz_0.1.0~r61338-1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
apertium-nno_0.9.0~r69513-2/configure.ac:AC_PATH_PROG([PKGCONFIG], [pkg-config], [false], [$PATH$PATH_SEPARATOR$with_pkg_config/bin])
apertium-nob_0.9.0~r69513-1/configure.ac:AC_PATH_PROG([PKGCONFIG], [pkg-config], [false], [$PATH$PATH_SEPARATOR$with_pkg_config/bin])
apertium-spa_1.1.0~r79716-1/configure.ac:AC_PATH_PROG([PKGCONFIG], [pkg-config], [false], [$PATH$PATH_SEPARATOR$with_pkg_config/bin])
apertium-swe_0.7.0~r69513-1/configure.ac:AC_PATH_PROG([PKGCONFIG], [pkg-config], [false], [$PATH$PATH_SEPARATOR$with_pkg_config/bin])
apertium-tat_0.1.0~r60887-1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
apertium-urd_0.1.0~r61311-1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
appindicator3-sharp_12.10.0+git20151221-3/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
apertium-rus_0.1.0~r81184-1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
arts_1.5.9-3+deb6u1/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
adesklets_0.6.1-4/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config)
akode_2.0.2-3/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
apertium-tur_0.2.0~r83161-1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
balsa_2.5.3-4/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
bmon_1:4.0-4/configure.ac:AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
brltty_5.5-4/configure.ac:AC_PATH_PROG([PKG_CONFIG], [pkg-config], [false])
bamf_0.5.3-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
bareftp_0.3.9-3/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
bibledit-bibletime_1.1.1-3/configure.ac:AC_PATH_PROG(PKG_CONFIG_PATH, pkg-config, no)
bibledit-gtk_4.9-1/configure.ac:AC_PATH_PROG(PKG_CONFIG_PATH, pkg-config, no)
bibledit-xiphos_1.1.1-2/configure.ac:AC_PATH_PROG(PKG_CONFIG_PATH, pkg-config, no)
blam_1.8.9-4/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
bless_0.6.0-5/configure.ac:AC_PATH_PROG(PKG_CONFIG,pkg-config, no)
bochs_2.6-5/configure.in:AC_PATH_PROG(PKGCONFIG, pkg-config, not_found)
bodr_10-1/configure.ac:# AC_PATH_PROG(PKG_CONFIG, pkg-config, "no")
booth_1.0-3/configure.ac:AC_PATH_PROGS(PKGCONFIG, pkg-config)
bibledit_5.0.331-1/configure.ac:AC_PATH_PROG(PKG_CONFIG_PATH, pkg-config, no)
claws-mail_3.16.0-1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
caja_1.18.5-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
caja-actions_1.8.3-1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
caja-extensions_1.18.1-1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
chemtool_1.6.14-1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
clanlib_1.0~svn3827-7/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
cluster-glue_1.0.12-7/configure.ac:AC_PATH_PROGS(PKGCONFIG, pkg-config)
cowbell_0.2.7.1-7/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
cvsgraph_1.7.0-4/configure.in:AC_PATH_PROG(ac_prog_pkg_config, pkg-config)
cluster-agents_1:1.0.3-4/configure.in:AC_PATH_PROGS(PKGCONFIG, pkg-config)
cssed_0.4.0-4/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
compiz-fusion-plugins-extra_0.8.4-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
compiz-fusion-plugins-extra_0.8.4-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
compiz-fusion-plugins-main_0.8.4-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
compiz-fusion-plugins-main_0.8.4-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
compiz-fusion-plugins-unsupported_0.8.4-3/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
compiz-fusion-plugins-unsupported_0.8.4-3/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
cinepaint_0.20-1-1.3/configure.in:AC_PATH_PROG(OPENEXR_CONFIG, pkg-config, no)
cinepaint_0.20-1-1.3/configure.in:AC_PATH_PROG(PNG_CONFIG, pkg-config, no)
cinepaint_0.20-1-1.3/configure.in:AC_PATH_PROG(LCMS_CONFIG, pkg-config, no)
cinepaint_0.20-1-1.3/configure.in:AC_PATH_PROG(PRINT_CONFIG, pkg-config, no)
caja-seahorse_1.18.3-1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
directfb_1.7.7-6/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
dbus-sharp-glib_0.6.0-1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
ddccontrol_0.4.2-11/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
dimbl_0.15-1/configure.ac:AC_PATH_PROG(pkgconfigpath, pkg-config, NONE)
directvnc_0.7.7-1/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config)
drivel_3.0.3-1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
drapes_0.5.2-3.2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
dcgui_0.80-6/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config)
dctc_0.85.9-5/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config)
emacs24_24.5+1-11+deb9u1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
exonerate_2.4.0-2/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
emacs23_23.4+1-4/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
emacs22_22.2+2-5/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
evolution-sharp_0.17.1-2/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
freehdl_0.0.8-2.2/configure.ac:AC_PATH_PROG(PKGCONFIG, pkg-config, :)
frog_0.13.7-1/configure.ac:AC_PATH_PROG(pkgconfigpath, pkg-config, NONE)
fsgateway_0.1.1-5/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fsharp_4.0.0.4+dfsg2-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
ffprobe_0.svn92-1/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, pkg-config)
fluxconf_0.9.9-1/configure.in:AC_PATH_PROGS(PKGCONF,pkg-config)
fusionsound_1.0.0-3/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
ghostscript_9.22~dfsg-1/configure.ac:AC_PATH_PROG(BUILD_PKGCONFIG, pkg-config)
gcr_3.20.0-6/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gkeyfile-sharp_0.1-5/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gnome-do_0.95.3-5/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gnome-keyring_3.20.1-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gnome-sharp2_2.24.2-4/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gnome-subtitles_1.3-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gnome-user-share_3.18.3-3/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gnustep-base_1.25.0-2/configure.ac:AC_PATH_PROG(PKGCONFIG, pkg-config, yes, no)
gpdftext_0.1.6-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gpointing-device-settings_1.5.1-6/configure.ac:AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
gretl_2017d-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gshare_0.94-14/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gtk-sharp2_2.12.40-2/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gtk-sharp3_2.99.3-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gudev-sharp-1.0_0.1-4/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gvfs_1.34.1-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
g2ipmsg_0.9.6+dfsg-1.1/configure.in:AC_PATH_PROG(PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
gfax_0.7.7+ds-2/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gnome-desktop-sharp2_2.26.0-8/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gnome-photo-printer_0.7.0-1.2/configure.ac:AC_PATH_PROG(PKGCONFIG, pkg-config, no)
gnome-rdp_0.3.0.9-3/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gnome-schedule_2.1.1-4/configure.ac:AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
gnome-u2ps_0.0.4-4.2/configure.in:AC_PATH_PROG(PKG_CONFIG, [pkg-config], [no])
gpe-expenses_0.1.9-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gpe-expenses_0.1.9-2/configure.ac:AC_PATH_PROG(PKG_CONFIG,pkg-config)
gtkglarea-sharp_0.0.17-6/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gupnp-vala_0.10.4-1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gamix_1.99.p14.debian1-6/configure.in:AC_PATH_PROG(PKGC,pkg-config,no)
gfccore_2.3.1-7/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gfcui_2.3.1-8/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
ghc6_6.12.1-13/configure.ac:AC_PATH_PROGS([GTK_CONFIG], [pkg-config])
giver_0.1.8-6/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
glame_2.0.1-5/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gnome-swallow_1.2-4/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, , )
gsf-sharp_0.8-3/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
geda-gattrib_1:1.4.0-5/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
geda-gnetlist_1:1.4.0-3/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
geda-gschem_1:1.4.0-3/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
geda-gsymcheck_1:1.4.0-3/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
geda-utils_1:1.4.0-3/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
geda-utils_1:1.4.0-3/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gnome-build_0.2.4-1/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config,no)
gpsim-lcd-graphic_0.3.0-1.1/configure.ac:AC_PATH_PROG(PKGCONFIG, pkg-config, no, ${PATH})
gpsim-lcd_0.2.9-1/configure.in:AC_PATH_PROG(PKGCONFIG, pkg-config, no, ${PATH})
gsynaptics_0.9.14-6/configure.ac:AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
gtksourceview-sharp2_0.12-1/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gecko-sharp2_0.11-3/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gq_1.0.0-3/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config,,$PATH)
gq_1.0.0-3/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config,,$PATH)
gq_1.0.0-3/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config,,$PATH)
gs-esp_8.15.3.dfsg.1-1etch1/configure.ac:AC_PATH_PROG(PKGCONFIG, pkg-config)
gs-esp_8.15.3.dfsg.1-1etch1/src/configure.ac:AC_PATH_PROG(PKGCONFIG, pkg-config)
gtk-sharp_1:1.0.10-5/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
gudev-sharp-3.0_3.0.0-1/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
hfst_3.13.0~r3461-2/configure.ac:[AC_PATH_PROG([PKG_CONFIG], [pkg-config])
hfst-ospell_0.4.5~r343-2.1/configure.ac:AC_PATH_PROG([PKGCONFIG], [pkg-config], [no])
hocr_0.10.18-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
hyena_0.5-4/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
heartbeat-2_2.0.7-2/configure.in:AC_PATH_PROGS(PKGCONFIG, pkg-config)
imhangul_2.1.1-2/configure.in:dnl AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
imhangul3_3.1.1-2/configure.in:dnl AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
inkscape_0.92.2-2/configure.ac:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
isc-kea_1.1.0-1/configure.ac:AC_PATH_PROG([PKG_CONFIG], [pkg-config])
isync_1.2.1-2/configure.ac:AC_PATH_PROG(PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
inti-gl_0.9.0-3/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
inti-sourceview_0.6.0-4/configure.in:AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
...
From these, I'd estimate ~500 flagged packages. None of the matches look
like false positives. I suggest using the following pattern:
AC_PATH_PROG\s*\([^,]+,\s*\[?pkg-config\]?\s*,
In each case, switching to AC_PATH_TOOL looks like a straight forward
fix, but often enough using PKG_PROG_PKG_CONFIG would be even better.
Helmut
Added tag(s) pending.
Request was from Chris Lamb <lamby@debian.org>
to control@bugs.debian.org.
(Fri, 22 Dec 2017 20:12:06 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Lintian Maintainers <lintian-maint@debian.org>:
Bug#884798; Package lintian.
(Fri, 22 Dec 2017 20:21:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Chris Lamb <lamby@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Lintian Maintainers <lintian-maint@debian.org>.
(Fri, 22 Dec 2017 20:21:03 GMT) (full text, mbox, link).
Message #22 received at 884798@bugs.debian.org (full text, mbox, reply):
tags 884798 + pending
thanks
Implemented in Git:
https://anonscm.debian.org/git/lintian/lintian.git/commit/?id=70c81c7f1c9e96c8109988efe8aeca7ed17f122a
Let me know if you have any suggestions :)
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby@debian.org / chris-lamb.co.uk
`-
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Lintian Maintainers <lintian-maint@debian.org>:
Bug#884798; Package lintian.
(Fri, 22 Dec 2017 20:42:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Helmut Grohne <helmut@subdivi.de>:
Extra info received and forwarded to list. Copy sent to Debian Lintian Maintainers <lintian-maint@debian.org>.
(Fri, 22 Dec 2017 20:42:03 GMT) (full text, mbox, link).
Message #27 received at 884798@bugs.debian.org (full text, mbox, reply):
Hi Chris,
On Fri, Dec 22, 2017 at 08:09:20PM +0000, Chris Lamb wrote:
> https://anonscm.debian.org/git/lintian/lintian.git/commit/?id=70c81c7f1c9e96c8109988efe8aeca7ed17f122a
>
> Let me know if you have any suggestions :)
Yes, I do.
The tag description suggests that pkg-config could have been invoked
directly. While that is a common way to fail cross compilation, the
pattern does not check that other case.
My original description suggested using another pattern
(\$\(|`)pkg-config
for that other case matching the second paragraph of the tag
description. To see just how common this is, check:
https://codesearch.debian.net/search?q=path%3Aconfigure%5C.%5Bai%5D%5Bcn%5D+%28%5C%24%5C%28%7C%60%29pkg-config
I think you should remove the second paragraph from the description.
Flagging is probably better done in a separate tag (both of which can
and sometimes do happen in the same configure.ac).
I also wonder what the best advise actually is. Of course using
PKG_PROG_PKG_CONFIG is "best" in a sense, but it behaves subtly
different. The present use of AC_PATH_PROG gives choice of the variable
name and the value-for-absence to the user while the standard macro will
simply use PKG_CONFIG and an empty value. A number of scripts check
things like test "$PKG_CONFIG" = no and that would break when switching
the macro. On the other hand, using AC_PATH_TOOL in place of
AC_PATH_PROG is mostly risk-less, because it takes the very same
arguments and behaves in the same way (except for prepending
$ac_tool_prefix). So the better solution certainly is
PKG_PROG_PKG_CONFIG, but the riskless one certainly is AC_PATH_TOOL.
What are your thoughts here?
Helmut
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Lintian Maintainers <lintian-maint@debian.org>:
Bug#884798; Package lintian.
(Fri, 22 Dec 2017 20:51:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Chris Lamb <lamby@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Lintian Maintainers <lintian-maint@debian.org>.
(Fri, 22 Dec 2017 20:51:04 GMT) (full text, mbox, link).
Message #32 received at 884798@bugs.debian.org (full text, mbox, reply):
Hi Helmut,
> The tag description suggests that pkg-config could have been invoked
> directly. While that is a common way to fail cross compilation, the
> pattern does not check that other case.
Good call. I've renamed it to the more-generic:
autotools-pkg-config-macro-not-cross-compilation-safe
> I think you should remove the second paragraph from the description.
Done.
> I also wonder what the best advise actually is. Of course using
> PKG_PROG_PKG_CONFIG is "best" in a sense, but it behaves subtly
> different.
[…]
Unfortunately I'm not enough of an Autotools (ab)?user to have any
real input here. I defer to your esteemed and battle-hardenened
insight :)
Best wishes,
--
,''`.
: :' : Chris Lamb
`. `'` lamby@debian.org / chris-lamb.co.uk
`-
Reply sent
to Chris Lamb <lamby@debian.org>:
You have taken responsibility.
(Tue, 26 Dec 2017 15:51:37 GMT) (full text, mbox, link).
Notification sent
to Helmut Grohne <helmut@subdivi.de>:
Bug acknowledged by developer.
(Tue, 26 Dec 2017 15:51:37 GMT) (full text, mbox, link).
Message #37 received at 884798-close@bugs.debian.org (full text, mbox, reply):
Source: lintian
Source-Version: 2.5.66
We believe that the bug you reported is fixed in the latest version of
lintian, 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 884798@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Chris Lamb <lamby@debian.org> (supplier of updated lintian 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 ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Tue, 26 Dec 2017 14:59:29 +0000
Source: lintian
Binary: lintian
Architecture: source all
Version: 2.5.66
Distribution: unstable
Urgency: medium
Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
Changed-By: Chris Lamb <lamby@debian.org>
Description:
lintian - Debian package checker
Closes: 637473 741071 782277 806237 833613 837548 864999 884503 884676 884678 884683 884699 884785 884798 884817 884848 885042 885096 885106 885327
Changes:
lintian (2.5.66) unstable; urgency=medium
.
Merry Christmas!
.
* Summary of tag changes:
+ Added:
- autotools-pkg-config-macro-not-cross-compilation-safe
- bugs-field-does-not-refer-to-debian-infrastructure
- mismatched-python-substvar
- missing-notice-file-for-apache-license
- override_dh_clean-does-not-call-dh_clean
- package-contains-python-doctree-file
- pkg-config-unavailable-for-cross-compilation
- portable-executable-missing-security-features
- python-package-depends-on-package-from-other-python-variant
- vcs-fields-use-more-than-one-vcs
.
* checks/*.desc:
+ [CL] Standardise on capital-L "Lintian" in package descriptions.
Thanks to Adam D. Barratt for the suggestion.
* checks/cruft.{pm,desc}:
+ [CL] Check for packages that invoke AC_PATH_PROG without considering
cross-compilation. Thanks to Helmut Grohne for the idea and
proof-of-concept implementation. (Closes: #884798)
* checks/fields.{pm,desc}:
+ [CL] Emit a wishlist warning for packages that mix-and-match more
than one version control system in Vcs-* headers. (Closes: #884503)
+ [CL] Warn when packages specify a "Bugs" field in debian/control that
does not refer to official Debian infrastructure as this can make
reportbug unable to report bugs. (Closes: #741071)
* checks/files.{pm,desc}:
+ [CL] Warn maintainers about packages that ship pkg-config files under
/usr/lib/pkgconfig as they are unavailable under cross-compilation.
Thanks to Helmut Grohne for the idea. (Closes: #885096)
+ [CL] Warn about packages that ship non-reproducible Python .doctree
files. (Closes: #885327)
+ [CL] Factor out simple filename checks into a Lintian::Data variable.
* checks/init.d.{pm,desc}:
+ [CL] Don't emit init.d-script-needs-depends-on-lsb-base if the
package ships a Systemd service file. (Closes: #864999)
* checks/lintian.desc:
+ [CL] Also note that unused-override can be triggered if Lintian
adds/modifies supplementary tag metadata.
* checks/obsolete-sites.pm:
+ [CL] Ignore commented-out lines to avoid false-positives where the
maintainer references the old location. (Closes: #806237)
* checks/pe.{pm,desc}:
+ [CL] Check for Microsoft Windows Portable Executable (PE) files that
are missing security hardening features. Thanks to Petter
Reinholdtsen for the report. (Closes: #837548)
* checks/python.{pm,desc}:
+ [CL] Warn about Python 2.x packages using ${python3:Depends} and
Python 3.x packages using ${python:Depends}. Thanks to Mattia
Rizzolo for the idea. (Closes: #884676)
+ [CL] Factor out definition of dependency fields.
+ [CL] Warn about Python 3 packages that depend on Python 2 packages
and vice versa. (Closes: #782277)
* checks/rules.{desc,pm}:
+ [CL] Check for override_dh_clean targets that are missing calls to
dh_clean. Thanks to Andreas Beckmann for the idea. (Closes: #884817)
* checks/standards-version.pm:
+ [CL] Avoid misleading tag descriptions when emitting valid
timewarp-standards-version warnings if the date parts are identical
(ie. "2017-11-30 < 2017-11-30"). Thanks to Andrea Bolognani
eof@kiyuko.org> for the report. (Closes: #884785)
* checks/source-copyright.{desc,pm}:
+ [CL] Check for Apache 2.0 packages that do not distribute their
accompanying "NOTICE" files. (Closes: #885042)
+ [CL] Use the list of files in the orig tarball (rather than in the
regular index) to prevent false positives when checking for the
source-includes-file-in-files-excluded tag when a patch system
re-adds files that were removed. (Closes: #884848)
.
* collection/src-orig-index:
+ [CL] Correct references to generated filename.
+ [CL] Update bitrotted calls to Lintian::Command:spawn.
.
* data/debhelper/compat-level:
+ [MR] Bump the experimental debhelper compat level to 12.
(Closes: #884678)
+ [CL] Bump the recommended debehlper compat level to 11, emitting a
pedantic warning when using lower level. (Closes: #884699)
* data/debhelper/dh_commands:
+ [CL] dh_scour is now provided by python3-scour, not python-scour.
Thanks to Jeremy Bicha. (Closes: #885106)
* data/files/js-libraries:
+ [CL] Detect embedded jQuery libraries with version number in their
filenames (eg. jquery-1.10.2.min.js). (Closes: #833613)
+ [CL] Also emit embedded-javascript-library for Twitter Bootstrap and
"mustache".
* data/files/php-libraries:
+ [CL] Avoid a embedded-php-library false positive for streams.php.
(Closes: #637473)
* data/spelling/corrections:
+ [PW] Add a number of corrections.
.
* debian/compat:
+ [NT] Bump debhelper compat level to 11.
* debian/control:
+ [CL] Tag relevant build-dependencies with <!nocheck>.
+ [NT] Bump versioned Build-Dependency on debhelper to 11~.
.
* lib/Lintian/Collect/{Package,Source}.pm:
+ [CL] Don't require that src-orig-index.gz actually contains any files
rather than faking an entry.
.
* reporting/templates/maintainer.tmpl:
+ [CL] Correct invalid "else if" syntax with "elsif". Thanks to Uwe
Kleine-König for the report.
.
* t/tests/fields-malformed-vcs-fields-unrel:
+ [CL] Add a regression test for a potential false positive in the
"vcs-field-has-unexpected-spaces" tag. (Ref: #884870)
* t/tests/files-multiarch-foreign-files:
+ [CL] Don't hardcode architecture triplet to fix FTBFS on non-amd64
architectures. (Closes: #884683)
* t/scripts/implemented-tags.t:
+ [CL] Exclude some tests in this coverage check now that they are
specified in a data file rather than in the code itself.
Checksums-Sha1:
9702ba91c38840129a9566d39cc520bc8906e219 3516 lintian_2.5.66.dsc
ffd268765754c7f90afafdae6da7a2b5186a910a 2610532 lintian_2.5.66.tar.xz
0fe51b31ff9ba9e52d4b15b09d4a828a1a5636ee 1080132 lintian_2.5.66_all.deb
2e2b3b2bb0e73c23df474d10896e585e86c8209c 15861 lintian_2.5.66_amd64.buildinfo
Checksums-Sha256:
eae9331c4527d1b137612a8a04f234f0033f08a76882034bdbd6edb502fc71c9 3516 lintian_2.5.66.dsc
742d44a8657cdca0fd26210ec582242c497dd6efd25cdd9293ee16ebc107c57a 2610532 lintian_2.5.66.tar.xz
c9ed8c1a2df9bcb909a526c59fb8d4abfee9a37ce39272a94c287194a804484c 1080132 lintian_2.5.66_all.deb
3504bb9cc26eeff47aeff3e6e653b9ae4ceec08a8647e9bb327f8d899827cb14 15861 lintian_2.5.66_amd64.buildinfo
Files:
fa53057e7cdb31e16848db90f96c6e2e 3516 devel optional lintian_2.5.66.dsc
7b5c7c8de421288eb548957f8e7c11b8 2610532 devel optional lintian_2.5.66.tar.xz
28765798a9bde37a3d38de40b9e8b16b 1080132 devel optional lintian_2.5.66_all.deb
b23607b14bcc14197d12c06941df4eac 15861 devel optional lintian_2.5.66_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEwv5L0nHBObhsUz5GHpU+J9QxHlgFAlpCa+sACgkQHpU+J9Qx
Hlgq5g//UOJDhB7MTziHR8MJnbh/ijxWHElOLj1mrXb0EkN0i4/2JW1a/qxBo4dF
AEBnBA2k8FyAKG+txcKBhPT5ZbuvfFPoqEoGdCZcLrxBkBwGmYGI34x7eeJF8M8J
g73FKZuqYwqgGhRxN7fu4focVON3RHjSri9kayTSOHF8izUNP3FmR9HXGHe9rkAs
F7pxAIgVY/YHRLUYAlUsitGXoZrtn3Z+Zt7c8z3Qrb/lPD104Fu69VOTMDM1vxyT
fgsx9LtcOKeZUx+Mtgw+YLvIXaqPcaLRiWW4TD86Vpw8SAAWbCcdvKuP4j3wWkzD
tD1fyCx3Xb2uOeAH7lnjSHdkQICndnTrtu3MrInpKTKoew0aQ4bPl/3HqO0wAh4d
FF5zcpYJ5D9eyCEZ0mMj+DNeoXA3vSqNiYQi0S9Pojvh79vvROKh693Bmr2P2k0W
LScIPRWVY8Dsba+8qC0XY7S/5d6+U1zJGc3UtX7Eth+RVuHKaL6PaXWzHDyPBci8
aXj+oaVS7JB/Jo4uN1dq6kT6jYmxWg2jCt8UGpvCPXL9UF1fmbwcrV1RzfSUqLO7
U5a8bTDu7Rgx0eDPU5bbYEHiwxu6JBqPExx67NEyNQnM3jS6UsTo8O2+l2H5N8+0
AduXyZLIiG6tZURHJJPsN2X7J+erVmLxWAvLLL0sNyubfbmEJjI=
=pw37
-----END PGP SIGNATURE-----
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Lintian Maintainers <lintian-maint@debian.org>:
Bug#884798; Package lintian.
(Fri, 29 Dec 2017 23:06:06 GMT) (full text, mbox, link).
Acknowledgement sent
to James McCoy <vega.james@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Lintian Maintainers <lintian-maint@debian.org>.
(Fri, 29 Dec 2017 23:06:06 GMT) (full text, mbox, link).
Message #42 received at 884798@bugs.debian.org (full text, mbox, reply):
On Tue, Dec 19, 2017 at 08:56:20PM +0100, Helmut Grohne wrote: > A slightly better way would be using AC_PATH_TOOL (with the same > arguments) and the only difference here is considering $ac_tool_prefix. > The recommended way is using the PKG_PROG_PKG_CONFIG macro from > pkg-config tough. This macro will result in an empty PKG_CONFIG variable > if pkg-config happens to not be found rather than the "no" value > depicted above. http://tirania.org/blog/archive/2012/Oct-20.html had some strong words to say about using pkg.m4. Are those concerns still valid? Should pkg.m4's macros be recommended or simply AC_PATH_TOOL? Cheers, -- James GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7 2D23 DFE6 91AE 331B A3DB
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Lintian Maintainers <lintian-maint@debian.org>:
Bug#884798; Package lintian.
(Sat, 30 Dec 2017 07:06:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Helmut Grohne <helmut@subdivi.de>:
Extra info received and forwarded to list. Copy sent to Debian Lintian Maintainers <lintian-maint@debian.org>.
(Sat, 30 Dec 2017 07:06:03 GMT) (full text, mbox, link).
Message #47 received at 884798@bugs.debian.org (full text, mbox, reply):
On Fri, Dec 29, 2017 at 06:02:07PM -0500, James McCoy wrote: > http://tirania.org/blog/archive/2012/Oct-20.html had some strong words > to say about using pkg.m4. Are those concerns still valid? Should > pkg.m4's macros be recommended or simply AC_PATH_TOOL? That blog post looks like a misinformed user to me. The shell way he recommends breaks cross compilation. I've never encountered the issue of aclocal not substituting PKG_CHECK_MODULES as pkg.m4 is on the search path once you install pkg-config. On Debian system you practically cannot encounter the issue (as you will have pkg-config installed anyway to use it). For other distributions, many source packages embed (outdated) copies of pkg.m4. This is not great, but works. In any case, using AC_PATH_TOOL fixes cross compilation. Just refrain from using bare pkg-config. Helmut
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Mon, 29 Jan 2018 07:29:19 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.