]> git.pld-linux.org Git - packages/cobbler.git/blame - cobbler.spec
avoid packaging random utility files to config that get packaged elsewhere
[packages/cobbler.git] / cobbler.spec
CommitLineData
4abcd8ff 1# TODO
6a99c4df 2# - avoid using defattr() and giving too much dirs/files to http
4abcd8ff 3# - webapps
f6628fdc 4# - FHS in web paths
30a5fd64 5# - bash-completions
603eb591 6# - logrotate
30a5fd64 7%define subver beta5
603eb591 8%define rel 0.10
a649639e 9Summary: Boot server configurator
6a99c4df 10Summary(pl.UTF-8): Konfiguracja serwera startującego
a649639e 11Name: cobbler
30a5fd64
ER
12Version: 2.4.0
13Release: 0.%{subver}.%{rel}
6a99c4df
JB
14License: GPL v2+
15Group: Applications/System
30a5fd64
ER
16Source0: https://github.com/cobbler/cobbler/archive/%{name}-%{version}-%{subver}.tar.gz
17# Source0-md5: f0b63f64d679e3ee547de2d97b74e681
f6628fdc 18Source1: %{name}-apache.conf
30a5fd64
ER
19URL: http://www.cobblerd.org/
20BuildRequires: python-PyYAML
6a99c4df
JB
21BuildRequires: python-cheetah
22BuildRequires: python-devel
30a5fd64
ER
23BuildRequires: python-setuptools
24Requires: apache-mod_wsgi
a649639e 25Requires: createrepo
30a5fd64
ER
26#Requires: genisoimage
27Requires: python-PyYAML
28Requires: python-augeas
29Requires: python-cheetah
30Requires: python-netaddr
31Requires: python-simplejson
32Requires: python-urlgrabber
33Requires: rsync
4abcd8ff 34Requires: tftpdaemon
30a5fd64 35Requires: yum-utils
8ebc915b 36Requires(post,preun): /sbin/chkconfig
a649639e 37BuildArch: noarch
a649639e
ER
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
f6628fdc
ER
40%define _webapps /etc/webapps
41%define _webapp %{name}
4abcd8ff
ER
42%define _appdir /var/www/cobbler
43%define _cgibindir /var/www/cgi-bin
44
45#define _appdir %{_datadir}/%{name}
46#define _cgibindir %{_prefix}/lib/cgi-bin/%{name}
47
a649639e
ER
48%description
49Cobbler is a network boot and update server. Cobbler supports PXE,
50provisioning virtualized images, and reinstalling existing Linux
51machines. The last two modes require a helper tool called 'koan' that
6a99c4df 52integrates with Cobbler. Cobbler's advanced features include importing
a649639e
ER
53distributions from DVDs and rsync mirrors, kickstart templating,
54integrated yum mirroring, and built-in DHCP Management. Cobbler has a
55Python API for integration with other GPL systems management
56applications.
57
6a99c4df
JB
58%description -l pl.UTF-8
59Cobbler to sieciowy serwer do uruchamiania i uaktualniania komputerów.
60Obsługuje PXE, udostępnianie wirtualizowanych obrazów i reinstalowanie
61istniejących maszyn linuksowych. Dwa ostatnie tryby wymagają pakietu
62pomocniczego o nazwie "koan", integrującego się z Cobblerem.
63Zaawansowane możliwości Cobblera obejmują importowanie dystrybucji z
64płyt DVD i mirrorów rsynca, szablony uruchamiania, zintegrowane
65mirrorowanie repozytoriów yuma oraz wbudowane zarządzanie DHCP.
66Cobbler ma API w Pythonie do integracji z innymi aplikacjami
67zarządzającymi na licencji GPL.
68
30a5fd64
ER
69%package web
70Summary: Web interface for Cobbler
71Group: Applications/System
72Requires: %{name} = %{version}-%{release}
30a5fd64 73Requires: apache-mod_ssl
8ebc915b 74Requires: apache-mod_wsgi
30a5fd64
ER
75Requires: python-django >= 1.1.2
76
77%description web
78Web interface for Cobbler that allows visiting
79<http://server/cobbler_web> to configure the install server.
80
81%package -n koan
82Summary: Helper tool that performs cobbler orders on remote machines
83Group: Applications/System
84Requires: python-simplejson
85Requires: python-virtinst
86
87%description -n koan
88Koan stands for kickstart-over-a-network and allows for both network
89installation of new virtualized guests and reinstallation of an
90existing system. For use with a boot-server configured with Cobbler
91
a649639e 92%prep
30a5fd64 93%setup -q -n %{name}-%{name}-%{version}-%{subver}
a649639e 94
8ebc915b 95mv config/cobbler{,_web}.conf .
603eb591 96mv config/{cobblerd,cobblerd_rotate,cobblerd.service,cobbler_bash} .
8ebc915b 97
a649639e
ER
98%build
99%{__python} setup.py build
100
101%install
102rm -rf $RPM_BUILD_ROOT
103install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
104%{__python} setup.py install \
30a5fd64 105 --optimize=2 \
a649639e
ER
106 --root=$RPM_BUILD_ROOT
107
30a5fd64
ER
108%py_postclean
109
f6628fdc 110install -d $RPM_BUILD_ROOT%{_webapps}/%{_webapp}
1d4fba00
ER
111#cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
112#cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
8ebc915b
ER
113cp -p cobbler.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
114cat cobbler_web.conf >> $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
115cp -p $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/{apache,httpd}.conf
f6628fdc 116
30a5fd64 117install -d $RPM_BUILD_ROOT/var/lib/tftpboot/images
8ebc915b 118install -d $RPM_BUILD_ROOT/var/spool/koan
603eb591 119install -p cobblerd $RPM_BUILD_ROOT/etc/rc.d/init.d/cobblerd
a649639e
ER
120
121%clean
122rm -rf $RPM_BUILD_ROOT
123
124%post
a649639e 125/sbin/chkconfig --add cobblerd
30a5fd64
ER
126# reserialize and restart
127# FIXIT: ?????
128#%{_bindir}/cobbler reserialize
a649639e
ER
129%service cobblerd restart
130
131%preun
30a5fd64 132if [ $1 = 0 ]; then
4abcd8ff 133 /sbin/chkconfig --del cobblerd
30a5fd64 134 %service cobblerd stop
a649639e
ER
135fi
136
30a5fd64 137%if 0
f6628fdc
ER
138%triggerin -- apache1 < 1.3.37-3, apache1-base
139%webapp_register apache %{_webapp}
140
141%triggerun -- apache1 < 1.3.37-3, apache1-base
142%webapp_unregister apache %{_webapp}
143
144%triggerin -- apache < 2.2.0, apache-base
145%webapp_register httpd %{_webapp}
146
147%triggerun -- apache < 2.2.0, apache-base
148%webapp_unregister httpd %{_webapp}
30a5fd64
ER
149%endif
150
151%post web
152# FIXME: this changes on each upgrade -glen
153# Change the SECRET_KEY option in the Django settings.py file
154# required for security reasons, should be unique on all systems
155RAND_SECRET=$(openssl rand -base64 40 | sed 's/\//\\\//g')
156sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/web/settings.py
f6628fdc 157
a649639e
ER
158%files
159%defattr(644,root,root,755)
160%doc AUTHORS CHANGELOG README
30a5fd64
ER
161%attr(755,root,root) %{_bindir}/cobbler
162%attr(755,root,root) %{_bindir}/cobbler-ext-nodes
163%attr(755,root,root) %{_bindir}/cobblerd
164%attr(755,root,root) %{_sbindir}/tftpd.py*
165%{_mandir}/man1/cobbler.1*
166%attr(754,root,root) /etc/rc.d/init.d/cobblerd
167
168%dir %{_sysconfdir}/%{name}
8ebc915b
ER
169%dir %{_sysconfdir}/%{name}/iso
170%dir %{_sysconfdir}/%{name}/ldap
171%dir %{_sysconfdir}/%{name}/power
172%dir %{_sysconfdir}/%{name}/pxe
173%dir %{_sysconfdir}/%{name}/reporting
30a5fd64
ER
174%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf
175%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.template
176%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*/*.template
8ebc915b 177%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/cheetah_macros
8ebc915b
ER
178%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/completions
179%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/distro_signatures.json
180%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/import_rsync_whitelist
181%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/rsync.exclude
182%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/settings
183%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/users.digest
184%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/version
30a5fd64
ER
185
186%{py_sitescriptdir}/%{name}
30a5fd64
ER
187%{py_sitescriptdir}/%{name}*.egg-info
188
189%{_datadir}/augeas/lenses/cobblersettings.aug
190
191%config(noreplace) /var/lib/cobbler
192%exclude /var/lib/cobbler/webui_sessions
f6628fdc 193
30a5fd64
ER
194%{_appdir}
195/var/log/cobbler
196/var/lib/tftpboot/images
197
198# XXX
199%dir /var/www
200%dir /var/lib/tftpboot
201
202%files web
203%defattr(644,root,root,755)
204%doc AUTHORS CHANGELOG README
f6628fdc
ER
205%dir %attr(750,root,http) %{_webapps}/%{_webapp}
206%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf
207%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf
208
f6628fdc 209%dir %{_datadir}/cobbler
30a5fd64
ER
210%{_datadir}/cobbler/web
211%dir %attr(700,http,root) /var/lib/cobbler/webui_sessions
212/var/www/cobbler_webui_content
213
214%files -n koan
215%defattr(644,root,root,755)
216%doc AUTHORS CHANGELOG README
217%attr(755,root,root) %{_bindir}/koan
218%attr(755,root,root) %{_bindir}/ovz-install
219%attr(755,root,root) %{_bindir}/cobbler-register
220%{_mandir}/man1/koan.1*
221%{_mandir}/man1/cobbler-register.1*
222%{py_sitescriptdir}/koan
30a5fd64
ER
223
224%dir /var/spool/koan
225%dir /var/lib/koan
226%dir /var/lib/koan/config
227%dir /var/log/koan
This page took 0.082712 seconds and 4 git commands to generate.