LinuxQuestions.org
Review your favorite Linux distribution.
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 12-09-2018, 06:14 PM   #1
Lysander666
Senior Member
 
Registered: Apr 2017
Location: The Underearth
Distribution: Ubuntu, Debian, Slackware
Posts: 2,178
Blog Entries: 6

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
How do you choose to install third party packages?


I was watching this very interesting video from Distrotube tonight which teaches newer uses how to install third party packages. They run through the configure/make/makeinstall method, the sbopkg method and finally sbotools. It occurred to me that different Slackware users must install third party packages in a variety of different ways and I'm curious to know who chooses what and what can be learned from these different methods.

I personally like to use a manual approach, but nevertheless one which isn't as involved as the first one in the video. I don't use configure/make/make install but I'm starting to think I should on occasion. I personally use the instructions on the SBo site though I've never followed step 4 since the script is already executable.

If there are quite a few dependencies I will hop on over to sbopkg but I will still go through SBo and input the dependencies in manually, even if there are ten or more. This way I feel I have a little more control. sbotools just feels 'too automated' for me, and I like reading about which dependencies I'm queuing up.

I'm fascinated by the old school configure/make/makeinstall method. To sketch it out, in the video the sequence for Leafpad was:

Code:
$tar -xvf leafpad-0.8.18.1.tar.gz
$cd leafpad-0.8.18.1
$./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc
$make
Now this was interesting, they changed to root using su rather than su - and I always use su -

Code:
#mkdir /tmp/build
#make install DESTDIR=/tmp/build
#strip -s /tmp/build/usr/bin/*
#cd /tmp/build
#mkdir install
#cd install
copy slack-desc content

Code:
#vim slack-desc [paste, save]
#cd .. or [cd /tmp/build]
#makepkg -l y -c n ../leafpad-0.8.18.1-x86_64-1dt.tgz
#cd ..
#installpkg leafpad-0.8.18.1-x86_64-1dt.tgz
Now, this is all very well for packages with no dependencies, but I imagine doing so for a package with depends would be slightly more involved.

So what method[s] do you generally use, and for what reasons?

Last edited by Lysander666; 12-10-2018 at 08:37 AM.
 
Old 12-09-2018, 06:30 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by Lysander666 View Post

Now, this is all very well for packages with no dependencies, but I imagine doing so for a package with depends would be slightly more involved.
not really, because you are just running a slackbuild for each package.


Unless you create a script that will install all of the dependencies in the order needed to be installed, then the main package source then run it. which now that I wrote this, sounds interesting to try myself, having all placed into one slackpkg to be installed.

A slackbuild script is nothing more than having it using the old school. (configure) , make, make install,then copies it into a tarball that is specif for Slack so it can keep track of what is installed on the system.

if you use just (configure), make, make install, and do a clean system, whatever you installed like that the system does not know about and (should) still be there when it has complete cleaning the system down to the original install.
 
2 members found this post helpful.
Old 12-09-2018, 06:39 PM   #3
Lysander666
Senior Member
 
Registered: Apr 2017
Location: The Underearth
Distribution: Ubuntu, Debian, Slackware
Posts: 2,178

Original Poster
Blog Entries: 6

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
Quote:
Originally Posted by BW-userx View Post

A slackbuild script is nothing more than having it using the old school. (configure) , make, make install,then copies it into a tarball that is specif for Slack so it can keep track of what is installed on the system.

if you use just (configure), make, make install, and do a clean system, whatever you installed like that the system does not know about and (should) still be there when it has complete cleaning the system down to the original install.
This is what I find interesting, and it's my own failing, to an extent: I've never really looked at a Slackbuild script in detail. Of course, I suspected after watching the video that that's what it was doing. My method of manual SBo installs has caused the odd problem since I change to root before starting the whole process rather than just before the build. I've learned of late that that's not the ideal way to do things [my /home/lysander/Downloads folder had a load of things owned by root which shouldn't have been].

Last edited by Lysander666; 12-09-2018 at 06:41 PM.
 
Old 12-09-2018, 06:51 PM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by Lysander666 View Post
This is what I find interesting, and it's my own failing, to an extent: I've never really looked at a Slackbuild script in detail. Of course, I suspected after watching the video that that's what it was doing. My method of manual SBo installs has caused the odd problem since I change to root before starting the whole process rather than just before the build. I've learned of late that that's not the ideal way to do things [my /home/lysander/Downloads folder had a load of things owned by root which shouldn't have been].
which is an easy fix. the way I do it is when I am not using sbotools, download the stuff i need, then put the tar into the dir where the slackbuild is, then
Code:
sudo ./someprogram.SlackBuild
which I am sure some will argue should not be done that way.
so just download place tar in slackbuild folder
Code:
su
login
#./programname.Slackbuild
su - changes your user environment to roots.


you should open a few slackbiilds and read through them, even place echos in it to echo the vars to see what that is doing and such harmless things to figure them out.

chown to fix the files in your dir

