Skip to content

Commit 37b30be

Browse files
committed
Bug#27079017 - FC27 PKGS FAILURES WHEN MYSQL-CONNECTOR-ODBC INSTALLED ALREADY FROM NATIVE REPO
- Due to changes in packages, skip libs-compat and embedded-compat packages
1 parent e49e52a commit 37b30be

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

packaging/rpm-fedora/mysql.spec.in

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@
3434
%{!?compilation_comment_debug: %global compilation_comment_debug MySQL Community Server - Debug (GPL)}
3535
%{!?src_base: %global src_base mysql}
3636

37+
%if 0%{?fedora} < 27
3738
%global compatver 5.6.37
3839
%global compatlib 18
3940
%global compatsrc https://cdn.mysql.com/Downloads/MySQL-5.6/mysql-%{compatver}.tar.gz
41+
%endif
4042

4143
%global src_dir %{src_base}-%{version}
42-
43-
# No debuginfo for now, ships /usr/sbin/mysqld-debug and libmysqlcliet-debug.a
44+
# No debuginfo for now
4445
%if 0%{?nodebuginfo}
4546
%global _enable_debug_package 0
4647
%global debug_package %{nil}
@@ -65,7 +66,9 @@ Release: 1%{?dist}
6566
License: Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. Under %{?license_type} license as shown in the Description field.
6667
Source0: https://cdn.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/%{src_dir}.tar.gz
6768
Source1: http://downloads.sourceforge.net/boost/@[email protected]
69+
%if 0%{?compatlib}
6870
Source2: %{compatsrc}
71+
%endif
6972
URL: http://www.mysql.com/
7073
Packager: MySQL Release Engineering <[email protected]>
7174
Vendor: %{mysql_vendor}
@@ -136,6 +139,11 @@ Obsoletes: mariadb-galera-server
136139
Obsoletes: mariadb-server-galera
137140
Obsoletes: community-mysql-server < %{version}-%{release}
138141
Obsoletes: mysql-server < %{version}-%{release}
142+
%if 0%{?compatlib}
143+
%else
144+
Obsoletes: mysql-community-embedded-compat < 5.7.20
145+
Obsoletes: mysql-community-libs-compat < 5.7.20
146+
%endif
139147
Provides: mysql-server = %{version}-%{release}
140148
Provides: mysql-server%{?_isa} = %{version}-%{release}
141149
Provides: mysql-compat-server = %{version}-%{release}
@@ -190,9 +198,11 @@ Group: Applications/Databases
190198
%if 0%{?commercial}
191199
Obsoletes: mysql-community-common < %{version}-%{release}
192200
%endif
201+
%if 0%{?compatlib}
193202
Obsoletes: mariadb-common
194-
Obsoletes: mariadb-config
195203
Obsoletes: mariadb-errmsg
204+
%endif # compatlib
205+
Obsoletes: mariadb-config
196206
Obsoletes: community-mysql-common < %{version}-%{release}
197207
Obsoletes: community-mysql-errmsg < %{version}-%{release}
198208
Obsoletes: mysql-common < %{version}-%{release}
@@ -252,7 +262,9 @@ Requires: mysql-commercial-common%{?_isa} >= %{min}
252262
%else
253263
Requires: mysql-community-common%{?_isa} >= %{min}
254264
%endif
265+
%if 0%{?compatlib}
255266
Obsoletes: mariadb-libs
267+
%endif # compatlib
256268
Obsoletes: community-mysql-libs < %{version}-%{release}
257269
Obsoletes: mysql-libs < %{version}-%{release}
258270
Provides: mysql-libs = %{version}-%{release}
@@ -262,6 +274,7 @@ Provides: mysql-libs%{?_isa} = %{version}-%{release}
262274
This package contains the shared libraries for MySQL client
263275
applications.
264276

277+
%if 0%{?compatlib}
265278
%package libs-compat
266279
Summary: Shared compat libraries for MySQL %{compatver} database client applications
267280
Group: Applications/Databases
@@ -279,6 +292,7 @@ Requires: mysql-community-libs%{?_isa} >= %{min}
279292
%description libs-compat
280293
This package contains the shared compat libraries for MySQL %{compatver} client
281294
applications.
295+
%endif # compatlib
282296

