Skip to content

Commit 6a2c7f5

Browse files
committed
draft: debian/ubuntu /etc/os-release provides VERSION_CODENAME
removing need for version_name
1 parent 074c6a6 commit 6a2c7f5

4 files changed

Lines changed: 11 additions & 23 deletions

File tree

master-libvirt/master.cfg

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ def getRpmUpgradeStep():
5656
"systemdCapability",
5757
"test_mode",
5858
"test_type",
59-
"version_name",
6059
]
6160
),
6261
command=["./rpm-upgrade.sh"],
@@ -84,7 +83,6 @@ def getRpmInstallStep():
8483
"systemdCapability",
8584
"test_mode",
8685
"test_type",
87-
"version_name",
8886
]
8987
),
9088
command=["./rpm-install.sh"],
@@ -112,7 +110,6 @@ def getDebUpgradeStep():
112110
"systemdCapability",
113111
"test_mode",
114112
"test_type",
115-
"version_name",
116113
]
117114
),
118115
command=["./deb-upgrade.sh"],
@@ -140,7 +137,6 @@ def getDebInstallStep():
140137
"systemdCapability",
141138
"test_mode",
142139
"test_type",
143-
"version_name",
144140
]
145141
),
146142
command=["./deb-install.sh"],
@@ -261,7 +257,6 @@ for builder_name in BUILDERS_INSTALL:
261257
"systemdCapability": "yes",
262258
"needsGalera": "yes",
263259
"dist_name": os_name,
264-
"version_name": OS_INFO[os_info_name]["version_name"],
265260
"arch": platform,
266261
"BB_CI": True,
267262
"artifactsURL": artifactsURL,
@@ -285,7 +280,6 @@ for builder_name in BUILDERS_INSTALL:
285280
"systemdCapability": "yes",
286281
"needsGalera": "yes",
287282
"dist_name": os_name,
288-
"version_name": OS_INFO[os_info_name]["version_name"],
289283
"arch": platform,
290284
"test_mode": "server",
291285
"test_type": "major",
@@ -311,7 +305,6 @@ for builder_name in BUILDERS_INSTALL:
311305
"systemdCapability": "yes",
312306
"needsGalera": "yes",
313307
"dist_name": os_name,
314-
"version_name": OS_INFO[os_info_name]["version_name"],
315308
"arch": platform,
316309
"test_mode": "all",
317310
"test_type": "minor",
@@ -335,7 +328,6 @@ for builder_name in BUILDERS_INSTALL:
335328
"systemdCapability": "yes",
336329
"needsGalera": "no",
337330
"dist_name": os_name,
338-
"version_name": OS_INFO[os_info_name]["version_name"],
339331
"arch": build_arch,
340332
"test_mode": "columnstore",
341333
"test_type": "minor",

os_info.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ centos-stream10:
5050
type: rpm
5151
debian-11:
5252
image_tag: debian11
53-
version_name: bullseye
5453
tags:
5554
- release_packages
5655
arch:
@@ -59,7 +58,6 @@ debian-11:
5958
type: deb
6059
debian-12:
6160
image_tag: debian12
62-
version_name: bookworm
6361
tags:
6462
- release_packages
6563
arch:
@@ -70,7 +68,6 @@ debian-12:
7068
type: deb
7169
debian-13:
7270
image_tag: debian13
73-
version_name: trixie
7471
tags:
7572
- release_packages
7673
arch:
@@ -81,7 +78,6 @@ debian-13:
8178
type: deb
8279
debian-sid:
8380
image_tag: debiansid
84-
version_name: sid
8581
tags:
8682
- release_packages
8783
- bleeding-edge
@@ -197,7 +193,6 @@ ubuntu-2204:
197193
image_tag: ubuntu22.04
198194
tags:
199195
- release_packages
200-
version_name: jammy
201196
arch:
202197
- amd64
203198
- aarch64
@@ -208,7 +203,6 @@ ubuntu-2404:
208203
image_tag: ubuntu24.04
209204
tags:
210205
- release_packages
211-
version_name: noble
212206
arch:
213207
- amd64
214208
- aarch64
@@ -219,7 +213,6 @@ ubuntu-2410:
219213
image_tag: ubuntu24.10
220214
tags:
221215
- release_packages
222-
version_name: oracular
223216
arch:
224217
- amd64
225218
- aarch64
@@ -228,7 +221,6 @@ ubuntu-2504:
228221
image_tag: ubuntu25.04
229222
tags:
230223
- release_packages
231-
version_name: plucky
232224
arch:
233225
- amd64
234226
- aarch64

