Bug 374261

Summary: bind should not depend on "mysql" and "postgresql"
Product: [Fedora] Fedora Reporter: Jordan Russell <jr-redhatbugs2>
Component: bindAssignee: Adam Tkac <atkac>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8CC: ovasik, rh-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 9.5.0-18.a7.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-22 03:30:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 391501    

Description Jordan Russell 2007-11-10 04:06:06 UTC
Description of problem:
Fedora 8's bind package now depends on "mysql" and "postgresql":

# yum update bind
=====================================================
 Package                 Arch       Version          
=====================================================
Installing:
 bind                    i386       32:9.5.0-16.a6.fc8
     replacing  caching-nameserver.i386 31:9.4.2-0.4.rc1.fc7

Updating:
 bind-libs               i386       32:9.5.0-16.a6.fc8
 bind-utils              i386       32:9.5.0-16.a6.fc8
Installing for dependencies:
 mysql                   i386       5.0.45-4.fc8
 mysql-libs              i386       5.0.45-4.fc8
 perl-DBI                i386       1.58-2.fc8
 postgresql              i386       8.2.5-1.fc8
 postgresql-libs         i386       8.2.5-1.fc8
 unixODBC                i386       2.2.12-4.fc8

This is way overkill; surely it doesn't actually require the full-blown MySQL
and PostgreSQL servers to be installed on the local machine. It should instead
depend only the client libraries needed to connect to those databases
(mysql-libs and postgresql-libs).

(As it stands now, I cannot upgrade to the Fedora 8 bind package, because the
"mysql" dependency conflicts with the MySQL-* packages from mysql.com I already
have installed. "mysql-libs", OTOH, doesn't conflict.)

Ideally, though, bind should not depend on any database packages. Why not move
the mysql and postgresql support into separate packages, as was done in Dovecot
(see bug #145241) and PHP?

Version-Release number of selected component (if applicable):
bind-9.5.0-16.a6.fc8

Comment 1 Adam Tkac 2007-11-12 11:08:10 UTC
*** Bug 375191 has been marked as a duplicate of this bug. ***

Comment 2 Adam Tkac 2007-11-12 11:24:25 UTC
In previous Fedoras exists package called "bind-sdb". It was standard named +
compiled in database backends. I've merged bind + bind-sdb to one package.
Reasons are easier configuration and easier maintenance. Yes, I know named needs
database servers client libraries but I don't think that matter. If you have any
arguments why database backend should be in separate package (please not "I need
+10MB of disk space" - nowaday it is not argument). I'm going to replace mysql +
postgresql + other DBs dependencies with *-libs packages. Update will be
released when 9.5.0-a7 comes (should be during 2 weeks).

Comment 3 Enrico Scholz 2007-11-12 18:16:04 UTC
I need +10MB of disk space ;)

Standard reason: MySQL + PostgreSQL are non trivial dependencies which are not
required by named's core functionality.  Every additional + unneeded bit of code 

* requires additional disk space
* requires special attention regarding security issues
* can/will cause problems during updates

Comment 4 Jordan Russell 2007-11-13 09:11:08 UTC
I'm primarily worried about conflicts with the MySQL-* packages from mysql.com I
already have installed. Before now, nothing depended on Fedora's mysql-* packages.

> I'm going to replace mysql +
> postgresql + other DBs dependencies with *-libs packages.

Actually, instead of depending on "mysql-libs" specifically, could it be made to
depend on "libmysqlclient.so.XX", like the "php-mysql" package currently does?
This should allow any vendor's MySQL packages to satisfy the dependency.

Comment 5 Adam Tkac 2007-11-13 11:59:35 UTC
(In reply to comment #3)
> I need +10MB of disk space ;)

I expected answer like this :)
 
> Standard reason: MySQL + PostgreSQL are non trivial dependencies which are not
> required by named's core functionality.  Every additional + unneeded bit of code 
> 
> * requires additional disk space
Yes, but nowadays it doesn't matter

> * requires special attention regarding security issues
- I disagree with you. If you have compiled in database backend and you doesn't
use it that part of code is never executed. And if yes it means that named code
already has been exploited on different place. And if this happen (pretty
unlikely) named without database libs can't save you.

> * can/will cause problems during updates

Comment 6 Adam Tkac 2007-11-13 12:01:32 UTC
(In reply to comment #4)
> 
> > I'm going to replace mysql +
> > postgresql + other DBs dependencies with *-libs packages.
> 
> Actually, instead of depending on "mysql-libs" specifically, could it be made to
> depend on "libmysqlclient.so.XX", like the "php-mysql" package currently does?
> This should allow any vendor's MySQL packages to satisfy the dependency.

Yes, the best solution.

Comment 7 Enrico Scholz 2007-11-13 14:12:53 UTC
>> * requires additional disk space
> Yes, but nowadays it doesn't matter

it matters... nowadays, most servers are virtualized and have only one service
per instance.  10MB can be 5% of the really needed space and such a waste is
nothing which I can accept.

And... often the -libs have additional deps resp. these deps are out of control
of the original packager. So, you will probably end with more than 10MB.

Hence, please follow the principle to split non-trivial deps into own
subpackages when they are not needed for core functionality.


Comment 8 Enrico Scholz 2007-11-13 14:17:17 UTC
I forgot:  most of explicit Requires: are bad.  rpm does an excellent job in
detecting required libs so Requires: should be written sparely.  Please use
'comps.xml' to specify use-cases.

Comment 9 Adam Tkac 2007-11-15 12:45:13 UTC
I've pushed bind-9.5.0-17.a7.fc8 to updates-testing. In the end I moved database
backends to bind-sdb. So if you need named with DB you should only install
bind-sdb package. bind-sdb also has no explicit dependencies to mysql-libs etc

Comment 10 Fedora Update System 2007-11-16 00:40:06 UTC
bind-9.5.0-17.a7.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update bind'

Comment 11 Fedora Update System 2007-11-20 17:50:37 UTC
bind-9.5.0-18.a7.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update bind'

Comment 12 Jordan Russell 2007-11-21 04:02:52 UTC
Works for me. Thanks.

Comment 13 Fedora Update System 2007-11-22 03:30:44 UTC
bind-9.5.0-18.a7.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.