2 # - SECURITY: http://securitytracker.com/alerts/2004/Jul/1010681.html
3 %include /usr/lib/rpm/macros.perl
4 Summary: Bug tracking system
5 Summary(pl): System ¶ledzenia b³êdów
10 Group: Aplications/WWW
11 Source0: http://ftp.mozilla.org/pub/mozilla.org/webtools/%{name}-%{version}.tar.gz
12 # Source0-md5: b5e34e50e3eda5647bdca223fb6fd797
14 Patch0: %{name}-httpd_user.patch
15 URL: http://www.bugzilla.org/
16 BuildRequires: perl-base
17 Requires(post,postun): apache
18 Requires(post,postun): grep
19 Requires(postun): fileutils
21 Requires: mysql >= 3.23.41
22 Requires: perl-DBD-mysql
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define _noautoreq 'perl(localconfig)' 'perl(data::params)' 'perl(data::versioncache)'
27 %define _bugzilladir /usr/share/bugzilla
33 System ¶ledzenia b³êdów.
40 perl -pi -e 's@#\!/usr/bonsaitools/bin/perl@#\!/usr/bin/perl@' *cgi *pl Bug.pm processmail syncshadowdb
43 rm -rf $RPM_BUILD_ROOT
44 install -d $RPM_BUILD_ROOT{/etc/httpd,%{_bugzilladir}/{Bugzilla/{Auth,Template/Plugin},css,docs/{html,images},template},/var/lib/%{name}/{data,graphs}}
46 install *.{cgi,gif,html,jpg,js,pl,pm,txt} $RPM_BUILD_ROOT%{_bugzilladir}
47 install Bugzilla/*.pm $RPM_BUILD_ROOT%{_bugzilladir}/Bugzilla
48 install Bugzilla/Auth/*.pm $RPM_BUILD_ROOT%{_bugzilladir}/Bugzilla/Auth
49 install Bugzilla/Template/Plugin/*.pm $RPM_BUILD_ROOT%{_bugzilladir}/Bugzilla/Template/Plugin
50 install css/*.css $RPM_BUILD_ROOT%{_bugzilladir}/css
51 install docs/html/*.html $RPM_BUILD_ROOT%{_bugzilladir}/docs/html
52 install docs/images/*.gif $RPM_BUILD_ROOT%{_bugzilladir}/docs/images
54 cp -r template/en $RPM_BUILD_ROOT%{_bugzilladir}/template
55 find -name CVS -type d | xargs rm -rf
57 ln -s /var/lib/%{name}/data $RPM_BUILD_ROOT%{_bugzilladir}
58 ln -s /var/lib/%{name}/graphs $RPM_BUILD_ROOT%{_bugzilladir}
60 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
63 rm -rf $RPM_BUILD_ROOT
66 if [ -f /etc/httpd/httpd.conf ] && \
67 ! grep -q "^Include.*/bugzilla.conf" /etc/httpd/httpd.conf; then
68 echo "Include /etc/httpd/bugzilla.conf" >> /etc/httpd/httpd.conf
70 if [ -d /etc/httpd/httpd.conf ]; then
71 mv -f /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
73 if [ -f /var/lock/subsys/httpd ]; then
74 /usr/sbin/apachectl restart 1>&2
78 if [ "$1" = "0" ]; then
80 if [ -d /etc/httpd/httpd.conf ]; then
81 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
83 grep -v "^Include.*bugzilla.conf" /etc/httpd/httpd.conf/10_httpd.conf > \
84 /etc/httpd/httpd.conf.tmp
85 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
86 if [ -f /var/lock/subsys/httpd ]; then
87 /usr/sbin/apachectl restart 1>&2
93 %defattr(644,root,root,755)
94 %doc README UPGRADING UPGRADING-pre-2.8 docs/rel_notes.txt docs/txt/Bugzilla-Guide.txt
95 %config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
99 %{_bugzilladir}/template
101 %{_bugzilladir}/graphs
102 %{_bugzilladir}/Bugzilla
103 %attr(755,root,root) %{_bugzilladir}/*.cgi
104 %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_bugzilladir}/globals.pl
105 %{_bugzilladir}/[!g]*.pl
107 %{_bugzilladir}/*.html
109 %{_bugzilladir}/*.gif
110 %{_bugzilladir}/*.jpg
111 %{_bugzilladir}/*.txt
112 %dir /var/lib/%{name}
113 %attr(770,root,http) /var/lib/%{name}/data
114 %attr(775,root,http) /var/lib/%{name}/graphs