images/fedora: Ensure that documentation and translations are present

This should finally ensure that the fedora-toolbox image doesn't have
any package that had its content, such as documentation or translations,
stripped out by the fedora base image.

Until now, missing-docs had a hand-maintained list of packages that had
their content stripped out by the fedora base image.  These packages are
reinstalled when building the fedora-toolbox image to restore the lost
content.  Unfortunately, this list was incomplete because it was only
updated when someone noticed that something is missing.

Now, the list is generated with:
  $ rpm --all --query --state --queryformat "PACKAGE: %{NAME}\n"

... to ensure that it's always complete.

The existing built-in test to ensure that the desired files are actually
present in the final image was extended to cover some of those that were
absent.  A new built-in test, based on the above rpm(1) command, was
added as a fallback to ensure that the final image doesn't have any
package with missing content.

Only the images for currently maintained Fedoras (ie., 37, 38 and 39)
were updated.

As suggested by Brian Campbell.

https://github.com/containers/toolbox/issues/603
This commit is contained in:
Debarshi Ray 2023-10-31 18:02:44 +01:00
parent 9b5313e5a7
commit 154156d860
9 changed files with 278 additions and 0 deletions

View file

@ -41,4 +41,14 @@ RUN ret_val=0; \
fi fi
RUN rm /ensure-files RUN rm /ensure-files
RUN broken_packages="$(rpm --all --query --state --queryformat "PACKAGE: %{NAME}\n" \
| sed --quiet --regexp-extended '/PACKAGE: /{s/PACKAGE: // ; h ; b }; /^not installed/ { g; p }' \
| uniq \
| sort)"; \
if [ "$broken_packages" != "" ]; then \
echo "Packages with missing files:" >&2; \
echo "$broken_packages" >&2; \
false; \
fi
RUN dnf clean all RUN dnf clean all

View file

@ -6,13 +6,26 @@
/usr/share/man/man1/cp.1* /usr/share/man/man1/cp.1*
/usr/share/man/man1/ls.1* /usr/share/man/man1/ls.1*
/usr/share/man/man8/dnf.8*
/usr/share/man/man5/dnf.conf.5*
/usr/share/locale/de/LC_MESSAGES/elfutils.mo
/usr/share/locale/ja/LC_MESSAGES/elfutils.mo
/usr/share/man/man1/gpg2.1* /usr/share/man/man1/gpg2.1*
/usr/share/man/man7/gnupg2.7* /usr/share/man/man7/gnupg2.7*
/usr/share/info/nettle.info*
/usr/share/locale/fr/LC_MESSAGES/popt.mo
/usr/share/locale/ja/LC_MESSAGES/popt.mo
/usr/share/man/fr/man1/pstree.1* /usr/share/man/fr/man1/pstree.1*
/usr/share/man/ru/man1/pstree.1* /usr/share/man/ru/man1/pstree.1*
/usr/share/man/man1/pstree.1* /usr/share/man/man1/pstree.1*
/usr/share/info/history.info*
/usr/share/man/fr/man8/rpm.8* /usr/share/man/fr/man8/rpm.8*
/usr/share/man/ja/man8/rpm.8* /usr/share/man/ja/man8/rpm.8*
/usr/share/man/man8/rpm.8* /usr/share/man/man8/rpm.8*

View file

