17f9c3
# Copyright (c) 2000-2005, JPackage Project
17f9c3
# All rights reserved.
17f9c3
#
17f9c3
# Redistribution and use in source and binary forms, with or without
17f9c3
# modification, are permitted provided that the following conditions
17f9c3
# are met:
17f9c3
#
17f9c3
# 1. Redistributions of source code must retain the above copyright
17f9c3
#    notice, this list of conditions and the following disclaimer.
17f9c3
# 2. Redistributions in binary form must reproduce the above copyright
17f9c3
#    notice, this list of conditions and the following disclaimer in the
17f9c3
#    documentation and/or other materials provided with the
17f9c3
#    distribution.
17f9c3
# 3. Neither the name of the JPackage Project nor the names of its
17f9c3
#    contributors may be used to endorse or promote products derived
17f9c3
#    from this software without specific prior written permission.
17f9c3
#
17f9c3
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17f9c3
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17f9c3
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17f9c3
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17f9c3
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17f9c3
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
17f9c3
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17f9c3
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
17f9c3
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17f9c3
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
17f9c3
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17f9c3
17f9c3
17f9c3
Summary:	JDBC driver for PostgreSQL
17f9c3
Name:		postgresql-jdbc
737bc6
Version:	42.2.14
227091
Release:	2%{?dist}
17f9c3
License:	BSD
17f9c3
URL:		http://jdbc.postgresql.org/
17f9c3
737bc6
Source0:	https://repo1.maven.org/maven2/org/postgresql/postgresql/%{version}/postgresql-%{version}-src.tar.gz
227091
Patch0:	postgresql-jdbc-CVE-2022-41946.patch
17f9c3
Provides:	pgjdbc = %version-%release
17f9c3
17f9c3
BuildArch:	noarch
737bc6
17f9c3
BuildRequires:	maven-local
17f9c3
BuildRequires:	java-comment-preprocessor
17f9c3
BuildRequires:	properties-maven-plugin
17f9c3
BuildRequires:	maven-enforcer-plugin
17f9c3
BuildRequires:	maven-plugin-bundle
17f9c3
BuildRequires:	maven-plugin-build-helper
17f9c3
BuildRequires:	mvn(com.ongres.scram:client)
17f9c3
737bc6
Obsoletes:	%{name}-parent-poms < 42.2.2-2
17f9c3
17f9c3
%description
17f9c3
PostgreSQL is an advanced Object-Relational database management
17f9c3
system. The postgresql-jdbc package includes the .jar files needed for
17f9c3
Java programs to access a PostgreSQL database.
17f9c3
17f9c3
17f9c3
%package javadoc
17f9c3
Summary:	API docs for %{name}
17f9c3
17f9c3
%description javadoc
17f9c3
This package contains the API Documentation for %{name}.
17f9c3
17f9c3
17f9c3
%prep
737bc6
%setup -c -q
227091
%patch0 -p1
17f9c3
17f9c3
# remove any binary libs
737bc6
find -type f \( -name "*.jar" -or -name "*.class" \) | xargs rm -f
17f9c3
737bc6
%pom_xpath_remove "pom:plugin[pom:artifactId = 'maven-javadoc-plugin']"
17f9c3
17f9c3
# compat symlink: requested by dtardon (libreoffice), reverts part of
17f9c3
# 0af97ce32de877 commit.
17f9c3
%mvn_file org.postgresql:postgresql %{name}/postgresql %{name} postgresql
17f9c3
17f9c3
# For compat reasons, make Maven artifact available under older coordinates.
17f9c3
%mvn_alias org.postgresql:postgresql postgresql:postgresql
17f9c3
17f9c3
17f9c3
%build
17f9c3
# Ideally we would run "sh update-translations.sh" here, but that results
17f9c3
# in inserting the build timestamp into the generated messages_*.class
17f9c3
# files, which makes rpmdiff complain about multilib conflicts if the
17f9c3
# different platforms don't build in the same minute.  For now, rely on
17f9c3
# upstream to have updated the translations files before packaging.
17f9c3
737bc6
%mvn_build -f
17f9c3
17f9c3
17f9c3
%install
17f9c3
%mvn_install
17f9c3
17f9c3
17f9c3
%files -f .mfiles
17f9c3
%license LICENSE
17f9c3
%doc README.md
17f9c3
17f9c3
17f9c3
%files javadoc -f .mfiles-javadoc
17f9c3
%license LICENSE
17f9c3
17f9c3
17f9c3
%changelog
227091
* Mon Jan 09 2023 Zuzana Miklankova <zmiklank@redhat.com> - 42.2.14-2
227091
- Fix CVE-2022-41946
227091
737bc6
* Tue Dec 14 2021 Zuzana Miklankova <zmiklank@redhat.com> - 42.2.14-1
737bc6
- Rebase on 42.2.14
737bc6
50b54c
* Wed Jul 22 2020 Ondrej Dubaj <odubaj@redhat.com> - 42.2.3-3
50b54c
- fixed XXE vulnerability unit test
50b54c
50b54c
* Tue Jul 14 2020 Ondrej Dubaj <odubaj@redhat.com> - 42.2.3-2
50b54c
- fixed XXE vulnerability (CVE-2020-13692)
50b54c
17f9c3
* Fri Jul 13 2018 Pavel Raiskup <praiskup@redhat.com> - 42.2.3-1
17f9c3
- new upstream release (rhbz#1600759)
17f9c3
17f9c3
* Wed May 30 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 42.2.2-2
17f9c3
- Remove and obsolete parent-poms subpackage
17f9c3
17f9c3
* Fri Apr 20 2018 Pavel Raiskup <praiskup@redhat.com> - 42.2.2-2
17f9c3
- provide postgresql.jar, as that's the upstream's artifactId
17f9c3
17f9c3
* Fri Apr 13 2018 Pavel Raiskup <praiskup@redhat.com> - 42.2.2-1
17f9c3
- rebase to latest upstream release
17f9c3
17f9c3
* Fri Apr 13 2018 Pavel Raiskup <praiskup@redhat.com> - 42.2.0-1
17f9c3
- rebase to the latest upstream release
17f9c3
- nicer github source urls
17f9c3
- sync with upstream spec
17f9c3
- use new postgresql testing macros (rawhide only)
17f9c3
- depend on postgresql-test-rpm-macros
17f9c3
17f9c3
* Wed Aug 23 2017 Pavel Raiskup <praiskup@redhat.com> - 42.1.4-1
17f9c3
- rebase to latest upstream release
17f9c3
17f9c3
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 9.4.1212-4
17f9c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
17f9c3
17f9c3
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 9.4.1212-3
17f9c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
17f9c3
17f9c3
* Thu Dec 22 2016 Pavel Raiskup <praiskup@redhat.com> - 9.4.1212-2
17f9c3
- Disable unpredictable test to fix FTBFS (BZ#1406931),
17f9c3
  patch by Merlin Mathesius
17f9c3
17f9c3
* Thu Nov 03 2016 Pavel Raiskup <praiskup@redhat.com> - 9.4.1212-1
17f9c3
- new release, rhbz#1377317, per announcement:
17f9c3
  https://www.postgresql.org/message-id/CAB=Je-FjbvQ_MmAGmhZ-1sSMnodpjr9Uz6Q=faxqCxOvpRO-UQ@mail.gmail.com
17f9c3
17f9c3
* Tue Oct 04 2016 Pavel Raiskup <praiskup@redhat.com> - 9.4.1210-2
17f9c3
- depend on test macros from postgresql-setup
17f9c3
17f9c3
* Thu Sep 08 2016 Pavel Raiskup <praiskup@redhat.com> - 9.4.1210-1
17f9c3
- new release, rhbz#1374106, per announcement:
17f9c3
  https://www.postgresql.org/message-id/CAB=Je-FzuqwDXLTT62VfzvTUhR4QTfLjmw2D5QfgaykDkhW7nw@mail.gmail.com
17f9c3
17f9c3
* Mon Aug 29 2016 Pavel Raiskup <praiskup@redhat.com> - 9.4.1209-6
17f9c3
- fix License, pgjdbc is BSD only
17f9c3
17f9c3
* Thu Jul 21 2016 gil cattaneo <puntogil@libero.it> 9.4.1209-5
17f9c3
- fix postgresql-jdbc.jar symlink using javapackages macros
17f9c3
- adapt to current guideline
17f9c3
- install doc and license file in parent-poms sub package
17f9c3
- simplified runselftest check
17f9c3
17f9c3
* Wed Jul 20 2016 Pavel Raiskup <praiskup@redhat.com> - 9.4.1209-4
17f9c3
- restore one compat symlink
17f9c3
17f9c3
* Wed Jul 20 2016 Pavel Raiskup <praiskup@redhat.com> - 9.4.1209-3
17f9c3
- bump: for Mikolaj's fixes
17f9c3
17f9c3
* Wed Jul 20 2016 Pavel Raiskup <praiskup@redhat.com> - 9.4.1209-2
17f9c3
- update to latest release version, thanks to Pavel Kajaba, Michael Simacek and
17f9c3
  Vladimir Sitnikov for big help
17f9c3
- fix Provides, remove old compatibility hacks
17f9c3
17f9c3
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 9.4.1200-3
17f9c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
17f9c3
17f9c3
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.4.1200-2
17f9c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
17f9c3
17f9c3
* Wed Feb 04 2015 Pavel Raiskup <praiskup@redhat.com> - 9.4.1200-1
17f9c3
- rebase to most recent version (#1188827)
17f9c3
17f9c3
* Mon Jul 14 2014 Pavel Raiskup <praiskup@redhat.com> - 9.3.1102-1
17f9c3
- Rebase to most recent version (#1118667)
17f9c3
- revert back upstream commit for travis build
17f9c3
17f9c3
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.3.1101-4
17f9c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
17f9c3
17f9c3
* Mon May 19 2014 Pavel Raiskup <praiskup@redhat.com> - 9.3.1101-3
17f9c3
- run upstream testsuite when '%%runselftest' defined
17f9c3
17f9c3
* Wed Apr 23 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 9.3.1101-2
17f9c3
- Add explicit requires on java-headless
17f9c3
17f9c3
* Wed Apr 23 2014 Pavel Raiskup <praiskup@redhat.com> - 9.3.1101-1
17f9c3
- Rebase to most recent version (#1090366)
17f9c3
17f9c3
* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 9.2.1002-5
17f9c3
- Use Requires: java-headless rebuild (#1067528)
17f9c3
17f9c3
* Tue Aug 06 2013 Pavel Raiskup <praiskup@redhat.com> - 9.2.1002-4
17f9c3
- add javadoc subpackage
17f9c3
17f9c3
* Tue Aug 06 2013 Pavel Raiskup <praiskup@redhat.com> - 9.2.1002-4
17f9c3
- don't use removed macro %%add_to_maven_depmap (#992816)
17f9c3
- lint: trim-lines, reuse %%{name} macro, fedora-review fixes
17f9c3
- merge cleanup changes by Stano Ochotnicky
17f9c3
17f9c3
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.2.1002-3
17f9c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
17f9c3
17f9c3
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.2.1002-2
17f9c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
17f9c3
17f9c3
* Wed Nov 14 2012 Tom Lane <tgl@redhat.com> 9.2.1002-1
17f9c3
- Update to build 9.2-1002 (just to correct mispackaging of source tarball)
17f9c3
17f9c3
* Tue Nov 13 2012 Tom Lane <tgl@redhat.com> 9.2.1001-1
17f9c3
- Update to build 9.2-1001 for compatibility with PostgreSQL 9.2
17f9c3
17f9c3
* Sun Jul 22 2012 Tom Lane <tgl@redhat.com> 9.1.902-1
17f9c3
- Update to build 9.1-902
17f9c3
17f9c3
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.1.901-4
17f9c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
17f9c3
17f9c3
* Thu Feb 23 2012 Tom Lane <tgl@redhat.com> 9.1.901-3
17f9c3
- Change BuildRequires: java-1.6.0-openjdk-devel to just java-devel.
17f9c3
  As of 9.1-901, upstream has support for JDBC4.1, so we don't have to
17f9c3
  restrict to JDK6 anymore, and Fedora is moving to JDK7
17f9c3
Resolves: #796580
17f9c3
17f9c3
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.1.901-2
17f9c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
17f9c3
17f9c3
* Mon Sep 12 2011 Tom Lane <tgl@redhat.com> 9.1.901-1
17f9c3
- Update to build 9.1-901 for compatibility with PostgreSQL 9.1
17f9c3
17f9c3
* Mon Aug 15 2011 Tom Lane <tgl@redhat.com> 9.0.801-4
17f9c3
- Add BuildRequires: java-1.6.0-openjdk-devel to ensure we have recent JDK
17f9c3
Related: #730588
17f9c3
- Remove long-obsolete minimum versions from BuildRequires
17f9c3
17f9c3
* Sun Jul 17 2011 Tom Lane <tgl@redhat.com> 9.0.801-3
17f9c3
- Switch to non-GCJ build, since GCJ is now deprecated in Fedora
17f9c3
Resolves: #722247
17f9c3
- Use %%{_mavendepmapfragdir} to fix FTBFS with maven 3
17f9c3
17f9c3
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.0.801-2
17f9c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
17f9c3
17f9c3
* Wed Dec 29 2010 Tom Lane <tgl@redhat.com> 9.0.801-1
17f9c3
- Update to build 9.0-801
17f9c3
17f9c3
* Mon May 31 2010 Tom Lane <tgl@redhat.com> 8.4.701-4
17f9c3
- Update gcj_support sections to meet Packaging/GCJGuidelines;
17f9c3
  fixes FTBFS in F-14 rawhide
17f9c3
17f9c3
* Tue Nov 24 2009 Tom Lane <tgl@redhat.com> 8.4.701-3
17f9c3
- Seems the .pom file *must* have a package version number in it, sigh
17f9c3
Resolves: #538487
17f9c3
17f9c3
* Mon Nov 23 2009 Tom Lane <tgl@redhat.com> 8.4.701-2
17f9c3
- Add a .pom file to ease use by maven-based packages (courtesy Deepak Bhole)
17f9c3
Resolves: #538487
17f9c3
17f9c3
* Tue Aug 18 2009 Tom Lane <tgl@redhat.com> 8.4.701-1
17f9c3
- Update to build 8.4-701
17f9c3
17f9c3
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:8.3.603-4
17f9c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
17f9c3
17f9c3
* Tue Apr 21 2009 Tom Lane <tgl@redhat.com> 8.3.603-3
17f9c3
- Avoid multilib conflict caused by overeager attempt to rebuild translations
17f9c3
17f9c3
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:8.3.603-2.1
17f9c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
17f9c3
17f9c3
* Wed Jul  9 2008 Tom "spot" Callaway <tcallawa@redhat.com> 8.3.603-1.1
17f9c3
- drop repotag
17f9c3
17f9c3
* Tue Feb 12 2008 Tom Lane <tgl@redhat.com> 8.3.603-1jpp
17f9c3
- Update to build 8.3-603
17f9c3
17f9c3
* Sun Aug 12 2007 Tom Lane <tgl@redhat.com> 8.2.506-1jpp
17f9c3
- Update to build 8.2-506
17f9c3
17f9c3
* Tue Apr 24 2007 Tom Lane <tgl@redhat.com> 8.2.505-1jpp
17f9c3
- Update to build 8.2-505
17f9c3
- Work around 1.4 vs 1.5 versioning inconsistency
17f9c3
17f9c3
* Fri Dec 15 2006 Tom Lane <tgl@redhat.com> 8.2.504-1jpp
17f9c3
- Update to build 8.2-504
17f9c3
17f9c3
* Wed Aug 16 2006 Tom Lane <tgl@redhat.com> 8.1.407-1jpp.4
17f9c3
- Fix Requires: for rebuild-gcj-db (bz #202544)
17f9c3
17f9c3
* Wed Aug 16 2006 Fernando Nasser <fnasser@redhat.com> 8.1.407-1jpp.3
17f9c3
- Merge with upstream
17f9c3
17f9c3
* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> 8.1.407-1jpp.2
17f9c3
- Rebuilt
17f9c3
17f9c3
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0:8.1.407-1jpp.1
17f9c3
- rebuild
17f9c3
17f9c3
* Wed Jun 14 2006 Tom Lane <tgl@redhat.com> 8.1.407-1jpp
17f9c3
- Update to build 8.1-407
17f9c3
17f9c3
* Mon Mar 27 2006 Tom Lane <tgl@redhat.com> 8.1.405-2jpp
17f9c3
- Back-patch upstream fix to support unspecified-type strings.
17f9c3
17f9c3
* Thu Feb 16 2006 Tom Lane <tgl@redhat.com> 8.1.405-1jpp
17f9c3
- Split postgresql-jdbc into its own SRPM (at last).
17f9c3
- Build it from source.  Add support for gcj compilation.