diff --git a/package-managers/Makefile b/package-managers/Makefile index 39ad1149..28142de0 100644 --- a/package-managers/Makefile +++ b/package-managers/Makefile @@ -39,7 +39,7 @@ endif DIST ?= fc33 -.PHONY: install install-apt install-dnf install-rpm install-yum +.PHONY: install install-apt install-dnf install-dnf5 install-rpm install-yum install: install -d $(DESTDIR)$(QUBESLIBDIR) @@ -95,6 +95,10 @@ else endif install -D -m 0644 dnf-qubes-hooks.conf $(DESTDIR)$(SYSCONFDIR)/dnf/plugins/qubes-hooks.conf +install-dnf5: install-rpm + install -D -m 0644 qubes-post-update.actions \ + $(DESTDIR)$(SYSCONFDIR)/dnf/libdnf5-plugins/actions.d/qubes-post-update.actions + install-yum: install-rpm install -d $(DESTDIR)$(LIBDIR)/yum-plugins install -D -m 0644 yum-qubes-hooks.py \ diff --git a/package-managers/qubes-post-update.actions b/package-managers/qubes-post-update.actions new file mode 100644 index 00000000..2dc4ad8e --- /dev/null +++ b/package-managers/qubes-post-update.actions @@ -0,0 +1,4 @@ +# notify dom0 if all updates are installed now +post_transaction:::enabled=host-only:/usr/lib/qubes/upgrades-status-notify +# refresh appmenus, features etc +post_transaction:::enabled=host-only:/etc/qubes-rpc/qubes.PostInstall diff --git a/rpm_spec/core-agent.spec.in b/rpm_spec/core-agent.spec.in index 4a094a4a..3f058ac9 100644 --- a/rpm_spec/core-agent.spec.in +++ b/rpm_spec/core-agent.spec.in @@ -167,6 +167,9 @@ Requires: dbus-1-tools %else Requires: dbus-tools %endif +%if 0%{?fedora} >= 41 +Requires: libdnf5-plugin-actions +%else %if 0%{?rhel} == 8 # we need to stick to related DNF python version # which is python3.6 by default @@ -174,6 +177,7 @@ Requires: python3-dnf-plugins-qubes-hooks %else Requires: python%{python3_pkgversion}-dnf-plugins-qubes-hooks %endif +%endif Requires: python%{python3_pkgversion}-setuptools # for qubes.ResizeDisk Requires: parted @@ -496,7 +500,11 @@ make -C qubes-rpc/kde DESTDIR=$RPM_BUILD_ROOT install-kde5 make -C qubes-rpc/nautilus DESTDIR=$RPM_BUILD_ROOT install make -C qubes-rpc/thunar DESTDIR=$RPM_BUILD_ROOT install +%if 0%{?fedora} >= 41 +make -C package-managers PYTHON=%{__python3} DESTDIR=$RPM_BUILD_ROOT install install-dnf5 +%else make -C package-managers PYTHON=%{__python3} DESTDIR=$RPM_BUILD_ROOT install install-dnf +%endif %if 0%{?rhel} == 7 make -C package-managers DESTDIR=$RPM_BUILD_ROOT install-yum %endif @@ -949,10 +957,14 @@ rm -f %{name}-%{version} %config(noreplace) /etc/yum.conf.d/qubes-proxy.conf %dir /etc/yum.repos.d %config(noreplace) /etc/yum.repos.d/qubes-r4.repo +%if 0%{?fedora} >= 41 +/etc/dnf/libdnf5-plugins/actions.d/qubes-post-update.actions +%else %if 0%{?rhel} == 7 /etc/yum/pluginconf.d/yum-qubes-hooks.conf /usr/lib/yum-plugins/yum-qubes-hooks.py* %endif +%endif %config(noreplace) /etc/dnf/plugins/qubes-hooks.conf %dir /etc/dconf/db/local.d %config(noreplace) /etc/dconf/db/local.d/dpi