/[packages]/cauldron/puppet/current/SPECS/puppet.spec
ViewVC logotype

Contents of /cauldron/puppet/current/SPECS/puppet.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 17153 - (show annotations) (download)
Fri Jan 14 03:18:17 2011 UTC (11 years, 10 months ago) by misc
File size: 6293 byte(s)
imported package puppet
1 %define name puppet
2 %define version 2.6.4
3 %define release %mkrel 1
4
5 %define ppconfdir conf/redhat
6
7 Name: %{name}
8 Version: %{version}
9 Release: %{release}
10 Summary: System Automation and Configuration Management Software
11 License: GPLv2+
12 Group: Monitoring
13 URL: http://www.puppetlabs.com/
14 Source0: http://puppetlabs.com/downloads/puppet/%{name}-%{version}.tar.gz
15 Source100: puppet.init
16 Source101: puppetmaster.init
17 BuildArch: noarch
18 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
19 BuildRequires: ruby facter
20 Requires: ruby >= 1.8.1
21 Requires: facter >= 1.1
22 Requires(post): rpm-helper
23 Requires(preun):rpm-helper
24
25 %description
26 Puppet lets you centrally manage every important aspect of your system using a
27 cross-platform specification language that manages all the separate elements
28 normally aggregated in different files, like users, cron jobs, and hosts,
29 along with obviously discrete elements like packages, services, and files.
30
31 This package provide the puppet client daemon.
32
33
34 %package server
35 Group: Monitoring
36 Summary: Server for the puppet system management tool
37 Requires: %{name} = %{version}
38 Requires(post): rpm-helper
39 Requires(preun):rpm-helper
40
41 %description server
42 Provides the central puppet server daemon (puppetmaster) which provides
43 manifests to clients.
44 The server can also function as a certificate authority and file server.
45
46 %prep
47 %setup -q
48
49 %build
50 # Use /usr/bin/ruby directly instead of /usr/bin/env ruby in
51 #+ executables. Otherwise, initscripts break since pidof can't
52 #+ find the right process
53 for f in bin/* ; do
54 sed -i -e '1c#!/usr/bin/ruby' $f
55 done
56
57 %install
58 %{__rm} -rf %{buildroot}
59
60 ruby install.rb --destdir=%{buildroot} --quick --no-rdoc
61
62 %{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}/manifests
63 %{__install} -d -m 0755 %{buildroot}%{_initrddir}
64 %{__install} -d -m 0755 %{buildroot}%{_defaultdocdir}/%{name}
65 %{__install} -d -m 0755 %{buildroot}%{_localstatedir}/lib/%{name}
66 %{__install} -d -m 0755 %{buildroot}%{_var}/run/%{name}
67 %{__install} -d -m 0755 %{buildroot}%{_logdir}/%{name}
68
69 #%{__find} %{buildroot}%{ruby_sitelibdir}/%{name} -type f -perm +ugo+x -print0 | xargs -0 -r %{__chmod} a-x
70 #
71 %{__install} -Dp -m 0644 %{ppconfdir}/client.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/puppetd
72 %{__install} -Dp -m 0644 %{ppconfdir}/server.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/puppetmasterd
73 %{__install} -m 755 %{SOURCE100} %{buildroot}%{_initrddir}/puppet
74 %{__install} -m 755 %{SOURCE101} %{buildroot}%{_initrddir}/puppetmaster
75 %{__install} -Dp -m 0644 %{ppconfdir}/fileserver.conf %{buildroot}%{_sysconfdir}/%{name}/fileserver.conf
76 %{__install} -Dp -m 0644 %{ppconfdir}/puppet.conf %{buildroot}%{_sysconfdir}/%{name}/puppet.conf
77 %{__install} -Dp -m 0644 %{ppconfdir}/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/puppet
78 # We need something for these ghosted files, otherwise rpmbuild
79 # will complain loudly. They won't be included in the binary packages
80 touch %{buildroot}%{_sysconfdir}/%{name}/puppetmasterd.conf
81 touch %{buildroot}%{_sysconfdir}/%{name}/puppetca.conf
82 touch %{buildroot}%{_sysconfdir}/%{name}/puppetd.conf
83
84 ## install vim syntax file
85 %{__install} -d -m 755 %{buildroot}%{_datadir}/vim/syntax
86 %{__install} -d -m 755 %{buildroot}%{_datadir}/vim/ftdetect
87
88 %{__install} -m 644 ext/vim/syntax/puppet.vim %{buildroot}%{_datadir}/vim/syntax
89 %{__install} -m 644 ext/vim/ftdetect/puppet.vim %{buildroot}%{_datadir}/vim/ftdetect
90
91 ## install emacs syntax file
92 %{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/emacs/site-start.d
93 %{__install} -d -m 0755 %{buildroot}%{_datadir}/emacs/site-lisp
94 %{__install} -m 0644 ext/emacs/puppet-mode-init.el %{buildroot}%{_sysconfdir}/emacs/site-start.d
95 %{__install} -m 0644 ext/emacs/puppet-mode.el %{buildroot}%{_datadir}/emacs/site-lisp
96
97 ## Install logcheck files
98 %{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/logcheck/ignore.d.{server,workstation}
99 %{__install} -m 0644 ext/logcheck/puppet %{buildroot}%{_sysconfdir}/logcheck/ignore.d.server/
100 %{__install} -m 0644 ext/logcheck/puppet %{buildroot}%{_sysconfdir}/logcheck/ignore.d.workstation/
101
102 %clean
103 rm -rf %{buildroot}
104
105 %pre
106 %_pre_useradd puppet %{_localstatedir}/lib/%{name} /sbin/nologin
107
108 %post
109 %_post_service puppet
110
111 %preun
112 %_preun_service puppet
113
114
115 %post server
116 %_post_service puppetmaster
117
118 %preun server
119 %_preun_service puppetmaster
120
121
122 %files
123 %defattr(-, root, root, 0755)
124 %doc CHANGELOG COPYING LICENSE README examples
125 %dir %{_sysconfdir}/puppet
126 %{_bindir}/puppet
127 %{_bindir}/ralsh
128 %{_bindir}/pi
129 %{_bindir}/filebucket
130 %{_bindir}/puppetdoc
131 %{_sbindir}/puppetd
132 %{ruby_sitelibdir}/puppet.rb
133 %{ruby_sitelibdir}/%{name}
134 %{_initrddir}/puppet
135
136 %{_mandir}/man8/puppet.*
137 %{_mandir}/man8/ralsh.*
138 %{_mandir}/man8/pi.*
139 %{_mandir}/man8/filebucket.*
140 %{_mandir}/man8/puppetdoc.*
141 %{_mandir}/man8/puppetd.*
142 %{_mandir}/man5/puppet.conf.*
143 %config(noreplace) %{_sysconfdir}/sysconfig/puppetd
144 %config(noreplace) %{_sysconfdir}/%{name}/puppet.conf
145 %config(noreplace) %{_sysconfdir}/logrotate.d/puppet
146 %ghost %config(noreplace,missingok) %{_sysconfdir}/%{name}/puppetd.conf
147
148 %{_sysconfdir}/logcheck/ignore.d.workstation/%{name}
149 %{_sysconfdir}/logcheck/ignore.d.server/
150 %{_sysconfdir}/emacs/site-start.d/puppet-mode-init.el
151 %{_datadir}/emacs/site-lisp/puppet-mode.el
152 %{_datadir}/vim/syntax/puppet.vim
153 %{_datadir}/vim/ftdetect/puppet.vim
154
155 # These need to be owned by puppet so the server can
156 # write to them
157 %attr(-, %{name}, %{name}) %{_var}/run/%{name}
158 %attr(-, %{name}, %{name}) %{_logdir}/%{name}
159 %attr(-, %{name}, %{name}) %{_localstatedir}/lib/%{name}
160
161 %files server
162 %defattr(-, root, root, 0755)
163 %{_sbindir}/puppetmasterd
164 %{_sbindir}/puppetca
165 %{_sbindir}/puppetrun
166 %{_sbindir}/puppetqd
167 %{_initrddir}/puppetmaster
168 %config(noreplace) %{_sysconfdir}/%{name}/fileserver.conf
169 %config(noreplace) %{_sysconfdir}/%{name}/auth.conf
170 %dir %{_sysconfdir}/puppet/manifests
171 %config(noreplace) %{_sysconfdir}/sysconfig/puppetmasterd
172 %ghost %config(noreplace,missingok) %{_sysconfdir}/%{name}/puppetca.conf
173 %ghost %config(noreplace,missingok) %{_sysconfdir}/%{name}/puppetmasterd.conf
174
175 %{_mandir}/man8/puppetca.*
176 %{_mandir}/man8/puppetrun.*
177 %{_mandir}/man8/puppetqd.*
178 %{_mandir}/man8/puppetmasterd.*
179
180

  ViewVC Help
Powered by ViewVC 1.1.28