URL: <https://savannah.gnu.org/bugs/?68601>
Summary: [eqn] neqn: doesn't work when built using Busybox
sed(1)
Group: GNU roff
Submitter: gbranden
Submitted: Thu 06 Aug 2026 02:06:23 PM UTC
Category: Preprocessor eqn
Severity: 3 - Normal
Item Group: Incorrect behaviour
Status: In Progress
Privacy: Public
Assigned to: gbranden
Open/Closed: Open
Discussion Lock: Unlocked
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Thu 06 Aug 2026 02:06:23 PM UTC By: G. Branden Robinson <gbranden>
[https://lists.gnu.org/archive/html/groff/2026-08/msg00007.html Bruno Haible
reported]:
On Alpine Linux 3.24, I see two test failures:
FAIL: src/preproc/eqn/tests/neqn-finds-matching-eqn.sh
======================================================
/home/bruno/groff-1.25.0.rc2/build-64/neqn: exec: line 56: @g@eqn: not found
GNU eqn (groff) version 1.25.0.rc2
FAIL src/preproc/eqn/tests/neqn-finds-matching-eqn.sh (exit status: 1)
FAIL: src/preproc/eqn/tests/neqn-smoke-test.sh
==============================================
/home/bruno/groff-1.25.0.rc2/build-64/neqn: exec: line 56: @g@eqn: not found
FAIL src/preproc/eqn/tests/neqn-smoke-test.sh (exit status: 1)
Indeed, line 56 of the generated 'neqn' script looks like this:
exec @g@eqn -T ascii "$@"
The reason is that the 'sed' program on this platform (from BusyBox)
ignores '-e' options when a '-f' option is present, regardless whether
the '-e' options come before or after the '-f' option.
Here's a proposed fix.
> From 9df22259961372aaf839d301a99d7490c3089258 Mon Sep 17 00:00:00 2001
From: Bruno Haible <[email protected]>
Date: Mon, 3 Aug 2026 17:10:28 +0200
Subject: [PATCH] build: Fix generation of 'neqn' script on Alpine Linux.
* src/preproc/eqn/eqn.am (neqn): Use two separate 'sed' invocations, as
BusyBox 'sed' ignores '-e' options if a '-f' option is present.
---
src/preproc/eqn/eqn.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/preproc/eqn/eqn.am b/src/preproc/eqn/eqn.am
index 0c353c2a9..1f57443ef 100644
--- a/src/preproc/eqn/eqn.am
+++ b/src/preproc/eqn/eqn.am
@@ -59,9 +59,9 @@ src/preproc/eqn/eqn-lex.$(OBJEXT): src/preproc/eqn/eqn.hpp
neqn: $(top_srcdir)/src/preproc/eqn/neqn.sh $(SH_DEPS_SED_SCRIPT)
$(AM_V_GEN)sed -f $(SH_DEPS_SED_SCRIPT) \
- -e 's/[@]g[@]/$(g)/g' \
- -e $(SH_SCRIPT_SED_CMD) \
$(top_srcdir)/src/preproc/eqn/neqn.sh \
+ | sed -e 's/[@]g[@]/$(g)/g' \
+ -e $(SH_SCRIPT_SED_CMD) \
> [email protected] \
&& chmod +x [email protected] \
&& mv [email protected] $@
--
2.53.0
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68601>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
