Commit Graph

3307 Commits (201f2c87693f0f26bb8d00dedc49060d5da43e1f)

Author SHA1 Message Date
Ludovic Courtès 8eff892fac
download: Remove unused procedure.
* guix/download.scm (gnutls-package): Remove.
2018-05-29 15:09:44 +02:00
Ricardo Wurmus b2817f0fa5
pack: Add support for squashfs images.
* guix/scripts/pack.scm (%formats): Add "squashfs" format.
(guix-pack): Adjust "archiver" dependent on pack-format.
(squashfs-image): New procedure.
* doc/guix.texi (Invoking guix pack): Document it.
2018-05-28 17:36:09 +02:00
Ricardo Wurmus 5ffac538aa
pack: Rename "tar" to "archiver".
* guix/scripts/pack.scm (self-contained-tarball, docker-image): Accept
"archiver" argument; remove "tar" argument.
(guix-pack): Invoke "build-image" with "archiver" argument.
2018-05-28 17:36:09 +02:00
Ludovic Courtès a5acc17a3c
file-systems: Remove 'title' field and add <file-system-label>.
The 'title' field was easily overlooked and was an endless source of
confusion.  Now, the value of the 'device' field is self-contained.

* gnu/system/file-systems.scm (<file-system>): Change constructor name
to '%file-system'.
[title]: Remove.
(<file-system-label>): New record type with printer.
(report-deprecation, device-expression)
(process-file-system-declaration, file-system): New macros.
(file-system-title): New procedure.
(file-system->spec, spec->file-system): Adjust to handle
<file-system-label>.
* gnu/system.scm (bootable-kernel-arguments): Add case for
'file-system-label?'.
(read-boot-parameters): Likewise.
(mapped-device-user): Avoid 'file-system-title'.
(fs->boot-device): Remove.
(operating-system-boot-parameters): Use 'file-system-device' instead of
'fs->boot-device'.
(device->sexp): Add case for 'file-system-label?'.
* gnu/bootloader/grub.scm (grub-root-search): Add case for
'file-system-label?'.
* gnu/system/examples/bare-bones.tmpl,
gnu/system/examples/beaglebone-black.tmpl,
gnu/system/examples/lightweight-desktop.tmpl,
gnu/system/examples/vm-image.tmpl: Remove uses of 'title'.
* gnu/system/vm.scm (virtualized-operating-system): Remove uses of
'file-system-title'.
* guix/scripts/system.scm (check-file-system-availability): Likewise,
and adjust fix-it hint.
(check-initrd-modules)[file-system-/dev]: Likewise.
* gnu/build/file-systems.scm (canonicalize-device-spec): Remove 'title'
parameter.
[canonical-title]: Remove.
Match on SPEC's type rather than on CANONICAL-TITLE.
(mount-file-system): Adjust caller.
* gnu/build/linux-boot.scm (boot-system): Interpret ROOT here.
* gnu/services/base.scm (file-system->fstab-entry): Remove use of
'file-system-title'.
* doc/guix.texi (File Systems): Remove documentation of the 'title'
field.  Rewrite documentation of 'device' and document
'file-system-label'.
2018-05-28 13:24:11 +02:00
Marius Bakke 9572d2b482
http-client: Send redirection messages to stderr.
* guix/http-client.scm (http-fetch): Use CURRENT-ERROR-PORT instead of default
output.
2018-05-26 17:04:17 +02:00
Ludovic Courtès 7874bbbb9f
records: Insert record type ABI checks in constructors.
* guix/records.scm (print-record-abi-mismatch-error): New procedure.
<top level>: Add 'set-exception-printer!' call.
(current-abi-identifier, abi-check): New procedures.
(make-syntactic-constructor): Add #:abi-cookie parameter.  Insert calls
to 'abi-check'.
(define-record-type*)[compute-abi-cookie]: New procedure.
Use it and emit a definition of the 'current-abi-identifier' for TYPE.
* tests/records.scm ("ABI checks"): New test.
2018-05-23 10:21:02 +02:00
Danny Milosavljevic de136f3ee7
profiles: Add hook to generate "gschemas.compiled".
* guix/profiles.scm (glib-schemas): New procedure.
(%default-profile-hooks): Add it.
2018-05-21 09:56:37 +02:00
Ludovic Courtès 827c56515e
union: Do not warn about harmless collisions.
Until now we'd get pointless messages like:

  warning: collision encountered:
    /gnu/store/…-gtk-icon-themes/share/icons/hicolor/icon-theme.cache
    /gnu/store/…-inkscape-0.92.3/share/icons/hicolor/icon-theme.cache
  warning: choosing /gnu/store/…-gtk-icon-themes/share/icons/hicolor/icon-theme.cache

* guix/build/union.scm (%harmless-collisions): New variable.
(warn-about-collision): Honor it.
2018-05-17 10:48:37 +02:00
Ludovic Courtès 30d722c392
gexp: Disable deprecation warnings for 'imported-modules'.
Fixes <https://bugs.gnu.org/31450>.
Reported by Martin Castillo <castilma@uni-bremen.de>.

* guix/gexp.scm (gexp->derivation): Pass #:deprecation-warnings to
'imported-modules'.
(imported-files): Add #:deprecation-warnings and pass #:env-vars to
'gexp->derivation'.
(imported-modules): Add #:deprecation-warnings and pass it to
'imported-files'.
2018-05-15 10:34:45 +02:00
Ludovic Courtès 91e5885549
pack: Link top-level entries of wrapped packages.
Previously things like:

  guix pack -R guile guile-json

would lead to a profile without Guile-JSON, and to an 'etc/profile' that
does not define 'GUILE_LOAD_PATH'.

* guix/scripts/pack.scm (wrapped-package)[build]: Link top-level entries
of PACKAGE into OUTPUT.
2018-05-14 23:01:36 +02:00
Ludovic Courtès 437f62f02a
utils: Add 'version-prefix?'.
* guix/utils.scm (version-prefix?): New procedure.
* tests/utils.scm ("version-prefix?"): New test.
2018-05-13 13:29:27 +02:00
Ludovic Courtès 26b8cadf88
pack: 'guix pack -S xxx' no longer adds entries twice to the tarball.
* guix/scripts/pack.scm (self-contained-tarball)[build](symlink->directives):
Do not add a 'directory' directive for "/".  Previously, as soon as we
were using '-S /bin=bin' or similar, we would add every entry a second
time in the tarball; this would translate as hard links in the tarball,
which tar < 1.30 sometimes fails to extract.
Pass symlinks defined in DIRECTIVES to 'tar'.
2018-05-11 18:42:42 +02:00
Julien Lepiller 10673d150f
guix: Fix typo.
* guix/scripts/lint.scm: Fix typo.
2018-05-11 14:36:53 +02:00
Danny Milosavljevic b87fc9ab9d
gnu: android-make-stub: Update to 0.6.0.
* gnu/packages/android.scm (android-make-stub): Update to 0.6.0.
* guix/build-system/android-ndk.scm (android-ndk-build): Modify.
(lower): Modify.
2018-05-10 15:35:28 +02:00
Ludovic Courtès 47a60325ca
pack: Add '--relocatable'.
* gnu/packages/aux-files/run-in-namespace.c: New file.
* Makefile.am (AUX_FILES): Add it.
* guix/scripts/pack.scm (<c-compiler>): New record type.
(c-compiler, bootstrap-c-compiler, c-compiler-compiler): New procedures.
(self-contained-tarball): Use
'relative-file-name' for the SOURCE -> TARGET symlink.
(docker-image): Add 'defmod' to please Geiser.
(wrapped-package, map-manifest-entries): New procedures.
(%options, show-help): Add --relocatable.
(guix-pack): Honor it.
2018-05-10 14:53:57 +02:00
Ludovic Courtès 54fd5ad0a5
search-paths: Add 'set-search-paths'.
* guix/search-paths.scm (set-search-paths): New procedure.
2018-05-10 14:53:57 +02:00
Ludovic Courtès 3636b1c7fe
profiles: Allow lowerable objects other than packages in <manifest-entry>.
* guix/profiles.scm (manifest-lookup-package)[entry-lookup-package]: Add
case where 'manifest-entry-item' returns something that's neither a
string nor a package.
2018-05-10 14:53:57 +02:00
Ludovic Courtès e00ade3fb8
profiles: Optionally use relative file names for symlink targets.
* guix/build/union.scm (symlink-relative): New procedure.
* guix/build/profiles.scm: Re-export it.
(build-profile): Add #:symlink and pass it to 'union-build'.
* guix/profiles.scm (profile-derivation): Add #:relative-symlinks?.
Pass #:symlink to 'build-profile'.
* tests/profiles.scm ("profile-derivation relative symlinks, one entry")
("profile-derivation relative symlinks, two entries"): New tests.
2018-05-10 14:53:57 +02:00
Ludovic Courtès dac1c97d13
union: Add 'relative-file-name'.
* guix/build/union.scm (%not-slash): New variable.
(relative-file-name): New procedure.
* tests/union.scm (test-relative-file-name): New macro and tests.
2018-05-10 14:53:56 +02:00
Danny Milosavljevic c6ee92c41b
gnu: Add android-googletest.
* gnu/packages/android.scm (android-googletest): New variable.
* guix/build-system/android-ndk.scm (android-ndk-build): Use it.
2018-05-10 02:12:03 +02:00
Danny Milosavljevic 3766aa921b
build-system: android-ndk: Let upstream install header files.
* guix/build/android-ndk-build-system.scm (install): Don't install header
files ourselves.
2018-05-10 01:06:22 +02:00
Danny Milosavljevic 9ed36cd3d6
build-system: android-ndk: Support unit tests.
* guix/build-system/android-ndk.scm (android-ndk-build): Add googletest.
* guix/build/android-ndk-build-system.scm (check): Check whether tests are
enabled.  Run root-level tests as well.
2018-05-10 01:06:22 +02:00
Danny Milosavljevic 436515cdb8
build: Add the Android NDK build-system.
* guix/build-system/android-ndk.scm: New file.
* guix/build/android-ndk-build-system.scm: New file.
* Makefile.am: Add them.
2018-05-09 19:16:04 +02:00
Chris Marusich 27ba9760e0
guix: Revert accidentally committed changes.
* guix/packages.go.134WZR: Remove it.  This empty file was
unintentionally included in ede121de42.
2018-05-09 00:04:27 -07:00
Chris Marusich ede121de42
guix: Separate the package name and version with "@", not "-".
* guix/packages.scm (package-full-name): By default, use "@" to separate
  the package name and package version.  Add an optional delimiter
  argument so that there is still a way to explicitly use a different
  delimiter.
* gnu/packages/commencement.scm (gcc-boot0) <unpack-gmp&co>: Adjust
  accordingly.
* tests/graph.scm: Adjust accordingly.
* tests/profiles.scm: Adjust accordingly.
* NEWS: Mention the change.

Fixes: <https://bugs.gnu.org/31088>.
Reported by Pierre Neidhardt <ambrevar@gmail.com>.
2018-05-08 21:55:46 -07:00
Ludovic Courtès d26727a143
pack: Fix handling of '-e'.
Fixes a regression introduced in
aad16cc196.
Reported by Julien Lepiller.

* guix/scripts/pack.scm (guix-pack)[manifest-from-args]: In
'match-lambda', add clause for single packages.
* tests/guix-pack.sh: Add test for '-e'.
2018-05-07 14:04:19 +02:00
Ludovic Courtès aad16cc196
pack: Honor package transformation options.
Previously they would silently be ignored.

* guix/scripts/pack.scm (guix-pack)[manifest-from-args]: Add 'store'
parameter.  Call 'options->transformation' and use it.
Move 'with-store' and 'parameterize' around the 'let'.
* tests/guix-pack.sh: Add test using '--with-source'.
2018-05-07 10:46:07 +02:00
Ludovic Courtès 16e7afb924
pack: Do not autoload (gnu packages base).
* guix/scripts/pack.scm: Do not autoload (gnu packages base).
Previously, we could end up with 'canonical-package' as an unbound
variable because of the incorrect autoload spec.
2018-05-07 10:36:13 +02:00
Ludovic Courtès f2e66663c2
self: Add "guix-packages-base" derivation.
This introduces an intermediate derivation, thereby reducing the amount
of rebuild that needs to happen when "leaf" package modules are
modified.

* guix/self.scm (compiled-guix)[*core-package-modules*]: New variable.
[*package-modules*, *system-modules*, *cli-modules*]: Depend on it.
Add it to the directory union.
2018-05-07 00:17:34 +02:00
Ludovic Courtès 2d2f98efb3
guix build: Nicely report unbound variables with hints.
* guix/ui.scm (print-unbound-variable-error): Add "error:" to the
message.
(report-unbound-variable-error): New procedure, with code formerly in
'report-load-error'.
(report-load-error): Use it.
(call-with-unbound-variable-handling): New procedure.
(with-unbound-variable-handling): New macro.
* guix/scripts/build.scm (options->derivations): Wrap body in
'with-unbound-variable-handling'.
* tests/guix-build.sh (GUIX_PACKAGE_PATH): Add test.
2018-05-04 15:07:08 +02:00
Ludovic Courtès 7f2f6a2cb2
ui: Factorize 'last-frame-with-source'.
* guix/ui.scm (last-frame-with-source): New procedure.
(load*)[frame-with-source]: Remove.
Use 'last-frame-with-source'.
2018-05-04 12:13:53 +02:00
Maxim Cournoyer c1b4ad2e6e
build: emacs-utils: Fail when byte compilation fails.
Byte compilation failures were ignored prior to this change.

* guix/build/emacs-utils.scm (emacs-byte-compile-directory): Fail when there
are compilation errors.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2018-05-03 21:48:59 +05:30
Clément Lassieur bb6f94c71e
guix system: search: Display all provision names as 'shepherdnames'.
* guix/scripts/system/search.scm (service-type-shepherd-names): Append
provision lists together instead of returning a list of provision cars.
2018-05-01 23:29:03 +02:00
Ludovic Courtès 27e810c3e8
compile: Exit when an exception is thrown.
Previously we could end up with only a subset of the modules built.
Fixes <https://bugs.gnu.org/31329>.

* guix/build/compile.scm (call/exit-on-exception): New procedure.
(exit-on-exception): New macro.
(compile-files): Use it.
2018-05-01 16:01:39 +02:00
Ludovic Courtès 7c8b7e35d0
weather: Fix type error when reporting CI stats.
* guix/scripts/weather.scm (report-server-coverage): Remove 'missing'
binding above 'queued-subset' call.  Before that 'queued-subset' would
be called with a number instead of a list.
2018-04-30 23:41:21 +02:00
Marius Bakke a66853810e
Merge branch 'staging' 2018-04-30 19:26:03 +02:00
Ludovic Courtès 6ac8b7359a
guix system: search: Display default Shepherd service names.
Fixes <https://bugs.gnu.org/29707>.
Reported by Clément Lassieur <clement@lassieur.org>.

