Merge remote-tracking branch 'origin/pr/175'
* origin/pr/175: yum-plugin-hooks: package only for CentOS 7 yum-qubes-hooks: update with respect to dnf-qubes-hooks
This commit is contained in:
commit
f2e2db5def
7
Makefile
7
Makefile
@ -161,8 +161,6 @@ install-rh: install-systemd install-systemd-dropins install-sysvinit
|
||||
install -D -m 0644 misc/qubes-r4.repo.in $(DESTDIR)/etc/yum.repos.d/qubes-r4.repo
|
||||
DIST='$(DIST)'; sed -i "s/@DIST@/$${DIST%%[0-9]*}/g" $(DESTDIR)/etc/yum.repos.d/qubes-r4.repo
|
||||
install -d $(DESTDIR)$(LIBDIR)/yum-plugins/
|
||||
install -m 0644 misc/yum-qubes-hooks.py* $(DESTDIR)$(LIBDIR)/yum-plugins/
|
||||
install -D -m 0644 misc/yum-qubes-hooks.conf $(DESTDIR)/etc/yum/pluginconf.d/yum-qubes-hooks.conf
|
||||
install -d -m 755 $(DESTDIR)/etc/pki/rpm-gpg
|
||||
install -m 644 misc/RPM-GPG-KEY-qubes* $(DESTDIR)/etc/pki/rpm-gpg/
|
||||
install -D -m 644 misc/session-stop-timeout.conf $(DESTDIR)$(LIBDIR)/systemd/system/user@.service.d/90-session-stop-timeout.conf
|
||||
@ -175,7 +173,10 @@ install-rh: install-systemd install-systemd-dropins install-sysvinit
|
||||
install -D misc/qubes-serial-login $(DESTDIR)/$(SBINDIR)/qubes-serial-login
|
||||
install -D -m 0644 misc/dracut-qubes.conf \
|
||||
$(DESTDIR)/usr/lib/dracut/dracut.conf.d/30-qubes.conf
|
||||
|
||||
ifeq ($(shell rpm --eval %{centos_ver}),7)
|
||||
install -D -m 0644 misc/yum-qubes-hooks.py $(DESTDIR)$(LIBDIR)/yum-plugins/
|
||||
install -D -m 0644 misc/yum-qubes-hooks.conf $(DESTDIR)/etc/yum/pluginconf.d/yum-qubes-hooks.conf
|
||||
endif
|
||||
install -D -m 0644 misc/dnf-qubes-hooks.py \
|
||||
$(DESTDIR)$(PYTHON2_SITELIB)/dnf-plugins/qubes-hooks.py
|
||||
install -D -m 0644 misc/dnf-qubes-hooks.py \
|
||||
|
@ -1,2 +1,4 @@
|
||||
[main]
|
||||
enabled=1
|
||||
notify-updates=1
|
||||
sync-appmenus=1
|
||||
|
@ -22,21 +22,26 @@
|
||||
|
||||
|
||||
from yum.plugins import TYPE_CORE
|
||||
from yum.constants import *
|
||||
import subprocess
|
||||
|
||||
requires_api_version = '2.4'
|
||||
plugin_type = (TYPE_CORE,)
|
||||
|
||||
|
||||
def posttrans_hook(conduit):
|
||||
# Get all updates available _before_ this transaction
|
||||
pkg_list = conduit._base.doPackageLists(pkgnarrow='updates')
|
||||
|
||||
# Get packages installed in this transaction...
|
||||
ts = conduit.getTsInfo()
|
||||
all = ts.getMembers()
|
||||
# ...and filter them out of available updates
|
||||
filtered_updates = filter(lambda x: x not in all, pkg_list.updates)
|
||||
|
||||
# Notify dom0 about left updates count
|
||||
subprocess.call(['/usr/lib/qubes/qrexec-client-vm', 'dom0', 'qubes.NotifyUpdates', '/bin/echo', str(len(filtered_updates))])
|
||||
if conduit.confBool('main', 'notify-updates', default=True):
|
||||
# Get all updates available _before_ this transaction
|
||||
pkg_list = conduit._base.doPackageLists(pkgnarrow='updates')
|
||||
# Get packages installed in this transaction...
|
||||
ts = conduit.getTsInfo()
|
||||
all_transactions = ts.getMembers()
|
||||
# ...and filter them out of available updates
|
||||
filtered_updates = list(
|
||||
filter(lambda x: x not in all_transactions, pkg_list.updates))
|
||||
# Notify dom0 about left updates count
|
||||
subprocess.call(
|
||||
['/usr/lib/qubes/qrexec-client-vm', 'dom0', 'qubes.NotifyUpdates',
|
||||
'/bin/echo', str(len(filtered_updates))])
|
||||
conduit.info(1, "Notifying dom0 about installed/removed applications")
|
||||
# Notify and add app to app-menus
|
||||
subprocess.call(['/etc/qubes-rpc/qubes.PostInstall'])
|
||||
|
@ -593,7 +593,10 @@ rm -f %{name}-%{version}
|
||||
%config(noreplace) /etc/qubes-suspend-module-blacklist
|
||||
%config(noreplace) /etc/yum.conf.d/qubes-proxy.conf
|
||||
%config(noreplace) /etc/yum.repos.d/qubes-r4.repo
|
||||
%if 0%{?rhel} == 7
|
||||
/etc/yum/pluginconf.d/yum-qubes-hooks.conf
|
||||
/usr/lib/yum-plugins/yum-qubes-hooks.py*
|
||||
%endif
|
||||
%config(noreplace) /etc/dnf/plugins/qubes-hooks.conf
|
||||
%config(noreplace) /etc/dconf/db/local.d/dpi
|
||||
/usr/lib/systemd/system/user@.service.d/90-session-stop-timeout.conf
|
||||
@ -632,7 +635,6 @@ rm -f %{name}-%{version}
|
||||
/usr/lib/qubes/qubes-sync-clock
|
||||
/usr/lib/qubes/resize-rootfs
|
||||
/usr/lib/qubes/tinyproxy-wrapper
|
||||
/usr/lib/yum-plugins/yum-qubes-hooks.py*
|
||||
/usr/lib/dracut/dracut.conf.d/30-qubes.conf
|
||||
%dir /usr/lib/qubes/init
|
||||
/usr/lib/qubes/init/bind-dirs.sh
|
||||
|
Loading…
Reference in New Issue
Block a user