Last edited by BW-userx; 12-09-2018 at 07:03 PM.
 
Old 12-09-2018, 09:17 PM   #5
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
If it's part of slackbuilds.org, I'll use slackrepo to build it.

If there's no slackbuild for the item, I'll try to use src2pkg to make one for me.
 
1 members found this post helpful.
Old 12-09-2018, 09:39 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,366
Blog Entries: 28

Rep: Reputation: 6161Reputation: 6161Reputation: 6161Reputation: 6161Reputation: 6161Reputation: 6161Reputation: 6161Reputation: 6161Reputation: 6161Reputation: 6161Reputation: 6161
I generally use SlackBuilds.org and build the packages the old-fashioned way, one at a time, via the command line, because I'm comfortable with it. ( You kids and your newfangled toys!)

I can't remember the last time I wanted to install a package that wasn't available through SlackBuilds.

When I started with Slackware, there was no SlackBuilds.org. I learned a lot more about dependency resolution than I ever wanted to know, but it was a valuable experience.
 
2 members found this post helpful.
Old 12-09-2018, 10:11 PM   #7
Loomx
Member
 
Registered: Sep 2012
Distribution: Slackware
Posts: 184

Rep: Reputation: Disabled
I used to use SlackBuilds.org and do it manually.

Then I thought I'd write a script to do the (handful of) steps for me.

Then I decided to try and add rudimentary dependency handling to my script via parsing the $package.info file...

It's now more obvious to me how programs slowly add more and more features/bloat... :-)


Anyway, it works for me, and is much simpler than sbotools, et al.

https://github.com/Loomx/Git/blob/ma...cripts/sbotool
 
Old 12-09-2018, 10:19 PM   #8
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,463
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Quote:
Originally Posted by Lysander666 View Post
So what method[s] do you generally use, and for what reasons?
My first port of call is sbopkg.

Reasons:

1. Laziness (the slack is strong)
2. Ease of updates
3. It works very well
4. Builds can be queued

If the software isn't available on SBo, then the answer is: It depends.

If it's a single script or binary file, I'll just download or compile it and put it under /usr/local/bin without packaging it.

With VirtualBox, I use their binary installer to put it under /opt. Same goes for LibreOffice.

That covers most things for me.

Last edited by rkelsen; 12-09-2018 at 10:30 PM.
 
1 members found this post helpful.
Old 12-09-2018, 10:23 PM   #9
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
Quote:
Originally Posted by Lysander666 View Post
I'm fascinated by the old school configure/make/makeinstall method
Not sure why you call those steps "old school", they are just the normal ones, and the package/application upstream documentation together with the configure (./configure --help can also be useful) script code are the ones you need to study for identifying dependencies. If you focus and specialize on some services, you might find yourself looking for some particular optimizations for the packages/applications you use for those services, ones that are maybe not enabled during the "stock" distribution package compilation. You can now either modify the existing build script provided by Patrick (in the source tree) or alternatively an existing SlackBuild and add your desired options, or go 100% the manual/normal way, by going through the steps you presented in your OP.
Following the instructions for creating a package under Slackware is recommended, although sometimes tricky, might need to prepare the compiled binaries&libs before actually packaging them -> you might get some clues by peeking into some SlackBuild scripts.

Back in the day when I had no 24/7 access to the Internet and learned BSD/Linux on my own, literally discovering it mainly with man & --help, I used to keep the whole compilation working directory - sources+compiled binaries, for which I usually also kept a strict path naming rule, e.g. /kit/app-name-vers-x-x-x/ , archived and used the "make install" and "make uninstall" targets for manual upgrades. I'm also using the (default) /usr/local/ prefix folder for my own compilations, just got used with it, it seems.
I'm still doing this now for smaller applications (mainly security/networking/DB related packages) or when I'm too lazy to troubleshoot makepkg failures.

Last edited by abga; 12-09-2018 at 10:32 PM. Reason: typo
 
Old 12-09-2018, 10:33 PM   #10
Gordie
Member
 
Registered: Aug 2007
Location: Nolalu, Ontario, Canada
Distribution: Slackware64-Current
Posts: 871

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
I have done the ./configure. make. make install method for years. Coupled with rpm2tgz this was all there was. I learned how to used Sbopkg and liked it until I tried sboui. Sboui does dependencies too and makes my life easy these days. It is my computer and nobody else cares to use it or to use Linux so I use what makes me happy.

EDIT - Some software from trusted 3rd party sources come from Alien Bob and ruario are in my computer as well

Last edited by Gordie; 12-12-2018 at 11:55 AM. Reason: Add more info
 
3 members found this post helpful.
Old 12-10-2018, 12:38 AM   #11
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,065

Rep: Reputation: Disabled
I use any method hat provides a formally good Slackware package, i.e. one that can be handled by {install,remove,upgrade}pkg, and try to check that the package won't override existing files, for instance.

