# Copyright (c) 2000-2005, JPackage Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the # distribution. # 3. Neither the name of the JPackage Project nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Configuration for rpmbuild, might be specified by options # like e.g. 'rpmbuild --define "runselftest 0"'. # ============================================================================= # IMPORTANT NOTE: This spec file is maintained on two places -- in native # Fedora repo [1] and in pgjdbc upstream [2]. Please, keep that in sync # (manual effort!) so both Fedora and Upstream can benefit from automatic # packaging CI, this is now done in [3] Copr project. # [1] https://src.fedoraproject.org/rpms/postgresql-jdbc # [2] https://github.com/pgjdbc/pgjdbc/tree/master/packaging/rpm # [3] https://copr.fedorainfracloud.org/coprs/g/pgjdbc/pgjdbc-travis/ # ============================================================================ %{!?runselftest:%global runselftest 0} %global section devel %global source_path pgjdbc/src/main/java/org/postgresql Summary: JDBC driver for PostgreSQL Name: postgresql-jdbc Version: 42.5.1 Release: %mkrel 1 License: BSD Group: Development/Java URL: https://jdbc.postgresql.org/ # This archive contains the minimal set of files + pom.xml that can be used to build postgresql.jar Source0: https://repo1.maven.org/maven2/org/postgresql/postgresql/%{version}/postgresql-%{version}-jdbc-src.tar.gz Provides: pgjdbc = %{version}-%{release} BuildArch: noarch BuildRequires: java-devel >= 1.8 BuildRequires: maven-local BuildRequires: maven-plugin-bundle BuildRequires: classloader-leak-test-framework BuildRequires: mvn(com.ongres.scram:client) BuildRequires: mvn(org.apache.maven.plugins:maven-clean-plugin) BuildRequires: mvn(org.apache.maven.surefire:surefire-junit-platform) BuildRequires: mvn(org.junit.jupiter:junit-jupiter-api) BuildRequires: mvn(org.junit.jupiter:junit-jupiter-engine) BuildRequires: mvn(org.junit.jupiter:junit-jupiter-params) BuildRequires: mvn(org.junit.vintage:junit-vintage-engine) %if %{runselftest} BuildRequires: postgresql-contrib-virtual #BuildRequires: postgresql-test-rpm-macros %endif # gettext is only needed if we try to update translations #BuildRequires: gettext Obsoletes: %{name}-parent-poms < 42.2.2-2 %description PostgreSQL is an advanced Object-Relational database management system. The postgresql-jdbc package includes the .jar files needed for Java programs to access a PostgreSQL database. %package javadoc Summary: API docs for %{name} %description javadoc This package contains the API Documentation for %{name}. %prep %setup -c -q mv postgresql-%{version}-jdbc-src/* . # remove any binary libs find -type f \( -name "*.jar" -or -name "*.class" \) | xargs rm -f # Build parent POMs in the same Maven call. %pom_xpath_remove "pom:plugin[pom:artifactId = 'maven-shade-plugin']" # compat symlink: requested by dtardon (libreoffice), reverts part of # 0af97ce32de877 commit. %mvn_file org.postgresql:postgresql %{name}/postgresql %{name} postgresql # For compat reasons, make Maven artifact available under older coordinates. %mvn_alias org.postgresql:postgresql postgresql:postgresql # remove unmet dependency %pom_remove_dep uk.org.webcompere:system-stubs-jupiter # remove tests that depend on the system-stubs-jupiter rm src/test/java/org/postgresql/test/jdbc2/DriverTest.java \ src/test/java/org/postgresql/util/OSUtilTest.java \ src/test/java/org/postgresql/jdbcurlresolver/PgServiceConfParserTest.java \ src/test/java/org/postgresql/jdbcurlresolver/PgPassParserTest.java \ src/test/java/org/postgresql/util/StubEnvironmentAndProperties.java %build # Ideally we would run "sh update-translations.sh" here, but that results # in inserting the build timestamp into the generated messages_*.class # files, which makes rpmdiff complain about multilib conflicts if the # different platforms don't build in the same minute. For now, rely on # upstream to have updated the translations files before packaging. # Include PostgreSQL testing methods and variables. %if %{runselftest} %postgresql_tests_init PGTESTS_LOCALE=C.UTF-8 cat <<EOF > build.local.properties server=localhost port=$PGTESTS_PORT database=test username=test password=test privilegedUser=$PGTESTS_ADMIN privilegedPassword=$PGTESTS_ADMINPASS preparethreshold=5 loglevel=0 protocolVersion=0 EOF # Start the local PG cluster. %postgresql_tests_start %else # -f is equal to -Dmaven.test.skip=true opts="-f" %endif %mvn_build $opts --xmvn-javadoc %install %mvn_install %files -f .mfiles %license LICENSE %doc README.md %files javadoc -f .mfiles-javadoc %license LICENSE %changelog * Wed Jan 18 2023 luigiwalser <luigiwalser> 42.5.1-1.mga9 + Revision: 1934181 - 42.5.1 * Fri Nov 04 2022 luigiwalser <luigiwalser> 42.5.0-1.mga9 + Revision: 1902564 - 42.5.0 * Fri Apr 15 2022 luigiwalser <luigiwalser> 42.3.3-1.mga9 + Revision: 1850424 - 42.3.3 + umeabot <umeabot> - Mageia 9 Mass Rebuild * Sat Oct 30 2021 luigiwalser <luigiwalser> 42.3.0-1.mga9 + Revision: 1753362 - 42.3.0 - 42.2.24 * Fri Aug 06 2021 luigiwalser <luigiwalser> 42.2.23-1.mga9 + Revision: 1739846 - 42.2.23 * Wed Mar 03 2021 daviddavid <daviddavid> 42.2.19-1.mga9 + Revision: 1696911 - new version: 4.2.19 * Tue Oct 27 2020 luigiwalser <luigiwalser> 42.2.18-1.mga8 + Revision: 1639928 - 42.2.18 * Thu Aug 27 2020 luigiwalser <luigiwalser> 42.2.16-1.mga8 + Revision: 1619279 - 42.2.16 * Wed Jul 29 2020 luigiwalser <luigiwalser> 42.2.13-2.mga8 + Revision: 1609800 - try removing dependency additions not added upstream * Wed Jul 29 2020 luigiwalser <luigiwalser> 42.2.13-1.mga8 + Revision: 1609774 - migrate build scripts to gradle (from upstream) - 42.2.13 (fixes XXE vulnerability CVE-2020-13692) - add missing dependencies and remove SSPIClient for Windows API (from fedora) * Wed May 27 2020 luigiwalser <luigiwalser> 42.2.12-1.mga8 + Revision: 1588095 - 42.2.12 * Wed Mar 25 2020 luigiwalser <luigiwalser> 42.2.11-1.mga8 + Revision: 1559572 - remove patch 0 - 42.2.11 * Wed Feb 19 2020 umeabot <umeabot> 42.2.9-2.mga8 + Revision: 1542564 - Mageia 8 Mass Rebuild * Sun Jan 05 2020 luigiwalser <luigiwalser> 42.2.9-1.mga8 + Revision: 1476747 - 42.2.9 * Fri Oct 11 2019 daviddavid <daviddavid> 42.2.8-1.mga8 + Revision: 1451966 - new version: 42.2.8 * Sat Jul 13 2019 daviddavid <daviddavid> 42.2.6-1.mga8 + Revision: 1420964 - new version: 42.2.6 * Mon Jan 14 2019 luigiwalser <luigiwalser> 42.2.5-1.mga7 + Revision: 1356777 - 42.2.5 (fixes CVE-2018-10936) * Sat Dec 29 2018 daviddavid <daviddavid> 42.2.4-1.mga7 + Revision: 1346248 - new version: 42.2.4 (sync with fc29) * Wed Sep 19 2018 umeabot <umeabot> 9.4.1210-2.mga7 + Revision: 1274460 - Mageia 7 Mass Rebuild * Wed Sep 14 2016 luigiwalser <luigiwalser> 9.4.1210-1.mga6 + Revision: 1052560 - 9.4.1210 (sync with fedora 25) * Fri Aug 12 2016 luigiwalser <luigiwalser> 9.4.1209-2.mga6 + Revision: 1046089 - 9.4.1209 (sync with fedora 25) + neoclust <neoclust> - Second rebuild of the java stack * Wed Feb 24 2016 neoclust <neoclust> 9.4.1200-4.mga6 + Revision: 977761 - First rebuild of the java stack - sync package postgresql-jdbc with fedora * Tue Feb 09 2016 umeabot <umeabot> 9.4.1200-2.mga6 + Revision: 952291 - Mageia 6 Mass Rebuild * Fri Feb 13 2015 luigiwalser <luigiwalser> 9.4.1200-1.mga5 + Revision: 814848 - 9.4.1200 (sync with f22) * Fri Dec 26 2014 dmorgan <dmorgan> 9.3.1102-6.mga5 + Revision: 806238 - Sync with fc21 * Sat Nov 08 2014 cjw <cjw> 0:9.3.1102-5.mga5 + Revision: 796065 - remove the maven-metadata xml file because it breaks the build + tv <tv> - adjust file list - Drop no longer needed BuildRequires on java-rpmbuild * Wed Oct 15 2014 umeabot <umeabot> 0:9.3.1102-4.mga5 + Revision: 741572 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot <umeabot> 0:9.3.1102-3.mga5 + Revision: 687735 - Mageia 5 Mass Rebuild * Wed Aug 27 2014 tv <tv> 0:9.3.1102-2.mga5 + Revision: 668640 - requires java-headless instead of java-headless (so that LO pull less * Fri Jul 18 2014 luigiwalser <luigiwalser> 0:9.3.1102-1.mga5 + Revision: 653558 - 9.3.1102 - add patch from fedora to fix build * Sun Apr 27 2014 luigiwalser <luigiwalser> 0:9.3.1101-1.mga5 + Revision: 618341 - 9.3.1101 * Fri Nov 08 2013 dmorgan <dmorgan> 0:9.2.1002-6.mga4 + Revision: 550000 - Remove useless macros * Sat Oct 19 2013 umeabot <umeabot> 0:9.2.1002-5.mga4 + Revision: 531318 - Mageia 4 Mass Rebuild * Sat Aug 03 2013 joequant <joequant> 0:9.2.1002-4.mga4 + Revision: 462958 - remove ant-nodeps and ant-trax * Sun Apr 14 2013 dmorgan <dmorgan> 0:9.2.1002-3.mga3 + Revision: 410103 - Add require on jpackage-utils ( mga#9645) * Fri Feb 08 2013 fwang <fwang> 0:9.2.1002-2.mga3 + Revision: 395328 - cleanup spec * Fri Feb 08 2013 fwang <fwang> 0:9.2.1002-1.mga3 + Revision: 395322 - new version 9.2-1002 + umeabot <umeabot> - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Fri Aug 12 2011 dmorgan <dmorgan> 0:9.0.801-1.mga2 + Revision: 132810 - Clean spec file + gil <gil> - update to 9.0-801 * Fri Jan 28 2011 dmorgan <dmorgan> 0:8.3.603-2.0.2.mga1 + Revision: 43103 - imported package postgresql-jdbc * Fri Sep 04 2009 Thierry Vignaud <tvignaud@mandriva.com> 0:8.3.603-2.0.2mdv2010.0 + Revision: 430767 - rebuild * Fri Aug 08 2008 Thierry Vignaud <tvignaud@mandriva.com> 0:8.3.603-2.0.1mdv2009.0 + Revision: 269010 - rebuild early 2009.0 package (before pixel changes) * Thu Jun 05 2008 Alexander Kurtakov <akurtakov@mandriva.org> 0:8.3.603-0.0.1mdv2009.0 + Revision: 215217 - new version 8.3-603 + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request + Anssi Hannula <anssi@mandriva.org> - buildrequire java-rpmbuild, i.e. build with icedtea on x86(_64) * Tue Nov 27 2007 Alexander Kurtakov <akurtakov@mandriva.org> 0:8.2.504-2mdv2008.1 + Revision: 113387 - fix java 5 build + Anssi Hannula <anssi@mandriva.org> - remove unnecessary Requires(post) on java-gcj-compat * Fri Jan 12 2007 David Walluck <walluck@mandriva.org> 8.2.504-1mdv2007.0 + Revision: 108100 - 8.2.504 - Import postgresql-jdbc * Fri Sep 01 2006 David Walluck <walluck@mandriva.org> 0:8.1.407-2mdv2007.0 - add xalan-j2-serializer to OPT_JAR_LIST * Mon Jun 05 2006 David Walluck <walluck@mandriva.org> 0:8.1.407-1mdv2007.0 - 8.1-407 - rebuild for libgcj.so.7 * Wed Jan 18 2006 David Walluck <walluck@mandriva.org> 0:8.1.404-2mdk - fix building of docs * Mon Jan 02 2006 David Walluck <walluck@mandriva.org> 0:8.1.404-1mdk - release - build documentation - spec cleanup * Wed Feb 02 2005 Jason Corley <jason.corley@gmail.com> 0:8.0.309-2jpp - Name changed to postgresql-jdbc * Wed Feb 02 2005 Jason Corley <jason.corley@gmail.com> 0:8.0.309-1jpp - Initial creation