Page 1 of 1

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

Posted: 19 Feb 2011, 17:46
by JMan
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.

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

Posted: 19 Feb 2011, 19:54
by Ahau
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!

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

Posted: 21 Feb 2011, 03:59
by brokenman
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

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

Posted: 02 Mar 2011, 07:18
by Issack
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.

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

Posted: 05 Mar 2011, 00:09
by brokenman
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.