283297
%package embedded
284298
Summary: MySQL embedded library
@@ -289,7 +303,9 @@ Requires: mysql-commercial-common%{?_isa} = %{version}-%{release}
289303
%else
290304
Requires: mysql-community-common%{?_isa} = %{version}-%{release}
291305
%endif
306+
%if 0%{?compatlib}
292307
Obsoletes: mariadb-embedded
308+
%endif
293309
Obsoletes: community-mysql-embedded < %{version}-%{release}
294310
Obsoletes: mysql-embedded < %{version}-%{release}
295311
Provides: mysql-embedded = %{version}-%{release}
@@ -307,6 +323,7 @@ client/server version.
307323

308324
For a description of MySQL see the base MySQL RPM or http://www.mysql.com/
309325

326+
%if 0%{?compatlib}
310327
%package embedded-compat
311328
Summary: MySQL embedded compat library
312329
Group: Applications/Databases
@@ -320,6 +337,7 @@ Requires: mysql-community-common%{?_isa} >= %{min}
320337
%description embedded-compat
321338
This package contains the MySQL server as an embedded library with
322339
compatibility for applications using version %{compatlib} of the library.
340+
%endif # compatlib
323341

324342
%package embedded-devel
325343
Summary: Development header files and libraries for MySQL as an embeddable library
@@ -343,7 +361,11 @@ This package contains files needed for developing applications using
343361
the embedded version of the MySQL server.
344362

345363
%prep
364+
%if 0%{?compatlib}
346365
%setup -q -T -a 0 -a 1 -a 2 -c -n %{src_dir}
366+
%else
367+
%setup -q -T -a 0 -a 1 -c -n %{src_dir}
368+
%endif # 0%{?compatlib}
347369

348370
%build
349371
# Fail quickly and obviously if user tries to build as root
@@ -357,6 +379,7 @@ fi
357379
%endif
358380

359381
# Build compat libs
382+
%if 0%{?compatlib}
360383
(
361384
pushd mysql-%{compatver}
362385
mkdir build && pushd build
@@ -381,6 +404,7 @@ fi
381404
echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG
382405
make %{?_smp_mflags} VERBOSE=1
383406
)
407+
%endif # compatlib
384408

385409
# Build debug versions of mysqld and libmysqld.a
386410
mkdir debug
@@ -447,11 +471,13 @@ mkdir release
447471

448472
%install
449473
# Install compat libs
474+
%if 0%{?compatlib}
450475
for dir in libmysql libmysqld ; do
451476
pushd mysql-%{compatver}/build/$dir
452477
make DESTDIR=%{buildroot} install
453478
popd
454479
done
480+
%endif # compatlib
455481
rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient{,_r}.{a,la,so}
456482
rm -f %{buildroot}%{_libdir}/mysql/libmysqld.{a,la,so}
457483

@@ -743,6 +769,7 @@ datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n
743769
%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf
744770
%{_libdir}/mysql/libmysqlclient.so.20*
745771

772+
%if 0%{?compatlib}
746773
%files libs-compat
747774
%defattr(-, root, root, -)
748775
%doc %{?license_files_server}
@@ -752,6 +779,7 @@ datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n
752779
%{_libdir}/mysql/libmysqlclient.so.%{compatlib}.*.0
753780
%{_libdir}/mysql/libmysqlclient_r.so.%{compatlib}
754781
%{_libdir}/mysql/libmysqlclient_r.so.%{compatlib}.*.0
782+
%endif # compatlib
755783

756784
%files test
757785
%defattr(-, root, root, -)
@@ -832,12 +860,14 @@ datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n
832860
%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf
833861
%attr(755, root, root) %{_libdir}/mysql/libmysqld.so.20*
834862

863+
%if 0%{?compatlib}
835864
%files embedded-compat
836865
%defattr(-, root, root, -)
837866
%doc %{?license_files_server}
838867
%dir %attr(755, root, root) %{_libdir}/mysql
839868
%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf
840869
%attr(755, root, root) %{_libdir}/mysql/libmysqld.so.18*
870+
%endif # compatlib
841871

842872
%files embedded-devel
843873
%defattr(-, root, root, -)

0 commit comments

Comments
 (0)