Bug#1064950: AW: AW: Bug#1064950: apache2: (Legacy?) "Depends: apache2-data (= ${source:Version})," in debian/control breaks binNMU builds.

2024-03-04 Thread Warlich, Christof
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.

2024-03-03 Thread Sebastian Ramacher
On 2024-03-04 06:19:58 +, Warlich, Christof wrote:
> 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.

For binNMUs you'll need to pass "-B" at least, but see below.

> 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?

Not exactly. The source packages are not changed for binNMUs. This is
handled via sbuild's --binNMU-* options to set the changelog and the
version. Specifically, these options imply that Arch: all binaries are
not built.

> 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.

Cheers
-- 
Sebastian Ramacher



Bug#1064950: AW: Bug#1064950: apache2: (Legacy?) "Depends: apache2-data (= ${source:Version})," in debian/control breaks binNMU builds.

2024-03-03 Thread Warlich, Christof
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.

2024-03-02 Thread Sebastian Ramacher
On 2024-02-28 07:16:07 +, Warlich, Christof wrote:
> 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.

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.

Cheers

> 
> 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)

-- 
Sebastian Ramacher



Bug#1064950: apache2: (Legacy?) "Depends: apache2-data (= ${source:Version})," in debian/control breaks binNMU builds.

2024-02-27 Thread Warlich, Christof
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)