diff --git a/Makefile b/Makefile index d48f986..2543426 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,6 @@ RPMS_DIR=rpm/ VERSION := $(shell cat version) DIST ?= fc18 -KDESERVICEDIR ?= /usr/share/kde4/services -KDE5SERVICEDIR ?= /usr/share/kservices5/ServiceMenus/ APPLICATIONSDIR ?= /usr/share/applications SBINDIR ?= /usr/sbin BINDIR ?= /usr/bin @@ -235,69 +233,6 @@ install-common: install-doc install -m 0755 misc/qvm-features-request $(DESTDIR)$(BINDIR)/qvm-features-request install -m 0755 misc/qubes-run-terminal $(DESTDIR)/$(BINDIR) install -D -m 0644 misc/qubes-run-terminal.desktop $(DESTDIR)/$(APPLICATIONSDIR)/qubes-run-terminal.desktop - install -m 0755 qubes-rpc/qvm-sync-clock $(DESTDIR)$(BINDIR)/qvm-sync-clock - install qubes-rpc/{qvm-open-in-dvm,qvm-open-in-vm,qvm-copy,qvm-run-vm} $(DESTDIR)/usr/bin - ln -s qvm-copy $(DESTDIR)/usr/bin/qvm-move-to-vm - ln -s qvm-copy $(DESTDIR)/usr/bin/qvm-move - ln -s qvm-copy $(DESTDIR)/usr/bin/qvm-copy-to-vm - install qubes-rpc/qvm-copy-to-vm.gnome $(DESTDIR)$(LIBDIR)/qubes - ln -s qvm-copy-to-vm.gnome $(DESTDIR)$(LIBDIR)/qubes/qvm-move-to-vm.gnome - ln -s qvm-copy-to-vm.gnome $(DESTDIR)$(LIBDIR)/qubes/qvm-copy-to-vm.kde - ln -s qvm-copy-to-vm.gnome $(DESTDIR)$(LIBDIR)/qubes/qvm-move-to-vm.kde - install qubes-rpc/qvm-actions.sh $(DESTDIR)$(LIBDIR)/qubes - install -m 0644 misc/uca_qubes.xml $(DESTDIR)$(LIBDIR)/qubes - mkdir -p $(DESTDIR)/etc/xdg/xfce4/xfconf/xfce-perchannel-xml - install -m 0644 misc/thunar.xml $(DESTDIR)/etc/xdg/xfce4/xfconf/xfce-perchannel-xml - install qubes-rpc/xdg-icon $(DESTDIR)$(LIBDIR)/qubes - install qubes-rpc/{vm-file-editor,qfile-agent,qopen-in-vm} $(DESTDIR)$(LIBDIR)/qubes - install qubes-rpc/qubes-open $(DESTDIR)$(BINDIR) - install qubes-rpc/tar2qfile $(DESTDIR)$(LIBDIR)/qubes - # Install qfile-unpacker as SUID - because it will fail to receive files from other vm - install -m 4755 qubes-rpc/qfile-unpacker $(DESTDIR)$(LIBDIR)/qubes - install qubes-rpc/qrun-in-vm $(DESTDIR)$(LIBDIR)/qubes - install qubes-rpc/prepare-suspend $(DESTDIR)$(LIBDIR)/qubes - install qubes-rpc/qubes-sync-clock $(DESTDIR)$(LIBDIR)/qubes - install -m 0644 misc/qubes-suspend-module-blacklist $(DESTDIR)/etc/qubes-suspend-module-blacklist - install -d $(DESTDIR)/$(KDESERVICEDIR) - install -m 0644 qubes-rpc/{qvm-copy.desktop,qvm-move.desktop,qvm-dvm.desktop} $(DESTDIR)/$(KDESERVICEDIR) - install -d $(DESTDIR)/$(KDE5SERVICEDIR) - install -m 0644 qubes-rpc/{qvm-copy.desktop,qvm-move.desktop,qvm-dvm.desktop} $(DESTDIR)/$(KDE5SERVICEDIR) - install -d $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/{qubes.Filecopy,qubes.OpenInVM,qubes.VMShell} $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/qubes.VMRootShell $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/qubes.OpenURL $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/{qubes.SuspendPre,qubes.SuspendPost,qubes.GetAppmenus} $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/qubes.SuspendPreAll $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/qubes.SuspendPostAll $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/qubes.WaitForSession $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/qubes.DetachPciDevice $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/qubes.{Backup,Restore} $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/qubes.Select{File,Directory} $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/qubes.GetImageRGBA $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/qubes.SetDateTime $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/qubes.InstallUpdatesGUI $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/qubes.ResizeDisk $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/qubes.StartApp $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/qubes.PostInstall $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/qubes.GetDate $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/qubes.ShowInTerminal $(DESTDIR)/etc/qubes-rpc - install -m 0755 qubes-rpc/qubes.ConnectTCP $(DESTDIR)/etc/qubes-rpc - install -d $(DESTDIR)/etc/qubes/rpc-config - for config in qubes-rpc/*.config; do \ - install -m 0644 $$config $(DESTDIR)/etc/qubes/rpc-config/`basename $$config .config`; \ - done - - install -d $(DESTDIR)/etc/qubes/suspend-pre.d - install -m 0644 qubes-rpc/suspend-pre.README $(DESTDIR)/etc/qubes/suspend-pre.d/README - install -d $(DESTDIR)/etc/qubes/suspend-post.d - install -m 0644 qubes-rpc/suspend-post.README $(DESTDIR)/etc/qubes/suspend-post.d/README - install -m 0755 qubes-rpc/suspend-post-qvm-sync-clock.sh \ - $(DESTDIR)/etc/qubes/suspend-post.d/qvm-sync-clock.sh - install -d $(DESTDIR)/etc/qubes/post-install.d - install -m 0644 post-install.d/README $(DESTDIR)/etc/qubes/post-install.d/ - install -m 0755 post-install.d/*.sh $(DESTDIR)/etc/qubes/post-install.d/ - install -d $(DESTDIR)/usr/share/nautilus-python/extensions - install -m 0644 qubes-rpc/*_nautilus.py $(DESTDIR)/usr/share/nautilus-python/extensions install -D -m 0644 misc/dconf-db-local-dpi $(DESTDIR)/etc/dconf/db/local.d/dpi diff --git a/debian/rules b/debian/rules index 68d4c83..e3d3a0b 100755 --- a/debian/rules +++ b/debian/rules @@ -16,6 +16,10 @@ override_dh_auto_build: override_dh_auto_install: make install-deb + make -C qubes-rpc install + make -C qubes-rpc/kde install + make -C qubes-rpc/nautilus install + make -C qubes-rpc/thunar install override_dh_fixperms: dh_fixperms -a -Xqfile-unpacker diff --git a/qubes-rpc/Makefile b/qubes-rpc/Makefile index abcdaf7..1d34b13 100644 --- a/qubes-rpc/Makefile +++ b/qubes-rpc/Makefile @@ -1,3 +1,10 @@ +BINDIR ?= /usr/bin +LIBDIR ?= /usr/lib +SYSCONFDIR ?= /etc +QUBESLIBDIR = $(LIBDIR)/qubes +QUBESRPCCMDDIR = $(SYSCONFDIR)/qubes-rpc +QUBESCONFDIR = $(SYSCONFDIR)/qubes +QUBESRPCCONFDIR = $(QUBESCONFDIR)/rpc-config CC=gcc CFLAGS=-g -O2 -Wall -Wextra -Werror -I. -fPIC -pie all: vm-file-editor qopen-in-vm qfile-agent qfile-unpacker tar2qfile @@ -14,3 +21,59 @@ tar2qfile: tar2qfile.o gui-fatal.o clean: rm -f qopen-in-vm qfile-agent qfile-unpacker tar2qfile vm-file-editor *.o *~ + +install: + install -d $(DESTDIR)$(BINDIR) + install -t $(DESTDIR)$(BINDIR) \ + qubes-open \ + qvm-open-in-dvm qvm-open-in-vm qvm-run-vm qvm-sync-clock + install -t $(DESTDIR)$(BINDIR) qvm-copy + ln -s qvm-copy $(DESTDIR)$(BINDIR)/qvm-move-to-vm + ln -s qvm-copy $(DESTDIR)$(BINDIR)/qvm-move + ln -s qvm-copy $(DESTDIR)$(BINDIR)/qvm-copy-to-vm + install -d $(DESTDIR)$(QUBESLIBDIR) + install -t $(DESTDIR)$(QUBESLIBDIR) qvm-copy-to-vm.gnome + ln -s qvm-copy-to-vm.gnome $(DESTDIR)$(QUBESLIBDIR)/qvm-move-to-vm.gnome + ln -s qvm-copy-to-vm.gnome $(DESTDIR)$(QUBESLIBDIR)/qvm-copy-to-vm.kde + ln -s qvm-copy-to-vm.gnome $(DESTDIR)$(QUBESLIBDIR)/qvm-move-to-vm.kde + install -t $(DESTDIR)$(QUBESLIBDIR) \ + prepare-suspend \ + qfile-agent qopen-in-vm qrun-in-vm qubes-sync-clock \ + tar2qfile vm-file-editor xdg-icon + # Install qfile-unpacker as SUID, because it will fail to receive + # files from other vm. + install -t $(DESTDIR)$(QUBESLIBDIR) -m 4755 qfile-unpacker + install -d $(DESTDIR)$(QUBESRPCCMDDIR) + install -t $(DESTDIR)$(QUBESRPCCMDDIR) \ + qubes.Filecopy qubes.OpenInVM qubes.VMShell \ + qubes.VMRootShell \ + qubes.OpenURL \ + qubes.SuspendPre qubes.SuspendPost qubes.GetAppmenus \ + qubes.SuspendPreAll \ + qubes.SuspendPostAll \ + qubes.WaitForSession \ + qubes.DetachPciDevice \ + qubes.Backup qubes.Restore \ + qubes.SelectFile qubes.SelectDirectory \ + qubes.GetImageRGBA \ + qubes.SetDateTime \ + qubes.InstallUpdatesGUI \ + qubes.ResizeDisk \ + qubes.StartApp \ + qubes.PostInstall \ + qubes.GetDate \ + qubes.ShowInTerminal \ + qubes.ConnectTCP + for config in *.config; do \ + install -D -m 0644 "$$config" "$(DESTDIR)$(QUBESRPCCONFDIR)/$${config%.config}"; \ + done + install -d $(DESTDIR)$(SYSCONFDIR) + install -t $(DESTDIR)$(SYSCONFDIR) -m 0644 qubes-suspend-module-blacklist + install -d $(DESTDIR)/etc/qubes/suspend-pre.d + install -t $(DESTDIR)$(QUBESCONFDIR)/suspend-pre.d -m 0644 suspend-pre.d/README + install -d $(DESTDIR)/etc/qubes/suspend-post.d + install -t $(DESTDIR)$(QUBESCONFDIR)/suspend-post.d -m 0644 suspend-post.d/README + install -t $(DESTDIR)$(QUBESCONFDIR)/suspend-post.d suspend-post.d/*.sh + install -d $(DESTDIR)/etc/qubes/post-install.d + install -t $(DESTDIR)$(QUBESCONFDIR)/post-install.d -m 0644 post-install.d/README + install -t $(DESTDIR)$(QUBESCONFDIR)/post-install.d post-install.d/*.sh diff --git a/qubes-rpc/kde/Makefile b/qubes-rpc/kde/Makefile new file mode 100644 index 0000000..665896b --- /dev/null +++ b/qubes-rpc/kde/Makefile @@ -0,0 +1,14 @@ +KDESERVICEDIR ?= /usr/share/kde4/services +KDE5SERVICEDIR ?= /usr/share/kservices5/ServiceMenus + +.PHONY: install install-kde4 install-kde5 + +install-kde4: + install -d $(DESTDIR)$(KDESERVICEDIR) + install -t $(DESTDIR)$(KDESERVICEDIR) -m 0644 *.desktop + +install-kde5: + install -d $(DESTDIR)$(KDE5SERVICEDIR) + install -t $(DESTDIR)$(KDE5SERVICEDIR) -m 0644 *.desktop + +install: install-kde4 install-kde5 diff --git a/qubes-rpc/qvm-copy.desktop b/qubes-rpc/kde/qvm-copy.desktop similarity index 100% rename from qubes-rpc/qvm-copy.desktop rename to qubes-rpc/kde/qvm-copy.desktop diff --git a/qubes-rpc/qvm-dvm.desktop b/qubes-rpc/kde/qvm-dvm.desktop similarity index 100% rename from qubes-rpc/qvm-dvm.desktop rename to qubes-rpc/kde/qvm-dvm.desktop diff --git a/qubes-rpc/qvm-move.desktop b/qubes-rpc/kde/qvm-move.desktop similarity index 100% rename from qubes-rpc/qvm-move.desktop rename to qubes-rpc/kde/qvm-move.desktop diff --git a/qubes-rpc/nautilus/Makefile b/qubes-rpc/nautilus/Makefile new file mode 100644 index 0000000..bb0a40f --- /dev/null +++ b/qubes-rpc/nautilus/Makefile @@ -0,0 +1,7 @@ +NAUTILUSPYEXTDIR ?= /usr/share/nautilus-python/extensions + +.PHONY: install + +install: + install -d $(DESTDIR)$(NAUTILUSPYEXTDIR) + install -t $(DESTDIR)$(NAUTILUSPYEXTDIR) -m 0644 *.py diff --git a/qubes-rpc/qvm_copy_nautilus.py b/qubes-rpc/nautilus/qvm_copy_nautilus.py similarity index 100% rename from qubes-rpc/qvm_copy_nautilus.py rename to qubes-rpc/nautilus/qvm_copy_nautilus.py diff --git a/qubes-rpc/qvm_dvm_nautilus.py b/qubes-rpc/nautilus/qvm_dvm_nautilus.py similarity index 100% rename from qubes-rpc/qvm_dvm_nautilus.py rename to qubes-rpc/nautilus/qvm_dvm_nautilus.py diff --git a/qubes-rpc/qvm_move_nautilus.py b/qubes-rpc/nautilus/qvm_move_nautilus.py similarity index 100% rename from qubes-rpc/qvm_move_nautilus.py rename to qubes-rpc/nautilus/qvm_move_nautilus.py diff --git a/post-install.d/10-qubes-core-agent-appmenus.sh b/qubes-rpc/post-install.d/10-qubes-core-agent-appmenus.sh similarity index 100% rename from post-install.d/10-qubes-core-agent-appmenus.sh rename to qubes-rpc/post-install.d/10-qubes-core-agent-appmenus.sh diff --git a/post-install.d/10-qubes-core-agent-features.sh b/qubes-rpc/post-install.d/10-qubes-core-agent-features.sh similarity index 100% rename from post-install.d/10-qubes-core-agent-features.sh rename to qubes-rpc/post-install.d/10-qubes-core-agent-features.sh diff --git a/post-install.d/90-qubes-core-agent.sh b/qubes-rpc/post-install.d/90-qubes-core-agent.sh similarity index 100% rename from post-install.d/90-qubes-core-agent.sh rename to qubes-rpc/post-install.d/90-qubes-core-agent.sh diff --git a/post-install.d/README b/qubes-rpc/post-install.d/README similarity index 100% rename from post-install.d/README rename to qubes-rpc/post-install.d/README diff --git a/misc/qubes-suspend-module-blacklist b/qubes-rpc/qubes-suspend-module-blacklist similarity index 100% rename from misc/qubes-suspend-module-blacklist rename to qubes-rpc/qubes-suspend-module-blacklist diff --git a/qubes-rpc/suspend-post.README b/qubes-rpc/suspend-post.d/README similarity index 100% rename from qubes-rpc/suspend-post.README rename to qubes-rpc/suspend-post.d/README diff --git a/qubes-rpc/suspend-post-qvm-sync-clock.sh b/qubes-rpc/suspend-post.d/qvm-sync-clock.sh similarity index 100% rename from qubes-rpc/suspend-post-qvm-sync-clock.sh rename to qubes-rpc/suspend-post.d/qvm-sync-clock.sh diff --git a/qubes-rpc/suspend-pre.README b/qubes-rpc/suspend-pre.d/README similarity index 100% rename from qubes-rpc/suspend-pre.README rename to qubes-rpc/suspend-pre.d/README diff --git a/qubes-rpc/thunar/Makefile b/qubes-rpc/thunar/Makefile new file mode 100644 index 0000000..4e912b0 --- /dev/null +++ b/qubes-rpc/thunar/Makefile @@ -0,0 +1,12 @@ +SYSCONFDIR ?= /etc +LIBDIR ?= /usr/lib +QUBESLIBDIR = $(LIBDIR)/qubes + +.PHONY: install + +install: + install -d $(DESTDIR)$(QUBESLIBDIR) + install -D -t $(DESTDIR)$(QUBESLIBDIR) qvm-actions.sh + install -D -t $(DESTDIR)$(QUBESLIBDIR) -m 0644 uca_qubes.xml + install -d $(DESTDIR)$(SYSCONFDIR)/xdg/xfce4/xfconf/xfce-perchannel-xml + install -D -t $(DESTDIR)$(SYSCONFDIR)/xdg/xfce4/xfconf/xfce-perchannel-xml -m 0644 thunar.xml diff --git a/qubes-rpc/qvm-actions.sh b/qubes-rpc/thunar/qvm-actions.sh similarity index 100% rename from qubes-rpc/qvm-actions.sh rename to qubes-rpc/thunar/qvm-actions.sh diff --git a/misc/thunar.xml b/qubes-rpc/thunar/thunar.xml similarity index 100% rename from misc/thunar.xml rename to qubes-rpc/thunar/thunar.xml diff --git a/misc/uca_qubes.xml b/qubes-rpc/thunar/uca_qubes.xml similarity index 100% rename from misc/uca_qubes.xml rename to qubes-rpc/thunar/uca_qubes.xml diff --git a/rpm_spec/core-agent.spec.in b/rpm_spec/core-agent.spec.in index 90e2c01..16fae24 100644 --- a/rpm_spec/core-agent.spec.in +++ b/rpm_spec/core-agent.spec.in @@ -296,6 +296,10 @@ usermod -p '' root %install make install-vm DESTDIR=$RPM_BUILD_ROOT +make -C qubes-rpc DESTDIR=$RPM_BUILD_ROOT install +make -C qubes-rpc/kde DESTDIR=$RPM_BUILD_ROOT install +make -C qubes-rpc/nautilus DESTDIR=$RPM_BUILD_ROOT install +make -C qubes-rpc/thunar DESTDIR=$RPM_BUILD_ROOT install %if 0%{?rhel} >= 7 sed -i \