Skip to content

Commit

Permalink
gitlab*: add yum repo for el9
Browse files Browse the repository at this point in the history
  • Loading branch information
shankerwangmiao committed Nov 20, 2023
1 parent 5e1e9bd commit 8e5fadf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 38 deletions.
4 changes: 2 additions & 2 deletions gitlab-ce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
set -o pipefail

_here=`dirname $(realpath $0)`
apt_sync="${_here}/apt-sync.py"
apt_sync="${_here}/apt-sync.py"
yum_sync="${_here}/yum-sync.py"

UPSTREAM=${TUNASYNC_UPSTREAM_URL:-"https://packages.gitlab.com/gitlab/gitlab-ce"}
Expand All @@ -15,7 +15,7 @@ UBUNTU_PATH="${BASE_PATH}/ubuntu/"
DEBIAN_PATH="${BASE_PATH}/debian/"
export REPO_SIZE_FILE=/tmp/reposize.$RANDOM

"$yum_sync" "${UPSTREAM}/el/@{os_ver}/@{arch}/" 7 "gitlab" x86_64 "el@{os_ver}" "$YUM_PATH"
"$yum_sync" "${UPSTREAM}/el/@{os_ver}/@{arch}/" 7,9 "gitlab" x86_64 "el@{os_ver}" "$YUM_PATH"
echo "YUM finished"

"$apt_sync" --delete "${UPSTREAM}/ubuntu" @ubuntu-lts main amd64,i386 "$UBUNTU_PATH"
Expand Down
26 changes: 0 additions & 26 deletions gitlab-ci-multi-runner.sh

This file was deleted.

4 changes: 2 additions & 2 deletions gitlab-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
set -o pipefail

_here=`dirname $(realpath $0)`
apt_sync="${_here}/apt-sync.py"
apt_sync="${_here}/apt-sync.py"
yum_sync="${_here}/yum-sync.py"

BASE_PATH="${TUNASYNC_WORKING_DIR}"
Expand All @@ -15,7 +15,7 @@ UBUNTU_PATH="${BASE_PATH}/ubuntu/"
DEBIAN_PATH="${BASE_PATH}/debian/"
export REPO_SIZE_FILE=/tmp/reposize.$RANDOM

"$yum_sync" "${UPSTREAM}/el/@{os_ver}/@{arch}" 7 gitlab-runner x86_64,aarch64 "el@{os_ver}-@{arch}" "$YUM_PATH"
"$yum_sync" "${UPSTREAM}/el/@{os_ver}/@{arch}" 7,9 gitlab-runner x86_64,aarch64 "el@{os_ver}-@{arch}" "$YUM_PATH"
echo "YUM finished"

"$apt_sync" --delete "${UPSTREAM}/ubuntu" @ubuntu-lts main amd64,i386,arm64 "$UBUNTU_PATH"
Expand Down
18 changes: 10 additions & 8 deletions yum-sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def main():

parser = argparse.ArgumentParser()
parser.add_argument("base_url", type=str, help="base URL")
parser.add_argument("os_version", type=str, help="e.g. 7-8")
parser.add_argument("os_version", type=str, help="e.g. 7-8,9")
parser.add_argument("component", type=str, help="e.g. mysql56-community,mysql57-community")
parser.add_argument("arch", type=str, help="e.g. x86_64")
parser.add_argument("repo_name", type=str, help="e.g. @{comp}-el@{os_ver}")
Expand All @@ -153,13 +153,15 @@ def main():
help='download repodata files instead of generating them')
args = parser.parse_args()

if '-' in args.os_version and '-stream' not in args.os_version:
dash = args.os_version.index('-')
os_list = [ str(i) for i in range(
int(args.os_version[:dash]),
1+int(args.os_version[dash+1:])) ]
else:
os_list = [args.os_version]
os_list = []
for os_version in args.os_version.split(','):
if '-' in os_version and '-stream' not in os_version:
dash = os_version.index('-')
os_list = os_list + [ str(i) for i in range(
int(os_version[:dash]),
1+int(os_version[dash+1:])) ]
else:
os_list.append(os_version)
check_args("os_version", os_list)
component_list = args.component.split(',')
check_args("component", component_list)
Expand Down

0 comments on commit 8e5fadf

Please sign in to comment.