pack several .tgz packages in a module or remove from module

Post tutorials, HOWTO's and other useful resources here.
JMan
White ninja
White ninja
Posts: 5
Joined: 17 Jan 2011, 13:14
Location: Bulgaria

pack several .tgz packages in a module or remove from module

Post#1 by JMan » 19 Feb 2011, 17:46

I have been using Slax-Remix for some time now and becoming independat - Porteus is even better. I have looked for ways to trim the default release to my liking and removing unwanted packages from the modules was very hard untill i found this:
http://wiki.wolvix.org/CreatingModules

This is a set of instructions how to use the slackware removepkg and installpkg command from Salix (wich is also a slackware based live distro like Porteus) to create single module from many packages and to remove packages from modules. I request that someone with admin/moderotor privilages reads the post and add a similar post in FAQ for Porteus because its very usefull.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: pack several .tgz packages in a module or remove from mo

Post#2 by Ahau » 19 Feb 2011, 19:54

Thanks, JMan! That page is a useful resource.

You don't need moderator priveleges to post a HOWTO, and if you would be willing to write one based on your experience in porteus, that would be great! I'd also ask you to post it to the website documentation (or ask for permission to post it there myself).

Thanks again!
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: pack several .tgz packages in a module or remove from mo

Post#3 by brokenman » 21 Feb 2011, 03:59

Name this script rempkg, stick it in /usr/bin and run it as root. It will extract a package from running slack environment. I use a similar one to remove a package from a base module.

rempkg /var/log/packages/chosen-package-1.2.3-i486-1

Code: Select all

cd /
[ -d /tmp/wrk ] && rm -rf /tmp/wrk
mkdir /tmp/wrk
for a in `grep -A900 LIST: $1`; do
nam=${a%-*-*}
cp -Rd --parents $a /tmp/wrk
done
dir2xzm /tmp/wrk ~/Desktop/$nam.xzm
EDIT: fixed code
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Issack
White ninja
White ninja
Posts: 15
Joined: 09 Jan 2011, 19:11
Location: USA

Re: pack several .tgz packages in a module or remove from mo

Post#4 by Issack » 02 Mar 2011, 07:18

Thanks brokenman!

Usually I've been extracting base modules or regular modules to some arbitrary directory (let's say, ./tempdirectory) and using the ROOT=./tempdirectory/ upgradepkg <package name> command, then using dir2l/xzm to get a nice functioning module again.

I think I'll be using your script more often.

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: pack several .tgz packages in a module or remove from mo

Post#5 by brokenman » 05 Mar 2011, 00:09

I just fixed a slight error in above code.

There is now also a REMPKG and EXTPKG script which allows one to remove or extract a package from a base module ... or a running Porteus install. These will be included in next release and are available in download section of main website.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply