Commit Graph

3237 Commits

Author SHA1 Message Date
Mark H Weaver d8a3b1b9e8
gnu-build: Issue a warning unless every phase returns #t.
* guix/build/gnu-build-system.scm (gnu-build): Issue a warning if a phase
returns a value other than #t.
2018-03-16 09:08:25 -04:00
Mark H Weaver daac9c77b9
packages: Issue a warning unless the snippet returns #t.
* guix/packages.scm (patch-and-repack): Issue a warning if the snippet
returns a value other than #t.
2018-03-16 09:08:20 -04:00
Mark H Weaver e9b23fe8bd
build-system/gnu: Return a boolean from all phase procedures.
* guix/build/gnu-build-system.scm (patch-source-shebangs)
(patch-generated-file-shebangs, strip): Return #t.
(validate-runpath): Raise an exception if validation fails.  Never return #f.
2018-03-16 06:44:09 -04:00
Mark H Weaver 5732008757
packages: Update copyright notice.
This is a followup to commit 5003aeaf2560d6ddebcf980a94785fba77e00f34.

* guix/packages.scm: Update copyright notice for Mark H Weaver.
2018-03-16 05:33:21 -04:00
Mark H Weaver 00d9494d80
packages: patch-and-repack: Fix snippet handling.
This is a followup to commit 5003aeaf2560d6ddebcf980a94785fba77e00f34.

* guix/packages.scm (patch-and-repack): For the snippet, generate a single
boolean expression for 'unless', instead of the list of expressions which had
previously been spliced into an 'and' form (prior to commit 5003aea).
2018-03-16 05:28:31 -04:00
Mark H Weaver 7837450076
build: emacs-utils: Use invoke instead of system*.
* guix/build/emacs-utils.scm (emacs-batch-eval)
(emacs-batch-edit-file): Use invoke.
2018-03-16 05:02:38 -04:00
Mark H Weaver 469de8c3fa
hg-download: Use invoke instead of system*.
* guix/build/hg.scm (hg-fetch): Use invoke and remove vestigial plumbing.
2018-03-16 05:02:36 -04:00
Mark H Weaver 81d8211e1b
svn-download: Use invoke instead of system*.
* guix/build/svn.scm (svn-fetch): Use invoke and remove vestigial plumbing.
2018-03-16 05:02:34 -04:00
Mark H Weaver 54fcecdb12
cvs-download: Use invoke instead of system*.
* guix/build/cvs.scm (cvs-fetch): Use invoke and remove vestigial plumbing.
2018-03-16 05:02:32 -04:00
Mark H Weaver 20927c9331
download: Use invoke instead of system*.
* guix/download.scm (url-fetch/tarbomb, url-fetch/zipbomb): Use invoke.
2018-03-16 05:02:01 -04:00
Mark H Weaver 2eeffc0acc
build-system/scons: Use invoke instead of system*.
* guix/build/scons-build-system.scm (build, check, install): Use invoke.
2018-03-16 05:01:57 -04:00
Mark H Weaver 68ca0efa9a
build-system/texlive: Use invoke instead of system*.
* guix/build/texlive-build-system.scm (compile-with-latex): Use invoke.
2018-03-16 05:01:56 -04:00
Mark H Weaver e35b09ca71
build-system/python: Use invoke instead of system*.
* guix/build/python-build-system.scm (call-setuppy): Use invoke.
2018-03-16 05:01:54 -04:00
Mark H Weaver 9e58fd9d7b
build-system/perl: Use invoke instead of system*.
* guix/build/perl-build-system.scm (configure, build, check, install): Use
invoke.
2018-03-16 05:01:52 -04:00
Mark H Weaver 0f308fe8eb
build-system/cmake: Use invoke instead of system*.
* guix/build/cmake-build-system.scm (configure): Use invoke.
2018-03-16 05:01:50 -04:00
Mark H Weaver 09a8f68b11
build-system/glib-or-gtk: Use invoke instead of system*.
* guix/build/glib-or-gtk-build-system.scm (compile-glib-schemas): Use invoke
and remove vestigial plumbing.
2018-03-16 05:01:47 -04:00
Mark H Weaver 9a87649c86
build-system/gnu: Use invoke instead of system*.
* guix/build/gnu-build-system.scm (unpack, configure, build, check, install)
(strip, compress-documentation): Use invoke and remove vestigial plumbing.
2018-03-16 05:01:45 -04:00
Mark H Weaver 6d084076b4
gnu-dist: Use invoke instead of system*.
* guix/build/gnu-dist.scm (autoreconf, build): Use invoke and remove vestigial
plumbing.
2018-03-16 05:01:43 -04:00
Mark H Weaver 7ac1b4084f
packages: patch-and-repack: Use invoke instead of system*.
* guix/packages.scm (patch-and-repack): Use invoke and remove vestigial
plumbing.
2018-03-16 05:01:41 -04:00
Ricardo Wurmus d57888a819
guix: python-build-system: Make bytecode compilation deterministic.
* guix/build/python-build-system.scm (enable-bytecode-determinism): New
procedure.
(%standard-phases): Add "enable-bytecode-determinism" phase.
2018-03-15 09:26:30 +01:00
Ricardo Wurmus 8c72ed923d
Merge branch 'master' into core-updates 2018-03-14 17:37:20 +01:00
Ricardo Wurmus ad1d03fcf0
build-system: minify: Do not import (ice-9 popen) in the build environment.
The (ice-9 popen) module should not be added to the imported-modules here,
because that depends on the Guile that is used on the host side.

