Commit Graph

3475 Commits (f579af3d3ec7454b4499c09513a6ec577e618cac)

Author SHA1 Message Date
Marius Bakke 873325b030
Merge branch 'master' into staging 2018-07-08 23:58:22 +02:00
Kyle Meyer 85c3fbf5de
ui: Add -V as short option for --version.
* guix/ui.scm (run-guix): Add -V as the short option for --version for
consistency with most commands.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-07-07 18:10:31 +02:00
Kyle Meyer 7ede577a5f
scripts: Add missing -V option to commands that document it.
* guix/scripts/container.scm (guix-container):
* guix/scripts/import.scm (guix-import):
* guix/scripts/substitute.scm (guix-substitute): Add -V as the short option
for --version to match show-help's description.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-07-07 18:10:31 +02:00
Kyle Meyer 7a369f6d2f
weather: Fix pasto in --version output.
* guix/scripts/weather.scm (%options): Correct the command name passed to
show-version-and-exit.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-07-07 18:10:31 +02:00
Ludovic Courtès 5adb2df0a2
pack: Use guile-for-build for the target system.
Until now, running "guix pack -s i686-linux" on an x86_64-linux machine,
for instance, would use an x86_64 guile for module derivations.  This
was OK until now, but would break when passing "--localstatedir" due to
the introduction of guile-sqlite3: we'd be using the i686 guile-sqlite3
along with the x86_64 guile.

* guix/scripts/pack.scm (guix-pack): Pass the 'system option from OPTS
to 'package-derivation'.
2018-07-05 13:35:21 +02:00
Ludovic Courtès 5b0c648a7c
profiles: 'info-dir-file' hook now produces 'dir.LANG' files.
Previously, entries for 'guix.fr.info' would end up in 'dir', above the
'guix.info' entries; consequently, running 'info guix' would actually
open 'guix.fr.info', which was confusing for non-French readers.

* guix/profiles.scm (info-dir-file)[glibc-utf8-locales]: New variable.
[build](info-file-language): New procedure.
(install-info): Use it, to create 'dir.LANG' files.
Set GUIX_LOCPATH.
2018-07-04 10:52:59 +02:00
Ludovic Courtès 86eee976f5
Revert "packages: Optimize 'package-transitive-supported-systems'."
This reverts commit 24420f5ffa.

This broke 'package-transitive-supported-systems', which would return
the union of supported systems instead of the intersection.
2018-07-03 17:50:04 +02:00
Ludovic Courtès f3f1d0a557
guix system: Make 'init' idempotent again.
This fixes a regression introduced in
df2f6400b1fbc282ef4d6dd7124ea1c17adc23c2: since the new
'register-path' (actually 'reset-timestamps') would make files
read-only, 'delete-file-recursively' would fail to delete them.  Thus,
re-running 'guix system init' on an already-populated store would fail
with a 'delete-file' EPERM.

* guix/scripts/system.scm (copy-item): Use 'lstat' instead of
'file-exists?'.  Call 'make-file-writable' on each directory below
DEST.
2018-07-03 17:50:04 +02:00
Ludovic Courtès 90b144d22d
ui: Report file names in 'system-error' exceptions from 'delete-file'.
* guix/ui.scm (delete-file): New error-reporting wrapper.
2018-07-03 17:50:04 +02:00
Ludovic Courtès e5e5119855
database: 'reset-timestamps' now correctly handles symlinks.
* guix/store/database.scm (reset-timestamps): Use 'utime' with
AT_SYMLINK_NOFOLLOW for symlinks.
2018-07-03 17:50:04 +02:00
Ludovic Courtès 25c7ff6a3e
syscalls: Define AT_SYMLINK_NOFOLLOW et al.
* guix/build/syscalls.scm (AT_FDCWD, AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR)
(AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, AT_EMPTY_PATH): New variables.
* tests/syscalls.scm ("utime with AT_SYMLINK_NOFOLLOW"): New test.
2018-07-03 17:50:04 +02:00
Ludovic Courtès a5b34d9d24
deduplication: Remove 'false-if-system-error', now unused.
* guix/store/deduplication.scm (false-if-system-error): Remove.
2018-07-03 17:50:04 +02:00
Oleg Pykhalov ae6fa00af0
import: elpa: Check if 'fetch-elpa-package' rest argument is null.
* guix/import/elpa.scm (fetch-elpa-package): Check if 'rest' is null.
2018-07-03 07:19:13 +03:00
Ludovic Courtès 3dbf331942
deduplication: Place link files under /gnu/store/.links.
Previously they'd always be placed next to TO-REPLACE, which would lead
to EPERM in some cases.

