%define bzinstallprefix %{_datadir} %define bzdatadir %{_localstatedir}/lib/bugzilla Summary: Bug tracking system URL: http://www.bugzilla.org/ Name: bugzilla Version: 3.0.2 Group: Applications/Publishing Release: 2%{?dist} License: MPL Source0: http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-%{version}.tar.gz Source1: bugzilla-httpd-conf Source2: README.fedora.bugzilla Patch0: bugzilla-rw-paths.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: smtpdaemon, webserver, patchutils, mod_perl, perl-SOAP-Lite, perl-Email-Simple, perl-Email-MIME-Modifier, perl-Template-Toolkit, perl-MIME-tools, perl-Email-MIME-Attachment-Stripper, perl-Email-Send, perl-Email-Reply, perl-Email-MIME, perl-Email-Address, which %package doc Summary: Bugzilla documentation Group: Documentation %package contrib Summary: Bugzilla contributed scripts Group: Applications/Publishing %description Bugzilla is a popular bug tracking system used by multiple open source projects. It requires a database engine installed - either MySQL or PostgreSQL. Without one of these database engines, Bugzilla will not work. %description doc Documentation distributed with the Bugzilla bug tracking system %description contrib Contributed scripts and functions for Bugzilla %prep %setup -q -n %{name}-%{version} %patch0 -p1 # Filter unwanted Requires: cat << \EOF > %{name}-req #!/bin/sh %{__perl_requires} $* |\ sed -e '/perl(globals.pl)/d;/perl(BugzillaEmail)/d' EOF %define __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req chmod +x %{__perl_requires} # Deal with changing /usr/local paths here instead of via patches %{__perl} -pi -e 's|/usr/local/bin/python\b|%{__python}|' contrib/*.py %{__perl} -pi -e 's|/usr/local/bin/ruby\b|%{_bindir}/ruby|' contrib/*.rb grep -rl '/usr/lib/sendmail\b' contrib docs \ | xargs %{__perl} -pi -e 's|/usr/lib/sendmail\b|%{_sbindir}/sendmail|' %build find . -depth -name CVS -type d -exec rm -rf {} \; find . -depth -name .cvsignore -type f -exec rm -rf {} \; # Remove the execute bit from files that don't start with #! for file in `find -type f -perm /111`; do if head -1 $file | egrep -v '^\#!' &>/dev/null; then chmod a-x $file fi done # Ensure shebang shell scripts have executable bit set for file in `find -type f -perm /664`; do if head -1 $file | egrep '^\#!' &>/dev/null; then chmod a+x $file fi done %install mkdir -p ${RPM_BUILD_ROOT}/%{bzinstallprefix}/bugzilla cp -pr * ${RPM_BUILD_ROOT}/%{bzinstallprefix}/bugzilla mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.daily cat << EOM > ${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.daily/bugzilla #!/bin/bash # Daily Bugzilla collectstats cron job run cd %{bzinstallprefix}/bugzilla ./collectstats.pl EOM mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.d echo "0-59/15 * * * * apache cd %{bzinstallprefix}/bugzilla && env LANG=C %{bzinstallprefix}/bugzilla/whine.pl" > ${RPM_BUILD_ROOT}/%{_sysconfdir}/cron.d/bugzilla rm -f ${RPM_BUILD_ROOT}/%{bzinstallprefix}/bugzilla/{README,QUICKSTART,UPGRADING,UPGRADING-pre-2.8} mkdir -p ${RPM_BUILD_ROOT}/%{_datadir}/doc/%{name}-%{version} cp %{SOURCE2} ./README.fedora mkdir -p ${RPM_BUILD_ROOT}/%{bzdatadir} mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/bugzilla install -m 0644 -D -p %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d/bugzilla.conf %clean rm -rf ${RPM_BUILD_ROOT} %post pushd %{bzinstallprefix}/bugzilla > /dev/null ./checksetup.pl > /dev/null popd > /dev/null %files %defattr(-,root,root,-) %dir %{bzinstallprefix}/bugzilla %{bzinstallprefix}/bugzilla/*.cgi %{bzinstallprefix}/bugzilla/*.js %{bzinstallprefix}/bugzilla/*.pl %{bzinstallprefix}/bugzilla/Bugzilla.pm %{bzinstallprefix}/bugzilla/bugzilla.dtd %{bzinstallprefix}/bugzilla/duplicates.xul %{bzinstallprefix}/bugzilla/robots.txt %{bzinstallprefix}/bugzilla/Bugzilla %{bzinstallprefix}/bugzilla/images %{bzinstallprefix}/bugzilla/js %{bzinstallprefix}/bugzilla/skins %{bzinstallprefix}/bugzilla/t %{bzinstallprefix}/bugzilla/template %ghost %{bzinstallprefix}/bugzilla/bugzilla-req %config(noreplace) %{_sysconfdir}/httpd/conf.d/bugzilla.conf %defattr(0755,root,root,-) %{_sysconfdir}/cron.daily/* %defattr(0600,root,root,-) %{_sysconfdir}/cron.d/* %defattr(-,root,root,-) %doc README %doc QUICKSTART %doc UPGRADING %doc UPGRADING-pre-2.8 %doc README.fedora %dir %{bzdatadir} %dir %{_sysconfdir}/bugzilla %files doc %{bzinstallprefix}/bugzilla/docs %files contrib %{bzinstallprefix}/bugzilla/contrib %changelog * Fri Oct 26 2007 John Berninger - 3.0.2-2 - fix issue with AlowOverride Options * Mon Oct 22 2007 John Berninger - 3.0.2-1 - updates to requires and httpd conf for BZ's 279961, 295861, 339531 * Mon Sep 24 2007 John Berninger - 3.0.2-0 - update to 3.0.2 - bz 299981 * Mon Aug 27 2007 John Berninger - 3.0.1-0 - update to 3.0.1 - bz 256021 * Fri May 18 2007 John Berninger - 3.0-2 - update Requires for bz's 241037, 241206 * Fri May 18 2007 John Berninger - 3.0-1 - update to upstream version 3.0 - add new dependencies on mod_perl, perl-SOAP-Lite - refactor patch(es) to change paths for read-only /usr * Tue Feb 20 2007 John Berninger - 2.22.2-1 - update to 2.22.2 - bz 229163 * Wed Feb 14 2007 John Berninger - 2.22-12 - More cron job fixes * Wed Jan 31 2007 John Berninger - 2.22-11 - Fix cron job perms * Sat Jan 27 2007 John Berninger - 2.22-10 - Fix collectstats cron job, bx 224550 * Mon Jan 22 2007 John Berninger - 2.22-9 - Fix linebreak issues in specfile * Mon Jan 22 2007 John Berninger - 2.22-8 - Put daily and hourly cronjobs in place per bz 223747 * Wed Nov 8 2006 John Berninger - 2.22-7 - Fixes for bz # 212355 * Tue Jun 26 2006 John Berninger - 2.22-6 - Clean up BugzillaEmail requires (filter it out) * Mon Jun 26 2006 John Berninger - 2.22-5 - License is MPL, not GPL - Clean up %doc specs * Sun Jun 25 2006 John Benringer - 2.22-4 - Remove localconfig file per upstream - Patch to have localconfig appear in /etc/bugzilla when checksetup.pl is run * Tue Jun 20 2006 John Berninger - 2.22-3 - Add README.fedora file - Add additional requires per comments from upstream * Mon Jun 19 2006 John Berninger - 2.22-2 - Code to /usr/share, data to /var/lib/bugzilla per FE packaging req's * Tue Jun 13 2006 John Berninger - 2.22-1 - Shift to /var/lib/bugzilla install dir per discussion in review request - Minor change in filtering requires * Tue May 23 2006 John Berninger - 2.22-0 - Update to upstream 2.22 release - Split off -contrib package, but keep it where it usually gets installed * Wed Apr 26 2006 John Berninger - 2.20.1-4 - rpmlint cleanups * Mon Apr 24 2006 John Berninger - 2.20.1-3 - Cleanup of prov/req filters - Split docs into -doc package * Thu Apr 20 2006 John Berninger - 2.20.1-2 - No need for CVS tarball - I was thinking things too far through. Change to 2.20.1 release. * Fri Apr 7 2006 John Berninger - 2.20-0.1cvs20060407 - Initial spec creation/build for Fedora Extras packaging.