* guix/build-system/minify.scm (%minify-build-system-modules): Remove import
of (ice-9 popen).
2018-03-12 15:14:01 +01:00
Ludovic Courtès 189be331ac
build-system/gnu: Add 'bootstrap' phase.
This factorizes what has become a widespread idiom.

* guix/build/gnu-build-system.scm (%bootstrap-scripts): New variable.
(bootstrap): New procedure.
(%standard-phases): Add it after 'unpack'.
* guix/build/ant-build-system.scm (%standard-phases): Delete 'bootstrap.
* guix/build/asdf-build-system.scm (%standard-phases/source)
(%standard-phases): Likewise.
* guix/build/cargo-build-system.scm (%standard-phases): Likewise.
* guix/build/cmake-build-system.scm (%standard-phases): Likewise.
* guix/build/dub-build-system.scm (%standard-phases): Likewise.
* guix/build/emacs-build-system.scm (%standard-phases): Likewise.
* guix/build/font-build-system.scm (%standard-phases): Likewise.
* guix/build/go-build-system.scm (%standard-phases): Likewise.
* guix/build/haskell-build-system.scm (%standard-phases): Likewise.
* guix/build/minify-build-system.scm (%standard-phases): Likewise.
* guix/build/ocaml-build-system.scm (%standard-phases): Likewise.
* guix/build/perl-build-system.scm (%standard-phases): Likewise.
* guix/build/python-build-system.scm (%standard-phases): Likewise.
* guix/build/r-build-system.scm (%standard-phases): Likewise.
* guix/build/ruby-build-system.scm (%standard-phases): Likewise.
* guix/build/scons-build-system.scm (%standard-phases): Likewise.
* guix/build/texlive-build-system.scm (%standard-phases): Likewise.
* guix/build/waf-build-system.scm (%standard-phases): Likewise.
* gnu/packages/audio.scm (faad2)[arguments]: Replace 'bootstrap.
(soundtouch, cuetools, bluez-alsa): Remove 'arguments'.
(cava)[arguments]: Replace 'bootstrap.
* gnu/packages/backup.scm (rdup): Remove 'bootstrap.
* gnu/packages/bioinformatics.scm (seek)[arguments]: Replace
'bootstrap.
* gnu/packages/bioinformatics.scm (htslib-for-sambamba): Remove
'arguments'.
* gnu/packages/ci.scm (hydra, cuirass): Remove 'bootstrap'.
* gnu/packages/crypto.scm (libb2): Remove #:phases.
* gnu/packages/databases.scm (guile-wiredtiger): Likewise.
* gnu/packages/debug.scm (stress-make): Remove 'bootstrap'.
* gnu/packages/documentation.scm (asciidoc): Likewise.
* gnu/packages/fontutils.scm (libuninameslist): Remove 'arguments'.
* gnu/packages/ftp.scm (weex): Remove 'arguments'.
* gnu/packages/game-development.scm (ois): Remove 'arguments'.
* gnu/packages/games.scm (pioneer): Remove 'bootstrap.
* gnu/packages/gnome.scm (vte-ng, byzanz): Replace 'bootstrap.
(arc-theme): Remove 'arguments'.
(faba-icon-theme): Remove 'bootstrap.
(arc-icon-theme): Remove 'arguments'.
* gnu/packages/gnunet.scm (guile-gnunet): Likewise.
* gnu/packages/gtk.scm (guile-rsvg): Likewise.
* gnu/packages/guile.scm (mcron2): Remove 'bootstrap.
(guile-bash): Remove #:phases.
(guile-git): Remove 'bootstrap.
(guile-syntax-highlight): Remove 'arguments'.
(guile-sjson): Likewise.
* gnu/packages/java.scm (classpath-devel): Remove 'bootstrap.
* gnu/packages/kodi.scm (libdvdnav/kodi)
(libdvdread/kodi, libdvdcss/kodi): Likewise.
* gnu/packages/libreoffice.scm (hunspell): Remove 'arguments'.
* gnu/packages/libusb.scm (hidapi): Likewise.
* gnu/packages/linux.scm (bridge-utils): Rename 'bootstrap' to
'patch-stuff'; move it before 'bootstrap', without autoreconf
invocation.
(eudev): Rename 'bootstrap' to 'patch-file-names', without 'autogen.sh'
invocation; move it before 'bootstrap.
(gpm): Replace 'bootstrap'.
(f2fs-tools): Remove 'arguments'.
(rng-tools): Remove #:phases.
* gnu/packages/messaging.scm (hexchat): Rename 'bootstrap' to
'copy-intltool-makefile'; remove "autoreconf" invocation and move before
'bootstrap'.
(libmesode): Remove 'arguments'.
(libstrophe): Likewise.
* gnu/packages/microcom.scm (microcom): Likewise.
* gnu/packages/networking.scm (libnet): Remove 'bootstrap.
* gnu/packages/onc-rpc.scm (libnsl): Remove 'arguments'.
* gnu/packages/package-management.scm (guix): Replace 'bootstrap.
* gnu/packages/sawfish.scm (librep): Remove 'arguments'.
* gnu/packages/version-control.scm (findnewest): Likewise.
* gnu/packages/video.scm (liba52, handbrake, motion): Replace
'bootstrap.
* gnu/packages/web.scm (fcgiwrap): Remove #:phases.
(tidy): Replace 'bootstrap.
(gumbo-parser): Remove #:phases.
* gnu/packages/wget.scm (wget2): Replace 'bootstrap.
* gnu/packages/wm.scm (i3lock-color): Remove #:phases.
* gnu/packages/xdisorg.scm (xclip): Likewise.
* gnu/packages/xml.scm (libxls): Replace 'bootstrap'.
* gnu/packages/xorg.scm (xf86-video-freedreno)
(xf86-video-intel): Remove #:phases.
* gnu/packages/zile.scm (zile-on-guile): Replace 'bootstrap.
2018-03-11 22:04:40 +01:00
Ludovic Courtès 5c6391b33a
utils: Add 'false-if-file-not-found'.
* guix/build/utils.scm (false-if-file-not-found): New macro.
2018-03-11 22:04:39 +01:00
Ludovic Courtès 33286075b9
hash: Add 'sha1'.
* guix/hash.scm (GCRY_MD_SHA1): New macro.
(bytevector-hash): New procedure.
(sha256): Express in terms of 'bytevector-hash'.
(sha1): New procedure.
* tests/hash.scm ("sha1, empty", "sha1, hello"): New tests.
2018-03-08 11:56:20 +01:00
Ludovic Courtès 16de45557f
ui: 'display-hint' preserves Texinfo formatting.
The previous method would mess up with @example formatting, for
instance.

