[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Requires & Provides on -devel packages



On Thu, Mar 13, 2003 at 09:20:06AM +0100, Stefan van der Eijk wrote:
> >
> >
> >[snip]
> >  
> >
> >>It should be possible to find an automatic way to uncover the 
> >>relationships between the -devel packages?
> >>    
> >>
> >
> >I may have missed something, but did you have some proposal for how to
> >figure this out?  I don't have any method for doing so that is even half
> >as robust as the existing methods that work on "normal" or "library"
> >RPMS.
> >
> If I look at the contents of a -devel package you can find the following 
> files (perhaps zlib is a bad example, we can take another one later)
> 
> $ for i in `rpm -ql zlib1-devel`
>  > do
>  > file $i
>  > done
> /usr/include/zconf.h: ASCII C program text
> /usr/include/zlib.h: ASCII C program text
> /usr/include/zutil.h: ASCII C program text
> /usr/lib/libz.a: current ar archive
> /usr/lib/libz.so: symbolic link to libz.so.1.1.4
> /usr/share/doc/zlib1-devel-1.1.4: directory
> /usr/share/doc/zlib1-devel-1.1.4/ChangeLog: ISO-8859 English text
> /usr/share/doc/zlib1-devel-1.1.4/README: ASCII English text
> /usr/share/doc/zlib1-devel-1.1.4/algorithm.txt: ASCII English text
> /usr/share/man/man3/zlib.3.bz2: bzip2 compressed data, block size = 900k
> 

rpm-4.2 has (slightly filtered) file(1) output associated with files
in packages already:

bash$ rpm -q --fileclass zlib-devel
/usr/include/zconf.h    ASCII C program text
/usr/include/zlib.h     ASCII C program text
/usr/include/zutil.h    ASCII C program text
/usr/lib/libz.a current ar archive
/usr/lib/libz.so        
/usr/share/doc/zlib-devel-1.1.4 directory
/usr/share/doc/zlib-devel-1.1.4/ChangeLog       
/usr/share/doc/zlib-devel-1.1.4/algorithm.txt   ASCII English text
/usr/share/doc/zlib-devel-1.1.4/example.c       ASCII C program text
/usr/share/doc/zlib-devel-1.1.4/minigzip.c      ASCII C program text
/usr/share/man/man3/zlib.3.gz   

> I guess the symbolic link from libz.so to libz.so.1.1.4 can be used for 
> a Requires = libz.so.1.1.4. That will make the link to the zlib package, 
> without the package version information.
> 

So what is really needed is policy rules based on file path, content, and
stat(2) attributes, that are sufficiently general and complete that
partitioning files between foo and foo-devel can be reliably automated.

> Maybe the header files can be usefull. Grep through them for included 
> files. For instance:
> 
> $ fgrep include /usr/include/zconf.h
> #    include <windows.h>
> #      include <windows.h>
> #  include <sys/types.h> /* for off_t */
> #  include <unistd.h>    /* for SEEK_* and off_t */
> 
> $ fgrep include /usr/include/zlib.h
> #include "zconf.h"
>    is as in fopen ("rb" or "wb") but can also include a compression level
> 
> $ fgrep include /usr/include/zutil.h
> #include "zlib.h"
> #  include <stddef.h>
> #  include <string.h>
> #  include <stdlib.h>
> #   include <errno.h>
> #     include <alloc.h>
> #    include <malloc.h>
> #    include <unix.h> /* for fdopen */
> #  include <stdio.h>
> 
> 
> perhaps make Provides / Requires out of these included files. This is 
> not foolproof since the header files are scattered with defines...
> 

These are build, not install, dependencies. These, too, could be automagically
generated using a per-build filesystem cache that wrote a log message for
every open(2) or execve(2) path, and then converting those paths into
reliable build dependencies using policy rules.

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []