summaryrefslogtreecommitdiff
path: root/guix/build/gnu-build-system.scm
AgeCommit message (Expand)Author
2020-02-16build: gnu-build-system: Adjust NOCONFIGURE variable....This ia a follow-up to 481a0f1a7ceac666a011b28324220584ead07698. * guix/build/gnu-build-system.scm (bootstrap): Set NOCONFIGURE for all bootstrap scripts. Clean up variable after use. Efraim Flashner
2020-02-16build-system/gnu: Don't try executing directories in bootstrap phase....* guix/build/gnu-build-system.scm: (bootstrap): Change the file-exists? procedure to one that excludes directories, so that we do not mistake it for a script. For example if the source includes a bootstrap/ directory. Signed-off-by: Marius Bakke <mbakke@fastmail.com> Brendan Tildesley
2020-02-16build: gnu-build-system: Don't run configure during bootstrap....* guix/build/gnu-build-system.scm (bootstrap): Add NOCONFIGURE environment variable before running bootstrap scripts. Efraim Flashner
2019-06-14build-system/gnu: Make 'first-subdirectory' deterministic....Fixes <https://bugs.gnu.org/35387>. Reported by Christopher Baines <mail@cbaines.net>. * guix/build/gnu-build-system.scm (first-subdirectory): Rewrite using 'scandir' so that the result is deterministic. Ludovic Courtès
2019-03-10build-system/gnu: Copy license files to all the outputs....Fixes <https://bugs.gnu.org/34702>. Reported by Leo Famulari <leo@famulari.name>. * guix/build/gnu-build-system.scm (install-license-files)[copy-to-directories]: New procedure. Call it to copy license files to all the outputs. Ludovic Courtès
2019-03-10build-system/gnu: Always look for license files in the source tree....Fixes <https://bugs.gnu.org/31103>. * guix/build/gnu-build-system.scm (install-license-files): Add #:out-of-source?. [find-source-directory]: New procedure. Use it to Determine the source directory and look for license files there. Ludovic Courtès
2019-01-29build-system/gnu: Report invocation errors in a human-friendly way....* guix/build/utils.scm (report-invoke-error): New procedure. * guix/build/gnu-build-system.scm (gnu-build): Guard against 'invoke-error?'. Ludovic Courtès
2019-01-29utils: Switch to the new 'setvbuf' API....* guix/build/utils.scm (setvbuf) [(and guile-2 (not guile-2.2))]: New procedure. (remove-store-references): Use the 2.2 'setvbuf' API style. * guix/build/gnu-build-system.scm (gnu-build): Likewise. Ludovic Courtès
2018-08-03build-system/gnu: If a phase returns #f, the build fails....Fixes <https://bugs.gnu.org/31974>. Introduced by commit d8a3b1b9e847d4a44d2695f95af77170d4d2788f. * guix/build/gnu-build-system.scm (gnu-build): Use 'every' instead of 'for-each'. Mark H Weaver
2018-03-29ld-wrapper: Allow linking with non-store libraries by default....This was suggested on several occasions, notably <https://bugs.gnu.org/24544>. * gnu/packages/ld-wrapper.in (%allow-impurities?): Default to #t and parse the value of 'GUIX_LD_WRAPPER_ALLOW_IMPURITIES'. * guix/build/gnu-build-system.scm (set-paths): Set 'GUIX_LD_WRAPPER_ALLOW_IMPURITIES'. Ludovic Courtès
2018-03-20build-system/gnu: Fix typo....* guix/build/gnu-build-system.scm (dump-file-contents): Fix typo in 'string-pad' argument. Ludovic Courtès
2018-03-20build-system/gnu: Dump test suite logs upon 'check' failure....Suggested by Mark H Weaver <mhw@netris.org>. * guix/build/gnu-build-system.scm (dump-file-contents): New procedure. (%test-suite-log-regexp): New variable. (check): Add #:test-suite-log-regexp. Catch 'invoke-error?' and call 'dump-file-contents' upon error. Ludovic Courtès
2018-03-16build-system/gnu: Tolerate errors during the 'strip' phase....This is a followup to commit 9a87649c863e1ff8b073b356875eb05eecedbcf7. * guix/build/gnu-build-system.scm (strip)[strip-dir]: If an invoke error occurs, issue a warning and continue to the next file. This restores the tolerance of stripping errors prior to commit 9a87649. Mark H Weaver
2018-03-16gnu-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. Mark H Weaver
2018-03-16build-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. Mark H Weaver
2018-03-16build-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. Mark H Weaver
2018-03-11build-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. Ludovic Courtès
2017-11-08build-system/gnu: Add 'install-license-files' phase....Suggested by Dave Love <fx@gnu.org>. * guix/build-system/gnu.scm (%license-file-regexp): New variable. (gnu-build): Add #:license-file-regexp and use it. (gnu-cross-build): Likewise. * guix/build/gnu-build-system.scm (%license-file-regexp): New variable. (install-license-files): New procedure. (%standard-phases): Add it. Ludovic Courtès
2017-06-11build-system/gnu: Work around 'time-monotonic' bug in Guile 2.2.2....Fixes <http://bugs.gnu.org/27303>. Reported by Leo Famulari <leo@famulari.name>. * guix/build/gnu-build-system.scm (time-monotonic) [guile-2.2]: Define. Ludovic Courtès
2017-05-30build-system/gnu: 'compress-documentation' phase handles double symlinks....The compress-documentation phase was breaking recursive symbolic links used for manuals, which was made visible by the `find-files' call in the recently added `manual-database' profile hook. See <http://bugs.gnu.org/26771>. * guix/build/gnu-build-system.scm (compress-documentation) [points-to-symbolic-link?]: New procedure. [maybe-compress-directory]: Use `points-to-symbolic-link?' to filter out symbolic links that shouldn't be retargetted, and re-order the calls to `retarget-symlink' and `documentation-compressor'. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Maxim Cournoyer
2017-01-26utils: Add helper method to make files writable....* gnu/build/activation.scm (make-file-writable): Move this to ... * guix/build/utils.scm (make-file-writable): ... here. Export it. * guix/build/gnu-build-system.scm (strip): Use it. Marius Bakke
2017-01-26build-system/gnu: Add 'reset-gzip-timestamps' phase....* guix/build/gnu-build-system.scm (reset-gzip-timestamps): New procedure. (%standard-phases): Add it. Ludovic Courtès
2017-01-26build-system/gnu: 'strip' phase now skips symlinks....This avoids a situation where the "debug" output would contain separate (and different) .debug files for "libfoo.so" and "libfoo.so.0.0", even though "libfoo.so" is actually a symlink to "libfoo.so.0.0". * guix/build/gnu-build-system.scm (strip): Remove 'file-exists?' call in 'for-each' lambda. Pass a predicate to 'find-files' to restrict the result to regular files. Ludovic Courtès
2016-11-26build-system/gnu: Make libraries writable before stripping....* guix/build/gnu-build-system.scm (strip)[strip-dir]: Change mode of files before running strip-command. Marius Bakke
2016-10-01build-system/gnu: Add 'patch-dot-desktop-files' phase....* guix/build/gnu-build-system.scm (patch-dot-desktop-files): New procedure. (%standard-phases): Add it. Co-authored-by: Ludovic Courtès <ludo@gnu.org> John Darrington
2016-09-12build-system/gnu: Do not patch symlinks in the source....This is a followup to 13a9feb5b64fd819eaed38a17da0284bbe2b8d9. * guix/build/gnu-build-system.scm (patch-source-shebangs): Remove call to 'remove'. Pass a second argument to 'find-files' to filter out symlinks; pass #:stat lstat. (patch-generated-file-shebangs): Likewise, and also filter out non-executable files. Ludovic Courtès
2016-09-01build-system/gnu: 'strip' phase lists files in sorted order....This fixes a bug whereby the choice between stripping 'libfoo.so.0.1.2' and stripping 'libfoo.so' (the symlink) would be non-deterministic. * guix/build/gnu-build-system.scm (strip)[strip-dir]: Use 'find-files' instead of 'file-system-fold' so that files are picked in deterministic order. Ludovic Courtès
2016-02-09build-system/gnu: Do not patch symlinks....This fixes location-aware scripts. * guix/build/gnu-build-system.scm (patch-shebangs)[list-of-files]: Use 'lstat' instead of 'stat'. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Jan Nieuwenhuizen
2016-01-05build-system/gnu: Add 'set-SOURCE-DATE-EPOCH' phase....This phase is inherited by other build systems, which ensures 'SOURCE_DATE_EPOCH' is always set in practice. * guix/build/python-build-system.scm (set-SOURCE-DATE-EPOCH): Remove. (%standard-phases): Don't add it. * guix/build/gnu-build-system.scm (set-SOURCE-DATE-EPOCH): New procedure. (%standard-phases): Add it. (gnu-build): Remove 'setenv' call for "SOURCE_DATE_EPOCH". Ludovic Courtès
2016-01-01build-system/gnu: Use the long option name for deterministic archives....This is a followup to 3eb34c6. * guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Use "--enable-deterministic-archives" instead of "-D" to work around Binutils bug <https://sourceware.org/bugzilla/show_bug.cgi?id=17671>. * guix/build/gnu-build-system.scm (strip): Likewise. Ludovic Courtès
2015-12-18build-system/gnu: Always pass "-D" to strip/objcopy....* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Add "-D" to #:strip-flags. * guix/build/gnu-build-system.scm (strip): Likewise. Also pass "-D" to OBJCOPY-COMMAND. Ludovic Courtès
2015-11-14build-system/gnu: Set 'SOURCE_DATE_EPOCH'....Suggested by Ludovic Courtès <ludo@gnu.org>. * guix/build/gnu-build-system.scm (gnu-build): Set SOURCE_DATE_EPOCH for deterministic builds. Alex Kost
2015-10-04Use "normalized codesets" everywhere....In other words, change "xx_YY.UTF-8" to "xx_YY.utf8". * guix/profiles.scm (ca-certificate-bundle): Use "en_US.utf8" instead of "en_US.UTF-8". * guix/packages.scm (patch-and-repack): Likewise. * guix/build/gnu-build-system.scm (install-locale): Likewise. * guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Likewise. * gnu/packages/python.scm (python-ipython): Likewise. * gnu/packages/gawk.scm (gawk): Likewise. * build-aux/hydra/demo-os.scm: Likewise. * gnu/packages/guile.scm (guile-ncurses)[arguments]: Remove 'change-locale' phase. Ludovic Courtès
2015-10-03utils: Add 'every*'....* guix/build/gnu-build-system.scm (every*): Move to... * guix/build/utils.scm (every*): ... here. New procedure. Ludovic Courtès
2015-08-30build-system/gnu: Use monotic time to measure elapsed time....* guix/build/gnu-build-system.scm (gnu-build)[elapsed-time]: New procedure. Use it, and use (current-time time-monotonic) instead of (gettimeofday). Show one digit after the comma for the elapsed time. Ludovic Courtès
2015-07-13build-system/gnu: Pass --build=<triplet> to configure by default....* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Accept #:build keyword argument. Pass it to 'gnu-build' on the build side. * guix/build/gnu-build-system.scm (configure): Accept #:build keyword argument. Unless it is false, pass --build to configure. Mark H Weaver
2015-04-23build-system/gnu: #:validate-runpath? now defaults to #t....* guix/build/gnu-build-system.scm (validate-runpath): Change default value of VALIDATE-RUNPATH? to #t. Ludovic Courtès
2015-04-23build-system/gnu: Gracefully handle dangling symlinks....Fixes <http://bugs.gnu.org/20081>. Reported by Tomáš Čech <tcech@suse.cz>. * guix/build/gnu-build-system.scm (patch-source-shebangs): Remove files that don't pass 'file-exists?'. (patch-generated-file-shebangs): Likewise. Ludovic Courtès
2015-04-06build-system/gnu: Add docstring to 'delete-info-dir-file'....* guix/build/gnu-build-system.scm (delete-info-dir-file): Add docstring. Federico Beffa
2015-04-06build-system/gnu: Add 'delete-info-dir-file' phase....* guix/build/gnu-build-system.scm (delete-info-dir-file): New procedure. (%standard-phases): Use it. Federico Beffa
2015-04-01build-system/gnu: Add 'validate-runpath' phase....* guix/build/gnu-build-system.scm (every*, validate-runpath): New procedures. (%standard-phases): Add 'validate-runpath'. * guix/build-system/gnu.scm (%gnu-build-system-modules): Add (guix build gremlin) and (guix elf). (gnu-build): Add #:validate-runpath?. [builder]: Pass it. (gnu-cross-build): Likewise. * gnu/packages/base.scm (glibc)[arguments]: Add #:validate-runpath? #f. Ludovic Courtès
2015-03-01Revert "build-system/gnu: Keep the sloppy conversion strategy during bootstrap."...This reverts commit b479c3ddaf85c831e34888229849bc1ce34419de. This commit was the result of an incorrect characterization of the problem; see the log of commit 87c8b92 for details. Ludovic Courtès
2015-03-01build-system/gnu: Keep the sloppy conversion strategy during bootstrap....* guix/build/gnu-build-system.scm (gnu-build): Leave %DEFAULT-PORT-CONVERSION-STRATEGY unchanged when 'string->bytevector' fails to convert to ISO-8859-1. This is an attempt to work around the build failures at <http://hydra.gnu.org/build/263002>. Ludovic Courtès
2015-02-28packages: Set the port conversion strategy to 'error'....Suggested by Mark H Weaver. * guix/build/gnu-build-system.scm (gnu-build): Set %DEFAULT-PORT-CONVERSION-STRATEGY to 'error. * guix/packages.scm (patch-and-repack)[builder]: Likewise. Ludovic Courtès
2015-02-27build-system/gnu: Set $LC_ALL (or similar) to the chosen locale....Suggested by Mark H Weaver. * guix/build/utils.scm (locale-category->string): New procedure. * guix/build/gnu-build-system.scm (install-locale): Add 'setenv' call. Ludovic Courtès
2015-02-26build-system/gnu: Add 'install-locale' phase....* guix/build/gnu-build-system.scm (install-locale): New procedure. (%standard-phases): Add it. * guix/build-system/gnu.scm (gnu-build): Add #:locale and pass it to the build script. (gnu-cross-build): Likewise. Ludovic Courtès
2015-02-26build-system/gnu: Add support for zip archives....Fixes <http://bugs.gnu.org/19866>. Reported by Andreas Enge <andreas@enge.fr>. * guix/build/gnu-build-system.scm (unpack): Use 'unzip' when SOURCE ends in '.zip'. Ludovic Courtès
2015-01-09build-system/gnu: Patch /usr/bin/file in all 'configure' files....* guix/build/utils.scm (patch-/usr/bin/file): New procedure. * guix/build/gnu-build-system.scm (patch-usr-bin-file): Rewrite using it. Patch all the files returned by 'find-files' that are executable. * gnu/packages/gawk.scm (gawk)[arguments]: Remove use of 'substitute*' for 'extension/configure'. Ludovic Courtès
2015-01-04build-system/gnu: Use executables from the target inputs in 'patch-shebangs'....Fixes <http://bugs.gnu.org/18895>. * guix/build/gnu-build-system.scm (patch-shebangs): Add #:inputs parameter. Remove 'bindirs'. Add 'bin-directories', 'output-bindirs', and 'input-bindirs'. Use them instead of (getenv "PATH") to as the argument to 'patch-shebang'. Ludovic Courtès
2014-12-29gnu: Revert use of '--strip-all'....This reverts commits f05bdc9412135f34a1c417edc203c35cd005d0d5 and 856ae5e6c71a1283a414d33e638051f95d3cce35. This broke all sorts of things. See <http://hydra.gnu.org/eval/102058>, for example. Ludovic Courtès