If I package myself, of course I first use the tools needed to configure and build from the source tree, which I generally do first in a temp directory. But I never install directly, always with DESTDIR=<root of package tree>, using fakeroot 99% of the time (i.e. unless it be not possible) to be Didier proof.

EDIT And if I occasionally use pip, this is always in virtualenv.

Last edited by Didier Spaier; 12-10-2018 at 03:15 AM.
 
Old 12-10-2018, 02:01 AM   #12
solarfields
Senior Member
 
Registered: Feb 2006
Location: slackalaxy.com
Distribution: Slackware, CRUX
Posts: 1,452

Rep: Reputation: 998Reputation: 998Reputation: 998Reputation: 998Reputation: 998Reputation: 998Reputation: 998Reputation: 998
recently, i have been going through the exercise of creating my own repo of packages, built from SlackBuilds.org. I use idlemoor's excellent slackrepo. Here's a longer description of the process, if someone is interested:

https://slackalaxy.com/2018/09/09/ow...es-repository/

the reason is that I need to install quite a lot of stuff, and I do not want to compile it on my laptop.

Last edited by solarfields; 12-10-2018 at 02:03 AM.
 
2 members found this post helpful.
Old 12-10-2018, 05:36 AM   #13
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762
I generally (but not exclusively) do ‘make install’ (or equivalents) and redirect the output to a staged directory via the likes of DESTDIR. I then use a shell script I wrote about 6 years ago to simplify installation (+ tracking/removal). It is sort like, super basic package management. I still use some Slackbuilds, particularly those built by others but for the most part I gave up creating new ones for myself.

I do it this way because I can knock up “BUILD” file for my pseudo package management system more quickly/easily than a SlackBuild, since the main script itself has most of the boilerplate code included (fetching/unpacking source, setting [root] file ownership, compressing man pages, stripping binaries, tracking file locations, etc.). It also has the advantage (for me), that it is distro independent. While I am primarily a Slackware user, I do frequently have to work with a range of distros. Since my script has no major dependencies outside of a typical Linux build environment, I can just re-use the BUILD file no matter what distro I am working on. The only thing I need to do first is to ensure that a suitable build/dev tools are installed.

As examples, here are a couple of BUILD files for some compressors I use for certain tasks:

Code:
name=zstd
version=1.3.7
source=("https://github.com/facebook/$name/releases/download/v$version/$name-$version.tar.gz")

build() {
  make install DESTDIR="$pkg"
}
Code:
name=lz4
version=1.8.3

build() {
  git clone -b v$version --single-branch --depth 1 https://github.com/$name/$name.git
  cd $name
  make install DESTDIR="$pkg"  
}
Yes, these are cherry-picked, really basic examples and clearly more complex applications need more work (as they would to create a SlackBuild) but they show how simple things can be and I am sure most people probably appreciate that I likely spent less time knocking them up than the maintainers of their respective SBo equivalents. Plus, no need to make multiple packaging scripts (SlackBuild, PKGBUILD, .spec file, etc.) to work with a range of distros. On the flip side I realise don't get the various advantages that native packages bring (not least, integration with other distro tools) but for my own use cases I normally am happy with the compromise. I am generally only adding small simple packages this way and if my own tool is not good enough for a particular use case, I could always knock up a native package.


P.S. If the style of these these BUILD files look familiar, yes… I took inspiration from things like Arch's PKGBUILDs.
 
1 members found this post helpful.
Old 12-10-2018, 06:11 AM   #14
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762
Quote:
Originally Posted by Lysander666 View Post
I gave up watching it after the second obvious spelling mistake. I think they could have prepared better and done some editing. It was painful to watch/listen to and I couldn't see that I would learn anything from it personally.

Still… on the plus side I do appreciate that they used Slackware. Keeps the name out there.
 
2 members found this post helpful.
Old 12-10-2018, 06:58 AM   #15
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 2,011

Rep: Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619
Quote:
Originally Posted by ruario View Post
I do it this way because I can knock up “BUILD” file for my pseudo package management system more quickly/easily than a SlackBuild, since the main script itself has most of the boilerplate code included (fetching/unpacking source, setting [root] file ownership, compressing man pages, stripping binaries, tracking file locations, etc.). It also has the advantage (for me), that it is distro independent. While I am primarily a Slackware user, I do frequently have to work with a range of distros. Since my script has no major dependencies outside of a typical Linux build environment, I can just re-use the BUILD file no matter what distro I am working on. The only thing I need to do first is to ensure that a suitable build/dev tools are installed.
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?
 
1 members found this post helpful.
  


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
[SOLVED] Can't install packages with slackpkgplus from third-party repositories glats Slackware 5 04-19-2015 02:52 AM
I want to add additional Third party packages to my CentOS 6.3 ISO image. gaytes Red Hat 1 08-22-2012 07:00 PM
where do you get your third party packages for slackware?? danix85 Slackware 24 05-10-2010 10:02 PM
Doesn't having to deal with all these third party packages become a load of ...? Allamgir Slackware 10 12-30-2009 09:08 AM

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

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