Makefile 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. RPMS_DIR=rpm/
  2. VERSION := $(shell cat version)
  3. DIST ?= fc18
  4. KDESERVICEDIR ?= /usr/share/kde4/services
  5. SBINDIR ?= /usr/sbin
  6. help:
  7. @echo "make rpms -- generate binary rpm packages"
  8. @echo "make rpms-vm -- generate binary rpm packages for VM"
  9. @echo "make update-repo-current -- copy newly generated rpms to qubes yum repo"
  10. @echo "make update-repo-current-testing -- same, but to -current-testing repo"
  11. @echo "make update-repo-unstable -- same, but to -testing repo"
  12. @echo "make update-repo-installer -- copy dom0 rpms to installer repo"
  13. @echo "make clean -- cleanup"
  14. @echo "make install-vm -- install VM related files"
  15. rpms: rpms-vm
  16. rpms-vm:
  17. rpmbuild --define "_rpmdir $(RPMS_DIR)" -bb rpm_spec/core-vm.spec
  18. rpmbuild --define "_rpmdir $(RPMS_DIR)" -bb rpm_spec/core-vm-doc.spec
  19. rpmbuild --define "_rpmdir $(RPMS_DIR)" -bb rpm_spec/core-vm-kernel-placeholder.spec
  20. rpm --addsign \
  21. $(RPMS_DIR)/x86_64/qubes-core-vm-*$(VERSION)*.rpm \
  22. $(RPMS_DIR)/x86_64/qubes-core-vm-doc-*$(VERSION)*.rpm \
  23. $(RPMS_DIR)/x86_64/qubes-core-vm-kernel-placeholder-*.rpm
  24. rpms-dom0:
  25. @true
  26. clean:
  27. make -C dom0/qmemman clean
  28. make -C dom0/restore clean
  29. make -C misc clean
  30. make -C qrexec clean
  31. make -C u2mfn clean
  32. make -C vchan -f Makefile.linux clean
  33. install-vm:
  34. install -m 0644 -D misc/fstab $(DESTDIR)/etc/fstab
  35. install -d $(DESTDIR)/etc/init.d
  36. install vm-init.d/* $(DESTDIR)/etc/init.d/
  37. install -d $(DESTDIR)/lib/systemd/system $(DESTDIR)/usr/lib/qubes/init
  38. install -m 0755 vm-systemd/*.sh $(DESTDIR)/usr/lib/qubes/init/
  39. install -m 0644 vm-systemd/qubes-*.service $(DESTDIR)/lib/systemd/system/
  40. install -m 0644 vm-systemd/qubes-*.timer $(DESTDIR)/lib/systemd/system/
  41. install -m 0644 vm-systemd/ModemManager.service $(DESTDIR)/usr/lib/qubes/init/
  42. install -m 0644 vm-systemd/NetworkManager.service $(DESTDIR)/usr/lib/qubes/init/
  43. install -m 0644 vm-systemd/NetworkManager-wait-online.service $(DESTDIR)/usr/lib/qubes/init/
  44. install -m 0644 vm-systemd/cups.* $(DESTDIR)/usr/lib/qubes/init/
  45. install -m 0644 vm-systemd/ntpd.service $(DESTDIR)/usr/lib/qubes/init/
  46. install -m 0644 vm-systemd/chronyd.service $(DESTDIR)/usr/lib/qubes/init/
  47. install -D -m 0440 misc/qubes.sudoers $(DESTDIR)/etc/sudoers.d/qubes
  48. install -D -m 0644 misc/qubes-r2.repo $(DESTDIR)/etc/yum.repos.d/qubes-r2.repo
  49. install -D -m 0644 misc/serial.conf $(DESTDIR)/usr/share/qubes/serial.conf
  50. install -D misc/qubes-serial-login $(DESTDIR)/$(SBINDIR)/qubes-serial-login
  51. install -d $(DESTDIR)/usr/share/glib-2.0/schemas/
  52. install -m 0644 misc/org.gnome.settings-daemon.plugins.updates.gschema.override $(DESTDIR)/usr/share/glib-2.0/schemas/
  53. install -m 0644 misc/org.gnome.nautilus.gschema.override $(DESTDIR)/usr/share/glib-2.0/schemas/
  54. install -d $(DESTDIR)/usr/lib/yum-plugins/
  55. install -m 0644 misc/yum-qubes-hooks.py* $(DESTDIR)/usr/lib/yum-plugins/
  56. install -D -m 0644 misc/yum-qubes-hooks.conf $(DESTDIR)/etc/yum/pluginconf.d/yum-qubes-hooks.conf
  57. install -d $(DESTDIR)/var/lib/qubes
  58. install -d -m 755 $(DESTDIR)/etc/pki/rpm-gpg
  59. install -m 644 misc/RPM-GPG-KEY-qubes* $(DESTDIR)/etc/pki/rpm-gpg/
  60. install -D misc/xenstore-watch $(DESTDIR)/usr/bin/xenstore-watch-qubes
  61. install -d $(DESTDIR)/etc/udev/rules.d
  62. install -m 0644 misc/udev-qubes-misc.rules $(DESTDIR)/etc/udev/rules.d/50-qubes-misc.rules
  63. install -d $(DESTDIR)/usr/lib/qubes/
  64. install misc/qubes-download-dom0-updates.sh $(DESTDIR)/usr/lib/qubes/
  65. install misc/vusb-ctl.py $(DESTDIR)/usr/lib/qubes/
  66. install misc/qubes-trigger-sync-appmenus.sh $(DESTDIR)/usr/lib/qubes/
  67. install -D -m 0644 misc/qubes-trigger-sync-appmenus.action $(DESTDIR)/etc/yum/post-actions/qubes-trigger-sync-appmenus.action
  68. install -D misc/polkit-1-qubes-allow-all.pkla $(DESTDIR)/etc/polkit-1/localauthority/50-local.d/qubes-allow-all.pkla
  69. install -D misc/polkit-1-qubes-allow-all.rules $(DESTDIR)/etc/polkit-1/rules.d/00-qubes-allow-all.rules
  70. install -D -m 0644 misc/mime-globs $(DESTDIR)/usr/share/qubes/mime-override/globs
  71. mkdir -p $(DESTDIR)/usr/lib/qubes
  72. if [ -r misc/dispvm-dotfiles.$(DIST).tbz ] ; \
  73. then \
  74. install misc/dispvm-dotfiles.$(DIST).tbz $(DESTDIR)/etc/dispvm-dotfiles.tbz ; \
  75. else \
  76. install misc/dispvm-dotfiles.tbz $(DESTDIR)/etc/dispvm-dotfiles.tbz ; \
  77. fi;
  78. install misc/dispvm-prerun.sh $(DESTDIR)/usr/lib/qubes/dispvm-prerun.sh
  79. install -D misc/qubes-core.modules $(DESTDIR)/etc/sysconfig/modules/qubes-core.modules
  80. install -D misc/qubes-misc.modules $(DESTDIR)/etc/sysconfig/modules/qubes-misc.modules
  81. install -m 0644 network/udev-qubes-network.rules $(DESTDIR)/etc/udev/rules.d/99-qubes-network.rules
  82. install network/qubes-setup-dnat-to-ns $(DESTDIR)/usr/lib/qubes
  83. install network/qubes-fix-nm-conf.sh $(DESTDIR)/usr/lib/qubes
  84. install network/setup-ip $(DESTDIR)/usr/lib/qubes/
  85. install network/network-manager-prepare-conf-dir $(DESTDIR)/usr/lib/qubes/
  86. install -d $(DESTDIR)/etc/dhclient.d
  87. ln -s /usr/lib/qubes/qubes-setup-dnat-to-ns $(DESTDIR)/etc/dhclient.d/qubes-setup-dnat-to-ns.sh
  88. install -d $(DESTDIR)/etc/NetworkManager/dispatcher.d/
  89. install network/{qubes-nmhook,30-qubes-external-ip} $(DESTDIR)/etc/NetworkManager/dispatcher.d/
  90. install -D network/vif-route-qubes $(DESTDIR)/etc/xen/scripts/vif-route-qubes
  91. install -m 0400 -D network/iptables $(DESTDIR)/etc/sysconfig/iptables
  92. install -m 0400 -D network/ip6tables $(DESTDIR)/etc/sysconfig/ip6tables
  93. install -m 0644 -D network/tinyproxy-qubes-yum.conf $(DESTDIR)/etc/tinyproxy/tinyproxy-qubes-yum.conf
  94. install -m 0644 -D network/filter-qubes-yum $(DESTDIR)/etc/tinyproxy/filter-qubes-yum
  95. install -m 0755 -D network/iptables-yum-proxy $(DESTDIR)/usr/lib/qubes/iptables-yum-proxy
  96. install -d $(DESTDIR)/etc/xdg/autostart
  97. install -m 0755 network/show-hide-nm-applet.sh $(DESTDIR)/usr/lib/qubes/show-hide-nm-applet.sh
  98. install -m 0644 network/show-hide-nm-applet.desktop $(DESTDIR)/etc/xdg/autostart/00-qubes-show-hide-nm-applet.desktop
  99. install -d $(DESTDIR)/etc/yum.conf.d
  100. touch $(DESTDIR)/etc/yum.conf.d/qubes-proxy.conf
  101. install -d $(DESTDIR)/$(SBINDIR)
  102. install network/qubes-firewall $(DESTDIR)/$(SBINDIR)/
  103. install network/qubes-netwatcher $(DESTDIR)/$(SBINDIR)/
  104. install -d $(DESTDIR)/usr/bin
  105. install qubes-rpc/{qvm-open-in-dvm,qvm-open-in-vm,qvm-copy-to-vm,qvm-move-to-vm,qvm-run,qvm-mru-entry} $(DESTDIR)/usr/bin
  106. install qubes-rpc/wrap-in-html-if-url.sh $(DESTDIR)/usr/lib/qubes
  107. install qubes-rpc/qvm-copy-to-vm.kde $(DESTDIR)/usr/lib/qubes
  108. install qubes-rpc/qvm-copy-to-vm.gnome $(DESTDIR)/usr/lib/qubes
  109. install qubes-rpc/qvm-move-to-vm.kde $(DESTDIR)/usr/lib/qubes
  110. install qubes-rpc/qvm-move-to-vm.gnome $(DESTDIR)/usr/lib/qubes
  111. install qubes-rpc/{vm-file-editor,qfile-agent,qopen-in-vm} $(DESTDIR)/usr/lib/qubes
  112. install qubes-rpc/tar2qfile $(DESTDIR)/usr/lib/qubes
  113. # Install qfile-unpacker as SUID - because it will fail to receive files from other vm
  114. install -m 4755 qubes-rpc/qfile-unpacker $(DESTDIR)/usr/lib/qubes
  115. install qubes-rpc/qrun-in-vm $(DESTDIR)/usr/lib/qubes
  116. install qubes-rpc/sync-ntp-clock $(DESTDIR)/usr/lib/qubes
  117. install qubes-rpc/prepare-suspend $(DESTDIR)/usr/lib/qubes
  118. install -d $(DESTDIR)/$(KDESERVICEDIR)
  119. install -m 0644 qubes-rpc/{qvm-copy.desktop,qvm-move.desktop,qvm-dvm.desktop} $(DESTDIR)/$(KDESERVICEDIR)
  120. install -d $(DESTDIR)/etc/qubes-rpc
  121. install -m 0644 qubes-rpc/{qubes.Filecopy,qubes.OpenInVM,qubes.VMShell,qubes.SyncNtpClock} $(DESTDIR)/etc/qubes-rpc
  122. install -m 0644 qubes-rpc/{qubes.SuspendPre,qubes.SuspendPost,qubes.GetAppmenus} $(DESTDIR)/etc/qubes-rpc
  123. install -m 0644 qubes-rpc/qubes.WaitForSession $(DESTDIR)/etc/qubes-rpc
  124. install -m 0644 qubes-rpc/qubes.DetachPciDevice $(DESTDIR)/etc/qubes-rpc
  125. install -m 0644 qubes-rpc/qubes.{Backup,Restore} $(DESTDIR)/etc/qubes-rpc
  126. install -m 0644 qubes-rpc/qubes.Select{File,Directory} $(DESTDIR)/etc/qubes-rpc
  127. install -m 0644 qubes-rpc/qubes.GetImageRGBA $(DESTDIR)/etc/qubes-rpc
  128. install -d $(DESTDIR)/usr/share/file-manager/actions
  129. install -m 0644 qubes-rpc/*-gnome.desktop $(DESTDIR)/usr/share/file-manager/actions
  130. install -D misc/nautilus-actions.conf $(DESTDIR)/etc/xdg/nautilus-actions/nautilus-actions.conf
  131. install -d $(DESTDIR)/mnt/removable
  132. install -d $(DESTDIR)/var/lib/qubes/dom0-updates
  133. install -D -m 0644 misc/xorg-preload-apps.conf $(DESTDIR)/etc/X11/xorg-preload-apps.conf
  134. install -d $(DESTDIR)/var/run/qubes
  135. install -d $(DESTDIR)/home_volatile/user