Commit Graph

391 Commits

Author SHA1 Message Date
Ludovic Courtès 47e99e626b
daemon: Remove traces of 'NIX_ROOT_FINDER'.
This is a followup to 2e3e5d2198.

* build-aux/test-env.in: Remove mentions of 'NIX_ROOT_FINDER'.
* nix/libstore/gc.cc (LocalStore::collectGarbage): Adjust comment
accordingly.
2019-10-16 22:53:40 +02:00
Ludovic Courtès 82f903e70f
daemon: Remove 'NIX_LIBEXEC_DIR'.
* nix/libstore/globals.hh (Settings)[nixLibexecDir]: Remove.
* nix/libstore/globals.cc (Settings::processEnvironment): Remove
reference to 'nixLibexecDir'.
* nix/local.mk (libstore_a_CPPFLAGS): Remove -DNIX_LIBEXEC_DIR flag.
* build-aux/pre-inst-env.in: Remove references to 'NIX_LIBEXEC_DIR'.
2019-09-08 11:49:24 +02:00
Ludovic Courtès bc69ea2d60
daemon: Run 'guix offload' directly.
* nix/scripts/offload.in: Remove.
* nix/local.mk (nodist_pkglibexec_SCRIPTS) [BUILD_DAEMON_OFFLOAD]:
Remove 'scripts/offload'.
* config-daemon.ac: Don't output 'nix/scripts/offload'.
* build-aux/pre-inst-env.in: Don't set 'NIX_BUILD_HOOK'.
* nix/libstore/build.cc (HookInstance::HookInstance): Run 'guix
offload'.
(DerivationGoal::tryBuildHook): Remove reference to 'NIX_BUILD_HOOK'.
* nix/nix-daemon/guix-daemon.cc (main) [HAVE_DAEMON_OFFLOAD_HOOK]: Don't
set 'NIX_BUILD_HOOK'.
* nix/nix-daemon/nix-daemon.cc (performOp) [!HAVE_DAEMON_OFFLOAD_HOOK]:
Leave 'settings.useBuildHook' unchanged.
2019-09-08 11:49:24 +02:00
Ludovic Courtès 2e3e5d2198
daemon: Invoke 'guix gc --list-busy' instead of 'list-runtime-roots'.
* nix/scripts/list-runtime-roots.in: Remove.
* guix/store/roots.scm (%proc-directory): New variable.
(proc-file-roots, proc-exe-roots, proc-cwd-roots)
(proc-fd-roots, proc-maps-roots, proc-environ-roots)
(referenced-files, canonicalize-store-item, busy-store-items): New
procedures, taken from 'list-runtime-roots.in'.
* nix/libstore/globals.hh (Settings)[guixProgram]: New field.
* nix/libstore/globals.cc (Settings::processEnvironment): Initialize
'guixProgram'.
* nix/libstore/gc.cc (addAdditionalRoots): Drop code related to
'NIX_ROOT_FINDER'.  Run "guix gc --list-busy".
* nix/local.mk (nodist_pkglibexec_SCRIPTS): Remove
'scripts/list-runtime-roots'.
* config-daemon.ac: Don't output nix/scripts/list-runtime-roots.
* build-aux/pre-inst-env.in: Don't set 'NIX_ROOT_FINDER'.
Set 'GUIX'.
* doc/guix.texi (Invoking guix gc): Document '--list-busy'.
* guix/scripts/gc.scm (show-help, %options): Add "--list-busy".
(guix-gc)[list-busy]: New procedure.
Handle the 'list-busy' action.
2019-09-08 11:49:24 +02:00
Tobias Geerinckx-Rice 3fb3291e25
Use more guix.gnu.org.
* build-aux/build-self.scm (make-config.scm): Replace gnu.org/s/guix with guix.gnu.org.
* guix/scripts/publish.scm (render-home-page): Likewise.
* guix/self.scm (make-config.scm): Likewise.
2019-07-16 23:00:10 +02:00
Ludovic Courtès ee700da584
build: Report build errors via 'report-load-error'.
* build-aux/compile-all.scm: Wrap 'compile-files' call in 'catch'.
Attempt to resort to 'report-load-error' in (guix ui) to print the
error.
2019-06-25 17:41:24 +02:00
Ludovic Courtès 996ecaf64e
maint: update-NEWS: Track "gcc-toolchain", not "gcc".
This is a followup to d78010b81e.

* build-aux/update-NEWS.scm (write-packages-updates)[important]: Replace
"gcc" by "gcc-toolchain".
2019-05-20 11:50:21 +02:00
Ludovic Courtès 762ba22efe
maint: 'check-available-binaries' checks for more packages.
Fixes <https://bugs.gnu.org/35539>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

* build-aux/check-available-binaries.scm (packages-for-system): New procedure.
<top level>: Use it.
2019-05-16 18:50:20 +02:00
Ludovic Courtès e0244eb7a2
build-self: Let HOME pass through the execution environment.
This is a followup to 48d498c2c3, which
introduced a typo (missing '->' in 'mlet'.)

Fixes <https://bugs.gnu.org/35623>.
Reported by Karrick McDermott <kmcdermott@linkedin.com>.

* build-aux/build-self.scm (build): Add 'getenv' and 'setenv' calls for
HOME.
2019-05-12 22:56:57 +02:00
Tobias Geerinckx-Rice cbe7c99e71
Revert "build-self: Let HOME pass through the execution environment."
This reverts commit 48d498c2c3.
It breaks ‘guix pull’.
2019-05-11 23:35:32 +02:00
Ludovic Courtès 48d498c2c3
build-self: Let HOME pass through the execution environment.
Fixes <https://bugs.gnu.org/35623>.
Reported by Karrick McDermott <kmcdermott@linkedin.com>.

