[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#995981: marked as done (rules-require-build-prerequisite gives bogus advice)



Your message dated Fri, 15 Oct 2021 08:25:01 +0000
with message-id <E1mbIWT-000IUh-By@fasolo.debian.org>
and subject line Bug#995981: fixed in lintian 2.109.0
has caused the Debian Bug report #995981,
regarding rules-require-build-prerequisite gives bogus advice
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 owner@bugs.debian.org
immediately.)


-- 
995981: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=995981
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: assimp
Version: 5.0.1~ds0-3
Tags: patch
Control: clone -1 -2
Control: retitle -2 rules-require-build-prerequisite gives bogus advice
Control: reassign -2 lintian
Control: severity -2 important
Control: tags -2 - patch
Control: affects -2 src:assimp
User: debian-cross@lists.debian.org
Usertags: ftcbfs
X-Debbugs-Cc: debhelper@packages.debian.org
X-Debbugs-Cc: debian-cross@lists.debian.org

assimp fails to cross build from source. It attempts to build a python
module, but it ultimately fails doing so. While inspecting this, I
discovered that assimp "Build-Depends: python3:any | python3-all:any |
python3-dev:any | python3-all-dev:any | dh-sequence-python3". This is
wrong on so many levels.

For starters, sbuild ignores any alternative in unstable, so in
practice, this happens to become "python3:any". Any other alternative is
simply ignored and shouldn't be there.

Then, issuing a dependency on python3-dev:any without libpython3-dev is
practically never correct. That could be a separate lintian tag, but
that's not too bad here as python3-dev isn't needed. Either you go
python3-dev or you go python3-dev:any, libpython3-dev or you have a very
special and unusual use case that I have never encountered anywhere.

Also listing dh-sequence-python3 there is bogus. You already added
"--with python3" in debian/rules. This is duplicate at best. Either
should be dropped, but enabling a dh-addon in an alternative is clearly
not right, and debhelper should likely fail hard when encountering that.
Niels, do you agree?

I wondered how one would come up with such a strange dependency and
asked #debian-mentors for help. Kindly, a user named "itd" pointed me at
the lintian tag rules-require-build-prerequisite, which very likely is
the cause for this. Please disable the tag right now as it does more
harm than good. While the tag isn't bad per-se, the advice it gives
misleads users and produces broken packages. I request hiding or
disabling it now and then figuring out what it really should say.

Back to assimp. I looked into this to make it cross buildable, right?
And it was failing in Python-ish stuff. So why do we actually build the
Python module? Did I say module? It's not an extension? No, it isn't.
And we really don't have to build it in an arch-only build. So the key
to making assimp cross buildable is to make an arch-only build fully
skip the Python stuff. And once you do that, you don't care about :any
annotations anymore as those are practically irrelevant in
Build-Depends-Indep.

So I've attached a patch for assimp to fix the cross build and the
strange build dependency. Please consider applying it.

