Bug 1797057

Summary: mariadb-java-client requires mariadb
Product: Red Hat Enterprise Linux 8 Reporter: Hynek Mlnarik <hmlnarik>
Component: mariadb-java-clientAssignee: Michal Schorm <mschorm>
Status: CLOSED ERRATA QA Contact: Lukáš Zachar <lzachar>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.4CC: databases-maint, hhorak, jlieskov, mschorm
Target Milestone: rcKeywords: TestCaseNotNeeded
Target Release: 8.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 04:11:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hynek Mlnarik 2020-01-31 20:00:43 UTC
Description of problem:
mariadb-java-client package contains a .jar file and some documentation. As such, it is very lightweight. However it requires "mariadb" package which, when installing, brings along perl packages, and in total takes over 50 MiB of space for no obvious reason. These are not needed for JDBC driver to work, and only create a surface for respins of images that contain this package.

Version-Release number of selected component (if applicable):
2.2.5

How reproducible:
always

Steps to Reproduce:
1. rpm -q --requires mariadb-java-client

Actual results:
mariadb is included in the result

Expected results:
mariadb is NOT included in the result

Additional info:
[root@80adf063fcd5 ~]# rpm -q --requires mariadb-java-client
java-headless >= 1:1.8
javapackages-filesystem
mariadb   <<<<
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1

Comment 1 Michal Schorm 2020-02-03 16:40:46 UTC
I Agree.

Suggested fix:
  Change "Requires: mariadb" to "Suggests: mariadb"
So that should be trivial.


I'd aim for RHEL 8.3 with this fix.
Is that OK for you or is that anyhow urgent to you?

Comment 2 Hynek Mlnarik 2020-02-04 14:14:15 UTC
Thank you for confirming the bug.

It would be very nice to get it to next micro if possible since it creates a surface for unnecessary CVE respins of images.

I wonder whether the suggested solution would work with microdnf? microdnf apparently automatically installs weak dependencies. Would mariadb dependency go to "weak dependency" or some other dnf category that is ignored by microdnf?

Comment 3 Michal Schorm 2020-02-04 14:51:22 UTC
Now I hear about 'microdnf' for the first time in my life. :)

I tested in in Fedora Rawhide on 'mariadb-server' package.
This package has several requires, several recommends and several suggests.

Both 'dnf' and 'microdnf' by default pulled in the "Recommends" and ignored the "Suggests".
So IMHO that should be fine.

---

If it won't work like this in RHEL 8, we can always drop the dependency entirely, instead of just weakening it.

Comment 4 Hynek Mlnarik 2020-02-04 16:55:59 UTC
Thanks Michal for checking!

Comment 12 errata-xmlrpc 2020-11-04 04:11:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (mariadb-java-client bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4826