~ubuntu-branches/ubuntu/lucid/puppet/lucid-security

« back to all changes in this revision

Viewing changes to conf/redhat/puppet.spec

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-12-23 00:48:10 UTC
  • mfrom: (1.1.10 upstream) (3.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091223004810-3i4oryds922g5n59
Tags: 0.25.1-3ubuntu1
* Merge from debian testing.  Remaining changes:
  - debian/rules:
    + Don't start puppet when first installing puppet.
  - debian/puppet.conf, lib/puppet/defaults.rb:
    + Move templates to /etc/puppet
  - lib/puppet/defaults.rb:
    + Fix /var/lib/puppet/state ownership.
  - man/man8/puppet.conf.8: 
    + Fix broken URL in manpage.
  - debian/control:
    + Update maintainer accordint to spec.
    + Puppetmaster Recommends -> Suggests
    + Created puppet-testsuite as a seperate. Allow the users to run puppet's 
      testsuite.
  - tests/Rakefile: Fix rakefile so that the testsuite can acutally be ran.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Augeas and SELinux requirements may be disabled at build time by passing
 
2
# --without augeas and/or --without selinux to rpmbuild or mock
 
3
 
1
4
%{!?ruby_sitelibdir: %define ruby_sitelibdir %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')}
2
5
%define confdir conf/redhat
3
6
 
4
7
Name:           puppet
5
 
Version:        0.24.7
6
 
Release:        3%{?dist}
 
8
Version:        0.25.1
 
9
Release:        1%{?dist}
7
10
Summary:        A network tool for managing many disparate systems
8
11
License:        GPLv2+
9
12
URL:            http://puppet.reductivelabs.com/
10
 
Source0:        http://reductivelabs.com/downloads/puppet/%{name}-%{version}.tgz
 
13
Source0:        http://reductivelabs.com/downloads/puppet/%{name}-%{version}.tar.gz
 
14
Patch0:         rundir-perms.patch
11
15
Group:          System Environment/Base
12
16
 
13
17
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
14
18
 
 
19
BuildRequires:  facter >= 1.5
15
20
BuildRequires:  ruby >= 1.8.1
16
21
 
17
22
%if 0%{?fedora} || 0%{?rhel} >= 5
20
25
Requires:       ruby-shadow
21
26
%endif
22
27
 
23
 
# Pull in libselinux-ruby where it is available
24
 
%if 0%{?fedora} >=9
25
 
Requires:       libselinux-ruby
 
28
# Pull in ruby selinux bindings where available
 
29
%if 0%{?fedora}
 
30
%if 0%{?fedora} >= 12
 
31
%{!?_without_selinux:Requires: ruby(selinux)}
 
32
%else
 
33
%{!?_without_selinux:Requires: libselinux-ruby}
 
34
%endif
26
35
%endif
27
36
 
28
 
Requires:       facter >= 1.1.4
 
37
Requires:       facter >= 1.5
29
38
Requires:       ruby >= 1.8.1
30
 
Requires:       ruby-augeas
 
39
%{!?_without_augeas:Requires: ruby-augeas}
 
40
 
31
41
Requires(pre):  shadow-utils
32
42
Requires(post): chkconfig
33
43
Requires(preun): chkconfig
55
65
 
56
66
%prep
57
67
%setup -q
 
68
%patch0 -p1
58
69
 
59
70
%build
60
 
for f in bin/* ; do
61
 
  sed -i -e '1c#!/usr/bin/ruby' $f
62
 
done
63
71
# Fix some rpmlint complaints
64
72
for f in mac_dscl.pp mac_dscl_revert.pp \
65
 
         mac_netinfo.pp mac_pkgdmg.pp ; do
 
73
         mac_pkgdmg.pp ; do
66
74
  sed -i -e'1d' examples/$f
67
75
  chmod a-x examples/$f
68
76
done
69
77
for f in external/nagios.rb network/http_server/mongrel.rb relationship.rb; do
70
78
  sed -i -e '1d' lib/puppet/$f
71
79
done
 
80
chmod +x ext/puppetstoredconfigclean.rb
72
81
 
73
82
find examples/ -type f -empty | xargs rm
74
83
find examples/ -type f | xargs chmod a-x
75
84
 
76
85
%install
77
86
rm -rf %{buildroot}
78
 
install -d -m0755 %{buildroot}%{_sbindir}
79
 
install -d -m0755 %{buildroot}%{_bindir}
80
 
install -d -m0755 %{buildroot}%{ruby_sitelibdir}
 
87
ruby install.rb --destdir=%{buildroot} --quick --no-rdoc
 
88
 
81
89
install -d -m0755 %{buildroot}%{_sysconfdir}/puppet/manifests
82
 
install -d -m0755 %{buildroot}%{_docdir}/%{name}-%{version}
83
 
install -d -m0755 %{buildroot}%{_mandir}/man8
84
90
install -d -m0755 %{buildroot}%{_localstatedir}/lib/puppet
85
91
install -d -m0755 %{buildroot}%{_localstatedir}/run/puppet
86
 
install -d -m0755 %{buildroot}%{_localstatedir}/log/puppet
87
 
install -Dp -m0755 bin/* %{buildroot}%{_sbindir}
88
 
mv %{buildroot}%{_sbindir}/puppet %{buildroot}%{_bindir}/puppet
89
 
mv %{buildroot}%{_sbindir}/ralsh %{buildroot}%{_bindir}/ralsh
90
 
mv %{buildroot}%{_sbindir}/filebucket %{buildroot}%{_bindir}/filebucket
91
 
mv %{buildroot}%{_sbindir}/puppetrun %{buildroot}%{_bindir}/puppetrun
92
 
mv %{buildroot}%{_sbindir}/puppetdoc %{buildroot}%{_bindir}/puppetdoc
93
 
install -Dp -m0644 lib/puppet.rb %{buildroot}%{ruby_sitelibdir}/puppet.rb
94
 
cp -a lib/puppet %{buildroot}%{ruby_sitelibdir}
95
 
find %{buildroot}%{ruby_sitelibdir} -type f -perm +ugo+x -print0 | xargs -0 -r chmod a-x
 
92
install -d -m0750 %{buildroot}%{_localstatedir}/log/puppet
96
93
install -Dp -m0644 %{confdir}/client.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/puppet
97
94
install -Dp -m0755 %{confdir}/client.init %{buildroot}%{_initrddir}/puppet
98
95
install -Dp -m0644 %{confdir}/server.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/puppetmaster
100
97
install -Dp -m0644 %{confdir}/fileserver.conf %{buildroot}%{_sysconfdir}/puppet/fileserver.conf
101
98
install -Dp -m0644 %{confdir}/puppet.conf %{buildroot}%{_sysconfdir}/puppet/puppet.conf
102
99
install -Dp -m0644 %{confdir}/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/puppet
103
 
install -Dp -m0644 man/man8/* %{buildroot}%{_mandir}/man8
 
100
 
104
101
# We need something for these ghosted files, otherwise rpmbuild
105
102
# will complain loudly. They won't be included in the binary packages
106
103
touch %{buildroot}%{_sysconfdir}/puppet/puppetmasterd.conf
107
104
touch %{buildroot}%{_sysconfdir}/puppet/puppetca.conf
108
105
touch %{buildroot}%{_sysconfdir}/puppet/puppetd.conf
109
106
 
 
107
# Install the ext/ directory to %{_datadir}/%{name}
 
108
install -d %{buildroot}%{_datadir}/%{name}
 
109
cp -a ext/ %{buildroot}%{_datadir}/%{name}
 
110
# emacs and vim bits are installed elsewhere
 
111
rm -rf %{buildroot}%{_datadir}/%{name}/ext/{emacs,vim}
 
112
 
 
113
# Install emacs mode files
 
114
emacsdir=%{buildroot}%{_datadir}/emacs/site-lisp
 
115
install -Dp -m0644 ext/emacs/puppet-mode.el $emacsdir/puppet-mode.el
 
116
install -Dp -m0644 ext/emacs/puppet-mode-init.el \
 
117
    $emacsdir/site-start.d/puppet-mode-init.el
 
118
 
 
119
# Install vim syntax files
 
120
vimdir=%{buildroot}%{_datadir}/vim/vimfiles
 
121
install -Dp -m0644 ext/vim/ftdetect/puppet.vim $vimdir/ftdetect/puppet.vim
 
122
install -Dp -m0644 ext/vim/syntax/puppet.vim $vimdir/syntax/puppet.vim
 
123
 
110
124
%files
111
125
%defattr(-, root, root, 0755)
 
126
%doc CHANGELOG COPYING LICENSE README examples
 
127
%{_bindir}/pi
112
128
%{_bindir}/puppet
113
129
%{_bindir}/ralsh
114
130
%{_bindir}/filebucket
115
131
%{_bindir}/puppetdoc
116
 
%exclude %{_mandir}/man8/pi.8.gz
 
132
%{_sbindir}/puppetca
117
133
%{_sbindir}/puppetd
118
134
%{ruby_sitelibdir}/*
119
135
%{_initrddir}/puppet
120
136
%dir %{_sysconfdir}/puppet
121
137
%config(noreplace) %{_sysconfdir}/sysconfig/puppet
122
138
%config(noreplace) %{_sysconfdir}/puppet/puppet.conf
 
139
%ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/puppetca.conf
123
140
%ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/puppetd.conf
124
 
%doc CHANGELOG COPYING LICENSE README examples
125
141
%config(noreplace) %{_sysconfdir}/logrotate.d/puppet
 
142
# We don't want to require emacs or vim, so we need to own these dirs
 
143
%{_datadir}/emacs
 
144
%{_datadir}/vim
 
145
%{_datadir}/%{name}
126
146
# These need to be owned by puppet so the server can
127
147
# write to them
128
148
%attr(-, puppet, puppet) %{_localstatedir}/run/puppet
129
149
%attr(-, puppet, puppet) %{_localstatedir}/log/puppet
130
150
%attr(-, puppet, puppet) %{_localstatedir}/lib/puppet
131
 
%doc %{_mandir}/man8/puppet.8.gz
132
 
%doc %{_mandir}/man8/puppet.conf.8.gz
133
 
%doc %{_mandir}/man8/puppetd.8.gz
134
 
%doc %{_mandir}/man8/ralsh.8.gz
135
 
%doc %{_mandir}/man8/puppetdoc.8.gz
 
151
%{_mandir}/man8/pi.8.gz
 
152
%{_mandir}/man8/puppet.8.gz
 
153
%{_mandir}/man8/puppet.conf.8.gz
 
154
%{_mandir}/man8/puppetca.8.gz
 
155
%{_mandir}/man8/puppetd.8.gz
 
156
%{_mandir}/man8/ralsh.8.gz
 
157
%{_mandir}/man8/puppetdoc.8.gz
136
158
 
137
159
%files server
138
160
%defattr(-, root, root, 0755)
139
161
%{_sbindir}/puppetmasterd
140
 
%{_bindir}/puppetrun
 
162
%{_sbindir}/puppetrun
 
163
%{_sbindir}/puppetqd
141
164
%{_initrddir}/puppetmaster
142
165
%config(noreplace) %{_sysconfdir}/puppet/fileserver.conf
143
166
%dir %{_sysconfdir}/puppet/manifests
144
167
%config(noreplace) %{_sysconfdir}/sysconfig/puppetmaster
145
 
%ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/puppetca.conf
146
168
%ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/puppetmasterd.conf
147
 
%{_sbindir}/puppetca
148
 
%doc %{_mandir}/man8/filebucket.8.gz
149
 
%doc %{_mandir}/man8/puppetca.8.gz
150
 
%doc %{_mandir}/man8/puppetmasterd.8.gz
151
 
%doc %{_mandir}/man8/puppetrun.8.gz
 
169
%{_mandir}/man8/filebucket.8.gz
 
170
%{_mandir}/man8/puppetmasterd.8.gz
 
171
%{_mandir}/man8/puppetrun.8.gz
152
172
 
153
173
# Fixed uid/gid were assigned in bz 472073 (Fedora), 471918 (RHEL-5),
154
174
# and 471919 (RHEL-4)
155
175
%pre
156
 
getent group puppet >/dev/null || groupadd -r puppet -g 52
157
 
getent passwd puppet >/dev/null || \
 
176
getent group puppet &>/dev/null || groupadd -r puppet -g 52 &>/dev/null
 
177
getent passwd puppet &>/dev/null || \
158
178
useradd -r -u 52 -g puppet -d %{_localstatedir}/lib/puppet -s /sbin/nologin \
159
 
useradd -r -g puppet -d %{_localstatedir}/lib/puppet -s /sbin/nologin \
160
 
    -c "Puppet" puppet || :
 
179
    -c "Puppet" puppet &>/dev/null || :
161
180
# ensure that old setups have the right puppet home dir
162
181
if [ $1 -gt 1 ] ; then
163
 
  usermod -d %{_localstatedir}/lib/puppet puppet || :
 
182
  usermod -d %{_localstatedir}/lib/puppet puppet &>/dev/null || :
164
183
fi
165
184
 
166
185
%post
195
214
rm -rf %{buildroot}
196
215
 
197
216
%changelog
 
217
* Tue Oct 20 2009 Todd Zullinger <tmz@pobox.com> - 0.25.1-1
 
218
- Update to 0.25.1
 
219
- Include the pi program and man page (R.I.Pienaar)
 
220
 
 
221
* Sat Oct 17 2009 Todd Zullinger <tmz@pobox.com> - 0.25.1-0.2.rc2
 
222
- Update to 0.25.1rc2
 
223
 
 
224
* Tue Sep 22 2009 Todd Zullinger <tmz@pobox.com> - 0.25.1-0.1.rc1
 
225
- Update to 0.25.1rc1
 
226
- Move puppetca to puppet package, it has uses on client systems
 
227
- Drop redundant %%doc from manpage %%file listings
 
228
 
 
229
* Fri Sep 04 2009 Todd Zullinger <tmz@pobox.com> - 0.25.0-1
 
230
- Update to 0.25.0
 
231
- Fix permissions on /var/log/puppet (#495096)
 
232
- Install emacs mode and vim syntax files (#491437)
 
233
- Install ext/ directory in %%{_datadir}/%{name} (/usr/share/puppet)
 
234
 
 
235
* Mon May 04 2009 Todd Zullinger <tmz@pobox.com> - 0.25.0-0.1.beta1
 
236
- Update to 0.25.0beta1
 
237
- Make Augeas and SELinux requirements build time options
 
238
 
 
239
* Mon Mar 23 2009 Todd Zullinger <tmz@pobox.com> - 0.24.8-1
 
240
- Update to 0.24.8
 
241
- Quiet output from %%pre
 
242
- Use upstream install script
 
243
- Increase required facter version to >= 1.5
 
244
 
 
245
* Tue Dec 16 2008 Todd Zullinger <tmz@pobox.com> - 0.24.7-4
 
246
- Remove redundant useradd from %%pre
 
247
 
198
248
* Tue Dec 16 2008 Jeroen van Meeuwen <kanarip@kanarip.com> - 0.24.7-3
199
249
- New upstream version
200
250
- Set a static uid and gid (#472073, #471918, #471919)