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 Fri 20 Sep 2019, 19:17
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
PPM_links-15.1.tar - hacked versions of some PPM files
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [2 Posts]  
Author Message
gyro

Joined: 28 Oct 2008
Posts: 1632
Location: Brisbane, Australia

PostPosted: Thu 01 Aug 2019, 08:09    Post subject:  PPM_links-15.1.tar - hacked versions of some PPM files
Subject description: Respects symbolic links, uninstalled files simply disappear.
 

The attached file 'ppm_links-15.tar' contains files that patch the Puppy Package Manager so that it behaves as outlined below.
It contains 5 files:

'./usr/local/petget/installpkg.sh'

1. Respects all symbolic links to directories in the local file system.
So on my xenialpup '/usr/lib/i386-linux-gnu/libassuan.so.0.7.2' is written as '/usr/lib/libassuan.so.0.7.2',
'/tmp/x.txt' is written as '/initrd/mnt/zram0/tmp/x.txt'.

2. Ignores 'PUPMODE' and writes all files to the '/' file system. Same for "frugal install" and "full install".
So doesn't muck around with whiteout files or stack layers.

3. Extracts all source formats to a directory in /tmp.
Produces a list of the contents of this directory as the '.files' file.
Processes each entry in the '.files' file.

'./usr/local/petget/removepreview.sh'

1. Processes each entry in the '.files' file, in reverse order, so that files get removed before the containing directory.
If a processed directory is empty in the local file system, it is removed.

2. Removes files from the '/' file system, respecting any symbolic links to directories in the local file system.

3. After removing a file/directory it checks if this actiion produced a whiteout file in the RW directory, directly.
If it's an "aufs" stack, any whiteout file is removed from the RW directory, directly.
If it's an "overlayfs" stack, the full real path to the whiteout file is written to an "exclude file" so that the file will be excluded from the RW directory during the next reboot.
If it's a "full install", no whiteout files should be detected.

'./usr/local/mi-utils/dir2list'
A CLI utility to echo a list of directories and files contained in a directory.
Run without parameters to see usage help.
The included 'installpkg.sh' redirects the output of this utility to the '.files' file.

'./usr/local/mi-utils/save-add'
A CLI utility to write specified files from a specified directory to the '/' file system.
Run without parameters to see usage help.
The included 'installpkg.sh' calls this utility to do the actual file writing and directory creation.

'./usr/local/mi-utils/save-remove'
A CLI utility to remove specified files from the '/' file system.
Run without parameters to see usage help.
The included 'removepreview.sh' calls this utility to do the actual removing.

To use:
Either, extract somewhere and then copy the 5 files to their appropriate locations.
or
Code:
tar xf ppm_links-15.tar -C /


Note1:
While the second method is simpler, I don't recommend doing this on your production Puppy.

Note 2:
I have not provided a '.pet' file, since this is clobbering the actual file executed to install a '.pet'.

gyro
ppm_links-15.tar
Description  Extract contents to use.
tar

 Download 
Filename  ppm_links-15.tar 
Filesize  12.62 KB 
Downloaded  43 Time(s) 

Last edited by gyro on Sun 04 Aug 2019, 06:58; edited 1 time in total
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1632
Location: Brisbane, Australia

PostPosted: Sun 04 Aug 2019, 06:52    Post subject: PPM_links-15.1.tar - hacked versions of some PPM files
Subject description: Respects symbolic links, uninstalled files simply disappear.
 

Fixes an issue when used with an "overlayfs" stack.

Changes:
The attached file 'ppm_links-15-1.tar' contains an extra file, './usr/local/mi-utils/save-exclude'.
The file './usr/local/petget/removepreview.sh' is modified.
The file './usr/local/mi-utils/save-remove' is modified.

'./usr/local/mi-utils/save-exclude'
A CLI utility to exclude specified files from the '/' file system.
Run without parameters to see usage help.
The included 'removepreview.sh' calls this utility to get rid of files in an "overlayfs" stack.

The updated './usr/local/petget/removepreview.sh',
now calls './usr/local/mi-utils/save-exclude' for an "overlayfs" stack,
but './usr/local/mi-utils/save-remove', otherwise.

'./usr/local/mi-utils/save-remove'
Now removes files from only an "aufs" stack, (or "full install").

The acid test is to install a '.pet' containing '/etc/rc.d/rc.shutdown', no problems anywhere.
But uninstalling this pet with 'ppm_links.15' in an "overlayfs" stack is a problem,
at shutdown the whiteout file for '/etc/rc.d/rc.shutdown' is still in place, no 'rc.shutdown', big problem.

This is all because directly modifying any layer in an "overlayfs" stack is forbidden.
While 'save-remove' can directly remove the whiteout files from the RW layer of an "aufs" stack.

To use:
Either, extract somewhere and then copy the 6 files to their appropriate locations.
or
Code:
tar xf ppm_links-15-1.tar -C /


Note1:
While the second method is simpler, I don't recommend doing this on your production Puppy.

Note 2:
I have not provided a '.pet' file, since this is clobbering the actual file executed to install a '.pet'.

gyro
ppm_links-15.1.tar
Description  Extract to use.
tar

 Download 
Filename  ppm_links-15.1.tar 
Filesize  12.77 KB 
Downloaded  34 Time(s) 
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 » Advanced Topics » Cutting edge
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.0374s ][ Queries: 12 (0.0115s) ][ GZIP on ]