Author: glen Date: Tue Nov 15 22:53:21 2005 GMT Module: SPECS Tag: HEAD ---- Log message: - up to 2.20. not tested
---- Files affected: SPECS: bugzilla.spec (1.15 -> 1.16) ---- Diffs: ================================================================ Index: SPECS/bugzilla.spec diff -u SPECS/bugzilla.spec:1.15 SPECS/bugzilla.spec:1.16 --- SPECS/bugzilla.spec:1.15 Thu Jul 14 13:23:14 2005 +++ SPECS/bugzilla.spec Tue Nov 15 23:53:16 2005 @@ -1,122 +1,136 @@ # $Revision$, $Date$ -# TODO: -# - SECURITY: http://securitytracker.com/alerts/2004/Jul/1010681.html -# - SECURITY: http://security.gentoo.org/glsa/glsa-200507-12.xml - -%define _rcver rc2 - +# TODO +# - Split DB packages for mysql/pgsql +# - fill brr and add autodeps bcond %include /usr/lib/rpm/macros.perl Summary: Bug tracking system Summary(pl): System śledzenia błędów Name: bugzilla -Version: 2.18 -Release: 0.%{_rcver}.3 +Version: 2.20 +Release: 0.4 License: GPL Group: Applications/WWW -Source0: http://ftp.mozilla.org/pub/mozilla.org/webtools/%{name}-%{version}%{_rcver}.tar.gz -# Source0-md5: aadd24a0177a7b44ef7b2785c0d6740f +Source0: http://ftp.mozilla.org/pub/mozilla.org/webtools/%{name}-%{version}.tar.gz +# Source0-md5: bd8638501bc3f6ce93499ae0227d1ec2 Source1: %{name}.conf Patch0: %{name}-httpd_user.patch Patch1: %{name}-chdir.patch URL: http://www.bugzilla.org/ -BuildRequires: perl-base -Requires(post,postun): apache -Requires(post,postun): grep -Requires(postun): fileutils -Requires: apache +Requires: webserver = apache Requires: mysql >= 3.23.41 Requires: perl-DBD-mysql Requires: perl-DBI >= 1.36 +Requires: smtpdaemon +Conflicts: apache < 1.3.33-2 +BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _noautoreq 'perl(localconfig)' 'perl(data::params)' 'perl(data::versioncache)' - -%define _bugzilladir /usr/share/bugzilla +# see TODO +%define _noautoreq 'perl(DBD::Pg)' +%define _bugzilladir %{_datadir}/bugzilla +%define _sysconfdir /etc/%{name} %description -Bug tracking system. +Bugzilla is the Bug-Tracking System from the Mozilla project. %description -l pl System śledzenia błędów. %prep -%setup -q -n %{name}-%{version}%{_rcver} +%setup -q %patch0 -p1 %patch1 -p1 -%build -perl -pi -e '[EMAIL PROTECTED]/bonsaitools/bin/[EMAIL PROTECTED]/perl@' *cgi *pl Bug.pm processmail syncshadowdb +find -name CVS -type d | xargs rm -rf +find '(' -name '*~' -o -name '*.orig' -o -name '.cvsignore' ')' | xargs -r rm -v %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{%{_sysconfdir}/httpd,%{_bugzilladir}/{Bugzilla/{Auth,Template/Plugin},css,docs/{html,images},template},/var/lib/%{name}/{data,graphs}} +install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_bugzilladir}/Bugzilla,/var/lib/%{name}/{data,graphs}} -install *.{cgi,gif,html,jpg,js,pl,pm,txt} $RPM_BUILD_ROOT%{_bugzilladir} -install Bugzilla/*.pm $RPM_BUILD_ROOT%{_bugzilladir}/Bugzilla -install Bugzilla/Auth/*.pm $RPM_BUILD_ROOT%{_bugzilladir}/Bugzilla/Auth -install Bugzilla/Template/Plugin/*.pm $RPM_BUILD_ROOT%{_bugzilladir}/Bugzilla/Template/Plugin -install css/*.css $RPM_BUILD_ROOT%{_bugzilladir}/css -install docs/html/*.html $RPM_BUILD_ROOT%{_bugzilladir}/docs/html -install docs/images/*.gif $RPM_BUILD_ROOT%{_bugzilladir}/docs/images - -cp -r template/en $RPM_BUILD_ROOT%{_bugzilladir}/template -find -name CVS -type d | xargs rm -rf +install *.{cgi,html,jpg,js,pl,pm,txt,dtd,xul} $RPM_BUILD_ROOT%{_bugzilladir} +cp -a Bugzilla $RPM_BUILD_ROOT%{_bugzilladir} +cp -a images js skins template $RPM_BUILD_ROOT%{_bugzilladir} ln -s /var/lib/%{name}/data $RPM_BUILD_ROOT%{_bugzilladir} ln -s /var/lib/%{name}/graphs $RPM_BUILD_ROOT%{_bugzilladir} -install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/%{name}.conf +install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf %clean rm -rf $RPM_BUILD_ROOT -%post -if [ -f /etc/httpd/httpd.conf ] && \ - ! grep -q "^Include.*/bugzilla.conf" /etc/httpd/httpd.conf; then - echo "Include /etc/httpd/bugzilla.conf" >> /etc/httpd/httpd.conf -fi -if [ -d /etc/httpd/httpd.conf ]; then - mv -f /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf +%triggerpostun -- %{name} < 2.20 +# migrate from old config location (only apache2, as there was no apache1 support) +if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then + cp -f %{_sysconfdir}/apache.conf{,.rpmnew} + mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/apache.conf + if [ -f /var/lock/subsys/httpd ]; then + /etc/rc.d/init.d/httpd reload 1>&2 + fi fi -if [ -f /var/lock/subsys/httpd ]; then - /usr/sbin/apachectl restart 1>&2 + +# nuke very-old config location (this mostly for Ra) +if [ ! -d /etc/httpd/httpd.conf ]; then + sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf + if [ -f /var/lock/subsys/httpd ]; then + /etc/rc.d/init.d/httpd reload 1>&2 + fi fi -%postun -if [ "$1" = "0" ]; then - umask 027 - if [ -d /etc/httpd/httpd.conf ]; then - rm -f /etc/httpd/httpd.conf/99_%{name}.conf - else - grep -v "^Include.*bugzilla.conf" /etc/httpd/httpd.conf/10_httpd.conf > \ - /etc/httpd/httpd.conf.tmp - mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf - if [ -f /var/lock/subsys/httpd ]; then - /usr/sbin/apachectl restart 1>&2 - fi +# place new config location, as trigger puts config only on first install, do it here. +# apache1 +if [ -d /etc/apache/conf.d ]; then + ln -sf %{_sysconfdir}/apache.conf /etc/apache/conf.d/99_%{name}.conf + if [ -f /var/lock/subsys/apache ]; then + /etc/rc.d/init.d/apache reload 1>&2 + fi +fi +# apache2 +if [ -d /etc/httpd/httpd.conf ]; then + ln -sf %{_sysconfdir}/apache.conf /etc/httpd/httpd.conf/99_%{name}.conf + if [ -f /var/lock/subsys/httpd ]; then + /etc/rc.d/init.d/httpd reload 1>&2 fi fi +%triggerin -- apache1 >= 1.3.33-2 +%apache_config_install -v 1 -c %{_sysconfdir}/apache.conf + +%triggerun -- apache1 >= 1.3.33-2 +%apache_config_uninstall -v 1 + +%triggerin -- apache >= 2.0.0 +%apache_config_install -v 2 -c %{_sysconfdir}/apache.conf + +%triggerun -- apache >= 2.0.0 +%apache_config_uninstall -v 2 + %files %defattr(644,root,root,755) -%doc README UPGRADING UPGRADING-pre-2.8 docs/rel_notes.txt docs/txt/Bugzilla-Guide.txt -%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/%{name}.conf +%doc QUICKSTART README UPGRADING UPGRADING-pre-2.8 docs/rel_notes.txt docs/txt/Bugzilla-Guide.txt +%doc contrib docs/html +%attr(750,root,http) %dir %{_sysconfdir} +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf + %dir %{_bugzilladir} -%{_bugzilladir}/css -%{_bugzilladir}/docs -%{_bugzilladir}/template +%{_bugzilladir}/Bugzilla %{_bugzilladir}/data %{_bugzilladir}/graphs -%{_bugzilladir}/Bugzilla +%{_bugzilladir}/images +%{_bugzilladir}/js +%{_bugzilladir}/skins +%{_bugzilladir}/template %attr(755,root,root) %{_bugzilladir}/*.cgi %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_bugzilladir}/globals.pl %{_bugzilladir}/[!g]*.pl -%{_bugzilladir}/*.pm +%{_bugzilladir}/*.dtd %{_bugzilladir}/*.html %{_bugzilladir}/*.js -%{_bugzilladir}/*.gif %{_bugzilladir}/*.jpg +%{_bugzilladir}/*.pm %{_bugzilladir}/*.txt +%{_bugzilladir}/*.xul %dir /var/lib/%{name} %attr(770,root,http) /var/lib/%{name}/data %attr(775,root,http) /var/lib/%{name}/graphs @@ -127,6 +141,9 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.16 2005/11/15 22:53:16 glen +- up to 2.20. not tested + Revision 1.15 2005/07/14 11:23:14 glen - security note ================================================================ ---- CVS-web: http://cvs.pld-linux.org/SPECS/bugzilla.spec?r1=1.15&r2=1.16&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
