static libraries' policy: possible solution

Dmitry Butskoy buc at odusz.so-cdu.ru
Tue Nov 15 14:49:34 UTC 2005


What about the idea to ship static libraries the same way as debuginfo 
is done?

On the one hand, no more static libs will be present in most of devel 
packages. This should satisfy "no-static' guys, as no any static will be 
on CD, DVD, most of mirrors etc. (the same way as there are no debuginfo 
packages there).
On the other hand, this can satisfy "save-static" guys, as there will be 
possibility to download ready/correct static libraries for some rare 
(but needed!) purposes.

The important circumstance voting for this way is the possibility to 
make static libraries practically "automagically" (similar to way of 
debuginfo is). I have found а way, when the packager need to just 
specify "%find_static" somewhere in the %install section (the same way 
as, for example, %find_lang), and then to omit any *.a files in the 
%files sections.

For example:

%install
rm -f $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
%find_lang %{name}
%find_static

%clean
rm -f $RPM_BUILD_ROOT

after successful build, there are packages:
libfoo-0.0-1
libfoo-debuginfo-0.0-1
libfoo-devel-0.0-1
libfoo-static-0.0-1

"libfoo" and "libfoo-devel" go to standard repository, whereas 
"libfoo-debuginfo" and "libfoo-static" go to special directories on the 
primary site (i386/debug and i386/static).


The appropriate macros are in the file attached. These macros can be 
just written into /etc/rpm/macros if you want to test them in work.

Note, that I consider it as an initial attempt only, but I believe that 
at least 95% of devel packages can be successfully and easily handled 
this way.


Dmitry Butskoy



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: macros-staticlibs
URL: <http://listman.redhat.com/archives/fedora-extras-list/attachments/20051115/32c93413/attachment.ksh>


More information about the fedora-extras-list mailing list