LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   First release of compat32pkg. A simple tool for managing package to format compat32.. (http://www.linuxquestions.org/questions/slackware-14/first-release-of-compat32pkg-a-simple-tool-for-managing-package-to-format-compat32-831581/)

phenixia2003 09-11-2010 02:23 PM

First release of compat32pkg. A simple tool for managing package to format compat32..
 
Hello Slacker.

First of all, sorry for my broken English.

I started writing compat32pkg late April. At the begining it was only for my personal use (and for the fun), and, it was only dedicated to automate updates of 32-bit part of the 32-bit compatibility layer (AlienBob's multilib).

Afterward, I improved it, I added some features and now, it provides all the necessary for managing (converting,installing,upgrading,remove) of 32-bit part of the multilib, and others packages which are part of Slackware-32 like firefox, seamonkey, jre,...

As I guess it could be usefull for others, I decided to publish it. So, if you want it, you can grab it at http://compat32pkg.sourceforge.net.


But before that, I guess that you want to know a bit more about it. So, let's go !

The installation of compat32pkg is done as for any Slackware package, using the command installpkg :

Code:


$ installpkg compat32pkg-0.9.100909-1_SeB.tgz

Once installed, you can use it right away. For example, if you want to know if there's updates for installed packages to format compat32 , you'll use it like that:

Code:

$ compat32pkg --mirror ftp://mirrors.kernel.org/slackware/slackware-13.1 --check-updates all
or
Code:

$ compat32pkg -m ftp://mirrors.kernel.org/slackware/slackware-13.0 -k all
When a mirror is required, this could be a local directory containing a valid Slackware tree, the URL of a Slackware mirror, or the alias (key) of one of the mirrors given into the the file /etc/compat32pkg/mirrors introduced by an "at symbol" (character @) :

Code:

$ compat32pkg --mirror ~/mirrors/slackware-13.0 --check-updates all
or
Code:

$ compat32pkg --mirror @WorldWide-13.1 --check-updates all
To avoid to have to provide a mirror each time, a default mirror can be defined into the configuration's script /etc/compat32pkg/compat32pkg.conf. To do that, you only need to assign the variable DEFAULT_MIRROR declared into this file. By default, this variable is set to "". As the argument --mirror, its value can be a local directory, an URL or the alias of one of the mirrors from /etc/compat32pkg/mirrors. When a default mirror is defined, the argument --mirror becomes optional and compat32pkg can be used like below:

Code:


$ compat32pkg --check-updates all

Now, imagine that you want to install the 32-bit part of the multilib. Yes, it's sure, AlienBob's tool massconvert32 works flawlessly, but this is just to show you what you can do with compat32pkg:

Code:


$ compat32pkg --install /etc/compat32pkg/multilib-32bit-packages.lst

packages can also be given into a comma separated list introduced by the keyword "list:", like below :

Code:


$ compat32pkg --install list:alsa-lib,mysql,mozilla-firefox

Except when explicitly said, packages can be identified :
  1. by their basenames, like alsa-lib, mysql, ...
  2. by their baserefs, like slackware/l/alsa-lib, slackware/ap/mysql
  3. by using a regular expression, like alsa-.*, patches/packages/.*

If you want to convert packages to format compat32 only, you have to use compat32pkg in mode --convert instead of --install :

Code:


$ compat32pkg --convert /etc/compat32pkg/multilib-32bit-packages.lst

The packages to format compat32 which result from the conversion process will be stored into the directory pointed by the variable COMPAT32PKG_CACHE declared into the configuration's script /etc/compat32pkg/compat32pkg.conf. By default, this variable is set to /var/cache/compat32pkg/compat-32.

compat32pkg uses another cache to store downloaded packages from mirrors. This one is controlled by the variable SLACK32PKG_CACHE which is set to /var/cache/compat32pkg/slackware-32. As these cache can grow up over time, they could be cleared, from time to time, using compat32pkg in mode --clear-cache like below :

Code:


$ compat32pkg --clear-cache compat-32
$ compat32pkg --clear-cache slackware-32
$ compat32pkg --clear-cache all

As saw at the begining, compat32pkg can be used to check availability of updates for all of installed packages to format compat32. But it can also be used to check availability of updates for a given set of packages like below :

Code:


$ compat32pkg --check-updates /etc/compat32pkg/multilib-32bit-packages.lst

$ compat32pkg --check-updates list:mozilla-firefox,alsa-lib

The use of compat32pkg in mode --check-updates will give you the number of updates found only. If you want an enumeration of these updates, use the mode --list-updates instead :

Code:


$ compat32pkg --list-updates all

When there's available updates, you can then ask compat32pkg to convert them to format compat32 or to install them using the mode --convert-updates and --upgrade like below :

Code:


$ compat32pkg --convert-updates all
$ compat32pkg --convert-updates list:mozilla-firefox
$ compat32pkg --convert-updates /etc/compat32pkg/multilib-32bit-packages.lst

$ compat32pkg --upgrade all
$ compat32pkg --upgrade list:mozilla-firefox
$ compat32pkg --upgrade /etc/compat32pkg/multilib-32bit-packages.lst


compat32pkg also offers the mode --remove which can be used to remove installed packages to format compat32. Obviously, this mode does not require a mirror :

Code:


$ compat32pkg --remove list:mozilla-.*
$ compat32pkg --remove /etc/compat32pkg/multilib-32bit-packages.lst
$ compat32pkg --remove all

compat32pkg also offers the possibility to exclude packages, permanently, or punctually :
  1. To exclude a package permanently it must be specified into the blacklist /etc/compat32pkg/blacklist.
  2. To exclude a package punctually, during an execution of compat32pkg, it must be specified in argument of the optional parameter --exclude like below :

Code:


$ compat32pkg --install list:alsa.* --exclude list:alsa-util
$ compat32pkg --convert /etc/compat32pkg/multilib-32bit-packages.lst --exclude list:patches/packages.*
$ compat32pkg --check-updates all --exclude list:mozilla-.*
$ compat32pkg --remove all --exclude ~/personal-32bit-packages.txt

Another thing that you can do with compat32pkg is to look for packages and to obtain some information about them. This is done by using compat32pkg in mode --search :

Code:


$ compat32pkg --search list:.*

The example below will give you the list of all available packages from the selected mirror and the status of the compat32 version (installed, not installed, update) of these packages.

Finally, to complete this presentation, I think it's important to know that compat32pkg logs its activity into the file /var/log/compat32pkg.log. As this file can grow up over time, it can be reset using compat32pkg in mode --reset-log :

Code:


$ compat32pkg --reset-log

You will find more detailed documentation about compat32pkg here,
into the README file which is part of the compat32pkg package, and into its man pages:

Code:


  $ man compat32pkg
  $ man compat32pkg.conf

Hoping that compat32pkg will be useful.

Cheers.

--
SeB

Drakeo 09-12-2010 09:49 AM

wanted to look at your scripts but your link is down

phenixia2003 09-12-2010 11:20 AM

Quote:

Originally Posted by Drakeo (Post 4095122)
wanted to look at your scripts but your link is down

Sorry for that. I updated my post and added links to other mirrors. Hoping it will work for you this time.


Cheers.
--
SeB

H_TeXMeX_H 09-12-2010 03:22 PM

I don't use the compat32 libs now, but this may come in handy should I even chose to use them. Thanks.

Alien Bob 09-15-2010 05:35 AM

You put quite a lot of work in this, nice.
Something to strike off my own TODO list then :-)

Eric

Drakeo 09-16-2010 09:04 AM

Good work having fun with it. thank you.

phenixia2003 09-16-2010 02:59 PM

Hello,

Quote:

Originally Posted by Alien Bob (Post 4098031)
You put quite a lot of work in this, nice.
Something to strike off my own TODO list then :-)
Eric

