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 used pkgtool to install a tar.gz tonight, and it worked fine.
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!
So, I used this program one time...and now it's broken? What gives? (I also tried cd-ing into that directory and then running pkgtool...same thing happens....)
Help!
Last edited by Sumguy; 06-11-2014 at 11:17 AM.
Reason: Changed thread title
Well, tar.gz files are not meant to be installed with pkgtools. They are usually either .tgz or .txz.
And does it give you an error message? What steps did you take?
No error message- just dumps me back to the command prompt.
So there were no valid Slackware packages it seems. Just tar archives. Slackware are compressed tar archives but not all compressed tar archives are Slackware packages.
Quote:
Originally Posted by Sumguy
Meh...I just learned how to install tar.gz's manually.
While you can compile and install source packages by hand it is not for everyone (uninstall can often be tricker). If your object is simply to install some piece of commonly found software, there is probably already a Slackware package (or SlackBuild) so you will not need to compile from source and manually install.
As a general rule of thumb, take a native packages first and only manual source compile if you have some specific requirements that make it necessary.
So there were no valid Slackware packages it seems. Just tar archives. Slackware are compressed tar archives but not all compressed tar archives are Slackware packages.
That's what I was kind of thinking, after what Moisespedro said- it just seems weird that it would just dump ya back into a command prompt if it doesn't find any packages that it recognizes- but I guess that's the way it is.
Quote:
Originally Posted by ruario
While you can compile and install source packages by hand it is not for everyone (uninstall can often be tricker). If your object is simply to install some piece of commonly found software, there is probably already a Slackware package (or SlackBuild) so you will not need to compile from source and manually install.
As a general rule of thumb, take a native packages first and only manual source compile if you have some specific requirements that make it necessary.
Funny thing is, I don't need to install much- and the one thing I do want to install, is the one game I play [Emilia pinball] for which there doesn't seem to be a Slackbuild. Half of my motivation for wanting to install it, is just to learn to do it, in Slack. There are so many options- Slackpackage; SBOpkg; Pkgtool; etc. and some of them, like Slackpackage, seem to involve as many steps as doing it manually- so my thinking is kind of along the lines: Just learn to do it manually, and then I can do anything; and that way, I'll only have to learn one thing, instead of 5 or 6 different procedures.
Doing ./configure; make; make install; make clean, seems like the easiest way...until, of course, something goes wrong, eh?
One question, while I have you guys:
If I need to install a dependency- I just install it first [before installing the program that needs it] as if I were installing a stand-alone package- and then just install that initial program that I want, which needed that dependency? [I think my error may have been that I didn't have a dependency installed].
I find Slackware no more difficult to use than any other distro- and like it very much. Just the package management can be a little daunting, for a noob like me- but once I get it figured out, Slackware is going to be SWEET!
Funny thing is, I don't need to install much- and the one thing I do want to install, is the one game I play [Emilia pinball] for which there doesn't seem to be a Slackbuild.
So make one, or at least make a package by hand! Honestly it is not that hard and there are people here who could assist you if you get stuck. In its very simplest form something like the following will often work.
Unpack the tar (I'm using the fake package 'foo' as an example):
Code:
tar xvf foo-1.tar.gz
Switch into the directory that was created:
Code:
cd foo
Do the usual configure and make:
Code:
./configure
make
Now we try a little magic in the form of DESTDIR. Not every makefile supports it but those that do will allow you to redirect the install to another location. I would try this step first as a regular user and only when you see that it works as expected you can try it again as root (having first cleared the /tmp/foo-build directory):
Code:
make DESTDIR=/tmp/foo-build install
Note: If setting a DESTDIR does not work, you could always post back here and we can suggest other options.
Assuming it did work (after running it the second time as root), cd into the directory as root and run makepkg, like so:
Code:
cd /tmp/foo-build
makepkg ../foo-1-x86_64-1.txz
If all went to plan you now have /tmp/foo-1-x86_64-1.txz, which can be installed as normal, like so:
Code:
installpkg /tmp/foo-1-x86_64-1.txz
A SlackBuild is really just a collection of all of these steps, e.g. a very rough and ready SlackBuild might look like this:
Code:
tar xvf foo-1.tar.gz
cd foo
./configure
make
rm -fr /tmp/foo-build
make DESTDIR=/tmp/foo-build install
cd /tmp/foo-build
makepkg -l y -c n ../foo-1-x86_64-1.txz
Making a SlackBuild will benefit you (you can reuse it on multiple machines you own or if you upgrade and want to rebuild) and possibly others who might want to try this game themselves. It is also a great learning exercise and empowers you in the future, as you may come across other applications you miss or want to try.
Of course if you really can't face it, manually installing from source is an option. But you should understand what this means. A straight 'make install' can be risky. It depends entirely on how carefully the make file has been crafted. It could potentially write files to locations it should not and hence break your system. Granted most will not do this but it is a risk you should be aware of. Another issue for many is the lack of reliable uninstall. Some makefiles have a "make uninstall" option, however not all of them and even of those that do some are broken or untrustworthy. Thus if you ever decide to remove (or upgrade) the software you may find yourself with a mess to clean up as makefiles tend to scatter files over the file system.
Quote:
Originally Posted by Sumguy
Half of my motivation for wanting to install it, is just to learn to do it, in Slack. There are so many options- Slackpackage; SBOpkg; Pkgtool; etc. and some of them, like Slackpackage, seem to involve as many steps as doing it manually- so my thinking is kind of along the lines: Just learn to do it manually, and then I can do anything; and that way, I'll only have to learn one thing, instead of 5 or 6 different procedures.
It is funny you picked on slackpkg because this is perhaps the easiest to use and is not at all comparable to manually compiling and installing from source. If the package exists in the repository you installed it with:
Code:
slackpkg install foo
That is it!
At the end of the day however, slackpkg and sbopkg are just front ends to the pkgtools (installpkg, upgradepkg, removepkg and pkgtool). This is similar to the way APT is a front end to dpkg on Ubuntu and Debian.
FWIW, you do not need slackpkg or sbopkg (I have one system with neither installed), though they are a very handy convenience (so I am not suggesting you go without).
Quote:
Originally Posted by Sumguy
Doing ./configure; make; make install; make clean, seems like the easiest way...until, of course, something goes wrong, eh?
Until something goes wrong or you want to uninstall.
Quote:
Originally Posted by Sumguy
One question, while I have you guys:
If I need to install a dependency- I just install it first [before installing the program that needs it] as if I were installing a stand-alone package- and then just install that initial program that I want, which needed that dependency? [I think my error may have been that I didn't have a dependency installed].
Yes, install the dependencies first. If not make will fail. Then install them and try make again.
Last edited by ruario; 06-11-2014 at 03:47 AM.
Reason: changed reliable install to reliable uninstall :D; changed staging to foo-build in the examples
In addition to ruario, you can primarily check the Makefile[s] to see if they respect a DESTDIR variable.
In the source directory
Code:
cat Makefile* | grep DESTDIR
For the case in which this variable is not supported; you can adjust the configure to place an install in your staging directory by setting parameters.
e.g.
Code:
./configure --prefix=/tmp/staging
You might need configure a few additional parameters: running ./configure -h will produce a help page (well if its a gnu configure script) where you can explore all your options.
After this make && make install should be brilliant.
There are also tools which may help in these cases such as checkinstall (I have used this before when I was in a time constraint; deb2tgz and or rpm2tgz may additionally become useful if time constraint to get something up and running + the something involves a dependency hell) or src2pkg (I have no experience but I'm sure others will have positive comments).
Happy slacking!
Last edited by maciuszek; 06-10-2014 at 04:32 PM.
Reason: 's,extra/,extra/source,g'
Trouble is, all these different scenarios have my head spinning. I've just recently gotten somewhat proficient at doing the basic CLI stuff. I'm still in the dark about compiling/building/installin.....
If I could do it properly one, I think I might then get comfortable enough with it to understand the process better.
(I actually downloaded deb2tgz- figuring that that would come in handy sooner or later...but I haven't tried installing it yet. I suspect that it would be an easier install- so maybe I'll give it a try)
If any of you guys have some time on your hands, here is a link to what I was trying to install:
If anyone might be so inclined to download it and give it a quick look, and then tell me EXACTLY what I need to do [Like, with specific commands listed one by one....] I might just "get it". I tried watching a few tutorials on youtube, which usually do the trick for me- but they were a little too advanced/went too quickly.
I realize that this is a lot to ask- but maybe someone reading this may also like the game and want to try it/or has already installed it in Slack? (I can't believe that no one has made a Slackbuild for it- it seems to be a popular game, and is offered in the repos of virtually every other distro I've tried....)
Hey, I'm not complaining- I knew what I was getting into when I installed Slackware- and that was actually one of my reasons for wanting to use Slack- knowing that it would force me to learn. I have Slack dual-booted on both my desktop and laptop- specifically so I can try it with impunity and not have to worry too much if i screw it up....
If it makes any difference: I left the tar.gz file in my Downloads folder, and CDed into that to build it. Could that be a problem? And I did the whole thing while looged in as root....(Thinking it would avert any potential permissions problems).
I'm going to go and re-read the README more thoroughly, and try and take it slow and do a little tinkering..... One way or another, I'll "get" this, sooner or later- and then [hopefully] I'll be able to look back and think "What was my problem? This is a piece of cake!".
Last edited by Sumguy; 06-10-2014 at 05:03 PM.
Reason: Corrected link
You're right! I was logged into my other OS- but now I'm back in Slack, and went and found the link that I actually used- and it's the same as the one you posted. I'll go back and correct it in my previous post.
I'd certainly appreciate your Slackbuild.....but I do have to learn to do this stuff myself, too. [Although studying your Slackbuild would also be a learning experience, I'm sure)
Maybe I could use your Slackbuild on my desktop- and then eventually try it manually on my laptop. (As soon as I get the basics of package management down-pat, I will use Slackware as my primary OS- I can see Slackware's superiority already; and want to use it full-time)
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
pinball: pinball
pinball:
pinball: The Emilia Pinball Project is a pinball simulator for GNU/Linux
pinball: and other Unix systems. There is only one level to play with,
pinball: but it is very addictive.
pinball:
pinball:
pinball: Homepage: http://pinball.sourceforge.net/
pinball:
pinball:
pinball:
gcc45.patch
Code:
diff -ur pinball-0.3.1/base/Config.cpp pinball-0.3.1_fixed//base/Config.cpp
--- pinball-0.3.1/base/Config.cpp 2003-11-21 05:59:09.000000000 -0200
+++ pinball-0.3.1_fixed//base/Config.cpp 2010-11-30 19:27:11.952939021 -0200
@@ -397,8 +397,8 @@
}
///!+rzr this workaround Full path to relative ones, usefull for windows port
-bool isAbsolutePath(char const * const argv0 ) ;
-bool isAbsolutePath(char const * const argv0 )
+bool isAbsolutePath(char * const argv0 ) ;
+bool isAbsolutePath(char * const argv0 )
{
//EM_COUT(" check root drive c:\\ // absolute path - check for wine ?", 42);
bool t = false;
@@ -415,7 +415,7 @@
}
/// TODO; make it more robust for stranges paths
/// (ie "c:\\d/i//r\like\\\\this/\\/") , wine virtual pc etc
-void Config::setPaths(char const * const argv0) {
+void Config::setPaths(char * const argv0) {
// EM_CERR("+ Config::setPath");
//!+rzr : make it work also in relative paths use
// and "/long path/quoted/paths/" etc
Only in pinball-0.3.1_fixed//base: Config.cpp~
diff -ur pinball-0.3.1/base/Config.h pinball-0.3.1_fixed//base/Config.h
--- pinball-0.3.1/base/Config.h 2003-11-20 14:46:16.000000000 -0200
+++ pinball-0.3.1_fixed//base/Config.h 2010-11-30 19:28:17.076265440 -0200
@@ -87,7 +87,7 @@
void loadConfig();
void setDefault();
/// set RELATIVE path according to current work directory of exec
- void setPaths(char const * const argv0); //!+rzr
+ void setPaths(char * const argv0); //!+rzr
private:
int m_iWidth;
#!/bin/sh
# Slackware build script for pinball
# Copyright 2014 Matthew Kuzminski
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=pinball
VERSION=${VERSION:-0.3.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_mK}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/mK}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX=""
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xzvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
#patch -Np1 -i $CWD/gcc45.patch
patch -Np0 -i $CWD/pinball-0.3.1-cstddef.patch
patch -Np1 -i $CWD/pinball-0.3.1-hiscore.patch
patch -Np0 -i $CWD/pinball-0.3.1-lacomment.patch
patch -Np0 -i $CWD/pinball-0.3.1-strictproto.patch
patch -Np1 -i $CWD/pinball-0.3.1-sys-ltdl.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--localstatedir=/var \
--sysconfdir=/etc \
--mandir=/usr/man \
--disable-sdltest \
--build=$ARCH-slackware-linux
make || exit 1
make install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
AUTHORS COPYING NEWS README \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
create new a directory.. call it whatever you want (pinball is a smart name)
create all those files and populate them
check the pinball.info for the download and md5sum info
download into said directory
run the slackbuild as root (sh pinball.SlackBuild)
install it from /tmp (installpkg /tmp/pinball-0.3.1-i486-1_mK.tgz)
I do not plan on maintaining this, so feel free to create a README, submit it to SBo and maintain it yourself .
Have fun
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.