Makefile 20 KB

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