Skip to content

Commit

Permalink
Various Fedora 40 fixes
Browse files Browse the repository at this point in the history
- Update hardcoded versions in CI
- Change alloca usage denied by clang
- Workaround dropped `container=oci` env in F40

Signed-off-by: Colin Walters <[email protected]>
  • Loading branch information
lukewarmtemp authored and cgwalters committed May 2, 2024
1 parent e0cf3f7 commit f9cc2d9
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 20 deletions.
8 changes: 4 additions & 4 deletions ci/test-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@ versionid=$(. /usr/lib/os-release && echo $VERSION_ID)

# Test overrides
case $versionid in
38)
40)
url_suffix=2.16.2/2.fc39/x86_64/ignition-2.16.2-2.fc39.x86_64.rpm
# 2.15.0-3
koji_url="https://koji.fedoraproject.org/koji/buildinfo?buildID=2158585"
koji_kernel_url="https://koji.fedoraproject.org/koji/buildinfo?buildID=2174317"
kver=6.2.8
koji_kernel_url=https://koji.fedoraproject.org/koji/buildinfo?buildID=2294111
kver=6.5.5
krev=300
;;
39)
url_suffix=2.16.2/1.fc39/x86_64/ignition-2.16.2-1.fc39.x86_64.rpm
# 2.15.0-3
koji_url="https://koji.fedoraproject.org/koji/buildinfo?buildID=2158585"
koji_kernel_url=https://koji.fedoraproject.org/koji/buildinfo?buildID=2294111
koji_kernel_url="https://koji.fedoraproject.org/koji/buildinfo?buildID=2294111"
kver=6.5.5
krev=300
;;
Expand Down
8 changes: 6 additions & 2 deletions rust/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ pub(crate) fn confirm_or_abort() -> CxxResult<()> {
#[cfg(test)]
mod tests {
use super::*;
use std::env;
use std::{env, path::Path};

#[test]
fn test_is_src_rpm() {
Expand All @@ -358,6 +358,10 @@ mod tests {

#[test]
fn test_running_in_container() {
assert_eq!(env::var("container").is_ok(), running_in_container());
// See also https://bugzilla.redhat.com/show_bug.cgi?id=2278652
let container = env::var_os("container").is_some()
|| Path::new("/run/.containerenv").exists()
|| Path::new("/.dockerenv").exists();
assert_eq!(container, running_in_container());
}
}
2 changes: 1 addition & 1 deletion src/app/rpmostree-clientlib.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ rpmostree_print_gpg_info (GVariant *signatures, gboolean verbose, guint max_key_
{
/* +2 for initial leading spaces */
const guint gpgpad = max_key_len + 2 + strlen (": ");
char gpgspaces[gpgpad + 1];
g_autofree char *gpgspaces = (char *)g_malloc (gpgpad + 1);
memset (gpgspaces, ' ', gpgpad);
gpgspaces[gpgpad] = '\0';

Expand Down
4 changes: 2 additions & 2 deletions tests/compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -euo pipefail

# freeze on a specific commit for tests for reproducibility and since it should
# always work to target older treefiles
FEDORA_COREOS_CONFIG_COMMIT=ce65013fcb9f10bfee1c7c1c27477c6c6ce676b3
FEDORA_COREOS_CONFIG_COMMIT=83f419c54bad614d70149830cc3b25fe4b93433e

dn=$(cd "$(dirname "$0")" && pwd)
topsrcdir=$(cd "$dn/.." && pwd)
Expand Down Expand Up @@ -49,7 +49,7 @@ if [ ! -d compose-cache ]; then
# default; we'll want it to test `install-langs`. This also means that we have
# to add updates-archive to the repo list.
# Also neuter OSTree layers; we don't re-implement cosa's auto-layering sugar
curl -LO https://src.fedoraproject.org/rpms/fedora-repos/raw/f37/f/fedora-updates-archive.repo
curl -LO https://src.fedoraproject.org/rpms/fedora-repos/raw/f40/f/fedora-updates-archive.repo
python3 -c '
import sys, json
y = json.load(sys.stdin)
Expand Down
2 changes: 1 addition & 1 deletion tests/kolainst/destructive/client-layering-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ set -xeuo pipefail

. /etc/os-release
case $VERSION_ID in
39) kernel_release=6.5.6-300.fc39.x86_64
40) kernel_release=6.5.6-300.fc39.x86_64
koji_kernel_url="https://koji.fedoraproject.org/koji/buildinfo?buildID=2302642"
;;
*) echo "Unsupported Fedora version: $VERSION_ID"
Expand Down
6 changes: 3 additions & 3 deletions tests/vmcheck/test-override-kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ versionid=${versionid:11} # trim off VERSION_ID=
current=$(vm_get_booted_csum)
vm_cmd rpm-ostree db list "${current}" > current-dblist.txt
case $versionid in
38) kernel_release=6.2.9-300.fc38.x86_64
koji_kernel_url="https://koji.fedoraproject.org/koji/buildinfo?buildID=2178613"
40) kernel_release=6.5.6-300.fc39.x86_64
koji_kernel_url=https://koji.fedoraproject.org/koji/buildinfo?buildID=2302642
;;
39) kernel_release=6.5.6-300.fc39.x86_64
koji_kernel_url=https://koji.fedoraproject.org/koji/buildinfo?buildID=2302642
koji_kernel_url="https://koji.fedoraproject.org/koji/buildinfo?buildID=2302642"
;;
*) assert_not_reached "Unsupported Fedora version: $versionid";;
esac
Expand Down
13 changes: 6 additions & 7 deletions tests/vmcheck/test-override-replace-2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,16 @@ case $versionid in
# XXX: this isn't actually the gold selinux; that one is too old for
# container-selinux and moby-engine. rather than trying to change multiple
# packages, we use one that's in coreos-pool since that also prevents GC
38)
evr=38.25-1.fc38
koji_url='https://koji.fedoraproject.org/koji/buildinfo?buildID=2274128'
# XXX: we need to replace container-selinux too for dep reasons
hack='https://koji.fedoraproject.org/koji/buildinfo?buildID=2281229'
;;
39)
40)
evr=38.28-1.fc39
koji_url=https://koji.fedoraproject.org/koji/buildinfo?buildID=2291271
hack=https://koji.fedoraproject.org/koji/buildinfo?buildID=2291519
;;
39)
evr=38.28-1.fc39
koji_url="https://koji.fedoraproject.org/koji/buildinfo?buildID=2291271"
hack="https://koji.fedoraproject.org/koji/buildinfo?buildID=2291519"
;;
*) assert_not_reached "Unsupported Fedora version: $versionid";;
esac
assert_not_file_has_content current-dblist.txt selinux-policy-$evr
Expand Down

0 comments on commit f9cc2d9

Please sign in to comment.