Skip to content

Commit

Permalink
chore: upstream changes from 8.0.33 (#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
karenc-bq authored Jan 18, 2024
1 parent ced33d3 commit decf781
Show file tree
Hide file tree
Showing 24 changed files with 1,061 additions and 378 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- name: 'Set up JDK 8'
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 8
- name: 'Configure AWS Credentials'
uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -72,6 +73,7 @@ jobs:
- name: 'Set up JDK 8'
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 8
- name: 'Run Community Tests'
run: |
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Clone Repository'
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 50
- name: 'Set up JDK 8'
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 8
- name: 'Run Community Tests'
run: |
./gradlew --no-parallel --no-daemon test-community-docker
- name: 'Archive junit results'
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: 'junit-report'
path: build/reports/tests/
Expand Down
8 changes: 4 additions & 4 deletions src/build/misc/debian.in/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ Section: database
Priority: optional
Maintainer: Oracle MySQL Product Engineering Team <[email protected]>
Standards-Version: 3.9.2
Build-Depends: debhelper (>= 8.9.4)
Build-Depends: debhelper (>= 11)
Homepage: http://dev.mysql.com/downloads/connector/j/

Package: @PRODUCT_NAME@@PACKAGE_SUFFIX@
Section: database
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}
Replaces: mysql-connector-java@PACKAGE_SUFFIX@ (<< 8.0.31)
Breaks: mysql-connector-java@PACKAGE_SUFFIX@ (<< 8.0.31)
Provides: mysql-connector-java@PACKAGE_SUFFIX@
Replaces: @PRODUCT_LEGACY_NAME@@PACKAGE_SUFFIX@ (<< 8.0.31)
Breaks: @PRODUCT_LEGACY_NAME@@PACKAGE_SUFFIX@ (<< 8.0.31)
Provides: @PRODUCT_LEGACY_NAME@@PACKAGE_SUFFIX@
Description: MySQL Connector/J
Standardized MySQL database driver for Java
1 change: 1 addition & 0 deletions src/build/misc/debian.in/links
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/share/java/@PRODUCT_NAME@-@[email protected] usr/share/java/@PRODUCT_LEGACY_NAME@@PACKAGE_SUFFIX@-@[email protected]
4 changes: 3 additions & 1 deletion src/build/misc/debian.in/rules
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/make -f
# Copyright (c) 2016, 2022, Oracle and/or its affiliates.
# Copyright (c) 2016, 2023, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License, version 2.0, as published by the
Expand All @@ -26,6 +26,8 @@
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

export DH_VERBOSE=1

upstream_version := $(shell dpkg-parsechangelog | sed -n -e'/^Version: / { s/Version: //; s/-[^-]\+$$//; p }')
base_version = $(shell echo $(upstream_version) | sed -e's/r[0-9]\+$$//')

Expand Down
73 changes: 42 additions & 31 deletions src/build/misc/rpm.spec.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017, 2022, Oracle and/or its affiliates.
# Copyright (c) 2017, 2023, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License, version 2.0, as published by the
Expand All @@ -25,7 +25,7 @@
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

# You can pass these options to "rpmbuild"
# The following options can be passed to "rpmbuild"
#
# --define="commercial <nonempty>"
# --define="with_ant <path>"
Expand All @@ -40,62 +40,67 @@
# <docs-base>/en/pdf/connector-j.pdf
# <docs-base>/en/txt/connector-j.txt

# Some linux distributions doesn't set the "dist" macro. There is a
# list how to identify dists here
# Some linux distributions doesn't set the "dist" macro. There is a list how to identify dists here
# https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto

# SuSE will not set "dist", others do
%if 0%{?suse_version} == 1315
%global dist .sles12
%global sles12 1
%global dist .sles12
%global sles12 1
%endif

%if 0%{?suse_version} == 1500
%global dist .sl15
%global sles15 1
%global dist .sl15
%global sles15 1
%endif

%global legacy_name @MYSQL_CJ_EXTENDED_LEGACY_PROD_NAME@@MYSQL_CJ_RPM_PACKAGE_SUFFIX@

