Makefile 7.5 KB

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