scripts/bash_lib.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,21 +250,23 @@ deb_setup_mariadb_mirror() {
250250
exit 1
251251
}
252252
#//TEMP it's probably better to install the last stable release here...?
253+
source /etc/os-release
254+
253255
mirror_url="https://deb.mariadb.org/$branch"
254256
archive_url="https://archive.mariadb.org/mariadb-$branch/repo"
255-
if wget -q --method=HEAD "$mirror_url/$dist_name/dists/$version_name"; then
257+
if wget -q --method=HEAD "$mirror_url/$dist_name/dists/$VERSION_CODENAME"; then
256258
baseurl="$mirror_url"
257-
elif wget -q --method=HEAD "$archive_url/$dist_name/dists/$version_name"; then
259+
elif wget -q --method=HEAD "$archive_url/$dist_name/dists/$VERSION_CODENAME"; then
258260
baseurl="$archive_url"
259261
else
260262
# the correct way of handling this would be to not even start the check
261263
# since we know it will always fail. But apparently, it's not going to
262264
# happen soon in BB. Once done though, replace the warning with an error
263265
# and use a non-zero exit code.
264-
bb_log_warn "deb_setup_mariadb_mirror: $branch packages for $dist_name $version_name does not exist on deb|archive.mariadb.org"
266+
bb_log_warn "deb_setup_mariadb_mirror: $branch packages for $dist_name $VERSION_CODENAME does not exist on deb|archive.mariadb.org"
265267
exit 0
266268
fi
267-
sudo sh -c "echo 'deb $baseurl/$dist_name $version_name main' >/etc/apt/sources.list.d/mariadb.list"
269+
sudo sh -c "echo 'deb $baseurl/$dist_name $VERSION_CODENAME main' >/etc/apt/sources.list.d/mariadb.list"
268270
sudo wget https://mariadb.org/mariadb_release_signing_key.asc -O /etc/apt/trusted.gpg.d/mariadb_release_signing_key.asc || {
269271
bb_log_err "mariadb repository key installation failed"
270272
exit 1

scripts/deb-upgrade.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,17 @@ bb_log_info "Current test mode: $test_mode"
2929

3030
set -x
3131

32+
source /etc/os-release
33+
3234
# Prepare apt repository configuration for installation of the previous major
3335
# version
3436
deb_setup_mariadb_mirror "$prev_major_version"
3537

3638
get_packages_file_mirror() {
3739
set -u
38-
if ! wget "$baseurl/$dist_name/dists/$version_name/main/binary-$(deb_arch)/Packages"
40+
if ! wget "$baseurl/$dist_name/dists/$VERSION_CODENAME/main/binary-$(deb_arch)/Packages"
3941
then
40-
bb_log_err "Could not find the 'Packages' file for $dist_name $version_name on deb|archive.mariadb.org."
42+
bb_log_err "Could not find the 'Packages' file for $dist_name $VERSION_CODENAME on deb|archive.mariadb.org."
4143
exit 1
4244
fi
4345
set +u
@@ -76,7 +78,7 @@ case $test_mode in
7678
if ! grep columnstore Packages >/dev/null; then
7779
bb_log_warn "Columnstore was not found in packages, the test will not be run"
7880
exit
79-
elif [[ $version_name == "sid" ]]; then
81+
elif [[ $VERSION_CODENAME == "sid" ]]; then
8082
bb_log_warn "Columnstore isn't necessarily built on Sid, the test will be skipped"
8183
exit
8284
fi

0 commit comments

Comments
 (0)