From 16b15c53a1c6f4122235c5abfc32916cfca2f1d3 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 17 Mar 2026 12:43:46 +0100 Subject: [PATCH 1/2] Add support for coping /*.md files to /root directory. After sync to GitLab we have MD files present in each image. Relevant issue https://redhat.atlassian.net/browse/RHELMISC-27557 Signed-off-by: Petr "Stone" Hracek --- common.mk | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/common.mk b/common.mk index 51dcc8a..6478ead 100644 --- a/common.mk +++ b/common.mk @@ -82,7 +82,7 @@ build-all: $(VERSIONS) done .PHONY: $(VERSIONS) -$(VERSIONS): +$(VERSIONS): copy_md_files VERSION="$@" $(script_env) $(build) .PHONY: test check @@ -136,6 +136,17 @@ clean-images: clean-versions: rm -rf $(VERSIONS) +# Copy also all .md files from version directory to the root of +# container images, so that they are available in the image +# Currently there is only README.md, but there may be more in the future +copy_md_files: + @for version in $(VERSIONS); do \ + mkdir -p "$$version/root" ; \ + if ls $$version/*.md 1> /dev/null 2>&1; then \ + cp -v $$version/*.md "$$version/root" ; \ + fi ; \ + done + generate-all: generate .PHOHY: generate From f57f4954cb06a9f7a6f11a60cf807561e577551e Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 17 Mar 2026 15:08:09 +0100 Subject: [PATCH 2/2] Add support for deleing MD files created by function create_md_files Signed-off-by: Petr "Stone" Hracek --- common.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/common.mk b/common.mk index 6478ead..0b9501b 100644 --- a/common.mk +++ b/common.mk @@ -127,7 +127,7 @@ betka: $(script_env) $(betka) .PHONY: clean clean-hook clean-images clean-versions -clean: clean-images +clean: remove_md_files clean-images @$(MAKE) --no-print-directory clean-hook clean-images: @@ -144,6 +144,14 @@ copy_md_files: mkdir -p "$$version/root" ; \ if ls $$version/*.md 1> /dev/null 2>&1; then \ cp -v $$version/*.md "$$version/root" ; \ + chmod a+r $$version/root/*.md ; \ + fi ; \ + done + +remove_md_files: + @for version in $(VERSIONS); do \ + if ls $$version/*.md 1> /dev/null 2>&1; then \ + rm -v $$version/root/*.md ; \ fi ; \ done