]> git.pld-linux.org Git - packages/cobbler.git/blob - cobbler.spec
- add apache configs, missing dir
[packages/cobbler.git] / cobbler.spec
1 # TODO
2 # - webapps
3 # - FHS in web paths
4 Summary:        Boot server configurator
5 Name:           cobbler
6 Version:        0.6.4
7 Release:        0.5
8 Source0:        http://cobbler.et.redhat.com/download/%{name}-%{version}.tar.gz
9 # Source0-md5:  1f46e1860e10b2e250c73ebb2a3d8227
10 Source1:        %{name}-apache.conf
11 License:        GPL v2+
12 Group:          Applications/System
13 Requires:       apache-mod_python
14 Requires:       createrepo
15 Requires:       python >= 2.3
16 Requires:       python-cheetah
17 Requires:       python-devel
18 Requires:       python-rhpl
19 Requires:       tftpdaemon
20 Requires:       webapps
21 %ifarch %{ix86} %{x8664}
22 Requires:       syslinux
23 %endif
24 URL:            http://cobbler.et.redhat.com/
25 BuildRequires:  python-cheetah
26 BuildRequires:  python-devel
27 #BuildRequires: redhat-rpm-config
28 Requires(post): /sbin/chkconfig
29 Requires(preun):        /sbin/chkconfig
30 BuildArch:      noarch
31 ExcludeArch:    ppc
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %define         _webapps        /etc/webapps
35 %define         _webapp         %{name}
36 %define         _appdir         /var/www/cobbler
37 %define         _cgibindir      /var/www/cgi-bin
38
39 #define         _appdir         %{_datadir}/%{name}
40 #define     _cgibindir  %{_prefix}/lib/cgi-bin/%{name}
41
42 %description
43 Cobbler is a network boot and update server. Cobbler supports PXE,
44 provisioning virtualized images, and reinstalling existing Linux
45 machines. The last two modes require a helper tool called 'koan' that
46 integrates with cobbler. Cobbler's advanced features include importing
47 distributions from DVDs and rsync mirrors, kickstart templating,
48 integrated yum mirroring, and built-in DHCP Management. Cobbler has a
49 Python API for integration with other GPL systems management
50 applications.
51
52 %prep
53 %setup -q
54
55 %build
56 %{__python} setup.py build
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
61 %{__python} setup.py install \
62         --optimize=1 \
63         --root=$RPM_BUILD_ROOT
64
65 install -d $RPM_BUILD_ROOT%{_webapps}/%{_webapp}
66 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
67 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
68
69 %py_postclean
70
71 mv $RPM_BUILD_ROOT/etc/{init.d,rc.d/init.d}/cobblerd
72
73 %clean
74 rm -rf $RPM_BUILD_ROOT
75
76 %post
77 cp /var/lib/cobbler/distros*  /var/lib/cobbler/backup 2>/dev/null
78 cp /var/lib/cobbler/profiles* /var/lib/cobbler/backup 2>/dev/null
79 cp /var/lib/cobbler/systems*  /var/lib/cobbler/backup 2>/dev/null
80 cp /var/lib/cobbler/repos*    /var/lib/cobbler/backup 2>/dev/null
81 %{_bindir}/cobbler reserialize
82 /sbin/chkconfig --add cobblerd
83 %service cobblerd restart
84
85 %preun
86 if [ $1 = 0 ]; then
87         %service cobblerd stop
88         /sbin/chkconfig --del cobblerd
89 fi
90
91 %triggerin -- apache1 < 1.3.37-3, apache1-base
92 %webapp_register apache %{_webapp}
93
94 %triggerun -- apache1 < 1.3.37-3, apache1-base
95 %webapp_unregister apache %{_webapp}
96
97 %triggerin -- apache < 2.2.0, apache-base
98 %webapp_register httpd %{_webapp}
99
100 %triggerun -- apache < 2.2.0, apache-base
101 %webapp_unregister httpd %{_webapp}
102
103 %files
104 %defattr(644,root,root,755)
105 %doc AUTHORS CHANGELOG README
106
107 %dir %attr(750,root,http) %{_webapps}/%{_webapp}
108 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf
109 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf
110
111 %defattr(755,http,http)
112 %dir %{_cgibindir}/cobbler
113 %{_cgibindir}/cobbler/findks.cgi
114 %{_cgibindir}/cobbler/nopxe.cgi
115 %{_cgibindir}/cobbler/webui.cgi
116 %defattr(660,http,http)
117 %config(noreplace) %{_cgibindir}/cobbler/.htaccess
118 %config(noreplace) %{_cgibindir}/cobbler/.htpasswd
119
120 %defattr(755,http,http)
121 %dir %{_datadir}/cobbler
122 %dir %{_datadir}/cobbler/webui_templates
123 %defattr(444,http,http)
124 %{_datadir}/cobbler/webui_templates/*.tmpl
125
126 %defattr(4755,http,http)
127 %dir /var/log/cobbler
128 %dir /var/log/cobbler/kicklog
129 %dir %{_appdir}
130 %dir %{_appdir}/localmirror
131 %dir %{_appdir}/kickstarts
132 %dir %{_appdir}/kickstarts_sys
133 %dir %{_appdir}/repo_mirror
134 %dir %{_appdir}/repos_profile
135 %dir %{_appdir}/repos_system
136 %dir %{_appdir}/ks_mirror
137 %dir %{_appdir}/ks_mirror/config
138 %dir %{_appdir}/images
139 %dir %{_appdir}/distros
140 %dir %{_appdir}/profiles
141 %dir %{_appdir}/systems
142 %dir %{_appdir}/links
143 %defattr(755,http,http)
144 %dir %{_appdir}/webui
145 %defattr(444,http,http)
146 %{_appdir}/webui/*.css
147 %{_appdir}/webui/*.js
148 %{_appdir}/webui/*.png
149 %{_appdir}/webui/*.html
150 %defattr(-,root,root)
151 %dir /tftpboot/pxelinux.cfg
152 %dir /tftpboot/images
153 %attr(755,root,root) %{_bindir}/cobbler
154 %attr(755,root,root) %{_bindir}/cobblerd
155 %dir %{_sysconfdir}/cobbler
156 %config(noreplace) %{_sysconfdir}/cobbler/default.ks
157 %config(noreplace) %{_sysconfdir}/cobbler/kickstart_fc5.ks
158 %config(noreplace) %{_sysconfdir}/cobbler/kickstart_fc6.ks
159 %config(noreplace) %{_sysconfdir}/cobbler/kickstart_fc6_domU.ks
160 %config(noreplace) %{_sysconfdir}/cobbler/dhcp.template
161 %config(noreplace) %{_sysconfdir}/cobbler/dnsmasq.template
162 %config(noreplace) %{_sysconfdir}/cobbler/pxedefault.template
163 %config(noreplace) %{_sysconfdir}/cobbler/pxeprofile.template
164 %config(noreplace) %{_sysconfdir}/cobbler/pxesystem.template
165 %config(noreplace) %{_sysconfdir}/cobbler/pxesystem_ia64.template
166 %config(noreplace) %{_sysconfdir}/cobbler/rsync.exclude
167 %config(noreplace) /etc/logrotate.d/cobblerd_rotate
168 %config(noreplace) %{_sysconfdir}/cobbler/modules.conf
169 %config(noreplace) %{_sysconfdir}/cobbler/webui-cherrypy.cfg
170 %dir %{py_sitescriptdir}/cobbler
171 %dir %{py_sitescriptdir}/cobbler/yaml
172 %dir %{py_sitescriptdir}/cobbler/modules
173 %dir %{py_sitescriptdir}/cobbler/webui
174 %{py_sitescriptdir}/cobbler/*.py[co]
175 %{py_sitescriptdir}/cobbler/yaml/*.py[co]
176 %{py_sitescriptdir}/cobbler/modules/*.py[co]
177 %{py_sitescriptdir}/cobbler/webui/*.py[co]
178 %{_mandir}/man1/cobbler.1*
179 %attr(754,root,root) /etc/rc.d/init.d/cobblerd
180 %config(noreplace) %{_sysconfdir}/httpd/conf.d/cobbler.conf
181 %dir /var/log/cobbler/syslog
182
183 %defattr(755,root,root)
184 %dir /var/lib/cobbler
185 %dir /var/lib/cobbler/kickstarts/
186 %dir /var/lib/cobbler/backup/
187 %dir /var/lib/cobbler/triggers/add/distro/pre
188 %dir /var/lib/cobbler/triggers/add/distro/post
189 %dir /var/lib/cobbler/triggers/add/profile/pre
190 %dir /var/lib/cobbler/triggers/add/profile/post
191 %dir /var/lib/cobbler/triggers/add/system/pre
192 %dir /var/lib/cobbler/triggers/add/system/post
193 %dir /var/lib/cobbler/triggers/add/repo/pre
194 %dir /var/lib/cobbler/triggers/add/repo/post
195 %dir /var/lib/cobbler/triggers/delete/distro/pre
196 %dir /var/lib/cobbler/triggers/delete/distro/post
197 %dir /var/lib/cobbler/triggers/delete/profile/pre
198 %dir /var/lib/cobbler/triggers/delete/profile/post
199 %dir /var/lib/cobbler/triggers/delete/system/pre
200 %dir /var/lib/cobbler/triggers/delete/system/post
201 %dir /var/lib/cobbler/triggers/delete/repo/pre
202 %dir /var/lib/cobbler/triggers/delete/repo/post
203 %dir /var/lib/cobbler/triggers/sync/pre
204 %dir /var/lib/cobbler/triggers/sync/post
205 %dir /var/lib/cobbler/snippets/
206
207 %defattr(744,root,root)
208 %config(noreplace) /var/lib/cobbler/triggers/sync/post/restart-services.trigger
209
210 %defattr(664,root,root)
211 %config(noreplace) /var/lib/cobbler/settings
212 %config(noreplace) /var/lib/cobbler/snippets/partition_select
213 /var/lib/cobbler/elilo-3.6-ia64.efi
214 /var/lib/cobbler/menu.c32
215 %defattr(660,http,http)
216 %config(noreplace) %{_sysconfdir}/cobbler/auth.conf
217
218 %defattr(664,root,root)
219 %config(noreplace) /var/lib/cobbler/cobbler_hosts
This page took 0.087906 seconds and 3 git commands to generate.