Katello 4.3 Cannot install Ubuntu packages for "all" architecture

Problem:

I am toying around with some Ubuntu 20 clients and Atix’s work on Katello support for Debian packages. I have synchronized the Ubuntu repository into Katello and can install some binary packages for the client’s architecture (amd64); however I have no success with installing packages for the “all” architecture (Debian’s equivalent of .noarch in RPM-land)…

Client view:

$ sudo apt search mailutils-common
Sorting... Done
Full Text Search... Done

Pulp on the Katello server knows about the package, though:

pulpcore=# select * from deb_package where package='mailutils-common';
-[ RECORD 1 ]-------+-----------------------------------------------------------------
content_ptr_id      | 3cccb453-d2d6-4b42-ad46-1087185284e2
package             | mailutils-common
source              | mailutils
version             | 1:3.7-2.1
architecture        | all
section             | universe/mail
priority            | optional
origin              | Ubuntu
tag                 |
bugs                | https://bugs.launchpad.net/ubuntu/+filebug
essential           |
build_essential     |
installed_size      | 1577
maintainer          | Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
original_maintainer | Jordi Mallach <jordi@debian.org>
description         | common files for GNU mailutils
description_md5     | 32f3c1102382b478ae851a124c7c0abe
homepage            | https://www.gnu.org/software/mailutils/
built_using         |
auto_built_package  |
multi_arch          | foreign
breaks              |
conflicts           |
depends             |
recommends          |
suggests            |
enhances            |
pre_depends         |
provides            |
replaces            |
relative_path       | pool/universe/m/mailutils/mailutils-common_3.7-2.1_all.deb
sha256              | 1e46aeb305a4794225fe371de74e13be0f2fd6c33d3f213a7a8c254266a5fb32
custom_fields       |

Expected outcome:

Being able to install packages with architecture “all”.

Foreman and Proxy versions:

Foreman 3.1.2
Katello 4.3.0

Foreman and Proxy plugin versions:

Foreman 3.1.2
Katello 4.3.0

Distribution and version:

CentOS 8 Stream (Server)

Ubuntu 20.04 LTS (Client)

Other relevant data:

I can install architecture “all” packages on my Ubuntu 20 test system though I may be using a somewhat different version of pulp_deb.
One thing that might make sense, just to cover your bases is to run apt-get update on the Ubuntu host, just to check if that changes anything.

Assuming that is not it, can you verify the following:

On your Ubuntu, there should be /etc/apt/sources.list.d/rhsm.sources, which should contain all the repositories provided to the system by subscription-manager. In this file you should be able to find the baseurl of the repository form which you cant install architecture=“all” packages. If you open this baseurl in a browser (make sure you add a trailing / if missing), you can navigate to the dists/default/ folder. In this folder there should be Release files (either Release or InRelease or both). These files should contain a line that starts with Architectures: and this line should contain at least the values all and amd64. Is this the case?

You can also check the /dists/default/all/binary-all/Packages file, if the expected package is listed in this file. If this is also the case, then Ubuntu really should be able to install the package…

Hi, thanks for looking into this.

One thing that might make sense, just to cover your bases is to run apt-get update on the Ubuntu host, just to check if that changes anything.

I had updated the Apt cache before, but just now did so again to make sure. Didn’t make any difference, unfortunately.

In this folder there should be Release files (either Release or InRelease or both). These files should contain a line that starts with Architectures: and this line should contain at least the values all and amd64. Is this the case?

Yup:

Origin: Pulp 3
Label: focal-1334222
Version: 9
Codename: default
Date: Wed, 09 Mar 2022 16:35:58 +0000
Architectures: all amd64
Components: all
SHA1:
 aa7edbdebe8fa2418e5bb24226429ae6311e940e         24615201 all/binary-all/Packages
 639db39b5926261d68147228227a25366089fa1a          5263649 all/binary-all/Packages.gz
 931a8877fb79b73ad226ac88ea7e877721c98d2b         28731294 all/binary-amd64/Packages
 972a317ec10dac69f31d4654f7238ea9df2b2a04          6020548 all/binary-amd64/Packages.gz
