ltib
[Top][All Lists]
Advanced

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

Re: [Ltib] docs, man pages, headers, static libs in rootfs


From: Stuart Hughes
Subject: Re: [Ltib] docs, man pages, headers, static libs in rootfs
Date: Wed, 02 Jun 2010 16:44:08 +0100
User-agent: Thunderbird 2.0.0.16 (X11/20080707)

Hi Fritz,

There are a few points here:

* Many packages _do_ install documentation by default and the philosophy
is to allow the package maintainer to determine the defaults.  This
being the case, the NFS rootfs usually reflects what the raw package
does for 'make install'.  So if libpng installs docs, then I think it's
better to clean them away in the jffs2/RAMDISK deploy stage.  The other
approach would require a lot of effort to provide LKC control and the
corresponding infrastructure in the .spec files.  I realises that many
rpm spec files would normally come with separate doc/dev sub-packages,
but I deliberately chose to keep them simple.

* There are exceptions.  No so much for docs, but for static/dynamic
libraries and also features that greatly increase size.  For example,
the ncurses package has an option "Install only a subset of terminal
types" to keep the size down.  Another is libc (base_libs) that allows
fine grain control of whether headers/static libraries etc are installed
(see config/userspace/libc_type.lkc).  To implement this type of scheme
take a look at config/userspace/packages.lkc and find
PKG_NCURSES_WANT_REDUCED_SET, when selected it signals an option to
ncurses.spec.  The way this works is that any symbol in the parsed
configuration that include the pattern _WANT_ or _PRECONFIG or SYSCFG_
is automatically exported in an environment variable.  So in the
ncurses.spec file you see:

if [ "$PKG_NCURSES_WANT_REDUCED_SET" = "y" ]
then
    echo "Only installing minimal terminfo, saving >5Meg"
....

* As far as the implementation goes (and don't do this for libpng, we
want the docs in the NFS area), you would control the content by
arguments to make install, rather than patching.  So normally by default
'make install' installs everything the maintainer wants by default, very
often docs/man pages etc.  If however you look in the Makefile for a
package, you'll see that the all target depends on a number of discrete
sub-targets (installlibs installexe installman installhtml for example).
 So in this hypothetical case, you could replace 'make install' with
'make installlibs installexec'.

* The way the 'deployment' remove man pages etc are hooked up are as
follows:
   1. config/userspace/deployment.lkc contains the deployment controls,
for example: "remove man pages etc from the target image", if selected,
this sets: DEPLOYMENT_RM_DOCS

   2. When ltib runs, after building if it's not an NFS only image, it
runs mk_fs_image().  This lives in bin/Ltibutils.pm.  If you look in
there you can see that if DEPLOYMENT_RM_DOCS is set, then the inline
shell script simply remove the man/info directories from the staging area:
        rm -rf $stage/usr/share/man
        rm -rf $stage/usr/info


Note that during configuration in the  Target Image Generation section,
you can specify:

 ()  remove these directories
 ()  remove these files

Each takes a space separated list, so if you know the path/names of the
files you want to zap, just add them into the appropriate list.

Regards, Stuart


Fritz Mueller wrote:
> Hi Stuart,
> 
> I can see your point about NFS.
> 
> Most packages are in the GPP are already pretty good about not
installing docs, etc. There are a few outliers though (libpng for
example I think?) I'd like to contribute back some fixes for these, so I
guess my question is which mechanism for addressing this would be most
preferred?
> 
> I think it makes sense to control doc installation on a
package-by-package basis, so the user doesn't have to manually sweep up
with the deployment options at the end. It seems that most packages
don't install doc or man pages. I guess one concrete question would be
to fix up a package that doesn't have doc installation control in its
configure script, do you think it would it be preferable to patch the
makefile to not install the doc, or is there some sort of post-install
hook in the spec file that could/should be used for this (I am
relatively new to rpm.)
> 
> I was looking for examples of how the existing "remove man pages"
deployment option was hooked up to see if I could piggy-back on that,
but I didn't see how the set config variable was being used?
> 
> For static libs and headers, I'm thinking the best way to go is to
provide explicit control of this via the LKC files, since some users may
want build environments on their target systems and some not.
> 
> Thanks much -- its a really great and capable tool, I've enjoyed
> using
it so far!
> 
>             --FritzM.
> 
> 
> On Jun 2, 2010, at 12:47 AM, Stuart Hughes wrote:
> 
>> Hi Fritz,
>>
>> To me at least it doesn't make sense to sanitise (cut-back) the NFS
>> image.  This is intended to be everything so that builds of packages
>> have all headers/libs etc available.  Also it allows derivatives (such
>> as the RAMDISK/jffs2 types) to build filtered versions.
>>
>> In LTIB if you build a non-NFS image, I think you have all the controls
>> to removed docs/man/ etc that you need?
>>
>> Regards, Stuart
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]