Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: fix nightlys (incorrect old repo path) #1951

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ jobs:
distro-slug: almalinux-8
display-name: AlmaLinux 8
timeout: 20
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "onedir-nightly", "default"]'


almalinux-9:
Expand All @@ -248,7 +248,7 @@ jobs:
distro-slug: almalinux-9
display-name: AlmaLinux 9
timeout: 20
instances: '["git-3005", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]'
instances: '["git-3005", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "onedir-nightly", "default"]'


amazon-2:
Expand All @@ -262,7 +262,7 @@ jobs:
distro-slug: amazon-2
display-name: Amazon 2
timeout: 20
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "onedir-nightly", "default"]'


arch:
Expand Down Expand Up @@ -290,7 +290,7 @@ jobs:
distro-slug: centos-7
display-name: CentOS 7
timeout: 20
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "onedir-nightly", "default"]'


centos-stream8:
Expand All @@ -304,7 +304,7 @@ jobs:
distro-slug: centos-stream8
display-name: CentOS Stream 8
timeout: 20
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "onedir-nightly", "default"]'


centos-stream9:
Expand All @@ -318,7 +318,7 @@ jobs:
distro-slug: centos-stream9
display-name: CentOS Stream 9
timeout: 20
instances: '["git-3005", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]'
instances: '["git-3005", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "onedir-nightly", "default"]'


debian-10:
Expand All @@ -332,7 +332,7 @@ jobs:
distro-slug: debian-10
display-name: Debian 10
timeout: 20
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "onedir-nightly", "default"]'


debian-11:
Expand All @@ -346,7 +346,7 @@ jobs:
distro-slug: debian-11
display-name: Debian 11
timeout: 20
instances: '["old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]'
instances: '["old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "onedir-nightly", "default"]'


fedora-36:
Expand All @@ -360,7 +360,7 @@ jobs:
distro-slug: fedora-36
display-name: Fedora 36
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]'
instances: '["stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "onedir-nightly", "default"]'


fedora-37:
Expand All @@ -374,7 +374,7 @@ jobs:
distro-slug: fedora-37
display-name: Fedora 37
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
instances: '["stable-3006", "onedir-3006", "stable-3006-1", "latest", "onedir-nightly", "default"]'


fedora-38:
Expand All @@ -388,7 +388,7 @@ jobs:
distro-slug: fedora-38
display-name: Fedora 38
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
instances: '["stable-3006", "onedir-3006", "stable-3006-1", "latest", "onedir-nightly", "default"]'


gentoo:
Expand Down Expand Up @@ -458,7 +458,7 @@ jobs:
distro-slug: oraclelinux-7
display-name: Oracle Linux 7
timeout: 20
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "onedir-nightly", "default"]'


oraclelinux-8:
Expand All @@ -472,7 +472,7 @@ jobs:
distro-slug: oraclelinux-8
display-name: Oracle Linux 8
timeout: 20
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "onedir-nightly", "default"]'


photon-3:
Expand All @@ -486,7 +486,7 @@ jobs:
distro-slug: photon-3
display-name: Photon OS 3
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]'
instances: '["stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "onedir-nightly", "default"]'


photon-4:
Expand All @@ -500,7 +500,7 @@ jobs:
distro-slug: photon-4
display-name: Photon OS 4
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]'
instances: '["stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "onedir-nightly", "default"]'


rockylinux-8:
Expand All @@ -514,7 +514,7 @@ jobs:
distro-slug: rockylinux-8
display-name: Rocky Linux 8
timeout: 20
instances: '["old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]'
instances: '["old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "onedir-nightly", "default"]'


rockylinux-9:
Expand All @@ -528,7 +528,7 @@ jobs:
distro-slug: rockylinux-9
display-name: Rocky Linux 9
timeout: 20
instances: '["git-3005", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]'
instances: '["git-3005", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "onedir-nightly", "default"]'


ubuntu-2004:
Expand All @@ -542,7 +542,7 @@ jobs:
distro-slug: ubuntu-2004
display-name: Ubuntu 20.04
timeout: 20
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]'
instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "onedir-nightly", "default"]'


ubuntu-2204:
Expand All @@ -556,7 +556,7 @@ jobs:
distro-slug: ubuntu-2204
display-name: Ubuntu 22.04
timeout: 20
instances: '["stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]'
instances: '["stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "onedir-nightly", "default"]'


set-pipeline-exit-status:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/templates/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,11 @@ def generate_test_jobs():

kitchen_target = f"{bootstrap_type}-{salt_version}"
instances.append(kitchen_target)

for bootstrap_type in ("onedir-nightly",):
if distro not in ONEDIR_DISTROS:
continue
instances.append(bootstrap_type)

for bootstrap_type in ("default",):
if distro not in STABLE_DISTROS:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ venv
kitchen.local.yml
.kitchen/
.bundle/
Gemfile.lock
63 changes: 44 additions & 19 deletions bootstrap-salt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ _CUSTOM_MINION_CONFIG="null"
_QUIET_GIT_INSTALLATION=$BS_FALSE
_REPO_URL="repo.saltproject.io"
_ONEDIR_DIR="salt"
_ONEDIR_NIGHTLY_DIR="salt-dev/${_ONEDIR_DIR}"
_ONEDIR_NIGHTLY_DIR="salt-dev/master/latest/${_ONEDIR_DIR}"
_PY_EXE="python3"
_INSTALL_PY="$BS_FALSE"
_TORNADO_MAX_PY3_VERSION="5.0"
Expand Down Expand Up @@ -960,6 +960,17 @@ __check_url_exists() {
return 1
fi
}

#--- FUNCTION -------------------------------------------------------------------------------------------------------
# NAME: __get_minor_subpath
# DESCRIPTION: return name of repo subdir
#----------------------------------------------------------------------------------------------------------------------
__get_minor_subpath() {
URL="$1"
RESP="$(curl -L "$URL" | grep 'href' | grep -v '\.\.' | xargs | sed -e 's/<[^>]*>//g' | tail -1)"
echo "$RESP"
}

#--- FUNCTION -------------------------------------------------------------------------------------------------------
# NAME: __gather_hardware_info
# DESCRIPTION: Discover hardware information
Expand Down Expand Up @@ -3141,13 +3152,15 @@ __install_saltstack_ubuntu_onedir_repository() {
# SaltStack's stable Ubuntu repository:
SALTSTACK_UBUNTU_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/ubuntu/${UBUNTU_VERSION}/${__REPO_ARCH}/${ONEDIR_REV}/"
if [ "${ONEDIR_REV}" = "nightly" ] ; then
SALTSTACK_UBUNTU_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/ubuntu/${UBUNTU_VERSION}/${__REPO_ARCH}/"
BASE_UBUNTU_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/ubuntu/${UBUNTU_VERSION}/${__REPO_ARCH}/minor"
NIGHTLY_VERSION_PATH="$(__get_minor_subpath "$BASE_UBUNTU_URL")"
SALTSTACK_UBUNTU_URL="${BASE_UBUNTU_URL}/${NIGHTLY_VERSION_PATH}"
fi
echo "$__REPO_ARCH_DEB $SALTSTACK_UBUNTU_URL $UBUNTU_CODENAME main" > /etc/apt/sources.list.d/salt.list

if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005)')" != "" ]; then
__apt_key_fetch "${SALTSTACK_UBUNTU_URL}salt-archive-keyring.gpg" || return 1
elif [ "$(echo "${ONEDIR_REV}" | grep -E '(latest|nightly)')" != "" ]; then
elif [ "$(echo "${ONEDIR_REV}" | grep -E '(latest)')" != "" ]; then
__apt_key_fetch "${SALTSTACK_UBUNTU_URL}salt-archive-keyring.gpg" || \
__apt_key_fetch "${SALTSTACK_UBUNTU_URL}SALT-PROJECT-GPG-PUBKEY-2023.gpg" || return 1
else
Expand Down Expand Up @@ -3687,18 +3700,22 @@ __install_saltstack_debian_onedir_repository() {

# amd64 is just a part of repository URI, 32-bit pkgs are hosted under the same location
SALTSTACK_DEBIAN_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/debian/${DEBIAN_RELEASE}/${__REPO_ARCH}/${ONEDIR_REV}/"
GPG_SALTSTACK_DEBIAN_URL=$SALTSTACK_DEBIAN_URL
if [ "${ONEDIR_REV}" = "nightly" ] ; then
SALTSTACK_DEBIAN_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/debian/${DEBIAN_RELEASE}/${__REPO_ARCH}/"
BASE_DEBIAN_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/debian/${DEBIAN_RELEASE}/${__REPO_ARCH}/minor"
NIGHTLY_VERSION_PATH="$(__get_minor_subpath "$BASE_DEBIAN_URL")"
SALTSTACK_DEBIAN_URL="${BASE_DEBIAN_URL}/${NIGHTLY_VERSION_PATH}"
GPG_SALTSTACK_DEBIAN_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/debian/${DEBIAN_RELEASE}/${__REPO_ARCH}/"
fi
echo "$__REPO_ARCH_DEB $SALTSTACK_DEBIAN_URL $DEBIAN_CODENAME main" > "/etc/apt/sources.list.d/salt.list"

if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005)')" != "" ]; then
__apt_key_fetch "${SALTSTACK_DEBIAN_URL}salt-archive-keyring.gpg" || return 1
elif [ "$(echo "${ONEDIR_REV}" | grep -E '(latest|nightly)')" != "" ]; then
__apt_key_fetch "${SALTSTACK_DEBIAN_URL}salt-archive-keyring.gpg" || \
__apt_key_fetch "${SALTSTACK_DEBIAN_URL}SALT-PROJECT-GPG-PUBKEY-2023.gpg" || return 1
__apt_key_fetch "${GPG_SALTSTACK_DEBIAN_URL}salt-archive-keyring.gpg" || return 1
elif [ "$(echo "${ONEDIR_REV}" | grep -E '(latest)')" != "" ]; then
__apt_key_fetch "${GPG_SALTSTACK_DEBIAN_URL}salt-archive-keyring.gpg" || \
__apt_key_fetch "${GPG_SALTSTACK_DEBIAN_URL}SALT-PROJECT-GPG-PUBKEY-2023.gpg" || return 1
else
__apt_key_fetch "${SALTSTACK_DEBIAN_URL}SALT-PROJECT-GPG-PUBKEY-2023.gpg" || return 1
__apt_key_fetch "${GPG_SALTSTACK_DEBIAN_URL}SALT-PROJECT-GPG-PUBKEY-2023.gpg" || return 1
fi

