aboutsummaryrefslogtreecommitdiff
# GNU Guix --- Functional package management for GNU
# Copyright © 2020, 2022, 2024 Ludovic Courtès <ludo@gnu.org>
#
# This file is part of GNU Guix.
#
# GNU Guix is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or (at
# your option) any later version.
#
# GNU Guix is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

#
# Test the 'guix git authenticate' command-line utility.
#

# Skip if we're not in a Git checkout.
[ -d "$abs_top_srcdir/.git" ] || exit 77

# Skip if there's no 'keyring' branch.
guile -c '(use-modules (git))
  (member "refs/heads/keyring" (branch-list (repository-open ".")))' || \
    exit 77

# Keep in sync with '%default-channels' in (guix channels)!
intro_commit="9edb3f66fd807b096b48283debdcddccfea34bad"
intro_signer="BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA"

cache_key="test-$$"

# This must fail because the end commit is not a descendant of $intro_commit.
guix git authenticate "$intro_commit" "$intro_signer"	\
     --cache-key="$cache_key" --stats			\
     --end=9549f0283a78fe36f2d4ff2a04ef8ad6b0c02604 && false

# The v1.2.0 commit is a descendant of $intro_commit and it satisfies the
# authorization invariant.
v1_2_0_commit="a099685659b4bfa6b3218f84953cbb7ff9e88063"
guix git authenticate "$intro_commit" "$intro_signer"	\
     --cache-key="$cache_key" --stats			\
     --end="$v1_2_0_commit"

# Check a commit that came soon after v1.2.0.  No need to repeat $intro_commit
# and $intro_signer because it should have been recorded in '.git/config'.
after_v1_2_0="be4d9527b55b6829e33a6e0727496af25927a786"
guix git authenticate				\
     --cache-key="$cache_key" --stats		\
     --end="$v1_2_0_commit"

rm "$XDG_CACHE_HOME/guix/authentication/$cache_key"

# Commit and signer of the 'v1.0.0' tag.
v1_0_0_commit="6298c3ffd9654d3231a6f25390b056483e8f407c"
v1_0_0_signer="3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5" # civodul
v1_0_1_commit="d68de958b60426798ed62797ff7c96c327a672ac"

# This should succeed because v1.0.0 is an ancestor of $intro_commit.
guix git authenticate "$intro_commit" "$intro_signer"	\
     --cache-key="$cache_key" --stats			\
     --end="$v1_0_0_commit"

# This should fail because these commits lack '.guix-authorizations'.
guix git authenticate "$v1_0_0_commit" "$v1_0_0_signer" \
       --cache-key="$cache_key" --end="$v1_0_1_commit" && false

# This should work thanks to '--historical-authorizations'.
guix git authenticate "$v1_0_0_commit" "$v1_0_0_signer" 	\
     --cache-key="$cache_key" --end="$v1_0_1_commit" --stats	\
     --historical-authorizations="$abs_top_srcdir/etc/historical-authorizations"
