Skip to content

Commit 0d66c35

Browse files
nixpanicmergify[bot]
authored andcommitted
build: create /etc/selinux/config in case it is missing
Sometimes the Ceph container images seem to have a broken scriptlet while installing/updating Ceph packages. It is relatively common for them to fail when `/etc/selinux/config` does not exist. By ensuring the file directory and file exist (even if empty), the package installation or upgrades succeed. Signed-off-by: Niels de Vos <[email protected]> (cherry picked from commit 24d6b5f)
1 parent d3d17d5 commit 0d66c35

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

deploy/cephcsi/image/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ FROM ${BASE_IMAGE} as updated_base
1010
RUN dnf config-manager --disable \
1111
tcmu-runner,tcmu-runner-source,tcmu-runner-noarch,ceph-iscsi,ganesha || true
1212

13+
RUN mkdir /etc/selinux || true && touch /etc/selinux/config
14+
1315
RUN dnf -y update --nobest \
1416
&& dnf -y install nfs-utils \
1517
&& dnf clean all \

scripts/Dockerfile.devel

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ RUN source /build.env \
2323
RUN dnf config-manager --disable \
2424
tcmu-runner,tcmu-runner-source,tcmu-runner-noarch,ceph-iscsi,ganesha || true
2525

26+
RUN mkdir /etc/selinux || true && touch /etc/selinux/config
27+
2628
RUN dnf -y install \
2729
git \
2830
make \

scripts/Dockerfile.test

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ ENV \
2323

2424
COPY build.env /
2525

26+
RUN mkdir /etc/selinux || true && touch /etc/selinux/config
27+
2628
RUN source /build.env \
2729
&& \
2830
( test -n "${GOARCH}" && exit 0; echo -e "\n\nMissing GOARCH argument for building image, install Golang or run: make containerized-test GOARCH=amd64\n\n"; exit 1 ) \

0 commit comments

Comments
 (0)