* guix/ui.scm (display-hint): Parameterize '%text-width' instead of
using 'fill-paragraph'.
2018-03-07 11:22:42 +01:00
Ludovic Courtès e1ba6d49ea
ui: Display fix hints in the case where we have location info.
* guix/ui.scm (call-with-error-handling): Display fix-hints in the
error + message case.
2018-03-07 11:22:42 +01:00
Ludovic Courtès ca23693d28
linux-initrd: Factorize 'check-device-initrd-modules'.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Move to...
* gnu/system/linux-initrd.scm (check-device-initrd-modules): ... here.
New procedure.
* po/guix/POTFILES.in: Add it.
* guix/scripts/system.scm (check-initrd-modules)[check-device]: Remove.
Use 'check-device-initrd-modules' instead.
2018-03-07 11:22:42 +01:00
Ludovic Courtès 7949c140b1
ui: 'load*' no longer fails on Guile 2.2.3 upon EACCES or similar.
Previously, if ~/.cache was not write-accessible, 'guix' would exit with
code 1 without printing any message.  That was because the 'make-stack'
call would fail since the exception (a 'system-error) came from
'compile-file', which was called at a point where TAG wasn't installed
yet.  Secondly, to mimick auto-compilation behavior, we just swallow
'system-error raised by 'compile-file'.

Reported by Clément Lassieur.

* guix/ui.scm (load*): Move 'compile-file' call in the dynamic extent of
TAG.  Catch 'system-error around it and ignore it.
2018-03-06 10:50:39 +01:00
Ludovic Courtès f44c7aaccd
ui: Better workaround for lack of '%fresh-auto-compile' on 2.2.3.
Fixes <https://bugs.gnu.org/29226> for the most part.

* guix/ui.scm (load*): Add call to 'compile-file' on 2.2.3.
2018-03-05 10:54:45 +01:00
Danny Milosavljevic 329dabe13b
git-download: Fetch only the required commit, if possible.
* guix/build/git.scm (git-fetch): Fetch only the required commit, if possible.
2018-03-04 14:43:38 +01:00
Clément Lassieur bdcf0e6fd4
services: messaging: Prosody config supports file-like objects.
* doc/guix.texi (Messaging Services): Update accordingly.
* gnu/services/configuration.scm (serialize-configuration,
serialize-maybe-stem, serialize-package): Return strings or string-valued
gexps (these procedures were only used for their side-effects).
* gnu/services/messaging.scm (serialize-field, serialize-field-list,
enclose-quotes, serialize-raw-content, serialize-ssl-configuration,
serialize-virtualhost-configuration-list,
serialize-int-component-configuration-list,
serialize-ext-component-configuration-list,
serialize-virtualhost-configuration, serialize-int-component-configuration,
serialize-ext-component-configuration, serialize-prosody-configuration):
Return strings or string-valued gexps and stop printing.
(prosody-activation): Use SERIALIZE-PROSODY-CONFIGURATION's return value with
MIXED-TEXT-FILE instead of using its output with PLAIN-FILE.
(serialize-non-negative-integer, serialize-non-negative-integer-list): Convert
numbers to strings.
(file-object?, serialize-file-object, file-object-list?,
serialize-file-object-list): New procedures.
(ssl-configuration)[capath, cafile], (prosody-configuration)[plugin-paths,
groups-file]: Replace FILE-NAME with FILE-OBJECT.
* guix/gexp.scm (file-like?): New exported procedure.
2018-03-03 18:21:52 +01:00
Ludovic Courtès 424cea8083
guix system: Check for the lack of modules in the initrd.
* guix/scripts/system.scm (check-mapped-devices): Take an OS instead of
a list of <mapped-device>.  Pass #:needed-for-boot? and #:initrd-modules
to CHECK.
(check-initrd-modules): New procedure.
(perform-action): Move 'check-mapped-devices' call first.  Add call to
'check-initrd-modules'.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): New
procedure.
(check-luks-device): Add #:initrd-modules and #:needed-for-boot?.  Use
them to call 'check-device-initrd-modules'.
2018-03-02 13:53:15 +01:00
Ludovic Courtès f14c933df1
Add (guix glob).
* guix/glob.scm, tests/glob.scm: New files.
* Makefile.am (MODULES): Add guix/glob.scm.
(SCM_TESTS): Add tests/glob.scm.
2018-03-02 13:46:25 +01:00
Mike Gerwitz e37944d827
environment: Add --user.
This change allows overriding the home directory of all filesystem mappings to
help hide the identity of the calling user in a container.

