LinuxQuestions.org
Help answer threads with 0 replies.
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 10-26-2007, 03:08 PM   #16
dunric
Member
 
Registered: Jul 2004
Distribution: Void Linux, former Slackware
Posts: 498

Rep: Reputation: 100Reputation: 100

Quote:
Originally Posted by Alien Bob View Post
Well simple: because rpm is needed by the "rpm2tgz" script which transforms an RPM package into an installable Slackware package.
AFAIK rpm2tgz does not need rpm. It converts rpm packages in gzipped tarballs using cpio.
 
Old 10-26-2007, 03:17 PM   #17
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Rep: Reputation: 242Reputation: 242Reputation: 242
Quote:
Originally Posted by dunric View Post
AFAIK rpm2tgz does not need rpm. It converts rpm packages in gzipped tarballs using cpio.
That, actually, sounds more plausible to me. Because it would be quite a big dependancy, if rpm2tgz really needs a full RPM installation. If this were so, I'd request a change for the next release of Slackware. ;-)

Must I?

gargamel

EDIT: My guess is that RPM is there for compatibility with software that depends on an LSB conform infrastructure. Only a guess, though...

Last edited by gargamel; 10-26-2007 at 03:19 PM.
 
Old 10-26-2007, 03:25 PM   #18
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Rep: Reputation: 242Reputation: 242Reputation: 242
Quote:
Originally Posted by gnashley View Post
src2pkg resolves lots of the most common problems with compiling your own software and creating packages that are compatible with pkgtools. And it also will convert binary rpm's to slack packages -even without having rpm installed since it uses another more dependable program for unpacking the rpm's. rpm2tgz is really not a very good way to deal with binary rpm's. Unfortunately that's how it usually gets used. Some binary rpm's will really whack your system if installed after converting with rpm2tgz. src2pkg does a better job because it checks and corrects the directory permissions and corretcs for wrong placement of docs and man-pages as well.
Also, for Alien_Hominid, src2pkg covers the usage of checkinstall in a much better way. It includes the 'trackinstall' program which works the same way as checkinstall. Even better is to use the full cpabilties of src2pkg as it will generate a build script for you that keeps track of any options you might pass to configure. And src2pkg *works* withotu the various problems associated with checkinstall.
src2pkg is a wonderful tool. I already posted in another thread, that if only *one* program would be added to the next release of Slackware, I'd vote for src2pkg.

Again an admirable effort, Gnashley!

gargamel
 
Old 10-26-2007, 07:38 PM   #19
pbhj
Member
 
Registered: Dec 2002
Location: UK
Distribution: Slackware 12; Ubuntu 7.10
Posts: 358

Rep: Reputation: 32
I used kpackage (front end to rpm I think) to install OpenOffice.org-2.3.0.

OOo is a bit big for me to compile for myself. Also I like fresh releases and didn't want to wait for KJZ to produce an OOo package!

Works for me though I do recall some jiggery-pokery to get it to display the right files. Nothing serious just something like adding a directory to the kpackage config.
 
Old 10-27-2007, 01:44 AM   #20
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
From the rpm2targz program:
# Extract the RPM:
ofn=$TMPDIR/$(basename $i .rpm).cpio
if which rpm2cpio 1> /dev/null 2> /dev/null ; then
rpm2cpio $i > $ofn 2> /dev/null
if [ ! $? = 0 ]; then
echo "ERROR: rpm2cpio failed. (maybe $i is not an RPM?)"
rm -rf $TMPDIR
continue
fi
else # less reliable than rpm2cpio...
( dd ibs=`rpmoffset < $i` skip=1 if=$i 2> /dev/null | gzip -dc > $ofn 2>/dev/null ) || \
( dd ibs=`rpmoffset < $i` skip=1 if=$i 2> /dev/null | bzip2 -dc > $ofn 2>/dev/null )
fi

So, you see that it does need or at least hopes to find rpm2cpio. src2pkg uses a little script called disrpm which uses hexdump or od to unpack the rpm's. It's more dependable than rpm2cpio which fails to unpack some rpm's, especially older ones.
But rpm also includes another program which I often use, 'gendiff'. I've been meaning for some time to split the sources for it out and package it separately.
 
Old 10-27-2007, 08:16 AM   #21
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
pbhj
For OpenOffice install, I would suggest that you use the SlackBuild technique. It provides some customisation more suited to the Slackware way of doing things. See http://slackbuilds.org/repository/12...penoffice.org/
 
Old 10-27-2007, 05:46 PM   #22
dunric
Member
 
Registered: Jul 2004
Distribution: Void Linux, former Slackware
Posts: 498

Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by gnashley View Post
From the rpm2targz program:
# Extract the RPM:
ofn=$TMPDIR/$(basename $i .rpm).cpio
if which rpm2cpio 1> /dev/null 2> /dev/null ; then
rpm2cpio $i > $ofn 2> /dev/null
if [ ! $? = 0 ]; then
echo "ERROR: rpm2cpio failed. (maybe $i is not an RPM?)"
rm -rf $TMPDIR
continue
fi
else # less reliable than rpm2cpio...
( dd ibs=`rpmoffset < $i` skip=1 if=$i 2> /dev/null | gzip -dc > $ofn 2>/dev/null ) || \
( dd ibs=`rpmoffset < $i` skip=1 if=$i 2> /dev/null | bzip2 -dc > $ofn 2>/dev/null )
fi

So, you see that it does need or at least hopes to find rpm2cpio. src2pkg uses a little script called disrpm which uses hexdump or od to unpack the rpm's. It's more dependable than rpm2cpio which fails to unpack some rpm's, especially older ones.
But rpm also includes another program which I often use, 'gendiff'. I've been meaning for some time to split the sources for it out and package it separately.
As you may see the need for rpm2cpio and therefore the rpm package is only optional. When rpm2cpio is not found, it uses rpmoffset from rpm2tgz package to extract the cpio archive for further processing. It is commented as "a less reliable" way but it did never failed for me. I would like to hear about an opposite experience if any.
 
  


Reply



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
I need help with package management azza14 Linux - Software 13 07-09-2007 04:27 AM
LXer: Simple Package management with Synaptic Package Manager LXer Syndicated Linux News 0 12-05-2006 06:33 PM
Using Package Archive style package management mugwump84 Linux From Scratch 3 08-25-2005 05:19 PM
Package Management longnam Slackware 2 03-23-2005 03:42 PM
Package management Ultimaterra2005 Red Hat 1 02-22-2004 12:02 PM

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

All times are GMT -5. The time now is 12:25 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