__wait_for_apt apt-get update || return 1
Expand Down Expand Up @@ -4254,13 +4271,15 @@ __install_saltstack_fedora_onedir_repository() {

if [ ! -s "$REPO_FILE" ] || [ "$_FORCE_OVERWRITE" -eq $BS_TRUE ]; then
FETCH_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/fedora/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/${ONEDIR_REV}"
GPG_FETCH_URL=$FETCH_URL
if [ "${ONEDIR_REV}" = "nightly" ] ; then
FETCH_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/fedora/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/"
FETCH_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/fedora/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/minor/latest"
GPG_FETCH_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/fedora/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}"
fi

__fetch_url "${REPO_FILE}" "${FETCH_URL}.repo"

__rpm_import_gpg "${FETCH_URL}/${GPG_KEY}" || return 1
__rpm_import_gpg "${GPG_FETCH_URL}/${GPG_KEY}" || return 1

yum clean metadata || return 1
elif [ "$REPO_REV" != "latest" ]; then
Expand Down Expand Up @@ -4698,10 +4717,12 @@ __install_saltstack_rhel_onedir_repository() {
# Avoid using '$releasever' variable for yum.
# Instead, this should work correctly on all RHEL variants.
base_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/${ONEDIR_REV}/"
GPG_FETCH_URL=$base_url
if [ "${ONEDIR_REV}" = "nightly" ] ; then
base_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/"
base_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/minor/latest"
GPG_FETCH_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/"
fi
if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005)')" != "" ] || [ "${ONEDIR_REV}" = "nightly" ]; then
if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005)')" != "" ]; then
if [ "${DISTRO_MAJOR_VERSION}" -eq 9 ]; then
gpg_key="SALTSTACK-GPG-KEY2.pub"
else
Expand All @@ -4713,7 +4734,7 @@ __install_saltstack_rhel_onedir_repository() {

gpg_key_urls=""
for key in $gpg_key; do
gpg_key_urls=$(printf "${base_url}${key},%s" "$gpg_key_urls")
gpg_key_urls=$(printf "${GPG_FETCH_URL}${key},%s" "$gpg_key_urls")
done

repo_file="/etc/yum.repos.d/salt.repo"
Expand All @@ -4731,11 +4752,13 @@ enabled_metadata=1
_eof

fetch_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/${ONEDIR_REV}/"
GPG_FETCH_URL=$fetch_url
if [ "${ONEDIR_REV}" = "nightly" ] ; then
fetch_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/"
fetch_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/minor/latest"
GPG_FETCH_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/"
fi
for key in $gpg_key; do
__rpm_import_gpg "${fetch_url}${key}" || return 1
__rpm_import_gpg "${GPG_FETCH_URL}${key}" || return 1
done

yum clean metadata || return 1
Expand Down Expand Up @@ -6495,7 +6518,7 @@ install_amazon_linux_ami_2_onedir_deps() {
base_url="$HTTP_VAL://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/amazon/2/\$basearch/"
fi

if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005)')" != "" ] || [ "${ONEDIR_REV}" = "nightly" ]; then
if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005)')" != "" ]; then
gpg_key="${base_url}SALTSTACK-GPG-KEY.pub,${base_url}base/RPM-GPG-KEY-CentOS-7"
if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then
gpg_key="${base_url}SALTSTACK-GPG-KEY.pub"
Expand Down Expand Up @@ -6914,15 +6937,17 @@ __install_saltstack_photon_onedir_repository() {

if [ ! -s "$REPO_FILE" ] || [ "$_FORCE_OVERWRITE" -eq $BS_TRUE ]; then
FETCH_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/photon/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/${ONEDIR_REV}"
GPG_FETCH_URL=$FETCH_URL
if [ "${ONEDIR_REV}" = "nightly" ] ; then
FETCH_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/photon/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/"
FETCH_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/photon/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/minor/latest"
GPG_FETCH_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/photon/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}"
fi

__fetch_url "${REPO_FILE}" "${FETCH_URL}.repo"

GPG_KEY="SALT-PROJECT-GPG-PUBKEY-2023.pub"

__rpm_import_gpg "${FETCH_URL}/${GPG_KEY}" || return 1
__rpm_import_gpg "${GPG_FETCH_URL}/${GPG_KEY}" || return 1

tdnf makecache || return 1
elif [ "$REPO_REV" != "latest" ]; then
Expand Down
Loading