Summary: | graphics/imv: Install imv_config as imv_config.sample | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | embhd | ||||||||
Component: | Individual Port(s) | Assignee: | Nuno Teixeira <eduardo> | ||||||||
Status: | Closed FIXED | ||||||||||
Severity: | Affects Only Me | Flags: | bugzilla:
maintainer-feedback?
(eduardo) |
||||||||
Priority: | --- | ||||||||||
Version: | Latest | ||||||||||
Hardware: | Any | ||||||||||
OS: | Any | ||||||||||
Attachments: |
|
Created attachment 247495 [details]
Use @sample macro
Please try this patch (without paching meson)
@sample macro will do check if config exists.
(In reply to Nuno Teixeira from comment #1) (...) We need a .sample for this to work @sample etc/imv_config.sample This file can be copied during install time. (In reply to Nuno Teixeira from comment #2) (...) https://docs.freebsd.org/en/books/porters-handbook/book/#plist-config Adding "@sample" to pkg-plist is a good idea, thank's for the pointer. I'm wondering, though, the port uses install_data() in meson.build (ll. 203-207) to copy everything to stage/ - wouldn't this require patching meson anyways, to make sure only the new imv_config.sample is moved there? In addition, having a separate imv_config.sample would require additional work (or at least an additional check to see if the default config has changed) to keep the port up to date. Created attachment 247502 [details]
Patch
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3ef68ca2451cad33eebe3619777fd7f96a709bad commit 3ef68ca2451cad33eebe3619777fd7f96a709bad Author: embhd <embhd@posteo.de> AuthorDate: 2024-01-06 22:46:50 +0000 Commit: Nuno Teixeira <eduardo@FreeBSD.org> CommitDate: 2024-01-06 22:52:07 +0000 graphics/imv: Install imv_config as imv_config.sample - Use @sample macro on installed config .sample While I'm here: - Fix hardcoded paths in imv program and manual(1) PR: 276157 graphics/imv/Makefile | 7 ++++++- graphics/imv/files/patch-doc_imv.1.txt (new) | 15 +++++++++++++++ graphics/imv/files/patch-meson.build | 12 ++++++++++-- graphics/imv/files/patch-src_imv.c (new) | 12 ++++++++++++ graphics/imv/pkg-plist | 2 +- 5 files changed, 44 insertions(+), 4 deletions(-) Using 'rename' in meson.build was a brilliant idea! Committed, thank you! Sure, glad to help out. |
Created attachment 247491 [details] Patch As of now, reinstalling graphics/imv overwrites any existing config in /usr/local/etc. With the proposed patch, the default config file is installed as /usr/local/etc/imv_config.sample instead, leaving any custom configs in place. Even without any config, imv starts without any warnings.