Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 02 Jul 2020, 16:11
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
Libraries NOT stripped by new2dir make install
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [2 Posts]  
Author Message
OscarTalks


Joined: 05 Feb 2012
Posts: 2197
Location: London, England

PostPosted: Wed 02 Oct 2019, 08:21    Post subject:  Libraries NOT stripped by new2dir make install
Subject description: Please test this fix
 

I quite like compiling and creating .pet packages but for years I have found that although the executable binaries get stripped, the shared libraries do not. I have to inspect these files and strip them manually before finally creating my .pet package.

So I am now testing the following possible fix and perhaps others would like to do the same.
In the file /usr/bin/new2dir
Look for the section:-
Code:
#strip the file...
 if [ ! -h "$ONEFILE" ];then #make sure it isn't a symlink
  [ ! "`file "$ONEFILE" | grep 'ELF' | grep 'shared object'`" = "" ] && strip --strip-debug "$ONEFILE"
  [ ! "`file "$ONEFILE" | grep 'ELF' | grep 'executable'`" = "" ] && strip --strip-unneeded "$ONEFILE"
 fi

Change the argument --strip-debug to --strip-unneeded
(Same as the argument being used for executables)
So it looks like this:-
Code:
#strip the file...
 if [ ! -h "$ONEFILE" ];then #make sure it isn't a symlink
  [ ! "`file "$ONEFILE" | grep 'ELF' | grep 'shared object'`" = "" ] && strip --strip-unneeded "$ONEFILE"
  [ ! "`file "$ONEFILE" | grep 'ELF' | grep 'executable'`" = "" ] && strip --strip-unneeded "$ONEFILE"
 fi

The shared (dynamic) libraries installed into your system, plus the copies which will be used to create the .pet or .sfs package should then be already stripped. Right-click and look at properties to verify.

_________________
Oscar in England

Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 6365
Location: King's Lynn, UK.

PostPosted: Wed 02 Oct 2019, 09:46    Post subject:  

Thanks for that, Oscar. I, too, have often wondered why packages weren't coming out as small as I felt they ought to have done.

Now we know why......

Cheers for the "detective work", mate! This should work with Trio's PetMaker, too (which I use a lot), since when all's said & done, it's still using the standard Puppy package tools 'under the hood'. Nice one.


Mike. Wink

_________________
MY 'PUPPY' PACKAGES

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Bugs ( Submit bugs )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0320s ][ Queries: 11 (0.0069s) ][ GZIP on ]