Skip to content

Commit

Permalink
fedora: fix build error on Fedora 39+
Browse files Browse the repository at this point in the history
  • Loading branch information
taoky committed Dec 2, 2023
1 parent 3ed7465 commit 5e8699e
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions build-fedora.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ source common.sh
docker-tags fedora |
while read tag; do
dockerfile=$(mktemp)
sedcommand="sed -e 's|^metalink=|#metalink=|g' \
-e 's|^#baseurl=http://download.example/pub/fedora/linux|baseurl=https://mirrors.ustc.edu.cn/fedora|g' \
-i.bak "
cat << EOF > $dockerfile
FROM fedora:$tag
RUN sed -e 's|^metalink=|#metalink=|g' \
-e 's|^#baseurl=http://download.example/pub/fedora/linux|baseurl=https://mirrors.ustc.edu.cn/fedora|g' \
-i.bak \
/etc/yum.repos.d/fedora.repo \
/etc/yum.repos.d/fedora-modular.repo \
/etc/yum.repos.d/fedora-updates.repo \
/etc/yum.repos.d/fedora-updates-modular.repo
RUN $sedcommand /etc/yum.repos.d/fedora-modular.repo /etc/yum.repos.d/fedora-updates-modular.repo || true \
&& $sedcommand /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora-updates.repo
EOF
docker build -f $dockerfile -t ustclug/fedora:$tag .
docker push ustclug/fedora:$tag
Expand Down

0 comments on commit 5e8699e

Please sign in to comment.