LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   installpkg of a .tgz file results in a broken partial install (https://www.linuxquestions.org/questions/slackware-14/installpkg-of-a-tgz-file-results-in-a-broken-partial-install-744849/)

james2b 08-03-2009 03:37 PM

installpkg of a .tgz file results in a broken partial install
 
In Slackware 12.1 with KDE I was attempting to install a newer version of the ntfs-3g, and that ntfs-config write support tool. In a terminal as the root user, I entered; installpkg and the full package name with the directory path included, and using the gzip files as .tgz. It then acts as if it is installing, but when I open the package manager, kpackage, then type in the name of that just installed package, and click the file list tab, it shows the files with a red X, and not a green check mark, so that it is a broken install. Also some files to install are; .tar.gz and so can I just change that file extension to .tgz so it works ? I do also have the slackpkg tool installed, but when I run; slackpkg update and the install-new and upgrade-all commands, there are no newer versions of the ntfs-3g or any version of that ntfs-config tool.

MS3FGX 08-03-2009 03:55 PM

Files that end in .tar.gz are almost always source packages that you have to compile into a binary program, and are never installable Slackware packages. You would need to use a Slackbuild or similar system to turn that source package into something you could actually install on your system.

As for the upgraded packages, where did you get them? Are they from Slackware 12.2?

james2b 08-03-2009 09:04 PM

I found the newer version of ntfs-3g here; http://www.ntfs-3g.org/ , and there was a link for that ntfs config write support tool at that same web site; http://www.ntfs-3g.org/support.html#questions, then scroll down, and that config tool here; http://flomertens.free.fr/ntfs-config/ ,And so I do see then that Slackware only uses the .tgz file type for installs, and not that .tar.gz type. So with a full Slackware 12.1 install, do I have the needed items to compile a source code file into binary to make an installable application ? And it can be done in a terminal as root with which commands then, thanks for the help.

GrapefruiTgirl 08-03-2009 09:40 PM

Quote:

Originally Posted by james2b (Post 3630277)
And so I do see then that Slackware only uses the .tgz file type for installs, and not that .tar.gz type.

Let's clarify in terms of Slackware:

The tar.gz extension means "A bunch of stuff, usually source-code, tarred into a pile, called a tarball, and then compressed with gzip"

A .tgz or .txz extension usually implies a "compiled, already built, package ready for installation into Slackware. It isn't source-code, it's compiled binaries, config files, etc."

Quote:

So with a full Slackware 12.1 install, do I have the needed items to compile a source code file into binary to make an installable application ? And it can be done in a terminal as root with which commands then, thanks for the help.
Yes, you're totally right: Slackware comes with everything you need to build stuff and install it. Most source-code tar.gz archives (like 99%) comes with README files, and INSTALL files, and other documentation inside the archive. This is the first stuff to read when you have downloaded source-code for anything.

Most of the time, with 'normal' source-code, you unpack the archive using your file-manager or in a console (use the tar command) and then you execute a configure script from within the source-code.

If configure works successfully, you then run 'make' command. Now, you could do 'make install' after this, but if you do, you will not as easily be able to uninstall the package--- you will need to either run around deleting stuff, or run 'make uninstall' if available.

Therefore, we often use some tools to make Slackware packages from source, so that we can install and remove them quickly and easily.

These tools are called 'slackpkg' and 'src2pkg', the latter of which I am not certain if it is included with any Slackware's officially yet (I think it is with the newest Slack) and the official package manager of Slackware is called 'pkgtool' which is used to view, remove, upgrade, install, etc.. packages.

For further reading, there is LOTS of documentation included with Slackware. Very advisable to read it. Also, most things I have bolded above either has a man-page (type man <whatever> in a console for the manual page) or in the case of src2pkg, Google it and one of the first results of the search will be the src2pkg official webpage.

Sasha

james2b 08-04-2009 03:21 AM

That does help, so then the built in package tool; pkgtool installs only the packages as .tgz file type, (compressed tar archive files)? And then that slackpkg tool just gets what's available on my chosen Slackware mirror download site, only for my installed Slackware 12.1 version, and compiles the binary files from source code, is that correct then ? Or can both of those install by either method also ?

brianL 08-04-2009 04:02 AM

All Slackware packages end in .tgz (except most of those for current, which end in .txz). Some "ordinary" source archives end in .tgz, they're the same as .tar.gz. Slack package names are a different format, they will be for example: ntfs-3g-2009.4.4-i486-1.tgz, whereas the "ordinary" source archive will be ntfs-3g-2009.4.4.tgz.
Like Sasha says, you need to read all the documents that come with Slackware.

GrapefruiTgirl 08-04-2009 09:05 AM

Quote:

Originally Posted by brianL (Post 3630537)
All Slackware packages end in .tgz (except most of those for current, which end in .txz). Some "ordinary" source archives end in .tgz, they're the same as .tar.gz. Slack package names are a different format, they will be for example: ntfs-3g-2009.4.4-i486-1.tgz, whereas the "ordinary" source archive will be ntfs-3g-2009.4.4.tgz.
Like Sasha says, you need to read all the documents that come with Slackware.

Methinks you made a booboo there BrianL :)

