Can slackware pkgtools work in other distributions?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
Can slackware pkgtools work in other distributions?
Is it possible to manually install Slackware's pkgtools package on other distributions? The binary is available at pkgs.org (http://pkgs.org/search/?query=pkgtools&type=smart). Once installed, can it be used (through installpkg command) to install some Slackware packages (that are not available in native distribution)? Will pkgtools keep a separate record/log so that removepkg can be used to remove packages installed by it later, if required? Thanks for your comments.
AFAIK pkgtool and the entire package management system for Slackware is designed for 'Slackware' only.
I've never seen anyone use a .tgz pkg on a Red Hat system which uses 'Yum' like Slack uses slackpkg or Debian which uses APT.
In order to install pkgtool on other distributions the pkg's extension would have to be converted to the proper packaging (.rpm <or> .deb) for that particular distro. Pkgtool wouldn't work w/o slackpkg or slapt-get and installing those may break the package management system that already exist's in the other distribution.
Having said that, I think Slackware is the only distribution that can convert a .rpm into a .tgz using rpm2targz.
If there are other distributions that can convert pkgs to suit another system I'm not aware of them. Should this be possible I would hope that other members would chime in and say so.
I agree with Ztcoracat. Among other things, Slackware's package management tools do not resolve dependencies; Slackware leaves that up to the user.
If you want to install software that's included in Slackware in other distributions, your best course of action is likely to check whether those packages are in those distros' repos. If they are not, installing from sources (which will require you to resolve the dependencies yourself, the old fashioned way) is likely your best bet. Note that, in many distros, if you wish to install from sources, you must first install compilers such as gcc, as they often are not included in the base install.
I am not sure if I made my question clear. Suppose I have a minimal install of gentoo distribution, can I install pkgtools there manually and install some Slackware packages in that installation? Will pkgtools be able to remove those packages later on, if needed? I do not want dependency resolution in this case (while installing or while removing).
I would be surprised if you find packages from Slackware that are not in the Gentoo repositories.
Anyways, yes, in general it is possible to use multiple package managers in one distribution. Is it advisable? Well, I wouldn't recommend it, at least for these reasons:
- the package managers will not know of each other. Files extracted from one package installed with, for example, pkgtools can easily be overwritten by a package installed using Portage, or vice versa.
- there is no guarantee that installing a Slackware package in Gentoo will leave you with a working software. It might be that there are differences in versions of dependencies will render the software unusable
Due to these reasons you need a very good understanding how each of the package managers work, so that you can fix whatever breakage will inevitably occur. Since you have to ask this question I assume that this isn't the case for you, yet.
If you want to run Slack applications, I would install Slackware. When I want RHEL compliance I run CentOS or Scientific, when I want to test with lots of cruft I install an Ubuntu family OS, if I want Debian then Debian, VSIDO, or Sparky serve me well. If I need versions or products in one that are not available, I load one that has that package or install from source.
Why would you want to install one, and pull packages for another?
While it might work, it sounds like a recipe for disaster.
It is just a thought: Standard way mentioned for installing applications which are not there in repository is to compile from source (./configure, make, sudo make install). However, it is generally mentioned that 'make uninstall' may or may not work if the application is to be removed later on. I was thinking of using src2pkg (http://www.src2pkg.net/) to make txz packages from source and then installing them using installpkg command of pkgtools. I have had found src2pkg to be very good for making packages. This way I can use removepkg command to remove application if needed. This combination of src2pkg and pkgtools could be used in any distribution as an additional package management system and will ease the process of installing from source.
Still not seeing the value here, but it sounds like you have a plan in mind.
The answer then will be determined by where you go with this project, and how successful you are.
Personally, I would prefer not to subvert or corrupt the database or behavior of the native package manager. When I install from source I compile in a unique tree, and install to a non-native target location. (This is what /usr/local and /opt were designed for.)
It is just a thought: Standard way mentioned for installing applications which are not there in repository is to compile from source (./configure, make, sudo make install). However, it is generally mentioned that 'make uninstall' may or may not work if the application is to be removed later on. I was thinking of using src2pkg (http://www.src2pkg.net/) to make txz packages from source and then installing them using installpkg command of pkgtools. I have had found src2pkg to be very good for making packages. This way I can use removepkg command to remove application if needed. This combination of src2pkg and pkgtools could be used in any distribution as an additional package management system and will ease the process of installing from source.
Why not just learn how to write an ebuild and use that instead of dealing with different package managers?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.