* build-aux/build-self.scm (build): Add 'getenv' and 'setenv' calls for
HOME.
2019-05-11 20:10:26 +02:00
Ludovic Courtès 04fa9c62d9
build-self: Explain why we keep using deprecated bindings.
* build-aux/build-self.scm (build): Add comment regarding the deprecated
names.
2019-04-23 16:39:00 +02:00
Ludovic Courtès ffc8ab75f1
Revert "build-self: Avoid deprecated bindings."
This reverts commit fa9e6e8b67.

By using the new bindings, we would prevent users of Guix prior to
de9fbe9cdc, such as version 0.16.0, to
upgrade to current master.  Thus, we will keep using the old names for a
while.
2019-04-23 00:47:41 +02:00
Mark H Weaver fa9e6e8b67
build-self: Avoid deprecated bindings.
* build-aux/build-self.scm (build): Replace references to nix-server-*
with store-connection-*.
2019-04-22 14:58:16 -04:00
Ludovic Courtès 04b5ac212f
build: Show completion percentage while building.
* build-aux/compile-all.scm (%): New procedure.
(command-line): Use it to report completion.
2019-04-19 17:46:40 +02:00
Ludovic Courtès ab77b69eca
self: Remove unused variable.
This variable is unused since commit
45779fa676.

* guix/self.scm (%dependency-variables): Remove.
* build-aux/build-self.scm (%dependency-variables): Remove.
2019-04-17 11:53:53 +02:00
Ludovic Courtès ec8bc4a34e
build-self: Disable position recording.
'guix pull -n' goes roughly from 40s to 35s.

* build-aux/build-self.scm (build-program): Add call to 'read-disable'.
2019-03-26 18:11:52 +01:00
Ludovic Courtès 2637cfd7a4
Avoid name clash with 'build' from (guix store) and (guix status).
Since commit 976ef2d978, (guix status)
exports 'build', which clashes with 'build' from (guix store).

* build-aux/run-system-tests.scm: Select 'with-status-verbosity'
from (guix status).
* guix/scripts/archive.scm: Likewise.
* guix/scripts/build.scm: Likewise.
* guix/scripts/copy.scm: Likewise.
* guix/scripts/environment.scm: Likewise.
* guix/scripts/pack.scm: Likewise.
* guix/scripts/package.scm: Likewise.
* guix/scripts/pull.scm: Likewise.
* guix/scripts/system.scm: Likewise.
2019-02-11 23:23:28 +01:00
Ludovic Courtès 959eaa1eb8
daemon: Add "/guix" to default 'nixLibexecDir'.
This makes it easier to run the uninstalled daemon.

* nix/local.mk (libstore_a_CPPFLAGS): Append "/guix" to
NIX_LIBEXEC_DIR.
* build-aux/pre-inst-env.in (NIX_LIBEXEC_DIR): Adjust comment.
* nix/libstore/builtins.cc (builtinDownload): Remove SUBDIR and its
use.
* nix/libstore/local-store.cc (runAuthenticationProgram): Ditto.
* nix/libstore/gc.cc (addAdditionalRoots): Remove "/guix" prefix.
* nix/nix-daemon/guix-daemon.cc (main): Ditto.
2019-02-04 16:20:01 +01:00
Ludovic Courtès 4d4a38f620
daemon: Remove the 'NIX_SUBSTITUTERS' environment variable.
* nix/libstore/globals.cc (Settings:update): Remove changes to
'substituters'.
* nix/nix-daemon/guix-daemon.cc (main): Set 'settings.substituters'
directly instead of changing the 'NIX_SUBSTITUTERS' environment variable.
* build-aux/pre-inst-env.in: Remove reference to 'NIX_SUBSTITUTERS'.
2019-02-04 16:20:01 +01:00
Ludovic Courtès a87d66f371
daemon: Rename 'NIX_STATE_DIR' and 'NIX_DB_DIR' environment variables.
Fixes <https://bugs.gnu.org/22459>.
Reported by Jeff Mickey <j@codemac.net>.

* guix/config.scm.in (%state-directory): Change NIX_STATE_DIR to
GUIX_STATE_DIRECTORY.
(%store-database-directory): Change NIX_DB_DIR to
GUIX_DATABASE_DIRECTORY.
* nix/libstore/globals.cc (Settings::processEnvironment): Likewise.
* guix/self.scm (make-config.scm): Likewise.
* build-aux/build-self.scm (make-config.scm): Likewise.
* build-aux/test-env.in: Likewise.
* tests/derivations.scm ("derivation #:leaked-env-vars"): Likewise.
* tests/guix-build.sh (GUIX_DAEMON_SOCKET): Likewise.
* tests/guix-daemon.sh (socket): Likewise.
2019-02-04 00:03:30 +01:00
Ludovic Courtès f9e8a12379
store: Rename '&nix-error' to '&store-error'.
* guix/store.scm (&nix-error): Rename to...
(&store-error): ... this, and adjust users.
(&nix-connection-error): Rename to...
(&store-connection-error): ... this, and adjust users.
(&nix-protocol-error): Rename to...
(&store-protocol-error): ... this, adjust users.
(&nix-error, &nix-connection-error, &nix-protocol-error): Define these
condition types and their getters as deprecrated aliases.
* build-aux/run-system-tests.scm, guix/derivations.scm,
guix/grafts.scm, guix/scripts/challenge.scm,
guix/scripts/graph.scm, guix/scripts/lint.scm,
guix/scripts/offload.scm, guix/serialization.scm,
guix/ssh.scm, guix/tests.scm, guix/ui.scm,
tests/derivations.scm, tests/gexp.scm, tests/guix-daemon.sh,
tests/packages.scm, tests/store.scm, doc/guix.texi: Adjust to use the
new names.
2019-01-21 23:09:55 +01:00
Ludovic Courtès e9dfa4d839
build-self: Execute trampoline in a clean environment.
Previously execution of the trampoline would be somewhat sensitive to
GUILE_LOAD_PATH & co., for example.

