From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Q0YP3-0007gZ-TA for garchives@archives.gentoo.org; Fri, 18 Mar 2011 12:03:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7D0EB1C043 for ; Fri, 18 Mar 2011 12:03:37 +0000 (UTC) Received: from mail1.nippynetworks.com (mail1.nippynetworks.com [91.220.24.129]) by pigeon.gentoo.org (Postfix) with ESMTP id 307441C002 for ; Fri, 18 Mar 2011 11:41:59 +0000 (UTC) Received: from localhost (mail1.nippynetworks.com [127.0.0.1]) by mail1.nippynetworks.com (Postfix) with ESMTP id 5C5B5340313 for ; Fri, 18 Mar 2011 11:41:59 +0000 (GMT) X-Virus-Scanned: amavisd-new at nippynetworks.com Received: from mail1.nippynetworks.com ([127.0.0.1]) by localhost (mail1.nippynetworks.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id jqwoJc8Oi1gN for ; Fri, 18 Mar 2011 11:41:59 +0000 (GMT) Received: from Ed-Wildgooses-MacBook-Pro.local (office.nippynetworks.com [212.69.49.94]) (Authenticated sender: edward@wildgooses.com) by mail1.nippynetworks.com (Postfix) with ESMTPSA id 0B74D340312 for ; Fri, 18 Mar 2011 11:41:59 +0000 (GMT) Message-ID: <4D834506.5000605@wildgooses.com> Date: Fri, 18 Mar 2011 11:41:58 +0000 From: Ed W User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-embedded@lists.gentoo.org Reply-to: gentoo-embedded@lists.gentoo.org MIME-Version: 1.0 To: gentoo-embedded@lists.gentoo.org Subject: [gentoo-embedded] Stripping down Perl install Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: X-Archives-Hash: a8eed1a166b2f6f1025c30d183a3be44 Hi, I'm trying to strip perl down as much as possible for a small embedded server. The end app will just run server type applications (and possibly a perl based web application for configuration). All modules needed will be bundled in the build so I have removed CPAN, debugger, headers, etc Another design point is that I have decided that I don't need to support locale's other than the main english, unicode (and unicode european languages). OK, so this is my INSTALL_MASK to install perl (ignore the line breaks) 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" Afterwards I then strip a huge bunch of comments out of some perl files: sed -i -e 's/^#.*//' -e '/^$/d' \ ${TARGET}/usr/lib/perl5/5.12.2/unicore/lib/*/*.pl Now that gets me down to some 20-30MB install size, but the squashfs size of the same is around 4MB (vs around 10-12MB normal). The main size reduction from here is reducing the unicode file sizes. I have had a quick hack at this above by eliminating some of the JP/KR/CN/TW stuff, but there is still some 10s MB that could be removed. I think the solution is to understand how mktables works and customise it so that it generates only the required lookup tables? Anyone got any experience or solutions? Any other ideas on shrinking the install further? (I'm a bit reluctant to strip too many core modules at this stage until the final build is decided - also most only consume a few KBs...) Thanks Ed W