Bug 270591

Summary: www/onlyoffice-documentserver installs npm/json, but it fails with "Pkg: Error reading from file"
Product: Ports & Packages Reporter: freebsd.org
Component: Individual Port(s)Assignee: Mikael Urankar <mikael>
Status: Closed FIXED    
Severity: Affects Only Me CC: freebsd.org
Priority: --- Flags: bugzilla: maintainer-feedback? (mikael)
Version: Latest   
Hardware: Any   
OS: Any   

Description freebsd.org 2023-04-01 22:35:53 UTC
After the installation, this executable is installed:

/usr/local/www/onlyoffice/documentserver/npm/json

But when it is executed, it just prints this sentence:

Pkg: Error reading from file.
Comment 1 freebsd.org 2023-04-01 22:45:33 UTC
I researched this problem a bit and it seems to be a problem with a corrupted file. The following link is the best hint I found regarding what could be happening: 

https://discourse.nixos.org/t/unrelatable-error-when-working-with-patchelf/12043
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-04-02 15:42:16 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3661e14f6aec57bf5950af831ea627070a310258

commit 3661e14f6aec57bf5950af831ea627070a310258
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2023-04-02 13:24:44 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2023-04-02 15:40:57 +0000

    www/onlyoffice-documentserver: do not strip the json binary

    binary generated by npm/pkg doesn't work if they are stripped

    PR:             270591
    Reported by:    freebsd.org@vollkorn.cryptobitch.de

 www/onlyoffice-documentserver/Makefile  | 4 ++--
 www/onlyoffice-documentserver/pkg-plist | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Comment 3 Mikael Urankar freebsd_committer freebsd_triage 2023-04-02 15:42:53 UTC
Thanks!
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-04-04 10:27:10 UTC
A commit in branch 2023Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=05a15397fd7da22d54cf5125938db37c15aae4d5

commit 05a15397fd7da22d54cf5125938db37c15aae4d5
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2023-04-02 13:24:44 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2023-04-04 10:25:39 +0000

    www/onlyoffice-documentserver: do not strip the json binary

    binary generated by npm/pkg doesn't work if they are stripped

    PR:             270591
    Reported by:    freebsd.org@vollkorn.cryptobitch.de

    (cherry picked from commit 3661e14f6aec57bf5950af831ea627070a310258)

 www/onlyoffice-documentserver/Makefile  | 4 ++--
 www/onlyoffice-documentserver/pkg-plist | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)