Skip to content

Commit

Permalink
test/system: Support host operating systems without VERSION_ID
Browse files Browse the repository at this point in the history
The VERSION_ID field in os-release(5) is optional [1].  It's absent on
Arch Linux, which follows a rolling-release model and uses the BUILD_ID
field instead:
  BUILD_ID=rolling

A subsequent commit will run the CI on Arch Linux.  Hence, the code to
get the default release from the host operating system can no longer
assume the presence of the VERSION_ID field in os-release(5).

Note that the arch-toolbox image is tagged with 'latest', in accordance
with OCI conventions, not 'rolling' [2,3], which is the os-release(5)
BUILD_ID.

A similar change was made to toolbox(1) in commits 2ee82af and
d14fd7b.

[1] https://www.freedesktop.org/software/systemd/man/os-release.html

[2] Commit 2568528
    2568528cb7f52663
    #861

[3] Commit a4e5861
    a4e5861ae5c93625
    #1308

#1438
  • Loading branch information
pennbauman authored and debarshiray committed Nov 14, 2024
1 parent fbffd45 commit 1ac6b53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/system/libs/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,10 @@ function get_system_version() (
# shellcheck disable=SC1090
. "$os_release"

echo "$VERSION_ID"
local system_version="$VERSION_ID"
[ "$ID" = "arch" ] && system_version="latest"

echo "$system_version"
)


Expand Down

0 comments on commit 1ac6b53

Please sign in to comment.