]> git.pld-linux.org Git - packages/cobbler.git/blame - cobbler.spec
- add apache configs, missing dir
[packages/cobbler.git] / cobbler.spec
CommitLineData
4abcd8ff
ER
1# TODO
2# - webapps
f6628fdc 3# - FHS in web paths
a649639e
ER
4Summary: Boot server configurator
5Name: cobbler
6Version: 0.6.4
f6628fdc 7Release: 0.5
4abcd8ff 8Source0: http://cobbler.et.redhat.com/download/%{name}-%{version}.tar.gz
a649639e 9# Source0-md5: 1f46e1860e10b2e250c73ebb2a3d8227
f6628fdc 10Source1: %{name}-apache.conf
a649639e
ER
11License: GPL v2+
12Group: Applications/System
4abcd8ff 13Requires: apache-mod_python
a649639e 14Requires: createrepo
a649639e
ER
15Requires: python >= 2.3
16Requires: python-cheetah
17Requires: python-devel
4abcd8ff
ER
18Requires: python-rhpl
19Requires: tftpdaemon
20Requires: webapps
21%ifarch %{ix86} %{x8664}
a649639e
ER
22Requires: syslinux
23%endif
f6628fdc 24URL: http://cobbler.et.redhat.com/
a649639e
ER
25BuildRequires: python-cheetah
26BuildRequires: python-devel
27#BuildRequires: redhat-rpm-config
28Requires(post): /sbin/chkconfig
29Requires(preun): /sbin/chkconfig
30BuildArch: noarch
31ExcludeArch: ppc
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
f6628fdc
ER
34%define _webapps /etc/webapps
35%define _webapp %{name}
4abcd8ff
ER
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
a649639e
ER
42%description
43Cobbler is a network boot and update server. Cobbler supports PXE,
44provisioning virtualized images, and reinstalling existing Linux
45machines. The last two modes require a helper tool called 'koan' that
46integrates with cobbler. Cobbler's advanced features include importing
47distributions from DVDs and rsync mirrors, kickstart templating,
48integrated yum mirroring, and built-in DHCP Management. Cobbler has a
49Python API for integration with other GPL systems management
50applications.
51
52%prep
53%setup -q
54
55%build
56%{__python} setup.py build
57
58%install
59rm -rf $RPM_BUILD_ROOT
60install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
61%{__python} setup.py install \
62 --optimize=1 \
63 --root=$RPM_BUILD_ROOT
64
f6628fdc
ER
65install -d $RPM_BUILD_ROOT%{_webapps}/%{_webapp}
66cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
67cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
68
a649639e
ER
69%py_postclean
70
71mv $RPM_BUILD_ROOT/etc/{init.d,rc.d/init.d}/cobblerd
72
73%clean
74rm -rf $RPM_BUILD_ROOT
75
76%post
77cp /var/lib/cobbler/distros* /var/lib/cobbler/backup 2>/dev/null
78cp /var/lib/cobbler/profiles* /var/lib/cobbler/backup 2>/dev/null
79cp /var/lib/cobbler/systems* /var/lib/cobbler/backup 2>/dev/null
80cp /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
86if [ $1 = 0 ]; then
87 %service cobblerd stop
4abcd8ff 88 /sbin/chkconfig --del cobblerd
a649639e
ER
89fi
90
f6628fdc
ER
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
a649639e
ER
103%files
104%defattr(644,root,root,755)
105%doc AUTHORS CHANGELOG README
f6628fdc
ER
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
4abcd8ff
ER
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)
f6628fdc 121%dir %{_datadir}/cobbler
a649639e 122%dir %{_datadir}/cobbler/webui_templates
4abcd8ff 123%defattr(444,http,http)
a649639e
ER
124%{_datadir}/cobbler/webui_templates/*.tmpl
125
4abcd8ff 126%defattr(4755,http,http)
a649639e
ER
127%dir /var/log/cobbler
128%dir /var/log/cobbler/kicklog
4abcd8ff
ER
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
a649639e
ER
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
4abcd8ff 215%defattr(660,http,http)
a649639e
ER
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.130387 seconds and 4 git commands to generate.