[lsb-discuss] Adding dependency on "lsb" causes huge downloads

Dennis Gilmore dennis at ausil.us
Fri Feb 26 06:30:40 PST 2010


On Friday 26 February 2010 03:48:30 am Johannes Meixner wrote:
> Hello,
> 
> On Feb 25 19:26 Craig Scott wrote (shortened):
> > There's another option to consider, one which could be considered
> > complimentary rather than an alternative. The LSB already uses RPM as
> > it's packaging system, so is it possible to improve/use RPM itself to
> > work out package dependencies based on actual files that need to be
> > present rather than higher level package names? As Till states, distros
> > give differing names to packages, so as an ISV, I can't reliably put
> > package names as dependencies in our RPM's. What I can do, however, is
> > provide a list of files (typically libraries and/or executables, but
> > could also be other things) which must be present in order for my
> > package to function properly.
> 
> First of all: I am really no RPM expert.
> 
> Nevertheless I like to share what I observed right now
> on my openSUSE 11.1 workstation - perhaps it might be
> useful for further discussion:
> 
> -------------------------------------------------------------------
> # rpm -q --provides cups
> cups = 1.3.9-7.9

sounds like something is wrong with your rpm  on one of my fedora 12 machines 
i get 
rpm -q --provides cups
/usr/bin/cancel  
/usr/bin/lp  
/usr/bin/lpq  
/usr/bin/lpr  
/usr/bin/lprm  
/usr/bin/lpstat  
config(cups) = 1:1.4.1-13.fc12
cupsddk = 1.2.3-7
cupsddk-drivers = 1.2.3-7
lpd  
lpr  
cups = 1:1.4.1-13.fc12
cups(sparc-32) = 1:1.4.1-13.fc12

> -------------------------------------------------------------------
> 
> On the first glance it seems our RPM package "cups" provides nothing
> (except its own package name) but for example when I do this:

<snip> 
> -------------------------------------------------------------------
> Now it seems our RPM package "cups" provides all its files.
the rpm owns all the files it provides and should also own all the directories 
it creates.

> 
> At least in our Novell/Suse RPM spec files we often use e.g.
>    Requires: /bin/sed
>    Requires: %{_bindir}/perl
>    Requires: %{_bindir}/python
> 
> Therefore I assume RPM packages provide exectuables (or at least
> files in the usual "bin" directories) but perhaps RPM packages
> provide usually even all its files.
something has to provide the files,  this is so you can do something like "yum 
install /usr/bin/foo" this is true for any file provided by any package, on 
fedora based distros you will be subect to downloading the full filelist 
metadata,  but its a viable option.   rpms also provide there shared objects  
so you can do something like "yum install libproxy.so.0" or "yum install 
libproxy.so.0\(\)\(64bit\)"  

> 
> 
> -------------------------------------------------------------------
> # rpm -q --whatprovides /usr/bin/perl
> perl-base-5.10.0-62.10
> 
> # rpm -q --provides perl-base | grep bin
> [no output]
> -------------------------------------------------------------------
> 
> What is strange here is that "rpm -q --provides package_name"
> does not list what "rpm -q --whatprovides capability" shows
> so that I wonder if and how it can work for the various package
> installation end-user frontend tools when a package may have e.g.
>    Requires: /usr/share/doc/packages/cups/help/man-cupsd.html
> that then the package installation tools know that this requirement
> can be fulfilled by installing a package named "cups".
rpms can be installed using any file provided by it however on fedora and so 
rhel and centos and other derivatives you will find the man-cupsd.html file at 
/usr/share/cups/www/help/man-cupsd.html

> 
> Unfortunately the rpm man page is not clear here:
> --------------------------------------------------------------------
>    --whatprovides CAPABILITY
>        Query all packages that provide the CAPABILITY capability.
--whatprovides you pass in a file or a so  or the like 
rpm -q --whatprovides /usr/share/cups/www/help/man-cupsd.html or
rpm -q --whatprovides libproxy.so.0\(\)\(64bit\)  (note:  its escaped for the 
shell to deal with)
rpm -q --whatprovides libproxy.so.0

so your querying something you know is on your system  and want to know where   
it comes from

>    --provides
>        List capabilities this package provides.
here you query a package to see what it provides
rpm -q --provides cups
rpm -q --provides postfix

that is the difference between the two one is on files and capabilities and one 
is on packages
> --------------------------------------------------------------------
> 
> I would be interested in a RPM query option which
> lists truthfully _all_ capabilities a package provides.
there is a difference between capabilities and the files provided

what you want is 
rpm -ql --provides cups

this will give you all the capabilities and all the files.  everything in that 
output is valid and a Requires

> 
> Extend it to a more general question:
> 
> Even "dependencies based on actual files" do not fully solve
> the issue because even the actual file locations differ from
> Linux distribution to Linux distribution.
> 
> For example see above
>    Requires: /usr/share/doc/packages/cups/help/man-cupsd.html
what you need is to have a common provides 
for instance in fedora all mailservers provide server(smtp)
so this means a package needing to send email can "Require: server(smtp)" and 
know that the users favourite smtp server will be available.  

<snip>

Dennis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://lists.linux-foundation.org/pipermail/lsb-discuss/attachments/20100226/083f4c87/attachment.pgp 


More information about the lsb-discuss mailing list