* doc/guix.texi (Invoking guix environment)[--container]: Mention --user.
[--user]: Add item.
* guix/scripts/environment.scm (show-help): Add --user.
(%options): Add --user.
(launch-environment/container) Add 'user' parameter.  Update doc.  Override
'user-mappings' using 'override-user-mappings'.  Consider override for chdir.
(mock-passwd, user-override-home, overrid-euser-dir): New procedures.
(guix-environment): Disallow --user without --container.  Provide user to
'launch-environment/container'.
* tests/guix-environment.sh: Add user test.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-03-02 11:55:43 +01:00
Mike Gerwitz 07ec349229
environment: Add --link-profile.
This change is motivated by attempts to run programs (like GNU IceCat) within
containers.  The 'fontconfig' program, for example, is configured explicitly
to check ~/.guix-profile for additional fonts.

There were no existing container tests in 'tests/guix-environment.sh', but I
added one anyway for this change.

* doc/guix.texi (Invoking guix environment): Add '--link-profile'.
* guix/scripts/environment.scm (show-help): Add '--link-profile'.
(%options): Add 'link-profile' as '#\P', assigned to 'link-profile?'.
(link-environment): New procedure.
(launch-environment/container): Use it when 'link-profile?'.
[link-profile?]: New parameter.
(guix-environment): Leave when '--link-prof' but not '--container'.  Add
'#:link-profile?' argument to 'launch-environment/container' application.
* tests/guix-environment-container.sh: New '--link-profile' test.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-03-02 11:55:42 +01:00
Ludovic Courtès b402f4ee34
import: cpan: Drop "v" prefix from version strings.
Fixes <https://bugs.gnu.org/30641>.
Reported by Oleg Pykhalov <go.wigust@gmail.com>.