Helmut
diff --minimal -Nru assimp-5.0.1~ds0/debian/changelog assimp-5.0.1~ds0/debian/changelog
--- assimp-5.0.1~ds0/debian/changelog	2021-10-06 09:02:14.000000000 +0200
+++ assimp-5.0.1~ds0/debian/changelog	2021-10-08 20:49:28.000000000 +0200
@@ -1,3 +1,15 @@
+assimp (5.0.1~ds0-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix python build dependency. (Closes: #-1)
+    + Alternatives in Build-Depends are ignored.
+    + Enable the python3 dh addon once only.
+    + Build python module in indep build only.
+    + Move python Build-Depends to B-D-I.
+    + Drop the :any nonsense.
+
+ -- Helmut Grohne <helmut@subdivi.de>  Fri, 08 Oct 2021 20:49:28 +0200
+
 assimp (5.0.1~ds0-3) unstable; urgency=medium
 
   [ Debian Janitor ]
diff --minimal -Nru assimp-5.0.1~ds0/debian/control assimp-5.0.1~ds0/debian/control
--- assimp-5.0.1~ds0/debian/control	2021-10-06 09:02:14.000000000 +0200
+++ assimp-5.0.1~ds0/debian/control	2021-10-08 20:49:28.000000000 +0200
@@ -15,8 +15,10 @@
  libstb-dev,
  libutfcpp-dev,
  zlib1g-dev | libz-dev,
- python3:any | python3-all:any | python3-dev:any | python3-all-dev:any | dh-sequence-python3,
  doxygen,
+Build-Depends-Indep:
+ dh-sequence-python3,
+ python3,
 Rules-Requires-Root: no
 Vcs-Git: https://salsa.debian.org/debian/assimp.git
 Vcs-Browser: https://salsa.debian.org/debian/assimp
diff --minimal -Nru assimp-5.0.1~ds0/debian/rules assimp-5.0.1~ds0/debian/rules
--- assimp-5.0.1~ds0/debian/rules	2021-10-06 09:02:14.000000000 +0200
+++ assimp-5.0.1~ds0/debian/rules	2021-10-08 20:49:28.000000000 +0200
@@ -33,7 +33,7 @@
 export PYBUILD_NAME=pyassimp
 
 %:
-	dh $@ --with python3 --buildsystem=cmake
+	dh $@ --buildsystem=cmake
 
 override_dh_auto_configure:
 	dh_auto_configure -- \
@@ -50,8 +50,10 @@
 
 override_dh_auto_build:
 	dh_auto_build
+ifneq ($(filter python3-pyassimp,$(shell dh_listpackages)),)
 	dh_auto_build --buildsystem=pybuild -- \
 		-d port/PyAssimp/
+endif
 	cd obj-$(DEB_HOST_GNU_TYPE)/doc && doxygen Doxyfile
 	cd doc && doxygen Doxyfile_Cmd
 
@@ -61,8 +63,10 @@
 
 override_dh_auto_install:
 	dh_auto_install
+ifneq ($(filter python3-pyassimp,$(shell dh_listpackages)),)
 	dh_auto_install --buildsystem=pybuild -- \
 		-d port/PyAssimp/
+endif
 	# IrrXML is not packaged for Debian, so drop the wrapper
 	find debian/*/usr -name irrXMLWrapper.h -delete
 

--- End Message ---
--- Begin Message ---
Source: lintian
Source-Version: 2.109.0
Done: Chris Lamb <lamby@debian.org>

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 995981@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: Fri, 15 Oct 2021 08:01:45 +0000
Source: lintian
Architecture: source
Version: 2.109.0
Distribution: unstable
Urgency: medium
Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
Changed-By: Chris Lamb <lamby@debian.org>
Closes: 994902 995490 995498 995981 995991 996093 996111 996270
Changes:
 lintian (2.109.0) unstable; urgency=medium
 .
   * Summary of tag changes:
     + Added:
       - redundant-build-prerequisites
       - redundant-control-relation
     + Removed:
       - duplicate-in-relation-field
       - package-has-a-duplicate-build-relation
 .
   [ Felix Lechner ]
   * Do not complain about library sections that do not exist.
     (Closes: #995991)
   * Python :any handling:
     * In tag descriptions, never ask for :any in Python prerequisites.
       (Re: #995498)
     * Fix processing of the :any multiarch acceptor in package
       relationships. (Closes: #995490, #995498)
     * Allow make:any as a prerequisite for using usr/bin/make in scripts.
       (Closes: #994902)
   * Make the condition of a missing interpreter look less like
     a recommendation.
   * Fix non-sensical line lengths in hints from cruft check.
     (Closes: #996111)
   * Add a new Lenna image to the list of banned files. (Closes: #996093)
   * Also allow private folders in lib from custom library search path.
     (Closes: #996270)
   * Clarify in tag descriptions for debian/rules check that hint context is
     not a recommendation. (Closes: #995981)
Checksums-Sha1:
 148e6542a76294d915a9d50c7c7ce691cf9feb10 2486 lintian_2.109.0.dsc
 7018ec87b22ae2062ccf447646a0abed75174c52 2073516 lintian_2.109.0.tar.xz
 62b117376aa1eeabacc42a7c67315569c8a1b249 6550 lintian_2.109.0_amd64.buildinfo
Checksums-Sha256:
 c5750dd7e890e62e26ee9bf8d89f288cdd3ae5265c4d99ad49a852debb33f6df 2486 lintian_2.109.0.dsc
 f7ff3fa2938867205abba4fc4e8b35a6323c59cf941e7a364faf94edce087712 2073516 lintian_2.109.0.tar.xz
 a6fcdc1603495c1cf0f8871a7b9d5a47d0c7f98872d68401819a0a17d959e230 6550 lintian_2.109.0_amd64.buildinfo
Files:
 ac747a8841f0332a39f0920558db507a 2486 devel optional lintian_2.109.0.dsc
 33a5984b04f930f603d19ea953e1bf3c 2073516 devel optional lintian_2.109.0.tar.xz
 5db56713a4a53543a8b129b0848bfc22 6550 devel optional lintian_2.109.0_amd64.buildinfo

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

iQIzBAEBCAAdFiEEwv5L0nHBObhsUz5GHpU+J9QxHlgFAmFpNfsACgkQHpU+J9Qx
Hli6/Q/+LRajXy0NdwhsDN6xXFNQ5YiLrEOEx+yBtjILG8+m6e+99vHMjbDgH4ox
kUBhTNswJoNxTE4SXQNXJJAZO/gnLaxJjs0L+JHG3DHuHSY87+ZAMqzr1eLoaen2
Rn+i2sCgNEU2Y+K5oWU2hhMs9kXcYtYs8ofmVGo37uvQLuBxeqns59diKh3Lvq+X
MLytXuXlaAhPqT/fNNbhjqu3KTcD1FqjDpHcnwMJTQWe/mWbNHMkJZ2065Uthj+z
ptHPlyjGHVKsNeDY0i9vqgG+rytf7HTwpZMvKdHXqdnwVirtTG9MqsMazKCrKmxw
iwjAPVin4byEs2GJI29AFHMafBHMcXV2QzkcpwSgYuRGUgWQK2i1qggzDqVM+qj2
ZDhbttzQAv4HDBhovFtqmv7LxQDrGozZXzGEN3Bjm9O5/DiNvkN3S0OudzjYEq9j
9EkUT73ObEBnru3RAP5zuCo6qD5rjI7Glk+r9Qu5ECgEgxbi4dClYAFI9CejRVwC
nEsGEljN9Yf+CNccdZ7p2U9nodnc4vvFHvq0N9zgbVkxwk3sDPfm5U4wgIaOP44W
elmA0ZYpOxlDtFutHKkEdlBpXOkFY+g3YnU+4yUVBt5YMhS7Kj27EobOtv2AOWwi
c5qSDl8Xq1LIrDGQS3RJPCxjmEph9LOFQjKynkhrv9KzNPxWxNg=
=rjRD
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: