Bug 282810 - graphics/zathura: Expect system-wide config at ${PREFIX}/etc/zathurarc
Summary: graphics/zathura: Expect system-wide config at ${PREFIX}/etc/zathurarc
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Zsolt Udvari
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-17 10:39 UTC by embhd
Modified: 2024-12-02 19:38 UTC (History)
2 users (show)

See Also:
quentin.stievenart: maintainer-feedback+


Attachments
Patch (2.32 KB, application/mbox)
2024-11-17 10:39 UTC, embhd
no flags Details
Patch (2.32 KB, patch)
2024-11-17 10:46 UTC, embhd
no flags Details | Diff
Patch (851 bytes, patch)
2024-11-28 18:53 UTC, embhd
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description embhd 2024-11-17 10:39:20 UTC
Created attachment 255231 [details]
Patch

As of now, zathura searches both /etc as well as ${XDG_CONFIG_HOME} for possible configuration files. The proposed patch changes the first location to ${PREFIX}/etc.
Comment 1 embhd 2024-11-17 10:46:21 UTC
Created attachment 255232 [details]
Patch
Comment 2 Zsolt Udvari freebsd_committer freebsd_triage 2024-11-26 21:20:29 UTC
Thanks for patch.
I suggest simplify: you patch both file twice (with patch and with post-patch).
In the config.c should replace the value after GLOBAL_RC - you can do it with REINPLACE_CMD.
In the zathurarc.5.rst should replace ^/etc/zathurarc - with REINPLACE_CMD.
That's all, you don't need patch files.
Comment 3 embhd 2024-11-27 17:10:53 UTC
(In reply to Zsolt Udvari from comment #2)

Sure.

I gave that a try with the make target "do-patch". Using that, the existing patch file for data/meson.build seems to be ignored. Since this is another one-line substitution, should I integrate it into the Makefile or stick to patch files?
Comment 4 Zsolt Udvari freebsd_committer freebsd_triage 2024-11-27 19:56:22 UTC
(In reply to embhd from comment #3)
No, you don't have to rewrite do-patch target (as you can see, the existing patch will ignored). The post-patch target is perfect in this case.
Comment 5 embhd 2024-11-28 18:53:10 UTC
Created attachment 255512 [details]
Patch

Like this?
Comment 6 Zsolt Udvari freebsd_committer freebsd_triage 2024-11-28 18:57:13 UTC
(In reply to embhd from comment #5)
Yes :)
We should wait maintainer's approval.
Comment 7 Zsolt Udvari freebsd_committer freebsd_triage 2024-12-02 19:38:00 UTC
Committed, thanks!
Comment 8 commit-hook freebsd_committer freebsd_triage 2024-12-02 19:38:32 UTC
A commit in branch main references this bug:

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

commit 6bd8a8b245a77eb84547876ff450d5dfb76a97fc
Author:     embhd <embhd@posteo.de>
AuthorDate: 2024-12-02 19:34:17 +0000
Commit:     Zsolt Udvari <uzsolt@FreeBSD.org>
CommitDate: 2024-12-02 19:37:21 +0000

    graphics/zathura: Fix system-wide config path

    Zathura searches system-wide config in /etc - now in ${PREFIX}/etc.
    Pet portfmt.

    PR:             282810
    Approved by:    quentin.stievenart <quentin.stievenart@gmail.com> (maintainer)

 graphics/zathura/Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)