SHA256:
 fa71a6f47d7c031ba65fec442582e456c10e9a11d3a30523d8e0d27481c8abae         24615201 all/binary-all/Packages
 92e5d8a9c702cd74dfe3f627a522a58c40d7f07da71edaeaf938d195324bfedb          5263649 all/binary-all/Packages.gz
 8fbdbb191925c043410fbc6d6b17781388bba4b033ac7756aa703f562628fbf7         28731294 all/binary-amd64/Packages
 f171afbe8925c08521d7ccd89c804af97a4d099452d905092a8ec55f95fb1fb7          6020548 all/binary-amd64/Packages.gz
SHA512:
 b51a08b5ef255d91d1f1d971459bd957a41c1e09a0e07660ba5725bfd207e658d2360e3cf7d7aac37dc84d6933771ccaf55943aec694031d7bda5bc903a52037         24615201 all/binary-all/Packages
 dd8be8984e0e2cc13fc4326d470a1ed6b3e9b91e37e3fdfa9b6d32f1582e467245338e364b63bcbef05c2908c32414d2947613b82abb99f3c0c4b36090a4a8da          5263649 all/binary-all/Packages.gz
 306934b7eda5b4460decaa752270a26a3b7f0d1a2ef495ac939a6611b9d849f1499c5ecdcc2398b5228c9814c9e800da21573ff09893fcc776ced89abb47a1d9         28731294 all/binary-amd64/Packages
 738110717f824ec2bc50145bbe6bc81a53024e4bd4ae08b28fc257d176e3a448f0eb211c5934ba372b2610556a5c18d58e39f736be975bde5aa3da86b6129e17          6020548 all/binary-amd64/Packages.gz

You can also check the /dists/default/all/binary-all/Packages file, if the expected package is listed in this file. If this is also the case, then Ubuntu really should be able to install the package…

The package is listed:

...
Package: mailutils-common
Source: mailutils
Version: 1:3.7-2.1
Architecture: all
Section: universe/mail
Priority: optional
Origin: Ubuntu
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 1577
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Jordi Mallach <jordi@debian.org>
Description: common files for GNU mailutils
Description-md5: 32f3c1102382b478ae851a124c7c0abe
Homepage: https://www.gnu.org/software/mailutils/
Multi-Arch: foreign
SHA1: cab3289dc98022eabf76a74b370e28abb156bb7e
SHA256: 1e46aeb305a4794225fe371de74e13be0f2fd6c33d3f213a7a8c254266a5fb32
Size: 272168
Filename: pool/all/m/mailutils/mailutils-common_1:3.7-2.1_all.deb
...

But still no joy:

$ sudo apt install mailutils-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mailutils-common is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mailutils-common' has no installation candidate

This is pretty strange. The repository format your Ubuntu host is getting looks correct to me, but clearly apt is somehow not seeing the package. Just so I can better compare with my test host, can you post the output of lsb_release -a and apt --version?

There is a possibility that some old apt versions, don’t know how to deal with the latest architecture all repo metadata structure which is used by your version of Pulp/Katello, however I have never actually seen this happen anywhere in the wild…

Sure.

lsb_release -a:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:        20.04
Codename:       focal

apt --version:

apt 2.0.6 (amd64)

As far as I can tell I have the exact same setup, but I can install architecture “all” packages on it.
I will pass this along to QA to see if they can reproduce it, but for now I am out of ideas.

Like I said, it could be related to this: Add support for "No-Support-for-Architecture-all: Packages" repo format · Issue #447 · pulp/pulp_deb · GitHub

But so far I have considered this more of a theoretical issue since I have never actually seen it cause problems, and it appears to work on my own test system.

Sooo… I just happened to stumble over this post here… Katello Error Syncing deb based repo packages, and thought I’d give it a shot.

Updated the emtpy download policy to “immediate”, resync’ed repositories, republished content views, cleared client cache, re-subscribed client system, and lo and behold

$ sudo apt search mailutils-common
Sorting... Done
Full Text Search... Done
mailutils-common/unknown 1:3.7-2.1 all
  common files for GNU mailutils

$ sudo apt install mailutils-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  mailutils-common
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 272 kB of archives.
After this operation, 1615 kB of additional disk space will be used.
...

Success!

2 Likes

I was on the wrong track entirely!