Bug 7313 - SC7 RPM depends on mysqld_safe which is called safe_mysqld on some systems
: SC7 RPM depends on mysqld_safe which is called safe_mysqld on some systems
Status: RESOLVED WONTFIX
Product: Logitech Media Server
Classification: Unclassified
Component: RPM
: 7.0
: PC Other
: P5 normal (vote)
: 7.x
Assigned To: Mark Miksis
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-24 12:22 UTC by Ivan Adzhubey
Modified: 2009-07-31 10:17 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Adzhubey 2008-02-24 12:22:05 UTC
The summary tells it all. My Linux distribution (www.altlinux.com) does not have 
mysqld_safe file, it has safe_mysqld instead included in MySQL-server package.
The two filenames are aliases (see man mysqld_safe) and are freely interchanged
by various flavors of MySQL builds, so they should not be used as requirement
in RPM package. This prevents me from installing SC7 from RPM, even if I create
the required file by symlinking mysqld_safe to safe_mysqld.
Comment 1 Blackketter Dean 2008-02-24 12:45:52 UTC
Matt: what do you think?
Comment 2 Blackketter Dean 2008-02-24 12:46:16 UTC
Sorry, this is not a show-stopper for 7.0, will look at it for 7.0.1
Comment 3 Mark Miksis 2008-02-24 21:26:00 UTC
Matt,  feel free to assign this to me if you want.  I'm aware of this issue and afaik it only affects altlinux.  I'll look into it further.  

Some background:  The SC RPM doesn't really even use mysqld_safe.  The reason for this odd dependency is to support both RH/Fedora and SUSE with the same RPM.  These distributions package mysqld into different package names (and place the binary in different locations).  I chose /usr/bin/mysql_safe as the best thing I could find common between the two distro's packages.  I'll try to find a solution that also accommodates altlinux.  The only other alternative I know of is to provide different RPMs for the various RPM based distros.  This would be confusing at best...
Comment 4 Matt Wise 2008-03-14 09:25:41 UTC
We should be able to search for either mysqd_safe or safe_mysqld... Fletch can you check on that possibility? 
Comment 5 Mark Miksis 2008-03-14 11:00:33 UTC
(In reply to comment #4)
> We should be able to search for either mysqd_safe or safe_mysqld... Fletch can
> you check on that possibility? 
> 

Yeah, there's no way to do that.  The RPM requires line has no concept of "or".  I'll try to find a different file to depend on that doesn't break anything else.  Sorry I haven't really worked on this yet, but I'm hoping to come up with a solution that also works with Mandrake.  I'm afraid that the only real solutions may be:

1) Build different RPMs for different distros
or
2) Just try to support the major distros and document other workarounds in the wiki.  I've recently updated the wiki to do this fairly well.
Comment 6 Ivan Adzhubey 2008-03-15 23:43:40 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > We should be able to search for either mysqd_safe or safe_mysqld... Fletch can
> > you check on that possibility? 
> > 
> 
> Yeah, there's no way to do that.  The RPM requires line has no concept of "or".
>  I'll try to find a different file to depend on that doesn't break anything
> else.  Sorry I haven't really worked on this yet, but I'm hoping to come up
> with a solution that also works with Mandrake.  I'm afraid that the only real
> solutions may be:
> 
> 1) Build different RPMs for different distros
> or
> 2) Just try to support the major distros and document other workarounds in the
> wiki.  I've recently updated the wiki to do this fairly well.

First of all thank you guys for taking my issue seriously. I talked to AltLinux developers
on their support list and it appears that the problem is on their side: safe_mysqld was the
name of the script prior to MySQL v.4.0. MySQL switched to mysql_safe after that and stopped
providing safe_mysql as a symlink in 5.1. So safe_mysql is anachronism. Still, there might be
other distros using it (Mandrivia?). And even if AltLinux switches to mysql_safe finally,
there will be a problem with location of the file on the filesystem. As I said, AltLinux has
it under /usr/sbin/safe_mysqld, others under /usr/bin/safe_mysqld.

Unfortunately, I am not an RPM expert but there should be some way to work around this in RPM,
isn't it? After all, all that we need is to check if MySQL functionality is available. Why not
to look for mysqld executable itself? This however will not always work for the same reason --
even if filename is the same (is it? it is 'mysqld' on my system) the filesystem location can be
different (again, it is /usr/sbin/mysqld here). Is it possible to put up some script to test
several options as part of RPM preinstall section or something?

--Ivan
Comment 7 Ivan Adzhubey 2008-03-20 18:39:34 UTC
Just wanted to let you know that AltLinux had this problem fixed in the last upgrade for their MySQL package. I can now successfully install SC7 RPM in my system.

--Ivan
Comment 8 Chris Owens 2008-04-09 09:13:45 UTC
Does this mean this bug isn't needed anymore?  Or is there still a problem with our RPM package?  If so, Fletch is this something you can look at for 7.0.1 (next week timeframe) or should we push it off or re-assign?  Thanks!
Comment 9 Mark Miksis 2008-04-09 14:19:21 UTC
I haven't been able to find an easy fix for this that doesn't break one of the more popular Linux distros.  Since the reporter states that Altlinux no longer has this issue, I'm closing as WONTFIX.

I still wish there were a cleaner way to make this work for all RPM-based distros, but I just don't know of one...
Comment 10 Chris Owens 2009-07-31 10:17:40 UTC
Reduce number of active targets for SC