libsolv: lack of zstd support makes it impossible to create SUSE Tumbleweed/Fedora Rawhide chroots with zypper/dnf
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libsolv (Ubuntu) |
Fix Released
|
High
|
Luca Boccassi | ||
Jammy |
Fix Released
|
High
|
Luca Boccassi | ||
Lunar |
Fix Released
|
High
|
Luca Boccassi | ||
Mantic |
Fix Released
|
High
|
Luca Boccassi | ||
Noble |
Fix Released
|
High
|
Luca Boccassi |
Bug Description
Both Fedora Rawhide and SUSE Tumbleweed started to compress their respective RepoData with zstd. The libsolv version in all Ubuntu releases is not built with zstd support, so using zypper/dnf from any Ubuntu version to build a new Fedora/SUSE chroot started to fail this week.
Noble will be fixed in the next sync of libsolv from Debian unstable, where I enabled libzstd support in 0.7.26-2. I would like SRUs all the way back to jammy to fix the CI jobs. The fix is very low risk as it enables an already available and optional feature, that is exercised only when referring to zstd-compressed repositories, which currently cannot work at all without this flag enabled.
There is an older distro-wide LP tracking libzstd enablement across all packages: https:/
Support for zstd was added upstream in version 0.6.35:
https:/
Fix proposal for Debian stable: https:/
[Impact]
This affects our CI jobs in the systemd projects on Github Actions, which are running on Jammy and using dnf and zypper (with libsolv) to build images. e.g.:
https:/
https:/
[Major Changes]
The libsolv versions in Ubuntu already support zstd, but it is not enabled at build time. It is trivially enabled with a build-dependency on libzstd and by passing a build configuration flag to cmake.
[Test Plan]
Install zypper, create a minimal config file and try to bootstrap a minimal SUSE Tumbleweed chroot with these 3 simple commands:
mkdir -p repos.d img
cat <<EOF>repos.
[test.repo]
name=test.repo
baseurl=https:/
gpgcheck=1
enabled=1
autorefresh=0
keeppackages=1
EOF
zypper --reposd-
If it works, then the fix worked. Without the fix, the following error can be seen:
Building repository 'test.repo' cache .......
Error building the cache:
[test.repo|https:/
History:
- 'repo2solv' '-o' '/tmp/img/
/tmp/
Command exited with status 1.
Warning: Skipping repository 'test.repo' because of the above error.
Some of the repositories have not been refreshed because of an error.
Loading repository data...
Reading installed packages...
'distribution-
No provider of 'distribution-
'filesystem' not found in package names. Trying capabilities.
No provider of 'filesystem' found.
Resolving package dependencies...
Nothing to do.
[Regression Potential]
The feature had been supported for many versions prior to the current ones, and when enabled it mainly affects code paths that deal with zstd compressed artifacts, which currently cannot work at all due to the lack of support, so the overall risk appears low.
What could happen is that support for zstd does not work as expected, which means Tumbleweed/Rawhide chroots will remain not possible to create. The download/unpack could fail at a different time in the process.
Another possible scenario is that enabling the zstd decompressor support breaks the artifact unpack process, regardless of the compression format used, which would be a new regression w.r.t the current status quo, affecting for example creating Fedora 38 or SUSE 15 chroots.
Also potential regressions in the newly added libzstd dependency could affect the workflows enabled by this change, while previously this package would have been unaffected.
description: | updated |
Changed in libsolv (Ubuntu): | |
status: | New → Confirmed |
Changed in libsolv (Ubuntu Mantic): | |
status: | New → Confirmed |
Changed in libsolv (Ubuntu Lunar): | |
status: | New → Confirmed |
Changed in libsolv (Ubuntu Jammy): | |
status: | New → Confirmed |
description: | updated |
description: | updated |
description: | updated |
tags: | added: patch |
description: | updated |
description: | updated |
description: | updated |
Changed in libsolv (Ubuntu Noble): | |
status: | Fix Committed → Fix Released |
jammy, fix attached as debdiff and available on Salsa https:/ /salsa. debian. org/debian/ libsolv/ -/tree/ jammy?ref_ type=heads
# cat /etc/os-release CODENAME= jammy /www.ubuntu. com/" /help.ubuntu. com/" /bugs.launchpad .net/ubuntu/" POLICY_ URL="https:/ /www.ubuntu. com/legal/ terms-and- policies/ privacy- policy" CODENAME= jammy 1ubuntu0. 22.04.1 amd64 dependency solver using a satisfiability algorithm (shared library) d/test. repo /download. opensuse. org/tumbleweed/ repo/oss/ dir=$PWD/ repos.d --root=$PWD/img --gpg-auto- import- keys install distribution- release filesystem
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 (Jammy Jellyfish)"
VERSION_
ID=ubuntu
ID_LIKE=debian
HOME_URL="https:/
SUPPORT_URL="https:/
BUG_REPORT_URL="https:/
PRIVACY_
UBUNTU_
# dpkg -l | grep libsolv1
ii libsolv1:amd64 0.7.20-
# mkdir -p repos.d img
# cat <<EOF>repos.
[test.repo]
name=test.repo
baseurl=https:/
gpgcheck=1
enabled=1
autorefresh=0
keeppackages=1
EOF
# zypper --reposd-
Automatically importing the following key:
Repository: test.repo 29b700a4- 62b07e22
Key Name: openSUSE Project Signing Key <email address hidden>
Key Fingerprint: AD485664 E901B867 051AB15F 35A2F86E 29B700A4
Key Created: Mon Jun 20 14:03:14 2022
Key Expires: Fri Jun 19 14:03:14 2026
Rpm Name: gpg-pubkey-
Building repository 'test.repo' cache ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....[done] release' not found in package names. Trying capabilities.
Loading repository data...
Reading installed packages...
'distribution-
Resolving package dependencies...
The following 19 NEW packages are going to be installed: usrmerge- tools filesystem glibc glibc-extra libgcc_s1 libncurses6 libpcre2-8-0 libreadline8 release- appliance- custom system-user-root
bash bash-sh compat-
libselinux1 libstdc++6 ncurses-utils openSUSE-release openSUSE-
terminfo-base terminfo-screen timezone
The following 4 recommended packages were automatically selected:
glibc-extra ncurses-utils terminfo-screen timezone
The following 9 packages are suggested, but will not be installed: logos-openSUSE- Tumbleweed java-11-openjdk mariadb mariadb-client openSUSE-build-key repos-Tumblewee d openssl-1_1 procps
branding-openSUSE distribution-
openSUSE-
19 new packages to install. ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ......[ done] lib/os- release tumbleweed" ID="20231114" NAME="openSUSE Tumbleweed" "cpe:/o: opensuse: tumbleweed: 20231114" /bugzilla. opensuse. org" /bugs.opensuse. org" /www.opensuse. org" /en.opensuse. org/Portal: Tumbleweed" or-logo- Tumbleweed"
Overall download size: 7.3 MiB. Already cached: 0 B. After the operation, additional 16.3 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y
<...>
Executing %posttrans scripts .......
# cat img/usr/
NAME="openSUSE Tumbleweed"
# VERSION="20231114"
ID="opensuse-
ID_LIKE="opensuse suse"
VERSION_
PRETTY_
ANSI_COLOR="0;32"
CPE_NAME=
BUG_REPORT_URL="https:/
SUPPORT_URL="https:/
HOME_URL="https:/
DOCUMENTATION_URL="https:/
LOGO="distribut