From 73e838749a11646edd138ecea8863464558f7b3b Mon Sep 17 00:00:00 2001 From: E <79379754+oech3@users.noreply.github.com> Date: Sat, 25 Oct 2025 18:19:05 +0900 Subject: [PATCH 1/3] Fix SKIP_UTILS for hashsums --- .github/workflows/CICD.yml | 5 +++-- GNUmakefile | 20 ++++++++++++-------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 99b7c996be6..db6e1c1d131 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -341,16 +341,17 @@ jobs: ! test -f /tmp/usr/local/share/zsh/site-functions/_install ! test -f /tmp/usr/local/share/bash-completion/completions/head ! test -f /tmp/usr/local/share/fish/vendor_completions.d/cat.fish - - name: "`make install MULTICALL=n`" + - name: "`make install MULTICALL=n SKIP_UTILS=b3sum`" shell: bash run: | set -x DESTDIR=/tmp/ make PROFILE=release MULTICALL=n install # Check that the utils are present test -f /tmp/usr/local/bin/hashsum + # Check that b3sum is not present + ! test -e /tmp/usr/local/bin/b3sum # Check that hashsum symlinks are present test -h /tmp/usr/local/bin/b2sum - test -h /tmp/usr/local/bin/b3sum test -h /tmp/usr/local/bin/md5sum test -h /tmp/usr/local/bin/sha1sum test -h /tmp/usr/local/bin/sha224sum diff --git a/GNUmakefile b/GNUmakefile index e4bc5f4355f..dbdcac385dd 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -198,23 +198,26 @@ SELINUX_PROGS := \ chcon \ runcon -HASHSUM_PROGS := \ - b2sum \ +# Allow to drop hashsums not in GNU coreutils +EXTRA_HASHSUM_PROGS ?= \ b3sum \ - md5sum \ - sha1sum \ - sha224sum \ - sha256sum \ sha3-224sum \ sha3-256sum \ sha3-384sum \ sha3-512sum \ - sha384sum \ sha3sum \ - sha512sum \ shake128sum \ shake256sum +HASHSUM_PROGS := $(EXTRA_HASHSUM_PROGS) \ + b2sum \ + md5sum \ + sha1sum \ + sha224sum \ + sha256sum \ + sha384sum \ + sha512sum + $(info Detected OS = $(OS)) # Don't build the SELinux programs on macOS (Darwin) and FreeBSD @@ -229,6 +232,7 @@ ifneq ($(OS),Windows_NT) endif UTILS ?= $(filter-out $(SKIP_UTILS),$(PROGS)) +HASHSUM_PROGS ?= $(filter-out $(SKIP_UTILS),$(HASHSUM_PROGS)) ifneq ($(findstring stdbuf,$(UTILS)),) # Use external libstdbuf per default. It is more robust than embedding libstdbuf. From 7b2e3adda52831a317cd16767c5c00d25fd0a8ce Mon Sep 17 00:00:00 2001 From: E <79379754+oech3@users.noreply.github.com> Date: Sat, 25 Oct 2025 18:25:16 +0900 Subject: [PATCH 2/3] Replace dangerous ?= --- GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index dbdcac385dd..0a65cb499ec 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -232,7 +232,7 @@ ifneq ($(OS),Windows_NT) endif UTILS ?= $(filter-out $(SKIP_UTILS),$(PROGS)) -HASHSUM_PROGS ?= $(filter-out $(SKIP_UTILS),$(HASHSUM_PROGS)) +HASHSUM_PROGS := $(filter-out $(SKIP_UTILS),$(HASHSUM_PROGS)) ifneq ($(findstring stdbuf,$(UTILS)),) # Use external libstdbuf per default. It is more robust than embedding libstdbuf. From c34261b85ee58d689c21f3b34954fb0299a4c0cc Mon Sep 17 00:00:00 2001 From: E <79379754+oech3@users.noreply.github.com> Date: Tue, 28 Oct 2025 17:49:49 +0900 Subject: [PATCH 3/3] GNUmakefile: better way to filter-out HASHSUM_PROGS --- GNUmakefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 5df21f0616a..c41b34d287e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -233,8 +233,9 @@ ifneq ($(OS),Windows_NT) endif UTILS ?= $(filter-out $(SKIP_UTILS),$(PROGS)) -HASHSUM_PROGS := $(filter-out $(SKIP_UTILS),$(HASHSUM_PROGS)) -ifneq ($(filter hashsum,$(UTILS)),hashsum) +ifeq ($(filter hashsum,$(UTILS)),hashsum) + HASHSUM_PROGS := $(filter-out $(SKIP_UTILS),$(HASHSUM_PROGS)) +else HASHSUM_PROGS := endif