* guix/scripts/system/search.scm (service-type-default-shepherd-services)
(service-type-shepherd-names): New procedures.
(service-type->recutils): Use it.
* tests/guix-system.sh: Add test.
2018-04-30 14:22:43 +02:00
Ludovic Courtès 6ddb59607b
guix system: Report wrong file system 'device' fields.
Previously, if you wrote (device "my-label") without (title 'label),
you'd get:

  guix system: error: stat: No such file or directory: "my-label"

Now you get a proper error and a hint.

Reported by Pierre-Antoine Rouby.

* guix/scripts/system.scm (check-file-system-availability)[literal]: New
variable.  Loop over LITERAL.
* gnu/system/file-systems.scm (%pseudo-file-system-types): New variable.
* guix/ui.scm (display-hint): Make public.
2018-04-27 18:45:02 +02:00
Marius Bakke a9fe3882b9
Merge branch 'master' into staging 2018-04-25 15:53:41 +02:00
Ludovic Courtès 5e5d6613a3
download: Use ungrafted tools in 'url-fetch/tarbomb' and 'url-fetch/zipbomb'.
Fixes <https://bugs.gnu.org/31085>.
Reported by Diego Nicola Barbato <dnbarbato@posteo.de>.

* guix/download.scm (url-fetch/tarbomb): Pass #:graft? #f to
'gexp->derivation'.
(url-fetch/zipbomb): Likewise.
2018-04-23 15:25:56 +02:00
Maxim Cournoyer facc0a96a1
build-system: emacs: Add improved check phase.
* guix/build-system/emacs.scm (emacs-build): Add #:test-command keyword
argument. Remove #:configure-flags and #:test-target keyword arguments.
* guix/build/emacs-build-system.scm (check): New procedure.
(%standard-phases): Register check phase after the build phase.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2018-04-20 00:49:53 +05:30
Maxim Cournoyer 8a8fa82e72
build-system: emacs: Replace system* with invoke.
* guix/build/emacs-utils.scm: Use (guix build utils) for invoke.
(emacs-batch-eval, emacs-batch-edit-file): Replace system* with invoke.
* guix/build/emacs-build-system.scm (make-autoloads): No need to return #t
explicitly since emacs-generate-autoloads now uses invoke.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2018-04-20 00:49:53 +05:30
Maxim Cournoyer b5904fcc34
build-system: emacs: Search all inputs for Emacs Lisp directories.
* guix/build/emacs-build-system.scm (set-emacs-load-path): Include Emacs Lisp
directories from all inputs. Also, add the unpacked source directory to
EMACSLOADPATH.
(emacs-inputs, emacs-inputs-directories, emacs-input->el-directory,
emacs-inputs-el-directories): Remove.
(%standard-phases): Move set-emacs-load-path phase to after unpack phase.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2018-04-20 00:49:47 +05:30
Marius Bakke 5d904d63f4
Merge branch 'master' into staging 2018-04-16 18:15:28 +02:00
Marius Bakke 538d6d025c
build-system/meson: Don't override LDFLAGS if already set.
* guix/build/meson-build-system.scm (configure): Test for LDFLAGS before
adding ours.

(cherry picked from commit 611c27db2a)
2018-04-15 14:45:56 +02:00
Ludovic Courtès eb72cdf087
self: Produce a spliced (guix config) to placate Guile 2.0.
Fixes 'guix pull' with Guile 2.0.
See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27284#153>.

* guix/self.scm (make-config.scm): Remove 'begin' in 'scheme-file'
argument and pass #:splice? #t.
2018-04-11 01:03:47 +02:00
Ludovic Courtès 4fbd1a2b7f
gexp: 'scheme-file' can splice expressions.
* guix/gexp.scm (<scheme-file>)[splice?]: New field.
(scheme-file): Add #:splice? and pass it to '%scheme-file'.
(scheme-file-compiler): Pass SPLICE? to 'gexp->file'.
(gexp->file): Add #:splice? and honor it.
* tests/gexp.scm ("gexp->file + #:splice?"): New test.
("gexp->derivation & with-imported-module & computed module"): Use
 #:splice? #t.
2018-04-11 01:03:47 +02:00
Ludovic Courtès a1639ae9de
self: 'package-for-guile' really honors GUILE-VERSION.
* guix/self.scm (package-for-guile): Pass GUILE-VERSION to
'false-if-wrong-guile'.
2018-04-11 01:03:47 +02:00
Ludovic Courtès 63cab4182d
self: Remove 'eval-when' from in generated (guix config).
* guix/self.scm (make-config.scm): Remove unneeded 'eval-when'.
2018-04-11 01:03:47 +02:00
Ludovic Courtès 43176dd605
self: Don't use deprecated package names.
* guix/self.scm (compiled-guix)[guile-json, guile-ssh]: Don't refer t
"guile2.2-json" and "guile2.2-ssh", which are deprecated.
2018-04-10 17:44:27 +02:00