* guix/import/cpan.scm (cpan-version): Drop the "v" prefix when it is
there.
2018-03-01 14:54:55 +01:00
Ludovic Courtès 435603a1d6
profiles: 'manifest-add' truly deletes duplicate entries.
Fixes <https://bugs.gnu.org/30569>.
Reported by Andreas Enge <andreas@enge.fr>.

* guix/profiles.scm (manifest-add): Don't append ENTRIES as is.
Instead, cons each element of ENTRIES as we fold over it.
Remove unneeded ellispes in 'match' patterns.
2018-03-01 14:00:21 +01:00
Ludovic Courtès 297602513b
build-system/trivial: Add support for #:allowed-references.
* guix/build-system/trivial.scm (lower): Add #:allowed-references and
keep it in the 'arguments' field.
(trivial-build): Add #:allowed-references.  Add
'canonicalize-reference'.  Pass #:allowed-references to
'build-expression->derivation'.
(trivial-cross-build): Likewise.
* tests/packages.scm ("trivial with #:allowed-references"): New test.
2018-02-28 22:47:42 +01:00
Ludovic Courtès 0fb405796c
guix package: '--search' no longer shows superseded packages.
Fixes <https://bugs.gnu.org/30566>.
Reported by Björn Höfling <bjoern.hoefling@bjoernhoefling.de>.

