Makefile 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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/NetworkManager.service $(DESTDIR)/usr/lib/qubes/init/
  42. install -m 0644 vm-systemd/NetworkManager-wait-online.service $(DESTDIR)/usr/lib/qubes/init/
  43. install -m 0644 vm-systemd/cups.* $(DESTDIR)/usr/lib/qubes/init/
  44. install -m 0644 vm-systemd/ntpd.service $(DESTDIR)/usr/lib/qubes/init/
  45. install -m 0644 vm-systemd/chronyd.service $(DESTDIR)/usr/lib/qubes/init/
  46. install -D -m 0440 misc/qubes.sudoers $(DESTDIR)/etc/sudoers.d/qubes
  47. install -D -m 0644 misc/qubes-r2-beta2.repo $(DESTDIR)/etc/yum.repos.d/qubes-r2-beta2.repo
  48. install -D -m 0644 misc/qubes-r2-beta3.repo $(DESTDIR)/etc/yum.repos.d/qubes-r2-beta3.repo
  49. install -D -m 0644 misc/serial.conf $(DESTDIR)/usr/lib/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 -d $(DESTDIR)/usr/lib/yum-plugins/
  54. install -m 0644 misc/yum-qubes-hooks.py* $(DESTDIR)/usr/lib/yum-plugins/
  55. install -D -m 0644 misc/yum-qubes-hooks.conf $(DESTDIR)/etc/yum/pluginconf.d/yum-qubes-hooks.conf
  56. install -d $(DESTDIR)/var/lib/qubes
  57. install -d -m 755 $(DESTDIR)/etc/pki/rpm-gpg
  58. install -m 644 misc/RPM-GPG-KEY-qubes* $(DESTDIR)/etc/pki/rpm-gpg/
  59. install -D misc/xenstore-watch $(DESTDIR)/usr/bin/xenstore-watch-qubes
  60. install -d $(DESTDIR)/etc/udev/rules.d
  61. install -m 0644 misc/udev-qubes-misc.rules $(DESTDIR)/etc/udev/rules.d/50-qubes-misc.rules
  62. install -d $(DESTDIR)/usr/lib/qubes/
  63. install misc/qubes-download-dom0-updates.sh $(DESTDIR)/usr/lib/qubes/
  64. install misc/vusb-ctl.py $(DESTDIR)/usr/lib/qubes/
  65. install misc/qubes-trigger-sync-appmenus.sh $(DESTDIR)/usr/lib/qubes/
  66. install -D -m 0644 misc/qubes-trigger-sync-appmenus.action $(DESTDIR)/etc/yum/post-actions/qubes-trigger-sync-appmenus.action
  67. install -D misc/polkit-1-qubes-allow-all.pkla $(DESTDIR)/etc/polkit-1/localauthority/50-local.d/qubes-allow-all.pkla
  68. install -D misc/polkit-1-qubes-allow-all.rules $(DESTDIR)/etc/polkit-1/rules.d/00-qubes-allow-all.rules
  69. install -D -m 0644 misc/mime-globs $(DESTDIR)/usr/share/qubes/mime-override/globs
  70. mkdir -p $(DESTDIR)/usr/lib/qubes
  71. if [ -r misc/dispvm-dotfiles.$(DIST).tbz ] ; \
  72. then \
  73. install misc/dispvm-dotfiles.$(DIST).tbz $(DESTDIR)/etc/dispvm-dotfiles.tbz ; \
  74. else \
  75. install misc/dispvm-dotfiles.tbz $(DESTDIR)/etc/dispvm-dotfiles.tbz ; \
  76. fi;
  77. install misc/dispvm-prerun.sh $(DESTDIR)/usr/lib/qubes/dispvm-prerun.sh
  78. install -D misc/qubes-core.modules $(DESTDIR)/etc/sysconfig/modules/qubes-core.modules
  79. install -D misc/qubes-misc.modules $(DESTDIR)/etc/sysconfig/modules/qubes-misc.modules
  80. install -m 0644 network/udev-qubes-network.rules $(DESTDIR)/etc/udev/rules.d/99-qubes-network.rules
  81. install network/qubes-setup-dnat-to-ns $(DESTDIR)/usr/lib/qubes
  82. install network/qubes-fix-nm-conf.sh $(DESTDIR)/usr/lib/qubes
  83. install network/setup-ip $(DESTDIR)/usr/lib/qubes/
  84. install network/network-manager-prepare-conf-dir $(DESTDIR)/usr/lib/qubes/
  85. install -d $(DESTDIR)/etc/dhclient.d
  86. ln -s /usr/lib/qubes/qubes-setup-dnat-to-ns $(DESTDIR)/etc/dhclient.d/qubes-setup-dnat-to-ns.sh
  87. install -d $(DESTDIR)/etc/NetworkManager/dispatcher.d/
  88. install network/{qubes-nmhook,30-qubes-external-ip} $(DESTDIR)/etc/NetworkManager/dispatcher.d/
  89. install -D network/vif-route-qubes $(DESTDIR)/etc/xen/scripts/vif-route-qubes
  90. install -m 0400 -D network/iptables $(DESTDIR)/etc/sysconfig/iptables
  91. install -m 0400 -D network/ip6tables $(DESTDIR)/etc/sysconfig/ip6tables
  92. install -m 0644 -D network/tinyproxy-qubes-yum.conf $(DESTDIR)/etc/tinyproxy/tinyproxy-qubes-yum.conf
  93. install -m 0644 -D network/filter-qubes-yum $(DESTDIR)/etc/tinyproxy/filter-qubes-yum
  94. install -m 0755 -D network/iptables-yum-proxy $(DESTDIR)/usr/lib/qubes/iptables-yum-proxy
  95. install -d $(DESTDIR)/etc/yum.conf.d
  96. touch $(DESTDIR)/etc/yum.conf.d/qubes-proxy.conf
  97. install -d $(DESTDIR)/$(SBINDIR)
  98. install network/qubes-firewall $(DESTDIR)/$(SBINDIR)/
  99. install network/qubes-netwatcher $(DESTDIR)/$(SBINDIR)/
  100. install -d $(DESTDIR)/usr/bin
  101. install qubes-rpc/{qvm-open-in-dvm,qvm-open-in-vm,qvm-copy-to-vm,qvm-run,qvm-mru-entry} $(DESTDIR)/usr/bin
  102. install qubes-rpc/wrap-in-html-if-url.sh $(DESTDIR)/usr/lib/qubes
  103. install qubes-rpc/qvm-copy-to-vm.kde $(DESTDIR)/usr/lib/qubes
  104. install qubes-rpc/qvm-copy-to-vm.gnome $(DESTDIR)/usr/lib/qubes
  105. install qubes-rpc/{vm-file-editor,qfile-agent,qopen-in-vm} $(DESTDIR)/usr/lib/qubes
  106. install qubes-rpc/tar2qfile $(DESTDIR)/usr/lib/qubes
  107. # Install qfile-unpacker as SUID - because it will fail to receive files from other vm
  108. install -m 4555 qubes-rpc/qfile-unpacker $(DESTDIR)/usr/lib/qubes
  109. install qubes-rpc/qrun-in-vm $(DESTDIR)/usr/lib/qubes
  110. install qubes-rpc/sync-ntp-clock $(DESTDIR)/usr/lib/qubes
  111. install qubes-rpc/prepare-suspend $(DESTDIR)/usr/lib/qubes
  112. install -d $(DESTDIR)/$(KDESERVICEDIR)
  113. install -m 0644 qubes-rpc/{qvm-copy.desktop,qvm-dvm.desktop} $(DESTDIR)/$(KDESERVICEDIR)
  114. install -d $(DESTDIR)/etc/qubes-rpc
  115. install -m 0644 qubes-rpc/{qubes.Filecopy,qubes.OpenInVM,qubes.VMShell,qubes.SyncNtpClock} $(DESTDIR)/etc/qubes-rpc
  116. install -m 0644 qubes-rpc/{qubes.SuspendPre,qubes.SuspendPost,qubes.GetAppmenus} $(DESTDIR)/etc/qubes-rpc
  117. install -m 0644 qubes-rpc/qubes.WaitForSession $(DESTDIR)/etc/qubes-rpc
  118. install -m 0644 qubes-rpc/qubes.DetachPciDevice $(DESTDIR)/etc/qubes-rpc
  119. install -m 0644 qubes-rpc/qubes.{Backup,Restore} $(DESTDIR)/etc/qubes-rpc
  120. install -m 0644 qubes-rpc/qubes.Select{File,Directory} $(DESTDIR)/etc/qubes-rpc
  121. install -d $(DESTDIR)/usr/share/file-manager/actions
  122. install -m 0644 qubes-rpc/*-gnome.desktop $(DESTDIR)/usr/share/file-manager/actions
  123. install -D misc/nautilus-actions.conf $(DESTDIR)/etc/xdg/nautilus-actions/nautilus-actions.conf
  124. install -d $(DESTDIR)/mnt/removable
  125. install -d $(DESTDIR)/var/lib/qubes/dom0-updates
  126. install -D -m 0644 misc/xorg-preload-apps.conf $(DESTDIR)/etc/X11/xorg-preload-apps.conf
  127. install -d $(DESTDIR)/var/run/qubes
  128. install -d $(DESTDIR)/home_volatile/user