43'>gnu: rust-coreaudio-sys-0.2: Update to 0.2.15....* gnu/packages/crates-apple.scm (rust-coreaudio-sys-0.2): Update to 0.2.15. [arguments]: Replace rust-bindgen-0.64 with 0.69. Change-Id: I71d6bd0f69859f33f45d267687cd7cc3fb70bdae Efraim Flashner 2024-02-20gnu: rust-cocoa-foundation-0.1: Update to 0.1.2....* gnu/packages/crates-apple.scm (rust-cocoa-foundation-0.1): Update to 0.1.2. Change-Id: I0e2b0232e53979bbda9fb5175403edd10a14786a Efraim Flashner 2024-02-20gnu: rust-cocoa-0.24: Update to 0.24.1....* gnu/packages/crates-apple.scm (rust-cocoa-0.24): Update to 0.24.1. Change-Id: I4e9365ce4a182b3cd9be885080fbf7fc1d619b95 Efraim Flashner 2024-02-20gnu: rust-block-sys-0.2: Update to 0.2.1....* gnu/packages/crates-apple.scm (rust-block-sys-0.2): Update to 0.2.1. [arguments]: Don't skip the build. Skip the tests. Change-Id: I748fed62c881e28fcb860b482bd30d8d92e79998 Efraim Flashner 2024-02-20gnu: rust-x509-parser: Move to (gnu packages crates-tls)....* gnu/packages/crates-io.scm (rust-x509-parser-0.15, rust-x509-parser-0.14, rust-x509-parser-0.12): Move from here ... * gnu/packages/crates-tls.scm: ... to here. Change-Id: If01b17cf9b418e15616f1b80cefe6b071c8a18b0 Efraim Flashner 2024-02-20gnu: Add rust-mach2-0.4....* gnu/packages/crates-apple.scm (rust-mach2-0.4): New variable. Change-Id: I20b06f1dfcb97c1cd9d9ac70dd47138746e2fc20 Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Wilko Meyer 2024-02-20gnu: Remove rust-security-framework-0.1....* gnu/packages/crates-apple.scm (rust-security-framework-0.1): Delete variable. Change-Id: I9d76a39d94e1365d43b9ef133212bae908d96d20 Efraim Flashner 2024-02-20gnu: Remove rust-security-framework-sys-0.1....* gnu/packages/crates-apple.scm (rust-security-framework-sys-0.1): Delete variable. Change-Id: I4b56205eddbe227b4a88b143c21fd020c5138402 Efraim Flashner 2024-02-20gnu: Add rust-cocoa-0.20....* gnu/packages/crates-apple.scm (rust-cocoa-0.20): New variable. Change-Id: I80b87f02d232ff46ab5709065437fdc217d85743 Efraim Flashner 2024-02-20gnu: rust-metal-0.18: Downgrade to 0.18.0....Later versions of this crate were yanked by upstream. * gnu/packages/crates-apple.scm (rust-metal-0.18): Downgrade to 0.18.0. [cargo-inputs]: Add rust-core-graphics-0.19. Replace rust-cocoa-0.22 with 0.20. Change-Id: I6d75e6bf94ebccd829c356cfe0bf1944ed1f3a0b Efraim Flashner 2024-02-20gnu: rust-fat-macho-0.4: Move to (gnu packages crates-apple)....* gnu/packages/crates-io.scm (rust-fat-macho-0.4): Move from here ... * gnu/packages/crates-apple.scm: ... to here. Change-Id: I94db36b2d2a02952f3ae141edbb72d7a8a445e9f Efraim Flashner 2024-02-20gnu: rust-mach: Move to (gnu packages crates-apple)....* gnu/packages/crates-io.scm (rust-mach-0.3, rust-mach-0.2, rust-mach-o-sys-0.1): Move from here ... * gnu/packages/crates-apple.scm: ... to here. Change-Id: I7d52ea709974637355038e8b43b4d193940529e0 Efraim Flashner 2024-02-20gnu: rust-commoncrypto: Move to (gnu packages crates-apple)....* gnu/packages/crates-io.scm (rust-commoncrypto-0.2, rust-commoncrypto-sys-0.2): Move from here ... * gnu/packages/crates-apple.scm: ... to here. Change-Id: I080088e9cea2631736e6fe06158f9263cbddbc5e Efraim Flashner 2024-02-20gnu: rust-metal-0.18: Move to (gnu packages crates-apple)....* gnu/packages/crates-io.scm (rust-metal-0.18): Move from here ... * gnu/packages/crates-apple.scm: ... to here. Change-Id: Ica5be709b1a1136cdca0f8b7febf6cf0c68187a4 Efraim Flashner 2024-02-20gnu: rust-icrate-0.0.4: Move to (gnu packages crates-apple)....* gnu/packages/crates-io.scm (rust-icrate-0.0.4): Move from here ... * gnu/packages/crates-apple.scm: ... to here. Change-Id: I567a637f64c4f5efc5f3cc73a28aee9f9a00c627 Efraim Flashner 2024-02-20gnu: rust-fsevent: Move to (gnu packages crates-apple)....* gnu/packages/crates-io.scm (rust-fsevent-2, rust-fsevent-0.4, rust-fsevent-sys-4, rust-fsevent-sys-3, rust-fsevent-sys-2): Move from here ... * gnu/packages/crates-apple.scm: ... to here. Change-Id: I7455ed5e15d312dcf2cc57c1e27ae8caaa47ed8c Efraim Flashner 2024-02-20gnu: rust-cocoa: Move to (gnu packages crates-apple)....* gnu/packages/crates-io.scm (rust-cocoa-0.25, rust-cocoa-0.24, rust-cocoa-0.23, rust-cocoa-0.22, rust-cocoa-0.19, rust-cocoa-0.18, rust-cocoa-foundation-0.1): Move from here ... * gnu/packages/crates-apple.scm: ... to here. Change-Id: Ie751274ae50082a1fcbc020dbb288d6b7370d6fe Efraim Flashner 2024-02-20gnu: rust-cargo-credential-macos-keychain: Move to crates-apple.scm....* gnu/packages/crates-io.scm (rust-cargo-credential-macos-keychain-0.4, rust-cargo-credential-macos-keychain-0.3): Move from here ... * gnu/packages/crates-apple.scm: ... to here. Change-Id: I6e8becddbeeebe282227dc09c012735134c84665 Efraim Flashner 2024-02-20gnu: rust-system-configuration: Move to (gnu packages crates-apple)....* gnu/packages/crates-io.scm (rust-system-configuration-0.5, rust-system-configuration-sys-0.5): Move from here ... * gnu/packages/crates-apple.scm: ... to here. Change-Id: Ia3794ce3ef56520dac26b44acfc91da7f7e3031f Efraim Flashner 2024-02-20gnu: rust-security-framework: Move to (gnu packages crates-apple)....* gnu/packages/crates-io.scm (rust-security-framework-2, rust-security-framework-1, rust-security-framework-0.3, rust-security-framework-0.2, rust-security-framework-0.1, rust-security-framework-sys-2, rust-security-framework-sys-1, rust-security-framework-sys-0.3, rust-security-framework-sys-0.2, rust-security-framework-sys-0.1): Move from here ... * gnu/packages/crates-apple.scm: ... to here. Change-Id: Ic3fed59019265d19f8c0efa992566691a6a807f6 Efraim Flashner 2024-02-20gnu: rust-readkey-0.1: Move to (gnu packages crates-apple)....* gnu/packages/crates-io.scm (rust-readkey-0.1): Move from here ... * gnu/packages/crates-apple.scm: ... to here. Change-Id: Ie24d9c158ee88d4f82572ae55326e5967b754d19 Efraim Flashner 2024-02-20gnu: rust-objc: Move to (gnu packages crates-apple)....* gnu/packages/crates-io.scm (rust-objc-0.2, rust-objc-exception-0.1, rust-objc-foundation-0.1, rust-objc-id-0.1, rust-objc-sys-0.3, rust-objc-sys-0.2, rust-objc-test-utils-0.0, rust-objc2-0.4, rust-objc2-0.3, rust-objc2-encode-3, rust-objc2-encode-2, rust-objc2-proc-macros-0.1): Move from here ... * gnu/packages/crates-apple.scm: ... to here. Change-Id: I7dedf9dd15aa36a6fd11c2e444499d87ef506107 Efraim Flashner 2024-02-20gnu: rust-dispatch: Move to (gnu packages crates-apple)....* gnu/packages/crates-io.scm (rust-dispatch-0.2, rust-dispatch-0.1): Move from here ... * gnu/packages/crates-apple.scm: ... to here. Change-Id: Ia7452e335031b66d14359f2ef9236fd210685506 Efraim Flashner 2024-02-20gnu: rust-core-text: Move to (gnu packages crates-apple)....* gnu/packages/crates-io.scm (rust-core-text-20, rust-core-text-19): Move from here ... * gnu/packages/crates-apple.scm: ... to here. Change-Id: Idbad69dd6e1bcbff80e6cb3ce699120edb5fa25c Efraim Flashner 2024-02-20gnu: rust-core-foundation: Move to (gnu packages crates-apple)....* gnu/packages/crates-io.scm (rust-core-foundation-0.9, rust-core-foundation-0.7, rust-core-foundation-0.6, rust-core-foundation-0.2, rust-core-foundation-sys-0.8, rust-core-foundation-sys-0.7, rust-core-foundation-sys-0.6, rust-core-foundation-sys-0.2): Move from here ... * gnu/packages/crates-apple.scm: ... to here. Change-Id: I01b1ab7a3bef25d33ea3bd0edc33398acad882e8 Efraim Flashner 2024-02-20gnu: rust-coreaudio: Move to (gnu packages crates-apple)....* gnu/packages/crates-io.scm (rust-coreaudio-rs-0.10, rust-coreaudio-sys-0.2): Move from here ... * gnu/packages/crates-apple.scm: ... to here. Change-Id: I3c9dec888f543cc63152d2a51f8699cc072a05f5 Efraim Flashner 2024-02-20gnu: rust-block: Move to (gnu packages crates-apple)....* gnu/packages/crates-io.scm (rust-block-0.1, rust-block2-0.3, rust-block2-0.2, rust-block-sys-0.2, rust-block-sys-0.1): Move from here ... * gnu/packages/crates-apple.scm: ... to here. * gnu/local.mk (GNU_SYSTEM_MODULES): Register new file. Change-Id: I278dfdb829340fba937d29691b1451401675c87b Efraim Flashner