* build-aux/build-self.scm (build-program): Remove 'unsetenv' call and
%LOAD-COMPILED-PATH hack.
(call-with-clean-environment): New procedure.
(with-clean-environment): New macro.
(build): Wrap 'open-pipe*' call in 'with-clean-environment'.
2019-01-21 10:19:32 +01:00
Ludovic Courtès 7804c45b9c
status: Add 'with-status-verbosity'.
* guix/status.scm (logger-for-level, call-with-status-verbosity): New
procedures.
(with-status-verbosity): New macro.
* guix/scripts/environment.scm (guix-environment): Use
'with-status-verbosity' instead of 'with-status-report'.
* guix/scripts/pack.scm (guix-pack): Likewise.
* guix/scripts/package.scm (guix-package): Likewise.
* guix/scripts/pull.scm (guix-pull): Likewise.
* guix/scripts/system.scm (guix-system): Likewise.
* build-aux/run-system-tests.scm (run-system-tests): Likewise.
2019-01-11 12:14:38 +01:00
Ludovic Courtès c108c46fb4
build-self: Spin only on TTYs.
* build-aux/build-self.scm (build-program): Spin only when 'isatty?'
returns true.
2019-01-08 18:38:15 +01:00
Ludovic Courtès b5f8c2c885
hydra: Compute jobs in an inferior.
Previously we would rely on auto-compilation of all the Guix modules.
The complete evaluation would take ~15mn on berlin.guixsd.org and
require lots of RAM.  This approach should be faster since potentially
only part of the modules are rebuilt.  Furthermore, as a side-effect, it
builds the derivations that 'guix pull' uses.

* build-aux/hydra/gnu-system.scm: Remove 'eval-when' form.
(hydra-jobs): New procedure.
* gnu/ci.scm (package->alist, qemu-jobs, system-test-jobs)
(tarball-jobs): Return strings for the 'license' field.
* guix/self.scm (compiled-guix)[*cli-modules*]: Add (gnu ci).
2019-01-06 21:41:07 +01:00
Ludovic Courtès 65ff85dcee
hydra: evaluate: Add the checkout to the store.
* build-aux/hydra/evaluate.scm <top level>: Add call to 'add-to-store'.
Use that as the 'file-name' attribute.  Call 'primitive-load' in a
directory excursion to SOURCE.
2019-01-06 21:41:07 +01:00
Ludovic Courtès 59fb5c1cdb
hydra: Move job definitions to (gnu ci).
* build-aux/hydra/gnu-system.scm: Move code to...
* gnu/ci.scm: ... here.  New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
2019-01-06 21:41:07 +01:00
Ludovic Courtès afb82831fa
build-self: Don't clobber the output port.
The newline is meant to follow the spinner's traces so it must go to the
error port as well.

* build-aux/build-self.scm (build): Send newline to the error port.
2019-01-06 21:41:07 +01:00
Ludovic Courtès dd8356e3c6
hydra: Use short timeouts for the QEMU jobs and system tests.
These builds shouldn't take too long.  Sometimes the guest kernel
crashes and the VM gets stuck; we should be able to terminate those jobs
quickly.

* build-aux/hydra/gnu-system.scm (qemu-jobs)[->alist]: Add
'max-silent-time' and 'timeout'.
(system-test-jobs)[test->thunk]: Likewise.
2018-12-29 01:05:17 +01:00
Danny Milosavljevic 07c791c110
hydra: Increase image sizes for USB image and Flash image.
* build-aux/hydra/gnu-system.scm (qemu-jobs) <usb-image>: Increase from
1024 MiB to 1500 MiB.
<flash-image>: Increase from 1024 MiB to 1500 MiB.
2018-12-09 00:49:54 +01:00
Ludovic Courtès 6eac835f17
maint: update-guix-package: Really register GC roots.
Previously we'd pass a relative file name to 'add-indirect-root', which
the daemon would interpret as relative to "/".  Consequently, checkouts
were not protected from GC.

* build-aux/update-guix-package.scm (main): Pass an absolute file name
to 'add-indirect-root'.
2018-12-07 15:14:12 +01:00
Ludovic Courtès e3c03952be
maint: update-NEWS: Don't produce full package lists.
The lists of new and upgraded packages in 'NEWS' had become way too long
and redundant with what 'guix pull' reports.

