Tuesday, May 30, 2023

Re: [NEW] lang/erlang/26

Index: Makefile.inc
===================================================================
RCS file: /cvs/ports/lang/erlang/Makefile.inc,v
retrieving revision 1.27
diff -u -p -r1.27 Makefile.inc
--- Makefile.inc 1 Sep 2022 20:03:37 -0000 1.27
+++ Makefile.inc 20 May 2023 11:41:19 -0000
@@ -11,8 +11,9 @@ MAJ_V = ${V:C/\.[0-9]+//g}

MAINTAINER = Volker Schlecht <openbsd-ports@schlecht.dev>

+DOCDISTNAME ?= otp_doc_man_${V}
DISTFILES ?= ${DISTNAME}.tar.gz \
- otp_doc_man_${V}.tar.gz
+ ${DOCDISTNAME}.tar.gz

EXTRACT_ONLY ?= ${DISTNAME}.tar.gz

@@ -80,7 +81,6 @@ gen-versions: extract
@find ${WRKSRC} -name 'vsn.mk' -exec awk -F'=' '/_VSN=/ { print $$1"\t"$$2 " \\" }' {} \; | grep -v 'PRE_' | grep -v 'APP_' | sort
@grep VSN ${WRKSRC}/erts/vsn.mk |awk '/^VSN/ { print "ERTS_VSN\t" $$3 }' | sort

-# Erlang >= 25 uses configure.ac instead of configure.in
pre-configure:
${SUBST_CMD} ${WRKSRC}/make/install_bin \
${WRKSRC}/Makefile.in \
@@ -88,9 +88,12 @@ pre-configure:
${WRKSRC}/erts/etc/common/dialyzer.c \
${WRKSRC}/erts/etc/common/erlc.c \
${WRKSRC}/erts/etc/common/escript.c \
- ${WRKSRC}/erts/etc/common/typer.c \
- ${WRKSRC}/lib/dialyzer/src/dialyzer_plt.erl
- if [ -f ${WRKSRC}/lib/wx/configure.in ]; then ${SUBST_CMD} ${WRKSRC}/lib/wx/configure.in ; fi;
+ ${WRKSRC}/erts/etc/common/typer.c
+.if ${MAJ_V} == 25
+ ${SUBST_CMD} ${WRKSRC}/lib/dialyzer/src/dialyzer_plt.erl
+.else
+ ${SUBST_CMD} ${WRKSRC}/lib/dialyzer/src/dialyzer_cplt.erl
+.endif
if [ -f ${WRKSRC}/lib/wx/configure.ac ]; then ${SUBST_CMD} ${WRKSRC}/lib/wx/configure.ac ; fi;


@@ -109,10 +112,11 @@ do-test:

post-test:
rm ${WRKSRC}/bin/erl${MAJ_V}
+ -${WRKSRC}/bin/*-unknown-openbsd*/epmd -kill

post-install:
ln -sf ../lib/erlang${MAJ_V}/lib/${ERL_EI}/bin/erl_call ${PREFIX}/bin/erl_call${MAJ_V}
- tar zxf ${FULLDISTDIR}/otp_doc_man_${V}.tar.gz -C ${DOC_DIR}
+ tar zxf ${FULLDISTDIR}/${DOCDISTNAME}.tar.gz -C ${DOC_DIR}
rm -r ${DOC_DIR}/man/man7/*MIB.7
rm -r ${DOC_DIR}/man/man7/*TM.7
if [ ! -x ${PREFIX}/lib/erlang${MAJ_V}/${ERL_ERTS}/bin/beam.smp ]; then \
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/erlang/25/Makefile,v
retrieving revision 1.16
diff -u -p -r1.16 Makefile
--- Makefile 17 May 2023 13:39:46 -0000 1.16
+++ Makefile 19 May 2023 06:35:03 -0000
@@ -10,6 +10,7 @@ PKGNAME= erlang-$V
PKGNAME-main= erlang-$V
PKGNAME-wx= erlang-wx-$V
EPOCH= 0
+REVISION= 0

VERSION_SPEC= >=25v0,<26v0
PKGSPEC-main= erlang-${VERSION_SPEC}
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/lang/erlang/25/pkg/PLIST-main,v
retrieving revision 1.9
diff -u -p -r1.9 PLIST-main
--- pkg/PLIST-main 17 May 2023 13:39:46 -0000 1.9
+++ pkg/PLIST-main 19 May 2023 06:35:03 -0000
@@ -6,7 +6,7 @@
@pkgpath lang/erlang/21,-main
@newgroup _epmd:888
@newuser _epmd:888:_epmd::Erlang EPMD Account:/var/empty:/sbin/nologin
-@rcscript ${RCDIR}/epmd
+@rcscript ${RCDIR}/epmd25
bin/ct_run25
bin/dialyzer25
bin/epmd25
Index: pkg/epmd.rc
===================================================================
RCS file: pkg/epmd.rc
diff -N pkg/epmd.rc
--- pkg/epmd.rc 31 Jan 2023 01:59:09 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-#!/bin/ksh
-
-daemon="${TRUEPREFIX}/bin/epmd${MAJ_V} -daemon"
-daemon_flags="-address 127.0.0.1"
-daemon_user=_epmd
-
-. /etc/rc.d/rc.subr
-
-rc_reload=NO
-
-rc_cmd $1
Index: pkg/epmd25.rc
===================================================================
RCS file: pkg/epmd25.rc
diff -N pkg/epmd25.rc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/epmd25.rc 19 May 2023 06:35:03 -0000
@@ -0,0 +1,11 @@
+#!/bin/ksh
+
+daemon="${TRUEPREFIX}/bin/epmd${MAJ_V} -daemon"
+daemon_flags="-address 127.0.0.1"
+daemon_user=_epmd
+
+. /etc/rc.d/rc.subr
+
+rc_reload=NO
+
+rc_cmd $1
Ping ... not sure if it needs just one more OK or two.

On 5/20/23 13:43, Volker Schlecht wrote:
> Extended the patch to erlang/Makefile.inc so that an instance of epmd
> started by 'make test' is killed after the test.
> Currently it keeps running (it has been like this since 'make test'
> was made functional in the port). Noted by kn@, thanks.
>
> This will also kill instances of epmd that were started via the
> rc-script, but only as long as there are no other active erlang services
> connected.
>
> On 5/20/23 12:29, Volker Schlecht wrote:
>> Curious that WXNEEDED=Yes seems to be only required on some platforms.
>> Here (AMD 3960X) it worked without any issues without WXNEEDED.
>>
>> Attached is the erlang/26 port with wxneeded, and the two adjacent
>> diffs unmodified.
>>
>> On 5/20/23 10:53, Klemens Nanni wrote:
>>> On Sat, May 20, 2023 at 08:33:45AM +0000, Klemens Nanni wrote:
>>>> 26 fails with
>>>>     May 20 12:26:48 atar /bsd: beam.smp(57653): mmap W^X violation
>>>> and thanks to kern.wxabort=1 I now have 29 *.core files in WRKDIR.
>>>>
>>>> Setting wxallowed on /usr/ports/pobj/ does not help, I'll try
>>>> USE_WXNEEDED
>>>> and/or USE_NOEXECONLY.
>>>
>>> USE_WXNEEDED=Yes is enough to make it build, tests then also pass
>>> without
>>> failure.
>>>
>>> No PLIST or WANTLIB change for 26, either, so with W^X fixed this looks
>>> fine port-wise.
>>>
>>>>
>>>> I'm building on a 12th gen intel with PKU.
>>>

No comments:

Post a Comment