%if 0%{?commercial:1}
%global lic_tag Commercial
%global legacy_name_community @MYSQL_CJ_EXTENDED_LEGACY_PROD_NAME@
%global name_community @MYSQL_CJ_EXTENDED_PROD_NAME@
%global lic_tag Commercial
%else
%global lic_tag GPLv2
%global lic_tag GPLv2
%endif

Summary: Standardized MySQL database driver for Java
Name: @MYSQL_CJ_EXTENDED_PROD_NAME@@MYSQL_CJ_RPM_PACKAGE_SUFFIX@
Version: @MYSQL_CJ_VERSION_NUMERIC@
Release: @MYSQL_CJ_RPM_RELEASE_FULL@%{?dist}
Epoch: 1
License: %{lic_tag}
Group: Development/Libraries
URL: http://dev.mysql.com/downloads/connector/j/
Source0: https://cdn.mysql.com/Downloads/Connector-J/@[email protected]
Summary: Standardized MySQL database driver for Java
Name: @MYSQL_CJ_EXTENDED_PROD_NAME@@MYSQL_CJ_RPM_PACKAGE_SUFFIX@
Version: @MYSQL_CJ_VERSION_NUMERIC@
Release: @MYSQL_CJ_RPM_RELEASE_FULL@%{?dist}
Epoch: 1
License: %{lic_tag}
Group: Development/Libraries
URL: http://dev.mysql.com/downloads/connector/j/
Source0: https://cdn.mysql.com/Downloads/Connector-J/@[email protected]

BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch

Obsoletes: mysql-connector-java@MYSQL_CJ_RPM_PACKAGE_SUFFIX@ < %{version}-%{release}
Provides: mysql-connector-java@MYSQL_CJ_RPM_PACKAGE_SUFFIX@ = %{version}-%{release}
# Handle package renaming in 8.0.31
Obsoletes: %{legacy_name} < 1:8.0.31
Provides: %{legacy_name} = %{epoch}:%{version}-%{release}

# Commercial obsoletes community, incl. package renaming in 8.0.31
%if 0%{?commercial:1}
Obsoletes: mysql-connector-java < %{version}-%{release}
Provides: mysql-connector-java = %{version}-%{release}
Obsoletes: @MYSQL_CJ_EXTENDED_PROD_NAME@ < %{version}-%{release}
Provides: @MYSQL_CJ_EXTENDED_PROD_NAME@ = %{version}-%{release}
Obsoletes: %{name_community} < %{epoch}:%{version}-%{release}
Provides: %{name_community} = %{epoch}:%{version}-%{release}
Obsoletes: %{legacy_name_community} < 1:8.0.31
Provides: %{legacy_name_community} = %{epoch}:%{version}-%{release}
%endif

%if 0%{!?with_ant:1}
BuildRequires: ant
BuildRequires: ant
%endif

%if 0%{!?with_java:1}
BuildRequires: java-devel >= 1:1.8.0
BuildRequires: java-devel >= 1:1.8.0
%endif

%if 0%{?sles12:1} || 0%{?sles15:1}
Requires: java-headless >= 1.8.0
Requires: java-headless >= 1.8.0
%else
Requires: java-headless >= 1:1.8.0
Requires: java-headless >= 1:1.8.0
%endif

%description
Expand Down Expand Up @@ -175,6 +180,11 @@ cp %{with_docs}/en/txt/connector-j.txt package-content/docs/
install -d -m 0755 %{buildroot}%{_javadir}
install -p -m 0644 package-content/@[email protected] %{buildroot}%{_javadir}/%{name}.jar

# To make it easier for users, provide a soft link with the old
# "mysql-connector-java.jar" name. We can't use "install", it will
# dereference the link
ln -s %{name}.jar %{buildroot}%{_javadir}/%{legacy_name}.jar

%clean
rm -rf %{buildroot}

Expand All @@ -195,6 +205,7 @@ rm -rf %{buildroot}
%endif

%{_javadir}/%{name}.jar
%{_javadir}/%{legacy_name}.jar

%changelog
* Mon Nov 27 2017 MySQL Release Engineering <[email protected]> - 8.0.9-1
Expand Down
Loading

0 comments on commit decf781

Please sign in to comment.