* build-aux/update-NEWS.scm (write-packages-added): Don't print ADDED.
(write-packages-updates)[important, table, latest, noteworthy]: New
variables.
Print NOTEWORTHY rather than all of UPGRADED.
(main): Print PREVIOUS-VERSION and NEW-VERSION.
2018-12-05 00:08:34 +01:00
Ludovic Courtès 0bc02becca
Remove most references to hydra.gnu.org.
* Makefile.am (assert-binaries-available): Don't mention hydra.gnu.org
in comment.
* build-aux/check-available-binaries.scm: Likewise.
* build-aux/check-final-inputs-self-contained.scm: Likewise.
* doc/guix.texi (SUBSTITUTE-SERVER): New variable.
Use it throughout instead of "mirror.hydra.gnu.org".
* doc/contributing.texi (Submitting Patches): Likewise.
* gnu/services/base.scm (hydra-key-authorization)
(guix-activation): Remove mentions of "hydra.gnu.org" in comments and
messages.
* gnu/system/install.scm (%installation-services): Likewise.
* guix/scripts/size.scm (guix-size): Likewise.
2018-12-04 10:57:56 +01:00
Marius Bakke d02bb02f7d
Merge branch 'master' into core-updates 2018-10-17 20:47:11 +02:00
Ludovic Courtès 276f368051
tests: "make check-system" produces colored output.
* build-aux/run-system-tests.scm (run-system-tests): Use 'with-status-report'.
2018-10-09 18:54:12 +02:00
Marius Bakke 2817ac3c18
Merge branch 'master' into core-updates 2018-09-20 13:37:58 +02:00
Clément Lassieur 6ffffb3c96
hydra: Remove useless 'parameterize'.
* build-aux/hydra/gnu-system.scm (manifests->packages): Remove 'parameterize'.
2018-09-14 09:01:07 +02:00
Leo Famulari d763940711
Merge branch 'master' into core-updates 2018-09-13 13:32:39 -04:00
Ludovic Courtès ac4d2ec81a
build-self: Emit a useful message upon error.
* build-aux/build-self.scm (build): Raise a '&message' condition instead
of calling 'error'.
2018-09-13 10:29:59 +02:00
Ludovic Courtès 78c9058dde
build-self: Add a dummy (git) module to 'compute-guix-derivation'.
Fixes a regression introduced in
aed0a59405.

* build-aux/build-self.scm (build-program)[fake-git]: New variable.
Use it as an imported module.
2018-09-13 10:29:59 +02:00
Clément Lassieur 88bfabf111
hydra: Add support for manifests.
* build-aux/hydra/gnu-system.scm (arguments->manifests, manifests->packages):
New procedures.
(hydra-jobs): Add a "manifests" subset.
* doc/guix.texi (Continuous Integration): Update accordingly.
2018-09-13 10:15:04 +02:00
Marius Bakke 0aeb134850
Merge branch 'master' into core-updates 2018-09-09 17:40:35 +02:00
Ludovic Courtès 3ffcad7df3
build-self: Accomodate upgrades from May 2016 and earlier.
Reported by Paul Garlick <pgarlick@tourbillion-technology.com>.

Fixes a bug whereby "old" Guix instances (before mid-May 2018) would
fail to pull to current master.

Specifically, Paul reported being unable to upgrade from
6f84dc4314 (a commit that predates that
addition of the 'bootstrap' phase on gnu-build-system on 'master' and
that also predates the new 'guix pull'.)

* build-aux/build-self.scm (guile-gcrypt)[arguments]: New field.
2018-09-06 12:01:39 +02:00
Ludovic Courtès ca71942445
Switch to Guile-Gcrypt.
This removes (guix hash) and (guix pk-crypto), which now live as part of
Guile-Gcrypt (version 0.1.0.)

* guix/gcrypt.scm, guix/hash.scm, guix/pk-crypto.scm,
tests/hash.scm, tests/pk-crypto.scm: Remove.
* configure.ac: Test for Guile-Gcrypt.  Remove LIBGCRYPT and
LIBGCRYPT_LIBDIR assignments.
* m4/guix.m4 (GUIX_ASSERT_LIBGCRYPT_USABLE): Remove.
* README: Add Guile-Gcrypt to the dependencies; move libgcrypt as
"required unless --disable-daemon".
* doc/guix.texi (Requirements): Likewise.
* gnu/packages/bash.scm, guix/derivations.scm, guix/docker.scm,
guix/git.scm, guix/http-client.scm, guix/import/cpan.scm,
guix/import/cran.scm, guix/import/crate.scm, guix/import/elpa.scm,
guix/import/gnu.scm, guix/import/hackage.scm,
guix/import/texlive.scm, guix/import/utils.scm, guix/nar.scm,
guix/pki.scm, guix/scripts/archive.scm,
guix/scripts/authenticate.scm, guix/scripts/download.scm,
guix/scripts/hash.scm, guix/scripts/pack.scm,
guix/scripts/publish.scm, guix/scripts/refresh.scm,
guix/scripts/substitute.scm, guix/store.scm,
guix/store/deduplication.scm, guix/tests.scm, tests/base32.scm,
tests/builders.scm, tests/challenge.scm, tests/cpan.scm,
tests/crate.scm, tests/derivations.scm, tests/gem.scm,
tests/nar.scm, tests/opam.scm, tests/pki.scm,
tests/publish.scm, tests/pypi.scm, tests/store-deduplication.scm,
tests/store.scm, tests/substitute.scm: Adjust imports.
* gnu/system/vm.scm: Likewise.
(guile-sqlite3&co): Rename to...
(gcrypt-sqlite3&co): ... this.  Add GUILE-GCRYPT.
(expression->derivation-in-linux-vm)[config]: Remove.
(iso9660-image)[config]: Remove.
(qemu-image)[config]: Remove.
(system-docker-image)[config]: Remove.
* guix/scripts/pack.scm: Adjust imports.
(guile-sqlite3&co): Rename to...
(gcrypt-sqlite3&co): ... this.  Add GUILE-GCRYPT.
(self-contained-tarball)[build]: Call 'make-config.scm' without
 #:libgcrypt argument.
