LinuxQuestions.org
Visit Jeremy's Blog.
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 06-12-2014, 01:39 AM   #1
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763
Not all "packages" or "tar files" are Slackware Packages


In fairly short succession we have had at least three posts with (I assume new) users expecting to install non-Slackware packages with installpkg, pkgtool or slackpkg.

Quote:
Originally Posted by Sumguy View Post
I went to install another tar.gz, but now, in pkgtool, when select the option to install from another directory; then specify the directory (/root/Downloads)...instead of listing the packages in that directory, like it did the first time, it just dumps me back to the command prompt!
Quote:
Originally Posted by Ztcoracat View Post
Code:
bash-4.2$ cd Downloads
bash-4.2$ ls
3D-Fasteroids.tar.gz		  bibledesktop-1.6
Learning Python, 5th Edition.pdf  bibledesktop-latest-bin.zip
MSI Manual.zip			  mozilla-firefox-29.0.1-x86_64-1ro.tgz
bash-4.2$ su -
Password: 

To a Californian, a person must prove himself criminally insane before he
is allowed to drive a taxi in New York.  For New York cabbies, honesty and
stopping at red lights are both optional.
	-- From "East vs. West: The War Between the Coasts

root@cat:~# installpkg bibledesktop-1.6
Cannot install bibledesktop-1.6:  file not found
Quote:
Originally Posted by Pinonoir View Post
Would I just go to kernel.org, download the 3.14 kernel and use installpkg to install it?
Just a friendly reminder for any newbie reading this.

Slackware packages are compressed tar archives. However, that does not mean that all compressed tar archives are Slackware packages. Nor does it mean that all packages are Slackware packages.

Slackware's packaging tools (pkgtool, installpkg, upgradepkg, removepkg and slackpkg) only work with Slackware packages. Unless you know that a given package is a Slackware package, do not expect Slackware's packaging tools to be able to handle it.
 
Old 06-12-2014, 02:03 AM   #2
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Original Poster
Rep: Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763
One fairly good hint with regards to if a package is a Slackware package is to look at the name. A Slackware package is typically named program-name-version-architecture-buildtag and ends with either a tgz or a txz extension (in theory it could also end .tlz or .tbz but that is unlikely).

These appear to be Slackware packages, based on their naming:

foo-bar-1.0-i486-2.txz
example-2.3-x86_64-1_SBo.tgz

These are not named like typical Slackware packages:

foo_bar-1.0.tar.bz2
example-2.3-Linux_x64.bin

Last edited by ruario; 06-12-2014 at 08:41 AM. Reason: improved examples
 
5 members found this post helpful.
Old 06-12-2014, 09:20 AM   #3
cwizardone
LQ Veteran
 
Registered: Feb 2007
Distribution: Slackware64-current with KDE4Town.
Posts: 9,344

Rep: Reputation: 7593Reputation: 7593Reputation: 7593Reputation: 7593Reputation: 7593Reputation: 7593Reputation: 7593Reputation: 7593Reputation: 7593Reputation: 7593Reputation: 7593
Well done!
 
Old 06-12-2014, 11:36 AM   #4
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by ruario View Post
.

Slackware packages are compressed tar archives. However, that does not mean that all compressed tar archives are Slackware packages. Nor does it mean that all packages are Slackware packages.

Slackware's packaging tools (pkgtool, installpkg, upgradepkg, removepkg and slackpkg) only work with Slackware packages. Unless you know that a given package is a Slackware package, do not expect Slackware's packaging tools to be able to handle it.
My one complaint with Slackware, is that the documentation is not as good as it could/should be.

Prior to the thread in which you guys helped me out so kindly, I was under the impression any tar.gz could be handled by some of the tools you mentioned.

And I still don't know the difference between pkgtool; installpkg, and the like (Although I think, at least I have a handle on SBOpkg and Slackbuilds....)

I've read a lot of the documentation and wikis and such- but there doesn't seem to be anything which gives an overview of all the different ways of installing various packages, and when to use the various tools and or do it manually from source. It's more like: "Read a bunch of different things, and kind of assemble all the bits and pieces of information until you sort of kinda maybe have somewhat of an idea". It also seems that much of the documentation assumes varying amounts of pre-existing knowledge.

This is the only aspect of Slackware which is giving me a problem (But I'll learn...eventually-). Otherwise, I find Slackware easy and straight-forward. Making Slack my primary OS, I really want to be able to install third-party stuff (even though I rarely do so)- otherwise, I'll never feel confident, or self-sufficient. Lack of [or my ignorance of] a good comprehensive tutorial on this subject, is really the only thing, IMHO, which makes Slackware a little tough for noobs.

But thanks to you guys and this forum, at least someone like myself has a chance of figuring this stuff out. No way could I be using Slack, otherwise!

I'm using Slack, and I ain't going back!
 
Old 06-12-2014, 11:46 AM   #5
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Original Poster
Rep: Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763
You might want to start with this page to get a bit more background on the differences between the package management tools:

Slackware Package Management

Last edited by ruario; 06-12-2014 at 11:49 AM.
 
1 members found this post helpful.
Old 06-12-2014, 01:24 PM   #6
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,590

Rep: Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338
Quote:
Originally Posted by Sumguy View Post

And I still don't know the difference between pkgtool; installpkg, and the like (Although I think, at least I have a handle on SBOpkg and Slackbuilds....)
pkgtool is a front-end to installpkg and removepkg. It also lists contents of the installed packages and allows you to re-run the setup scripts that are run at the OS install time -- such as configuring the mouse.
I haven't really used pkgtool in 16 years of using Slackware - I use removepkg, installpkg directly, and see what packages I have installed by looking in /var/log/packages.

I can understand your confusion with thinking source archives were Slackware packages.
In summary, I think a reasonable approach is that if the package file names have an architecture in the name, such as
foo-1.0-i486-1.txz
foo-1.0-x86_64-1.txz
foo-1.0-noarch-1.txz

then they are Slackware packages.

If they have any other naming scheme, or you didn't download them from a page that explicitly marked them as Slackware packages then they are not.

Another way is to see if the package has a package description.
Let's check the glibc zone info package in the 'a' series.

Code:
root@pepa:~/slack/a# tar tvvf glibc-zoneinfo-2014b-noarch-1.txz|grep -q install/slack-desc && echo Yes || echo No
Yes
Yes, this is a properly formed package.

Checking the bash *source code*:

Code:
root@pepa:~/slack/a# tar tvvf ~/slackware64-current/source/a/bash/bash-4.3.tar.xz |grep -q install/slack-desc && echo Yes || echo No
No
No it isn't.
 
5 members found this post helpful.
Old 06-12-2014, 01:33 PM   #7
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 515

Rep: Reputation: 234Reputation: 234Reputation: 234
Another tip to identify a proper Slackware package regardless of the name is to look for the install directory inside the package:

Code:
$ tar tvf some_package.t?z | grep install
drwxr-xr-x root/root         0 2014-05-07 19:17 install/
-rw-r--r-- root/root       319 2014-05-07 19:17 install/doinst.sh
-rw-r--r-- root/root       810 2014-05-07 19:17 install/slack-desc
A valid package at least contains a slack-desc file, and sometimes a doinst.sh.

EDIT: Well, drmozes already mentioned this while I was writing...

Last edited by Diantre; 06-12-2014 at 01:35 PM.
 
1 members found this post helpful.
Old 06-12-2014, 06:15 PM   #8
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by ruario View Post
You might want to start with this page to get a bit more background on the differences between the package management tools:

Slackware Package Management
That does help somewhat. And I'll read some of the other articles it links to.

They always seem to leave out important details- like:

Quote:
"To install a package using the official tools you only need to call the program and use the package name as the argument, the example below is installing the application wine from the current workin directory.

example:

Code:
#installpkg wine-2.5.6-x86.tgz
"
How does one know that WINE exists as a Slackware package- and the details to know the version and filename? This is the type of stuff us clueless noobs need to kno.

Also, the official Slackware packages are just the packages which you already get when you do a full install, right? So if you've done a full install, all the official repository is good for is updating or newly added packages, right?

[Before somebody punches me] I'm very slowly "getting" all of this. Other distro's easy, dumbed-down package management spoiled me, and kept me ignorant [But thank goodness they exist, 'cause I could have never handled this stuff 4 years ago when I was brand new to linux! I can barely handle it now ]

I think for the present, instead of concentrating on learning to compile packages manually, I'm going to work on learning to do the Slackbuild thing- and I'll have a head-start, having Maciuszek's awesome example in the other thread [ http://www.linuxquestions.org/questi...ll-4175507554/ ] to work from and use as an example!
 
Old 06-12-2014, 08:47 PM   #9
Arkerless
Member
 
Registered: Mar 2006
Distribution: Give me Slack or give me death.
Posts: 81

Rep: Reputation: 60
FYI other 'package' files are very similar, you can rename them to .tgz and then untar them and find the program files set out in a formal directory structure with install scripts, etc. very much like you get if you untar your slackware package. Java .jar files are the same, except using zip instead of tar, and the same is true of MacOS 'application bundles' as well. Even windows does essentially the same thing even if it's a little overcomplicated in implementation.

So package files in general are just a special kind of archive file, with the files that need to be installed along with metadata concerning how to handle them. If you are familiar with the conventions of a particular package format you can unzip it instead of installing it, see what files it includes, where it wants to put them, what commands it wants run, etc. And if it's in a standard format, a .tgz or a .zip file, you can use all the standard tools that you could use on any other file of that type to, e.g. recover a corrupted archive.
 
Old 06-12-2014, 09:08 PM   #10
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
Well, only if you ignore RPM.
 
1 members found this post helpful.
Old 06-12-2014, 09:11 PM   #11
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by Arkerless View Post
FYI other 'package' files are very similar, you can rename them to .tgz and then untar them and find the program files set out in a formal directory structure with install scripts, etc. very much like you get if you untar your slackware package. Java .jar files are the same, except using zip instead of tar, and the same is true of MacOS 'application bundles' as well. Even windows does essentially the same thing even if it's a little overcomplicated in implementation.

So package files in general are just a special kind of archive file, with the files that need to be installed along with metadata concerning how to handle them. If you are familiar with the conventions of a particular package format you can unzip it instead of installing it, see what files it includes, where it wants to put them, what commands it wants run, etc. And if it's in a standard format, a .tgz or a .zip file, you can use all the standard tools that you could use on any other file of that type to, e.g. recover a corrupted archive.
Wow! I like that! I think that is what Maciuszek did in the other thread [http://www.linuxquestions.org/questi...ll-4175507554/ ] where he essentially found the program I wanted to install in the Arch repository, and made a Slackbuild from it.

One question: How can one search the repos of other distros, and download their packages?
 
Old 06-12-2014, 11:02 PM   #12
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,145

Rep: Reputation: Disabled
Quote:
Originally Posted by Sumguy View Post
One question: How can one search the repos of other distros, and download their packages?
Shott answer: you shouldn't, as alien packages can't be used on Slackware but a few exceptions. There are tools to convert packages from a format to another (content and format of Debian or Fedora packages for instance are not those of Slackware packages), but very often the installation won't succeed or the application will not run because of dependencies issues or software versions mismatches.

Last edited by Didier Spaier; 06-12-2014 at 11:09 PM.
 
Old 06-12-2014, 11:33 PM   #13
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Original Poster
Rep: Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763
Quote:
Originally Posted by Richard Cranium View Post
Well, only if you ignore RPM.
An rpm is also just a compressed (cpio) archive with some meta-data tacked on the front. You can extract it with bsdtar (included with Slackware)

Code:
bsdtar xf example.rpm
bsdtar will also open zip files and most other common archive types.
 
1 members found this post helpful.
Old 06-12-2014, 11:35 PM   #14
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Original Poster
Rep: Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763
Quote:
Originally Posted by Arkerless View Post
FYI other 'package' files are very similar, you can rename them to .tgz and then untar
No need to rename them at all.

Code:
bsdtar xf example.jar
bsdtar xf example.deb
 
2 members found this post helpful.
Old 06-12-2014, 11:55 PM   #15
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Original Poster
Rep: Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763
Quote:
Originally Posted by Didier Spaier View Post
Shott answer: you shouldn't, as alien packages can't be used on Slackware but a few exceptions.
If you look at the thread that sumguy linked to, Maciuszek did not suggest taking an Arch package and installing on Slackware. He looked at the build and packaging script that Arch used for the application in question and took clues from it to hand craft a SlackBuild equivalent.

This use case is fine and indeed could save a lot of headache when packaging difficult applications.

@sumguy: https://aur.archlinux.org/ search for the package in question and then read the build script (PKGBUILD). The AUR (Arch User Repository) is like SlackBuilds.org and hence has packages outside of the main repositories. For packages that are part of Arch use https://www.archlinux.org/packages/. When you find a package click on "Source Files" and then read the PKGBUILD.

Last edited by ruario; 06-13-2014 at 02:57 AM.
 
2 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
Details about ".dsl" and ".uci" packages files in DSL zoombee Linux - General 2 10-11-2009 04:17 PM
Do i need "RPM Packages" or "SuSe Source code packages" Donati Linux - Software 3 03-19-2009 07:32 PM
Identifying "non-native" Slackware-packages in /var/log/packages Yalla-One Slackware 8 07-06-2006 06:57 AM
Where to download rpm packages of "gocr" and "kooka" satimis Linux - Software 6 02-23-2006 11:35 PM
Where can I find the "make" & "cc" packages?? sayeed_ather Mandriva 2 04-28-2004 02:02 AM

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

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

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