Bug 261465 - net-p2p/prowlarr: Dont chown prowlarr binaries on daemon start
Summary: net-p2p/prowlarr: Dont chown prowlarr binaries on daemon start
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: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-25 12:42 UTC by Michiel van Baak Jansen
Modified: 2022-01-27 06:53 UTC (History)
1 user (show)

See Also:


Attachments
0001-net-p2p-prowlarr-Dont-chown-prowlarr-binaries-tell-u.patch (2.38 KB, patch)
2022-01-25 12:42 UTC, Michiel van Baak Jansen
michiel: maintainer-approval+
Details | Diff
0001-net-p2p-prowlarr-Dont-chown-prowlarr-binaries-tell-u.patch (3.22 KB, patch)
2022-01-25 16:42 UTC, Michiel van Baak Jansen
michiel: maintainer-approval+
Details | Diff
0001-net-p2p-prowlarr-Dont-chown-prowlarr-binaries-tell-u.patch (18.44 KB, patch)
2022-01-25 16:56 UTC, Michiel van Baak Jansen
michiel: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michiel van Baak Jansen 2022-01-25 12:42:59 UTC
Created attachment 231310 [details]
0001-net-p2p-prowlarr-Dont-chown-prowlarr-binaries-tell-u.patch
Comment 1 Michiel van Baak Jansen 2022-01-25 16:42:36 UTC
Created attachment 231318 [details]
0001-net-p2p-prowlarr-Dont-chown-prowlarr-binaries-tell-u.patch
Comment 2 Michiel van Baak Jansen 2022-01-25 16:56:47 UTC
Created attachment 231319 [details]
0001-net-p2p-prowlarr-Dont-chown-prowlarr-binaries-tell-u.patch
Comment 3 Fernando Apesteguía freebsd_committer freebsd_triage 2022-01-26 12:57:01 UTC
Hi Michiel,

Thanks for the patch. However, it seems to do more than just avoiding changing permissions. It also removes files (dll mainly), and do some cleaning.

What is a good abstract for this patch?
Comment 4 Michiel van Baak Jansen 2022-01-26 13:28:00 UTC
(In reply to Fernando Apesteguía from comment #3)

After talking to the sonarr devs (codebase of prowlarr is based on it) they pointed out that the Prowlarr.Update directory and its contents should be removed when packaging up the code.
The module in there is ran AFTER prowlarr built-in updater updated a new version from github and unpacked it in TEMPDIR. But, it uses the module inside the unpacked code in TEMPDIR. So basically the one shipped in the DISTFILE is outdated and not needed.
debian packages and docker images have this directory removed as well, so I added the rm as well.

so maybe somethnig like tthis:
Cleanup package content and do not run chown on the prowlarr binaries

Sorry for not being clear in the first place. Thanks for pointing that out.
Comment 5 Michiel van Baak Jansen 2022-01-26 13:30:31 UTC
Same cleanup can also be found here for sonarr: https://bugs.freebsd.org/bugzilla/attachment.cgi?id=231317&action=diff

Also both this patch and the sonarr one:

poudriere ok
runtest ok
Runs in production (13.0-amd64)
Comment 6 Fernando Apesteguía freebsd_committer freebsd_triage 2022-01-27 06:53:08 UTC
Committed,

Thanks!
Comment 7 commit-hook freebsd_committer freebsd_triage 2022-01-27 06:53:09 UTC
A commit in branch main references this bug:

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

commit cc7a787d5f043014dcea80bd0058dd7117a5e308
Author:     Michiel van Baak Jansen <michiel@vanbaak.eu>
AuthorDate: 2022-01-26 12:56:49 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2022-01-27 06:50:34 +0000

    net-p2p/prowlarr: port clean up

    * Cleanup package content
    * Do not run chown on the prowlarr binaries

    PR:     261465
    Reported by:    michiel@vanbaak.eu (maintainer)

 net-p2p/prowlarr/Makefile              |   7 +-
 net-p2p/prowlarr/files/package_info.in |   2 +-
 net-p2p/prowlarr/files/pkg-message.in  |   3 +-
 net-p2p/prowlarr/files/prowlarr.in     |   3 -
 net-p2p/prowlarr/pkg-plist             | 233 ---------------------------------
 5 files changed, 8 insertions(+), 240 deletions(-)