Subject: bug#625: amprolla generates InRelease without arch:all

From: Boian Bonev <[email-masked]>
Date: Sun, 24 Oct 2021 03:49:49 +0300

Package: amprolla
Version: chimaera
Severity: normal
X-Debbugs-Cc: [email-masked]

It was reported on #devuan that "apt-file search" does not find some files
while it finds others. The files in question were in arch:all packages.
apt-file makes apt-get also fetch Contents-* and apt-get skips Contents-all
on chimaera.

It was also reported that the same works fine in beowulf and bullseye.

After further checking, beowulf's and chimaera's InRelease does not have all
in the arch list while bullseye has it.

It looks like all is skipped in lib/release.py lines 69 and 70, but it is not
clear what will be the consequences if this gets changed.

-- System Information:
Distributor ID:	Devuan
Description:	Devuan GNU/Linux 4 (chimaera)
Release:	4
Codename:	chimaera
Architecture: x86_64

Kernel: Linux 5.10.0-8-amd64 (SMP w/32 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_CPU_OUT_OF_SPEC, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

---

From: Mark Hindley <[email-masked]>
Date: Sun, 24 Oct 2021 08:04:22 +0100

Boian,

Thanks for this.

> in the arch list while bullseye has it.

I think there is something else going on here. If it works in beowulf but
beowulf's InRelease doesn't have arch:all in the list, that can't be the cause.

Arch all packages are (now) supposed to be duplicated in all the
binary-*/Packages files.

Can you give me an example package which is missing? The significant thing is
whether it is a forked or unforked package. That may point to a DAK
configuration error.

Thanks

Mark

---

From: Mark Hindley <[email-masked]>
Date: Mon, 25 Oct 2021 17:52:30 +0100

Boian and Ralph,

Thanks. I think I understand this now. Documenting it here, so we have it as a
reference.

Previously arch:all packages were included in arch specific index files (both
Packages and Contents). Obviously that is a duplication and from the Bullseye
cycle Debian has moved to reduce that duplication.  This requires clients to use
arch:all indicies directly, for which 'all' has to be included in the Release
Architectures (as Boian pointed out).

However, so this can be done in stages, the 'No-Support-for-Architecture-all:
Packages'[1] header was introduced which temporarily excludes Packages indicies
from the migration.

The inclusion of 'all' in Architectures is controlled in DAK by the per-suite
separate_{package,contents}_architecture_all options.

If we set

 separate_package_architecture_all=no
 separate_contents_architecture_all=yes

in DAK, we get 'all' added to Release Architectures and also
'No-Support-for-Architecture-all: Packages'. WHen merging, amprolla can then
test for 'all' in Devuan's DAK Release file and propagate that and the
No-Support-for-Architecture-all header to the merged Release file.

I prefer this approach as it keeps the configuration of this in a single place
(DAK) and doesn't change the behaviour for older releases (beowulf and earlier)
that still have dupicated arch:all.

Patch to be tested attached. I will change the config of ceres so it can
be tested.

Any comments/problems anybody can see?

Thanks

Mark

[1]  https://wiki.debian.org/DebianRepository/Format#No-Support-for-Architecture-all

From fb4e747cae4679ab0e5a41b1eb98f5e8ea521721 Mon Sep 17 00:00:00 2001
From: Mark Hindley <[email-masked]>
Date: Sun, 24 Oct 2021 18:21:50 +0100
Subject: [PATCH] Include 'all' in Release architectures if it is configured in
 DAK.

Set separate_{contents,packages}_architecture_all=False|True for the suite.
---
 lib/config.def.py | 1 +
 lib/release.py    | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/config.def.py b/lib/config.def.py
index 59b5be8..b83ef44 100644
--- a/lib/config.def.py
+++ b/lib/config.def.py
@@ -312,6 +312,7 @@ release_keys = [
     'Components',
     'Description',
     'NotAutomatic',
+    'No-Support-for-Architecture-all',
     'ButAutomaticUpgrades',
     'Acquire-By-Hash',
 ]
diff --git a/lib/release.py b/lib/release.py
index 3099568..a264874 100644
--- a/lib/release.py
+++ b/lib/release.py
@@ -121,7 +121,8 @@ def write_release(oldrel, newrel, filelist, rmstr, rewrite=True):
     for i in arches(rel_cont['Codename']):
         if i == 'source':
             continue
-        if i == 'binary-all':
+        if i == 'binary-all' and not 'all' in rel_cont['Architectures'].split():
+            # DAK configuration separate_{contents,packages}_architecture_all=False
             continue
         i = i.replace('binary-', ' ')
         _archlist += i
-- 
2.20.1

---

From: "Devuan bug Tracking System" <[email-masked]>
Date: Tue, 26 Oct 2021 16:12:05 +0000

This is an automatic notification regarding your bug report
which was filed against the amprolla package:

#625: amprolla generates InRelease without arch:all

It has been closed by Mark Hindley <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Mark Hindley <[email-masked]> by
replying to this email.

-- 
625: https://bugs.devuan.org/cgi/bugreport.cgi?bug=625
Devuan Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#625: amprolla generates InRelease without arch:all
From: Mark Hindley <[email-masked]>
To: [email-masked]
Date: Tue, 26 Oct 2021 17:07:18 +0100

Deployed and appears to be working as expected.

Closing.

Mark

Subject: amprolla generates InRelease without arch:all
From: Boian Bonev <[email-masked]>
To: Devuan Bug Tracking System <[email-masked]>
Date: Sun, 24 Oct 2021 03:49:49 +0300

Package: amprolla
Version: chimaera
Severity: normal

-- System Information:
Distributor ID:	Devuan