That should read:

"..whereas the "ordinary" source archive will be ntfs-3g-2009.4.4.tar.gz.."

Sasha

GrapefruiTgirl 08-04-2009 09:12 AM

Quote:

Originally Posted by james2b (Post 3630504)
That does help, so then the built in package tool; pkgtool installs only the packages as .tgz file type, (compressed tar archive files)?

Yes, pkgtool EXTRACTS or EXPLODES the archive, and puts all the binaries and config files into their correct locations throughout the system.

Quote:

And then that slackpkg tool just gets what's available on my chosen Slackware mirror download site, only for my installed Slackware 12.1 version,
Yes..

Quote:

and compiles the binary files from source code, is that correct then ?
No. The packages that Slackpkg downloads are ALREADY compiled from source, and built into binaries and whatnot, adn rolled up into a package, ready for installation..

Quote:

Or can both of those install by either method also ?
Slackpkg and pkgtool BOTH install packages. Neither of them actually BUILD backages from sourcecode. This is done often by a separate tool called 'src2pkg', OR by building the package yourself by running ./configure, make, and make-install to a safe location or a 'build destination' and then running the pkgtool command "makepkg" to turn the compiled stuff into a installable package.

Sasha

brianL 08-04-2009 09:18 AM

Quote:

Originally Posted by GrapefruiTgirl (Post 3630885)
Methinks you made a booboo there BrianL :)

That should read:

"..whereas the "ordinary" source archive will be ntfs-3g-2009.4.4.tar.gz.."

Sasha

No, James said it was a .tgz in his original post.
http://www.ntfs-3g.org/
:)

GrapefruiTgirl 08-04-2009 09:36 AM

Quote:

Originally Posted by brianL (Post 3630904)
No, James said it was a .tgz in his original post.
http://www.ntfs-3g.org/
:)

Hmmmm.. Oh! OK, I wonder if in that case, he had renamed a tar.gz into a .tgz and that was what led to this discussion to start.

:) I guess we should wait to see what he has to say.

Sasha

brianL 08-04-2009 09:44 AM

The source file is ntfs-3g-2009.4.4.tgz from the site. This has caused confusion with new Slackers before, "ordinary" source archives and Slackware packages both having the suffix .tgz.

GrapefruiTgirl 08-04-2009 09:47 AM

Ugh! OK,I didn't realize that. Thanks Brian for clarifying.

dive 08-04-2009 05:57 PM

Hopefully that confusion will end when we all start using txz packages.

Look for a slackbuild for things you want to install at http://www.slackbuilds.org If you can't find what you are looking for then you can try making your own slackbuild. Instructions and a template slackbuild are also on the site.

If all else fails then by all means try out src2pkg. It works quite well. It isn't included wih slackware and I'm not sure if it will be yet (it took a while for slackpkg to be included).

Hope this helps.

rg3 08-05-2009 10:24 AM

I wrote this some time ago. The whole article is fine, but you may want to go directly to the last section:

http://www.slackwiki.org/Life_of_a_S...ware_specifics

brianL 08-05-2009 11:05 AM

Good article, rg3. There's plenty of documentation for Slackware: with the distro itself, Slackbook(s), on wikis, etc. Getting people to read a bit before they dive in head-first is the problem.
We'll have to wait to see if james2b sorted things out.


All times are GMT -5. The time now is 12:52 AM.