Skip to content

Commit

Permalink
Don't use releasever to peg Rocky Linux 9
Browse files Browse the repository at this point in the history
EPEL9 uses `$releasever` and doesn't consider point releases valid; so
we can't use it to peg Rocky Linux 9 to a given point release. Use raw
string substitution in stead.

Fixes #47

Signed-off-by: Jonathon Anderson <[email protected]>
  • Loading branch information
anderbubble committed Jan 23, 2024
1 parent 010743f commit cb99d79
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions rockylinux-9/Containerfile-fixed
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM docker.io/library/rockylinux:${releasever}
FROM docker.io/library/rockylinux:${release}

RUN sed -i /etc/yum.repos.d/rocky*.repo \
-e 's/^#baseurl=/baseurl=/' \
-e 's/^mirrorlist=/#mirrorlist=/' \
&& echo "${releasever}" >/etc/dnf/vars/releasever \
-e 's/\$releasever/${release}/' \
&& dnf clean all

RUN dnf update -y \
Expand Down
4 changes: 2 additions & 2 deletions rockylinux-9/Containerfile-vault
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM docker.io/library/rockylinux:${releasever}
FROM docker.io/library/rockylinux:${release}

RUN sed -i /etc/yum.repos.d/rocky*.repo \
-e 's/^#baseurl=/baseurl=/' \
-e 's/^mirrorlist=/#mirrorlist=/' \
-e 's/\$releasever/${release}/' \
&& echo 'vault/rocky' >/etc/dnf/vars/contentdir \
&& echo "${releasever}" >/etc/dnf/vars/releasever \
&& dnf clean all

RUN dnf update -y \
Expand Down
4 changes: 2 additions & 2 deletions rockylinux-9/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ clean:
rm -f Containerfile-9.*

Containerfile-9.%: Containerfile-vault
env releasever=9.$* envsubst <Containerfile-vault >$@
env release=9.$* envsubst '$$release' <Containerfile-vault >$@

Containerfile-9.3: Containerfile-fixed
env releasever=9.3 envsubst <Containerfile-fixed >$@
env release=9.3 envsubst '$$release' <Containerfile-fixed >$@

0 comments on commit cb99d79

Please sign in to comment.