Make some of the changes needed to the 'makeicecat' script, to allow it to run in a snippet without network access. After this patch is applied, some additional changes will be made using 'substitute*'. diff --git a/makeicecat b/makeicecat index bf2b7a6..bc3b19b 100755 --- a/makeicecat +++ b/makeicecat @@ -56,7 +56,7 @@ readonly SOURCEDIR=icecat-${FFVERSION} # debug/shell options readonly DEVEL=0 set -euo pipefail -(( DEVEL )) && set -x +set -x ############################################################################### @@ -455,7 +455,7 @@ configure_search() # Process various JSON pre-configuration dumps. - python3 ../../tools/process-json-files.py . browser/components/extensions/schemas/ + python3 "${DATADIR}"/../tools/process-json-files.py . browser/components/extensions/schemas/ } configure_mobile() @@ -837,12 +837,12 @@ finalize_sourceball() # entry point ############################################################################### -validate_env || exit 1 -prepare_env -fetch_source -verify_sources -extract_sources -fetch_l10n +# validate_env || exit 1 +# prepare_env +# fetch_source +# verify_sources +# extract_sources +# fetch_l10n apply_patches configure configure_search @@ -854,4 +854,4 @@ prepare_macos_packaging configure_extensions configure_onboarding apply_bugfixes -finalize_sourceball +# finalize_sourceball >treecommitdiff
path: root/tests/build-utils.scm
AgeCommit message (Collapse)Author
2022-01-10utils: Fix wrap-script argument handling.Brendan Tildesley
* guix/build/utils.scm (wrap-script): Don't add (car cl) one too many times, cl its self contains it's car. Split the aguments string with string-tokenize to avoid leaving an empty string argument when there should be none. These two bugs seemed to be partially cancelling each other out so that scripts still worked when ran with no arguments. * tests/build-utils.scm: Adjust wrap-script to above changes. Add two tests to ensure the command line arguments appear identical to a script and its wrapped version. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2021-06-04utils: Define ‘search-input-file’ procedure.Maxime Devos
The procedure ‘which’ from (guix build utils) is used for two different purposes: 1. for finding the absolute file name of a binary that needs to run during the build process 2. for finding the absolute file name of a binary, for the target system (as in --target=TARGET), e.g. for substituting sh->/gnu/store/.../bin/sh, python->/gnu/store/.../bin/python. When compiling natively (target=#f in Guix parlance), this is perfectly fine. However, when cross-compiling, there is a problem. "which" looks in $PATH for binaries. That's good for purpose (1), but incorrect for (2), as the $PATH contains binaries from native-inputs instead of inputs. This commit defines a ‘search-input-file’ procedure. It functions like 'which', but instead of searching in $PATH, it searches in the 'inputs' of the build phase, which must be passed to ‘search-input-file’ as an argument. Also, the file name must include "bin/" or "sbin/" as appropriate. * guix/build/utils.scm (search-input-file): New procedure. * tests/build-utils.scm ("search-input-file: exception if not found") ("search-input-file: can find if existent"): Test it. * doc/guix.texi (File Search): Document it. Partially-Fixes: <https://issues.guix.gnu.org/47869> Co-Authored-By: Ludovic Courtès <ludo@gnu.org> Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-01-08utils: Allow text substitution even in the presence of NUL characters.Mark H Weaver
Fixes <https://issues.guix.gnu.org/30116>. Before this change, the presence of a NUL character on a line meant that the (glibc) regexp engine used by Guile would either 1. stop scanning the string or 2. crash with the error "string contains #\\nul character", depending on the locale used. This change works around this limitation by first replacing the NUL character by an unused Unicode code point, doing the substitution, then reverting the replacement. * guix/build/utils.scm (unused-private-use-code-point) (replace-char): New procedures. (substitute): Make use of the above procedures to work around the NUL character regexp engine limitation. * tests/build-utils.scm: Add tests. Co-authored-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>