Bug#1121061: libreoffice: undocumented limit of 249 arguments
Hi,
Am 22.11.25 um 02:06 schrieb Francesco Potortì:
I suggest that the shell scripts under /usr/lib/libreoffice/program use Bash rather than Dash,
So basically something along
From 58e2efd7fd734ee042872de3480d1c767610db6f Mon Sep 17 00:00:00 2001
From: Rene Engelhard <rene@rene-engelhard.de>
Date: Sat, 22 Nov 2025 12:42:13 +0100
Subject: [PATCH] use /bin/bash instead of /bin/sh in wrapper scripts (except
for unopkg and the SDK for now) (closes: #1121061)
---
changelog | 10 ++++
patches/series | 1 +
patches/shell-wrappers-use-bash.diff | 83 ++++++++++++++++++++++++++++
3 files changed, 94 insertions(+)
create mode 100644 patches/shell-wrappers-use-bash.diff
diff --git a/changelog b/changelog
index 4adfa0ec0..3f3ba8f63 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,13 @@
+libreoffice (4:26.2.0~beta1~git20251122-1) UNRELEASED; urgency=medium
+
+ * New upstream snapshot
+
+ * debian/patches/shell-wrappers-use-bash.diff: use /bin/bash instead of
+ /bin/sh in wrapper scripts (except for unopkg and the SDK for now)
+ (closes: #1121061)
+
+ -- Rene Engelhard <rene@debian.org> Fri, 21 Nov 2025 21:07:00 +0100
+
libreoffice (4:26.2.0~alpha1-1) experimental; urgency=medium
* New upstream alpha release
diff --git a/patches/series b/patches/series
index 5aeb6d996..5469fdabf 100644
--- a/patches/series
+++ b/patches/series
@@ -51,3 +51,4 @@ cargo-build-flag.diff
#strict-firebird-api-version-check.diff
fix-rust_uno-test.diff
revert-2b322af4b9473210ed6a332115dac381f07039d6.diff
+shell-wrappers-use-bash.diff
diff --git a/patches/shell-wrappers-use-bash.diff b/patches/shell-wrappers-use-bash.diff
new file mode 100644
index 000000000..d1d4ad095
--- /dev/null
+++ b/patches/shell-wrappers-use-bash.diff
@@ -0,0 +1,83 @@
+diff --git a/desktop/scripts/sbase.sh b/desktop/scripts/sbase.sh
+index 82e5e4ba2bb9..1c1a410b5a0d 100755
+--- a/desktop/scripts/sbase.sh
++++ b/desktop/scripts/sbase.sh
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ cmd=$(dirname "$0")/soffice
+ exec "$cmd" --base "$@"
+diff --git a/desktop/scripts/scalc.sh b/desktop/scripts/scalc.sh
+index ff3d597951a4..2a1b0833948f 100755
+--- a/desktop/scripts/scalc.sh
++++ b/desktop/scripts/scalc.sh
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ cmd=$(dirname "$0")/soffice
+ exec "$cmd" --calc "$@"
+diff --git a/desktop/scripts/sdraw.sh b/desktop/scripts/sdraw.sh
+index 9f7c1e4eda99..8c19828e10a1 100755
+--- a/desktop/scripts/sdraw.sh
++++ b/desktop/scripts/sdraw.sh
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ cmd=$(dirname "$0")/soffice
+ exec "$cmd" --draw "$@"
+diff --git a/desktop/scripts/simpress.sh b/desktop/scripts/simpress.sh
+index a1808c3cb1f7..9a7c4a3448a3 100755
+--- a/desktop/scripts/simpress.sh
++++ b/desktop/scripts/simpress.sh
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ cmd=$(dirname "$0")/soffice
+ exec "$cmd" --impress "$@"
+diff --git a/desktop/scripts/smath.sh b/desktop/scripts/smath.sh
+index 9c05223b454f..8e986465646d 100755
+--- a/desktop/scripts/smath.sh
++++ b/desktop/scripts/smath.sh
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ cmd=$(dirname "$0")/soffice
+ exec "$cmd" --math "$@"
+diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
+index 7188f393e140..bcfe77bbe1d2 100755
+--- a/desktop/scripts/soffice.sh
++++ b/desktop/scripts/soffice.sh
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # This file is part of the LibreOffice project.
+ #
+diff --git a/desktop/scripts/swriter.sh b/desktop/scripts/swriter.sh
+index 19a7c9ed4191..41bf3693abce 100755
+--- a/desktop/scripts/swriter.sh
++++ b/desktop/scripts/swriter.sh
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ cmd=$(dirname "$0")/soffice
+ exec "$cmd" --writer "$@"
+diff --git a/bin/distro-install-desktop-integration b/bin/distro-install-desktop-integration
+index 7e1428ffba69..0022fdb2e7e2 100755
+--- a/bin/distro-install-desktop-integration
++++ b/bin/distro-install-desktop-integration
+@@ -27,7 +27,7 @@ create_wrapper()
+ else
+ mkdir -p "$DESTDIR$BINDIR"
+ cat <<EOT >"$DESTDIR$BINDIR/$1"
+-#!/bin/sh
++#!/bin/bash
+ $INSTALLDIR/program/$2 $3 "\$@"
+ EOT
+ chmod 755 "$DESTDIR$BINDIR/$1"
--
2.47.3
(diff'ed on top of 26.2 tree)
Still not decided whether we actually should do that...
Regards,
Rene
Reply to: