[packages/erlang] try to use descriptors in /proc rather than in /dev

atler atler at pld-linux.org
Tue Dec 10 15:23:47 CET 2024


commit 36588a171e3c2b273fae6ef01d9868c8eca10d61
Author: Jan Palus <atler at pld-linux.org>
Date:   Tue Dec 10 14:40:49 2024 +0100

    try to use descriptors in /proc rather than in /dev

 erlang.spec   |  8 ++++----
 proc-fd.patch | 11 +++++++++++
 2 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/erlang.spec b/erlang.spec
index 3c534f6..45fd8b4 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -33,8 +33,8 @@ Source4:	epmd at .service
 Source5:	epmd at .socket
 Patch0:		%{name}-fPIC.patch
 Patch1:		x32.patch
-
-Patch4:		%{name}-ac.patch
+Patch2:		proc-fd.patch
+Patch3:		%{name}-ac.patch
 URL:		http://www.erlang.org/
 %{?with_java:BuildRequires:	/usr/bin/jar}
 BuildRequires:	autoconf >= 2.69
@@ -91,8 +91,8 @@ Dokumentacja do Erlanga.
 %setup -q -n otp-OTP-%{_version}
 #%patch0 -p1
 %patch1 -p1
-
-%patch4 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 ./otp_build update_configure --no-commit
diff --git a/proc-fd.patch b/proc-fd.patch
new file mode 100644
index 0000000..aaeb8df
--- /dev/null
+++ b/proc-fd.patch
@@ -0,0 +1,11 @@
+--- otp-OTP-27.1.2/make/ex_doc_wrapper.in.orig	2024-10-17 10:41:53.000000000 +0200
++++ otp-OTP-27.1.2/make/ex_doc_wrapper.in	2024-12-10 14:36:39.118655074 +0100
+@@ -35,7 +35,7 @@
+ 
+ ## Running the command where we redirect stderr to fd 1 and stdout to fd 3.
+ ## We then use tee on the stderr (which is now fd 1) to print that to fd 4
+-OUTPUT="$( { escript at EXEEXT@ "${EX_DOC}" "${ARGS[@]}"; } 2>&1 1>&3 | tee /dev/fd/4 )"
++OUTPUT="$( { escript at EXEEXT@ "${EX_DOC}" "${ARGS[@]}"; } 2>&1 1>&3 | tee /proc/self/fd/4 )"
+ 
+ ## Close fd 3 and 4
+ exec 3>&- 4>&-
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/erlang.git/commitdiff/36588a171e3c2b273fae6ef01d9868c8eca10d61



More information about the pld-cvs-commit mailing list