Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1493692 - Use mariadb-connector-c-devel instead of mysql-devel or mariadb-devel
Summary: Use mariadb-connector-c-devel instead of mysql-devel or mariadb-devel
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ocaml-mysql
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1486480
TreeView+ depends on / blocked
 
Reported: 2017-09-20 17:24 UTC by Michal Schorm
Modified: 2017-10-23 14:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-23 14:48:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michal Schorm 2017-09-20 17:24:00 UTC
Hello, please apply following command to the package SPECfile:

sed -i "s/mysql-devel/mariadb-connector-c-devel/" $(fedpkg gimmespec) ; \
sed -i "s/mariadb-devel/mariadb-connector-c-devel/" $(fedpkg gimmespec) ; \
sed -i "s/%{_libdir}\/mysql/%{_libdir}\/mariadb/" $(fedpkg gimmespec) ; \
sed -i "s/mariadb-connector-c-devel/mariadb-connector-c-devel openssl-devel/" $(fedpkg gimmespec) ;

I've tested, that after the command ^ the package builds successfuly in KOJI and uses mariadb client library.

This change is currently applicable to the Rawhide (f28) only.




For more information check the tracking bugzilla.

Comment 1 Richard W.M. Jones 2017-10-23 13:00:55 UTC
It would have been easier to give me a patch.  The patch, after I
removed unnnecessary changes to %changelog and tidied it up, is:

diff --git a/ocaml-mysql.spec b/ocaml-mysql.spec
index 599359b..b2fdccd 100644
--- a/ocaml-mysql.spec
+++ b/ocaml-mysql.spec
@@ -19,6 +19,7 @@ BuildRequires:  ocaml-findlib-devel
 BuildRequires:  ocaml-ocamldoc
 BuildRequires:  ocaml-camlp4-devel
 BuildRequires:  mariadb-connector-c-devel
+BuildRequires:  openssl-devel
 BuildRequires:  chrpath
 
 
@@ -45,7 +46,7 @@ developing applications that use %{name}.
 
 
 %build
-LDFLAGS="-L%{_libdir}/mysql" \
+LDFLAGS="-L%{_libdir}/mariadb" \
 %configure
 make all
 %if %opt


Why is openssl-devel required?  Why isn't it a dependency of
mariadb-connector-c-devel?

Comment 2 Richard W.M. Jones 2017-10-23 13:01:54 UTC
Sorry, the patch is:

diff --git a/ocaml-mysql.spec b/ocaml-mysql.spec
index 42a806c..b2fdccd 100644
--- a/ocaml-mysql.spec
+++ b/ocaml-mysql.spec
@@ -18,7 +18,8 @@ BuildRequires:  ocaml >= 3.10.0
 BuildRequires:  ocaml-findlib-devel
 BuildRequires:  ocaml-ocamldoc
 BuildRequires:  ocaml-camlp4-devel
-BuildRequires:  mariadb-devel
+BuildRequires:  mariadb-connector-c-devel
+BuildRequires:  openssl-devel
 BuildRequires:  chrpath
 
 
@@ -45,7 +46,7 @@ developing applications that use %{name}.
 
 
 %build
-LDFLAGS="-L%{_libdir}/mysql" \
+LDFLAGS="-L%{_libdir}/mariadb" \
 %configure
 make all
 %if %opt


Question remains as above.

Comment 3 Michal Schorm 2017-10-23 13:31:45 UTC
SED x Patch

Too late I realized, that 'sed' would update comments and changelog too.
However, for me, 'sed' was perfect for mass testings.
With that, I was able to maintain lists of dozens packages with different issues, while solving such issues in mariadb-connector-c package and rebuilding dependent packages by hundreds.
(number of packages * 3 fedora releases * all architectures in COPR) +
(number of packages * atleast 1 KOJI build for final check)
And I managed to create 100 bugzillas pretty faster than with patches.

--

OpenSSL

mariadb-connector-c still builds with openss-devel and has functional openssl inside. However, it turned out, only about half of packages that uses mariadb-connector-c use openssl too.
More, some packages still haven't worked out transition to the new OpenSSL and has openssl conficts.

Generarly, I can put it back, but I'd see it as a "Suggests" or "Recommends", rather than "Requires".
You do think, that should be done?

Comment 4 Richard W.M. Jones 2017-10-23 14:43:27 UTC
Without adding BR openssl-devel, linking fails with:

ocamlmklib         \
			-o mysql_stubs  mysql_stubs.o -lmariadb -lpthread -ldl -lm -lssl -lcrypto  \
			-L/usr/lib64/mariadb/
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto

It really does seem like mariadb-connector-c-devel ought to itself
depend on openssl-devel.  But I have not looked in great detail.

Comment 5 Richard W.M. Jones 2017-10-23 14:48:43 UTC
https://koji.fedoraproject.org/koji/taskinfo?taskID=22649855


Note You need to log in before you can comment on or make changes to this bug.