Yes, and this took me long time to achieve what I wanted, but it was also funny to do it even if I do programming for a long time.

Happy to have helped a bit :-)

Quote:

Originally Posted by Drakeo (Post 4099399)
Good work having fun with it.

Happy to read this too. It was done, a bit, for this. ;-)

__________________________________________________________

To not spamming the forum, I wanted to say here that compat32pkg has moved to sourceforge.

The project page address is http://sourceforge.net/projects/compat32pkg/ and the project website is http://compat32pkg.sourceforge.net/.

--
SeB

H_TeXMeX_H 09-16-2010 03:01 PM

That's a good decision, that's a much better place to host it.

NightSky 09-23-2010 02:23 PM

All links working, just downloaded convertpkg! What does 'SeB'in SeB.tgz stand for? Interesting google results ;)

Thank you sooo much for your awsome hard work and its donation, this program will make setting up slackware64 multilib so much easier to organize, maintain and keep clean. Great tool to transition into full 64, if and when all programs and apps become 64bit. Super tool to learn with. Excellent complement to Alien's Brilliant hard multilib OS and convert compat32! Are you two related? LOL

Your illustrated instructions have crystalized my understanding of the convertpkg-compat32 function which I was grappling with "I'm a non techie learner".

FYI no need to apologize for your english and if you ever want someone to help edit your technical notes- i would be more than happy to do so in exchange for the learning value. The instructive organization of your site is sorely needed in the linux community.
I happily speak broken German :) Read alien's docs over and over all night long. lol I am available to anyone in Slackware community who needs technical writing and editing support to create, maintain or update instructional documentation with emphasis on 'instructional clarity'. lol

