aboutsummaryrefslogtreecommitdiff
# GNU Guix --- Functional package management for GNU
# Copyright © 2013, 2014, 2020 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 authenticate' command-line utility.
#

guix authenticate --version

sig="t-signature-$$"
hash="t-hash-$$"
rm -f "$sig" "$hash"

trap 'rm -f "$sig" "$hash"' EXIT

key="$abs_top_srcdir/tests/keys/signing-key.sec"
key_len="`echo -n $key | wc -c`"

# A hexadecimal string as long as a sha256 hash.
hash="2749f0ea9f26c6c7be746a9cff8fa4c2f2a02b000070dba78429e9a11f87c6eb"
hash_len="`echo -n $hash | wc -c`"

echo "sign $key_len:$key $hash_len:$hash" | guix authenticate > "$sig"
test -f "$sig"
case "$(cat $sig)" in
    "0 "*) ;;
    *)     echo "broken signature: $(cat $sig)"
	   exit 42;;
esac

# Remove the leading "0".
sed -i "$sig" -e's/^0 //g'

hash2="$(echo verify $(cat "$sig") | guix authenticate)"
test "$(echo $hash2 | cut -d : -f 2)" = "$hash"

# Detect corrupt signatures.
code="$(echo "verify 5:wrong" | guix authenticate | cut -f1 -d ' ')"
test "$code" -ne 0

# Detect invalid signatures.
# The signature has (payload (data ... (hash sha256 #...#))).  We proceed by
# modifying this hash.
sed -i "$sig"											\
    -e's|#[A-Z0-9]\{64\}#|#0000000000000000000000000000000000000000000000000000000000000000#|g'
code="$(echo "verify $(cat $sig)" | guix authenticate | cut -f1 -d ' ')"
test "$code" -ne 0

# Make sure byte strings are correctly encoded.  The hash string below is
# "café" repeated 8 times.  Libgcrypt would normally choose to write it as a
# string rather than a hex sequence.  We want that string to be Latin-1
# encoded independently of the current locale: <https://bugs.gnu.org/43421>.
hash="636166e9636166e9636166e9636166e9636166e9636166e9636166e9636166e9"
latin1_cafe="caf$(printf '\351')"
echo "sign 26:tests/keys/signing-key.sec 64:$hash" | guix authenticate \
    | LC_ALL=C grep "hash sha256 \"$latin1_cafe"

# Test for <http://bugs.gnu.org/17312>: make sure 'guix authenticate' produces
# valid signatures when run in the C locale.
hash="5eff0b55c9c5f5e87b4e34cd60a2d5654ca1eb78c7b3c67c3179fed1cff07b4c"

LC_ALL=C
export LC_ALL

echo "sign $key_len:$key $hash_len:$hash" | guix authenticate > "$sig"

# Remove the leading "0".
sed -i "$sig" -e's/^0 //g'

