From 1fecc2ba0dd7e9275fc1961ba8900e9d312bd351 Mon Sep 17 00:00:00 2001 From: Terje Rosten Date: Wed, 27 Feb 2019 12:03:38 +0100 Subject: [PATCH] Fix for Bug#94414 (29384853), Connector/J RPM package have version number in path. Background: According to RPM package policy[1], jar files should not have version in filename. A unversioned filename makes it more simple to upgrade the package without doing other changes. Fix: Use %{name} RPM macro to name the jar file, giving wanted filename in all cases. Also fix build.xml to accept more generic output from java -version [1]: https://docs.fedoraproject.org/en-US/packaging-guidelines/Java/ --- CHANGES | 2 ++ build.xml | 2 +- src/build/misc/rpm.spec.in | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 455ea447a..e851fea3c 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,8 @@ Version 8.0.16 + - Fix for Bug#94414 (29384853), Connector/J RPM package have version number in path. + - Fix for Bug#27786499, REDUNDANT FILES IN DEBIAN PACKAGE FOR DEBIAN9(COMMUNITY PACKAGE) FOR CJAVA. - WL#12246, DevAPI: Prepared statement support. diff --git a/build.xml b/build.xml index 6915a959e..934c3b33a 100644 --- a/build.xml +++ b/build.xml @@ -362,7 +362,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o - + diff --git a/src/build/misc/rpm.spec.in b/src/build/misc/rpm.spec.in index aa3d07278..d0544f7b4 100644 --- a/src/build/misc/rpm.spec.in +++ b/src/build/misc/rpm.spec.in @@ -1,4 +1,4 @@ -# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. # # 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 @@ -166,7 +166,7 @@ cp %{with_docs}/en/txt/connector-j.txt package-content/docs/ %install install -d -m 0755 %{buildroot}%{_javadir} -install -p -m 0644 package-content/@MYSQL_CJ_FULL_PROD_NAME@.jar %{buildroot}%{_javadir}/@MYSQL_CJ_FULL_PROD_NAME@.jar +install -p -m 0644 package-content/@MYSQL_CJ_FULL_PROD_NAME@.jar %{buildroot}%{_javadir}/%{name}.jar %clean rm -rf %{buildroot} @@ -187,7 +187,7 @@ rm -rf %{buildroot} %doc package-content/docs/mvl.css %endif -%{_javadir}/@MYSQL_CJ_FULL_PROD_NAME@.jar +%{_javadir}/%{name}.jar %changelog * Mon Nov 27 2017 MySQL Release Engineering - 8.0.9-1