#!/bin/sh # From Gerrit Code Review 3.6.1 # # Part of Gerrit Code Review (https://www.gerritcodereview.com/) # # Copyright (C) 2009 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ### Guix modifications start COMMIT_MSG_MAGIC=VGhpcyBpcyB0aGUgY29tbWl0LW1zZyBob29rIG9mIEd1aXg= top=$(git rev-parse --show-toplevel) if test -d "$top/.git/hooks/commit-msg.d/"; then for msg_hook in "$top/.git/hooks/commit-msg.d/"*; do if ! sh "$msg_hook"; then echo "error while running $msg_hook" exit 1 fi done fi ### Guix modifications end set -u # avoid [[ which is not POSIX sh. if test "$#" != 1 ; then echo "$0 requires an argument." exit 1 fi if test ! -f "$1" ; then echo "file does not exist: $1" exit 1 fi # Do not create a change id if requested if test "false" = "$(git config --bool --get gerrit.createChangeId)" ; then exit 0 fi if git rev-parse --verify HEAD >/dev/null 2>&1; then refhash="$(git rev-parse HEAD)" else refhash="$(git hash-object -t tree /dev/null)" fi random=$({ git var GIT_COMMITTER_IDENT ; echo "$refhash" ; cat "$1"; } | git hash-object --stdin) dest="$1.tmp.${random}" trap 'rm -f "${dest}"' EXIT if ! git stripspace --strip-comments < "$1" > "${dest}" ; then echo "cannot strip comments from $1" exit 1 fi if test ! -s "${dest}" ; then echo "file is empty: $1" exit 1 fi reviewurl="$(git config --get gerrit.reviewUrl)" if test -n "${reviewurl}" ; then if ! git interpret-trailers --parse < "$1" | grep -q '^Link:.*/id/I[0-9a-f]\{40\}$' ; then if ! git interpret-trailers \ --trailer "Link: ${reviewurl%/}/id/I${random}" < "$1" > "${dest}" ; then echo "cannot insert link footer in $1" exit 1 fi fi else # Avoid the --in-place option which only appeared in Git 2.8 # Avoid the --if-exists option which only appeared in Git 2.15 if ! git -c trailer.ifexists=doNothing interpret-trailers \ --trailer "Change-Id: I${random}" < "$1" > "${dest}" ; then echo "cannot insert change-id line in $1" exit 1 fi fi if ! mv "${dest}" "$1" ; then echo "cannot mv ${dest} to $1" exit 1 fi _FILE_NAME_LIMITS): Fix spelling of maximum. Change-Id: I93c80441393622a4bc06daa475eee13874cca527 Efraim Flashner 2023-03-16build: Correct guix_system on musl libc distros....* m4/guix.m4 (GUIX_SYSTEM_TYPE): Add linux-musl* case. This prevents the macro from mis-parsing the host OS, which causes breakage when building from source. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Antero Mejr 2022-01-14gnu: bootstrap: Add support for riscv64-linux....On 7d93b21ab1c132990054372a9677c1639d54e631 gnu: glibc-for-bootstrap: Update patch. Run ./pre-inst-env guix build --target=riscv64-linux-gnu bootstrap-tarballs Producing /gnu/store/4hdzva9i0wyyfbgj1lmqc1wkk644pv07-bootstrap-tarballs-0 With guix hash -rx 1nj0fdgj08bbmfny01mp2blv7c3p2iciqh31zmf04ap5s7ygsqlp * gnu/packages/bootstrap.scm (%bootstrap-executables): Add entries for riscv64-linux. (%bootstrap-guile-hash, %bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc, %bootstrap-gcc): Add entry for riscv64-linux. (raw-build-guile3): New procedure. (make-raw-bag): Use raw-build-guile3 for riscv64-linux. * guix/packages.scm (%supported-systems): Add riscv64-linux. (%cuirass-supported-systems): Remove riscv64-linux. * guix/utils.scm (target-64bit?): Add riscv64-linux. * m4/guix.m4: Add riscv64-linux as a supported system. * doc/guix.texi (GNU Distribution): Add riscv64-linux. Efraim Flashner 2021-12-14build: Adjust 'courage level' of different systems....* m4/guix.m4 (GUIX_ASSERT_SUPPORTED_SYSTEM): Add i586-gnu. Move powerpc-linux to unsupported but not needing courage. Add mips64el-linux to unsupported. Efraim Flashner