Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apt: avoid ?exact-name for systemd packages #3343

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

bluca
Copy link
Member

@bluca bluca commented Jan 11, 2025

There is a strange interaction between ?exact-name, apt repositories generated by OBS and multiple architectures, that breaks installing packages:

$ apt install --dry-run '?exact-name(systemd-cryptsetup)' NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!

systemd-cryptsetup is already the newest version (257.999+731+g8c5b35957-0). 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:

Unsatisfied dependencies:
 systemd-cryptsetup : Conflicts: systemd-cryptsetup:i386 but 257.999+731+g8c5b35957-0 is to be installed
                      Conflicts: systemd-cryptsetup:arm64 but 257.999+731+g8c5b35957-0 is to be installed
 systemd-cryptsetup:i386 : Conflicts: systemd-cryptsetup but 257.999+731+g8c5b35957-0 is to be installed
                           Conflicts: systemd-cryptsetup:arm64 but 257.999+731+g8c5b35957-0 is to be installed
 systemd-cryptsetup:arm64 : Depends: libc6:arm64 (>= 2.38) but it is not installable
                            Depends: libcryptsetup12:arm64 (>= 2:2.7) but it is not installable
                            Depends: libssl3t64:arm64 (>= 3.0.0) but it is not installable
                            Depends: libsystemd-shared:arm64 (= 257.999+731+g8c5b35957-0) but it is not going to be installed
                            Conflicts: systemd-cryptsetup but 257.999+731+g8c5b35957-0 is to be installed
                            Conflicts: systemd-cryptsetup:i386 but 257.999+731+g8c5b35957-0 is to be installed
Error: Unable to correct problems, you have held broken packages.

It seems ?exact-name selects all available packages, unless an architecture is specified:

$ apt install --dry-run '?exact-name(systemd-cryptsetup:amd64)' NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!

Summary:
  Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 0

But this only happens with the repository metadata format generated on OBS. There are multiple formats, apparently.

https://download.opensuse.org/repositories/home:/bluca:/systemd/Debian_Testing/

So either we set the specific architecture in the common mkosi.conf, or we need a separate mkosi.conf with a trigger to filter out releases where the packages are not available.
I chose the latter as it the filters are fixed, while adding by architecture means every time a new arch is added, it needs to be duplicated.

This is only necessary for packages that are hosted on OBS, ie: the systemd ones.

@DaanDeMeyer
Copy link
Contributor

Let's get #3344 in first and then drop all the focal stuff from this PR

@bluca
Copy link
Member Author

bluca commented Jan 11, 2025

Let's get #3344 in first and then drop all the focal stuff from this PR

CI is unhappy here, so updated here to add !focal

@DaanDeMeyer
Copy link
Contributor

@bluca Can you rebase and drop focal from everything?

There is a strange interaction between ?exact-name, apt repositories
generated by OBS and multiple architectures, that breaks installing
packages:

$ apt install --dry-run '?exact-name(systemd-cryptsetup)'
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!

systemd-cryptsetup is already the newest version (257.999+731+g8c5b35957-0).
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:

Unsatisfied dependencies:
 systemd-cryptsetup : Conflicts: systemd-cryptsetup:i386 but 257.999+731+g8c5b35957-0 is to be installed
                      Conflicts: systemd-cryptsetup:arm64 but 257.999+731+g8c5b35957-0 is to be installed
 systemd-cryptsetup:i386 : Conflicts: systemd-cryptsetup but 257.999+731+g8c5b35957-0 is to be installed
                           Conflicts: systemd-cryptsetup:arm64 but 257.999+731+g8c5b35957-0 is to be installed
 systemd-cryptsetup:arm64 : Depends: libc6:arm64 (>= 2.38) but it is not installable
                            Depends: libcryptsetup12:arm64 (>= 2:2.7) but it is not installable
                            Depends: libssl3t64:arm64 (>= 3.0.0) but it is not installable
                            Depends: libsystemd-shared:arm64 (= 257.999+731+g8c5b35957-0) but it is not going to be installed
                            Conflicts: systemd-cryptsetup but 257.999+731+g8c5b35957-0 is to be installed
                            Conflicts: systemd-cryptsetup:i386 but 257.999+731+g8c5b35957-0 is to be installed
Error: Unable to correct problems, you have held broken packages.

It seems ?exact-name selects _all_ available packages, unless an architecture
is specified:

$ apt install --dry-run '?exact-name(systemd-cryptsetup:amd64)'
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!

Summary:
  Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 0

But this only happens with the repository metadata format generated
on OBS. There are multiple formats, apparently.

https://download.opensuse.org/repositories/home:/bluca:/systemd/Debian_Testing/

So either we set the specific architecture in the common mkosi.conf,
or we need a separate mkosi.conf with a trigger to filter out releases
where the packages are not available.
I chose the latter as it the filters are fixed, while adding by architecture
means every time a new arch is added, it needs to be duplicated.

This is only necessary for packages that are hosted on OBS, ie: the
systemd ones.
@DaanDeMeyer DaanDeMeyer merged commit 4d0d0d5 into systemd:main Jan 13, 2025
31 checks passed
@bluca bluca deleted the exact_name branch January 13, 2025 15:17
@bluca bluca restored the exact_name branch January 13, 2025 15:18
@bluca bluca deleted the exact_name branch January 13, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants