LinuxQuestions.org
Help answer threads with 0 replies.
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 07-12-2020, 10:26 AM   #1
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 170

Rep: Reputation: Disabled
Questions on packaging in Slackware


Hi, I'm still trying to get to grips with the whole Linux packaging system thing and I'd just like to clear up a few things to make sure I get all this right before moving on and thinking I get it.

If I've gotten anything wrong, please feel free to correct me.
As I understand it, it's always desirable when installing software, to install it as a package rather than manually installing the binaries. This allows the user to use their distro's package managing system to keep track of all the directories that software sticks its fingers into, so its files can be removed or edited when uninstalling or updating said software easily.

But sometimes, if for some reason, say, a piece of software uses a non-standard build system, it can be difficult to package, and so it is encouraged that the user manually install the source not as a package but on its own. As I understand it, in such circumstances, the user wouldn't be able to reliably uninstall all the application's files unless they studied the install script and made note of every directory it touched or patched the script so it then includes a reliable uninstall function if it does not already have one.

So when would a user use Check install? seeing as it requires a ./configure file, but surely if a ./configure file is present, the user would be able to package it the standard way?

And in reading the documentation available fromslackware's documentation site
Quote:
2.Configure the source, and apply patches if needed.
3.Compile/build the source and generate the binaries.
I don't think I know how to actually perform steps 2 and 3. Say for example, that for whatever reason, I wanted to install something like Audacity, from source. how would I perform steps 2 and 3 as listed above for creating a package for it?

And when it comes to installing Java applications, do they not need to be packaged? From the few semi-popular java applications I've seen, none of them seem to have packages available on slackbuilds.org but from their respective websites, to me, a newb, at least, it looks like it's just as simple as downloading the .jar for an installer and running it. In situations like that, would there ever be reason to build from source instead?
 
Old 07-12-2020, 10:39 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 1,135

Rep: Reputation: Disabled
Quote:
Originally Posted by burning View Post
So when would a user use Check install? seeing as it requires a ./configure file, but surely if a ./configure file is present, the user would be able to package it the standard way?
No, CheckInstall doesn't require ./configure at all. All it requires is install target to be present in the Makefile. You then run checkinstall instead of make install.

Moreover, even if there is no install target in the Makefile, you can successfully run checkinstall by specifying the actual install command as argument:
Code:
checkinstall make install_packages
checkinstall make modules_install
checkinstall install.sh
checkinstall setup
checkinstall rpm -i my-package-1.0.i386-1.rpm

Last edited by shruggy; 07-12-2020 at 10:43 AM.
 
Old 07-12-2020, 10:40 AM   #3
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 935

Rep: Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725
Quote:
Originally Posted by burning View Post
But sometimes, if for some reason, say, a piece of software uses a non-standard build system, it can be difficult to package, and so it is encouraged that the user manually install the source not as a package but on its own. As I understand it, in such circumstances, the user wouldn't be able to reliably uninstall all the application's files unless they studied the install script and made note of every directory it touched or patched the script so it then includes a reliable uninstall function if it does not already have one.
Check 'slacktrack' in the 'd' package series - this is what it was made for.
 
1 members found this post helpful.
Old 07-12-2020, 05:35 PM   #4
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 7,238

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
So, what you've stated is the way some people feel software should be installed with Slackware, but ultimately, it's your system and your choice.

