Bug 296506 - www/iocaine: pkg-plist issue leads to configuration files being overwritten
Summary: www/iocaine: pkg-plist issue leads to configuration files being overwritten
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: Yusuf Yaman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-07-04 10:59 UTC by Kamigishi Rei
Modified: 2026-07-18 15:46 UTC (History)
2 users (show)

See Also:
sko: maintainer-feedback+
nxjoseph: merge-quarterly+


Attachments
Fix pkg-plist (688 bytes, patch)
2026-07-04 10:59 UTC, Kamigishi Rei
no flags Details | Diff
Fix pkg-plist and Makefile (1.31 KB, patch)
2026-07-04 11:55 UTC, Kamigishi Rei
no flags Details | Diff
Fix pkg-plist and Makefile (third time's the charm) (1.69 KB, patch)
2026-07-04 14:05 UTC, Kamigishi Rei
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kamigishi Rei 2026-07-04 10:59:42 UTC
Created attachment 272479 [details]
Fix pkg-plist

As described in the title: pkg-plist misses @sample and includes extraneous files.

Was very confused when I lost my rather complex config.kdl after a pkg upgrade -f.
Comment 1 Kamigishi Rei 2026-07-04 11:55:37 UTC
Created attachment 272481 [details]
Fix pkg-plist and Makefile

My apologies for the noise, forgot to remove extraneous install calls from the Makefile and account for file names in @sample lines.
Comment 2 Kamigishi Rei 2026-07-04 14:05:38 UTC
Created attachment 272486 [details]
Fix pkg-plist and Makefile (third time's the charm)

Fixed the proposed patch: it now properly renames the distributed .kdl files to .sample before packaging. I never dealt with @sample before and apologise for the glaring mistake in the previous patch revision.

Bumping PORTREVISION as well.
Comment 3 Sebastian Oswald 2026-07-15 12:59:59 UTC
Sorry for the silence. As written in other PRs I didn't receive mails from bugzilla for a while. I hope this is resolved now, but somehow I missed to catch up on this PR, sorry for that.

Test build with patch applied went through and test (re-)install seems to work as intended, i.e. it no longer overwrites the user-created config files.

Thanks!
Comment 4 Kamigishi Rei 2026-07-15 17:10:21 UTC
(In reply to Sebastian Oswald from comment #3)
As long as any working fix gets committed and I can remove my current override, ahaha. (Having to git stash/stash apply for ports tree updates is a bit of a chore.)
Comment 5 Sebastian Oswald 2026-07-16 06:36:19 UTC
(In reply to Kamigishi Rei from comment #4)

You can just rebase your local changes on top of the branch. That's what I'm doing on my buildhosts.
Alternatively poudriere can apply local patches via hooks: https://dan.langille.org/2019/08/10/poudriere-hooks/

I used the extra patches/hooks mechanism quite a while, but keeping local commits on top of the master branch (latest or quarterly) IMHO is a bit easier to maintain, as those fail during rebase at the end of a 'git pull' instead of the build job failing at patch stage, so you can fix all at once and you even get a "patch contents already upstream" if your local commit has been committed and its automagically dropped (or you can 'rebase --skip'). With local patches you only find out if the port is being build and have to fix your patch files instead of just fixing the conflicting files directly, then 'git add' && 'git rebase --continue'.
Comment 6 Kamigishi Rei 2026-07-16 09:45:43 UTC
(In reply to Sebastian Oswald from comment #5)
Sorry, my comment (#3) was made on assumption that you were the port's maintainer and able to commit the change to the ports tree, so that would-be users of the package avoid hitting this issue in the future.

Admittedly, I am unsure how to deal with the current users who will unavoidably lose their configuration when invoking `pkg upgrade` (due to `pkg remove` happening in the upgrade process, and the plist being kept locally) unless they back up their existing config.kdl in advance.
Comment 7 commit-hook freebsd_committer freebsd_triage 2026-07-18 15:44:29 UTC
A commit in branch main references this bug:

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

commit 0f8691c17b7fe9d9788145516d463b27e83ae651
Author:     Kamigishi Rei <spambox@haruhiism.net>
AuthorDate: 2026-07-18 15:39:12 +0000
Commit:     Yusuf Yaman <nxjoseph@FreeBSD.org>
CommitDate: 2026-07-18 15:43:11 +0000

    www/iocaine: Install configuration files as sample

    So that there is no possibility of losing your configurations.

    While here, also remove the .orig file.

    PR:             296506
    Reported by:    Kamigishi Rei <spambox@haruhiism.net>
    Approved by:    Sebastian Oswald <sko@rostwald.de> (maintainer)
    Approved by:    osa, vvd (Mentors, implicit)
    MFH:            2026Q3

 www/iocaine/Makefile  | 7 +++----
 www/iocaine/pkg-plist | 7 ++-----
 2 files changed, 5 insertions(+), 9 deletions(-)
Comment 8 commit-hook freebsd_committer freebsd_triage 2026-07-18 15:44:30 UTC
A commit in branch 2026Q3 references this bug:

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

commit 4d61821e09bafeb993f058e18e575a9b0a908a2a
Author:     Kamigishi Rei <spambox@haruhiism.net>
AuthorDate: 2026-07-18 15:39:12 +0000
Commit:     Yusuf Yaman <nxjoseph@FreeBSD.org>
CommitDate: 2026-07-18 15:43:39 +0000

    www/iocaine: Install configuration files as sample

    So that there is no possibility of losing your configurations.

    While here, also remove the .orig file.

    PR:             296506
    Reported by:    Kamigishi Rei <spambox@haruhiism.net>
    Approved by:    Sebastian Oswald <sko@rostwald.de> (maintainer)
    Approved by:    osa, vvd (Mentors, implicit)
    MFH:            2026Q3

    (cherry picked from commit 0f8691c17b7fe9d9788145516d463b27e83ae651)

 www/iocaine/Makefile  | 7 +++----
 www/iocaine/pkg-plist | 7 ++-----
 2 files changed, 5 insertions(+), 9 deletions(-)
Comment 9 Yusuf Yaman freebsd_committer freebsd_triage 2026-07-18 15:46:45 UTC
Hi,

Thank you for the collaboration!

And sorry that you lost your configuration. :/

Thanks, committed.