Skip to content

Commit

Permalink
Merge pull request #1129 from tu1h/cherrypick012_pull_1104
Browse files Browse the repository at this point in the history
[cherry-pick] Add Rockylinux support
  • Loading branch information
0ekk authored Feb 22, 2024
2 parents 1c5080d + 02dd724 commit 7be2cba
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/call-os-pkgs-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
dockerfile: build/os-packages/Dockerfile.redhat8
- name: redhat9
dockerfile: build/os-packages/Dockerfile.redhat9
- name: rocky9
dockerfile: build/os-packages/Dockerfile.rocky9
- name: kylinv10
dockerfile: build/os-packages/Dockerfile.kylinv10
- name: openeuler22.03
Expand Down
7 changes: 7 additions & 0 deletions artifacts/import_iso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ function iso::mk_server_path() {
return
fi
fi
if [[ "$os" =~ "Rocky Linux" ]]; then
echo "/rocky-iso/$version/os/$arch"
return
fi
fi
fi
done
Expand Down Expand Up @@ -178,6 +182,9 @@ function iso::import_data() {
if [ -d "${iso_mnt_path}/pool" ]; then
path_list+=("${iso_mnt_path}/pool")
fi
if [ -d "${iso_mnt_path}/minimal" ]; then
path_list+=("${iso_mnt_path}/minimal")
fi

if [ "${#path_list[@]}" -gt 0 ]; then
for path_name in "${path_list[@]}"; do
Expand Down
20 changes: 20 additions & 0 deletions build/os-packages/Dockerfile.rocky9
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
ARG OS_NAME=rocky

FROM rockylinux:9 as os-rocky9
ARG OS_NAME
ARG OS_VERSION=9
ARG BUILD_TOOLS="yum-utils createrepo"

WORKDIR /$OS_NAME/$OS_VERSION/os
COPY build/os-packages/packages.yml .
COPY --from=mikefarah/yq:4.30.8 /usr/bin/yq /usr/bin/yq
RUN yq eval '.common[],.yum[],.rocky9[]' packages.yml > packages.list

RUN ARCH=$(uname -m) \
&& dnf install -y ${BUILD_TOOLS} \
&& while read -r line; do dnf install -y --downloadonly --downloaddir=${ARCH} ${line}; done <<<"$(sort -u packages.list)" \
&& createrepo -d ${ARCH}

FROM scratch
ARG OS_NAME
COPY --from=os-rocky9 /$OS_NAME /resources/$OS_NAME
3 changes: 3 additions & 0 deletions build/os-packages/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ redhat8:

redhat9: []

rocky9:
- socat

kylinv10:
- socat
- libselinux-python
Expand Down

0 comments on commit 7be2cba

Please sign in to comment.