(squashfs-image)[libgcrypt]: Remove.
[build]: Call 'make-config.scm' without #:libgcrypt.
(docker-image)[config, json]: Remove.
[build]: Add GUILE-GCRYPT to the extensions  Remove (guix config) from
the imported modules.
* guix/self.scm (specification->package): Remove "libgcrypt", add
"guile-gcrypt".
(compiled-guix): Remove #:libgcrypt.
[guile-gcrypt]: New variable.
[dependencies]: Add it.
[*core-modules*]: Remove #:libgcrypt from 'make-config.scm' call.
Add #:extensions.
[*config*]: Remove #:libgcrypt from 'make-config.scm' call.
(%dependency-variables): Remove %libgcrypt.
(make-config.scm): Remove #:libgcrypt.
* build-aux/build-self.scm (guile-gcrypt): New variable.
(make-config.scm): Remove #:libgcrypt.
(build-program)[fake-gcrypt-hash]: New variable.
Add (gcrypt hash) to the imported modules.  Adjust load path
assignments.
* gnu/packages/package-management.scm (guix)[propagated-inputs]: Add
GUILE-GCRYPT.
[arguments]: In 'wrap-program' phase, add GUILE-GCRYPT to the search
path.
2018-09-04 17:25:11 +02:00
Marius Bakke 70dc8db8e7
Merge branch 'master' into core-updates 2018-09-03 19:20:06 +02:00
Ludovic Courtès fe634eaf93
Add (guix describe) and use it to initialize '%package-search-path'.
* guix/describe.scm: New file.
* Makefile.am (MODULES): Add it.
* gnu/packages.scm (%default-package-module-path): New variable.
(%package-module-path): Honor 'package-path-entries'.
* build-aux/update-NEWS.scm (main): Use %DEFAULT-PACKAGE-MODULE-PATH
instead of (last (%package-module-path)).
2018-09-02 16:43:10 +02:00
Ludovic Courtès 20cbd4f5f4
compile-as-derivation: Adjust %load-compiled-path.
* build-aux/compile-as-derivation.scm: Set not only %load-path but also
%load-compiled-path.  This can avoid problems where a stale .go is
loaded.
2018-09-02 15:43:51 +02:00
Ludovic Courtès 1428bce348
build-self: Default to Guile 2.2 when building a standalone Guix.
* build-aux/build-self.scm (build): Change #:guile-version to default to
"2.2" when PULL-VERSION is greater than 0.
2018-07-27 11:32:59 +02:00
Ludovic Courtès 8bece84022
gnu: guile: Remove version 2.2.2.
* gnu/packages/guile.scm (guile-2.2.2): Remove.
* guix/self.scm (guile-for-build): Remove special case for "2.2.2".
(guix-derivation): Likewise.
* build-aux/build-self.scm (build): Likewise.
2018-07-27 11:28:15 +02:00
Ludovic Courtès 790c3e019a
build-self: Inherit the daemon connection from the parent process.
Fixes <https://bugs.gnu.org/31892>.
Reported by Vagrant Cascadian <vagrant@debian.org>.

* build-aux/build-self.scm (build): Define 'port' and wrap 'open-pipe*'
call in 'with-input-from-port'.
(build-program): Use 'port->connection' or 'open-connection' instead of
'with-store.'
2018-06-26 14:27:57 +02:00
Ludovic Courtès 1f1d76a178
build-self: Avoid recompilations of 'compute-guix-derivation'.
* build-aux/build-self.scm (build-program)["compute-guix-derivation"]:
Honor the SOURCE command-line argument.  Add a VERSION command-line
argument and honor it.
(build): Pass VERSION to BUILD.
2018-06-21 23:54:15 +02:00
Ludovic Courtès 7af5c2a248
self: Define derived '-directory' variables in config.scm.
This is a followup to d6b5aa0b03.

* guix/self.scm (%config-variables): Remove %CONFIG-DIRECTORY,
%STATE-DIRECTORY, %STORE-DATABASE-DIRECTORY, and %STORE-DIRECTORY.
(make-config.scm): Define them here.
* build-aux/build-self.scm (%config-variables, make-config.scm):
Likewise.
2018-06-18 23:56:16 +02:00
Ludovic Courtès d6b5aa0b03
build-self: Do not rely on '%store-database-directory'.
Guix'es older than one week don't have this variable so requiring it
would break things for them.

* build-aux/build-self.scm (%config-variables): Remove
'%store-database-directory'.
2018-06-18 23:25:53 +02:00
Ludovic Courtès e8cb9c01c6
build: Remove checks for 'nix-instantiate'.
* guix/import/snix.scm (open-nixpkgs): Use "nix-instantiate"
unconditionally.
* configure.ac: Remove check for 'nix-instantiate'.
* guix/config.scm.in (%nix-instantiate): Remove.
* guix/self.scm (%dependency-variables): Remove '%nix-instantiate'.
(make-config.scm): Remove it from the generated "config.scm".
* build-aux/build-self.scm (%dependency-variables, make-config.scm):
Likewise.
2018-06-18 23:19:51 +02:00
Ludovic Courtès 45779fa676
self: Make (guix config) generation really stateless.
Previously the %CONFIG-VARIABLES list would be generated based on what
the current (guix config) contains.  Thus, it would include
'%guix-register-program', which we recently removed, because
existing (guix config) most likely contained that variable.  Since its
value could differ from machine to machine, the build farm could be
building a different config.scm, thereby preventing people from getting
substitutes.

