LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-11-2011, 01:57 AM   #1
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 611

Rep: Reputation: 221Reputation: 221Reputation: 221
32-bit Packages and 64-Bit Packages with Included Multilib on One SlackBuild


I was tinkering around with this, and thought somebody else out there might have some feedback for me.

I wrote this snippet of code to paste into (almost) any SlackBuild script, right before the call to makepkg at the end:
Code:
# If we've dropped in an ix86 package for multilib, and this is x86_64,
# then let's convert and include it.
if [ -r $CWD/$APP-$VERSION-i?86-$BUILD.t?z -a "$ARCH" = "x86_64" ]; then
  OLD_CWD=$(pwd)
  cd $CWD
  OLD_PKG_NAME=$(echo $APP-$VERSION-i?86-$BUILD.t?z)
  NEW_PKG_NAME=$APP-compat32-$VERSION-$ARCH-$BUILD.txz
  /usr/sbin/convertpkg-compat32 -i $OLD_PKG_NAME -o $NEW_PKG_NAME -d $TMP
  /sbin/installpkg --root $PKG $TMP/$NEW_PKG_NAME
  cd $PKG
  rm -r var/log/packages
  cd $OLD_CWD
fi
Of course, sometimes, especially when rebuilding core Slackware packages, you have to add
Code:
APP=$PKGNAM
or
Code:
APP=<app's name>
at the beginning.

In any case, the result is that you can now run the SlackBuild on an x86, then copy the resulting package back into the source folder and run the same script again on an x86_64, and you get a package with multilib included native.

You have to have AlienBob's compat32-tools installed on the x86_64 system for it to work.

It takes more time doing it this way when building the package. And, since AlienBob already releases all of the core components of the distribution in multilib form, there's generally no reason to rebuild core packages in this way. With add-ons, however, I see no reason why this shouldn't be the norm for anything with shared objects included in it.

Maybe it already is the norm in some groups, and I'm dumb.

Perhaps more likely, I'm dumb because there is some reason that this is a bad way to do things.

The only real hang-up I can see is that people with "vanil" Slackware 64-bit systems who install a multilib-enabled package could wind up with unused 32-bit binaries on their system. I'm not sure that this is a big deal in this day and age ... Heck, I have KDE 4 sitting around on my system, and constantly being updated, and it never really gets used, and that doesn't bother me ...

What do you think?
 
Old 03-11-2011, 08:40 PM   #2
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,969

Rep: Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548
Quote:
Originally Posted by foodown View Post
The only real hang-up I can see is that people with "vanil" Slackware 64-bit systems who install a multilib-enabled package could wind up with unused 32-bit binaries on their system. I'm not sure that this is a big deal in this day and age ... Heck, I have KDE 4 sitting around on my system, and constantly being updated, and it never really gets used, and that doesn't bother me ...

What do you think?
Not a bad idea. A lot of other distribution mix it up. It's not a bad way to do it, just a different way.

One other draw back I see. If I decide to go back to 64-bit. Having integrated 32-bit, 64-bit packages would make that difficult.

AlienBOB's way maintains a separation of 32-bit, 64-bit. To go back to 64-bit only is a two step process.

slackpkg upgrade-all (gcc and glibc packages)
slackpkg clean-system -OR- removepkg /var/log/packages/*compat32*

Going back if needed is simple, especially using Sébastien Ballet's multilibpkg and compat32pkg
 
  


Reply

Tags
multilib, slackbuild, slackware64



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ORBit2 Slackbuild fails when building 32 bit package on current multilib damgar Slackware 4 04-10-2010 02:26 PM
32 bit packages installed in 64 bit system mewto Linux - Newbie 5 03-09-2010 06:42 PM
[SOLVED] ati driver 32-bit compatibility for Slackware 64-bit multilib? vik Slackware 25 02-16-2010 07:06 PM
Slackware64 current multilib, do the 32 bit packages need to be updated as well? damgar Slackware 11 02-01-2010 11:08 AM
[SOLVED] CLFS 64 bit multilib and pure 64 bit pacthes wanted Openumerix Linux From Scratch 1 11-16-2009 12:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration