SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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...
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.
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.
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.
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/
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.