meso-web

Sources of the |Méso|Star> website
git clone git://git.meso-star.fr/meso-web.git
Log | Files | Refs | README | LICENSE

commit 9383a9870222ffe325294376bfc0c4b4b88460d4
parent fecf792f2baae4c241a9941cd0c68abb84875e41
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon, 25 Aug 2025 12:15:12 +0200

By default, no longer sign archives

Users may prefer to distribute unsigned archives or use a method other
than GPG to sign them. Archive signing is now managed by hooks.

Diffstat:
MMakefile | 8+-------
Mlist.sh | 19-------------------
Asolstice/hooks/xx-sign-archives.sh | 36++++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+), 26 deletions(-)

diff --git a/Makefile b/Makefile @@ -25,13 +25,12 @@ default: build build clean distclean lint install: .hooks @$(MAKE) -f.hooks -fMakefile $@__ \ HTML="$$($(SHELL) ./list.sh html | tr '\n' ' ')" \ - SIG="$$( $(SHELL) ./list.sh sig | tr '\n' ' ')" \ SH="$$( $(SHELL) ./list.sh shell | tr '\n' ' ')" .hooks: hooks.sh $(SHELL) hooks.sh > $@ -build__: $(HTML) $(SIG) +build__: $(HTML) clean__: rm -f .hooks @@ -39,7 +38,6 @@ clean__: rm -f $(SH:.sh=.md) distclean__: clean__ - rm -f $(SIG) install__: $(HTML) $(SIG) @rsync --mkpath -avzrR --delete-after --progress \ @@ -50,10 +48,6 @@ install__: $(HTML) $(SIG) ################################################################################ $(HTML): generate_header.sh -$(SIG): $(@:.sig=) - @echo "Signing $@" - @gpg --yes -a -o $@ --detach-sign $(@:.sig=) - .sh.md: @cd -- "$$(dirname "$<")"; \ $(SHELL) ./"$$(basename "$<")" > "$$(basename "$@")" diff --git a/list.sh b/list.sh @@ -58,25 +58,6 @@ hook() | sort" } -# List of signatures to be performed, i.e. the signature of each -# archive stored in the "downloads" subdirectory of each section -sig() -{ - _find_args="$(printf '%s\n' "${sections}" \ - | sed -e 's/^/-path "/;s/$/\/downloads\/*" -o/' \ - | tr '\n' ' ' \ - | sed 's/ -o $//')" - - eval "exec find ${search_dirs} \( \( ${_find_args} \) -type f \ - \( \ - -name \"*.tgz\" \ - -o -name \"*.tar.gz\" \ - -o -name \"*.tar\" \ - -o -name \"*.zip\" \ - \) \) -exec sh -c 'printf \"%s.sig\n\" \"\$1\"' -- {} \; \ - | sort" -} - # List the shell scripts relevant to the compilation system, i.e. the # shell script at the root of the working tree and those in each section # used to generate HTML pages. diff --git a/solstice/hooks/xx-sign-archives.sh b/solstice/hooks/xx-sign-archives.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com) +# +# This program 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. +# +# This program 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 this program. If not, see <http://www.gnu.org/licenses/>. + +set -e + +find downloads \ + -name "*.tar" \ + -o -name "*.tar.gz" \ + -o -name "*.tgz" \ + -o -name "*.zip" \ +| while read -r i; do + + sign="${i}.sig" + + >&2 printf 'Signing %s\n' "${i}" + gpg --yes -a -o "${sign}" --detach-sign "${i}" + + # Write the generated files to standard output to inform the build + # system which files it needs to handle during installation. + printf '%s/%s\n' "${PWD##*/}" "${i}.sig" + +done