aboutsummaryrefslogtreecommitdiff
#!/bin/sh

# This hook script prevents the user from pushing to Savannah if any of the new
# commits' OpenPGP signatures cannot be verified, or if a commit is signed
# with an unauthorized key.

# Called by "git push" after it has checked the remote status, but before
# anything has been pushed.  If this script exits with a non-zero status nothing
# will be pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
#
# If pushing without using a named remote those arguments will be equal.
#
# Information about the commits which are being pushed is supplied as lines to
# the standard input in the form:
#
#   <local ref> <local sha1> <remote ref> <remote sha1>

# This is the "empty hash" used by Git when pushing a branch deletion.
z40=0000000000000000000000000000000000000000

while read local_ref local_hash remote_ref remote_hash
do
	# When deleting a remote branch, no commits are pushed to the remote, and
	# thus there are no signatures to be verified.
	if [ "$local_hash" != $z40 ]
	then
		# Only use the hook when pushing to Savannah.
		case "$2" in
		    *.gnu.org*)
			set -e
			make check-channel-news
			exec guix git authenticate
			exit 127
			;;
		    *)
			exit 0
			;;
		esac
	fi
done

exit 0
ue-1): Fix synopsis. (rust-pico-args-0.5): Fix synopsis. (rust-pnet-base-0.34): Fix synopsis. (rust-postcard-1): Fix synopsis. (rust-profiling-procmacros-1): Fix synopsis. (rust-pyproject-toml-0.8): Fix synopsis. (rust-railroad-0.2): Fix synopsis. (rust-rstest-macros-0.18): Fix synopsis. (rust-rustdoc-json-0.8): Fix synopsis. (rust-serde-big-array-0.5): Fix synopsis. (rust-structmeta-0.2): Fix synopsis. (rust-subplotlib-derive-0.7): Fix synopsis. (rust-sval-ref-2): Fix synopsis. (rust-thiserror-1): Fix synopsis. (rust-thiserror-core-1): Fix synopsis. (rust-thousands-0.2): Fix synopsis. (rust-tokio-uring-0.4): Fix synopsis. (rust-ubyte-0.10): Fix synopsis. (rust-udev-0.7): Fix synopsis. (rust-ufmt-macros-0.3): Fix synopsis. (rust-ufmt-write-0.1): Fix synopsis. (rust-urlencoding-2): Fix synopsis. * gnu/packages/crates-web.scm (rust-hyper-native-tls-0.3): Fix synopsis. (rust-tonic-0.10): Fix synopsis. (rust-trust-dns-native-tls-0.20): Fix synopsis. (rust-trust-dns-openssl-0.20): Fix synopsis. (rust-trust-dns-rustls-0.20): Fix synopsis. (rust-wiremock-0.5): Fix synopsis. Signed-off-by: Vagrant Cascadian <vagrant@debian.org> Gabriel Wicki 2024-12-08gnu: Add rust-cdshealpix-0.7....* gnu/packages/crates-io.scm (rust-cdshealpix-0.7): New variable. Change-Id: Iefc7ee7018725e3072bf7696445aab20f6f9bd32 Reviewed-by: Efraim Flashner <efraim@flashner.co.il> Sharlatan Hellseher 2024-12-08gnu: Add rust-katex-doc-0.1....* gnu/packages/crates-io.scm (rust-katex-doc-0.1): New variable. Change-Id: I62b79193b8b7764bffeb0dba23e110a34a705416 Reviewed-by: Efraim Flashner <efraim@flashner.co.il> Sharlatan Hellseher 2024-12-08gnu: Add rust-mapproj-0.3....* gnu/packages/crates-io.scm (rust-mapproj-0.3): New variable. Change-Id: Idf2f2cf69fdd38c7246fa49fdd61ffff450b891d Reviewed-by: Efraim Flashner <efraim@flashner.co.il> Sharlatan Hellseher 2024-12-08gnu: Add rust-stc-s-0.1....* gnu/packages/crates-io.scm (rust-stc-s-0.1): New variable. Change-Id: Ic6cb2c8f598219126a1d55ed979f42f0cca3e524 Reviewed-by: Efraim Flashner <efraim@flashner.co.il> Sharlatan Hellseher