Personally, I prefer to have packages for (almost) everything. I generally don't like using install scripts provided by manufacturers, since it won't result in a Slackware package that is tracked by pkgtool. Many of those installer scripts are quite powerful and very capable of removing themselves from the system (I believe virtualbox and nvidia fall into this category), but others can make changes to your main system without you realizing it and can cause breakage (however, it's been a long time since I remember hearing of issues like this).

If I find I need something on SBo that isn't already there, I will usually write up a SlackBuild and submit it, because I imagine others will come across it at some point.

If a program is provided as a binary .deb or .rpm package, many times you can deconstruct that and rebuild it into a Slackware package. This is done on SBo occasionally. I did it for a discord SlackBuild since the program is closed source and they only provide pre-built packages. I just took one of those packages and extracted it to put it in the structure that Slackware needs for a Slackware package.

The program you were trying to do on your other thread is lacking a standard build system (autotools, cmake, python, etc). This makes a SlackBuild more complicated. You could either try to replicate what their install script does as a SlackBuild or dig through the script and see if there's ways to run that, but tweak it to give you the ability to package things up when it's finished.

There are several programs that can help generate a Slackware package without having a SlackBuild. That is where things like checkinstall, slacktrack, src2pkg, and more come into play. They will compile the software and hopefully result in a proper SlackBuild.
 
1 members found this post helpful.
Old 07-12-2020, 07:47 PM   #5
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 170

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
Personally, I prefer to have packages for (almost) everything. I generally don't like using install scripts provided by manufacturers, since it won't result in a Slackware package that is tracked by pkgtool. Many of those installer scripts are quite powerful and very capable of removing themselves from the system (I believe virtualbox and nvidia fall into this category), but others can make changes to your main system without you realizing it and can cause breakage (however, it's been a long time since I remember hearing of issues like this).

If I find I need something on SBo that isn't already there, I will usually write up a SlackBuild and submit it, because I imagine others will come across it at some point.
I want to learn how to be able to do this myself, but the only software I can think of right now that I'd like to install are all either available on SBo already or are Java applications which lead me to asking more specific question to do with the relationship between packaging and Java applications. For instance, for I2P, they list on their downloads page; an Ubuntu package, a Debian package and a .jar file for an installer and the source itself as a .tar.bz2 file. I take it then that the two best options would be either the .jar installer or compiling the source? On their Github page it says that to build the source, it uses the Ant build system and that in order to install it, the user just needs to run ant pkg which will then give you the installer but being someone who has, as of writing this, 0 experience with apache-ant let alone any other build system, surely it's not as easy as entering a single command like that?

sidenote: Interesting that you're the one who made the Discord SlackBuild, i was just looking at it earlier today and I was thinking of posting about it at some point but thought it wouldn't warrant its own thread. The source on slackbuilds.org, is that only for 64-bit systems? I run a 32-bit system so was wondering if it's still possible for me to run discord? Or would I have to get an Ubuntu package and convert that?

Last edited by burning; 07-12-2020 at 08:45 PM.
 
Old 07-12-2020, 10:56 PM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 7,238

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by burning View Post
I want to learn how to be able to do this myself, but the only software I can think of right now that I'd like to install are all either available on SBo already or are Java applications which lead me to asking more specific question to do with the relationship between packaging and Java applications. For instance, for I2P, they list on their downloads page; an Ubuntu package, a Debian package and a .jar file for an installer and the source itself as a .tar.bz2 file. I take it then that the two best options would be either the .jar installer or compiling the source? On their Github page it says that to build the source, it uses the Ant build system and that in order to install it, the user just needs to run ant pkg which will then give you the installer but being someone who has, as of writing this, 0 experience with apache-ant let alone any other build system, surely it's not as easy as entering a single command like that?
I'm not familiar with ant as well, but you could use SBo's reverse dependency feature under Advanced Search to see what other projects require apache-ant, which may help give you an idea on how to better use it.

https://slackbuilds.org/advsearch.ph...&stype=revdep1

You don't have to necessarily build it from source and you can potentially try and repackage the provided .deb file. It's what I do with discord (which is because they don't provide source, but others do repackaging just for simplicity (look at the repackaging options for libreoffce vs building with LibreOffice).

Quote:
Originally Posted by burning View Post
sidenote: Interesting that you're the one who made the Discord SlackBuild, i was just looking at it earlier today and I was thinking of posting about it at some point but thought it wouldn't warrant its own thread. The source on slackbuilds.org, is that only for 64-bit systems? I run a 32-bit system so was wondering if it's still possible for me to run discord? Or would I have to get an Ubuntu package and convert that?
Last I looked, Discord did not provide a 32bit version. If they do now have that, I'd be happy to add support for it, but I didn't see a sign of it on their website.
 
1 members found this post helpful.
Old 07-12-2020, 11:43 PM   #7
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 3,713

Rep: Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059
You might find src2pkg interesting. (Download link is here.)
 
1 members found this post helpful.
Old 07-13-2020, 07:17 AM   #8
chemfire
Member
 
Registered: Sep 2012
Posts: 265

Rep: Reputation: Disabled
Also keep in mind /usr/local and /opt both exist more or less for these cases.

I don't usually use /usr/local because there is a sort of assumption you are going to have a traditional set of shared directories under that: bin lib etc

/opt in strict LFS terms this is a bit of an abuse of opt but a lot of things do let you set an install path even if they don't use the traditional autotools install process. You can create directories under /opt per application you install there, you know they are not part of slackware, not part of package etc. Its good for "stand alone stuff".

/opt/Google\ Earth
/opt/Aptana\ Studio

etc.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Slpkg New Slackware packaging tool dslackw Slackware 226 07-27-2016 07:07 AM
Upgrading Slackware (packaging questions) jrdioko Slackware 5 08-17-2005 07:23 PM
Slackware packaging wombat53 Slackware - Installation 16 07-08-2005 11:44 AM
Packaging manager for Slackware 9.1 ??? Fernando534 Linux - Newbie 4 05-07-2004 02:26 PM

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

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