You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile.am 15 KiB

services: Introduce extensible services. This patch rewrites GuixSD services to make them extensible. * gnu-system.am (GNU_SYSTEM_MODULES): Add gnu/services/dbus.scm. * gnu/services.scm (<service>): Replace with new record type. (<service-extension>, <service-type>): New record types. (write-service-type, compute-boot-script, second-argument): New procedures. (%boot-service, boot-service-type): New variables. (file-union, directory-union, modprobe-wrapper, activation-service->script, activation-script, gexps->activation-gexp): New procedures. (activation-service-type, %activation-service): New variables. (etc-directory, files->etc-directory, etc-service): New procedures. (etc-service-type, setuid-program-service, firmware-service-type): New variables. (firmware->activation-gexp): New procedure. (&service-error, &missing-target-service-error, &ambiguous-target-service-error): New condition types. (service-back-edges, fold-services): New procedures. * gnu/services/avahi.scm (<avahi-configuration>): New record type. (configuration-file): Replace keyword parameters with a single 'config' parameter. (%avahi-accounts, %avahi-activation, avahi-service-type): New variables. (avahi-dmd-service): New procedure. (avahi-service): Rewrite using 'service' and 'avahi-configuration'. * gnu/services/base.scm (%root-file-system-dmd-service, root-file-system-service-type): New variables. (root-file-system-service): Use them. (file-system->dmd-service-name): New procedure. (file-system-service-type): New variable. (file-system-service): Use it. Replace keyword parameters with a single 'file-system' object. (user-unmount-service-type): New variable. (user-unmount-service): Use it. (user-processes-service-type): New variable. (user-processes-service): Use it. (host-name-service-type): New variable. (host-name-service): Use it. (console-keymap-service-type): New variable. (console-keymap-service): Use it. (console-font-service-type): New variable. (console-font-service): Use it. (mingetty-pam-service, mingetty-dmd-service): New procedures. (mingetty-service-type): New variable. (mingetty-service): Use it. (nscd-dmd-service): New procedure. (nscd-activation, nscd-service-type): New variables. (nscd-service): Use the latter. (syslog-service-type): New variable. (syslog-service): Use it. (<guix-configuration>): New record type. (%default-guix-configuration): New variable. (guix-dmd-service, guix-accounts, guix-activation): New procedures. (guix-service-type): New variable. (guix-service): Replace list of keyword parameters with a single 'config' parameter. Rewrite using 'service'. (<udev-configuration>): New record type. (udev-dmd-service): New procedure. (udev-service-type): New variable. (udev-service): Use it. (device-mapping-service-type): New variable. (device-mapping-service): Use it. (swap-service-type): New variable. (swap-service): Use it. * gnu/services/databases.scm (<postgresql-configuration>): New record type. (%postgresql-accounts, postgresql-activation): New variables. (postgresql-dmd-service): New procedure. (postgresql-service): Rewrite using 'service' and 'postgresql-configuration'. * gnu/services/dbus.scm: New file. * gnu/services/desktop.scm (dbus-configuration-directory, dbus-service): Remove. (wrapped-dbus-service): New procedure. (<upower-configuration>): New record type. (upower-configuration-file): Replace keyword parameters with single <upower-configuration> parameter. (%upower-accounts, %upower-activation): New variables. (upower-dbus-service, upower-dmd-service): New procedures. (upower-service-type): New variable. (upower-service): Rewrite using 'service' and 'upower-configuration'. (%colord-activation, %colord-accounts): New variables. (colord-dmd-service): New procedure. (colord-service-type): New variable. (colord-service): Rewrite using 'service'. (<geoclue-configuration>): New record type. (geoclue-configuration-file): Replace keyword parameters with a single 'config' parameter. (geoclue-dbus-service, geoclue-dmd-service): New procedures. (%geoclue-accounts, geoclue-service-type): New variables. (geoclue-service): Rewrite using 'service' and 'geoclue-configuration'. (%polkit-accounts, %polkit-pam-services, polkit-service-type): New variables. (polkit-dmd-service): New procedure. (polkit-service): Rewrite using 'service'. (<elogind-configuration>)[elogind]: New field. (elogind-dmd-service): New procedure. (elogind-service-type): New variable. (elogind-service): Rewrite using 'service'. (%desktop-services): Remove argument to 'dbus-service'. Remove 'map' over %BASE-SERVICES. * gnu/services/dmd.scm (dmd-boot-gexp): New procedure. (dmd-root-service-type, %dmd-root-service): New variables. (dmd-service-type): New macro. (<dmd-service>): New record type. * gnu/services/lirc.scm (<lirc-configuration>): New record type. (%lirc-activation): New variable. (lirc-dmd-service): New procedure. (lirc-service-type): New variable. (lirc-service): Rewrite using 'service' and 'lirc-configuration'. * gnu/services/networking.scm (<static-networking>): New record type. (static-networking-service-type): New variable. (static-networking-service): Rewrite using 'service' and 'static-networking'. (dhcp-client-service-type): New variable. (dhcp-client-service): Rewrite using 'service'. (<ntp-configuration>): New record type. (ntp-dmd-service): New procedure. (ntp-service-type): New variable. (ntp-service): New procedure. (%tor-accounts, tor-service-type): New variable. (tor-dmd-service): New procedure. (tor-service): Rewrite using 'service'. (<bitlbee-configuration>): New record type. (bitlbee-dmd-service): New procedure. (%bitlbee-accounts, %bitlbee-activation, bitlbee-service-type): New variables. (bitlbee-service): Rewrite using 'service'. (%wicd-activation): New variable. (wicd-dmd-service): New procedure. (wicd-service-type): New variable. (wicd-service): Rewrite using 'service'. * gnu/services/ssh.scm (<lsh-configuration>): New record type. (activation): Rename to... (lsh-initialization): ... this. (lsh-activation, lsh-dmd-service, lsh-pam-services): New procedures. (lsh-service-type): New variable. (lsh-service): Rewrite using 'service' and 'lsh-configuration'. * gnu/services/web.scm (<nginx-configuration>): New record type. (%nginx-accounts): New variable. (nginx-activation, nginx-dmd-service): New procedures. (nginx-service-type): New variable. (nginx-service): Rewrite using 'service' and 'nginx-configuration'. * gnu/services/xorg.scm (<slim-configuration>): New record type. (slim-pam-service, slim-dmd-service): New procedures. (slim-service-type): New variable. (slim-service): Rewrite using 'service' and 'slim-configuration'. * gnu/system.scm (file-union): Remove. (other-file-system-services): Adjust to new 'file-system-service' signature. (essential-services): Add #:container? parameter. Add %DMD-ROOT-SERVICE, %ACTIVATION-SERVICE, and calls to 'pam-root-service', 'account-service', 'operating-system-etc-service', and a SETUID-PROGRAM-SERVICE instance. (operating-system-services): Pass #:container? to 'essential-services. (etc-directory): Remove. (operating-system-etc-service): New procedure. Rewrite as a call to 'etc-service'. (operating-system-accounts): Change to not return accounts required by services. (operating-system-etc-directory): Rewrite as a call to 'fold-services' and 'etc-directory'. (user-group->gexp, user-account->gexp, modprobe-wrapper): Remove. (operating-system-activation-script): Rewrite as a call to 'fold-services' and 'activation-service->script'. (operating-system-boot-script): Likewise. (operating-system-derivation): Add call to 'lower-object'. (emacs-site-file, emacs-site-directory, shells-file): Change to use 'computed-file' and 'scheme-file' instead of the monadic procedures. * gnu/system/install.scm (cow-store-service-type): New variable. (cow-store-service): Rewrite using 'service'. (/etc/configuration-files): New procedure. (configuration-template-service-type, %configuration-template-service): New variables. (configuration-template-service): Remove. (installation-services): Adjust accordingly. Adjust argument to 'guix-service'. * gnu/system/linux.scm (/etc-entry, pam-root-service): New procedures. (pam-root-service-type): New variable. * gnu/system/shadow.scm (user-group->gexp, user-account->gexp, account-activation, etc-skel, account-service): New procedures. (account-service-type): New variable. * tests/services.scm: New file. * doc/guix.texi (Base Services, Desktop Services): Adjust accordingly. (Defining Services): Rewrite. * doc/images/service-graph.dot: New file. * doc.am (DOT_FILES): Add it. * po/guix/POTFILES.in: Add gnu/services.scm.
5 years ago
build: Add a Guile custom test driver using SRFI-64. Before that '.log' files for scheme tests were fragmented and not included in test-suite.log. This unifies the semantics of SRFI-64 API with Automake test suite. * build-aux/test-driver.scm: New file. * Makefile.am (SCM_LOG_DRIVER, AM_SCM_LOG_DRIVER_FLAGS): New variables. (SCM_LOG_COMPILER, AM_SCM_LOG_FLAGS): Delete variables. (AM_TESTS_ENVIRONMENT): Set GUILE_AUTO_COMPILE to 0. * test-env.in: Silence guix-daemon. * doc/guix.texi (Running the Test Suite): Describe how to display the detailed results. Bug reports require only 'test-suite.log' file. * tests/base32.scm, tests/build-utils.scm, tests/builders.scm, tests/challenge.scm, tests/cpan.scm, tests/cpio.scm, tests/cran.scm, tests/cve.scm, tests/derivations.scm, tests/elpa.scm, tests/file-systems.scm, tests/gem.scm, tests/gexp.scm, tests/gnu-maintenance.scm, tests/grafts.scm, tests/graph.scm, tests/gremlin.scm, tests/hackage.scm, tests/hash.scm, tests/import-utils.scm, tests/lint.scm, tests/monads.scm, tests/nar.scm, tests/packages.scm, tests/pk-crypto.scm, tests/pki.scm, tests/profiles.scm, tests/publish.scm, tests/pypi.scm, tests/records.scm, tests/scripts-build.scm, tests/scripts.scm, tests/services.scm, tests/sets.scm, tests/size.scm, tests/snix.scm, tests/store.scm, tests/substitute.scm, tests/syscalls.scm, tests/system.scm, tests/ui.scm, tests/union.scm, tests/upstream.scm, tests/utils.scm: Don't exit at the end of test groups. * tests/containers.scm: Likewise. Use 'test-skip' instead of exiting with error code 77.
5 years ago
build: Add a Guile custom test driver using SRFI-64. Before that '.log' files for scheme tests were fragmented and not included in test-suite.log. This unifies the semantics of SRFI-64 API with Automake test suite. * build-aux/test-driver.scm: New file. * Makefile.am (SCM_LOG_DRIVER, AM_SCM_LOG_DRIVER_FLAGS): New variables. (SCM_LOG_COMPILER, AM_SCM_LOG_FLAGS): Delete variables. (AM_TESTS_ENVIRONMENT): Set GUILE_AUTO_COMPILE to 0. * test-env.in: Silence guix-daemon. * doc/guix.texi (Running the Test Suite): Describe how to display the detailed results. Bug reports require only 'test-suite.log' file. * tests/base32.scm, tests/build-utils.scm, tests/builders.scm, tests/challenge.scm, tests/cpan.scm, tests/cpio.scm, tests/cran.scm, tests/cve.scm, tests/derivations.scm, tests/elpa.scm, tests/file-systems.scm, tests/gem.scm, tests/gexp.scm, tests/gnu-maintenance.scm, tests/grafts.scm, tests/graph.scm, tests/gremlin.scm, tests/hackage.scm, tests/hash.scm, tests/import-utils.scm, tests/lint.scm, tests/monads.scm, tests/nar.scm, tests/packages.scm, tests/pk-crypto.scm, tests/pki.scm, tests/profiles.scm, tests/publish.scm, tests/pypi.scm, tests/records.scm, tests/scripts-build.scm, tests/scripts.scm, tests/services.scm, tests/sets.scm, tests/size.scm, tests/snix.scm, tests/store.scm, tests/substitute.scm, tests/syscalls.scm, tests/system.scm, tests/ui.scm, tests/union.scm, tests/upstream.scm, tests/utils.scm: Don't exit at the end of test groups. * tests/containers.scm: Likewise. Use 'test-skip' instead of exiting with error code 77.
5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. # GNU Guix --- Functional package management for GNU
  2. # Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
  3. # Copyright © 2013 Andreas Enge <andreas@enge.fr>
  4. # Copyright © 2015 Alex Kost <alezost@gmail.com>
  5. # Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
  6. # Copyright © 2016 Mark H Weaver <mhw@netris.org>
  7. #
  8. # This file is part of GNU Guix.
  9. #
  10. # GNU Guix is free software; you can redistribute it and/or modify it
  11. # under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; either version 3 of the License, or (at
  13. # your option) any later version.
  14. #
  15. # GNU Guix is distributed in the hope that it will be useful, but
  16. # WITHOUT ANY WARRANTY; without even the implied warranty of
  17. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. # GNU General Public License for more details.
  19. #
  20. # You should have received a copy of the GNU General Public License
  21. # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  22. bin_SCRIPTS = \
  23. scripts/guix
  24. nodist_noinst_SCRIPTS = \
  25. pre-inst-env \
  26. test-env
  27. include gnu/local.mk
  28. MODULES = \
  29. guix/base32.scm \
  30. guix/base64.scm \
  31. guix/cpio.scm \
  32. guix/records.scm \
  33. guix/gcrypt.scm \
  34. guix/hash.scm \
  35. guix/pk-crypto.scm \
  36. guix/pki.scm \
  37. guix/combinators.scm \
  38. guix/utils.scm \
  39. guix/sets.scm \
  40. guix/download.scm \
  41. guix/git-download.scm \
  42. guix/hg-download.scm \
  43. guix/monads.scm \
  44. guix/monad-repl.scm \
  45. guix/gexp.scm \
  46. guix/profiles.scm \
  47. guix/serialization.scm \
  48. guix/nar.scm \
  49. guix/derivations.scm \
  50. guix/grafts.scm \
  51. guix/gnu-maintenance.scm \
  52. guix/upstream.scm \
  53. guix/licenses.scm \
  54. guix/graph.scm \
  55. guix/cve.scm \
  56. guix/zlib.scm \
  57. guix/build-system.scm \
  58. guix/build-system/ant.scm \
  59. guix/build-system/cmake.scm \
  60. guix/build-system/emacs.scm \
  61. guix/build-system/glib-or-gtk.scm \
  62. guix/build-system/gnu.scm \
  63. guix/build-system/haskell.scm \
  64. guix/build-system/perl.scm \
  65. guix/build-system/python.scm \
  66. guix/build-system/waf.scm \
  67. guix/build-system/r.scm \
  68. guix/build-system/ruby.scm \
  69. guix/build-system/trivial.scm \
  70. guix/ftp-client.scm \
  71. guix/http-client.scm \
  72. guix/gnupg.scm \
  73. guix/elf.scm \
  74. guix/store.scm \
  75. guix/cvs-download.scm \
  76. guix/svn-download.scm \
  77. guix/ui.scm \
  78. guix/build/ant-build-system.scm \
  79. guix/build/download.scm \
  80. guix/build/cmake-build-system.scm \
  81. guix/build/emacs-build-system.scm \
  82. guix/build/git.scm \
  83. guix/build/hg.scm \
  84. guix/build/glib-or-gtk-build-system.scm \
  85. guix/build/gnu-build-system.scm \
  86. guix/build/gnu-dist.scm \
  87. guix/build/perl-build-system.scm \
  88. guix/build/python-build-system.scm \
  89. guix/build/r-build-system.scm \
  90. guix/build/ruby-build-system.scm \
  91. guix/build/waf-build-system.scm \
  92. guix/build/haskell-build-system.scm \
  93. guix/build/store-copy.scm \
  94. guix/build/utils.scm \
  95. guix/build/union.scm \
  96. guix/build/profiles.scm \
  97. guix/build/pull.scm \
  98. guix/build/rpath.scm \
  99. guix/build/cvs.scm \
  100. guix/build/svn.scm \
  101. guix/build/gremlin.scm \
  102. guix/build/emacs-utils.scm \
  103. guix/build/graft.scm \
  104. guix/build/bournish.scm \
  105. guix/search-paths.scm \
  106. guix/packages.scm \
  107. guix/import/utils.scm \
  108. guix/import/gnu.scm \
  109. guix/import/snix.scm \
  110. guix/import/cabal.scm \
  111. guix/import/cran.scm \
  112. guix/import/hackage.scm \
  113. guix/import/elpa.scm \
  114. guix/scripts.scm \
  115. guix/scripts/download.scm \
  116. guix/scripts/build.scm \
  117. guix/scripts/archive.scm \
  118. guix/scripts/import.scm \
  119. guix/scripts/package.scm \
  120. guix/scripts/gc.scm \
  121. guix/scripts/hash.scm \
  122. guix/scripts/pull.scm \
  123. guix/scripts/substitute.scm \
  124. guix/scripts/authenticate.scm \
  125. guix/scripts/refresh.scm \
  126. guix/scripts/system.scm \
  127. guix/scripts/lint.scm \
  128. guix/scripts/challenge.scm \
  129. guix/scripts/import/cran.scm \
  130. guix/scripts/import/gnu.scm \
  131. guix/scripts/import/nix.scm \
  132. guix/scripts/import/hackage.scm \
  133. guix/scripts/import/elpa.scm \
  134. guix/scripts/environment.scm \
  135. guix/scripts/publish.scm \
  136. guix/scripts/edit.scm \
  137. guix/scripts/size.scm \
  138. guix/scripts/graph.scm \
  139. guix/scripts/container.scm \
  140. guix/scripts/container/exec.scm \
  141. guix.scm \
  142. $(GNU_SYSTEM_MODULES)
  143. if HAVE_GUILE_JSON
  144. MODULES += \
  145. guix/import/github.scm \
  146. guix/import/json.scm \
  147. guix/import/pypi.scm \
  148. guix/scripts/import/pypi.scm \
  149. guix/import/cpan.scm \
  150. guix/scripts/import/gem.scm \
  151. guix/import/gem.scm
  152. endif
  153. if BUILD_SYSCALLS_MODULE
  154. MODULES += \
  155. guix/build/syscalls.scm
  156. endif
  157. if BUILD_DAEMON_OFFLOAD
  158. MODULES += \
  159. guix/scripts/offload.scm
  160. endif BUILD_DAEMON_OFFLOAD
  161. # Internal module with test suite support.
  162. dist_noinst_DATA = guix/tests.scm
  163. # Linux-Libre configurations.
  164. KCONFIGS = \
  165. gnu/packages/linux-libre-4.6-i686.conf \
  166. gnu/packages/linux-libre-4.6-x86_64.conf \
  167. gnu/packages/linux-libre-4.4-i686.conf \
  168. gnu/packages/linux-libre-4.4-x86_64.conf \
  169. gnu/packages/linux-libre-4.1-i686.conf \
  170. gnu/packages/linux-libre-4.1-x86_64.conf
  171. # Templates, examples.
  172. EXAMPLES = \
  173. gnu/system/examples/bare-bones.tmpl \
  174. gnu/system/examples/desktop.tmpl \
  175. gnu/system/examples/lightweight-desktop.tmpl
  176. GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go
  177. nobase_dist_guilemodule_DATA = \
  178. $(MODULES) $(KCONFIGS) $(EXAMPLES) \
  179. $(MISC_DISTRO_FILES)
  180. nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
  181. # Do we need to provide our own non-broken (srfi srfi-37) module?
  182. if INSTALL_SRFI_37
  183. nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm
  184. GOBJECTS += srfi/srfi-37.go
  185. srfi/srfi-37.scm: srfi/srfi-37.scm.in
  186. $(MKDIR_P) srfi
  187. cp "$<" "$@"
  188. endif INSTALL_SRFI_37
  189. # Handy way to remove the .go files without removing all the rest.
  190. clean-go:
  191. -$(RM) -f $(GOBJECTS)
  192. # Test extensions; has to be unconditional.
  193. TEST_EXTENSIONS = .scm .sh
  194. if CAN_RUN_TESTS
  195. SCM_TESTS = \
  196. tests/base32.scm \
  197. tests/base64.scm \
  198. tests/cpio.scm \
  199. tests/hash.scm \
  200. tests/pk-crypto.scm \
  201. tests/pki.scm \
  202. tests/sets.scm \
  203. tests/gnu-maintenance.scm \
  204. tests/substitute.scm \
  205. tests/builders.scm \
  206. tests/derivations.scm \
  207. tests/grafts.scm \
  208. tests/ui.scm \
  209. tests/records.scm \
  210. tests/upstream.scm \
  211. tests/combinators.scm \
  212. tests/utils.scm \
  213. tests/build-utils.scm \
  214. tests/packages.scm \
  215. tests/snix.scm \
  216. tests/hackage.scm \
  217. tests/cran.scm \
  218. tests/elpa.scm \
  219. tests/store.scm \
  220. tests/monads.scm \
  221. tests/gexp.scm \
  222. tests/nar.scm \
  223. tests/union.scm \
  224. tests/profiles.scm \
  225. tests/syscalls.scm \
  226. tests/gremlin.scm \
  227. tests/bournish.scm \
  228. tests/lint.scm \
  229. tests/publish.scm \
  230. tests/scripts.scm \
  231. tests/size.scm \
  232. tests/graph.scm \
  233. tests/challenge.scm \
  234. tests/cve.scm \
  235. tests/zlib.scm \
  236. tests/file-systems.scm \
  237. tests/system.scm \
  238. tests/services.scm \
  239. tests/scripts-build.scm \
  240. tests/containers.scm \
  241. tests/import-utils.scm
  242. if HAVE_GUILE_JSON
  243. SCM_TESTS += \
  244. tests/pypi.scm \
  245. tests/cpan.scm \
  246. tests/gem.scm
  247. endif
  248. SH_TESTS = \
  249. tests/guix-build.sh \
  250. tests/guix-download.sh \
  251. tests/guix-gc.sh \
  252. tests/guix-hash.sh \
  253. tests/guix-package.sh \
  254. tests/guix-package-net.sh \
  255. tests/guix-system.sh \
  256. tests/guix-archive.sh \
  257. tests/guix-authenticate.sh \
  258. tests/guix-environment.sh \
  259. tests/guix-environment-container.sh \
  260. tests/guix-graph.sh \
  261. tests/guix-lint.sh
  262. if BUILD_DAEMON
  263. SH_TESTS += tests/guix-register.sh
  264. endif BUILD_DAEMON
  265. TESTS = $(SCM_TESTS) $(SH_TESTS)
  266. AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" GUILE_AUTO_COMPILE=0
  267. SCM_LOG_DRIVER = \
  268. $(top_builddir)/test-env --quiet-stderr \
  269. $(GUILE) --no-auto-compile -e main \
  270. $(top_srcdir)/build-aux/test-driver.scm
  271. AM_SCM_LOG_DRIVER_FLAGS = --brief=yes
  272. SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
  273. AM_SH_LOG_FLAGS = -x -e
  274. # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it
  275. # could end up removing files from the store while they are being used by
  276. # other instances of the daemon.
  277. tests/guix-gc.log: \
  278. $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
  279. $(SCM_TESTS:%.scm=%.log)
  280. else !CAN_RUN_TESTS
  281. TESTS =
  282. SH_TESTS =
  283. SCM_TESTS =
  284. # Automake always generates a 'check' target, so better not override it.
  285. check-local:
  286. @echo
  287. @echo "Cannot run tests because file name limits would be exceeded." >&2
  288. @echo "Look for 'length' in the 'config.log' file for details." >&2
  289. @echo
  290. @exit 1
  291. endif !CAN_RUN_TESTS
  292. check-system: $(GOBJECTS)
  293. $(AM_V_at)$(top_builddir)/pre-inst-env \
  294. $(GUILE) --no-auto-compile \
  295. -e '(@@ (run-system-tests) run-system-tests)' \
  296. $(top_srcdir)/build-aux/run-system-tests.scm
  297. # Public key used to sign substitutes from hydra.gnu.org.
  298. dist_pkgdata_DATA = hydra.gnu.org.pub
  299. # Bash completion file.
  300. dist_bashcompletion_DATA = etc/completion/bash/guix
  301. EXTRA_DIST = \
  302. HACKING \
  303. ROADMAP \
  304. TODO \
  305. CODE-OF-CONDUCT \
  306. .dir-locals.el \
  307. build-aux/build-self.scm \
  308. build-aux/compile-all.scm \
  309. build-aux/hydra/evaluate.scm \
  310. build-aux/hydra/gnu-system.scm \
  311. build-aux/hydra/demo-os.scm \
  312. build-aux/hydra/guix.scm \
  313. build-aux/check-available-binaries.scm \
  314. build-aux/check-final-inputs-self-contained.scm \
  315. build-aux/download.scm \
  316. build-aux/make-binary-tarball.scm \
  317. build-aux/generate-authors.scm \
  318. build-aux/test-driver.scm \
  319. build-aux/run-system-tests.scm \
  320. srfi/srfi-37.scm.in \
  321. srfi/srfi-64.scm \
  322. srfi/srfi-64.upstream.scm \
  323. tests/test.drv \
  324. tests/signing-key.pub \
  325. tests/signing-key.sec \
  326. tests/cve-sample.xml \
  327. build-aux/config.rpath \
  328. bootstrap \
  329. release.nix \
  330. $(TESTS)
  331. if !BUILD_DAEMON_OFFLOAD
  332. EXTRA_DIST += \
  333. guix/scripts/offload.scm
  334. endif !BUILD_DAEMON_OFFLOAD
  335. if !BUILD_SYSCALLS_MODULE
  336. EXTRA_DIST += \
  337. guix/build/syscalls.scm
  338. endif !BUILD_SYSCALLS_MODULE
  339. CLEANFILES = \
  340. $(GOBJECTS) \
  341. $(SCM_TESTS:tests/%.scm=%.log)
  342. # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if
  343. # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
  344. # there that are newer than the local .scm files (for instance because the
  345. # user ran 'make install' recently). When that happens, we end up loading
  346. # those previously-installed .go files, which may be stale, thereby breaking
  347. # the whole thing.
  348. %.go: make-go ; @:
  349. make-go: $(MODULES) guix/config.scm guix/tests.scm
  350. $(AM_V_at)echo "Compiling Scheme modules..." ; \
  351. unset GUILE_LOAD_COMPILED_PATH ; \
  352. host=$(host) srcdir="$(top_srcdir)" \
  353. $(top_builddir)/pre-inst-env \
  354. $(GUILE) -L "$(top_builddir)" -L "$(top_srcdir)" \
  355. --no-auto-compile \
  356. -s "$(top_srcdir)"/build-aux/compile-all.scm $^
  357. SUFFIXES = .go
  358. # Make sure source files are installed first, so that the mtime of
  359. # installed compiled files is greater than that of installed source
  360. # files. See
  361. # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
  362. # for details.
  363. guix_install_go_files = install-nobase_nodist_guilemoduleDATA
  364. $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
  365. # The above trick doesn't work for 'config.go' because both 'config.scm' and
  366. # 'config.go' are listed in $(nobase_nodist_guilemodule_DATA). Thus, give it
  367. # special treatment.
  368. install-data-hook: set-bootstrap-executable-permissions
  369. touch "$(DESTDIR)$(guilemoduledir)/guix/config.go"
  370. SUBDIRS = po/guix po/packages
  371. BUILT_SOURCES =
  372. include doc/local.mk
  373. if BUILD_DAEMON
  374. include nix/local.mk
  375. endif BUILD_DAEMON
  376. ACLOCAL_AMFLAGS = -I m4
  377. # Pass an explicit '--localstatedir' so that configure does not error out if
  378. # it finds an existing installation with a different localstatedir.
  379. AM_DISTCHECK_CONFIGURE_FLAGS = \
  380. --localstatedir="$$dc_install_base/var" \
  381. --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
  382. --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
  383. --with-nix-prefix="$(NIX_PREFIX)" \
  384. --enable-daemon
  385. dist_emacsui_DATA = emacs/guix-main.scm
  386. nodist_emacsui_DATA = emacs/guix-helper.scm
  387. include emacs/local.mk
  388. # The self-contained tarball.
  389. guix-binary.%.tar.xz:
  390. $(AM_V_GEN)GUIX_PACKAGE_PATH= \
  391. $(top_builddir)/pre-inst-env "$(GUILE)" \
  392. "$(top_srcdir)/build-aux/make-binary-tarball.scm" "$*" "$@"
  393. dist-hook: sync-descriptions gen-ChangeLog gen-AUTHORS
  394. dist-hook: assert-no-store-file-names
  395. distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
  396. sync-descriptions:
  397. $(AM_V_at)GUIX_PACKAGE_PATH= \
  398. $(top_builddir)/pre-inst-env guix lint --checkers=gnu-description
  399. gen-ChangeLog:
  400. $(AM_V_GEN)if test -d .git; then \
  401. $(top_srcdir)/build-aux/gitlog-to-changelog \
  402. > $(distdir)/cl-t; \
  403. rm -f $(distdir)/ChangeLog; \
  404. mv $(distdir)/cl-t $(distdir)/ChangeLog; \
  405. fi
  406. gen-AUTHORS:
  407. $(AM_V_GEN)if test -d .git; then \
  408. rm -f "$(distdir)/AUTHORS"; \
  409. $(top_builddir)/pre-inst-env "$(GUILE)" \
  410. "$(top_srcdir)/build-aux/generate-authors.scm" \
  411. "$(top_srcdir)" "$(distdir)/AUTHORS"; \
  412. fi
  413. # Make sure we're not shipping a file that embeds a local /gnu/store file name.
  414. assert-no-store-file-names:
  415. $(AM_V_at)if grep -r --exclude=*.texi --exclude=*.info \
  416. "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
  417. then \
  418. echo "error: store file names embedded in the distribution" >&2 ; \
  419. exit 1 ; \
  420. fi
  421. # Make sure hydra.gnu.org has the important binaries.
  422. assert-binaries-available: $(GOBJECTS)
  423. $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \
  424. "$(top_srcdir)/build-aux/check-available-binaries.scm"
  425. # Make sure the final inputs don't refer to bootstrap tools.
  426. assert-final-inputs-self-contained: $(GOBJECTS)
  427. $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \
  428. "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
  429. # Compute the Hydra jobs and write them in the target file.
  430. hydra-jobs.scm: $(GOBJECTS)
  431. $(AM_V_at)$(MKDIR_P) "`dirname "$@"`"
  432. $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \
  433. "$(top_srcdir)/build-aux/hydra/evaluate.scm" \
  434. "$(top_srcdir)/build-aux/hydra/gnu-system.scm" > "$@.tmp"
  435. $(AM_V_at)mv "$@.tmp" "$@"
  436. .PHONY: sync-descriptions gen-ChangeLog gen-AUTHORS clean-go make-go
  437. .PHONY: assert-no-store-file-names assert-binaries-available
  438. .PHONY: assert-final-inputs-self-contained
  439. ## -------------- ##
  440. ## Silent rules. ##
  441. ## -------------- ##
  442. AM_V_DL = $(AM_V_DL_$(V))
  443. AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY))
  444. AM_V_DL_0 = @echo " DL " $@;
  445. AM_V_DOT = $(AM_V_DOT_$(V))
  446. AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY))
  447. AM_V_DOT_0 = @echo " DOT " $@;
  448. AM_V_EMACS = $(AM_V_EMACS_$(V))
  449. AM_V_EMACS_ = $(AM_V_EMACS_$(AM_DEFAULT_VERBOSITY))
  450. AM_V_EMACS_0 = @echo " EMACS " $@;
  451. AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V))
  452. AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY))
  453. AM_V_HELP2MAN_0 = @echo " HELP2MAN" $@;