%define name bugzilla %define version 2.22 %define release %mkrel 4 %define _provides_exceptions perl(.*) %define _requires_exceptions perl(\\(CGI.pl\\|XML::Parser\\|Net::LDAP\\|Bugzilla.*\\|DBI::db\\|DBD::Pg\\)) Name: %{name} Version: %{version} Release: %{release} Summary: A bug tracking system developed by mozilla.org License: MPL Group: Networking/WWW URL: http://www.bugzilla.org Source0: ftp://ftp.mozilla.org/pub/mozilla.org/webtools/%{name}-%{version}.tar.bz2 Patch0: %{name}-2.22.fhs.patch Patch1: %{name}-2.20.install.patch Requires: perl-AppConfig >= 1.52 Requires: perl-DBI >= 1.38 Requires: perl-CGI >= 2.93 Requires: perl-MailTools >= 1.65 Requires: perl-Template-Toolkit >= 2.08 Requires: apache Requires: sendmail-command # webapp macros and scriptlets Requires(post): rpm-helper >= 0.16 Requires(postun): rpm-helper >= 0.16 BuildRequires: rpm-helper >= 0.16 BuildRequires: rpm-mandriva-setup >= 1.23 BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version} %description Bugzilla is one example of a class of programs called "Defect Tracking Systems", or, more commonly, "Bug-Tracking Systems". Defect Tracking Systems allow individual or groups of developers to keep track of outstanding bugs in their product effectively. %package contrib Summary: Additional tools for %{name} Group: Networking/WWW %description contrib This package contains additional tools for %{name}. %prep %setup -q %patch0 -p1 %patch1 -p1 find . -name CVS -o -name .cvsignore | xargs rm -rf # fix perms chmod -R go=u-w . chmod 644 Bugzilla/Bug.pm chmod 644 template/en/default/admin/keywords/* chmod 644 contrib/gnatsparse/README chmod 755 docs/makedocs.pl # fix paths find . -type f | xargs perl -pi -e "s|/usr/local/bin|%{_bindir}|g" # fix contrib documentation files names (cd contrib/bugzilla-submit && mv README README.bugzilla-submit) (cd contrib/gnatsparse && mv README README.gnatsparse) %build %install rm -rf %{buildroot} install -d -m 755 %{buildroot}%{_var}/www/%{name} install -m 755 *.cgi %{buildroot}%{_var}/www/%{name} cp -pr js skins images *.js robots.txt %{buildroot}%{_var}/www/%{name} install -d -m 755 %{buildroot}%{_datadir}/%{name} install -d -m 755 %{buildroot}%{_datadir}/%{name}/lib install -d -m 755 %{buildroot}%{_datadir}/%{name}/bin cp -pr template %{buildroot}%{_datadir}/%{name} cp -pr Bugzilla %{buildroot}%{_datadir}/%{name}/lib install -m 644 Bugzilla.pm \ globals.pl \ contrib/BugzillaEmail.pm \ %{buildroot}%{_datadir}/%{name}/lib install -m 755 collectstats.pl \ testserver.pl \ checksetup.pl \ importxml.pl \ whineatnews.pl \ whine.pl \ contrib/bug_email.pl \ contrib/bugzilla_email_append.pl \ contrib/bugzilla_ldapsync.rb \ contrib/bzdbcopy.pl \ contrib/cvs-update.pl \ contrib/gnats2bz.pl \ contrib/jb2bz.py \ contrib/merge-users.pl \ contrib/mysqld-watcher.pl \ contrib/sendbugmail.pl \ contrib/sendunsentbugmail.pl \ contrib/syncLDAP.pl \ contrib/yp_nomail.sh \ contrib/bugzilla-submit/bugzilla-submit \ contrib/cmdline/buglist \ contrib/cmdline/bugs \ contrib/gnatsparse/magic.py \ contrib/gnatsparse/gnatsparse.py \ contrib/gnatsparse/specialuu.py \ %{buildroot}%{_datadir}/%{name}/bin cp -p bugzilla.dtd %{buildroot}%{_datadir}/%{name} install -d -m 755 %{buildroot}%{_localstatedir}/%{name} install -d -m 755 %{buildroot}%{_sysconfdir}/%{name} install -m 644 contrib/cmdline/query.conf %{buildroot}%{_sysconfdir}/%{name} install -d -m 755 %{buildroot}%{_sysconfdir}/%{name} # apache configuration install -d -m 755 %{buildroot}%{_webappconfdir} cat > %{buildroot}%{_webappconfdir}/%{name}.conf <<EOF # Bugzilla Apache configuration Alias /%{name} %{_var}/www/%{name} Alias /bugzilla/data %{_localstatedir}/bugzilla/ <Directory %{_var}/www/%{name}> Options ExecCGI DirectoryIndex index.cgi Allow from all </Directory> # The duplicates.rdf must be accessible, as it is used by # duplicates.xul <Directory %{_localstatedir}/bugzilla> <Files duplicates.rdf> Allow from all </Files> </Directory> # The dot files must be accessible to the public webdot server # The png files locally created locally must be accessible <Directory %{_localstatedir}/bugzilla/webdot> <FilesMatch \.dot$> Allow from research.att.com </FilesMatch> <FilesMatch \.png$> Allow from all </FilesMatch> </Directory> EOF # cron task install -d -m 755 %{buildroot}%{_sysconfdir}/cron.d cat > %{buildroot}%{_sysconfdir}/cron.d/%{name} <<EOF 0 0 * * * apache %{_datadir}/%{name}/bin/collectstats.pl > /dev/null 2>&1 0 0 * * * apache %{_datadir}/%{name}/bin/whineatnews.pl > /dev/null 2>&1 */15 * * * * apache %{_datadir}/%{name}/bin/whine.pl > /dev/null 2>&1 EOF cat > README.mdv <<EOF Mandriva RPM specific notes setup ----- The setup used here differs from default one, to achieve better FHS compliance. - the files accessibles from the web are in %{_var}/www/%{name} - the files non accessibles from the web are in %{_datadir}/%{name} - the configuration file will be generated in %{_sysconfdir}/%{name} post-installation ----------------- You have to create the MySQL database, and run %{_datadir}/%{name}/bin/checksetup.pl Additional useful packages -------------------------- - perl-GD, perl-GDGraph, perl-GD-TextUtil and perl-Chart for graphical reports - perl-XML-Parser for importing XML bugs - perl-Net-LDAP for LDAP authentication - perl-PatchReader, cvs, diffutils and patchutils for patch viewer - graphviz for graphical view of dependency relationships - a MySQL database, either locale or remote EOF %clean rm -rf %{buildroot} %post %_post_webapp %postun %_postun_webapp %files %defattr(-,root,root) %doc QUICKSTART README README.mdv UPGRADING UPGRADING-pre-2.8 docs %config(noreplace) %{_webappconfdir}/%{name}.conf %config(noreplace) %{_sysconfdir}/cron.d/%{name} %{_var}/www/%{name} %{_datadir}/%{name} %{_sysconfdir}/%{name} %attr(-,apache,apache) %{_localstatedir}/%{name} %exclude %{_datadir}/%{name}/lib/BugzillaEmail.pm %exclude %{_datadir}/%{name}/bin/bug_email.pl %exclude %{_datadir}/%{name}/bin/bugzilla_email_append.pl %exclude %{_datadir}/%{name}/bin/bugzilla_ldapsync.rb %exclude %{_datadir}/%{name}/bin/cvs-update.pl %exclude %{_datadir}/%{name}/bin/gnats2bz.pl %exclude %{_datadir}/%{name}/bin/jb2bz.py %exclude %{_datadir}/%{name}/bin/mysqld-watcher.pl %exclude %{_datadir}/%{name}/bin/sendbugmail.pl %exclude %{_datadir}/%{name}/bin/sendunsentbugmail.pl %exclude %{_datadir}/%{name}/bin/syncLDAP.pl %exclude %{_datadir}/%{name}/bin/yp_nomail.sh %exclude %{_datadir}/%{name}/bin/bugzilla-submit %exclude %{_datadir}/%{name}/bin/buglist %exclude %{_datadir}/%{name}/bin/bugs %exclude %{_datadir}/%{name}/bin/magic.py %exclude %{_datadir}/%{name}/bin/gnatsparse.py %exclude %{_datadir}/%{name}/bin/specialuu.py %exclude %{_sysconfdir}/%{name}/query.conf %files contrib %defattr(-,root,root) %doc contrib/README contrib/README.Mailif %doc contrib/bugzilla-submit/README.bugzilla-submit %doc contrib/gnatsparse/README.gnatsparse %{_datadir}/%{name}/lib/BugzillaEmail.pm %{_datadir}/%{name}/bin/bug_email.pl %{_datadir}/%{name}/bin/bugzilla_email_append.pl %{_datadir}/%{name}/bin/bugzilla_ldapsync.rb %{_datadir}/%{name}/bin/cvs-update.pl %{_datadir}/%{name}/bin/gnats2bz.pl %{_datadir}/%{name}/bin/jb2bz.py %{_datadir}/%{name}/bin/mysqld-watcher.pl %{_datadir}/%{name}/bin/sendbugmail.pl %{_datadir}/%{name}/bin/sendunsentbugmail.pl %{_datadir}/%{name}/bin/syncLDAP.pl %{_datadir}/%{name}/bin/yp_nomail.sh %{_datadir}/%{name}/bin/bugzilla-submit %{_datadir}/%{name}/bin/buglist %{_datadir}/%{name}/bin/bugs %{_datadir}/%{name}/bin/magic.py %{_datadir}/%{name}/bin/gnatsparse.py %{_datadir}/%{name}/bin/specialuu.py %config(noreplace) %{_sysconfdir}/%{name}/query.conf %changelog * Fri Jun 30 2006 Guillaume Rousse <guillomovitch@mandriva.org> 2.22-4mdv2007.0 - relax buildrequires versionning * Mon Jun 26 2006 Guillaume Rousse <guillomovitch@mandriva.org> 2.22-3mdv2007.0 - use new webapps macros - don't provides private perl dependencies - decompress all patches * Mon May 22 2006 Guillaume Rousse <guillomovitch@mandriva.org> 2.22-2mdk - fix apache configuration file backportability * Tue May 09 2006 Guillaume Rousse <guillomovitch@mandriva.org> 2.22-1mdk - new release - buildrequires apache >= 2.0.54-5mdk because of macros use - rediff FHS patch - don't use backup files for patches, as it interferes with installed files * Mon Apr 17 2006 Guillaume Rousse <guillomovitch@mandriva.org> 2.20.1-1mdk - New release 2.20.1 - use herein document to manage README.mdv instead of additional source - backport compatible apache configuration file - mark the cron task as configuration to allow user customizations * Mon Dec 05 2005 Guillaume Rousse <guillomovitch@mandriva.org> 2.20-2mdk - misc fixes from Sherwin Daganato (<win@email.com.ph>) - rediff fhs patch to fix missed files - add whine.pl (new in v2.20) in cron and bindir - fix requires - fix regex in _requires_exceptions - don't ship tests - filter additional automatics requires - drop require on perl-DBD-Mysql, bugzilla is supposed to be DB-agnostic now - fix checksetup.pl path in README * Sun Nov 06 2005 Guillaume Rousse <guillomovitch@mandriva.org> 2.20-1mdk - 2.20 - use webapp rpm macros - rediff all patches * Thu Sep 22 2005 Guillaume Rousse <guillomovitch@mandriva.org> 2.18.3-1mdk - new version - %%mkrel - fix requires for contrib package * Thu Jul 28 2005 Guillaume Rousse <guillomovitch@mandriva.org> 2.18.1-3mdk - requires sendmail-command * Wed Jun 22 2005 Guillaume Rousse <guillomovitch@mandriva.org> 2.18.1-2mdk - new apache setup - clean apache config from useless directives - update README.mdk - more exceptions for handling optional packages * Thu May 12 2005 Oden Eriksson <oeriksson@mandriva.com> 2.18.1-1mdk - 2.18.1 (Minor bugfixes) - rediffed P0 * Fri Apr 01 2005 Guillaume Rousse <guillomovitch@mandrake.org> 2.18-4mdk - ship configuration directory (thanks snt) * Sat Feb 19 2005 Guillaume Rousse <guillomovitch@mandrake.org> 2.18-3mdk - patch files instead of setting PERL5LIB as bugzilla run in tainted mode - more complete apache configuration - update README.mdk - make cron tasks run by apache user - install tests and contribs - ship contrib in a distinct subpackage * Fri Feb 18 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.18-2mdk - spec file cleanups, remove the ADVX-build stuff * Thu Jan 27 2005 Guillaume Rousse <guillomovitch@mandrake.org> 2.18-1mdk - new version - top-level is now %{_var}/www/%{name} - non-accessible files are now in %{_datadir}/%{name} - herein document whenever possible - no more order for apache configuration - reload apache instead of restart it - don't tag executables in %{_sysconfdir} as executables - README.mdk * Mon Jan 17 2005 Stefan van der Eijk <stefan@mandrake.org> 2.16.8-1mdk - New release 2.16.8 * Thu Jan 06 2005 Guillaume Rousse <guillomovitch@mandrake.org> 2.16.7-2mdk - fixed missing perl deps (thx knocte <knocte@gmail.com>) * Mon Dec 06 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.16.7-1mdk - 2.16.7 (security and bugfixes release) * Mon Jul 19 2004 Guillaume Rousse <guillomovitch@mandrake.org> 2.16.6-2mdk - apache config file in %{_sysconfdir}/httpd/webapps.d - standard perms for %{_sysconfdir}/httpd/webapps.d/%{order}_%{name}.conf * Sun Jul 11 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.16.6-1mdk - 2.16.6 (minor bugfixes) * Thu Apr 22 2004 Guillaume Rousse <guillomovitch@mandrake.org> 2.16.5-1mdk - new version - dropped useless provides - rpmbuildupdate aware * Mon Apr 12 2004 Guillaume Rousse <guillomovitch@mandrake.org> 2.16.4-3mdk - updated description (John Keller <jkeller@matchbox.fr>) * Tue Apr 06 2004 Guillaume Rousse <guillomovitch@mandrake.org> 2.16.4-2mdk - let spechelper compute perl dependencies * Tue Nov 04 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.16.4-1mdk - 2.16.4 - misc spec file fixes * Fri Oct 31 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.16.3-6mdk - do not require MySQL as MySQL-Max does not provide it * Tue Sep 09 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.16.3-5mdk - use _requires_exceptions * Mon Sep 08 2003 Guillaume Rousse <guillomovitch@linux-mandrake.com> 2.16.3-4mdk - apache2 integration - ADVX macros * Sun May 04 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.16.3-3mdk - fix that "automatic apache integration" somewhat ;) * Mon Apr 28 2003 Guillaume Rousse <g.rousse@linux-mandrake.com> 2.16.3-2mdk - fixed dir ownership (Olivier Thauvin <thauvin@aerov.jussieu.fr>) * Mon Apr 28 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.16.3-1mdk - 2.16.3 - new version (security fixes) * Sat Mar 01 2003 Guillaume Rousse <g.rousse@linux-mandrake.com> 2.16.1-4mdk - cron task * Tue Feb 25 2003 Guillaume Rousse <g.rousse@linux-mandrake.com> 2.16.1-3mdk - automatic apache integration * Fri Jan 17 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.16.1-2mdk - rebuild * Wed Oct 02 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.16.1-1mdk - new version (security fixes) * Mon Aug 12 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.16-2mdk - fix Requires * Tue Jul 30 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.16-1mdk - new spanking major version - misc spec file fixes * Sat Jun 8 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.14.2-1mdk - new version * Mon May 20 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.14.1-1mdk - new version - new URL * Mon Sep 24 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.14-1mdk - updated & fixed by Don Head <donhead@linux-certified.org> : - Merge with Red Hat: - add requirement for perl-DBD-MySQL (Mandrake requires perl-Mysql) - updated to 2.14 for security errata - added requires for perl-GD - forgot to include *.js files. Fixed. (#42795) - updated to 2.12, updated perlpath patch - added suggested fixes from bug 19497 - Security fixes 38411 - Note: This is not the Red Hat version of Bugzilla. You can grab that at ftp://people.redhat.com/dkl - fixed bug #16147, dependancy problems. - patched all the files which looked for perl in /usr/bonsaitools/bin - fixed problem with /usr/bonsai/perl not existing. * Mon Feb 19 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.11-2mdk - great fixes from Don Head <donhead@linux-certified.org> : - Move to /var/www for FHS - Fix perl requires * Mon Nov 20 2000 Lenny Cartier <lenny@mandrakesoft.com> 2.11-1mdk - used srpm from Oden Eriksson <oden@kvikkjokk.com> : - 2.11 - changed the perl path * Mon Jul 24 2000 Prospector <prospector@redhat.com> - rebuilt * Mon Jul 10 2000 Tim Powers <timp@redhat.com> - rebuilt * Wed Jun 21 2000 Tim Powers <timp@redhat.com> - somehow changes were lost, don't know why but they were. Fixed * Tue Jun 20 2000 Tim Powers <timp@redhat.com> - fixed location for installation. Now out of /home (it's about time). * Mon Jun 19 2000 Bernhard Rosenkraenzer <bero@redhat.com> - 2.10 * Thu Jan 13 2000 Dave Lawrence <dkl@redhat.com> - Minor cosmetic changes - Different group permission mechanisms - Packaged for Powertools * Wed Nov 24 1999 Dave Lawrence <dkl@redhat.com> - updated to 2.8 (w/Red Hat mods) - added perl and perl-DBI to requires * Fri Jul 30 1999 Tim Powers <timp@redhat.com> - updated to 2.4, updated %post - added URL and download loc. - rebuilt for 6.1 * Mon Jan 11 1999 Michael Maher <mike@redhat.com> - cleaned up spec file a bit. - ran thru build system * Thu Dec 10 1998 Andrew Anderson <andrew@redhat.com> - Initial packaging