Bug#1064950: AW: AW: Bug#1064950: apache2: (Legacy?) "Depends: apache2-data (= ${source:Version})," in debian/control breaks binNMU builds.
Sebastian Ramacher wrote: > Christof Warlich wrote: > > If this assumption is true, then why is the Debian build system (i.e. > > dpkg-buildpackage) not smart enough to simply ignore an existing +bX > > extension for Architecture: all binary packages? IMHO, this would simplify > > matters, as it would have avoided the pitfall that I stumbled into > > altogether. > > binNMUs are handled a layer above. sbuild will pass the correct options to > dpkg-buildpackage to build binNMUs. If you are interested in having binNMU > builds for your own infrastructure, you'll probably need to take a look at > the sbuild source to see how it is implemented. Ok, so I'd better start using sbuild instead. Again, thanks for the valuable info and your time.
Bug#1064950: AW: Bug#1064950: apache2: (Legacy?) "Depends: apache2-data (= ${source:Version})," in debian/control breaks binNMU builds.
Sebastian Ramacher wrote: > This is wrong. apache2-data is an Architecture: all package, > but apache2 is Architecture: any. So using ${source:Version} > here is correct. Note that Debian does not currently support > binNMUs for Architecture: all packages, so apache2-data will > never have a +bX version. Thanks for that clarification. This is somewhat confusing for someone not doing package builds as a daily profession: If just doing a "dpkg-buildpackage -us -uc" on the apache2 sources _with_ the +bX extension, the apache2-data binary package _does_ get the +bX extension as well, at least with my build, causing the issue that I described initially. Thus, as much as I think I've leaned so far, binNMU builds on source packages that also produce Architekture: all binary packages must always be built separately from sources without the +bX extension for the Architecture: all binary packages, whereras the architecture-dependent binary packages may be built from a source package with a +bX extension, right? If this assumption is true, then why is the Debian build system (i.e. dpkg-buildpackage) not smart enough to simply ignore an existing +bX extension for Architecture: all binary packages? IMHO, this would simplify matters, as it would have avoided the pitfall that I stumbled into altogether. Please note that I my main goal is to better understand how to do it right for future builds.
Bug#1064950: apache2: (Legacy?) "Depends: apache2-data (= ${source:Version})," in debian/control breaks binNMU builds.
Subject: apache2: (Legacy?) "Depends: apache2-data (= ${source:Version})," in debian/control breaks binNMU builds. Source: apache2 X-Debbugs-Cc: christof.warl...@siemens.com Version: 2.4.57-2 Severity: serious Justification: fails to build from source (but built successfully in the past) Tags: patch ftbfs Dear Maintainer, (re)building apache2 as binNMU (i.e. with appending "+b to the package version") works, but installation of the resulting apache2 package fails due to the following dependency in debian/control: Depends: apache2-data (= ${source:Version}), It causes apt-get to look for the dependency "apache2-data" (= 2.4.57-2) which does not exist in the newly built packages. Instead, the dependency should be satisfied by "apache2-data (= 2.4.57-2+b)". The folliwing patch fixes the issue: diff --git a/debian/control b/debian/control index 2eddc60..31121fa 100644 --- a/debian/control +++ b/debian/control @@ -34,7 +34,7 @@ Rules-Requires-Root: binary-targets Package: apache2 Architecture: any Depends: apache2-bin (= ${binary:Version}), - apache2-data (= ${source:Version}), + apache2-data (= ${binary:Version}), apache2-utils (= ${binary:Version}), lsb-base, media-types, Please consider applying the patch. Best regards, Christof Warlich P.S.: Note that the information below, being produced by "reportbug", is irrelevant as I executed "reportbug" on WSL2 on Windows 10. The actual Debian version is "bookworm". -- System Information: Debian Release: bookworm/sid APT prefers jammy-updates APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy'), (100, 'jammy-backports') Architecture: amd64 (x86_64) Kernel: Linux 5.10.102.1-microsoft-standard-WSL2+ (SMP w/16 CPU threads) Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system)
Rebuilding apache2 Package as binNMU.
I've rebuilt apache2 as a binNMU, i.e. without patching the package itself, but only changing its build environment. Thus, I appended the string "+b1" to its version as described in https://wiki.debian.org/binNMU All resulting packages compile without any problem, but when I try to install apache2 from these packages, I get the following error: # apt install apache2 Reading package lists... Done Building dependency tree... Done Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: apache2 : Depends: apache2-data (= 2.4.57-2) Recommends: ssl-cert but it is not going to be installed E: Unable to correct problems, you have held broken packages. Searching for the root cause in debian/control, I see this: Package: apache2 Architecture: any Depends: apache2-bin (= ${binary:Version}), apache2-data (= ${source:Version}), apache2-utils (= ${binary:Version}), In the apache2-data line, is $source intentionally be used instead of $binary? If so, why? Or is this a bug? Replacing ${source:Version} with ${binary:Version} would at least fix the installation issue of my self-built binNMU. Thanks for any advice.