File bugzilla.spec of Package bugzilla

#
# spec file for package bugzilla
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%if 0%{?suse_version} >= 1210
%define has_systemd 1
%endif
Name:           bugzilla
#Version:        4.4.9
Version:        5.0.4
Release:        0
Summary:        Bug tracker for software development
License:        MPL-2.0
Group:          Development/Tools/Other
Url:            http://bugzilla.org/
Source:         http://ftp.mozilla.org/pub/mozilla.org/webtools/%{name}-%{version}.tar.gz
Source2:        http://downloads.sourceforge.net/project/bugzilla-de/4.4/%{version}/%{name}-de-%{version}-1.utf-8.tar.gz
Source3:        MPL-2.0.html
Source4:        %{name}.conf
BuildRequires:  apache
BuildRequires:  fdupes
Requires:       apache
Requires:       apache2-mod_perl >= 1.999022
#Recommonds:	Apache-SizeLimit
Requires:       patchutils
Requires:       perl(CGI) >= 5.8.1
Requires:       perl-Authen-SASL
Requires:       perl-Chart >= 2.1.0
Requires:       perl-DBD-Pg >= 2.7.0
Requires:       perl-DBD-SQLite >= 1.29
Requires:       perl-DBD-mysql >= 4.001
Requires:       perl-DBI >= 1.614
#Recommends:		RadiusPerl
Requires:       perl-Daemon-Generic
Requires:       perl-DateTime >= 0.28
Requires:       perl-DateTime-TimeZone >= 0.71
Requires:       perl-Digest-SHA1
Requires:       perl-Email-MIME >= 1.904
Requires:       perl-Email-Reply
Requires:       perl-Email-Send >= 2.02
Requires:       perl-Encode >= 2.21
Requires:       perl-Encode-Detect
Requires:       perl-File-MimeInfo
Requires:       perl-File-Slurp >= 9999.13
Requires:       perl-GD >= 1.20
Requires:       perl-GDGraph
Requires:       perl-GDTextUtil
Requires:       perl-HTML-FormatText-WithLinks >= 0.13
Requires:       perl-HTML-Parser >= 3.67
Requires:       perl-HTML-Scrubber
Requires:       perl-IO-stringy
Requires:       perl-JSON-RPC
Requires:       perl-JSON-XS >= 2.0
Requires:       perl-List-MoreUtils >= 0.32
Requires:       perl-MIME-tools >= 5.406
Requires:       perl-Math-Random-ISAAC >= 1.0.1
Requires:       perl-Net-SMTP-SSL >= 1.01
Requires:       perl-PatchReader >= 0.9.6
Requires:       perl-SOAP-Lite >= 0.712
Requires:       perl-Template-GD
Requires:       perl-Template-Toolkit >= 2.22
Requires:       perl-Test-Taint
Requires:       perl-TheSchwartz >= 1.07
Requires:       perl-TimeDate
Requires:       perl-URI >= 1.37
Requires:       perl-XML-Twig
Requires:       perl-XMLRPC-Lite >= 0.712
Requires:       perl-base >= 5.8.1
Requires:       perl-ldap
Requires:       perl-libwww-perl
Recommends:     perl-DBD-Oracle >= 1.19
Requires:       firefox
Requires:       mysql
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%if 0%{?has_systemd}
BuildRequires:  systemd
%{?systemd_requires}
%else
# FIXME: use proper Requires(pre/post/preun/...)
PreReq:         %insserv_prereq
%endif

%description
Bugzilla is server software designed to help you manage software
development.

* Optimized database structure for increased performance and
  scalability
* Excellent security to protect confidentiality
* Advanced query tool that can remember your searches
* Integrated email capabilities
* Editable user profiles and comprehensive email preferences
* Comprehensive permissions system
* Proven under fire as Mozilla's bug tracking system

%package lang-de
Summary:        German language files for bugzilla
Group:          Development/Tools/Other
Requires:       %{name} = %{version}-%{release}

%description lang-de
This package includes german language files for bugzilla

