How do you choose to install third party packages?
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.
I just remembered another really nice little tool that with automates tracking and helps with Slackware package creation. It was created by Slackware contributor Stuart Winter (drmozes) and is included in Slackware by default: slacktrack
While we are here and for future reference for anyone stumbling across this thread after doing a `make install` (with no logging) and wondering how to clean up, here is another neat `find` trick.
You can use `find` to locate files associated with a package, if you know just one of the files within the package. For example, say I have zstd installed and I want to remove it and all of its associated files.
I turned this trick into a basic script that I have called f2sb (forgot to slackbuild). Handy in situations where you already installed something manually and later regret this and wish you had made a package after all.
The script will convert your already installed (and untracked) files into a package that you can then install over the top and thus (if you wish) also cleanly uninstall using removepkg. I hope it helps someone in the future.
Code:
#!/bin/sh -eu
#
# This script allows you to create a Slackware package from software you
# previously installed manually (e.g. via `make install`).
#
# Usage:
#
# ./script name-version /path/to/reference/file [seconds]
#
# Provide the name and version of the package, path to one file that forms
# part of the package, and optionally seconds either side of that reference
# file's creation time. If the third argument is not provided, 10 is assumed
# because unlike compilation, installation happens within a few seconds. On
# completion a Slackware package will be created.
#
# Example:
#
# ./script zstd-1.3.7 /usr/local/bin/zstd
#
if [ "$USER" != "root" ]; then
echo "Run this script as root" >&2
exit 1
fi
NAMEVER="$1"
CTIME=$(stat -c%Z "$2")
RANGE="${3:-10}"
ARCH="${ARCH:-$(uname -m)}"
case "$ARCH" in
arm*) ARCH=arm ;;
esac
PKG="$(mktemp -td f2sb.XXXXXX)"
mkdir "$PKG/pkg"
cd "$PKG/pkg"
find /etc /opt /usr -newerct @$(($CTIME-$RANGE)) ! -newerct @$(($CTIME+$RANGE)) -print0 | cpio --quiet -p0md .
/sbin/makepkg -l y -c n "${OUTPUT:-/tmp}/$NAMEVER-$ARCH-${BUILD:-1}.${PKGTYPE:-tgz}"
cd - >/dev/null
rm -r "$PKG"
Last edited by ruario; 12-25-2018 at 07:17 AM.
Reason: Clarify the comments within the script; correct some spacing; include directories; shortened script
In theory, is there any reason why you couldn't install Slackware's pkgtools on another distro and then use SlackBuild scripts for custom packages?
Quote:
Originally Posted by Didier Spaier
The question was addressed to ruario, however my answer is: one of the main purposes of pkgtools is to maintain the packages database in /var/log (or more recently in /var/lib) which is found only in Slackware and derivatives. Which also means installing pkgtools in alien distros. Not worth the hassle, I guess.
Quote:
Originally Posted by ruario
Yes and I have done it in the past but it requires a few patches to Pkgtools to make them work on other distros because of differences in paths, some tool locations, and a few other things. I stopped maintaining patches for it some time back, though it would likely be easier now because you no longer need tar-1.13.
Yep, it is easier now. As a test, I quickly patched -current versions of installpkg, makepkg, removepkg and upgradepkg. I just needed to switch the scripts to require bash since they contain some bashisms (some distros use dash as sh), handle a few hardcoded paths, flip around some find options and I also removed a couple of warnings from makepkg that would not make sense on other distros.
With these few tweaks you could place installpkg, makepkg, removepkg and upgradepkg into /usr/local/sbin and use them as a secondary package manager for self compiled packages, thus avoiding the need to mess with rpm .spec files and other overly complex packaging systems.
Here are my patches if someone wants to try it out.
P.S. I am not planning on maintaining these as I already have my own system for cross distro "packages". I just did it as a little exercise to check how hard it would be (it isn't).
Ok, so this thread is old, and I know it's inappropriate to reopen it. But is is also highly rated, so it might be useful for some people.
During my usual kind of experimentation I recently came across and installed a distro called GNU Guix (system), and one of the interesting things is that this is not actually primarily a distro, but a package manager that can in theory be added to any distro. The concept is fairly complex to understand, as it's not a normal package manager installing packages in a normal way, but rather in it's own kind of weird way. Trying the distro Guix and how the package manager works within it was quite an interesting thing.
Installing (deploying rather) and removing packages is super easy, but coming to terms with how/where it is installed exactly it slightly more challenging. I guess I have to spend more time looking into the details.. But.. It seems it is/could be a great tool for "deploying" some end user programs without complexity, but perhaps not so much for system software.
Anyways, I was wondering if anyone here has any experience with Guix on Slackware, and I wanted to mention it as an option to install third party software.
Yes, I already read that first link before posting here, thanks. But it's a good reference thread.
Yes, like most package managers it does that, but unlike them it has some kind of other way to install dependencies, and it's all installed in the same location (run/var or var/xx or some place). Seemingly not touching the rest of the system (or using only /usr/lib usr/share?). I couldn't quite figure out exactly what it did when I tested it, it was quite unusual and somewhat confusing.
Anyways, it seems like it could be a worthwhile way for some people to install third party software in Slackware.
Ps. I suggest you read the whole thread if you're missing the context
While I have benefited from the convenience of Slackbuilds, I do miss the early days when Checkinstall still worked properly. I recognize that it isn't awfully difficult to write a specific slackbuild script but it is more involved and less "hands on" than simply running "checkinstall" and dealing with any errors if and when they occurred. The advantage I see is the complete freedom to at least try to install anything for which you have source code. By depending on slackpackage repositories, inevitably since it is just easier, the one-size-fits-all software becomes favored via popularity and it becomes somewhat either more difficult or less desirable to seek and use "fringe" or more specific use case software.
An example is the application for audio playback that became so popular it was, IIRC, at one time default in Full Recommended Install, and I can't even recall it's name because what it did best was organize one's music collection which didn't matter much to me. I much prefer an app like Aqualung that is more focused on performance of the player, even including LADSPA plugins like various EQs and "Tube Warmth" processing support, obviously a niche use case. So I rely on it's own generic installer as I do with several other niche apps not popular enough to be included on sites like Slackbuilds.org.
I'm not complaining. I just wish something simple like Checkinstall was still in play and supported, but I suppose that's not the way Linux in general is evolving. Too bad.
I'm not complaining. I just wish something simple like Checkinstall was still in play and supported, but I suppose that's not the way Linux in general is evolving. Too bad.
Funny you mention that. I was "advised" to use checkinstall on Mageia recently. I don't remember the software or why, but I remember in the end I skipped using checkinstall and ended up using rpmbuild instead. As far as I understand it does basically the same thing that you describe checkinstall does, except it creates an rpm that you can use in whatever package management method.
Stable release 2009, ok, but it could still work just fine? It's probably quite a static program that doesn't need security updates or such things. Perhaps if it needs some care it might be possible for someone to take it under their wing and maintain it.
You're right, it does seem like a useful minimalistic tool.
As far as I understand it does basically the same thing that you describe checkinstall does, except it creates an rpm that you can use in whatever package management method.
rpmbuild is much more robust than checkinstall. See e.g. this answer @AskUbuntu or this old thread here at LQ.
rpmbuild is much more robust than checkinstall. See e.g. this answer @AskUbuntu or this old thread here at LQ.
By what standard do you claim rpmbuild is "much more robust than checkinstall"? I mean it is since rpmbuild is still maintained while checkinstall is not and checkinstall is by over a decade obsolete, but that doesn't mean there is some unredeemable value to something like checkinstall which basically is just a tracking "make install" that creates packages that can be managed. Certainly rpmbuild is better than checkinstall at building rpms but surely that has no bearing or use on Slackware.
I clicked your links (thank you, btw) and the one claim that it hosed one guy's boot drive I find rather unlikely if not ridiculous. I can see no manner in which "make install" for emacs would have any effect on boot therefore neither should checkinstall unless some really serious, really ignorant editing error was made that would force an include affecting boot.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.