diff --git a/ci/test-container.sh b/ci/test-container.sh index 423d39b762..d1c2842f00 100755 --- a/ci/test-container.sh +++ b/ci/test-container.sh @@ -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 ;; diff --git a/rust/src/client.rs b/rust/src/client.rs index 542e84f587..d60e3b8ed9 100644 --- a/rust/src/client.rs +++ b/rust/src/client.rs @@ -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() { @@ -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()); } } diff --git a/src/app/rpmostree-clientlib.cxx b/src/app/rpmostree-clientlib.cxx index 7382b8854c..e4e0f13dd6 100644 --- a/src/app/rpmostree-clientlib.cxx +++ b/src/app/rpmostree-clientlib.cxx @@ -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'; diff --git a/tests/compose.sh b/tests/compose.sh index 436ec6fba8..1ca031cc43 100755 --- a/tests/compose.sh +++ b/tests/compose.sh @@ -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) @@ -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) diff --git a/tests/kolainst/destructive/client-layering-upgrade b/tests/kolainst/destructive/client-layering-upgrade index 20498af601..faa191240b 100755 --- a/tests/kolainst/destructive/client-layering-upgrade +++ b/tests/kolainst/destructive/client-layering-upgrade @@ -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" diff --git a/tests/vmcheck/test-override-kernel.sh b/tests/vmcheck/test-override-kernel.sh index 6fe4b7ef22..68918d8abc 100755 --- a/tests/vmcheck/test-override-kernel.sh +++ b/tests/vmcheck/test-override-kernel.sh @@ -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 diff --git a/tests/vmcheck/test-override-replace-2.sh b/tests/vmcheck/test-override-replace-2.sh index 4f1f0bc9d7..652dc57a13 100755 --- a/tests/vmcheck/test-override-replace-2.sh +++ b/tests/vmcheck/test-override-replace-2.sh @@ -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