Scott271 09-23-2010 10:06 PM

Ok, I'm still trying to wrap my head around this whole multilib thing. I've got 13.1 set up multilib (no problems there), I think I need some clarification on the update process. I understand what this compat32pkg does, and I want to use; but do I run this first to update the compat32 packages or do I do a regular (64bit) update first?

Thanks in advance,
Scott

phenixia2003 09-24-2010 04:59 AM

Hello,

Quote:

Originally Posted by NightSky (Post 4106941)
All links working, just What does 'SeB'in SeB.tgz stand for? Interesting google results ;)

"SeB", is only the diminutive in French of my first name, which I use also as signature in forums, and which I used long time ago in score tables of some old video games like pacman,galaga, tetris,klax,.... Nothing to do with the French manufacturer... ;)

Quote:

Originally Posted by NightSky (Post 4106941)
Thank you sooo much for your awsome hard work and its donation, this program will make setting up slackware64 multilib so much easier to organize, maintain and keep clean. Great tool to transition into full 64, if and when all programs and apps become 64bit. Super tool to learn with. Excellent complement to Alien's Brilliant hard multilib OS and convert compat32! Are you two related?

Thanks for these positive and enthusiast feedback.

Quote:

Originally Posted by NightSky (Post 4106941)
if you ever want someone to help edit your technical notes- i would be more than happy to do so in exchange for the learning value.

Sure, if you find something incorrect in my technical notes, you can help me by correcting them, and by posting these corrections in the bugs section here (you must be registered at sourceforge.net)

Cheers.

--
SeB

phenixia2003 09-24-2010 04:59 AM

Hello,

Quote:

Originally Posted by Scott271 (Post 4107235)
I think I need some clarification on the update process [...] do I run this first to update the compat32 packages or do I do a regular (64bit) update first?

No need to do a regular (64bit) update prior to update installed compat32 packages. Simply do the following :

Code:

$ compat32pkg --mirror @USA-13.1 --upgrade all
    OR
$ compat32pkg --mirror @USA-13.0 --upgrade all

This will automatically look for available updates on the given mirror, download them, convert them to format compat32 and install the resulting packages.

You can achieve the same by setting the variable DEFAULT_MIRROR to "@USA-13.1" or "@USA-13.0" (or to the best mirror for you) in /etc/compat32pkg/compat32pkg.conf and then execute compat32pkg as follow :

Code:

$ compat32pkg --upgrade all
I Hope this will help you.

Cheers.

--
SeB

Scott271 09-24-2010 08:02 AM

Thanks SeB. That clears it up.

Scott


All times are GMT -5. The time now is 10:25 AM.