package init
This commit is contained in:
parent
c7f1fce558
commit
9718c5a132
BIN
8.0.15.tar.gz
Normal file
BIN
8.0.15.tar.gz
Normal file
Binary file not shown.
25
java-version-detection.patch
Normal file
25
java-version-detection.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 7e9856cdde756339aa184c24cdb3d6a381bb5f11 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jakub Janco <jjanco@redhat.com>
|
||||||
|
Date: Fri, 22 Feb 2019 11:08:05 +0100
|
||||||
|
Subject: [PATCH] Fix version detection
|
||||||
|
|
||||||
|
---
|
||||||
|
build.xml | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/build.xml b/build.xml
|
||||||
|
index 00b2d7eb..a790ee15 100644
|
||||||
|
--- a/build.xml
|
||||||
|
+++ b/build.xml
|
||||||
|
@@ -362,7 +362,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
|
||||||
|
<not>
|
||||||
|
<and>
|
||||||
|
<equals arg1="${com.mysql.cj.build.jdk.exitStatus}" arg2="0" />
|
||||||
|
- <contains string="${com.mysql.cj.build.jdk.version}" substring="java version "1.8" casesensitive="true" />
|
||||||
|
+ <contains string="${com.mysql.cj.build.jdk.version}" substring="openjdk version "1.8" casesensitive="true" />
|
||||||
|
</and>
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
--
|
||||||
|
2.14.4
|
||||||
|
|
||||||
60
mysql-connector-java.spec
Normal file
60
mysql-connector-java.spec
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
Summary: Official JDBC driver for MySQL
|
||||||
|
Name: mysql-connector-java
|
||||||
|
Version: 8.0.15
|
||||||
|
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}.tar.gz
|
||||||
|
Patch3: java-version-detection.patch
|
||||||
|
Patch4: remove-coverage-test.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 junit
|
||||||
|
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
|
||||||
|
%patch3 -p1
|
||||||
|
%patch4 -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
|
||||||
|
* Fri Jul 24 2020 leiju <leiju4@huawei.com> - 8.0.15-1
|
||||||
|
- Package init
|
||||||
5
mysql-connector-java.yaml
Normal file
5
mysql-connector-java.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
git_url: https://github.com/mysql/mysql-connector-j
|
||||||
|
version_control: github
|
||||||
|
src_repo: mysql/mysql-connector-j
|
||||||
|
tag_prefix: "^"
|
||||||
|
seperator: "."
|
||||||
157
remove-coverage-test.patch
Normal file
157
remove-coverage-test.patch
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
diff --git a/build.xml b/build.xml
|
||||||
|
index 03efb55f..9bf9abfe 100644
|
||||||
|
--- a/build.xml
|
||||||
|
+++ b/build.xml
|
||||||
|
@@ -306,13 +306,6 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
|
||||||
|
<pathelement location="${com.mysql.cj.testsuite.build.dir}/${com.mysql.cj.build.driver.fullName}" />
|
||||||
|
</path>
|
||||||
|
|
||||||
|
- <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
|
||||||
|
- <classpath>
|
||||||
|
- <fileset dir="${com.mysql.cj.extra.libs}">
|
||||||
|
- <include name="**/jacocoant.jar" />
|
||||||
|
- </fileset>
|
||||||
|
- </classpath>
|
||||||
|
- </taskdef>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ************************* -->
|
||||||
|
@@ -1182,58 +1175,6 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
|
||||||
|
</condition>
|
||||||
|
<echo>${com.mysql.cj.testsuite.message.test.mode}</echo>
|
||||||
|
|
||||||
|
- <local name="com.mysql.cj.testsuite.test.coverage" />
|
||||||
|
- <condition property="com.mysql.cj.testsuite.test.coverage" value="true" else="false">
|
||||||
|
- <isset property="com.mysql.cj.coverage.result.dir.final" />
|
||||||
|
- </condition>
|
||||||
|
-
|
||||||
|
- <jacoco:coverage destfile="${com.mysql.cj.coverage.result.dir.final}/${com.mysql.cj.coverage.result.name.final}"
|
||||||
|
- enabled="${com.mysql.cj.testsuite.test.coverage}">
|
||||||
|
- <junit printsummary="yes"
|
||||||
|
- fork="on"
|
||||||
|
- forkmode="once"
|
||||||
|
- jvm="${com.mysql.cj.testsuite.jvm.java}"
|
||||||
|
- errorProperty="com.mysql.cj.testsuite.junit.fail"
|
||||||
|
- failureProperty="com.mysql.cj.testsuite.junit.fail">
|
||||||
|
- <jvmarg value="-Xmx1024m" />
|
||||||
|
-
|
||||||
|
- <syspropertyset refid="junit.system.properties" />
|
||||||
|
- <sysproperty key="com.mysql.cj.testsuite.url" value="${com.mysql.cj.testsuite.url}" />
|
||||||
|
-
|
||||||
|
- <classpath>
|
||||||
|
- <fileset dir="${com.mysql.cj.extra.libs}">
|
||||||
|
- <include name="**/*.jar" />
|
||||||
|
- <exclude name="**/protobuf-java-2.6.0.jar" />
|
||||||
|
- </fileset>
|
||||||
|
- <fileset dir="${com.mysql.cj.build.dir.driver}/lib">
|
||||||
|
- <include name="**/*.jar" />
|
||||||
|
- </fileset>
|
||||||
|
- <pathelement location="${com.mysql.cj.build.dir.driver}" />
|
||||||
|
- <pathelement location="${com.mysql.cj.testsuite.build.dir}/${com.mysql.cj.build.driver.fullName}" />
|
||||||
|
- <pathelement path="${com.mysql.cj.testsuite.build.classpath}" />
|
||||||
|
- <pathelement path="${java.class.path}" />
|
||||||
|
- </classpath>
|
||||||
|
-
|
||||||
|
- <formatter type="xml" />
|
||||||
|
-
|
||||||
|
- <test if="${com.mysql.cj.testsuite.test.methods.enabled}"
|
||||||
|
- name="${com.mysql.cj.testsuite.test.class}"
|
||||||
|
- methods="${com.mysql.cj.testsuite.test.methods}"
|
||||||
|
- todir="${com.mysql.cj.testsuite.junit.results}" />
|
||||||
|
-
|
||||||
|
- <test if="com.mysql.cj.testsuite.test.class"
|
||||||
|
- unless="com.mysql.cj.testsuite.test.methods"
|
||||||
|
- name="${com.mysql.cj.testsuite.test.class}"
|
||||||
|
- todir="${com.mysql.cj.testsuite.junit.results}" />
|
||||||
|
-
|
||||||
|
- <batchtest unless="com.mysql.cj.testsuite.test.class" todir="${com.mysql.cj.testsuite.junit.results}">
|
||||||
|
- <fileset dir="${com.mysql.cj.testsuite.build.dir}/${com.mysql.cj.build.driver.fullName}">
|
||||||
|
- <include name="**/*Test.java" />
|
||||||
|
- <exclude name="**/perf/*.java" />
|
||||||
|
- </fileset>
|
||||||
|
- </batchtest>
|
||||||
|
- </junit>
|
||||||
|
- </jacoco:coverage>
|
||||||
|
|
||||||
|
<junitreport todir="${com.mysql.cj.testsuite.junit.results}/report">
|
||||||
|
<fileset dir="${com.mysql.cj.testsuite.junit.results}">
|
||||||
|
@@ -1253,79 +1194,6 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
- <!-- ********************************* -->
|
||||||
|
- <!-- ***** TESTING CODE COVERAGE ***** -->
|
||||||
|
- <!-- ********************************* -->
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- <target name="test-coverage" description="Runs tests collecting coverage results." depends="-set-test-coverage-detaults, test" />
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- <target name="-set-test-coverage-detaults">
|
||||||
|
- <condition property="com.mysql.cj.coverage.result.dir.final"
|
||||||
|
- value="${com.mysql.cj.coverage.result.dir}"
|
||||||
|
- else="${com.mysql.cj.testsuite.build.dir}/coverage">
|
||||||
|
- <isset property="com.mysql.cj.coverage.result.dir" />
|
||||||
|
- </condition>
|
||||||
|
- <condition property="com.mysql.cj.coverage.result.name.final" value="${com.mysql.cj.coverage.result.name}" else="jacoco.exec">
|
||||||
|
- <isset property="com.mysql.cj.coverage.result.name" />
|
||||||
|
- </condition>
|
||||||
|
- </target>
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- <!-- *********************************** -->
|
||||||
|
- <!-- ***** REPORTING CODE COVERAGE ***** -->
|
||||||
|
- <!-- *********************************** -->
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- <target name="report-coverage"
|
||||||
|
- depends="-extra-libs-check, -set-report-coverage-detaults, -jacoco-merge"
|
||||||
|
- description="Merges coverage results and creates HTML coverage report.">
|
||||||
|
- <jacoco:report>
|
||||||
|
- <executiondata>
|
||||||
|
- <file file="${com.mysql.cj.coverage.merge.result.final}" />
|
||||||
|
- </executiondata>
|
||||||
|
-
|
||||||
|
- <structure name="Connector/J classes">
|
||||||
|
- <classfiles>
|
||||||
|
- <fileset dir="${com.mysql.cj.build.dir.driver}">
|
||||||
|
- <include name="com/mysql/cj/**" />
|
||||||
|
- <exclude name="com/mysql/cj/x/protobuf/**" />
|
||||||
|
- </fileset>
|
||||||
|
- </classfiles>
|
||||||
|
- <sourcefiles encoding="UTF-8">
|
||||||
|
- <fileset dir="${com.mysql.cj.build.dir.driver}">
|
||||||
|
- <include name="com/mysql/cj/**" />
|
||||||
|
- <exclude name="com/mysql/cj/x/protobuf/**" />
|
||||||
|
- </fileset>
|
||||||
|
- </sourcefiles>
|
||||||
|
- </structure>
|
||||||
|
-
|
||||||
|
- <html destdir="${com.mysql.cj.coverage.report.dir.final}" />
|
||||||
|
-
|
||||||
|
- </jacoco:report>
|
||||||
|
- </target>
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- <target name="-jacoco-merge" depends="-set-report-coverage-detaults" if="com.mysql.cj.coverage.merge.files">
|
||||||
|
- <jacoco:merge destfile="${com.mysql.cj.coverage.merge.result.final}">
|
||||||
|
- <fileset dir="${com.mysql.cj.coverage.result.dir.final}" includes="${com.mysql.cj.coverage.merge.files}" />
|
||||||
|
- </jacoco:merge>
|
||||||
|
- </target>
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- <target name="-set-report-coverage-detaults" depends="-set-test-coverage-detaults">
|
||||||
|
- <condition property="com.mysql.cj.coverage.merge.result.final"
|
||||||
|
- value="${com.mysql.cj.coverage.merge.result}"
|
||||||
|
- else="${com.mysql.cj.coverage.result.dir.final}/jacoco.exec">
|
||||||
|
- <isset property="com.mysql.cj.coverage.merge.result" />
|
||||||
|
- </condition>
|
||||||
|
- <condition property="com.mysql.cj.coverage.report.dir.final"
|
||||||
|
- value="${com.mysql.cj.coverage.report.dir}"
|
||||||
|
- else="${com.mysql.cj.coverage.result.dir.final}/report">
|
||||||
|
- <isset property="com.mysql.cj.coverage.report.dir" />
|
||||||
|
- </condition>
|
||||||
|
- </target>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ***************************** -->
|
||||||
Loading…
x
Reference in New Issue
Block a user