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
83ec92e
Version: 3.2.3
John Berninger 04e1870
Group: Applications/Publishing
83ec92e
Release: 1%{?dist}
83ec92e
License: MPLv1.1
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 554e3a1
Patch0: bugzilla-rw-paths.patch
83ec92e
John Berninger 04e1870
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
John Berninger 04e1870
BuildArch: noarch
83ec92e
Requires: webserver, patchutils, mod_perl, perl(SOAP::Lite), 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
83ec92e
BuildRequires: python
John Berninger 04e1870
John Berninger 04e1870
%description
83ec92e
Bugzilla is a popular bug tracking system used by multiple open source projects
83ec92e
It requires a database engine installed - either MySQL, PostgreSQL or Oracle.
83ec92e
Without one of these database engines (local or remote), Bugzilla will not work
83ec92e
- see the Release Notes for details.
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
83ec92e
# Filter unwanted Requires found by /usr/lib/rpm/perldeps.pl:
83ec92e
# create a wrapper script which runs the original perl_requires
83ec92e
# command and strips some of the output
John Berninger 04e1870
cat << \EOF > %{name}-req
John Berninger 04e1870
#!/bin/sh
John Berninger 04e1870
%{__perl_requires} $* |\
83ec92e
sed -e '/perl(Authen::Radius)/d;/perl(DBD::Pg)/d;/perl(DBD::Oracle)/d;/perl(sanitycheck.cgi)/d'
John Berninger 04e1870
EOF
John Berninger 04e1870
83ec92e
# use that wrapper script instead of the original perl_requires script
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
83ec92e
cat << EOM > ${RPM_BUILD_ROOT}/%{bzinstallprefix}/bugzilla/cron.daily
John Berninger 7843619
#!/bin/bash
John Berninger 7843619
# Daily Bugzilla collectstats cron job run
John Berninger 7843619
cd %{bzinstallprefix}/bugzilla
John Berninger 7843619
./collectstats.pl
John Berninger 7843619
EOM
83ec92e
echo "0-59/15 * * * * apache cd %{bzinstallprefix}/bugzilla && env LANG=C %{bzinstallprefix}/bugzilla/whine.pl" > ${RPM_BUILD_ROOT}/%{bzinstallprefix}/bugzilla/cron.whine
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
83ec92e
(pushd %{bzinstallprefix}/bugzilla > /dev/null
John Berninger 04e1870
./checksetup.pl > /dev/null
83ec92e
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/*.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
83ec92e
%{bzinstallprefix}/bugzilla/extensions/example
83ec92e
%{bzinstallprefix}/bugzilla/lib/README
83ec92e
%{bzinstallprefix}/bugzilla/cron.daily
83ec92e
%{bzinstallprefix}/bugzilla/cron.whine
John Berninger 04e1870
%ghost %{bzinstallprefix}/bugzilla/bugzilla-req
John Berninger 04e1870
%config(noreplace) %{_sysconfdir}/httpd/conf.d/bugzilla.conf
John Berninger c38ef12
%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}
83ec92e
%defattr(0750,root,apache,-)
John Berninger 04e1870
%dir %{_sysconfdir}/bugzilla
John Berninger 04e1870
John Berninger 04e1870
%files doc
83ec92e
%defattr(-,root,root,-)
John Berninger 04e1870
%{bzinstallprefix}/bugzilla/docs
John Berninger 04e1870
John Berninger 04e1870
%files contrib
83ec92e
%defattr(-,root,root,-)
John Berninger 04e1870
%{bzinstallprefix}/bugzilla/contrib
John Berninger 04e1870
John Berninger 04e1870
%changelog
83ec92e
* Mon Apr 06 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> 3.2.3-1
83ec92e
- fix CVE-2009-1213
83ec92e
83ec92e
* Thu Mar 05 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> 3.2.2-2
83ec92e
- fix from BZ #474250 Comment #16, from Chris Eveleigh -->
83ec92e
- add python BR for contrib subpackage
83ec92e
- fix description
83ec92e
- change Requires perl-SOAP-Lite to perl(SOAP::Lite) according guidelines
83ec92e
83ec92e
* Sun Mar 01 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> 3.2.2-1
83ec92e
- thanks to Chris Eveleigh <chris dot eveleigh at planningportal dot gov dot uk>
83ec92e
- for contributing with patches :-)
83ec92e
- Upgrade to upstream 3.2.2 to fix multiple security vulns
83ec92e
- Removed old perl_requires exclusions, added new ones for RADIUS, Oracle and sanitycheck.cgi
83ec92e
- Added Oracle to supported DBs in description (and moved line breaks)
83ec92e
- Include a patch to fix max_allowed_packet warnin when using with mysql
83ec92e
83ec92e
* Sat Feb 28 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> 3.0.8-1
83ec92e
- Upgrade to 3.0.8, fix #466077 #438080
83ec92e
- fix macro in changelog rpmlint warning
83ec92e
- fix files-attr-not-set rpmlint warning for doc and contrib sub-packages
83ec92e
83ec92e
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.4-4
83ec92e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
83ec92e
83ec92e
* Mon Feb  2 2009 Stepan Kasal <skasal@redhat.com> - 3.0.4-3
83ec92e
- do not require perl-Email-Simple, it is (no longer) in use
83ec92e
- remove several explicit perl-* requires; the automatic dependencies
83ec92e
  do handle them
83ec92e
83ec92e
* Mon Jul 14 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 3.0.4-2
83ec92e
- fix license tag
83ec92e
83ec92e
* Fri May  9 2008 John Berninger <john at ncphotography dot com> - 3.0.4-1
83ec92e
- Update to upstream 3.0.4 to fix multiple security vulns
83ec92e
- Change perms on /etc/bugzilla for bz 427981
83ec92e
83ec92e
* Sun May  4 2008 John Berninger <john at ncphotography dot com> - 3.0.3-0
83ec92e
- Update to upstream 3.0.3 - bz 444669
83ec92e
83ec92e
* Fri Dec 28 2007 John Berninger <john at ncphotography dot com> - 3.0.2-6
83ec92e
- Add cron.daily, cron.whine to payload list
83ec92e
83ec92e
* Fri Dec 28 2007 John Berninger <john at ncphotography dot com> - 3.0.2-5
83ec92e
- Typo in spec file, rebuild
83ec92e
83ec92e
* Fri Dec 28 2007 John Berninger <john at ncphotography dot com> - 3.0.2-3
83ec92e
- bz 426465 - don't enable cron jobs so cron doesn't complain about
83ec92e
  an unconfigured installation
83ec92e
83ec92e
* Fri Oct 26 2007 John Berninger <john at ncphotography dot com> - 3.0.2-2
83ec92e
- fix issue with AlowOverride Options
83ec92e
83ec92e
* Mon Oct 22 2007 John Berninger <john at ncphotography dot com> - 3.0.2-1
83ec92e
- updates to requires and httpd conf for BZ's 279961, 295861, 339531
83ec92e
John Berninger e5f7d8c
* Mon Sep 24 2007 John Berninger <john at ncphotography dot com> - 3.0.2-0
John Berninger e5f7d8c
- update to 3.0.2 - bz 299981
John Berninger e5f7d8c
John Berninger 7a896f9
* Mon Aug 27 2007 John Berninger <john at ncphotography dot com> - 3.0.1-0
John Berninger 7a896f9
- update to 3.0.1 - bz 256021
John Berninger 7a896f9
John Berninger a0eaace
* Fri May 18 2007 John Berninger <jwb at redhat dot com> - 3.0-2
John Berninger a0eaace
- update Requires for bz's 241037, 241206
John Berninger a0eaace
John Berninger 554e3a1
* Fri May 18 2007 John Berninger <jwb at redhat dot com> - 3.0-1
John Berninger 554e3a1
- update to upstream version 3.0
John Berninger 554e3a1
- add new dependencies on mod_perl, perl-SOAP-Lite
John Berninger 554e3a1
- refactor patch(es) to change paths for read-only /usr
John Berninger 554e3a1
John Berninger e3d53f0
* Tue Feb 20 2007 John Berninger <jwb at redhat dot com> - 2.22.2-1
John Berninger e3d53f0
- update to 2.22.2 - bz 229163
John Berninger e3d53f0
John Berninger 3981eab
* Wed Feb 14 2007 John Berninger <jwb at redhat dot com> - 2.22-12
John Berninger 3981eab
- More cron job fixes
John Berninger 3981eab
John Berninger c38ef12
* Wed Jan 31 2007 John Berninger <jwb at redhat dot com> - 2.22-11
John Berninger c38ef12
- Fix cron job perms
John Berninger c38ef12
John Berninger 7843619
* Sat Jan 27 2007 John Berninger <jwb at redhat dot com> - 2.22-10
John Berninger 7843619
- Fix collectstats cron job, bx 224550
John Berninger 7843619
John Berninger c2f02ce
* Mon Jan 22 2007 John Berninger <jwb at redhat dot com> - 2.22-9
John Berninger c2f02ce
- Fix linebreak issues in specfile
John Berninger c2f02ce
John Berninger ef40fef
* Mon Jan 22 2007 John Berninger <jwb at redhat dot com> - 2.22-8
John Berninger ef40fef
- Put daily and hourly cronjobs in place per bz 223747
John Berninger ef40fef
John Berninger fa7cb72
* Wed Nov  8 2006 John Berninger <johnw at berningeronline dot net> - 2.22-7
John Berninger fa7cb72
- Fixes for bz # 212355
John Berninger fa7cb72
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
83ec92e
- 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