* guix/self.scm (%config-variables): Turn into a white list instead of
taking all the remaining variables from the current (guix config).
* build-aux/build-self.scm (%config-variables): Likewise.
2018-06-18 23:19:51 +02:00
Ludovic Courtès 7b0449712e
hydra: Make sure we add an absolute file name to the load path.
Previously, under Cuirass, we'd add "build-aux/cuirass/../hydra/../..".
But then, commit c45477d2a1 added this
in (gnu system vm):

         (local-file (search-path %load-path
                                  "guix/store/schema.sql"))

Since 'search-path' would not return an absolute file name, 'local-file'
would try to resolve that relative to "gnu/system", leading to:

  ERROR: In procedure force:
  In procedure canonicalize-path: No such file or directory: "/gnu/store/…-guix-ce573b1/gnu/system/build-aux/cuirass/../hydra/../../guix/store/schema.sql

* build-aux/hydra/gnu-system.scm <top level>: Canonicalize DIR before
adding it to %LOAD-PATH.
2018-06-15 10:04:59 +02:00
Ludovic Courtès ea0a06cee2
Remove 'guix-register' and its traces.
* Makefile.am (SH_TESTS): Remove tests/guix-register.sh.
* build-aux/pre-inst-env.in (GUIX_REGISTER): Remove.
* gnu/build/install.scm (directives): Remove outdated comment.
* gnu/build/vm.scm (root-partition-initializer): Update comment.
* gnu/packages/package-management.scm (guix-register): Remove.
* guix/config.scm.in (%sbindir, %guix-register-program): Remove.
* guix/scripts/system.scm (install): Adjust docstring.
* guix/self.scm (make-config.scm): Remove #:guix.  Do not generate
%sbindir and %guix-register-program.
(specification->package): Remove "guix".
* nix/guix-register/guix-register.cc: Remove.
* nix/libstore/store-api.cc (decodeValidPathInfo): Remove.
* nix/libstore/store-api.hh (decodeValidPathInfo): Remove declaration.
* nix/local.mk (sbin_PROGRAMS, guix_register_SOURCES)
(guix_register_CPPFLAGS, guix_register_LDFLAGS): Remove.
* tests/guix-register.sh: Remove.
2018-06-14 11:17:00 +02:00
Ludovic Courtès e740e8b27d
hydra: guix-modular: Build the full Guix.
* build-aux/hydra/guix-modular.scm (build-job): Pass #:pull-version to
BUILD.
2018-06-10 23:32:00 +02:00
Ludovic Courtès 75e24d7b0e
pull: Install the new Guix in a profile.
* guix/scripts/pull.scm (%pull-version): New variable.
(build-from-source): Pass #:pull-version to BUILD.
(whole-package-for-legacy, derivation->manifest-entry): New procedure.
(build-and-install): Rewrite in terms of 'build-and-use-profile'.
* guix/scripts/system.scm (maybe-suggest-running-guix-pull)[latest]:
Switch to "/current".
* scripts/guix.in (augment-load-paths!): Remove use of
~/.config/guix/latest.
* build-aux/compile-as-derivation.scm: Replace "/guix/latest/" with
"/current/share/guile/site/X.Y"
* guix/scripts.scm (warn-about-old-distro)[age]: Check "/current"
instead of "/latest".
* doc/guix.texi (Invoking guix pull): Document it.
* doc/contributing.texi (Running Guix Before It Is Installed): Remove
footnote about abusing ~/.config/guix/latest.
2018-06-09 12:02:27 +02:00
Ludovic Courtès 8a0d9bc8a3
self: Produce a complete package with the 'guix' command.
* guix/self.scm (guix-command): New procedure.
(compiled-guix): Add #:pull-version parameter.
[command, package]: New variables.
Honor PULL-VERSION.
(guix-derivation): Add #:pull-version and pass it to 'compiled-guix'.
* build-aux/build-self.scm (build-program): Add #:pull-version
parameter.  Pass it to 'guix-derivation'.
(build): Add #:pull-version and pass it to 'build-program'.
* build-aux/compile-as-derivation.scm: Pass #:pull-version to BUILD.
2018-06-09 12:02:27 +02:00
Ludovic Courtès 9e7b87ddc5
build: 'test-env' does not 'guix download' non-existent files.
Reported by uniq10.

* build-aux/test-env.in: Check whether FILE exists before invoking 'guix
download'.
2018-05-13 23:16:16 +02:00
Ludovic Courtès d6680dccb0
hydra: Switch back to "-" instead of "@" in package job names.
Fixes a regression introduced in ede121de42.
Reported by Mark H Weaver <mhw@netris.org>.

* build-aux/hydra/gnu-system.scm (job-name): Pass "-" as the second
argument to 'package-full-name'.
2018-05-12 15:58:56 +02:00
Ludovic Courtès 479c0e3f60
build: Fix possible race condition in 'test-env'.
Reported by Mark H Weaver <mhw@netris.org>.

