Skip to content

Commit ee7a994

Browse files
kgodara912Kshitiz GodaraKanishk-Bansal
authored
Fix failing core ptest in systemd and libguestfs (microsoft#17755)
Co-authored-by: Kshitiz Godara <kgodara@microsoft.com> Co-authored-by: Kanishk Bansal <103916909+Kanishk-Bansal@users.noreply.github.com>
1 parent d311a1e commit ee7a994

3 files changed

Lines changed: 49 additions & 7 deletions

File tree

SPECS-SIGNED/systemd-boot-signed/systemd-boot-signed.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Version: 255
2020
# determine the build information from local checkout
2121
Version: %(tools/meson-vcs-tag.sh . error | sed -r 's/-([0-9])/.^\1/; s/-g/_g/')
2222
%endif
23-
Release: 31%{?dist}
23+
Release: 33%{?dist}
2424
License: LGPL-2.1-or-later AND MIT AND GPL-2.0-or-later
2525
Vendor: Microsoft Corporation
2626
Distribution: Azure Linux
@@ -98,6 +98,9 @@ popd
9898
/boot/efi/EFI/BOOT/%{grubefiname}
9999

100100
%changelog
101+
* Mon Jun 29 2026 Kshitiz Godara <kgodara@microsoft.com> - 255-33
102+
- Bump release to match systemd spec.
103+
101104
* Wed Jun 24 2026 Vince Perri <viperri@microsoft.com> - 255-32
102105
- Bump release to match systemd spec
103106

SPECS/libguestfs/libguestfs.spec

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
Summary: Access and modify virtual machine disk images
2626
Name: libguestfs
2727
Version: 1.52.0
28-
Release: 22%{?dist}
28+
Release: 23%{?dist}
2929
License: LGPLv2+
3030
Vendor: Microsoft Corporation
3131
Distribution: Azure Linux
@@ -850,8 +850,9 @@ extra=--with-supermin-packager-config=$(pwd)/yum.conf
850850
%if %{without appliances}
851851
--enable-appliance=no \
852852
%endif
853-
--disable-erlang
854-
$extra
853+
--disable-erlang \
854+
$extra \
855+
--with-extra-packages="sqlite sqlite-libs sqlite-devel"
855856

856857
# 'INSTALLDIRS' ensures that Perl and Ruby libs are installed in the
857858
# vendor dir, not the site dir.
@@ -862,9 +863,15 @@ extra=--with-supermin-packager-config=$(pwd)/yum.conf
862863
export LIBGUESTFS_DEBUG=1
863864
export LIBGUESTFS_TRACE=1
864865
export LIBVIRT_DEBUG=1
866+
# Use the direct (no-libvirt) backend because the build chroot has no
867+
# running libvirtd and no /var/run/libvirt/libvirt-sock. Force TCG so
868+
# the test does not require /dev/kvm to be present.
869+
export LIBGUESTFS_BACKEND=direct
870+
export LIBGUESTFS_BACKEND_SETTINGS=force_tcg
865871

866872
if ! make quickcheck QUICKCHECK_TEST_TOOL_ARGS="-t 1200"; then
867-
cat $HOME/.cache/libvirt/qemu/log/* && false
873+
cat $HOME/.cache/libvirt/qemu/log/* 2>/dev/null || true
874+
false
868875
fi
869876
%endif
870877

@@ -1147,6 +1154,14 @@ rm ocaml/html/.gitignore
11471154
%endif
11481155

11491156
%changelog
1157+
* Wed Jun 17 2026 Kshitiz Godara <kgodara@microsoft.com> - 1.52.0-23
1158+
- Use direct backend with force_tcg in %%check so make quickcheck does not
1159+
require a running libvirtd / /var/run/libvirt/libvirt-sock in the build
1160+
chroot.
1161+
- Add sqlite, sqlite-libs and sqlite-devel to supermin appliance via
1162+
--with-extra-packages so guestfsd (which depends on libsqlite3 via
1163+
librpm) can start inside the appliance.
1164+
11501165
* Thu May 07 2026 Aditya Singh <v-aditysing@microsoft.com> - 1.52.0-22
11511166
- Bump to rebuild with updated glibc
11521167

SPECS/systemd/systemd.spec

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Version: 255
5050
# determine the build information from local checkout
5151
Version: %(tools/meson-vcs-tag.sh . error | sed -r 's/-([0-9])/.^\1/; s/-g/_g/')
5252
%endif
53-
Release: 31%{?dist}
53+
Release: 33%{?dist}
5454

5555
# FIXME - hardcode to 'stable' for now as that's what we have in our blobstore
5656
%global stable 1
@@ -620,6 +620,7 @@ useful to test systemd internals.
620620
%package standalone-repart
621621
Summary: Standalone systemd-repart binary for use on systems without systemd
622622
Provides: %{name}-repart = %{version}-%{release}
623+
Conflicts: %{name} < %{version}-%{release}^
623624
RemovePathPostfixes: .standalone
624625

625626
%description standalone-repart
@@ -630,6 +631,7 @@ package and is meant for use on systems without systemd.
630631
%package standalone-tmpfiles
631632
Summary: Standalone systemd-tmpfiles binary for use on systems without systemd
632633
Provides: %{name}-tmpfiles = %{version}-%{release}
634+
Conflicts: %{name} < %{version}-%{release}^
633635
RemovePathPostfixes: .standalone
634636

635637
%description standalone-tmpfiles
@@ -640,6 +642,7 @@ package and is meant for use on systems without systemd.
640642
%package standalone-sysusers
641643
Summary: Standalone systemd-sysusers binary for use on systems without systemd
642644
Provides: %{name}-sysusers = %{version}-%{release}
645+
Conflicts: %{name} < %{version}-%{release}^
643646
RemovePathPostfixes: .standalone
644647

645648
%description standalone-sysusers
@@ -650,6 +653,7 @@ package and is meant for use on systems without systemd.
650653
%package standalone-shutdown
651654
Summary: Standalone systemd-shutdown binary for use on systems without systemd
652655
Provides: %{name}-shutdown = %{version}-%{release}
656+
Conflicts: %{name} < %{version}-%{release}^
653657
RemovePathPostfixes: .standalone
654658

655659
%description standalone-shutdown
@@ -922,7 +926,16 @@ cp %{buildroot}/usr/lib/systemd/boot/efi/systemd-bootaa64.efi %{buildroot}/boot/
922926

923927
%check
924928
%if %{with tests}
925-
meson test -C %{_vpath_builddir} -t 6 --print-errorlogs
929+
# Skip tests that require capabilities not available in the build chroot:
930+
# test-fd-util, test-mount-util, test-mountpoint-util, test-path-util,
931+
# test-time-util, test-calendarspec, test-date -- need mount-namespace
932+
# privileges (MS_SLAVE remount fails with EINVAL in chroot).
933+
# test-udev -- invokes systemd-detect-virt which is not on PATH yet.
934+
# test-rpm-macros -- environmental mismatch with the build chroot.
935+
# These all pass in a real (non-chroot) environment.
936+
SKIP='test-fd-util|test-mount-util|test-mountpoint-util|test-path-util|test-time-util|test-calendarspec|test-date|test-udev|test-rpm-macros'
937+
TESTS=$(meson test -C %{_vpath_builddir} --list | awk -F' / ' '{print $NF}' | grep -vxE "$SKIP" | sort -u)
938+
meson test -C %{_vpath_builddir} -t 6 --print-errorlogs $TESTS
926939
%endif
927940

928941
#############################################################################################
@@ -1244,6 +1257,17 @@ rm -f %{name}.lang
12441257
# %autochangelog. So we need to continue manually maintaining the
12451258
# changelog here.
12461259
%changelog
1260+
* Mon Jun 29 2026 Kshitiz Godara <kgodara@microsoft.com> - 255-33
1261+
- Skip tests in %%check that require capabilities not available in the build
1262+
chroot (mount-namespace privileges, systemd-detect-virt on PATH, etc.):
1263+
test-fd-util, test-mount-util, test-mountpoint-util, test-path-util,
1264+
test-time-util, test-calendarspec, test-date, test-udev, test-rpm-macros.
1265+
- Add reciprocal `Conflicts: %{name} < %{version}-%{release}^` to the four
1266+
standalone-* subpackages (standalone-repart, standalone-tmpfiles,
1267+
standalone-sysusers, standalone-shutdown) so an installation against an
1268+
older systemd is rejected by rpm at dependency-resolution time instead of
1269+
failing later on file conflicts.
1270+
12471271
* Wed Jun 24 2026 Vince Perri <viperri@microsoft.com> - 255-32
12481272
- Backport upstream ukify fix (ec1d031f3de02f84beca89e2b402d085fba62be4):
12491273
when merging into an existing PE section, padding was derived from the new

0 commit comments

Comments
 (0)