%prep
%setup -q

%build

%install
# Ensure shebang shell scripts have executable bit set
for file in `find -type f -perm /664`; do
  if head -1 $file | grep -E '^\#!' &>/dev/null; then
    chmod a+x $file
  fi
done
# Remove the execute bit from files that don't start with #!
for file in `find -type f -perm /111`; do
  if head -1 $file | grep -E -v '^\#!' &>/dev/null; then
    chmod a-x $file
  fi
done
# Hello bugzilla devs...
find . -type d "(" -name .bzr -o -name .git ")" \
	-exec rm -Rf "{}" "+"
find . -type f "(" -name ".git*" -o -name ".bzr*" -o -name ".travis*" ")" \
    -exec rm -Rf "{}" "+"
find . -type f -print0 | xargs -0r grep -l '^#!' | xargs -r chmod a+x
find . -type f -print0 | xargs -0r grep -l '^#!' | \
	xargs -r perl -i -pe 's{^#!%{_prefix}/local/}{#!%{_prefix}/}' "{}" "+"
mkdir -p "%{buildroot}/srv/www"
cp -a . "%{buildroot}/srv/www/%{name}"
tar -xzf %{SOURCE2}  --directory "%{buildroot}/srv/www/%{name}/template"

%fdupes %{buildroot}/srv

cp "%{SOURCE3}" .
#install bugzilla.conf to apache conf.d
install -D -m0640 %{SOURCE4} %{buildroot}%{_sysconfdir}/apache2/conf.d/bugzilla.conf
# remove included .htaccess which has been moved to bugzilla.conf
rm %{buildroot}/srv/www/bugzilla/.htaccess

%post
%if 0%{?has_systemd}
%service_add_post apache2.service
%else
%restart_on_update apache2
%endif

%postun
%if 0%{?has_systemd}
%service_del_postun apache2.service
%else
%restart_on_update apache2
%endif

%files
%defattr(-,root,root)
%doc MPL-2.0.html
%defattr(-,wwwrun,root)
# exclude language de_DE
%exclude /srv/www/bugzilla/template/de
%config(noreplace) %{_sysconfdir}/apache2/conf.d/bugzilla.conf
/srv/www/bugzilla

%files lang-de
%defattr(0644,wwwrun,root,755)
/srv/www/bugzilla/template/de

%changelog
 Sat Jan 31 2015 Emmanuel Seyman <emmanuel@seyman.fr> - 4.4.8-1.1
- Include correct sources

* Sat Jan 31 2015 Emmanuel Seyman <emmanuel@seyman.fr> - 4.4.8-1
- Update to 4.4.8 (fixes regressions in 4.4.7 which itself
  fixed security flaws) (CVE-2014-1571, CVE-2014-8630)