* build-aux/test-env.in: Add 'guile' invocation before 'guix download'
invocation to make sure 'guix-daemon' is listening.
2018-04-22 23:50:49 +02:00
Ludovic Courtès df154c05dc
hydra: Fix uses of 'eval-when'.
* build-aux/hydra/gnu-system.scm: Use (expand load eval) in 'eval-when'
clause so as to not poison a cat and to ensure %load-compiled-path is
properly set when the 'use-modules' clauses are expanded.
* build-aux/hydra/guix.scm: Likewise.
2018-04-09 00:00:58 +02:00
Ludovic Courtès 98cda1b997
hydra: guix-modular: Honor the 'systems' argument.
* build-aux/hydra/guix-modular.scm (hydra-jobs)[systems]: Define as in
gnu-system.scm.
Honor SYSTEMS.
2018-04-08 22:07:47 +02:00
Ludovic Courtès f27a712840
build-self: Add missing 'close-pipe' call.
* build-aux/build-self.scm (build): Call 'close-pipe'.
2018-04-08 21:11:37 +02:00
Ludovic Courtès 16c28becf2
hydra: guix-modular: Explicitly build for the latest 2.2.
* build-aux/hydra/guix-modular.scm (build-job): Pass #:guile-version to
'build'.
2018-04-08 19:57:31 +02:00
Ludovic Courtès f6dfb8bb08
hydra: Clear '%load-compiled-path' for gnu-system.scm.
On hydra.gnu.org GUILE_LOAD_COMPILED_PATH happened to be empty so we
were fine.  However on GuixSD with Cuirass, we could have a conflicting
non-empty path and .go files for some of the (guix …) and (gnu …)
modules would be taken from there.

* build-aux/hydra/gnu-system.scm: Set %load-compiled-path.
2018-04-08 17:57:13 +02:00
Ludovic Courtès 9fe9594611
hydra: 'guix-modular' jobs use the new 'build-self'.
* build-aux/hydra/guix-modular.scm: Remove 'eval-when' form that fiddled
with '%load-path'.
(build-job): Load 'build-aux/build-self.scm' and call the procedure it
returns.
* build-aux/hydra/evaluate.scm: The 'build-things' replacement no longer
calls 'exit'.
2018-04-08 17:48:33 +02:00
Ludovic Courtès 351f384e57
cuirass: Add job specs for the modular Guix.
* build-aux/cuirass/guix-modular.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.
2018-04-08 17:48:33 +02:00
Ludovic Courtès a1ec7540be
cuirass: Factorize hydra-to-cuirass CI job translation.
* build-aux/cuirass/gnu-system.scm: Move code to...
* build-aux/cuirass/hydra-to-cuirass.scm: ... here, and include it.
* Makefile.am (EXTRA_DIST): Add 'build-aux/cuirass/hydra-to-cuirass.scm'
and 'build-aux/cuirass/gnu-system.scm'.
2018-04-08 17:48:33 +02:00
Ludovic Courtès 2cfc8d6964
build: Add 'as-derivation' target.
* build-aux/compile-as-derivation.scm: New file.
* Makefile.am (as-derivation): New target.
(EXTRA_DIST): Add compile-as-derivation.scm.
2018-04-08 17:48:25 +02:00
Ludovic Courtès f0527ce3a4
build-self: Use (guix self).
This mitigates <https://bugs.gnu.org/27284>.

* build-aux/build-self.scm (libgcrypt, zlib, gzip, bzip2, xz)
(false-if-wrong-guile, package-for-current-guile, guile-json)
(guile-ssh, guile-git, guile-bytestructures, matching-guile-2.2): Remove.
(%dependency-variables, %persona-variables, %config-variables): New
variables.
(make-config.scm, load-path-expression, gexp->script)
(build-program): New procedures.
(build): Rewrite to simply delegate to 'guix-derivation'.
2018-04-08 17:41:08 +02:00
Ludovic Courtès 4debffadb7
maint: Adjust 'check-final-inputs-self-contained' for glibc:static.
This change is necessary to cope with
6dff905e51.

* build-aux/check-final-inputs-self-contained.scm (final-inputs): Change
'match' pattern to match (LABEL PACKAGE OUTPUT).
2018-03-25 00:26:13 +01:00
Mark H Weaver 150062f190
Merge branch 'master' into core-updates 2018-02-16 13:14:26 -05:00
Diego Nicola Barbato 47551a761b
pull: Update the %sbindir variable in (guix config) when building.
Fixes <https://bugs.gnu.org/30370>.

* build-aux/build-self.scm (guix): New variable.
(builder): Use it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-02-15 15:40:35 +01:00
Marius Bakke bee7bb315c
Merge branch 'master' into core-updates 2018-02-01 13:18:47 +01:00
Danny Milosavljevic 2a49a18e8b
hydra: Fix up arm qemu job.
* build-aux/hydra/gnu-system.scm (qemu-jobs): Fix up arm qemu job.

Follow-up to 44b0303762.
2018-01-29 16:02:25 +01:00
Danny Milosavljevic 44b0303762
hydra: Only build the "flash image" on arm.
* build-aux/hydra/gnu-system.scm (qemu-jobs): Only build the "flash image"
on arm.
2018-01-29 15:56:51 +01:00
Danny Milosavljevic ebd6a6445f
hydra: Work around import problem.
* build-aux/hydra/gnu-system.scm: qemu-jobs: Work around import problem.

Follow-up to 1fe805b290.
2018-01-29 13:23:07 +01:00
Danny Milosavljevic 1fe805b290
hydra: Add (gnu bootloader) import.
* build-aux/hydra/gnu-system.scm: Add (gnu bootloader) import.

