From 6559e3829d204766cec6de81a000c38108983b06 Mon Sep 17 00:00:00 2001 From: Prateek Ganguli Date: Mon, 27 Jul 2026 08:58:36 +0800 Subject: [PATCH 1/3] devel/compose.yaml: set HOME so check-local works as non-root host user Running as an arbitrary host UID/GID has no matching /etc/passwd entry inside the container, so $HOME resolves to "/" and pkg install fails trying to create /.local/share/octave. Point HOME at the bind-mounted, host-owned workspace instead. --- .gitignore | 4 ++++ devel/compose.yaml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 699dd9f5..c6d7e775 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,10 @@ doc/control.svg /src/slicot_src/*.f /target +# HOME artifacts from `make check-local` (devel/compose.yaml sets HOME=/workspace) +/.local +/.config + # release checklists devel/release/release_*.md diff --git a/devel/compose.yaml b/devel/compose.yaml index 4e376cdb..2ee719fb 100644 --- a/devel/compose.yaml +++ b/devel/compose.yaml @@ -3,6 +3,8 @@ services: image: gnuoctave/octave:latest working_dir: /workspace user: "${HOST_UID:?set HOST_UID or run via make check-local, not docker compose directly}:${HOST_GID:?set HOST_GID or run via make check-local, not docker compose directly}" + environment: + HOME: /workspace volumes: - .:/workspace:z command: make check-ci From bbb5955874ac08f86c9550eda5c31302045051b5 Mon Sep 17 00:00:00 2001 From: Prateek Ganguli Date: Mon, 27 Jul 2026 09:18:48 +0800 Subject: [PATCH 2/3] Makefile: fix git archive safe.directory workaround for old git GIT_CONFIG_COUNT/GIT_CONFIG_KEY_n/GIT_CONFIG_VALUE_n (added in git 2.31) and `git -c safe.directory=...` are both silently ignored by the git 2.25.1 bundled with the gnuoctave/octave:6.4.0 and :7.3.0 images, so the previous workaround left `git archive` failing with "detected dubious ownership" whenever the repo isn't owned by the invoking user (e.g. GitHub Actions container jobs, or root in a bind-mounted Docker container). Write safe.directory to an actual (scoped, throwaway) global gitconfig instead, which every git version here honors. --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 62a9f7c1..291b21a8 100644 --- a/Makefile +++ b/Makefile @@ -149,10 +149,11 @@ $(RELEASE_DIR_CI): .git/index @-$(RM) -r $@ @mkdir -p $@ @echo " git archive ..." - @REV=$$(GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=safe.directory GIT_CONFIG_VALUE_0="$(abspath .)" \ - git stash create); \ - GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=safe.directory GIT_CONFIG_VALUE_0="$(abspath .)" \ - git archive -o $@/tmp.tar $${REV:-HEAD} + @GIT_HOME=$$(mktemp -d); \ + HOME=$$GIT_HOME git config --global --add safe.directory "$(abspath .)"; \ + REV=$$(HOME=$$GIT_HOME git stash create); \ + HOME=$$GIT_HOME git archive -o $@/tmp.tar $${REV:-HEAD}; \ + $(RM) -r $$GIT_HOME @cd $@ && tar -xf tmp.tar && $(RM) tmp.tar $(COPY_SLICOT_AND_BOOTSTRAP) From d274b6a0dced9b2dc2d2bf13efb4715504eee30c Mon Sep 17 00:00:00 2001 From: Prateek Ganguli Date: Mon, 27 Jul 2026 09:42:29 +0800 Subject: [PATCH 3/3] src/configure.ac: lower autoconf requirement to 2.69 AC_CONFIG_MACRO_DIRS (plural) requires autoconf >= 2.70; the codebase doesn't otherwise need anything from 2.70/2.71, so switch to the singular AC_CONFIG_MACRO_DIR, which both old and new autoconf accept, and drop AC_PREREQ accordingly. This lets `make check-ci`/bootstrap succeed on the gnuoctave/octave:7.3.0 image, which ships Ubuntu 20.04's autoconf 2.69. Verified bootstrap+configure+check-ci pass on octave 7.3.0, 8.4.0, 9.4.0, 10.3.0, and 11.3.0 images. --- src/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/configure.ac b/src/configure.ac index 5b711bf9..f01712ec 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_PREREQ([2.71]) +AC_PREREQ([2.69]) AC_INIT([control],[4.2.2+]) AC_CONFIG_SRCDIR([sl_ab01od.cc]) AC_CONFIG_HEADERS([config.h]) @@ -10,7 +10,7 @@ AC_CONFIG_HEADERS([config.h]) # Octave. AH_TOP([#include "undef-ah-octave.h"]) -AC_CONFIG_MACRO_DIRS([m4]) +AC_CONFIG_MACRO_DIR([m4]) # Checks for programs. AC_CHECK_PROG(MKOCTFILE, mkoctfile, mkoctfile)