- Remove bundled binary files (#1000245)
- Add webdot directory perms to apache configuration

* Wed Oct 08 2014 Emmanuel Seyman <emmanuel@seyman.fr> - 4.4.6-1
- Update to 4.4.6

* Fri Jul 25 2014 Emmanuel Seyman <emmanuel@seyman.fr> - 4.4.5-1
- Update to 4.4.5 which fixes a security bug (CVE-2014-1546)

* Mon Jul 07 2014 Emmanuel Seyman <emmanuel@seyman.fr> - 4.4.4-1
- Update to 4.4.4

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat Apr 19 2014 Emmanuel Seyman <emmanuel@seyman.fr> - 4.2.9-1
- Update to 4.2.9 (regression fix for 4.2.8 which was a security update)
- Drop backported patches

* Tue Jan 14 2014 Emmanuel Seyman <emmanuel@seyman.fr> - 4.2.7-3
- Fix the comparison of module versions (#1044854)
- Really honor the PROJECT environment variable (#911943)

* Thu Nov 14 2013 Emmanuel Seyman <emmanuel@seyman.fr> - 4.2.7-2
- Add patch to cache bz_locations() (bmo #843457)
- Fix constants patch to honor the PROJECT environment variable (#911943)

* Thu Oct 17 2013 Emmanuel Seyman <emmanuel@seyman.fr> - 4.2.7-1
- Update to 4.2.7 (security updates)
- Patch bugzilla to write compiled templates under /var (#949130)

* Thu Aug 15 2013 Emmanuel Seyman <emmanuel@seyman.fr> - 4.2.6-5
- Stop creating /usr/share/doc/bugzilla-<version> (#993688)
- Fix incorrect date in changelog

* Sun Aug 04 2013 Emmanuel Seyman <emmanuel@seyman.fr> - 4.2.6-4
- Change apache conf to enable access to all machines

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Jul 18 2013 Petr Pisar <ppisar@redhat.com> - 4.2.6-2
- Perl 5.18 rebuild

* Sun May 26 2013 Emmanuel Seyman <emmanuel@seyman.fr> - 4.2.6-1
- Update to 4.2.6

* Wed Feb 20 2013 Emmanuel Seyman <emmanuel@seyman.fr> - 4.2.5-1
- Update to 4.2.5 (fixes CVE-2013-0785)

* Tue Feb 05 2013 Emmanuel Seyman <emmanuel@seyman.fr> - 4.2.4-2
- Update httpd configuration file for Apache 2.4
- Update httpd configuration file for the upcoming bugzilla 4.4

* Wed Nov 14 2012 Emmanuel Seyman <emmanuel@seyman.fr> - 4.2.4-1
- Update to 4.2.4
- Remove the defattr and clean macros (no longer used)

* Sun Sep 02 2012 Emmanuel Seyman <emmanuel@seyman.fr> - 4.2.3-1
- Update to 4.2.3

* Mon Jul 30 2012 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 4.2.2-1
- Update to 4.2.2

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Apr 20 2012 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 4.2.1-1
- Update to 4.2.1 (CVE-2012-0465, CVE-2012-0466)

* Sun Feb 26 2012 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 4.2-1
- Update to 4.2 (#797225)
- Include contrib/README instead of contrib/recode.pl in the main package

* Sun Feb 26 2012 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 4.0.5-2
- Leave perl(Bugzilla::Extension::Example::Util) in the provides stream

* Thu Feb 23 2012 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 4.0.5-1
- Update to 4.0.5 to fix security issues
- Block all ModPerl::* and Apache2::* from requires
- Remove rpm4.8 filters

* Wed Feb  1 2012 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 4.0.4-1
- Update to 4.0.4 to fix security flaws (#786550)
- Remove JSON:RPC patch, upstreamed (bmo #706753)
- Correct upstream URL in README.fedora.bugzilla, thanks to Ken Dreyer (#783014)

* Tue Jan 10 2012 Tom Callaway <spot@fedoraproject.org> - 4.0.3-2
- patch bz to use JSON::RPC::Legacy::Server::CGI

* Fri Dec 30 2011 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 4.0.3-1
- Update to 4.0.3
- Add perl(Locale::Language) to the Requires
- Put the xml docs source in the doc-build subpackage
- Add index.html to the DirectoryIndex
- Fix typo in README.fedora.bugzilla

* Fri Aug 05 2011 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 4.0.2-1
- Update to 4.0.2
- Add RPM-4.9-style filtering
- Put graphs in /var/lib/bugzilla/graphs.

* Sun May 01 2011 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 4.0.1-1
- Update to 4.0.1
- Patch the installation procedure to recommend yum

* Sun Mar 27 2011 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 4.0-1
- Update to 4.0

* Sun Mar 06 2011 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.6.4-7
- Put contrib/recode.pl in the main package so that it no longer depends on
  python and ruby
- Remove the contents of the lib/ directory, not the directory itself.

* Tue Feb 15 2011 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.6.4-6
- More filtering

* Mon Feb 14 2011 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.6.4-5
- Fix broken dependencies
- Remove unused patch

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sat Jan 29 2011 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.6.4-3
- Remove no-longer-needed files

* Sat Jan 29 2011 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.6.4-2
- Move to the current filtering system for provides and requires

* Tue Jan 25 2011 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.6.4-1
- Update to 3.6.4
- Add RPM-4.9-style filtering
- 

* Wed Nov 03 2010 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.6.3-1
- Update to 3.6.3 (#649406)
- Fix webdot alias in /etc/httpd/conf.d/bugzilla (#630255)
- Do not apply graphs patch (upstreamed)

* Wed Aug 18 2010 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.6.2-1
- Update to 3.6.2 (#623426)
- Only run checksetup if /etc/bugzilla/localconfig does not exist (#610210)
- Add bugzilla-contrib to Requires (#610198)

* Wed Aug 11 2010 David Malcolm <dmalcolm@redhat.com> - 3.6.1-2
- recompiling .py files against Python 2.7 (rhbz#623281)

* Fri Jun 25 2010 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.6.1-1
- Update to 3.6.1

* Sun Jun  6 2010 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.6-3
- Remove mod_perl from the requirements (#600924)

* Sun Jun  6 2010 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.6-2
- Fix missing provides (#600922)

* Tue Apr 13 2010 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.6-1
- Update to 3.6 (#598377)
- Patch to put graphs in /var/lib/bugzilla/ (brc #564450, bmo #313739)

* Mon Feb 01 2010 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.4.5-1
- Update to 3.4.5 (CVE-2009-3989, CVE-2009-3387)
- Remove bugzilla-EL5-perl-versions.patch which is EPEL-specific

* Thu Nov 19 2009 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.4.4-1
- Update to 3.4.4 (CVE-2009-3386)

* Wed Nov 11 2009 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.4.3-1
- Update to 3.4.3 (fixes memory leak issues)
- Add perl(Digest::SHA) in the Requires
- Specify Perl module versions in the Requires (fixes #524309)
- Add an alias to make $webdotdir a working path (fixes #458848)

* Fri Sep 11 2009 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.4.2-1
- Update to 3.4.2 (CVE-2009-3125, CVE-2009-3165 and CVE-2009-3166)

* Tue Aug 04 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 3.4.1-2
- fix EL-5 perl dependencies bz#515158

* Sun Aug 02 2009 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.4.1-1
- Update to 3.4.1, fixing a security leak

* Wed Jul 29 2009 Emmanuel Seyman <emmanuel.seyman@club-internet.fr> - 3.4-1
- Update to 3.4 (fixes #514315)
- move makedocs.pl to its own package (fixes #509041)
- move the extensions dir to /usr/share/ (fixes #450636)

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Jul 08 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 3.2.4-1
- fix https://bugzilla.mozilla.org/show_bug.cgi?id=495257

* Mon Apr 06 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> 3.2.3-1
- fix CVE-2009-1213

* Thu Mar 05 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> 3.2.2-2
- fix from BZ #474250 Comment #16, from Chris Eveleigh -->
- add python BR for contrib subpackage
- fix description
- change Requires perl-SOAP-Lite to perl(SOAP::Lite) according guidelines

* Sun Mar 01 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> 3.2.2-1
- thanks to Chris Eveleigh <chris dot eveleigh at planningportal dot gov dot uk>
- for contributing with patches :-)
- Upgrade to upstream 3.2.2 to fix multiple security vulns
- Removed old perl_requires exclusions, added new ones for RADIUS, Oracle and sanitycheck.cgi
- Added Oracle to supported DBs in description (and moved line breaks)
- Include a patch to fix max_allowed_packet warnin when using with mysql

* Sat Feb 28 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> 3.0.8-1
- Upgrade to 3.0.8, fix #466077 #438080
- fix macro in changelog rpmlint warning
- fix files-attr-not-set rpmlint warning for doc and contrib sub-packages

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Feb  2 2009 Stepan Kasal <skasal@redhat.com> - 3.0.4-3
- do not require perl-Email-Simple, it is (no longer) in use
- remove several explicit perl-* requires; the automatic dependencies
  do handle them

* Mon Jul 14 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 3.0.4-2
- fix license tag

* Fri May  9 2008 John Berninger <john at ncphotography dot com> - 3.0.4-1
- Update to upstream 3.0.4 to fix multiple security vulns
- Change perms on /etc/bugzilla for bz 427981

* Sun May  4 2008 John Berninger <john at ncphotography dot com> - 3.0.3-0
- Update to upstream 3.0.3 - bz 444669

* Fri Dec 28 2007 John Berninger <john at ncphotography dot com> - 3.0.2-6
- Add cron.daily, cron.whine to payload list

* Fri Dec 28 2007 John Berninger <john at ncphotography dot com> - 3.0.2-5
- Typo in spec file, rebuild

* Fri Dec 28 2007 John Berninger <john at ncphotography dot com> - 3.0.2-3
- bz 426465 - don't enable cron jobs so cron doesn't complain about
  an unconfigured installation

* Fri Oct 26 2007 John Berninger <john at ncphotography dot com> - 3.0.2-2
- fix issue with AlowOverride Options

* Mon Oct 22 2007 John Berninger <john at ncphotography dot com> - 3.0.2-1
- updates to requires and httpd conf for BZ's 279961, 295861, 339531

* Mon Sep 24 2007 John Berninger <john at ncphotography dot com> - 3.0.2-0
- update to 3.0.2 - bz 299981

* Mon Aug 27 2007 John Berninger <john at ncphotography dot com> - 3.0.1-0
- update to 3.0.1 - bz 256021

* Fri May 18 2007 John Berninger <jwb at redhat dot com> - 3.0-2
- update Requires for bz's 241037, 241206

* Fri May 18 2007 John Berninger <jwb at redhat dot com> - 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 <jwb at redhat dot com> - 2.22.2-1
- update to 2.22.2 - bz 229163

* Wed Feb 14 2007 John Berninger <jwb at redhat dot com> - 2.22-12
- More cron job fixes

* Wed Jan 31 2007 John Berninger <jwb at redhat dot com> - 2.22-11
- Fix cron job perms

* Sat Jan 27 2007 John Berninger <jwb at redhat dot com> - 2.22-10
- Fix collectstats cron job, bx 224550

* Mon Jan 22 2007 John Berninger <jwb at redhat dot com> - 2.22-9
- Fix linebreak issues in specfile

* Mon Jan 22 2007 John Berninger <jwb at redhat dot com> - 2.22-8
- Put daily and hourly cronjobs in place per bz 223747

* Wed Nov  8 2006 John Berninger <johnw at berningeronline dot net> - 2.22-7
- Fixes for bz # 212355

* Tue Jun 27 2006 John Berninger <johnw at berningeronline dot net> - 2.22-6
- Clean up BugzillaEmail requires (filter it out)

* Mon Jun 26 2006 John Berninger <johnw at berningeronline dot net> - 2.22-5
- License is MPL, not GPL
- Clean up %%doc specs

* Sun Jun 25 2006 John Benringer <johnw at berningeronline dot net> - 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 <johnw at berningeronline dot net> - 2.22-3
- Add README.fedora file
- Add additional requires per comments from upstream

* Mon Jun 19 2006 John Berninger <johnw at berningeronline dot net> - 2.22-2
- Code to /usr/share, data to /var/lib/bugzilla per FE packaging req's

* Tue Jun 13 2006 John Berninger <johnw at berningeronline dot net> - 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 <johnw at berningeronline dot net> - 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 <johnw at berningeronline dot net> - 2.20.1-4
- rpmlint cleanups

* Mon Apr 24 2006 John Berninger <johnw at berningeronline dot net> - 2.20.1-3
- Cleanup of prov/req filters
- Split docs into -doc package

* Thu Apr 20 2006 John Berninger <johnw at berningeronline dot net> - 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 <johnw at berningeronline dot net> - 2.20-0.1cvs20060407
- Initial spec creation/build for Fedora Extras packaging.