* guix/store/deduplication.scm (replace-with-link): Add #:swap-directory
parameter and honor it.  Add call to 'make-file-writable'.  Catch
'system-error' around 'rename-file'.
(deduplicate): Pass #:swap-directory and remove uses of
'false-if-system-error'.
* tests/store-deduplication.scm ("deduplicate"): Add 'chmod' call.
2018-07-03 00:39:11 +02:00
Ludovic Courtès af2f8ae5f1
deduplication: Fix incorrect use of 'throw'.
* guix/store/deduplication.scm (get-temp-link): In handler, fix call to
'throw'.
2018-07-03 00:39:11 +02:00
Ludovic Courtès 71bf6cb700
guix system: init: Check the available space before copying.
* guix/scripts/system.scm (copy-closure): Call 'query-path-info*' on
TO-COPY and REFS.  Compute the total size.  Call 'check-available-space'.
2018-07-03 00:39:11 +02:00
Ludovic Courtès 8120b23e51
ui: Make 'check-available-space' public.
* guix/ui.scm (check-available-space): Add optional 'directory'
parameter, defaulting to (%store-prefix).  Honor it.  Make public.
2018-07-03 00:39:10 +02:00
Ludovic Courtès 0744a9f002
store: Add 'query-path-info*'.
* guix/scripts/size.scm (query-path-info*): Move to...
* guix/store.scm (query-path-info*): ... here.
2018-07-03 00:39:10 +02:00
Ludovic Courtès 24420f5ffa
packages: Optimize 'package-transitive-supported-systems'.
This version is 13% faster than the one above when timing:

  (fold-packages (lambda (p x)
		   (package-transitive-supported-systems p))
		 '())

* guix/packages.scm (package-transitive-supported-systems): Make
'systems' a set instead of calling 'lset-intersection' repeatedly.
2018-07-03 00:39:10 +02:00
Ludovic Courtès 084f64cb03
self: Build with Guile 2.2.4.
* guix/self.scm (guile-for-build): In the "2.2" case, choose
GUILE-2.2.4.
2018-07-02 15:28:35 +02:00
Ludovic Courtès 8970a886e6
self: Use #:guile-for-build in the shebang of the 'guix' executable.
* guix/self.scm (guix-command): Add #:guile and pass it to 'program-file'.
(whole-package): Add #:guile and pass it to 'guix-command'.
(compiled-guix): Pass #:guile to 'guix-command' and 'whole-package'.
2018-07-02 15:28:35 +02:00
Ludovic Courtès 223fa5b327
utils: Micro-optimize 'source-properties->location'.
* guix/utils.scm (source-properties->location): Destructure LOC with
'match', adding a fast path without 'assq-ref' calls.
2018-07-02 15:28:35 +02:00
Ludovic Courtès 3059a35afe
utils: Disable memoization for 'location'.
This was getting 25% hits, which did not quite justify the overhead.

* guix/utils.scm (location): Remove 'mlambda'.
2018-07-02 15:28:35 +02:00
Marius Bakke 92af3ce417
Merge branch 'master' into staging 2018-07-02 12:18:58 +02:00
Marius Bakke cb4b508cd6
build-system/meson: Really skip the 'fix-runpath' phase on armhf.
This follows up commit d5b5a15a40 which doesn't
work because %current-system etc expands before the actual build.

Fixes <https://bugs.gnu.org/31719>.

* guix/build-system/meson.scm (meson-build)[builder]: Compare against the
already existing "system" variable rather than (%current-system).
2018-07-02 12:07:58 +02:00
Ludovic Courtès fd1395c498
ui: Increase relevance score for exact matches.
Previously "guix package -s python" would have 'python2-zope-interface' as
its first result (relevance: 10), followed by many other python-*
packages with the same score, while 'python' itself would come
later (relevance: 7).

This change makes 'python' the first result (relevance: 27).

Reported by Gábor Boskovits.

* guix/ui.scm (relevance)[score]: Use 'fold-matches' instead of
'match:count' to counter the number of maches.  Give more weight to
exact matches.
2018-06-29 22:56:33 +02:00
Mark H Weaver 2c8ac3641a
gnu: java: Return #t from all phases and snippets.
* guix/build/java-utils.scm (ant-build-javadoc): Use invoke; return #t.
* guix/build/ant-build-system.scm (generate-jar-indices): Return #t and
remove vestigal plumbing.
* gnu/packages/java.scm (classpath-bootstrap, ant-bootstrap, classpath-devel)
(icedtea-6, icedtea-7, java-plexus-sec-dispatcher, ant/java8, clojure)
(java-classpathx-servletapi, java-swt, java-qdox-1.12, java-hamcrest-core)
(java-plexus-archiver, java-plexus-sec-dispatcher, java-modello-plugins-xml)
(java-asm, java-commons-collections, java-commons-bsf, java-slf4j-api)
(java-slf4j-api, java-slf4j-simple, java-stringtemplate-3)
(java-stringtemplate, antlr3, antlr3-3.3, antlr3-3.1, java-ops4j-base-lang)
(java-ops4j-pax-tinybundles, java-ops4j-pax-exam-core-spi)
(java-fasterxml-jackson-core, java-fasterxml-jackson-databind)
(java-fasterxml-jackson-modules-base-jaxb, java-ecj-3, java-ecj-3.5)
(java-fasterxml-jackson-dataformat-yaml, java-woodstox-core)
(java-fasterxml-jackson-dataformat-xml, java-testng, java-jnacl)
(java-bouncycastle, java-powermock-core, java-powermock-modules-junit4)
(java-jansi-native, java-jansi, java-commons-httpclient, java-commons-vfs)
(java-apache-ivy, java-janino, java-logback-core): Return #t from all phases
and snippets, use invoke where appropriate, and remove vestigial plumbing.
2018-06-28 03:55:37 -04:00
Mark H Weaver 0e6cce2e01
meson-build-system: Return #t from all phases.
* guix/build/meson-build-system.scm (configure, build, check, install):
(fix-runpath): Use 'invoke' and return #t from all phases.
2018-06-28 03:55:34 -04:00
Ludovic Courtès 108015df6d
self: Add dependency on GnuTLS.
Fixes <https://bugs.gnu.org/31983>.
Reported by Fis Trivial <ybbs.daans@hotmail.com>.

* guix/self.scm (specification->package): Add "gnutls" and
"guile2.0-gnutls".
(compiled-guix)[gnutls]: New variable.
[dependencies]: Add it.
2018-06-27 23:30:44 +02:00
Taylan Kammer 0925c0ea77
scripts: gc: Report size in MiBs instead of bytes.
* guix/scripts/gc.scm (guix-gc): Show info in MiBs not bytes.
2018-06-28 00:29:46 +02:00
Ludovic Courtès 26db747a86
ui: Hint at the installation of locale packages and 'GUIX_LOCPATH'.
* guix/ui.scm (install-locale): Hide the "warning: failed to install
locale" on Guile 2.2.  Add a hint about 'glibc-utf8-locales' and
'GUIX_LOCPATH'.
2018-06-27 16:58:59 +02:00
Ludovic Courtès 2f608c1489
store: Add 'port->connection'.
* guix/store.scm (port->connection): New procedure.
2018-06-26 14:27:57 +02:00
Marius Bakke a167873c67
Merge branch 'master' into staging 2018-06-26 13:51:26 +02:00
Ludovic Courtès 66e9944e07
pack: Squashfs build expression refers to (guix store database) & co.
Fixes a regression introduced in
c45477d2a1.
Reported by Christopher Baines <mail@cbaines.net>.

* guix/scripts/pack.scm (not-config?, guile-sqlite3&co): New variables.
(self-contained-tarball)[not-config?]: Remove.
[build]: Use GUILE-SQLITE3&CO for 'with-extensions'.
(squashfs-image)[libgcrypt]: New variable.
[build]: Use 'source-module-closure', 'make-config.scm', and
'with-extensions'.
(docker-image)[not-config?]: Remove.
2018-06-25 23:34:38 +02:00
Christopher Baines 5970ceddfa
pack: Fix guix pack -f docker.
Without this change, running guix pack fails as (guix sets) is missing when
compiling (guix build store-copy).

* guix/scripts/pack.scm (docker-image): Move (guix build store-copy) to within
the source-module-closure call.
2018-06-24 09:24:26 +01:00
Ricardo Wurmus 945449b40b
guix: Fix system reconfigure.
This is a follow-up to 378daa8cb6.

* guix/scripts/system.scm (switch-to-system): Lower the script.
2018-06-21 16:54:06 +02:00
Marius Bakke 4dfea1010a
Merge branch 'master' into staging 2018-06-21 15:52:26 +02:00
Ludovic Courtès e203f4c26a
guix system: 'list-generation' correctly displays file system labels.
* guix/scripts/system.scm (display-system-generation): Correctly display
file system labels.  Previously, starting from commit
a5acc17a3c, it'd print #<file-system-label "foo">.
2018-06-20 23:47:08 +02:00
Marius Bakke 0106d6b40d
Merge branch 'master' into staging 2018-06-19 17:02:16 +02:00
Ricardo Wurmus b194da0d68
build-system/waf: Use invoke.
* guix/build/waf-build-system.scm (call-waf): Use "invoke" and unconditionally
return #t.
2018-06-19 10:48:14 +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 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 870677cbb8
compile: Work around non-thread-safe module autoloading.
* guix/build/compile.scm <top level>: Set 'try-module-autoload' when
running on Guile < 2.2.4.
2018-06-18 23:19:51 +02:00
Gábor Boskovits 90ea1006a8
guix: ant-build-system: Use manifest task to create manifest.
* guix/build/ant-build-system.scm (default-build.xml): Use manifest task
to create manifest file instead of a custom echo task.
2018-06-18 17:08:32 +02:00
Marius Bakke 6969c4de44
Merge branch 'master' into staging 2018-06-18 15:29:38 +02:00
Ricardo Wurmus 32eb44240d
build-system/r: Accept #:r argument.
* guix/build-system/r.scm (lower): Add #:r to private-keywords.
2018-06-18 13:51:28 +02:00
Ludovic Courtès a89faa3faa
self: Install .go files to 'lib/guile/X.Y/site-ccache'.
* guix/self.scm (guix-command): Add 'compiled-modules' parameter and
honor it.
(whole-package): Likewise.
(compiled-guix)[built-modules]: Turn into a procedure.
When PULL-VERSION is 1, use separate source and compiled modules.
When PULL-VERSION is 0, return a single directory containing both .scm
and .go files.
2018-06-17 01:40:14 +02:00
Marius Bakke 259341cf93
gnu: ldb: Fix build on 32-bit systems.
* guix/utils.scm (target-64bit?): New procedure.
* gnu/packages/samba.scm (ldb)[inputs]: Only add LMDB on 64-bit systems.
[arguments]: Make #:tests? conditional on LMDB availability.
2018-06-16 21:35:25 +02:00
Ricardo Wurmus d7ee90fe90
build-system/ant: Unconditionally return #t in build phases.
* guix/build/ant-build-system.scm (unpack, build, strip-jar-timestamps, check,
install): Use invoke.

Signed-off-by: Gábor Boskovits <boskovits@gmail.com>
2018-06-16 20:51:32 +02:00