Skip to content

Commit 357cf00

Browse files
committed
preliminary: fix syncs for 9
1 parent 347e347 commit 357cf00

File tree

4 files changed

+50
-37
lines changed

4 files changed

+50
-37
lines changed

mangle/koji/branch_tag.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,17 @@
1010
parser.add_argument('--minor', type=str, required=True,
1111
choices=('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'))
1212
parser.add_argument('--riscv', action='store_true')
13+
parser.add_argument('--modularity', action='store_true')
1314

1415
results = parser.parse_args()
1516
MAJOR = results.major
1617
MINOR = results.minor
1718
RISCV = results.riscv
19+
MODULES = results.modules
1820
RELEASE = f'{MAJOR}.{MINOR}'
1921
PREFIX = f'dist-rocky{RELEASE}'
2022
TOOLS = f'dist-rocky{MAJOR}-build-tools'
23+
MODULE_BUILD = f'module-rocky{RELEASE}-build'
2124
DEFAULT_ARCHES = 'x86_64 aarch64 ppc64le s390x'
2225

2326
# RelEng: Every build tag will have repo.auto. Even though this isn't
@@ -31,10 +34,14 @@
3134
RISCV_EXTRA = {**DEFAULT_EXTRA, **RISCV_NOARCH}
3235
RISCV_UPDATES_EXTRA = {**UPDATES_EXTRA, **RISCV_NOARCH}
3336
KIWI = {**DEFAULT_EXTRA, 'mock.new_chroot': 0}
37+
MODULE_EXTRA = {
38+
'rpm.macro.distribution': f'Rocky Linux {MAJOR}',
39+
'rpm.macro.vendor': 'Rocky Enterprise Software Foundation',
40+
}
3441