echo "verify $(cat $sig)" | guix authenticate
hash2="$(echo "verify $(cat $sig)" | guix authenticate | cut -f2 -d ' ')"
test "$(echo $hash2 | cut -d : -f 2)" = "$hash"
led-chromium: Update to 112.0.5615.165-1....* gnu/packages/chromium.scm (%chromium-version): Set to 112.0.5615.165. (%ungoogled-origin, ungoogled-chromium): Update hashes. Marius Bakke 2023-04-30gnu: ungoogled-chromium: Update to 111.0.5563.146-1....* gnu/packages/chromium.scm (%preserved-third-party-files): Adjust for M111. (%chromium-version): Set to 111.0.5563.146. (%ungoogled-origin): Update hash. (%chromium-gcc-patchset, gcc-patch, %gcc-patches): Remove variables. (%arch-patches): Remove obsolete. (ungoogled-chromium)[source](sha256): Update hash. Marius Bakke 2023-04-30gnu: ungoogled-chromium: Update to 110.0.5481.177-1....* gnu/packages/chromium.scm (%preserved-third-party-files): Adjust for M110. (%chromium-version): Set to 110.0.5481.177. (%debian-revision): Bump. (%ungoogled-origin, %debian-origin): Update hashes. (%debian-patches): Remove obsolete patch. (ungoogled-chromium-snippet): Use upstream jsoncpp unbundle script. (ungoogled-chromium)[source](sha256): Update hash. [arguments]: Remove obsolete configure flags and substitution. Use system libffi. Marius Bakke 2023-04-30gnu: ungoogled-chromium: Don't add absolute references to libGL and libvulkan....Keeping track of the uses of these libraries is a lot of work and ultimately not worth the trouble -- especially since Chromium supports multiple libGL's with different ABIs. Instead we take the easy route and rely on a search path. * gnu/packages/chromium.scm (ungoogled-chromium)[arguments]: Remove patching of libGL.so and libvulkan.so. Instead wrap with LD_LIBRARY_PATH. Marius Bakke 2023-03-31gnu: Replace all uses of atk by at-spi2-core....* gnu/packages/animation.scm (gnash) * gnu/packages/chromium.scm (ungoogled-chromium) * gnu/packages/crates-gtk.scm (rust-atk-sys-0.14, rust-atk-sys-0.10, rust-atk-0.14, rust-gtk-0.14) * gnu/packages/gimp.scm (gimp) * gnu/packages/gnome.scm (evince, glade3, clutter, totem, rhythmbox, mutter, ghex): * gnu/packages/graphviz.scm (xdot) * gnu/packages/gtk.scm (gtk+-2, gtk+, guile-gnome, atkmm) * gnu/packages/mate.scm (mate-applets, atril, mate-control-center, mate-calc, mate-utils, eom, pluma) * gnu/packages/messaging.scm (dino) * gnu/packages/qt.scm (qtwebengine-5) * gnu/packages/rust-apps.scm (alfis) * gnu/packages/vim.scm (vim-full) * gnu/packages/vnc.scm (remmina) * gnu/packages/web.scm (castor): Replace atk by at-spi2-core. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Josselin Poiret 2023-02-25gnu: ungoogled-chromium: Adapt patches....* gnu/packages/chromium.scm (%debian-revision): Move to a later release for Debian patches. (%ungoogled-origin): Update hash accordingly. (%debian-patches): Enable "fixes/clang-and-gcc11.patch". Andreas Enge 2023-01-30Merge remote-tracking branch 'origin/master' into core-updates... Conflicts: doc/guix.texi gnu/local.mk gnu/packages/admin.scm gnu/packages/base.scm gnu/packages/chromium.scm gnu/packages/compression.scm gnu/packages/databases.scm gnu/packages/diffoscope.scm gnu/packages/freedesktop.scm gnu/packages/gnome.scm gnu/packages/gnupg.scm gnu/packages/guile.scm gnu/packages/inkscape.scm gnu/packages/llvm.scm gnu/packages/openldap.scm gnu/packages/pciutils.scm gnu/packages/ruby.scm gnu/packages/samba.scm gnu/packages/sqlite.scm gnu/packages/statistics.scm gnu/packages/syndication.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/version-control.scm gnu/packages/xml.scm guix/build-system/copy.scm guix/scripts/home.scm Efraim Flashner 2023-01-26gnu: ungoogled-chromium: Update to 109.0.5414.119-1....* gnu/packages/chromium.scm (%chromium-version): Set to 109.0.5414.119. (%ungoogled-origin): Update hash. (ungoogled-chromium)[source]: Likewise. [arguments]: Use delete-file-recursively instead of rmdir for compatibility with downstream versions. Remove unused binding. Marius Bakke 2023-01-13gnu: ungoogled-chromium: Update to 109.0.5414.74-1....* gnu/packages/chromium.scm (%preserved-third-party-files): Adjust for M109. (%chromium-version): Set to 109.0.5414.74. (%arch-revision): Bump to latest. (%arch-patches): Add one patch. (%ungoogled-origin): Update hash. (ungoogled-chromium)[source]: Likewise. [arguments]: Disable H264 for WebRTC. Delete one directory. Remove obsolete substitution. [native-inputs]: Add PYTHON-PYYAML. Marius Bakke 2023-01-08gnu: pipewire: Switch default to 0.3....* gnu/packages/linux.scm (pipewire): Switch to pipewire 0.3. (pipewire-0.3): Remove variable. (wireplumber): Replace all pipewire-0.3 by pipewire. * gnu/packages/audio.scm (qpwgraph): Ditto. * gnu/packages/chromium.scm (ungoogled-chromium): Ditto. * gnu/packages/freedesktop.scm (weston, xdg-desktop-portal, xdg-desktop-portal-wlr): Ditto. * gnu/packages/gnome.scm (mutter): Ditto. * gnu/packages/kde-systemtools.scm (krfb): Ditto. * gnu/packages/telegram.scm (webrtc-for-telegram-desktop): Ditto. * gnu/packages/video.scm (obs): Ditto. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Brendan Tildesley 2022-12-17gnu: ungoogled-chromium: Update to 108.0.5359.124-1....* gnu/packages/chromium.scm (%chromium-version): Set to 108.0.5359.124. (%ungoogled-origin, ungoogled-chromium): Update hashes. Marius Bakke 2022-12-12gnu: ungoogled-chromium: Build with ffmpeg@4....This is a follow-up to commit 79564bf9977ebba0b31d8dc291eb039142f51f68. * gnu/packages/chromium.scm (ungoogled-chromium)[inputs]: Change from FFMPEG to FFFMPEG-4. Marius Bakke 2022-12-08gnu: ungoogled-chromium: Remove obsolete workaround....* gnu/packages/chromium.scm (ungoogled-chromium)[version]: Remove conditional. Marius Bakke 2022-12-08gnu: ungoogled-chromium: Update to 108.0.5359.98-1....* gnu/packages/chromium.scm (%chromium-version): Set to 108.0.5359.98. (%ungoogled-origin, ungoogled-chromium): Update hashes. Marius Bakke 2022-12-03gnu: ungoogled-chromium: Update to 108.0.5359.94-1....* gnu/packages/chromium.scm (%chromium-version): Set to 108.0.5359.94. (%ungoogled-origin, ungoogled-chromium): Update hashes. Marius Bakke 2022-12-02gnu: ungoogled-chromium: Use git tag in ungoogled origin....* gnu/packages/chromium.scm (%ungoogled-origin)[uri]: Use %UNGOOGLED-REVISION instead of commit identifier. Marius Bakke 2022-12-02gnu: ungoogled-chromium: Update to 108.0.5359.71-1....* gnu/packages/chromium.scm (%preserved-third-party-files): Adjust for M108. (%chromium-version): Set to 108.0.5359.71-1. (%arch-revision): Bump to newer commit. (%ungoogled-origin): Update hash. (%gcc-patches): Remove. (%reverse-patches): Remove one patch. (%arch-patches): New variable. (%patches): New variable. (ungoogled-chromium-snippet): Apply %PATCHES instead of individual variables. (ungoogled-chromium)[source]: Update hash. [arguments]: Adjust configure flag. [inputs]: Change from HARFBUZZ-3 to HARFBUZZ-5. Marius Bakke 2022-12-02gnu: ungoogled-chromium: Generalize OpenJPEG substitution....* gnu/packages/chromium.scm (ungoogled-chromium)[arguments]: Don't hard code openjpeg version. Marius Bakke 2022-11-27gnu: ungoogled-chromium: Update to 107.0.5304.121-1....* gnu/packages/chromium.scm (%chromium-version): Set to 107.0.5304.121. (%ungoogled-origin, ungoogled-chromium): Update hashes. Marius Bakke 2022-11-17gnu: ungoogled-chromium: Build with Clang 15....* gnu/packages/chromium.scm (ungoogled-chromium)[arguments]: Remove obsolete compiler flags. [native-inputs]: Change from CLANG-14 and LLD-AS-LD-WRAPPER to CLANG-15 and LLD-AS-LD-WRAPPER-15. Marius Bakke 2022-11-17gnu: ungoogled-chromium-wayland: Use PipeWire by default....* gnu/packages/chromium.scm (ungoogled-chromium/wayland)[arguments]<#:builder>: Add --enable-features=WebRTCPipeWireCapture to wrapping executable. Andrew Tropin 2022-11-11gnu: ungoogled-chromium: Update to 107.0.5304.110-1....* gnu/packages/chromium.scm (%chromium-version): Set to 107.0.5304.110. (%ungoogled-origin, ungoogled-chromium): Update hashes. Marius Bakke 2022-11-03gnu: ungoogled-chromium: Update to 107.0.5304.87-1....* gnu/packages/chromium.scm (%chromium-version): Set to 107.0.5304.87. (%ungoogled-origin, ungoogled-chromium): Update hashes. Marius Bakke 2022-10-27gnu: ungoogled-chromium: Update to 107.0.5304.68-1....* gnu/packages/chromium.scm (%preserved-third-party-files): Adjust for M107. (%chromium-version): Set to 107.0.5304.68. (%ungoogled-origin): Update hash. (%chromium-gcc-patchset, gcc-patch): Remove. (%gcc-patches): Empty list. (ungoogled-chromium)[source]: Update hash. [arguments]: Add clang_base_path and use_system_libwayland_server to #:configure-flags. Adjust substitutions. [inputs]: Add QTBASE-5. Marius Bakke