<Derek.Whayman@barclayscapital.com>
2007-Nov-13 10:20 UTC
Creating a manifests ''release'' under SVN; trouble with SVN headers
Dear all I''ve gotten into the habit of including SVN headers in my templates, etc so it is easy to see where the file installed into /etc/puppet/ came from. Furthermore, we use svn cp to create release branches. Therefore, you''ll see something like this: # $Id: dumpadm.conf 1239 2007-10-23 16:04:06Z sa_dewha $ # $URL: svn://engsun05/bootstrap/rel/release-20071030/puppet/modules/crashdump/t emplates/dumpadm.conf $ All well and good until I create another release and the svn export looks like this: # $Id: dumpadm.conf 1239 2007-10-23 16:04:06Z sa_dewha $ # $URL: svn://engsun05/bootstrap/rel/release-20071130/puppet/modules/crashdump/t emplates/dumpadm.conf $ Puppet will declare that the file has changed and schedule some work (here, subscribe/refreshonly on this file). I''d rather not pull URL/HeadURL from the header as you lose the path and the release info. Has anyone tackled this before? I see two options: * Post svn export, run everything through sed to truncate the $URL$ * Some kind of process to pull out the $URL$ from the earliest release the revision number appears in. Former seems easy, latter would be straightforward in an incredibly inefficient way (export everything, then pick ''n'' merge), not sure if there''s a ''good'' way. Any other methods out there? Cheers, Derek ------------------------------------------------------------------------ For important statutory and regulatory disclosures and more information about Barclays Capital, please visit our web site at http://www.barcap.com. Internet communications are not secure and therefore the Barclays Group does not accept legal responsibility for the contents of this message. Although the Barclays Group operates anti-virus programmes, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Barclays Group. Replies to this email may be monitored by the Barclays Group for operational or business reasons. Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays Group. ------------------------------------------------------------------------
Brian Finney
2007-Nov-13 18:44 UTC
Re: Creating a manifests ''release'' under SVN; trouble with SVN headers
As this appears to be for a template you could wrap the url in an erb comment <%#$URL: svn://engsun05/bootstrap/rel/release-20071130/puppet/modules/crashdump/templates/dumpadm.conf $%> I believe the puppetmaster does the md5 checks on the results of the template which would allow this to work. However this will have the effect of the url not showing up in the final file produced by puppetd. For non templated files I don''t believe there will be an easy solution as the file contents is not interpreted by puppet and likely shouldn''t be. Thanks Brian On Nov 13, 2007 2:20 AM, <Derek.Whayman@barclayscapital.com> wrote:> Dear all > > I''ve gotten into the habit of including SVN headers in my templates, etc > so it is easy to see where the file installed into /etc/puppet/ came > from. Furthermore, we use svn cp to create release branches. > Therefore, you''ll see something like this: > > # $Id: dumpadm.conf 1239 2007-10-23 16:04:06Z sa_dewha $ > # $URL: > svn://engsun05/bootstrap/rel/release-20071030/puppet/modules/crashdump/t > emplates/dumpadm.conf $ > > All well and good until I create another release and the svn export > looks like this: > > # $Id: dumpadm.conf 1239 2007-10-23 16:04:06Z sa_dewha $ > # $URL: > svn://engsun05/bootstrap/rel/release-20071130/puppet/modules/crashdump/t > emplates/dumpadm.conf $ > > Puppet will declare that the file has changed and schedule some work > (here, subscribe/refreshonly on this file). > > I''d rather not pull URL/HeadURL from the header as you lose the path and > the release info. > > Has anyone tackled this before? I see two options: > > * Post svn export, run everything through sed to truncate the $URL$ > * Some kind of process to pull out the $URL$ from the earliest > release the revision number appears in. > > Former seems easy, latter would be straightforward in an incredibly > inefficient way (export everything, then pick ''n'' merge), not sure if > there''s a ''good'' way. > > Any other methods out there? > > Cheers, > Derek > ------------------------------------------------------------------------ > For important statutory and regulatory disclosures and more information about Barclays Capital, please visit our web site at http://www.barcap.com. > > Internet communications are not secure and therefore the Barclays Group does not accept legal responsibility for the contents of this message. Although the Barclays Group operates anti-virus programmes, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Barclays Group. Replies to this email may be monitored by the Barclays Group for operational or business reasons. > > Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays Group. > ------------------------------------------------------------------------ > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >
<Derek.Whayman@barclayscapital.com>
2007-Nov-14 16:11 UTC
Re: Creating a manifests ''release'' under SVN; trouble with SVN headers
Good idea. But in the end as it has to work for files too so I had to select a different solutoin. I modified our Makefiles so that ''make install'' diffs SVN against installed copy, ignoring the "$URL" line and only installing if the rest of the file has a difference. Cheers, Derek -----Original Message----- From: puppet-users-bounces@madstop.com [mailto:puppet-users-bounces@madstop.com] On Behalf Of Brian Finney Sent: 13 November 2007 18:45 To: Puppet User Discussion Subject: Re: [Puppet-users] Creating a manifests ''release'' under SVN;trouble with SVN headers As this appears to be for a template you could wrap the url in an erb comment <%#$URL: svn://engsun05/bootstrap/rel/release-20071130/puppet/modules/crashdump/t emplates/dumpadm.conf $%> I believe the puppetmaster does the md5 checks on the results of the template which would allow this to work. However this will have the effect of the url not showing up in the final file produced by puppetd. For non templated files I don''t believe there will be an easy solution as the file contents is not interpreted by puppet and likely shouldn''t be. Thanks Brian On Nov 13, 2007 2:20 AM, <Derek.Whayman@barclayscapital.com> wrote:> Dear all > > I''ve gotten into the habit of including SVN headers in my templates, > etc so it is easy to see where the file installed into /etc/puppet/ > came from. Furthermore, we use svn cp to create release branches. > Therefore, you''ll see something like this: > > # $Id: dumpadm.conf 1239 2007-10-23 16:04:06Z sa_dewha $ # $URL: > svn://engsun05/bootstrap/rel/release-20071030/puppet/modules/crashdump > /t > emplates/dumpadm.conf $ > > All well and good until I create another release and the svn export > looks like this: > > # $Id: dumpadm.conf 1239 2007-10-23 16:04:06Z sa_dewha $ # $URL: > svn://engsun05/bootstrap/rel/release-20071130/puppet/modules/crashdump > /t > emplates/dumpadm.conf $ > > Puppet will declare that the file has changed and schedule some work > (here, subscribe/refreshonly on this file). > > I''d rather not pull URL/HeadURL from the header as you lose the path > and the release info. > > Has anyone tackled this before? I see two options: > > * Post svn export, run everything through sed to truncate the $URL$ > * Some kind of process to pull out the $URL$ from the earliest > release the revision number appears in. > > Former seems easy, latter would be straightforward in an incredibly > inefficient way (export everything, then pick ''n'' merge), not sure if > there''s a ''good'' way. > > Any other methods out there? > > Cheers, > Derek > ---------------------------------------------------------------------- > -- For important statutory and regulatory disclosures and more > information about Barclays Capital, please visit our web site athttp://www.barcap.com.> > Internet communications are not secure and therefore the BarclaysGroup does not accept legal responsibility for the contents of this message. Although the Barclays Group operates anti-virus programmes, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Barclays Group. Replies to this email may be monitored by the Barclays Group for operational or business reasons.> > Barclays Capital is the investment banking division of Barclays BankPLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays Group.> ---------------------------------------------------------------------- > -- _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >_______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users