From bc62e926a0eacc94ae4a65f545fb798a411b154d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 4 Nov 2023 12:46:47 +0100 Subject: [PATCH] rpm: fix missing directory ownership OpenSUSE enforce it. QubesOS/qubes-issues#6567 --- rpm_spec/qubes-kernel-vm-support.spec.in | 5 +++++ rpm_spec/qubes-utils.spec.in | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/rpm_spec/qubes-kernel-vm-support.spec.in b/rpm_spec/qubes-kernel-vm-support.spec.in index 50603e2a..fecedb9a 100644 --- a/rpm_spec/qubes-kernel-vm-support.spec.in +++ b/rpm_spec/qubes-kernel-vm-support.spec.in @@ -38,6 +38,10 @@ Requires: e2fsprogs BuildRequires: make BuildRequires: gcc BuildRequires: e2fsprogs-devel +%if 0%{?is_opensuse} +# for directory ownership +BuildRequires: dracut +%endif %description This package contains: @@ -55,6 +59,7 @@ make -C kernel-modules all make install-fedora-kernel-support DESTDIR=%{buildroot} %files +%dir %{_prefix}/lib/qubes /usr/lib/dracut/modules.d/90qubes-vm /usr/lib/dracut/modules.d/90qubes-vm-modules /usr/lib/dracut/modules.d/90qubes-vm-simple diff --git a/rpm_spec/qubes-utils.spec.in b/rpm_spec/qubes-utils.spec.in index e94f569f..7fc9d10d 100644 --- a/rpm_spec/qubes-utils.spec.in +++ b/rpm_spec/qubes-utils.spec.in @@ -21,6 +21,10 @@ BuildRequires: python3-rpm-macros BuildRequires: xen-devel BuildRequires: gcc BuildRequires: selinux-policy-devel +%if 0%{?is_opensuse} +# for directory ownership +BuildRequires: xen-tools +%endif %description Common Linux files for Qubes Dom0 and VM @@ -119,13 +123,16 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %_udevrulesdir/*-qubes-*.rules %_tmpfilesdir/xen-devices-qubes.conf +%dir %{_prefix}/lib/qubes %{_prefix}/lib/qubes/udev-* %{_sbindir}/meminfo-writer %{_unitdir}/qubes-meminfo-writer.service %{_unitdir}/qubes-meminfo-writer-dom0.service +%dir %_includedir/qubes /etc/xen/scripts/qubes-block %files -n python%{python3_pkgversion}-qubesimgconverter +%dir %{python3_sitelib}/qubesimgconverter %{python3_sitelib}/qubesimgconverter/__init__.py %{python3_sitelib}/qubesimgconverter/imggen.py %{python3_sitelib}/qubesimgconverter/test.py @@ -140,6 +147,7 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(-,root,root,-) %_includedir/libqubes-rpc-filecopy.h +%dir %_includedir/qubes %_includedir/qubes/pure.h %{_libdir}/libqubes-rpc-filecopy.so %{_libdir}/libqubes-pure.so