[PATCH/puppet 1/1] Fix for #4772 - Update SuSE .spec file

1 view
Skip to first unread message

Jacob Helwig

unread,
Sep 24, 2010, 2:36:48 PM9/24/10
to puppe...@googlegroups.com, Ben Kevan
From: Ben Kevan <Ben....@gmail.com>

---

This was originally a patch attached to #4772 [1]

[1] http://projects.puppetlabs.com/issues/4772

conf/suse/puppet.spec | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/conf/suse/puppet.spec b/conf/suse/puppet.spec
index bd4b358..941a650 100644
--- a/conf/suse/puppet.spec
+++ b/conf/suse/puppet.spec
@@ -4,23 +4,20 @@

Summary: A network tool for managing many disparate systems
Name: puppet
-Version: 2.6.0
+Version: 2.6.1
Release: 1%{?dist}
License: GPL
-Group: Productivity/Networking/System
+Group: Productivity/Networking/System

URL: http://puppetlabs.com/projects/puppet/
Source0: http://puppetlabs.com/downloads/puppet/%{name}-%{version}.tar.gz
-Source1: client.init
-Source2: server.init
-Patch0: ruby-env.patch

PreReq: %{insserv_prereq} %{fillup_prereq}
-Requires: ruby >= 1.8.2
+Requires: ruby >= 1.8.1
Requires: facter >= 1.5
Requires: cron
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: ruby >= 1.8.7
+BuildRequires: ruby >= 1.8.1

%description
Puppet lets you centrally manage every important aspect of your system using a
@@ -29,7 +26,7 @@ normally aggregated in different files, like users, cron jobs, and hosts,
along with obviously discrete elements like packages, services, and files.

%package server
-Group: Productivity/Networking/System
+Group: Productivity/Networking/System
Summary: Server for the puppet system management tool
Requires: puppet = %{version}-%{release}

@@ -39,10 +36,9 @@ The server can also function as a certificate authority and file server.

%prep
%setup -q
-%patch0 -p0