Follow-up to de2bc8d6da.
2018-01-29 10:04:41 +01:00
Danny Milosavljevic de2bc8d6da
hydra: Add arm image builder.
* build-aux/hydra/gnu-system.scm (%u-boot-systems): New
variable.
(%guixsd-supported-systems): Add armhf-linux.
(qemu-jobs): Use u-boot if system in %u-boot-systems.
2018-01-29 00:11:58 +01:00
Ludovic Courtès c0fda0b0df
hydra: Make the list of target systems a parameter.
* build-aux/hydra/gnu-system.scm (hydra-jobs): Define 'systems' and use
it.
2018-01-21 01:42:59 +01:00
Ludovic Courtès 403f2dccfc
cuirass: Properly convert list of <license> objects.
Fixes a bug whereby we would 'write' raw <license> objects when they
were in a list.

* build-aux/cuirass/gnu-system.scm (entry->sexp-entry): Add recursive
case when O is a list.
2018-01-15 15:18:03 +01:00
Ludovic Courtès 8781c3d9fc
hydra: Do not cross-build from non-Intel platforms.
* build-aux/hydra/gnu-system.scm (hydra-jobs)[cross-jobs](pointless?):
Return #t on non-Intel.
2017-12-29 13:38:06 +01:00
Marius Bakke 32cd878be0
Merge branch 'master' into core-updates 2017-12-19 01:42:40 +01:00
Ludovic Courtès e2e6e9ebf0
hydra: Pre-load the compiler.
Starting from Guile 2.2.3, '%fresh-auto-compile' does what it says and
would auto-compile everything, including the compiler (see
<https://bugs.gnu.org/29226>).

* build-aux/hydra/gnu-system.scm: Call 'compile'.
2017-12-13 23:11:54 +01:00
Ludovic Courtès 34797d8afc
hydra: Invalidate derivation caches after each architecture evaluation.
This reduces max RSS from 1.3G to 1.0G.

* guix/derivations.scm (invalidate-derivation-caches!): New procedure.
* build-aux/hydra/gnu-system.scm (hydra-jobs): Use it.  Add 'format'
call.
2017-12-13 23:11:53 +01:00
Ludovic Courtès cc6a4b0386
pull: Add (guix profiling) to the build environment.
Reported by Ricardo Wurmus.

* build-aux/build-self.scm (build): Add (guix profiling).
2017-12-13 17:16:40 +01:00
Marius Bakke 9e111db453
Merge branch 'master' into core-updates 2017-12-07 18:26:11 +01:00
Ludovic Courtès 66f217b43a
pull: Build with an ABI-compatible Guile.
Fixes <https://bugs.gnu.org/29570>.
Reported by Vagrant Cascadian <vagrant@debian.org>.

* build-aux/build-self.scm (matching-guile-2.2): New procedure.
(guile-for-build): Use it.
2017-12-07 17:13:47 +01:00
Marius Bakke 77181815ae
Merge branch 'master' into core-updates 2017-12-05 23:41:30 +01:00
Ludovic Courtès c397dfca03
build: Explicitly flush the "LOAD" and "GUILEC" lines.
* build-aux/compile-all.scm <top level>: Add calls to 'force-output'
in the #:report-load and #:report-compilation procedures.  Fixes a
regression introduced in 2890ad332f
whereby compilation output would be buffered, leading to a weird
visual effect.
2017-11-28 13:40:04 +01:00
Ludovic Courtès cd295fbe17
Revert "Add (guix self) and use it when pulling."
This reverts commit 5f93d97005.

'guix pull' would fail because (guix self) needs 'scheme-files'
from (guix discovery), which was not exported until now.
2017-11-21 23:53:10 +01:00
Ludovic Courtès 11a54b3d6e
hydra: Add jobs for the modular Guix.
* build-aux/hydra/guix-modular.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.
2017-11-21 23:09:17 +01:00
Ludovic Courtès 49961951c5
hydra: 'evaluate' passes an alist to the entry point.
* build-aux/hydra/evaluate.scm (%top-srcdir): New variable.
<top level>: Pass it to 'hydra-jobs'.
2017-11-21 23:09:16 +01:00
Ludovic Courtès 5f93d97005
Add (guix self) and use it when pulling.
This mitigates <https://bugs.gnu.org/27284>.

* guix/self.scm: New file.
* Makefile.am (MODULES): Add it.
* build-aux/build-self.scm (libgcrypt, zlib, gzip, bzip2, xz)
(false-if-wrong-guile, package-for-current-guile, guile-json)
(guile-ssh, guile-git, guile-bytestructures): Remove.
(build): Rewrite to simply delegate to 'compiled-guix'.
* gnu/packages.scm (%distro-root-directory): Rewrite to try different
directories.
* guix/discovery.scm (guix): Export 'scheme-files'.
* guix/scripts/pull.scm (build-and-install): Split into...
(install-latest): ... this.  New procedure.  And...
(build-and-install): ... this, which now takes a monadic value argument.
(indirect-root-added): Remove.
(guix-pull): Call 'add-indirect-root'.  Call 'build-from-source' and
pass the result to 'build-and-install'.
2017-11-21 23:09:16 +01:00
Marius Bakke 2dd12924cf
Merge branch 'master' into core-updates 2017-11-19 15:01:00 +01:00
Ludovic Courtès b574cee361
hydra: Add jobs for all of '%final-inputs'.
* build-aux/hydra/gnu-system.scm (package->job): Create a 'base.' job
when PACKAGE is a member of BASE-PACKAGES.
(all-packages)[adjust]: New procedure.
Fold over %FINAL-INPUTS and add it to the result.
2017-11-07 18:09:13 +01:00