3542
# RelEng: riscv64 has separate build tags until we have more hardware or
3643
# hardware that can actually build things in a relatively decent amount of
37-
# time. Please keep them separate for now.
44+
# time. Having separate build tags is important for this in particular.
3845
TARGETS = {
3946
# Standard build tags
4047
f'{PREFIX}-build': {
@@ -173,6 +180,11 @@
173180
try:
174181
print('!! Creating compose tag')
175182
session.createTag(f'{PREFIX}-compose', parent=PREFIX)
183+
184+
if MODULES:
185+
print('!! Creating module build tag')
186+
session.createTag(f'{MODULE_BUILD}', arches=DEFAULT_ARCHES, extra=MODULE_EXTRA)
187+
176188
except koji.GenericError as exc:
177189
print(exc)
178190
print('There was an error; exiting to prevent further problems')

sync/common_9

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ esac
2727
MAJOR="${REVISION%.*}"
2828
MINOR="${REVISION#*.}"
2929
ARCHES=(x86_64 aarch64 ppc64le s390x)
30+
ISO_TYPES=(BaseOS Minimal)
31+
IMAGE_TYPES=(images live)
3032
STAGING_ROOT="/mnt/repos-staging"
3133
PRODUCTION_ROOT="/mnt/repos-production"
3234

3335
# relative to ${ENV}_ROOT
3436
CATEGORY_STUB="mirror/pub/rocky"
3537
RELEASE_DIR="${CATEGORY_STUB}/${REVISION}${APPEND_TO_DIR}"
36-
RELEASE_COMPOSE_ROOT="${COMPOSE_ROOT}/${MAJOR}/latest-${SHORT}-${MAJOR}${COMPOSE_APPEND}"
38+
RELEASE_COMPOSE_ROOT="${COMPOSE_ROOT}/${MAJOR}${COMPOSE_APPEND}/latest-${SHORT}-${MAJOR}"
3739

3840
# Set all repos that have no comps/groups associated with them. This is even in
3941
# cases where repos will not be available by normal means. It's just for
@@ -70,6 +72,8 @@ ALL_REPOS=(
7072

7173
NONSIG_COMPOSE=(
7274
Rocky
75+
Extras
76+
Rocky-devel
7377
)
7478

7579
declare -A SIG_COMPOSE
@@ -82,7 +86,6 @@ SIG_COMPOSE=(
8286
export MODS=(
8387
AppStream
8488
CRB
85-
devel
8689
)
8790

8891
# functions
@@ -127,17 +130,18 @@ function treeinfoModder() {
127130
from configparser import ConfigParser
128131
config = ConfigParser()
129132
config.read('${TREEINFO_VAR}')
130-
config.set('tree', 'variants', 'BaseOS,AppStream')
131-
config.add_section('variant-AppStream')
132-
config.set('variant-AppStream', 'id', 'AppStream')
133-
config.set('variant-AppStream', 'name', 'AppStream')
134-
config.set('variant-AppStream', 'type', 'variant')
135-
config.set('variant-AppStream', 'uid', 'AppStream')
136-
config.set('variant-AppStream', 'packages', '../../../AppStream/${BaseOSArch}/os/Packages')
137-
config.set('variant-AppStream', 'repository', '../../../AppStream/${BaseOSArch}/os/')
138-
139-
with open('${TREEINFO_VAR}', 'w') as configfile:
140-
config.write(configfile)
133+
if 'variant-AppStream' not in config.sections():
134+
config.set('tree', 'variants', 'BaseOS,AppStream')
135+
config.add_section('variant-AppStream')
136+
config.set('variant-AppStream', 'id', 'AppStream')
137+
config.set('variant-AppStream', 'name', 'AppStream')
138+
config.set('variant-AppStream', 'type', 'variant')
139+
config.set('variant-AppStream', 'uid', 'AppStream')
140+
config.set('variant-AppStream', 'packages', '../../../AppStream/${BaseOSArch}/os/Packages')
141+
config.set('variant-AppStream', 'repository', '../../../AppStream/${BaseOSArch}/os/')
142+
143+
with open('${TREEINFO_VAR}', 'w') as configfile:
144+
config.write(configfile)
141145
EOF
142146
else
143147
echo "${TREEINFO_VAR}, or python3 does not exist on this system."
@@ -164,24 +168,30 @@ function treeinfoModderKickstart() {
164168
from configparser import ConfigParser
165169
config = ConfigParser()
166170
config.read('${TREEINFO_VAR}')
167-
config.set('tree', 'variants', 'BaseOS,AppStream')
168-
config.add_section('variant-AppStream')
169-
config.set('variant-AppStream', 'id', 'AppStream')
170-
config.set('variant-AppStream', 'name', 'AppStream')
171-
config.set('variant-AppStream', 'type', 'variant')
172-
config.set('variant-AppStream', 'uid', 'AppStream')
173-
config.set('variant-AppStream', 'packages', '../../../AppStream/${BaseOSArch}/kickstart/Packages')
174-
config.set('variant-AppStream', 'repository', '../../../AppStream/${BaseOSArch}/kickstart/')
175-
176-
with open('${TREEINFO_VAR}', 'w') as configfile:
177-
config.write(configfile)
171+
if 'variant-AppStream' not in config.sections():
172+
config.set('tree', 'variants', 'BaseOS,AppStream')
173+
config.add_section('variant-AppStream')
174+
config.set('variant-AppStream', 'id', 'AppStream')
175+
config.set('variant-AppStream', 'name', 'AppStream')
176+
config.set('variant-AppStream', 'type', 'variant')
177+
config.set('variant-AppStream', 'uid', 'AppStream')
178+
config.set('variant-AppStream', 'packages', '../../../AppStream/${BaseOSArch}/kickstart/Packages')
179+
config.set('variant-AppStream', 'repository', '../../../AppStream/${BaseOSArch}/kickstart/')
180+
with open('${TREEINFO_VAR}', 'w') as configfile:
181+
config.write(configfile)
182+
else:
183+
config.set('variant-AppStream', 'packages', '../../../AppStream/${BaseOSArch}/kickstart/Packages')
184+
config.set('variant-AppStream', 'repository', '../../../AppStream/${BaseOSArch}/kickstart/')
185+
186+
with open('${TREEINFO_VAR}', 'w') as configfile:
187+
config.write(configfile)
178188
EOF
179189
else
180190
echo "${TREEINFO_VAR}, or python3 does not exist on this system."
181191
fi
182192
/bin/cp "${TREEINFO_VAR}" "${PRISTINE_TREE}"
183193
}
184194

185-
#export -f treeinfoFixer
186-
#export -f treeinfoModder
187-
#export -f treeinfoModderKickstart
195+
export -f treeinfoFixer
196+
export -f treeinfoModder
197+
export -f treeinfoModderKickstart

sync/minor-release-sync-to-staging.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ source $(dirname "$0")/common
1010
# Major Version (eg, 8)
1111
MAJ=${RLVER}
1212

13-
if [ "${MAJ}" -eq "9" ]; then
14-
echo "Does not work for Rocky Linux 9. Please use sync-to-staging"
15-
exit 32
16-
fi
17-
1813
# sync all pieces of a release, including extras, nfv, etc
1914
for COMPOSE in "${NONSIG_COMPOSE[@]}"; do
2015
echo "${COMPOSE}: Syncing"

sync/sync-to-staging.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ if [[ $# -eq 0 ]]; then
1212
exit 1
1313
fi
1414

15-
if [[ "${RLVER}" -eq "8" ]]; then
16-
echo "This is only used for Rocky Linux 8 and 10 releases."
17-
fi
18-
1915
# Major Version (eg, 8)
2016
#MAJ=${RLVER}
2117

0 commit comments

Comments
 (0)