* guix/scripts/package.scm (find-packages-by-description): Ignore
superseded packages.
* tests/guix-package.sh: Add test.
2018-02-27 15:46:56 +01:00
Ludovic Courtès 1d84d7bf60
build: Require Guile >= 2.0.13.
* README, configure.ac, doc/guix.texi (Requirements): Increase minimum
Guile version from 2.0.9 to 2.0.13.
* config-daemon.ac: Remove use of 'GUIX_CHECK_UNBUFFERED_CBIP'.
* m4/guix.m4 (GUIX_CHECK_UNBUFFERED_CBIP): Remove.
* guix/build/download.scm (current-http-proxy): Remove.
* guix/build/syscalls.scm (%libc-errno-pointer, errno): Remove.
(syscall->procedure): Use #:return-errno unconditionally.
* guix/hash.scm (open-sha256-input-port)[unbuffered]: Remove outdated
comment.
* guix/http-client.scm (when-guile<=2.0.5-or-otherwise-broken): Remove.
<top level>: Remove 'when-guile<=2.0.5-or-otherwise-broken' block.
* guix/scripts/substitute.scm (fetch): Remove 'guile-version>?'
conditional.
* tests/hash.scm (supports-unbuffered-cbip?): Remove.
<top level>: Remove 'test-skip' call.
2018-02-26 18:19:34 +01:00
David Thompson 267379f852
environment: Add --manifest option.
* guix/scripts/environment.scm (show-help, %options): Add -m/--manifest.
(options/resolve-packages): Handle manifests.
* tests/guix-envronment.sh: Add a test.
* doc/guix.texi (Invoking guix environment): Document it.
2018-02-21 22:16:38 -05:00
Mark H Weaver 150062f190
Merge branch 'master' into core-updates 2018-02-16 13:14:26 -05:00
Ludovic Courtès 5e2495d09e
import: utils: 'alist->package' allows false license.
Reported by <pkill9@runbox.com>.
Fixes <https://bugs.gnu.org/30470>.

* guix/import/utils.scm (alist->package): Check whether 'license' is
false and set the 'license' field to #f in this case.
* tests/import-utils.scm ("alist->package with false license"): New
test.
2018-02-16 11:10:12 +01:00
Ludovic Courtès 485d355cad
pack: Adjust '--manifest' documentation.
Reported by Konrad Hinsen <konrad.hinsen@fastmail.net>.

* guix/scripts/pack.scm (show-help): Adjust --manifest documentation.
2018-02-16 00:45:29 +01:00
Oleg Pykhalov 06a9dc2fd0
union: Wrap collisions with newlines.
* guix/build/union.scm (union-build): Wrap collisions with newlines.
2018-02-15 20:51:51 +03:00
Konrad Hinsen 4a979afe1b
pack: Add '--manifest'.
* guix/scripts/pack.scm (%options, show-help): Add --manifest.
(guix-pack)[manifest-from-args]: New procedure.
Use it.
* doc/guix.texi (Invoking guix pack): Document --manifest.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-02-15 15:40:36 +01:00
Mark H Weaver a7fb298665
Merge branch 'master' into core-updates 2018-02-11 04:05:07 -05:00
Björn Höfling 0a574d7bf7
licenses: Add W3C license.
* gnu/license.scm (w3c): New variable.
2018-02-10 19:03:57 +01:00
Ludovic Courtès 8446dc5a36
ssh: Work around 'select' bug in Guile.
Fixes <https://bugs.gnu.org/30365>.

* guix/ssh.scm (remote-daemon-channel)[redirect]: Define 'select*' and
use it.
2018-02-09 11:23:27 +01:00