Page 1 of 1

multilib "load=" cheat code.

Posted: 29 Feb 2012, 21:31
by edge226
Hi, I have created my own multilib packages as follows:

multilib-x86_64.xzm - containing all required gcc and glibc packages.
compat32-x86_64.xzm - containing everything regarding compat32.

since http://ponce.cc/testing/porteus.old/modules/multilib/ states it is unsafe to build kernel required modules like vbox and that these modules will not deactivate properly I wanted to create a separate bootloader entries for 64-bit and multilib.

modifying /boot/porteus.cfg as such:

Code: Select all
LABEL kde-multilib
MENU LABEL Graphics mode (KDE multilib)
KERNEL /boot/vmlinuz
APPEND initrd=/boot/initrd.xz vga=791 changes=/porteus/ fsck vga-detect load=compat32 load=multilib
TEXT HELP
Run Porteus the best way we can.
Try to autoconfigure graphics
card and use the maximum
allowed resolution
ENDTEXT



I tried loading the multilib line, same result as the standard line. Loading compat32 and then multilib manually does work, however when trying to load the modules with ppm it says that the modules are not valid.

also when these packages are activated will it automatically detect and allow me to install 32 bit programs without other modifications?

How can I get this to load those modules properly upon boot?

Re: multilib "load=" cheat code.

Posted: 29 Feb 2012, 22:33
by Ahau
I don't know that I can answer all of your questions at the moment, since I haven't tried this for myself; that said:

First, make sure the modules you want to use with the 'load=' cheatcode are inside your /porteus/optional/ folder on your boot device, as that is where the 'load=' cheatcode will look for them (note that if you want to keep them somewhere else, you can load them with the 'extramod=' cheatcode -- more info on all cheats here: http://porteus.org/info/docs/57-general ... -them.html). Secondly, when using it with more than one module you should use a semicolon separated list (with no spaces); example: "load=compat32;multilib"

I imagine PPM is complaining because it's checking for dependencies and is receiving errors due to the fact that the binaries are compiled for 32-bit; or, it's expecting to find a /var/porteus/** file containing dependency information, which is probably missing.

Based on my less than full understanding of PPM, I don't think you'll be able to browse for 32-bit xzm packages from a 64-bit install. Brokenman will know for sure. You may be better off downloading your 32-bit packages from a 32-bit install of porteus, and dropping them into your 64-bit install and manually checking to ensure all dependencies are present (should be interesting to test how well it performs module activation in this case).

Sorry to give you a string of wishy-washy answers! I'm pretty positive I can get you up and running with the cheatcodes, and didn't want to leave you hanging altogether on the rest.

Re: multilib "load=" cheat code.

Posted: 29 Feb 2012, 23:25
by brokenman
PPM looks inside /opt/ppm for the files LIBS.TXT and PACKAGES.TXT which contain all of the available modules on the repo. If you wanted to search the 32bit repo from within 64bit you could replace these files with the ones from the 32bit repo.

PPM only looks inside the folder that you have designated as the 'storage folder'. If it is found not to be a porteus compliant module (containing a single /var/log/packages file, and /var/porteus file) then it will attempt to mount the file and run ldd against all executables and libraries.

If you've created a 'multilib' package then PPM will not support activating it as PPM did not create it (PPM only supports modules that he created or downloaded himself ... otherwise who knows what is in them?), and the 'multiple packages in one' will confuse it. A program is always is always as stupid as it's creator (which doesn't leave much hope for PPM). Having said that i see no reason to use PPM to activate a collection of multilibs. You won't need dependency resolution for the module.

Re: multilib "load=" cheat code.

Posted: 01 Mar 2012, 03:29
by edge226
brokenman,

thank you for the detailed answer.

Do you know if it would be possible to create a merged 64bit and 32bit that would allow searching and installing from both 64bit and 32bit repositories to allow a more sane multilib experience?

Re: multilib "load=" cheat code.

Posted: 01 Mar 2012, 13:21
by brokenman
Yes certainly possible, however it would require alot of rewriting within the PPM script.

You could achieve the same by writing a small script to 'swap out' the LIBS.TXT and PACKAGES.TXT for the different applications. The beauty of PPM is it is exactly the same script for both 32bit and 64bit .... and it just looks for which architecture it is working in.

First turn off auto updating in the menu option.

Make a folder with LIBS.TXT and PACKAGES.TXT from 64bit. (example: /tmp/64bit)
Make a folder with LIBS.TXT and PACKAGES.TXT from 32bit. (example: /tmp/32bit)
Make a script called ppm-switch and drop it into /usr/bin

You will run the script from a terminal with: ppm-switch 64

Code: Select all

#!/bin/bash
[ "$1" == "" ] && { echo "Need an argument"; exit; }
# Variables
switch32=/tmp/32bit
switch64=/tmp/64bit

[ "$1 == "32" ] && cp $switch32/*.TXT /opt/ppm
[ "$1 == "64" ] && cp $switch64/*.TXT /opt/ppm
This is untested, but i see no reason why it shouldn't work.

Re: multilib "load=" cheat code.

Posted: 01 Mar 2012, 18:41
by edge226
brokenman sounds like an easy enough fix to just do a switch off when needed, great! :-)

Re: multilib "load=" cheat code.

Posted: 01 Mar 2012, 22:19
by brokenman
You may also need to edit the config file (under setting menu) to change the URL of the repository ... or edit the file manually in /etc/ppm/porteus.conf

Re: multilib "load=" cheat code.

Posted: 03 Mar 2012, 08:28
by edge226
Brokenman - Thanks, Helpful as always :)