LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   What are the steps to build and install a Slackware package from a RPM package? (https://www.linuxquestions.org/questions/slackware-14/what-are-the-steps-to-build-and-install-a-slackware-package-from-a-rpm-package-876770/)

sudeepkulkarni 04-24-2011 07:52 AM

What are the steps to build and install a Slackware package from a RPM package?
 
Newbie needs help. :confused:

I know about sbopkg. But I want to be able to install manually from RPM packages.

bathory 04-24-2011 07:54 AM

Hi,

You can run:
Code:

rpm2tgz package.rpm
installpkg package.tgz


coralfang 04-24-2011 07:55 AM

http://www.slackware.com/config/packages.php

The information at the bottom of the page tells you how to convert an rpm to a slackware compatible package.

XGizzmo 04-24-2011 09:00 AM

Quote:

Originally Posted by sudeepkulkarni (Post 4334366)
Newbie needs help. :confused:

I know about sbopkg. But I want to be able to install manually from RPM packages.

There is a near 100% chance you do not want to do this. RPM's are not made for slackware.
You can not install just any old RPM and have it work and there is a good chance you would
also break your slackware install. There are a few 3rd party applications that are distributed
in RPM as sort of a universal package but even these need special care to integrate with
slackware.

dive 04-24-2011 09:02 AM

In my view it would be better to build a package using a slackbuild because you should make a slack-desc and might need a doinst.sh. You can look at the open office slackbuild on sbo for an idea: http://slackbuilds.org/slackbuilds/1...org.SlackBuild

The conversion bits:

Code:

for FILE in *.rpm ; do rpm2cpio < $FILE | cpio -imdv ; done
mv opt usr $PKG


sudeepkulkarni 04-25-2011 07:46 AM

Quote:

Originally Posted by XGizzmo (Post 4334423)
There is a near 100% chance you do not want to do this. RPM's are not made for slackware.
You can not install just any old RPM and have it work and there is a good chance you would
also break your slackware install. There are a few 3rd party applications that are distributed
in RPM as sort of a universal package but even these need special care to integrate with
slackware.

Will certainly keep that in mind. Thank you.

slac-in-the-box 04-25-2011 12:51 PM

rpm2cpio package.rpm | cpio -vidm
 
Assuming that you cannot find a slackbuild for your package, put rpm package in its own directory and cd to that directory, then

Code:

rpm2cpio package.rpm | cpio -vidm
Then inspect the contents of the folder to make sure it is compatible with slackware's layout: binaries are in /usr/bin , libraries in /usr/lib or /usr/lib64, startup configurations in /etc/rc.d, and so forth. If it seems like it's compatible go ahead and use makepkg to create a slackware package , and then installpkg to install it... the beautiful thing about slackware packages, is you can use removepkg to remove it if it doesn't work or somehow breaks the system, unless it breaks system so much that you can no longer use the pkgtools, in which case you boot from the install media, and mount your file system(s) and then use removepkg from the startup media with the ROOT=/mountpointofyourfilesystem to remove the package...


All times are GMT -5. The time now is 11:02 PM.