From ff1212e1034d489fb999a06fd6f5bb1a890d3b6c Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 1 Feb 2023 18:32:30 +0100 Subject: [PATCH] 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 1fc50176c993a43a https://github.com/containers/toolbox/pull/1226 https://github.com/containers/toolbox/pull/1226 --- images/fedora/f36/Containerfile | 14 ++++++++++++++ images/fedora/f36/ensure-files | 7 +++++++ images/fedora/f37/Containerfile | 14 ++++++++++++++ images/fedora/f37/ensure-files | 7 +++++++ images/fedora/f38/Containerfile | 14 ++++++++++++++ images/fedora/f38/ensure-files | 7 +++++++ 6 files changed, 63 insertions(+) create mode 100644 images/fedora/f36/ensure-files create mode 100644 images/fedora/f37/ensure-files create mode 100644 images/fedora/f38/ensure-files diff --git a/images/fedora/f36/Containerfile b/images/fedora/f36/Containerfile index eaf2512..0136d83 100644 --- a/images/fedora/f36/Containerfile +++ b/images/fedora/f36/Containerfile @@ -26,4 +26,18 @@ COPY extra-packages / RUN dnf -y install $(/dev/null; then \ + echo "$file: No such file or directory" >&2; \ + ret_val=1; \ + break; \ + fi; \ + done /dev/null; then \ + echo "$file: No such file or directory" >&2; \ + ret_val=1; \ + break; \ + fi; \ + done /dev/null; then \ + echo "$file: No such file or directory" >&2; \ + ret_val=1; \ + break; \ + fi; \ + done