Bug 268968 - net/luasocket: truncates unix socket name
Summary: net/luasocket: truncates unix socket name
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-15 07:31 UTC by Hugh Daschbach
Modified: 2023-03-21 19:41 UTC (History)
1 user (show)

See Also:


Attachments
patch: Add PLAT definition to ports Makefile. (469 bytes, patch)
2023-01-15 07:31 UTC, Hugh Daschbach
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hugh Daschbach 2023-01-15 07:31:25 UTC
Created attachment 239480 [details]
patch: Add PLAT definition to ports Makefile.

Full disclosure: I am not (yet) a FreeBSD user.  But this issue has been discussed in a prosody-im chat room.

This issue can be verified by running:

- lua54 /usr/ports/net/luasocket/work-lua54/luasocket-3.1.0/test/utestsrvr.lua

Then killing the process as it waits for client connection.  From the source of utestsrv.lua, the program should create a socket named "luasocket" in the current directory.  Instead it creates a socket named "luasocke" (one character truncation).

The problem can be fixed by adding "PLAT=freebsd" to the "MAKE_ARGS" definition in the ports Makefile.  Patch attached.
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-03-21 19:35:46 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7b22ba2f41006419913adfab9cb4e47f27e96df1

commit 7b22ba2f41006419913adfab9cb4e47f27e96df1
Author:     Hugh Daschbach <hugh@ccss.com>
AuthorDate: 2023-03-21 18:57:04 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-03-21 19:22:36 +0000

    net/luasocket: Fix unix socket name by adding correct PLAT definition

    - Bump PORTREVISION for package change

    PR:             268968

 net/luasocket/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 2 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-03-21 19:41:50 UTC
Committed. Thanks!