%build
-for f in bin/* ; do
+for f in bin/* sbin/*; do
sed -i -e '1c#!/usr/bin/ruby' $f
done

@@ -63,16 +59,16 @@ done
find %{buildroot}%{ruby_sitelibdir} -type f -perm +ugo+x -exec chmod a-x '{}' \;
%{__cp} -a %{pbuild}/conf/redhat/client.sysconfig %{buildroot}%{_confdir}/client.sysconfig
%{__install} -Dp -m0644 %{buildroot}%{_confdir}/client.sysconfig %{buildroot}/var/adm/fillup-templates/sysconfig.puppet
-%{__install} -Dp -m0755 %SOURCE1 %{buildroot}%{_initrddir}/puppet
%{__cp} -a %{pbuild}/conf/redhat/server.sysconfig %{buildroot}%{_confdir}/server.sysconfig
%{__install} -Dp -m0644 %{buildroot}%{_confdir}/server.sysconfig %{buildroot}/var/adm/fillup-templates/sysconfig.puppetmaster
-%{__install} -Dp -m0755 %SOURCE2 %{buildroot}%{_initrddir}/puppetmaster
%{__cp} -a %{pbuild}/conf/redhat/fileserver.conf %{buildroot}%{_confdir}/fileserver.conf
%{__install} -Dp -m0644 %{buildroot}%{_confdir}/fileserver.conf %{buildroot}%{_sysconfdir}/puppet/fileserver.conf
%{__cp} -a %{pbuild}/conf/redhat/puppet.conf %{buildroot}%{_confdir}/puppet.conf
%{__install} -Dp -m0644 %{buildroot}%{_confdir}/puppet.conf %{buildroot}%{_sysconfdir}/puppet/puppet.conf
%{__cp} -a %{pbuild}/conf/redhat/logrotate %{buildroot}%{_confdir}/logrotate
%{__install} -Dp -m0644 %{buildroot}%{_confdir}/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/puppet
+%{__install} -Dp -m0755 %{confdir}/client.init %{buildroot}%{_initrddir}/puppet
+%{__install} -Dp -m0755 %{confdir}/server.init %{buildroot}%{_initrddir}/puppetmaster
%{__ln_s} %{_initrddir}/puppet %{buildroot}%{_sbindir}/rcpuppet
%{__ln_s} %{_initrddir}/puppetmaster %{buildroot}%{_sbindir}/rcpuppetmaster

@@ -140,6 +136,13 @@ find %{buildroot}%{ruby_sitelibdir} -type f -perm +ugo+x -exec chmod a-x '{}' \;
%{__rm} -rf %{buildroot}

%changelog
+* Tue Sep 14 2010 Ben Kevan <ben....@gmail.com> - 2.6.1
+- New version to 2.6.1
+- Add client.init and server.init from source since it's now included in the packages
+- Bumped ruby version back down, as issue #4333 is resolved
+- Removed ruby-env patch, replaced with sed in prep
+- Update urls to puppetlabs.com
+
* Wed Jul 21 2010 Ben Kevan <ben....@gmail.com> - 2.6.0
- New version and ruby version bump
- Add puppetdoc to %_bindir (unknown why original suse package, excluded or forgot to add)
--
1.7.3

Jacob Helwig

unread,
Sep 24, 2010, 2:53:08 PM9/24/10
to puppe...@googlegroups.com, Ben Kevan
I didn't put a S-o-b line on behalf of Ben, since I wasn't sure if I
should be doing that for patches originally submitted via Redmine.

The only real comment I have on Ben's patch is that we should also
remove conf/suse/ruby-env.patch, since it's not being used anymore, but
I can submit a follow-up patch to do that.

Couple of very minor questions/comments inline.

--
Jacob Helwig

On Fri, 24 Sep 2010 11:36:48 -0700, Jacob Helwig wrote:
>
> From: Ben Kevan <Ben....@gmail.com>
>
> ---
>
> This was originally a patch attached to #4772 [1]
>
> [1] http://projects.puppetlabs.com/issues/4772
>
> conf/suse/puppet.spec | 27 +++++++++++++++------------
> 1 files changed, 15 insertions(+), 12 deletions(-)
>
> diff --git a/conf/suse/puppet.spec b/conf/suse/puppet.spec
> index bd4b358..941a650 100644
> --- a/conf/suse/puppet.spec
> +++ b/conf/suse/puppet.spec
> @@ -4,23 +4,20 @@
>
> Summary: A network tool for managing many disparate systems
> Name: puppet
> -Version: 2.6.0
> +Version: 2.6.1
> Release: 1%{?dist}
> License: GPL
> -Group: Productivity/Networking/System
> +Group: Productivity/Networking/System

Necessary, or stylistic? The other fields don't have a hard-tab here,
so I'm curious why Group is the only one that does, since that seems to
be the only change on this line?

>
> URL: http://puppetlabs.com/projects/puppet/
> Source0: http://puppetlabs.com/downloads/puppet/%{name}-%{version}.tar.gz
> -Source1: client.init
> -Source2: server.init
> -Patch0: ruby-env.patch
>
> PreReq: %{insserv_prereq} %{fillup_prereq}
> -Requires: ruby >= 1.8.2
> +Requires: ruby >= 1.8.1
> Requires: facter >= 1.5
> Requires: cron
> BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
> -BuildRequires: ruby >= 1.8.7
> +BuildRequires: ruby >= 1.8.1
>
> %description
> Puppet lets you centrally manage every important aspect of your system using a
> @@ -29,7 +26,7 @@ normally aggregated in different files, like users, cron jobs, and hosts,
> along with obviously discrete elements like packages, services, and files.
>
> %package server
> -Group: Productivity/Networking/System
> +Group: Productivity/Networking/System

Same as above.

> Summary: Server for the puppet system management tool
> Requires: puppet = %{version}-%{release}
>
> @@ -39,10 +36,9 @@ The server can also function as a certificate authority and file server.
>
> %prep
> %setup -q
> -%patch0 -p0
>
> %build
> -for f in bin/* ; do
> +for f in bin/* sbin/*; do
> sed -i -e '1c#!/usr/bin/ruby' $f
> done

I wouldn't expect this be changed as part of this patch, and is just me
voicing a general concern, but unconditionally replacing the first line
of any file under bin/, and sbin/ seems...dangerous. This is probably
just be being paranoid.

All of the files currently under bin/ and sbin/ start with
"#!/usr/bin/env ruby", but I'd be much more comfortable with a
replacement that wouldn't end up changing something like "#!/bin/sh" to
"#!/usr/bin/ruby" if a non-Ruby script were to make it into bin/ or
sbin/ for some reason.

signature.asc

Paul Berry

unread,
Sep 27, 2010, 4:57:28 PM9/27/10
to puppe...@googlegroups.com, Ben Kevan
I'm not an expert in SUSE, but it sounds like Ben is, so I'm happy to go with his recommendations on how to set up the SUSE configuration.

So I would say +1, with one exception:

Puppet is officially only supported on Ruby versions 1.8.2 and later (see http://projects.puppetlabs.com/projects/1/wiki/Frequently_Asked_Questions#What+Is+The+Minimum+Version+of+Ruby?).  So I think we should leave the PreReq line as "Requires: ruby >= 1.8.2".  I also recommend changing BuildRequires to 1.8.2 for consistency, although this latter change is really not critical since Puppet is interpreted ruby code and doesn't require building.

Paul

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQGcBAEBAgAGBQJMnPOTAAoJEHJabXWGiqEB1XwMAMImy/zsfzVNJKdd7/EpyrNO
lfectH/5HvwevjNu6XKvgE/Ywxqioc7ZfgVXb/u/iUVIGJeVuwGcYiYQkpE4E1lg
yiOB/QDkpQYRRPE4/0AtmiNeJXTuuHoTKPOIqDywPwxTZ0eWPYAcmcOLFqS7Hioo
Ch7/n6atIGGPuyuvj2UBCBd/aCcqILechxwMKtQqRalcCK3/wIUWWn/XQpgBgIIQ
gH9IIwMhNd/MZCc0gnN4vUi6EA8ygFXEYPwu9YK4jp4ew/cuCvZQOisNBV2ADywm
MGJ41hCvE0yLikC65flxs6GFh5CKN8RJxBQixjf5q5Adwx5QJWewex6a7uBcgJgG
2dy2Ct98iHuCtEeurXAiWQ9+I1iBzj6GJIfjSjWQnaNZg23rPsRRxHXfOpsUyaws
HYPpk/7rMNF5SUmba9tKEtTfWi8hsukLxwSNkqJPxRcZZ+3zvUuLh18PzFMkgw4C
aIviEr+1wb+14wLf/EG+bGt0dpELmiDEfKbJcXVEiA==
=P3Jg
-----END PGP SIGNATURE-----


Todd Zullinger

unread,
Sep 27, 2010, 8:40:00 PM9/27/10
to puppe...@googlegroups.com, Ben Kevan
Paul Berry wrote:
> Puppet is officially only supported on Ruby versions 1.8.2 and later (see
> http://projects.puppetlabs.com/projects/1/wiki/Frequently_Asked_Questions#What+Is+The+Minimum+Version+of+Ruby?).

I've thought that RHEL-4 was a supported platform, and it ships with
ruby-1.8.1. Is that not correct any longer? (The FAQ history doesn't
really shed any light here, as 1.8.2 is there from the first revision,
but I believe that's only because of the conversion from Trac to
Redmine.)

--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Foxes prefer rabbits with short claws.
-- Nadja Adolf

Luke Kanies

unread,
Sep 28, 2010, 1:35:04 AM9/28/10
to puppe...@googlegroups.com, Ben Kevan
On Sep 27, 2010, at 5:40 PM, Todd Zullinger wrote:

> Paul Berry wrote:
>> Puppet is officially only supported on Ruby versions 1.8.2 and later (see
>> http://projects.puppetlabs.com/projects/1/wiki/Frequently_Asked_Questions#What+Is+The+Minimum+Version+of+Ruby?).
>
> I've thought that RHEL-4 was a supported platform, and it ships with
> ruby-1.8.1. Is that not correct any longer? (The FAQ history doesn't
> really shed any light here, as 1.8.2 is there from the first revision,
> but I believe that's only because of the conversion from Trac to
> Redmine.)

I don't remember what our final answer was on this one is, actually. I know we've got paid support customers using RHEL 4, and I think in essentially all cases we've convinced them to upgrade ruby rather than stick with 1.8.1.

In the end, I think Red Hat's version of 1.8.1 in RHEL 4 will always work, but when it doesn't, we can't really do much about it. I might be willing to go so far as to say Puppet officially supports 1.8.1 on RHEL, but I'm not willing to say it generally.

I don't actually know if that's an official position, though, weirdly.

--
I believe that if it were left to artists to choose their own labels,
most would choose none. -- Ben Shahn
---------------------------------------------------------------------
Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199


Todd Zullinger

unread,
Sep 28, 2010, 12:16:46 PM9/28/10
to puppe...@googlegroups.com, Ben Kevan
Luke Kanies wrote:
> I don't remember what our final answer was on this one is, actually.
> I know we've got paid support customers using RHEL 4, and I think in
> essentially all cases we've convinced them to upgrade ruby rather
> than stick with 1.8.1.
>
> In the end, I think Red Hat's version of 1.8.1 in RHEL 4 will always
> work, but when it doesn't, we can't really do much about it. I
> might be willing to go so far as to say Puppet officially supports
> 1.8.1 on RHEL, but I'm not willing to say it generally.
>
> I don't actually know if that's an official position, though,
> weirdly.

Ha. That's fair enough. I know RHEL 4 feels pretty ancient these
days. I keep the packages updated, but I don't use any RHEL/CentOS 4
systems myself. I don't honestly know how much use and testing the
packages get.

--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Happiness, n.: An agreeable sensation arising from contemplating the
misery of another.
-- Ambrose Bierce, "The Devil's Dictionary"

Paul Berry

unread,
Sep 29, 2010, 1:29:05 PM9/29/10
to Ben Kevan, puppe...@googlegroups.com
On Tue, Sep 28, 2010 at 11:32 AM, Paul Berry <pa...@puppetlabs.com> wrote:
On Mon, Sep 27, 2010 at 5:59 PM, Ben Kevan <ben....@gmail.com> wrote:

But yeah.. I'm for changing those to 1.8.2. 

Thanks, Ben.  Let us know where we can pick up the revised patch and we'll see that it gets merged in.

Whoops, I misread your e-mail as "I'm changing those to 1.8.2" and assumed you were in the process of submitting another patch.  Sorry about that--I'll go ahead and make those changes.

Paul

Jacob Helwig

unread,
Sep 29, 2010, 6:15:02 PM9/29/10
to puppe...@googlegroups.com, Jacob Helwig, Ben Kevan

Signed-off-by: Ben Kevan <Ben....@gmail.com>
Signed-off-by: Jacob Helwig <ja...@puppetlabs.com>
---

Given the discussion in this thread, here's a revised patch, that I
think meets (what I think are) our conclusions.

Also available at:
git://github.com/jhelwig/puppet.git ticket/2.6.x/4772

conf/suse/puppet.spec | 23 +++++++++++++----------
conf/suse/ruby-env.patch | 17 -----------------
2 files changed, 13 insertions(+), 27 deletions(-)
delete mode 100644 conf/suse/ruby-env.patch

diff --git a/conf/suse/puppet.spec b/conf/suse/puppet.spec
index bd4b358..777f6a4 100644


--- a/conf/suse/puppet.spec
+++ b/conf/suse/puppet.spec
@@ -4,23 +4,20 @@

Summary: A network tool for managing many disparate systems
Name: puppet
-Version: 2.6.0
+Version: 2.6.1
Release: 1%{?dist}
License: GPL

Group: Productivity/Networking/System



URL: http://puppetlabs.com/projects/puppet/
Source0: http://puppetlabs.com/downloads/puppet/%{name}-%{version}.tar.gz
-Source1: client.init
-Source2: server.init
-Patch0: ruby-env.patch

PreReq: %{insserv_prereq} %{fillup_prereq}

Requires: ruby >= 1.8.2


Requires: facter >= 1.5
Requires: cron
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: ruby >= 1.8.7

+BuildRequires: ruby >= 1.8.2



%description
Puppet lets you centrally manage every important aspect of your system using a

@@ -39,11 +36,10 @@ The server can also function as a certificate authority and file server.



%prep
%setup -q
-%patch0 -p0

%build
-for f in bin/* ; do

- sed -i -e '1c#!/usr/bin/ruby' $f


+for f in bin/* sbin/*; do

+ sed -i -e '1s,^#!.*ruby$,#!/usr/bin/ruby,' $f
done

%install


@@ -63,16 +59,16 @@ done
find %{buildroot}%{ruby_sitelibdir} -type f -perm +ugo+x -exec chmod a-x '{}' \;
%{__cp} -a %{pbuild}/conf/redhat/client.sysconfig %{buildroot}%{_confdir}/client.sysconfig
%{__install} -Dp -m0644 %{buildroot}%{_confdir}/client.sysconfig %{buildroot}/var/adm/fillup-templates/sysconfig.puppet
-%{__install} -Dp -m0755 %SOURCE1 %{buildroot}%{_initrddir}/puppet
%{__cp} -a %{pbuild}/conf/redhat/server.sysconfig %{buildroot}%{_confdir}/server.sysconfig
%{__install} -Dp -m0644 %{buildroot}%{_confdir}/server.sysconfig %{buildroot}/var/adm/fillup-templates/sysconfig.puppetmaster
-%{__install} -Dp -m0755 %SOURCE2 %{buildroot}%{_initrddir}/puppetmaster
%{__cp} -a %{pbuild}/conf/redhat/fileserver.conf %{buildroot}%{_confdir}/fileserver.conf
%{__install} -Dp -m0644 %{buildroot}%{_confdir}/fileserver.conf %{buildroot}%{_sysconfdir}/puppet/fileserver.conf
%{__cp} -a %{pbuild}/conf/redhat/puppet.conf %{buildroot}%{_confdir}/puppet.conf
%{__install} -Dp -m0644 %{buildroot}%{_confdir}/puppet.conf %{buildroot}%{_sysconfdir}/puppet/puppet.conf
%{__cp} -a %{pbuild}/conf/redhat/logrotate %{buildroot}%{_confdir}/logrotate
%{__install} -Dp -m0644 %{buildroot}%{_confdir}/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/puppet
+%{__install} -Dp -m0755 %{confdir}/client.init %{buildroot}%{_initrddir}/puppet
+%{__install} -Dp -m0755 %{confdir}/server.init %{buildroot}%{_initrddir}/puppetmaster
%{__ln_s} %{_initrddir}/puppet %{buildroot}%{_sbindir}/rcpuppet
%{__ln_s} %{_initrddir}/puppetmaster %{buildroot}%{_sbindir}/rcpuppetmaster

@@ -140,6 +136,13 @@ find %{buildroot}%{ruby_sitelibdir} -type f -perm +ugo+x -exec chmod a-x '{}' \;
%{__rm} -rf %{buildroot}

%changelog
+* Tue Sep 14 2010 Ben Kevan <ben....@gmail.com> - 2.6.1
+- New version to 2.6.1
+- Add client.init and server.init from source since it's now included in the packages

+- Change BuildRequires Ruby version to match Requires Ruby version


+- Removed ruby-env patch, replaced with sed in prep
+- Update urls to puppetlabs.com
+
* Wed Jul 21 2010 Ben Kevan <ben....@gmail.com> - 2.6.0
- New version and ruby version bump
- Add puppetdoc to %_bindir (unknown why original suse package, excluded or forgot to add)

diff --git a/conf/suse/ruby-env.patch b/conf/suse/ruby-env.patch
deleted file mode 100644
index 0a7a8a7..0000000
--- a/conf/suse/ruby-env.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- sbin/puppetd 2010-07-18 14:17:38.000000000 -0700
-+++ sbin/puppetd 2010-07-21 17:31:57.057138615 -0700
-@@ -1,4 +1,4 @@
--#!/usr/bin/env ruby
-+#!/usr/bin/ruby
-
- require 'puppet/application/agent'
- Puppet::Application[:agent].run
-
---- sbin/puppetmasterd 2010-07-18 14:17:38.000000000 -0700
-+++ sbin/puppetmasterd 2010-07-21 17:32:10.178513969 -0700
-@@ -1,4 +1,4 @@
--#!/usr/bin/env ruby
-+#!/usr/bin/ruby
-
- require 'puppet/application/master'
- Puppet::Application[:master].run
--
1.7.3

Paul Berry

unread,
Sep 29, 2010, 7:54:50 PM9/29/10
to puppe...@googlegroups.com
+1

I believe this captures the consensus that Jacob and Ben reached, and it looks correct to me.


--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to puppe...@googlegroups.com.
To unsubscribe from this group, send email to puppet-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.


Markus Roberts

unread,
Sep 30, 2010, 5:18:05 PM9/30/10
to puppe...@googlegroups.com, Jacob Helwig, Ben Kevan

+1, and thanks for digging into the details on this one.
 
Reply all
Reply to author
Forward
0 new messages