@ -1,21 +1,91 @@
acl acl
alternatives
audit-libs
authselect
authselect-libs
bash bash
ca-certificates
coreutils-common coreutils-common
cracklib
crypto-policies
curl curl
cyrus-sasl-lib
dnf
dnf-data
elfutils-libelf
expat
file-libs
filesystem
findutils findutils
gawk gawk
glib2
gmp
gnupg2 gnupg2
gnutls
gpgme
grep grep
gzip gzip
ima-evm-utils
keyutils-libs
krb5-libs
libarchive
libassuan
libblkid
libcap libcap
libcap-ng
libdb
libdnf
libeconf
libevent
libffi
libgcrypt
libgomp
libgpg-error
libidn2
libksba
libmodulemd
libpwquality
librepo
libsemanage
libsigsegv
libsolv
libssh
libtasn1
libtirpc
libunistring
libverto
libxcrypt
libxml2
libyaml
lz4-libs
mpfr
ncurses-base
nettle
openldap
openssl openssl
p11-kit p11-kit
pam pam
pcre
pcre2-syntax
popt
python3 python3
python3-gpg
python3-libs
python3-rpm
readline
rpm rpm
sed sed
setup
shadow-utils shadow-utils
sqlite-libs
sudo sudo
systemd systemd
systemd-libs
tar tar
tpm2-tss
tzdata
util-linux-core util-linux-core
vim-minimal
yum
zchunk-libs
zlib

View file

@ -41,4 +41,14 @@ RUN ret_val=0; \
fi fi
RUN rm /ensure-files RUN rm /ensure-files
RUN broken_packages="$(rpm --all --query --state --queryformat "PACKAGE: %{NAME}\n" \
| sed --quiet --regexp-extended '/PACKAGE: /{s/PACKAGE: // ; h ; b }; /^not installed/ { g; p }' \
| uniq \
| sort)"; \
if [ "$broken_packages" != "" ]; then \
echo "Packages with missing files:" >&2; \
echo "$broken_packages" >&2; \
false; \
fi
RUN dnf clean all RUN dnf clean all

View file

@ -6,13 +6,26 @@
/usr/share/man/man1/cp.1* /usr/share/man/man1/cp.1*
/usr/share/man/man1/ls.1* /usr/share/man/man1/ls.1*
/usr/share/man/man8/dnf.8*
/usr/share/man/man5/dnf.conf.5*
/usr/share/locale/de/LC_MESSAGES/elfutils.mo
/usr/share/locale/ja/LC_MESSAGES/elfutils.mo
/usr/share/man/man1/gpg2.1* /usr/share/man/man1/gpg2.1*
/usr/share/man/man7/gnupg2.7* /usr/share/man/man7/gnupg2.7*
/usr/share/info/nettle.info*
/usr/share/locale/fr/LC_MESSAGES/popt.mo
/usr/share/locale/ja/LC_MESSAGES/popt.mo
/usr/share/man/fr/man1/pstree.1* /usr/share/man/fr/man1/pstree.1*
/usr/share/man/ko/man1/pstree.1* /usr/share/man/ko/man1/pstree.1*
/usr/share/man/man1/pstree.1* /usr/share/man/man1/pstree.1*
/usr/share/info/history.info*
/usr/share/man/fr/man8/rpm.8* /usr/share/man/fr/man8/rpm.8*
/usr/share/man/ja/man8/rpm.8* /usr/share/man/ja/man8/rpm.8*
/usr/share/man/man8/rpm.8* /usr/share/man/man8/rpm.8*

View file

@ -1,21 +1,91 @@
acl acl
alternatives
audit-libs
authselect
authselect-libs
bash bash
ca-certificates
coreutils-common coreutils-common
cracklib
crypto-policies
curl curl
cyrus-sasl-lib
dnf
dnf-data
elfutils-libelf
expat
file-libs
filesystem
findutils findutils
gawk gawk
glib2
gmp
gnupg2 gnupg2
gnutls
gpgme
grep grep
gzip gzip
ima-evm-utils
keyutils-libs
krb5-libs
libarchive
libassuan
libblkid
libcap libcap
libcap-ng
libdb
libdnf
libeconf
libevent
libffi
libgcrypt
libgomp
libgpg-error
libidn2
libksba
libmodulemd
libpwquality
librepo
libsemanage
libsigsegv
libsolv
libssh
libtasn1
libtirpc
libunistring
libunistring1.0
libverto
libxcrypt
libxml2
libyaml
lz4-libs
mpfr
ncurses-base
nettle
openldap
openssl openssl
p11-kit p11-kit
pam pam
pcre2-syntax
popt
python3 python3
python3-libs
python3-rpm
readline
rpm rpm
rpm-sequoia
sed sed
setup
shadow-utils shadow-utils
sqlite-libs
sudo sudo
systemd systemd
systemd-libs
tar tar
tpm2-tss
tzdata
util-linux-core util-linux-core
vim-minimal
yum
zchunk-libs
zlib

