Bug 226796 - databases/go-carbon Fix install procedure.
Summary: databases/go-carbon Fix install procedure.
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: freebsd-ports-bugs (Nobody)
Depends on:
Reported: 2018-03-20 06:18 UTC by Andreas Andersson
Modified: 2018-03-20 14:45 UTC (History)
1 user (show)

See Also:

Use INSTALL_DATA instead of INSTALL (937 bytes, patch)
2018-03-20 06:18 UTC, Andreas Andersson
a.andersson.thn: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Andersson 2018-03-20 06:18:50 UTC
Created attachment 191656 [details]


I was notified by dmgk (#freebsd-ports @ irc.freenode.org) that I might not want to use ${INSTALL} to install the config files, but more rather use ${INSTALL_DATA} for that. This is to avoid overwriting the config files on updates of the port.

Hence this diff does just that.
Comment 1 Yuri Victorovich freebsd_committer 2018-03-20 09:40:41 UTC
(In reply to Andreas Andersson from comment #0)

I think you misunderstood.
Config files need to be made *.conf.sample and declared with the @sample keyword in pkg-plist. This will prevent their overwriting, not the ${INSTALL_DATA} command.
Comment 2 Yuri Victorovich freebsd_committer 2018-03-20 09:51:48 UTC



Please take a look at how does it look now.
This is how you prevent overwriting. *.conf.sample files are installed, and soft-copied into .conf files which are never overwritten by the package installer.

Comment 3 commit-hook freebsd_committer 2018-03-20 09:52:34 UTC
A commit references this bug:

Author: yuri
Date: Tue Mar 20 09:51:36 UTC 2018
New revision: 465077
URL: https://svnweb.freebsd.org/changeset/ports/465077

  databases/go-carbon: Prevent overwriting config files by adding the @sample keyword

  PR:		226796
  Submitted by:	Andreas Andersson  <a.andersson.thn@gmail.com> (maintainer)

Comment 4 Andreas Andersson 2018-03-20 10:26:01 UTC
(In reply to Yuri Victorovich from comment #1)

So essentially it would be:

${INSTALL} ${WRKSRC}/deploy/go-carbon.conf ${STAGEDIR}${PREFIX}/etc/go-carbon/go-carbon.conf.sample ?
Comment 5 Andreas Andersson 2018-03-20 10:27:33 UTC
(In reply to Yuri Victorovich from comment #2)
Thank you! Will keep this in mind for future port submissions! :)
Comment 6 Yuri Victorovich freebsd_committer 2018-03-20 14:45:49 UTC
(In reply to Andreas Andersson from comment #4)

Yes, ${STAGEDIR}${PREFIX}/etc/go-carbon/go-carbon.conf.sample will be installed, and then it will be copied into ${STAGEDIR}${PREFIX}/etc/go-carbon/go-carbon.conf by the installer if it doesn't yet exist.

(In reply to Andreas Andersson from comment #5)

You're welcome! Thank you for your submissions!