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

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.
This commit is contained in:
silentcreek 2023-08-27 23:49:35 +02:00 committed by GitHub
parent 0d77a367c5
commit d5bc20f6e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1043,7 +1043,7 @@
fi
if [ -d /etc/apt/sources.list.d ]; then
LogText "Searching for security.debian.org/security.ubuntu.com or security repositories in /etc/apt/sources.list.d directory"
FIND=$(${GREPBINARY} -E -r "security.debian.org|security.ubuntu.com|security/? " /etc/apt/sources.list.d | ${GREPBINARY} -v '#' | ${SEDBINARY} 's/ /!space!/g')
FIND=$(${GREPBINARY} -E -r "security.debian.org|security.ubuntu.com|security/?( |$)" /etc/apt/sources.list.d | ${GREPBINARY} -v '#' | ${SEDBINARY} 's/ /!space!/g')
if [ -n "${FIND}" ]; then
FOUND=1
Display --indent 2 --text "- Checking security repository in sources.list.d directory" --result "${STATUS_OK}" --color GREEN