View file

@ -41,4 +41,14 @@ RUN ret_val=0; \
fi fi
RUN rm /ensure-files RUN rm /ensure-files
RUN broken_packages="$(rpm --all --query --state --queryformat "PACKAGE: %{NAME}\n" \
| sed --quiet --regexp-extended '/PACKAGE: /{s/PACKAGE: // ; h ; b }; /^not installed/ { g; p }' \
| uniq \
| sort)"; \
if [ "$broken_packages" != "" ]; then \
echo "Packages with missing files:" >&2; \
echo "$broken_packages" >&2; \
false; \
fi
RUN dnf clean all RUN dnf clean all

View file

@ -6,13 +6,26 @@
/usr/share/man/man1/cp.1* /usr/share/man/man1/cp.1*
/usr/share/man/man1/ls.1* /usr/share/man/man1/ls.1*
/usr/share/man/man8/dnf.8*
/usr/share/man/man5/dnf.conf.5*
/usr/share/locale/de/LC_MESSAGES/elfutils.mo
/usr/share/locale/ja/LC_MESSAGES/elfutils.mo
/usr/share/man/man1/gpg2.1* /usr/share/man/man1/gpg2.1*
/usr/share/man/man7/gnupg2.7* /usr/share/man/man7/gnupg2.7*
/usr/share/info/nettle.info*
/usr/share/locale/fr/LC_MESSAGES/popt.mo
/usr/share/locale/ja/LC_MESSAGES/popt.mo
/usr/share/man/fr/man1/pstree.1* /usr/share/man/fr/man1/pstree.1*
/usr/share/man/ko/man1/pstree.1* /usr/share/man/ko/man1/pstree.1*
/usr/share/man/man1/pstree.1* /usr/share/man/man1/pstree.1*
/usr/share/info/history.info*
/usr/share/man/man8/rpm.8* /usr/share/man/man8/rpm.8*
/usr/share/man/man8/rpm2cpio.8* /usr/share/man/man8/rpm2cpio.8*

View file

@ -1,21 +1,90 @@
acl acl
alternatives
audit-libs
authselect
authselect-libs
bash bash
ca-certificates
coreutils-common coreutils-common
cracklib
crypto-policies
curl curl
cyrus-sasl-lib
dnf
dnf-data
elfutils-libelf
expat
file-libs
filesystem
findutils findutils
gawk gawk
glib2
gmp
gnupg2 gnupg2
gnutls
grep grep
gzip gzip
ima-evm-utils
keyutils-libs
krb5-libs
libarchive
libassuan
libblkid
libcap libcap
libcap-ng
libcomps
libdb
libdnf
libeconf
libevent
libffi
libgcrypt
libgomp
libgpg-error
libidn2
libksba
libmodulemd
libpwquality
librepo
libsemanage
libsigsegv
libsolv
libssh
libtasn1
libtirpc
libunistring
libverto
libxcrypt
libxml2
libyaml
lz4-libs
mpfr
ncurses-base
nettle
openldap
openssl openssl
p11-kit p11-kit
pam pam
pcre2-syntax
popt
python3 python3
python3-libs
python3-rpm
readline
rpm rpm
rpm-sequoia
sed sed
setup
shadow-utils shadow-utils
sqlite-libs
sudo sudo
systemd systemd
systemd-libs
tar tar
tpm2-tss
tzdata
util-linux-core util-linux-core
vim-minimal
yum
zchunk-libs
zlib