Signed-off-by: cherry530 <707078654@qq.com> (cherry picked from commit 057d42353a0b3a726008af7d6df768bd8283a55e)
72 lines
2.5 KiB
RPMSpec
72 lines
2.5 KiB
RPMSpec
Summary: Official JDBC driver for MySQL
|
|
Name: mysql-connector-java
|
|
Version: 8.0.30
|
|
Release: 1
|
|
Epoch: 1
|
|
License: GPLv2 with exceptions
|
|
URL: http://dev.mysql.com/downloads/connector/j/
|
|
Source0: https://github.com/mysql/mysql-connector-j/archive/%{version}/%{name}-%{version}.tar.gz
|
|
|
|
Patch1: remove-coverage-test.patch
|
|
Patch2: remove-authentication-plugin.patch
|
|
Patch3: remove-StatementsTest.patch
|
|
|
|
BuildArch: noarch
|
|
BuildRequires: ant >= 1.6.0 ant-contrib >= 1.0 ant-junit apache-commons-logging c3p0 git
|
|
BuildRequires: hibernate java-devel >= 1:1.6.0 javapackages-local jta >= 1.0 junit5
|
|
BuildRequires: protobuf-java slf4j
|
|
Requires: jta >= 1.0 slf4j
|
|
|
|
%description
|
|
MySQL Connector/J is a native Java driver that converts JDBC (Java Database
|
|
Connectivity) calls into the network protocol used by the MySQL database.
|
|
It lets developers working with the Java programming language easily build
|
|
programs and applets that interact with MySQL and connect all corporate
|
|
data, even in a heterogeneous environment. MySQL Connector/J is a Type
|
|
IV JDBC driver and has a complete JDBC feature set that supports the
|
|
capabilities of MySQL.
|
|
|
|
%prep
|
|
%setup -q -n mysql-connector-j-%{version}
|
|
|
|
for file in README README.md; do
|
|
sed -i.orig 's|\r||g' $file
|
|
touch -r $file.orig $file
|
|
rm $file.orig
|
|
done
|
|
sed -i 's/>@.*</>%{version}</' src/build/misc/pom.xml
|
|
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
%patch3 -p1
|
|
|
|
%build
|
|
export CLASSPATH=$(build-classpath jdbc-stdext jta junit slf4j commons-logging.jar)
|
|
rm -rf src/main/user-impl/java/com/mysql/cj/jdbc/integration/jboss
|
|
rm src/test/java/testsuite/regression/ConnectionRegressionTest.java
|
|
rm src/test/java/testsuite/regression/DataSourceRegressionTest.java
|
|
rm src/test/java/testsuite/simple/StatementsTest.java
|
|
ant -Dcom.mysql.cj.build.jdk=%{java_home} \
|
|
-Dcom.mysql.cj.extra.libs=/usr/share/java \
|
|
test dist
|
|
|
|
%install
|
|
%mvn_file mysql:mysql-connector-java %{name}
|
|
%mvn_artifact src/build/misc/pom.xml build/%{name}-%{version}-SNAPSHOT/%{name}-%{version}-SNAPSHOT.jar
|
|
%mvn_install
|
|
|
|
%files -f .mfiles
|
|
%doc CHANGES README README.md
|
|
%license LICENSE
|
|
|
|
%changelog
|
|
* Tue Sep 26 2023 xu_ping <707078654@qq.com> - 1:8.0.30-1
|
|
- Upgrade to 8.0.30
|
|
|
|
* Fri Feb 25 2022 houyingchao <houyingchao@huawei.com> - 1:8.0.16-1
|
|
- Upgrade to 8.0.16
|
|
- Fix CVE-2019-2692
|
|
|
|
* Fri Jul 24 2020 leiju <leiju4@huawei.com> - 1:8.0.15-1
|
|
- Package init
|