Mailing List Archive

Suggestion for INSTALL_MASK
Hi there

I'm looking for a 'good' INSTALL_MASK file/definition to use with my
embedded system. As the flash on the boards is rather small I only want
to have the really required files on it.
Can anyone share his INSTALL_MASK?

Thanks in advance
Martin
Re: Suggestion for INSTALL_MASK [ In reply to ]
2011/3/7 Martin Gysel <m.gysel@gmx.ch>:
> Hi there
>
> I'm looking for a 'good' INSTALL_MASK file/definition to use with my
> embedded system. As the flash on the boards is rather small I only want
> to have the really required files on it.
> Can anyone share his INSTALL_MASK?
>
> Thanks in advance
> Martin

Hi. Sorry for off-topic but did you try FEATURES="$FEATURES noman noinfo
nodoc"? Also, I think that is is better to clean up the system just before
deployment when during installation. This way, you should be able to remove all
/usr/lib/*la and /usr/lib/pkgconfig/* that you just can't delete while
building the system.

Sergey.
Re: Suggestion for INSTALL_MASK [ In reply to ]
On Mon, 2011-03-07 at 14:50 +0100, Martin Gysel wrote:
> Hi there
>
> I'm looking for a 'good' INSTALL_MASK file/definition to use with my
> embedded system. As the flash on the boards is rather small I only want
> to have the really required files on it.
> Can anyone share his INSTALL_MASK?
>
> Thanks in advance
> Martin

For a read-only compat flash based system and ~10 or so pkgs. I've used
*.a *.o *.la /usr/include *.pc *.pyc *.pyo *.example *.sample

Clearly you can nail it down abit more for your own needs. But for mine
that was fairly good to grab the majorituy of the bloat.

--
solar <solar@gentoo.org>
Gentoo Linux
Re: Suggestion for INSTALL_MASK [ In reply to ]
Am 08.03.2011 04:46, schrieb solar:
> For a read-only compat flash based system and ~10 or so pkgs. I've used
> *.a *.o *.la /usr/include *.pc *.pyc *.pyo *.example *.sample
>
> Clearly you can nail it down abit more for your own needs. But for mine
> that was fairly good to grab the majorituy of the bloat.

solar thx,
I'll give it a try

/martin
Re: Suggestion for INSTALL_MASK [ In reply to ]
On 03/07/2011 07:46 PM, solar wrote:
> On Mon, 2011-03-07 at 14:50 +0100, Martin Gysel wrote:
>> Hi there
>>
>> I'm looking for a 'good' INSTALL_MASK file/definition to use with my
>> embedded system. As the flash on the boards is rather small I only want
>> to have the really required files on it.
>> Can anyone share his INSTALL_MASK?
>>
>> Thanks in advance
>> Martin
> For a read-only compat flash based system and ~10 or so pkgs. I've used
> *.a *.o *.la /usr/include *.pc *.pyc *.pyo *.example *.sample
>
> Clearly you can nail it down abit more for your own needs. But for mine
> that was fairly good to grab the majorituy of the bloat.
>

Related to this... Does anyone know if the PKG_INSTALL_MASK functionality is
broken? It seems to function exactly the same as INSTALL_MASK. The make.conf
man page says PKG_INSTALL_MASK applies only when creating a binary package.

I'm a relative newbie, but my thinking (consistent with my understanding of the
docs and wisdom gleaned from this list) was to maintain a cross development tree
on my build host with everything installed, including all the build deps
(libraries, header files, etc), while at the same time building binary packages
for what will go onto the target filesystem, using PKG_INSTALL_MASK to filter
out unwanted header files, etc from the binary packages. Then I can create my
lean target filesystem from the binary packages with the
'--root=/target/filesystem' emerge option. But PKG_INSTALL_MASK seems to apply
to my development tree as well. Am I missing anything?

Thanks,
Mike
Re: Suggestion for INSTALL_MASK [ In reply to ]
>
> Related to this... Does anyone know if the PKG_INSTALL_MASK functionality is
> broken? It seems to function exactly the same as INSTALL_MASK. The make.conf
> man page says PKG_INSTALL_MASK applies only when creating a binary package.
>
> I'm a relative newbie, but my thinking (consistent with my understanding of the
> docs and wisdom gleaned from this list) was to maintain a cross development tree
> on my build host with everything installed, including all the build deps
> (libraries, header files, etc), while at the same time building binary packages
> for what will go onto the target filesystem, using PKG_INSTALL_MASK to filter
> out unwanted header files, etc from the binary packages. Then I can create my
> lean target filesystem from the binary packages with the
> '--root=/target/filesystem' emerge option. But PKG_INSTALL_MASK seems to apply
> to my development tree as well. Am I missing anything?


Hmm, interesting - that might explain why INSTALL_MASK appears to do
nothing at all for me...

I suspect (untested) that if you "emerge -k" with FEATURES="buildpkgs"
then internally portage is building the package and installing the
package? Hence the PKG_INSTALL_MASK will take effect?

Just an idea... (off to test it)

Ed W
Re: Suggestion for INSTALL_MASK [ In reply to ]
On 08/03/2011 03:46, solar wrote:
> On Mon, 2011-03-07 at 14:50 +0100, Martin Gysel wrote:
>> Hi there
>>
>> I'm looking for a 'good' INSTALL_MASK file/definition to use with my
>> embedded system. As the flash on the boards is rather small I only want
>> to have the really required files on it.
>> Can anyone share his INSTALL_MASK?


>
> For a read-only compat flash based system and ~10 or so pkgs. I've used
> *.a *.o *.la /usr/include *.pc *.pyc *.pyo *.example *.sample
>
> Clearly you can nail it down abit more for your own needs. But for mine
> that was fairly good to grab the majorituy of the bloat.

OK, here's my current mask. Note this is for a run only system, I build
the image elsewhere so no portage stuff required on the final image (I
do something like build the root, then strip that down a little further
by rsync'ing to the final target)


export INSTALL_MASK="usr/include/ usr/portage usr/share/doc
usr/share/gtk-doc usr/share/info usr/share/man var/cache/ var/db/pkg
var/lib/gentoo var/lib/portage *.a *.o .keep_* *.la *.pc *.pyc *.pyo
*.example *.sample"


Additionally I am playing with this for installing perl:

export INSTALL_MASK="${INSTALL_MASK} */usr/lib/perl5/*.h
usr/lib/perl5/5.*/ExtUtils/ usr/lib/perl5/5.*/CPAN/
usr/lib/perl5/5.*/CPANPLUS/ usr/lib/perl5/5.*/*-linux-*/auto/Encode/JP
usr/lib/perl5/5.*/*-linux-*/auto/Encode/KR
usr/lib/perl5/5.*/*-linux-*/auto/Encode/CN
usr/lib/perl5/5.*/*-linux-*/auto/Encode/TW
usr/lib/perl5/5.*/*-linux-*/Devel/
usr/lib/perl5/5.*/*-linux-*/auto/Devel/
usr/lib/perl5/5.*/Module/CoreList.pm usr/lib/perl5/5.*/Module/Build*
usr/lib/perl5/5.*/perl5db.pl usr/lib
/perl5/5.*/[Pp]od usr/lib/perl5/5.*/unicore/mktables
usr/lib/perl5/5.*/unicore/TestProp.pl */usr/lib/perl5/5.*/unicore/*.txt
*/usr/lib/perl5/*.pod"

I then strip a bunch of comments out of some perl files:
sed -i -e 's/^#.*//' -e '/^$/d'
${TARGET}/usr/lib/perl5/5.12.2/unicore/lib/*/*.pl


and finally build the target with something like:

rsync -aH --progress --delete --delete-excluded \
--exclude 'usr/portage/*' \
--exclude 'var/db/pkg' \
--exclude 'var/cache/*' \
--exclude 'var/lib/portage' \
--exclude 'var/lib/gentoo' \
${ROOT}/ ${TARGET}


Using squashfs + aufs2 (stackable squashfs so I can add more stuff
later) that gets me a fairly decent base installation including routing,
wireless, shorewall, perl and some more, in under 10MB

Good luck

Ed W
Re: Suggestion for INSTALL_MASK [ In reply to ]
On Tue, 2011-03-15 at 20:59 +0000, Ed W wrote:
> On 08/03/2011 03:46, solar wrote:
> > On Mon, 2011-03-07 at 14:50 +0100, Martin Gysel wrote:
> >> Hi there
> >>
> >> I'm looking for a 'good' INSTALL_MASK file/definition to use with my
> >> embedded system. As the flash on the boards is rather small I only want
> >> to have the really required files on it.
> >> Can anyone share his INSTALL_MASK?
>
>
> >
> > For a read-only compat flash based system and ~10 or so pkgs. I've used
> > *.a *.o *.la /usr/include *.pc *.pyc *.pyo *.example *.sample
> >
> > Clearly you can nail it down abit more for your own needs. But for mine
> > that was fairly good to grab the majorituy of the bloat.
>
> OK, here's my current mask. Note this is for a run only system, I build
> the image elsewhere so no portage stuff required on the final image (I
> do something like build the root, then strip that down a little further
> by rsync'ing to the final target)
>
>
> export INSTALL_MASK="usr/include/ usr/portage usr/share/doc
> usr/share/gtk-doc usr/share/info usr/share/man var/cache/ var/db/pkg
> var/lib/gentoo var/lib/portage *.a *.o .keep_* *.la *.pc *.pyc *.pyo
> *.example *.sample"
>
>
> Additionally I am playing with this for installing perl:
>
> export INSTALL_MASK="${INSTALL_MASK} */usr/lib/perl5/*.h
> usr/lib/perl5/5.*/ExtUtils/ usr/lib/perl5/5.*/CPAN/
> usr/lib/perl5/5.*/CPANPLUS/ usr/lib/perl5/5.*/*-linux-*/auto/Encode/JP
> usr/lib/perl5/5.*/*-linux-*/auto/Encode/KR
> usr/lib/perl5/5.*/*-linux-*/auto/Encode/CN
> usr/lib/perl5/5.*/*-linux-*/auto/Encode/TW
> usr/lib/perl5/5.*/*-linux-*/Devel/
> usr/lib/perl5/5.*/*-linux-*/auto/Devel/
> usr/lib/perl5/5.*/Module/CoreList.pm usr/lib/perl5/5.*/Module/Build*
> usr/lib/perl5/5.*/perl5db.pl usr/lib
> /perl5/5.*/[Pp]od usr/lib/perl5/5.*/unicore/mktables
> usr/lib/perl5/5.*/unicore/TestProp.pl */usr/lib/perl5/5.*/unicore/*.txt
> */usr/lib/perl5/*.pod"
>
> I then strip a bunch of comments out of some perl files:
> sed -i -e 's/^#.*//' -e '/^$/d'
> ${TARGET}/usr/lib/perl5/5.12.2/unicore/lib/*/*.pl
>
>
> and finally build the target with something like:
>
> rsync -aH --progress --delete --delete-excluded \
> --exclude 'usr/portage/*' \
> --exclude 'var/db/pkg' \
> --exclude 'var/cache/*' \
> --exclude 'var/lib/portage' \
> --exclude 'var/lib/gentoo' \
> ${ROOT}/ ${TARGET}
>
>
> Using squashfs + aufs2 (stackable squashfs so I can add more stuff
> later) that gets me a fairly decent base installation including routing,
> wireless, shorewall, perl and some more, in under 10MB


Spiffy. You can reduce that command line some more by simply using *.h

*.la is mostly safe, but there can be a gotcha with it when a program
links with ltdl.


--
solar <solar@gentoo.org>
Gentoo Linux