Created attachment 168732 [details] Update puppetserver to 2.3.1 Update to 2.3.1. Include extra missing 'app' files and use @sample for config files.
Maintainer informed via mail
- Patch does not apply to Makefile: Patching file Makefile using Plan A... Hunk #1 failed at 1. Hunk #2 failed at 59. Hunk #3 failed at 74. 3 out of 3 hunks failed--saving rejects to Makefile.rej - To use @sample, you'll need to rename all config files with .sample suffi
Created attachment 168986 [details] SVN diff for change Attached is the output from `svn diff` on the port directory. My testing of the @sample changes in the patch seem to work like I expect. I've read over the documentation about @sample, and my understanding is that when only the name of the file is specified, it will be written if there have not been modifications to the installed version, and indeed the installation seems to confirm this. I would like not to have to copy each configuration file out of the source directory into the port directory if I can avoid it.
(In reply to Zach Leslie from comment #3) > My testing of the @sample changes in the patch seem to work like I expect. > I've read over the documentation about @sample, and my understanding is that > when only the name of the file is specified, it will be written if there > have not been modifications to the installed version, and indeed the > installation seems to confirm this. It works incorrectly. In fact, @sample with one argument which doesn't have .sample extension is not supported at all. The sample works this way: - You install foo.conf.sample, and list in as @sample - On install, foo.conf.sample is copied to foo.conf only if the latter doesn't exist - On deinstall, foo.conf is removed only if it's equal to foo.conf.sample This way, user-changed configs are never overwritten or lost, and at the same time unchanged configs are not left over on deinstall. > I would like not to have to copy each configuration file out of the source > directory into the port directory if I can avoid it. I don't really get what you mean by that. The only change you need to do is to install configuration files with .sample suffix as in -${INSTALL_DATA} ${WRKSRC}/ext/config/logback.xml ${STAGEDIR}${ETCDIR}/logback.xml +${INSTALL_DATA} ${WRKSRC}/ext/config/logback.xml ${STAGEDIR}${ETCDIR}/logback.xml.sample -@sample %%ETCDIR%%/logback.xml +@sample %%ETCDIR%%/logback.xml.sample
Here is an updated svn diff after running it through poudriere. https://gist.github.com/xaque208/962f060bd3e634bdb2edbd9af4b0d760 Have I done the sample change correctly this time?
(In reply to Zach Leslie from comment #5) > Here is an updated svn diff after running it through poudriere. > > https://gist.github.com/xaque208/962f060bd3e634bdb2edbd9af4b0d760 > > Have I done the sample change correctly this time? Doesn't seem so for me. Where did ext/config/ come from? See following attachment, it handles .sample configs correctly + silences mkdirs and clarifies plist permissions. The latter should be rechecked, etc/puppet/code perms look strange.
Created attachment 170187 [details] Proposed patch
Hi Dmitry, apologies this has taken me a while to get back to. I re-read you're instructions and began mocking up a patch before I'd seen what you had attached. Thank you for the explanation on samples, as I think I finally understand it. Here is a gist of what I'd written before coming back to this. https://gist.github.com/xaque208/962f060bd3e634bdb2edbd9af4b0d760 In any case, the patch that you have looks good. I'll submit a follow up to bump the version again to the now-latest version once this is committed.
A commit references this bug: Author: amdmi3 Date: Tue May 24 10:40:10 UTC 2016 New revision: 415776 URL: https://svnweb.freebsd.org/changeset/ports/415776 Log: - Update to 2.3.1 - Fix config file handling - Include extra missing 'app' files PR: 208363 Submitted by: freebsd@zleslie.info Approved by: maintainer timeout (xaque208@gmail.com, 2 months) Changes: head/sysutils/puppetserver/Makefile head/sysutils/puppetserver/distinfo head/sysutils/puppetserver/files/patch-ext__config__conf.d__webserver.conf head/sysutils/puppetserver/pkg-plist
Thank you kindly, Dmitry.