Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,28 @@ jobs:
test -f target/CACHEDIR.TAG
# Restore cache for target/release (we only did a debug build)
mv -t target/ target.cache/release 2>/dev/null || true
- name: "Verify bootstrap fix (issue #8837)"
shell: bash
run: |
set -x
# Verify that locales were successfully copied during build
# This ensures the bootstrap issue is fixed - the build should work
# even without relying on system 'install' command

test -d target/debug/locales || { echo "::error ::Locales directory not created"; exit 1; }

# Check for uucore common locales
test -f target/debug/locales/uucore/fr-FR.ftl || { echo "::error ::uucore locale not copied"; exit 1; }

# Check for at least a few utility-specific locales
test -f target/debug/locales/ls/fr-FR.ftl || { echo "::error ::ls locale not copied"; exit 1; }
test -f target/debug/locales/cat/fr-FR.ftl || { echo "::error ::cat locale not copied"; exit 1; }

# Count total locale files to ensure reasonable number were copied
LOCALE_COUNT=$(find target/debug/locales -name "*.ftl" | wc -l)
echo "Found $LOCALE_COUNT locale files"
[ "$LOCALE_COUNT" -gt 50 ] || { echo "::error ::Too few locale files copied ($LOCALE_COUNT)"; exit 1; }

- name: "`make nextest`"
shell: bash
run: make nextest CARGOFLAGS="--profile ci --hide-progress-bar"
Expand Down
20 changes: 17 additions & 3 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ MULTICALL ?= n
COMPLETIONS ?= y
MANPAGES ?= y
LOCALES ?= y
INSTALL ?= install
ifneq (,$(filter install, $(MAKECMDGOALS)))
override PROFILE:=release
endif
Expand Down Expand Up @@ -53,6 +52,21 @@ endif
PKG_BUILDDIR := $(BUILDDIR)/deps
DOCSDIR := $(BASEDIR)/docs

# Bootstrap protection: When uutils is installed as system coreutils (e.g., on
# Gentoo), the system 'install' may be broken or missing, causing build failures.
# Use the just-built 'install' binary to avoid this chicken-and-egg problem.
# Falls back to system 'install' for first-time builds.
ifneq ($(wildcard $(BUILDDIR)/coreutils),)
# Use multicall binary's install command if it exists
INSTALL ?= $(BUILDDIR)/coreutils install
else ifneq ($(wildcard $(BUILDDIR)/install),)
# Use standalone install binary if built without multicall
INSTALL ?= $(BUILDDIR)/install
else
# Fall back to system install command for first build
INSTALL ?= install
endif

BUSYBOX_ROOT := $(BASEDIR)/tmp
BUSYBOX_VER := 1.36.1
BUSYBOX_SRC := $(BUSYBOX_ROOT)/busybox-$(BUSYBOX_VER)
Expand Down Expand Up @@ -449,7 +463,7 @@ locales:
@if [ -d "$(BASEDIR)/src/uucore/locales" ]; then \
mkdir -p "$(BUILDDIR)/locales/uucore"; \
for locale_file in "$(BASEDIR)"/src/uucore/locales/*.ftl; do \
$(INSTALL) -m 644 -v "$$locale_file" "$(BUILDDIR)/locales/uucore/"; \
cp -v "$$locale_file" "$(BUILDDIR)/locales/uucore/"; \
done; \
fi; \
# Copy utility-specific locales
Expand All @@ -458,7 +472,7 @@ locales:
mkdir -p "$(BUILDDIR)/locales/$$prog"; \
for locale_file in "$(BASEDIR)"/src/uu/$$prog/locales/*.ftl; do \
if [ "$$(basename "$$locale_file")" != "en-US.ftl" ]; then \
$(INSTALL) -m 644 -v "$$locale_file" "$(BUILDDIR)/locales/$$prog/"; \
cp -v "$$locale_file" "$(BUILDDIR)/locales/$$prog/"; \
fi; \
done; \
fi; \
Expand Down
Loading