images: Ensure that the desired manuals are indeed present

Building an OCI image leads to so much spew that it's hard to notice if
something unexpected happened, and as seen in the previous commit [1],
unexpected things do happen.

Therefore, this adds a built-in test to ensure that the desired files
are actually present in the final image.  Right now it only checks the
presence of some representative manuals to ensure that the packages
listed in the 'missing-docs' file really do get reinstalled, and the
documentation that was stripped out in the base image really does get
restored.

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

[1] Commit 1fc50176c9
    https://github.com/containers/toolbox/pull/1226

https://github.com/containers/toolbox/pull/1226
This commit is contained in:
Debarshi Ray 2023-02-01 18:32:30 +01:00
parent 1fc50176c9
commit ff1212e103
6 changed files with 63 additions and 0 deletions

View File

@ -26,4 +26,18 @@ COPY extra-packages /
RUN dnf -y install $(<extra-packages)
RUN rm /extra-packages
COPY ensure-files /
RUN ret_val=0; \
while read file; do \
if ! compgen -G "$file" >/dev/null; then \
echo "$file: No such file or directory" >&2; \
ret_val=1; \
break; \
fi; \
done <ensure-files; \
if [ "$ret_val" -ne 0 ]; then \
false; \
fi
RUN rm /ensure-files
RUN dnf clean all

View File

@ -0,0 +1,7 @@
/usr/share/man/man1/bash.1*
/usr/share/man/man1/cd.1*
/usr/share/man/man1/export.1*
/usr/share/man/fr/man8/rpm.8*
/usr/share/man/ja/man8/rpm.8*
/usr/share/man/man8/rpm.8*

View File

@ -26,4 +26,18 @@ COPY extra-packages /
RUN dnf -y install $(<extra-packages)
RUN rm /extra-packages
COPY ensure-files /
RUN ret_val=0; \
while read file; do \
if ! compgen -G "$file" >/dev/null; then \
echo "$file: No such file or directory" >&2; \
ret_val=1; \
break; \
fi; \
done <ensure-files; \
if [ "$ret_val" -ne 0 ]; then \
false; \
fi
RUN rm /ensure-files
RUN dnf clean all

View File

@ -0,0 +1,7 @@
/usr/share/man/man1/bash.1*
/usr/share/man/man1/cd.1*
/usr/share/man/man1/export.1*
/usr/share/man/fr/man8/rpm.8*
/usr/share/man/ja/man8/rpm.8*
/usr/share/man/man8/rpm.8*

View File

@ -26,4 +26,18 @@ COPY extra-packages /
RUN dnf -y install $(<extra-packages)
RUN rm /extra-packages
COPY ensure-files /
RUN ret_val=0; \
while read file; do \
if ! compgen -G "$file" >/dev/null; then \
echo "$file: No such file or directory" >&2; \
ret_val=1; \
break; \
fi; \
done <ensure-files; \
if [ "$ret_val" -ne 0 ]; then \
false; \
fi
RUN rm /ensure-files
RUN dnf clean all

View File

@ -0,0 +1,7 @@
/usr/share/man/man1/bash.1*
/usr/share/man/man1/cd.1*
/usr/share/man/man1/export.1*
/usr/share/man/fr/man8/rpm.8*
/usr/share/man/ja/man8/rpm.8*
/usr/share/man/man8/rpm.8*