Makefile 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. RPMS_DIR=rpm/
  2. VERSION := $(shell cat version)
  3. DIST ?= fc18
  4. KDESERVICEDIR ?= /usr/share/kde4/services
  5. KDE5SERVICEDIR ?= /usr/share/kservices5/ServiceMenus/
  6. APPLICATIONSDIR ?= /usr/share/applications
  7. SBINDIR ?= /usr/sbin
  8. BINDIR ?= /usr/bin
  9. LIBDIR ?= /usr/lib
  10. SYSLIBDIR ?= /lib
  11. PYTHON ?= /usr/bin/python2
  12. PYTHON_SITEARCH = $(shell python2 -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1)')
  13. PYTHON2_SITELIB = $(shell python2 -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()')
  14. PYTHON3_SITELIB = $(shell python3 -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())')
  15. # This makefile uses some bash-isms, make uses /bin/sh by default.
  16. SHELL = /bin/bash
  17. help:
  18. @echo "make rpms -- generate binary rpm packages"
  19. @echo "make rpms-vm -- generate binary rpm packages for VM"
  20. @echo "make clean -- cleanup"
  21. @echo "make install-vm -- install VM related files"
  22. @echo ""
  23. @echo "You must have lsb_release, rpm-sign and pandoc installed."
  24. rpms: rpms-vm
  25. rpms-vm:
  26. [ "$$BACKEND_VMM" != "" ] || { echo "error: you must define variable BACKEND_VMM" >&2 ; exit 1 ; }
  27. lsb_release >/dev/null 2>&1 || { echo "error: you need lsb_release (package lsb) installed" >&2 ; exit 1 ; }
  28. type pandoc >/dev/null 2>&1 || { echo "error: you need pandoc installed" >&2 ; exit 1 ; }
  29. type rpmsign >/dev/null 2>&1 || { echo "error: you need rpm-sign installed" >&2 ; exit 1 ; }
  30. rpmbuild --define "_rpmdir $(RPMS_DIR)" -bb rpm_spec/core-vm.spec
  31. rpmbuild --define "_rpmdir $(RPMS_DIR)" -bb rpm_spec/core-vm-doc.spec
  32. [ "$$SKIP_SIGNING" != "" ] || rpm --addsign \
  33. $(RPMS_DIR)/x86_64/qubes-core-vm-*$(VERSION)*.rpm \
  34. $(RPMS_DIR)/x86_64/qubes-core-vm-doc-*$(VERSION)*.rpm
  35. rpms-dom0:
  36. @true
  37. clean:
  38. make -C misc clean
  39. make -C qrexec clean
  40. make -C qubes-rpc clean
  41. make -C doc clean
  42. rm -rf qubesagent/*.pyc qubesagent/__pycache__
  43. rm -rf test-packages/__pycache__
  44. rm -rf test-packages/qubesagent.egg-info
  45. rm -rf __pycache__
  46. all:
  47. make -C misc
  48. make -C qrexec
  49. make -C qubes-rpc
  50. # Dropin Directory
  51. SYSTEM_DROPIN_DIR ?= "lib/systemd/system"
  52. USER_DROPIN_DIR ?= "usr/lib/systemd/user"
  53. SYSTEM_DROPINS := chronyd.service crond.service
  54. SYSTEM_DROPINS += cups.service cups-browsed.service cups.path cups.socket ModemManager.service
  55. SYSTEM_DROPINS += getty@tty.service
  56. SYSTEM_DROPINS += tmp.mount
  57. SYSTEM_DROPINS += org.cups.cupsd.service org.cups.cupsd.path org.cups.cupsd.socket
  58. SYSTEM_DROPINS += systemd-random-seed.service
  59. SYSTEM_DROPINS += tor.service tor@default.service
  60. SYSTEM_DROPINS += systemd-timesyncd.service
  61. SYSTEM_DROPINS_NETWORKING := NetworkManager.service NetworkManager-wait-online.service
  62. SYSTEM_DROPINS_NETWORKING += tinyproxy.service
  63. USER_DROPINS := pulseaudio.service pulseaudio.socket
  64. # Ubuntu Dropins
  65. ifeq ($(shell lsb_release -is), Ubuntu)
  66. # 'crond.service' is named 'cron.service in Debian
  67. SYSTEM_DROPINS := $(strip $(patsubst crond.service, cron.service, $(SYSTEM_DROPINS)))
  68. SYSTEM_DROPINS += anacron.service
  69. SYSTEM_DROPINS += anacron-resume.service
  70. SYSTEM_DROPINS += netfilter-persistent.service
  71. SYSTEM_DROPINS += exim4.service
  72. SYSTEM_DROPINS += avahi-daemon.service
  73. endif
  74. # Debian Dropins
  75. ifeq ($(shell lsb_release -is), Debian)
  76. # 'crond.service' is named 'cron.service in Debian
  77. SYSTEM_DROPINS := $(strip $(patsubst crond.service, cron.service, $(SYSTEM_DROPINS)))
  78. # Wheezy System Dropins
  79. # Disable sysinit 'network-manager.service' since systemd 'NetworkManager.service' is already installed
  80. SYSTEM_DROPINS += $(strip $(if $(filter wheezy, $(shell lsb_release -cs)), network-manager.service,))
  81. # handled by qubes-iptables service now
  82. SYSTEM_DROPINS += netfilter-persistent.service
  83. SYSTEM_DROPINS += anacron.service
  84. SYSTEM_DROPINS += anacron-resume.service
  85. SYSTEM_DROPINS += exim4.service
  86. SYSTEM_DROPINS += avahi-daemon.service
  87. endif
  88. install-systemd-dropins:
  89. # Install system dropins
  90. @for dropin in $(SYSTEM_DROPINS); do \
  91. install -d $(DESTDIR)/$(SYSTEM_DROPIN_DIR)/$${dropin}.d ;\
  92. install -m 0644 vm-systemd/$${dropin}.d/*.conf $(DESTDIR)/$(SYSTEM_DROPIN_DIR)/$${dropin}.d/ ;\
  93. done
  94. # Install user dropins
  95. @for dropin in $(USER_DROPINS); do \
  96. install -d $(DESTDIR)/$(USER_DROPIN_DIR)/$${dropin}.d ;\
  97. install -m 0644 vm-systemd/user/$${dropin}.d/*.conf $(DESTDIR)/$(USER_DROPIN_DIR)/$${dropin}.d/ ;\
  98. done
  99. install-systemd-networking-dropins:
  100. # Install system dropins
  101. @for dropin in $(SYSTEM_DROPINS_NETWORKING); do \
  102. install -d $(DESTDIR)/$(SYSTEM_DROPIN_DIR)/$${dropin}.d ;\
  103. install -m 0644 vm-systemd/$${dropin}.d/*.conf $(DESTDIR)/$(SYSTEM_DROPIN_DIR)/$${dropin}.d/ ;\
  104. done
  105. install-init:
  106. install -d $(DESTDIR)$(LIBDIR)/qubes/init
  107. # FIXME: do a source code move vm-systemd/*.sh to init/
  108. # since those scripts are shared between sysvinit and systemd.
  109. install -m 0755 init/*.sh vm-systemd/*.sh $(DESTDIR)$(LIBDIR)/qubes/init/
  110. install -m 0644 init/functions $(DESTDIR)$(LIBDIR)/qubes/init/
  111. # Systemd service files
  112. SYSTEMD_ALL_SERVICES := $(wildcard vm-systemd/qubes-*.service)
  113. SYSTEMD_NETWORK_SERVICES := vm-systemd/qubes-firewall.service vm-systemd/qubes-iptables.service vm-systemd/qubes-updates-proxy.service
  114. SYSTEMD_CORE_SERVICES := $(filter-out $(SYSTEMD_NETWORK_SERVICES), $(SYSTEMD_ALL_SERVICES))
  115. install-systemd: install-init
  116. install -d $(DESTDIR)$(SYSLIBDIR)/systemd/system{,-preset} $(DESTDIR)$(LIBDIR)/qubes/init $(DESTDIR)$(SYSLIBDIR)/modules-load.d
  117. install -m 0644 $(SYSTEMD_CORE_SERVICES) $(DESTDIR)$(SYSLIBDIR)/systemd/system/
  118. install -m 0644 vm-systemd/qubes-*.timer $(DESTDIR)$(SYSLIBDIR)/systemd/system/
  119. install -m 0644 vm-systemd/75-qubes-vm.preset $(DESTDIR)$(SYSLIBDIR)/systemd/system-preset/
  120. install -m 0644 vm-systemd/qubes-core.conf $(DESTDIR)$(SYSLIBDIR)/modules-load.d/
  121. install-sysvinit: install-init
  122. install -d $(DESTDIR)/etc/init.d
  123. install vm-init.d/qubes-sysinit $(DESTDIR)/etc/init.d/
  124. install vm-init.d/qubes-core-early $(DESTDIR)/etc/init.d/
  125. install vm-init.d/qubes-core $(DESTDIR)/etc/init.d/
  126. install vm-init.d/qubes-core-netvm $(DESTDIR)/etc/init.d/
  127. install vm-init.d/qubes-firewall $(DESTDIR)/etc/init.d/
  128. install vm-init.d/qubes-qrexec-agent $(DESTDIR)/etc/init.d/
  129. install vm-init.d/qubes-updates-proxy $(DESTDIR)/etc/init.d/
  130. install vm-init.d/qubes-updates-proxy-forwarder $(DESTDIR)/etc/init.d/
  131. install -D vm-init.d/qubes-core.modules $(DESTDIR)/etc/sysconfig/modules/qubes-core.modules
  132. install network/qubes-iptables $(DESTDIR)/etc/init.d/
  133. install-rh: install-systemd install-systemd-dropins install-sysvinit
  134. install -D -m 0644 misc/qubes-r4.repo $(DESTDIR)/etc/yum.repos.d/qubes-r4.repo
  135. install -d $(DESTDIR)$(LIBDIR)/yum-plugins/
  136. install -m 0644 misc/yum-qubes-hooks.py* $(DESTDIR)$(LIBDIR)/yum-plugins/
  137. install -D -m 0644 misc/yum-qubes-hooks.conf $(DESTDIR)/etc/yum/pluginconf.d/yum-qubes-hooks.conf
  138. install -d -m 755 $(DESTDIR)/etc/pki/rpm-gpg
  139. install -m 644 misc/RPM-GPG-KEY-qubes* $(DESTDIR)/etc/pki/rpm-gpg/
  140. install -D -m 644 misc/session-stop-timeout.conf $(DESTDIR)$(LIBDIR)/systemd/system/user@.service.d/90-session-stop-timeout.conf
  141. install -d $(DESTDIR)/etc/yum.conf.d
  142. touch $(DESTDIR)/etc/yum.conf.d/qubes-proxy.conf
  143. install -D -m 0644 misc/grub.qubes $(DESTDIR)/etc/default/grub.qubes
  144. install -D -m 0644 misc/serial.conf $(DESTDIR)/usr/share/qubes/serial.conf
  145. install -D misc/qubes-serial-login $(DESTDIR)/$(SBINDIR)/qubes-serial-login
  146. install -D -m 0644 misc/dracut-qubes.conf \
  147. $(DESTDIR)/usr/lib/dracut/dracut.conf.d/30-qubes.conf
  148. install -D -m 0644 misc/dnf-qubes-hooks.py \
  149. $(DESTDIR)$(PYTHON2_SITELIB)/dnf-plugins/qubes-hooks.py
  150. install -D -m 0644 misc/dnf-qubes-hooks.py \
  151. $(DESTDIR)$(PYTHON3_SITELIB)/dnf-plugins/qubes-hooks.py
  152. install -D -m 0644 misc/dnf-qubes-hooks.conf $(DESTDIR)/etc/dnf/plugins/qubes-hooks.conf
  153. install-doc:
  154. $(MAKE) -C doc install
  155. install-common: install-doc
  156. $(MAKE) -C autostart-dropins install
  157. install -m 0644 -D misc/fstab $(DESTDIR)/etc/fstab
  158. # force /usr/bin before /bin to have /usr/bin/python instead of /bin/python
  159. PATH="/usr/bin:$(PATH)" $(PYTHON) setup.py install $(PYTHON_PREFIX_ARG) -O1 --root $(DESTDIR)
  160. mkdir -p $(DESTDIR)$(SBINDIR)
  161. install -d -m 0750 $(DESTDIR)/etc/sudoers.d/
  162. install -D -m 0440 misc/qubes.sudoers $(DESTDIR)/etc/sudoers.d/qubes
  163. install -D -m 0440 misc/sudoers.d_qt_x11_no_mitshm $(DESTDIR)/etc/sudoers.d/qt_x11_no_mitshm
  164. install -D -m 0644 misc/20_tcp_timestamps.conf $(DESTDIR)/etc/sysctl.d/20_tcp_timestamps.conf
  165. install -d $(DESTDIR)/var/lib/qubes
  166. install -D misc/xenstore-watch $(DESTDIR)$(BINDIR)/xenstore-watch-qubes
  167. install -d $(DESTDIR)/etc/udev/rules.d
  168. install -m 0644 misc/udev-qubes-misc.rules $(DESTDIR)/etc/udev/rules.d/50-qubes-misc.rules
  169. install -d $(DESTDIR)$(LIBDIR)/qubes/
  170. install misc/qubes-trigger-sync-appmenus.sh $(DESTDIR)$(LIBDIR)/qubes/
  171. install -d -m 0750 $(DESTDIR)/etc/polkit-1/rules.d
  172. install -D -m 0644 misc/polkit-1-qubes-allow-all.pkla $(DESTDIR)/etc/polkit-1/localauthority/50-local.d/qubes-allow-all.pkla
  173. install -D -m 0644 misc/polkit-1-qubes-allow-all.rules $(DESTDIR)/etc/polkit-1/rules.d/00-qubes-allow-all.rules
  174. install -D -m 0644 misc/mime-globs $(DESTDIR)/usr/share/qubes/mime-override/globs
  175. install misc/qubes-download-dom0-updates.sh $(DESTDIR)$(LIBDIR)/qubes/
  176. install -d $(DESTDIR)/usr/share/glib-2.0/schemas/
  177. install -m 0644 \
  178. misc/20_org.gnome.settings-daemon.plugins.updates.qubes.gschema.override \
  179. misc/20_org.gnome.nautilus.qubes.gschema.override \
  180. misc/20_org.mate.NotificationDaemon.qubes.gschema.override \
  181. misc/20_org.gnome.desktop.wm.preferences.qubes.gschema.override \
  182. $(DESTDIR)/usr/share/glib-2.0/schemas/
  183. install -m 2775 -d $(DESTDIR)/var/lib/qubes/dom0-updates
  184. install -D -m 0644 misc/qubes-master-key.asc $(DESTDIR)/usr/share/qubes/qubes-master-key.asc
  185. install misc/resize-rootfs $(DESTDIR)$(LIBDIR)/qubes/
  186. install misc/close-window $(DESTDIR)$(LIBDIR)/qubes/close-window
  187. install misc/upgrades-installed-check $(DESTDIR)$(LIBDIR)/qubes/upgrades-installed-check
  188. install misc/upgrades-status-notify $(DESTDIR)$(LIBDIR)/qubes/upgrades-status-notify
  189. install -m 0644 network/udev-qubes-network.rules $(DESTDIR)/etc/udev/rules.d/99-qubes-network.rules
  190. install -m 0755 network/update-proxy-configs $(DESTDIR)$(LIBDIR)/qubes/
  191. install -d $(DESTDIR)$(BINDIR)
  192. install -m 0755 misc/qubes-session-autostart $(DESTDIR)$(BINDIR)/qubes-session-autostart
  193. install -m 0755 misc/qvm-features-request $(DESTDIR)$(BINDIR)/qvm-features-request
  194. install -m 0755 misc/qubes-run-terminal $(DESTDIR)/$(BINDIR)
  195. install -D -m 0755 misc/qubes-run-terminal.desktop $(DESTDIR)/$(APPLICATIONSDIR)/qubes-run-terminal.desktop
  196. install -m 0755 qubes-rpc/qvm-sync-clock $(DESTDIR)$(BINDIR)/qvm-sync-clock
  197. install qubes-rpc/{qvm-open-in-dvm,qvm-open-in-vm,qvm-copy-to-vm,qvm-run-vm} $(DESTDIR)/usr/bin
  198. install qubes-rpc/qvm-copy $(DESTDIR)/usr/bin
  199. ln -s qvm-copy-to-vm $(DESTDIR)/usr/bin/qvm-move-to-vm
  200. ln -s qvm-copy $(DESTDIR)/usr/bin/qvm-move
  201. install qubes-rpc/qvm-copy-to-vm.kde $(DESTDIR)$(LIBDIR)/qubes
  202. install qubes-rpc/qvm-copy-to-vm.gnome $(DESTDIR)$(LIBDIR)/qubes
  203. install qubes-rpc/qvm-move-to-vm.kde $(DESTDIR)$(LIBDIR)/qubes
  204. install qubes-rpc/qvm-move-to-vm.gnome $(DESTDIR)$(LIBDIR)/qubes
  205. install qubes-rpc/qvm-actions.sh $(DESTDIR)$(LIBDIR)/qubes
  206. install -m 0644 misc/uca_qubes.xml $(DESTDIR)$(LIBDIR)/qubes
  207. mkdir -p $(DESTDIR)/etc/xdg/xfce4/xfconf/xfce-perchannel-xml
  208. install -m 0644 misc/thunar.xml $(DESTDIR)/etc/xdg/xfce4/xfconf/xfce-perchannel-xml
  209. install qubes-rpc/xdg-icon $(DESTDIR)$(LIBDIR)/qubes
  210. install qubes-rpc/{vm-file-editor,qfile-agent,qopen-in-vm} $(DESTDIR)$(LIBDIR)/qubes
  211. install qubes-rpc/qubes-open $(DESTDIR)$(BINDIR)
  212. install qubes-rpc/tar2qfile $(DESTDIR)$(LIBDIR)/qubes
  213. # Install qfile-unpacker as SUID - because it will fail to receive files from other vm
  214. install -m 4755 qubes-rpc/qfile-unpacker $(DESTDIR)$(LIBDIR)/qubes
  215. install qubes-rpc/qrun-in-vm $(DESTDIR)$(LIBDIR)/qubes
  216. install qubes-rpc/prepare-suspend $(DESTDIR)$(LIBDIR)/qubes
  217. install qubes-rpc/qubes-sync-clock $(DESTDIR)$(LIBDIR)/qubes
  218. install -m 0644 misc/qubes-suspend-module-blacklist $(DESTDIR)/etc/qubes-suspend-module-blacklist
  219. install -d $(DESTDIR)/$(KDESERVICEDIR)
  220. install -m 0644 qubes-rpc/{qvm-copy.desktop,qvm-move.desktop,qvm-dvm.desktop} $(DESTDIR)/$(KDESERVICEDIR)
  221. install -d $(DESTDIR)/$(KDE5SERVICEDIR)
  222. install -m 0644 qubes-rpc/{qvm-copy.desktop,qvm-move.desktop,qvm-dvm.desktop} $(DESTDIR)/$(KDE5SERVICEDIR)
  223. install -d $(DESTDIR)/etc/qubes-rpc
  224. install -m 0755 qubes-rpc/{qubes.Filecopy,qubes.OpenInVM,qubes.VMShell} $(DESTDIR)/etc/qubes-rpc
  225. install -m 0755 qubes-rpc/qubes.VMRootShell $(DESTDIR)/etc/qubes-rpc
  226. install -m 0755 qubes-rpc/qubes.OpenURL $(DESTDIR)/etc/qubes-rpc
  227. install -m 0755 qubes-rpc/{qubes.SuspendPre,qubes.SuspendPost,qubes.GetAppmenus} $(DESTDIR)/etc/qubes-rpc
  228. install -m 0755 qubes-rpc/qubes.SuspendPreAll $(DESTDIR)/etc/qubes-rpc
  229. install -m 0755 qubes-rpc/qubes.SuspendPostAll $(DESTDIR)/etc/qubes-rpc
  230. install -m 0755 qubes-rpc/qubes.WaitForSession $(DESTDIR)/etc/qubes-rpc
  231. install -m 0755 qubes-rpc/qubes.DetachPciDevice $(DESTDIR)/etc/qubes-rpc
  232. install -m 0755 qubes-rpc/qubes.{Backup,Restore} $(DESTDIR)/etc/qubes-rpc
  233. install -m 0755 qubes-rpc/qubes.Select{File,Directory} $(DESTDIR)/etc/qubes-rpc
  234. install -m 0755 qubes-rpc/qubes.GetImageRGBA $(DESTDIR)/etc/qubes-rpc
  235. install -m 0755 qubes-rpc/qubes.SetDateTime $(DESTDIR)/etc/qubes-rpc
  236. install -m 0755 qubes-rpc/qubes.InstallUpdatesGUI $(DESTDIR)/etc/qubes-rpc
  237. install -m 0755 qubes-rpc/qubes.ResizeDisk $(DESTDIR)/etc/qubes-rpc
  238. install -m 0755 qubes-rpc/qubes.StartApp $(DESTDIR)/etc/qubes-rpc
  239. install -m 0755 qubes-rpc/qubes.PostInstall $(DESTDIR)/etc/qubes-rpc
  240. install -m 0755 qubes-rpc/qubes.GetDate $(DESTDIR)/etc/qubes-rpc
  241. install -d $(DESTDIR)/etc/qubes/rpc-config
  242. install -m 0644 qubes-rpc/rpc-config.README $(DESTDIR)/etc/qubes/rpc-config/README
  243. for config in qubes-rpc/*.config; do \
  244. install -m 0644 $$config $(DESTDIR)/etc/qubes/rpc-config/`basename $$config .config`; \
  245. done
  246. install -d $(DESTDIR)/etc/qubes/suspend-pre.d
  247. install -m 0644 qubes-rpc/suspend-pre.README $(DESTDIR)/etc/qubes/suspend-pre.d/README
  248. install -d $(DESTDIR)/etc/qubes/suspend-post.d
  249. install -m 0644 qubes-rpc/suspend-post.README $(DESTDIR)/etc/qubes/suspend-post.d/README
  250. install -m 0755 qubes-rpc/suspend-post-qvm-sync-clock.sh \
  251. $(DESTDIR)/etc/qubes/suspend-post.d/qvm-sync-clock.sh
  252. install -d $(DESTDIR)/etc/qubes/post-install.d
  253. install -m 0644 post-install.d/README $(DESTDIR)/etc/qubes/post-install.d/
  254. install -m 0755 post-install.d/*.sh $(DESTDIR)/etc/qubes/post-install.d/
  255. install -d $(DESTDIR)/usr/share/nautilus-python/extensions
  256. install -m 0644 qubes-rpc/*_nautilus.py $(DESTDIR)/usr/share/nautilus-python/extensions
  257. install -D -m 0644 misc/dconf-db-local-dpi $(DESTDIR)/etc/dconf/db/local.d/dpi
  258. install -D -m 0755 misc/qubes-desktop-run $(DESTDIR)$(BINDIR)/qubes-desktop-run
  259. install -d $(DESTDIR)/mnt/removable
  260. install -D -m 0644 misc/xorg-preload-apps.conf $(DESTDIR)/etc/X11/xorg-preload-apps.conf
  261. install -d $(DESTDIR)/usr/lib/qubes-bind-dirs.d
  262. install -D -m 0644 misc/30_cron.conf $(DESTDIR)/usr/lib/qubes-bind-dirs.d/30_cron.conf
  263. install -d $(DESTDIR)/var/run/qubes
  264. install -d $(DESTDIR)/rw
  265. # Networking install target includes:
  266. # * basic network functionality (setting IP address, DNS, default gateway)
  267. # * package update proxy client
  268. install-networking:
  269. install -d $(DESTDIR)$(SYSLIBDIR)/systemd/system
  270. install -m 0644 vm-systemd/qubes-*.socket $(DESTDIR)$(SYSLIBDIR)/systemd/system/
  271. install -d $(DESTDIR)$(LIBDIR)/qubes/
  272. install network/setup-ip $(DESTDIR)$(LIBDIR)/qubes/
  273. # Netvm install target includes:
  274. # * qubes-firewall service (FirewallVM)
  275. # * DNS redirection setup
  276. # * proxy service used by TemplateVMs to download updates
  277. install-netvm:
  278. install -D -m 0644 $(SYSTEMD_NETWORK_SERVICES) $(DESTDIR)$(SYSLIBDIR)/systemd/system/
  279. install -D -m 0755 network/qubes-iptables $(DESTDIR)$(LIBDIR)/qubes/init/qubes-iptables
  280. install -D -m 0644 vm-systemd/qubes-core-agent-linux.tmpfiles \
  281. $(DESTDIR)/usr/lib/tmpfiles.d/qubes-core-agent-linux.conf
  282. mkdir -p $(DESTDIR)$(SBINDIR)
  283. ifneq ($(SBINDIR),/usr/bin)
  284. mv $(DESTDIR)/usr/bin/qubes-firewall $(DESTDIR)$(SBINDIR)/qubes-firewall
  285. endif
  286. install -D network/qubes-setup-dnat-to-ns $(DESTDIR)$(LIBDIR)/qubes/qubes-setup-dnat-to-ns
  287. install -d $(DESTDIR)/etc/dhclient.d
  288. ln -s /usr/lib/qubes/qubes-setup-dnat-to-ns $(DESTDIR)/etc/dhclient.d/qubes-setup-dnat-to-ns.sh
  289. install -D network/vif-route-qubes $(DESTDIR)/etc/xen/scripts/vif-route-qubes
  290. install -D network/vif-qubes-nat.sh $(DESTDIR)/etc/xen/scripts/vif-qubes-nat.sh
  291. install -m 0644 -D network/tinyproxy-updates.conf $(DESTDIR)/etc/tinyproxy/tinyproxy-updates.conf
  292. install -m 0644 -D network/updates-blacklist $(DESTDIR)/etc/tinyproxy/updates-blacklist
  293. install -m 0755 -D network/iptables-updates-proxy $(DESTDIR)$(LIBDIR)/qubes/iptables-updates-proxy
  294. install -m 0400 -D network/iptables $(DESTDIR)/etc/qubes/iptables.rules
  295. install -m 0400 -D network/ip6tables $(DESTDIR)/etc/qubes/ip6tables.rules
  296. install -m 0400 -D network/ip6tables-enabled $(DESTDIR)/etc/qubes/ip6tables-enabled.rules
  297. install -m 0755 -D qubes-rpc/qubes.UpdatesProxy $(DESTDIR)/etc/qubes-rpc/qubes.UpdatesProxy
  298. # networkmanager install target allow integration of NetworkManager for Qubes VM:
  299. # * make connections config persistent
  300. # * adjust DNS redirections when needed
  301. # * show/hide NetworkManager applet icon
  302. install-networkmanager:
  303. install -d $(DESTDIR)$(LIBDIR)/qubes/
  304. install network/qubes-fix-nm-conf.sh $(DESTDIR)$(LIBDIR)/qubes/
  305. install network/network-manager-prepare-conf-dir $(DESTDIR)$(LIBDIR)/qubes/
  306. install -d $(DESTDIR)/etc/NetworkManager/dispatcher.d/
  307. install network/{qubes-nmhook,30-qubes-external-ip} $(DESTDIR)/etc/NetworkManager/dispatcher.d/
  308. install -d $(DESTDIR)/usr/lib/NetworkManager/conf.d
  309. install -m 0644 network/nm-30-qubes.conf $(DESTDIR)/usr/lib/NetworkManager/conf.d/30-qubes.conf
  310. install -d $(DESTDIR)/etc/xdg/autostart
  311. install -m 0755 network/show-hide-nm-applet.sh $(DESTDIR)$(LIBDIR)/qubes/
  312. install -m 0644 network/show-hide-nm-applet.desktop $(DESTDIR)/etc/xdg/autostart/00-qubes-show-hide-nm-applet.desktop
  313. install-deb: install-common install-systemd install-systemd-dropins install-systemd-networking-dropins install-networking install-networkmanager install-netvm
  314. mkdir -p $(DESTDIR)/etc/apt/sources.list.d
  315. sed -e "s/@DIST@/`lsb_release -cs`/" misc/qubes-r4.list.in > $(DESTDIR)/etc/apt/sources.list.d/qubes-r4.list
  316. install -D -m 644 misc/qubes-archive-keyring.gpg $(DESTDIR)/etc/apt/trusted.gpg.d/qubes-archive-keyring.gpg
  317. install -D -m 644 network/00notify-hook $(DESTDIR)/etc/apt/apt.conf.d/00notify-hook
  318. install -d $(DESTDIR)/etc/sysctl.d
  319. install -m 644 network/80-qubes.conf $(DESTDIR)/etc/sysctl.d/
  320. install -D -m 644 misc/profile.d_qt_x11_no_mitshm.sh $(DESTDIR)/etc/profile.d/qt_x11_no_mitshm.sh
  321. install -D -m 440 misc/sudoers.d_umask $(DESTDIR)/etc/sudoers.d/umask
  322. install -d $(DESTDIR)/etc/pam.d
  323. install -m 0644 misc/pam.d_su.qubes $(DESTDIR)/etc/pam.d/su.qubes
  324. install -d $(DESTDIR)/etc/needrestart/conf.d
  325. install -D -m 0644 misc/50_qubes.conf $(DESTDIR)/etc/needrestart/conf.d/50_qubes.conf
  326. install -D -m 0644 misc/grub.qubes $(DESTDIR)/etc/default/grub.d/30-qubes.cfg
  327. install -D -m 0644 misc/apt-conf-70no-unattended $(DESTDIR)/etc/apt/apt.conf.d/70no-unattended
  328. mkdir -p $(DESTDIR)/etc/systemd/system/
  329. install -m 0644 vm-systemd/haveged.service $(DESTDIR)/etc/systemd/system/
  330. install-corevm: install-rh install-common install-systemd install-sysvinit install-systemd-dropins install-networking
  331. install-netvm: install-systemd-networking-dropins install-networkmanager
  332. install-vm: install-corevm install-netvm