Bug 208363 - [maintainer update] sysutils/puppetserver: update to 2.3.1
Summary: [maintainer update] sysutils/puppetserver: update to 2.3.1
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: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-28 17:46 UTC by Zach Leslie
Modified: 2016-05-24 18:15 UTC (History)
0 users

See Also:


Attachments
Update puppetserver to 2.3.1 (3.63 KB, patch)
2016-03-28 17:46 UTC, Zach Leslie
no flags Details | Diff
SVN diff for change (3.52 KB, patch)
2016-04-04 21:36 UTC, Zach Leslie
zleslie: maintainer-approval+
Details | Diff
Proposed patch (5.26 KB, patch)
2016-05-10 19:13 UTC, Dmitry Marakasov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zach Leslie freebsd_committer 2016-03-28 17:46:54 UTC
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.
Comment 1 Bugzilla Automation freebsd_committer 2016-03-28 17:46:54 UTC
Maintainer informed via mail
Comment 2 Dmitry Marakasov freebsd_committer 2016-03-30 19:38:32 UTC
- 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
Comment 3 Zach Leslie freebsd_committer 2016-04-04 21:36:10 UTC
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.
Comment 4 Dmitry Marakasov freebsd_committer 2016-04-14 14:41:16 UTC
(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
Comment 5 Zach Leslie freebsd_committer 2016-05-03 18:30:59 UTC
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?
Comment 6 Dmitry Marakasov freebsd_committer 2016-05-10 19:13:14 UTC
(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.
Comment 7 Dmitry Marakasov freebsd_committer 2016-05-10 19:13:53 UTC
Created attachment 170187 [details]
Proposed patch
Comment 8 Zach Leslie freebsd_committer 2016-05-22 04:23:07 UTC
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.
Comment 9 commit-hook freebsd_committer 2016-05-24 10:40:45 UTC
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
Comment 10 Zach Leslie freebsd_committer 2016-05-24 18:15:26 UTC
Thank you kindly, Dmitry.