Created attachment 191656 [details] Use INSTALL_DATA instead of INSTALL Hi! 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.
(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.
Committed. ---- Andreas, 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. Regards, Yuri
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 Log: databases/go-carbon: Prevent overwriting config files by adding the @sample keyword PR: 226796 Submitted by: Andreas Andersson <a.andersson.thn@gmail.com> (maintainer) Changes: head/databases/go-carbon/Makefile head/databases/go-carbon/pkg-plist
(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 ?
(In reply to Yuri Victorovich from comment #2) Thank you! Will keep this in mind for future port submissions! :)
(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!