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