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

[PKGS-7388] Fix security repository test for new apt sources format #1434

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

silentcreek
Copy link
Contributor

In addition to the traditional one-line-per-source style, apt supports a newer sources list style with multi-line-stanzas (DEB822 style). This new style is e.g. used in Debian's latest docker images and expected to be the default in Ubuntu 23.10. The current test fails to recognize those sources.

An example of the new style would be:
Types: deb
URIs: https://deb.debian.org/debian-security
Suites: bookworm-security
Components: main non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

Change the regular expression to match the newer style as well.

In addition to the traditional one-line-per-source style, apt supports a newer sources list style with multi-line-stanzas (DEB822 style). This new style is e.g. used in Debian's latest docker images and expected to be the default in Ubuntu 23.10. The current test fails to recognize those sources.

An example of the new style would be: 
Types: deb
URIs: https://deb.debian.org/debian-security
Suites: bookworm-security
Components: main non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

Change the regular expression to match the newer style as well.
@silentcreek
Copy link
Contributor Author

Oh, I forgot to explain:
The change only applies to the regex for the files in /etc/apt/sources.list.d/ but not to the test of /etc/apt/sources.list itself. The reason is that the new style requires the files in this format to have the ending .sources while the old style is expected in files ending with .list
While we could use two different regular expressions depending on the file ending, I didn't want to make the test overly complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant