On Sat, May 02 2020, Kurt Mosiejczuk <[email protected]> wrote:
> On Wed, Feb 19, 2020 at 05:06:53PM +1000, Jonathan Matthew wrote:
>> On Tue, Feb 18, 2020 at 11:49:43PM -0500, Kurt Mosiejczuk wrote:
>> > On Wed, Feb 19, 2020 at 11:48:28AM +1000, Jonathan Matthew wrote:
>
>> > > > I thought I'd have a look at this, since I'm actually using erlang
>> > > > on sparc64 now.  The erlang21 flavor built, but the escriptized file
>> > > > ends up looking like this:
>
>> > > > -r-x--S---   1 4087335480  1892169536  209098 Feb 19 07:36 rebar
>
>> > > > which looks like erlang21 is screwing up its chown and chmod syscalls.
>
>> > > This is fixed in otp 21.2.1, by this change:
>> > > https://github.com/erlang/otp/commit/df0638e021eb18a4271a02fdae08aa1779867209
>
>> > Based upon this information, here is a patch for lang/erlang/21 to add
>> > this patch to the current version.
>
>> > ok?
>
>> Looks good to me, and I built a package with this and it managed to build 
>> rebar
>> with correct ownership and permissions.
>
> ok to commit this? I've been carrying the patch locally on the build cluster.

LGTM and indeed fixes the build of devel/rebar,erlang21.  ok jca@

I think should should be in 6.7.

> --Kurt
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/erlang/21/Makefile,v
> retrieving revision 1.4
> diff -u -p -r1.4 Makefile
> --- Makefile  25 Jun 2019 20:25:21 -0000      1.4
> +++ Makefile  3 May 2020 01:32:24 -0000
> @@ -13,8 +13,8 @@ PKGNAME=    erlang-$V
>  PKGNAME-main=        erlang-$V
>  PKGNAME-wx=  erlang-wx-$V
>  
> -REVISION-main=       2
> -REVISION-wx= 2
> +REVISION-main=       3
> +REVISION-wx= 3
>  
>  VERSION_SPEC=        >=21v0,<22v0
>  PKGSPEC-main=        erlang-${VERSION_SPEC}
> Index: patches/patch-erts_emulator_nifs_common_prim_file_nif_c
> ===================================================================
> RCS file: patches/patch-erts_emulator_nifs_common_prim_file_nif_c
> diff -N patches/patch-erts_emulator_nifs_common_prim_file_nif_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-erts_emulator_nifs_common_prim_file_nif_c   3 May 2020 
> 01:32:24 -0000
> @@ -0,0 +1,26 @@
> +$OpenBSD$
> +
> +erts: Fix warning and potential big-endian-bug in prim_file
> +https://github.com/erlang/otp/commit/df0638e021eb18a4271a02fdae08aa1779867209
> +
> +Index: erts/emulator/nifs/common/prim_file_nif.c
> +--- erts/emulator/nifs/common/prim_file_nif.c.orig
> ++++ erts/emulator/nifs/common/prim_file_nif.c
> +@@ -933,7 +933,7 @@ static ERL_NIF_TERM set_permissions_nif(ErlNifEnv *env
> +     posix_errno_t posix_errno;
> + 
> +     efile_path_t path;
> +-    Uint permissions;
> ++    unsigned int permissions;
> + 
> +     if(argc != 2 || !enif_get_uint(env, argv[1], &permissions)) {
> +         return enif_make_badarg(env);
> +@@ -952,7 +952,7 @@ static ERL_NIF_TERM set_owner_nif(ErlNifEnv *env, int 
> +     posix_errno_t posix_errno;
> + 
> +     efile_path_t path;
> +-    Sint uid, gid;
> ++    int uid, gid;
> + 
> +     if(argc != 3 || !enif_get_int(env, argv[1], &uid)
> +                  || !enif_get_int(env, argv[2], &gid)) {
>
<#secure method=pgpmime mode=sign>

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to