Showing posts with label Slackware Linux. Show all posts
Showing posts with label Slackware Linux. Show all posts

Easy Way to Install and Maintain Multilibs with Slackware (Updated Way)

How to Install and Maintain Multilibs in Slackware with slackpkg+ 

(Easy Updated Way, Tested working in Slackware Current, it should work for Stable as well, just make sure to track the repos for stable for stable and current for current)

- Install Multilib in Slackware Current, and Keep the Multilib Enabled Slackware - Current up-to-date with slackpkg+:

1.) Install the latest binary package from slackpkg+
2.) Edit slackpkg.conf file with your desired editor, for examples emacs and nano are used:

# emacs -nw /etc/slackpkg/slackpkgplus.conf 

you can also use vim or nano for example:

# nano /etc/slackpkg/slackpkgplus.conf

add this line to the mirrorplus list:

MIRRORPLUS['multilib']=http://bear.alienbase.nl/mirrors/people/alien/multilib/current/

3.) Then in REPOPLUS array add the entry - multilib , typically best right after slackpkgplus entry so it would look like this:

REPOPLUS=( slackpkgplus multilib restricted alienbob ktown mate )
#priority repo list: order of left priority, right less priority                           

4.) Save, then exit and run these commands in order, line after line:
# slackpkg update gpg
# slackpkg update
# slackpkg upgrade-all
# slackpkg install multilib


(Optionally: Another way is to install slackpkg+ then run this command to automatically setup everything that is to be done with the instructions above:

# /usr/doc/slackpkg+-*/setupmultilib.sh

To uninstall re-run the same command again)


To keep multilib up-to-date:
After that, you can keep multilib up-to-date by running these commands in order, line by line:
# slackpkg update
# slackpkg upgrade-all
# slackpkg install multilib


*To uninstall multilib, edit the slackpkgplus.conf file located in /etc/slackpkg/slackpkgplus.conf and remove 'multilib' from PKGS_PRIORITY and REPOPLUS arrays, but do NOT delete the related MIRRORPLUS line, then run the following commands:

# slackpkg update
# slackpkg remove multilib

Note: this does NOT remove the core multilib packages, because they affect the 64bit system. Remove these with the following commands:


# slackpkg upgrade-all

then delete or comment the related MIRRORPLUS line, then run:

# slackpkg update


NOTE: This is a very basic sample slackpkg+ config file could look like with multilib setup:

SLACKPKGPLUS=on
VERBOSE=1
ALLOW32BIT=off
USEBL=1
WGETOPTS="--timeout=20 --tries=2"
GREYLIST=on

PKGS_PRIORITY=( restricted alienbob ktown mate )
REPOPLUS=( slackpkgplus multilib restricted alienbob ktown mate ) #priority repo list: order of left priority, right less priority                           

MIRRORPLUS['slackpkgplus']=http://slakfinder.org/slackpkg+/
MIRRORPLUS['restricted']=http://bear.alienbase.nl/mirrors/people/alien/restricted_sbrepos/current/x86_64/
MIRRORPLUS['alienbob']=http://bear.alienbase.nl/mirrors/people/alien/sbrepos/current/x86_64/
MIRRORPLUS['multilib']=http://bear.alienbase.nl/mirrors/people/alien/multilib/current/
MIRRORPLUS['ktown']=http://bear.alienbase.nl/mirrors/alien-kde/current/latest/x86_64
MIRRORPLUS['mate']=http://slackware.uk/msb/current/1.15/x86_64/


NOTE: Using this method with slackpkg+ to Install and Keep Multilib up-to-date in Slackware Current, this is definitely easier than the old way, and you can do the initial setup manually or with /usr/doc/slackpkg+-*/setupmultilib.sh script in slackpkg+


Tips and a Fix for Troubleshooting Common Problems with slackpkg/slackpkg+:

- When errors happen first check the slackpkg+ config file, and the mirror list at /etc/slackpkg/mirrors and /etc/slackpkg/slackpkgplus.conf , make sure there are no typos or using of capital letters in the urls and make sure its all setup as mentioned above.
- Before installing and upgrading with slackpkg/slackpkg+, issue these commands first: 

# slackpkg update gpg
then
# slackpkg update
- Sometimes the urls in the mirrors are not up-to-date in this case you have to check and find the right urls that work
- To avoid problems use urls that are the same version as the system you use, so use urls with current when using current, or 14.2 with 14.2
- If you run into an error that says you have duplicate packages that are conflicting in /var/log/packages, what you have to do is check that directory of any packages that have either a duplicate of the same package or
essentially 1 package with double or multiple versions like foo_ver1.1 and foo_ver1.2 , all you have to do is remove the problematic package in this case  the older one, and it should work.

example issue duplicate slackpkg version conflict:

- When running slackpkg upgrade-all as below you come into contact with such an error:

# slackpkg upgrade-all

NOTE: Remember to re-run 'slackpkg update' after modifying slackpkgplus.conf

Checking local integrity... DONE
You have a broken /var/log/packages - with two versions of the same package.
The list of packages duplicated in your machine are shown below, but don't
worry about this list - when you select your action, slackpkg will show a
better list:

slackpkg-2.82.1-noarch-1

You can (B)lacklist, (R)emove, or (I)gnore these packages.
Select your action (B/R/I): 


- Issuing the command removepkg on slackpkg will not fix this issue, even if you reinstall slackpkg, instead issue this command: 
# ls /var/log/packages | grep slackpkg
- Fortunately the error gave the hint of the program that is causing the problem, so you get a list that looks something like this for example where you see the duplicate issue

slackpkg+-1.7.0-noarch-4mt
slackpkg-2.81.1-noarch-1
slackpkg-2.82.1-noarch-1

- So you just uninstall the older or problematic version with this command: 
# removepkg /var/log/packages/slackpkg-2.81.1-noarch-1
- Now things should be back to normal, run the # slackpkg upgrade command now and it should work

NOTE: Before installing STEAM and VirtualBox, Wine and PlayonLinux on Slackware make sure to setup and install multilib in slackware first

Reference Links:
- "http://slakfinder.org/slackpkg+.html"
- "http://alien.slackbook.org/blog/introducing-slackpkg-an-extension-to-slackpkg-for-3rd-party-repositories/"
- "http://docs.slackware.com/howtos:slackware_admin:systemupgrade"
- "http://docs.slackware.com/slackware:multilib"
- "http://slakfinder.org/slackpkg+/src/README"
- "https://www.youtube.com/watch?v=AtLM3sjLT7U" *Linux4UnMe Channel basically mentions he used slackpkg+ to install multilibs in his slackware linux system, but doesnt explain how he did it, anyways i have tried to explain how to do this in detail above 

Installing Binaries from Archlinux Packages into Slackware

Installing Binaries from Archlinux Packages into Slackware

*USE AT YOUR OWN RISK

- Sometimes you just want to use a quick and lazy binary in Slackware for whatever reason, Arch Linux uses the same vanilla apps just like slackware and uses the same format of a tarball compressed in xz, best of all they have updated packages, just make sure you have the dependencies or install the necessary dependencies already.

- To use a package from Archlinux Packages, search and choose the package/s, then download

- pkgtool in Slackware can install this package by the typical command installpkg, but it will say some error if you install it as is, even if the package is vanilla stock and with the same tarball and compression, to workaround this, change the file extension of the package, for example: foo_pkg.tar.xz to foo_pkg.txz

- Install with installpkg command:

$ sudo installpkg foo_pkg.txz

- And it should install, I've done this a bunch of times, especially when I can't find other quick install solutions from other repos for binaries or various slackbuild scripts are problematic and building from source is problematic, this is the fastest lazy hack to install packages, removing the package is the same as using the removepkg command from pkgtool.


- That's all.

Various ways to install packages in Slackware Linux

Various ways to install packages in Slackware Linux:


1.) Slackpkg
2.) Slackbuilds and Sbopkg
3.) Pkgtool and installpkg
4.) Classic Compile from Source with Make:
    - After the downloading the source files (recommended in /usr/local/src/), cd to /usr/local/src Read any readme or text or instructional files included.
    - Extract to a directory, by GUI extract or command line:
[tar] - Extract (unpack) a TAR File
$ tar -xvf foo.tar

[tar.gz] - Extract and Uncompress a TAR File Compressed with GZIP
$ tar -xvzf foo.tar.gz

[tar.bz2] - Extract and Uncompress a TAR File Compressed with BZIP2
$ tar -xvjf foo.tar.bz2

    - Go into that directory and issue the commands in order, $ as user, # as root.
    $ ./configure
    $ make
    # make install
    # make clean 

When you want to uninstall it, you do the following:

    $ cd /usr/local/src/foo
    as root
    # make uninstall 

5.) Compile and install with Checkinstall:

Classic Compile from Source with Make:
    - After the downloading the source files (recommended in /usr/local/src/), cd to /usr/local/src Read any readme or text or instructional files included.
    - Extract to a directory, by GUI extract or command line
    - Go into that directory and issue the commands in order, $ as user, # as root.
    $ ./configure
    $ make
    # checkinstall 
(When called with no arguments, checkinstall will call "make install". If you need other arguments, they can be supplied)
(As optional like this ff -
# checkinstall make install_package
)


The difference with Checkinstall and make install, is that checkinstall tracks the package, so to uninstall it, just check /var/log/packages and use removepkg foo,
to uninstall.


6.) Src2pkg

How to Enable Multimedia in Slackware Linux

How to Enable Multimedia in Slackware Linux

There was an excellent article on how to enable Multimedia on a Slackware Linux system in a blog called Human Readable, that was deleted, well whatever the case its been made no longer available, it did have a lot of outdated stuff but for the most part was a good guide, it just now mentions for everyone to have a look at the slack docs, which for me still lacks in at least defining which are the most useful packages and codecs people should install to enable most any common multimedia use (from listening to plain old .mp3 to playback of DVD encrypted or otherwise, other options etc.) on your Slackware System, aside from typical power programs like VLC or Mplayer and Xine, I mean I mention them here too, but just in case you want to use other apps and options than these you need other certain things too, to install.

The Short of it would be to install flashplayer-plugin, vlc and maybe a java JRE whether oracle or openjdk for those java apps and web plugin (you can find flash, vlc and opendjk in slackbuilds.org for oracle you have to go to oracle website and download it from there due to license issues). The VLC package itself has many dependencies you need to compile and install to be able to run VLC for a detailed look of the packages continue reading below.

Here I list the programs/packages you need to install, you can choose which combos you'd like to install for your multimedia choices, I tried to order a few combos

Multimedia:

Install these codecs in order from left to right:

C1: (enables most common multimedia functions)
jdk flashplayer-plugin smplayer xine-plugin gst-plugins-bad gst-plugins-ugly a52dec faad2 flac123 twolame lua portaudio libavc1394 libdca libdv libdvbpsi libdvdcss libdvdnav libebml libmatroska libmodplug libmpeg2 speex libshout libupnp orc schroedinger vcdimager libmp4v2 faac libcuefile libreplaygain musepack-tools lame xvidcore x264 opus libass libdc1394 live555 libquicktime mplayer-codecs

C2: (enables most common need multimedia functions plus ability to compile and set all features of VLC and FFMPEG)
jdk flashplayer-plugin smplayer xine-plugin gst-plugins-bad gst-plugins-ugly a52dec faad2 flac123 twolame lua portaudio libavc1394 libdca libdv libdvbpsi libdvdcss libdvdnav libebml libmatroska libmodplug libmpeg2 speex libshout libupnp orc schroedinger vcdimager libmp4v2 faac libcuefile libreplaygain musepack-tools lame xvidcore x264 opus libass libdc1394 live555 libquicktime openal mplayer-codecs openjpeg opencore-amr rtmpdump libvpx gsm celt opencv gavl frei0r libaacs graphviz apache-ant libbluray libsigsegv texlive ffmpeg vlc

 C3: (enables what both C1 and C2 offered features, but including various other power tools for converting and editing multimedia files and support for such)
jdk flashplayer-plugin smplayer xine-plugin gst-plugins-bad gst-plugins-ugly a52dec faad2 flac123 twolame lua portaudio libavc1394 libdca libdv libdvbpsi libdvdcss libdvdnav libebml libmatroska libmodplug libmpeg2 speex libshout libupnp orc schroedinger vcdimager libmp4v2 faac libcuefile libreplaygain musepack-tools lame xvidcore x264 opus libass libdc1394 live555 libquicktime openal mplayer-codecs openjpeg opencore-amr rtmpdump libvpx gsm celt opencv gavl frei0r libaacs graphviz apache-ant libbluray libsigsegv texlive ffmpeg vlc aften amnrnb scons libiec61883 mm-common libsigc++ glibmm libxml++ libffado jack-audio-connection-kit avidemux mjpegtools libmpeg2 k9copy libmspack wxpython vamp-plugin-sdk soundtouch audacity


Build option variables:

- BDJAVA=yes for libbluray
- ASS=yes BLURAY=yes CELT=yes DC1394=yes FAAC=yes FREI0R=yes GSM=yes JP2=yes LAME=yes OPENAL=yes OPENCORE=yes OPENSSL=yes RTMP=yes SCHROEDINGER=yes SPEEX=yes VPX=yes X264=yes XVID=yes for FFMPEG if you want the full effect
- A52DEC=yes FAAC=yes LIBDV=yes LIBMPEG2=yes MJPEGTOOLS=yes QUICKTIME=yes X264=yes XVID=yes for transcode
- FFMPEG=yes SOUNDTOUCH=yes TWOLAME=yes VAMP=yes for Audacity

Others:

- Make sure to read the info of anything you install upstream or slackbuilds, it will help you configure and compile
- All files available from slackbuilds, binaries can be found in various repos, a notable mention for alien bob's restricted repos for vlc and ffmpeg
- Make sure to run slackbuild of ffmpeg in a real root shell ("su -")
- texlive is a huge 1.3G+ download and build, make sure you have space and a big /tmp
- gst-plugins-good and openssl are part of Slackware default stock install, make sure you install them, as they can be useful, especially if you want to enlable
openssl in FFMPEG build by passing variable build option in the slackbuild of FFMPEG
- mplayer and kplayer, along with xine and xmms are also part of a default slackware stock install, make sure you install them if you dont do a full stock vanilla
install
- When using ffado as a normal user you might run into permission problems with access to /dev/raw1394. To solve that issue you can add the line
KERNEL=="raw1394", GROUP="disk" to /lib/udev/rules.d/65-permissions.rules and make your user is/are a member of the disk group.
- Jack-audio-connection-kit when started as normal user, must be with the following command:
$ sudo setcap cap_ipc_lock,cap_sys_nice=ep /usr/bin/jackd
- In installing transcode, do so right after mjpegtools, except you'd have to run either x86/32 or a multilib slackware as its only for i486
- Lua mentioned here is at version 5.1 not 5.2
- Java apps run on jre, alot of apps and if you do development need jdk, jdk includes jre, but a jre package doesnt include jdk, my recommendation is to install jdk

How to Install Programs from SlackBuilds.org to your Slackware Linux System

How to Install Programs from SlackBuilds.org to your Slackware Linux System:

While SlackBuilds.org provides their own HOWTO version, I try to write one for them, in another way, a more detailed though still in pedagogical order for newbies, just incase their article doesn't find your fancy. This is written for People new to Slackware or newbies to Linux, but have successfully installed a slackware system, which isn't all that hard to begin with especially in the more later versions like 12.x or 13.x , if the text install didn't scare you off from installing Slackware then this tutorial shouldn't do much further scaring as well then.

* All commands to be typed in the terminal are indicated as underlined text. *


My Foolish Assumptions:

- I assume you know how to follow instructions, read and comprehend english.

- That you know what the terminal console is and can navigate and input basic commands. If you installed Slackware Linux, and can start a desktop environment such as KDE4, XFCE, LXDE and others on Slackware or better yet, just fully use the CLI, you should have some form of these basics.

- You have your stock Slackware System up and running and an internet connection, or one in a Virtual Machine with an internet connection.

- You have root priviledges to your system.

- I assume you have either a 32 bit or 64 bit PC system. to find out what system you have, at the terminal type in -   uname -m , the output is the one you will you use later on, for example if you got the 64 bit system it will say = x86_64

- You can use both the GUI for the Graphical and the CLI, or even better just the CLI. In this tutorial you can do use a mix of GUI and CLI, but not just fully GUI but this tutorial is entirely possible to use for CLI only, it's actually preferred, and the more you use slackware and Linux or Unix type systems the more you will use the terminal so why not get used to it.

- Know how to use a text editor. Examples: gedit, kwrite, kate, geany, leafpad, mousepad, vi/vim/gvim, emacs, xemacs, nano.

- You do not need to have shell scripting knowledge.

- Some experience with an easy to use hand holding Linux Distribution (like Ubuntu, Mandriva, Mageia, etc-etc.) or other OS with some minimal CLI experience, will really help you out.








The Basics in 11 steps:

(Good luck and do not be afraid, it really isn't that hard!)


1. Go to SlackBuilds.org website and either click the Repositories button and navigate through there to the program you want to install or type in the program your looking for in the search bar provided in slackbuilds, make sure to use the package made for the version for your system the default is usually the latest version at the time of this writing it was 13.37.

2. As an example I will use the program unrar, to keep things simple as it doesn't need any other packages or dependencies as it is normally called in linux terms to install before it. So go to the unrar program page of SlackBuilds.org.

3. In this page the following data will show, due to future changes the page could be different or totally changed however the slackbuilds.org have a set of rules that submitters for programs for slackbuilds follow, just pay attention to basics and you can easily adapt to changes and other variations. As of this writing the following data is found on the said unrar program in slackbuilds.


For this example I will use the needed live links so you may experiment from this tutorial.


SlackBuilds Repository

13.37 > System > unrar (4.0.7)


WinRAR is a powerful archive manager. Unrar is an opensource subset
of RAR from rarlab that can uncompress RAR images.

Maintained by: Niklas 'Nille' Åkerström
Approved by: dsomero
Keywords: rar,winrar,extract,compression,compress,zip,archive

Homepage:
http://www.rarlab.com
Source Downloads:
unrarsrc-4.0.7.tar.gz(41b0a9bca945b4ae2608421afd8f606e)

Download SlackBuild:
unrar.tar.gz
unrar.tar.gz.asc (FAQ)

(the SlackBuild does not include the source)
Individual Files:
• README
• slack-desc
• unrar.1
• unrar.SlackBuild
• unrar.info


- There are 2 live links here, the 2 live links could change in the future and end up broken, but the tutorial will still be adequate enough to show how to install.

- You should read whatever information each package contains, like the README, slack-desc, info, etc-etc just incase or other such info however for the most part, what I show you here are the most needed fundamental/s.

- FYI SlackBuilds website doesn't actually keep the binaries or source codes in their servers as a policy, so all links are external to slackbuilds.org, just the slackbuild scipts are hosted by them.

4. Anyways, First create a directory to hold the SlackBuild scripts, such as SlackBuilds for a directory..., great!, type in or paste the following command in your terminal - mkdir SlackBuilds

- You can change the name of the directory to whatever you like, but for this tutorial I use SlackBuilds for the name of that directory. After creating the directory, navigate into it, using the cd command -       cd SlackBuilds

5. So then you need to download the source download,you can either do that by clicking the link unrarsrc-4.0.7.tar.gz(41b0a9bca945b4ae2608421afd8f606e) by your browser or use copy link with your mouse, and paste it to your downloader, I prefer to use the terminal, so click your terminal program,
at the prompt(usually an $ for a normal user and a # for the root user)
type wget then click the space button on your keyboard and paste the url in or type it in, press enter

Example: - $ wget http://www.rarlab.com/rar/unrarsrc-4.0.7.tar.gz

Wait for it to finish downloading, or simultaneously Download the SlackBuild

And do exactly the same as you did for the one above.

Example: - $ wget http://slackbuilds.org/slackbuilds/13.37/system/unrar.tar.gz

Wait for it to finish downloading.

6. Once you've Downloaded both packages, extract the slackbuild.

- From the terminal, Type $ tar -zxvf unrar.tar.gz to extract the file to the current directory. Now you have a new directory called unrar.

- You can do this in your GUI by usually right clicking your mouse button the package.tar.gz and choosing the option extract here.

7. Move the unrarsrc-4.0.7.tar.gz inside the new unrar directory, by terminal -
$ mv unrarsrc-4.0.7.tar.gz unrar/

- By Graphical, click or highlight the unrarsrc-4.0.7.tar.gz file and drag it into the unrar directory or do a copy and paste into or a cut and paste into the directory.

8. Once the unrarsrc-4.0.7.tar.gz is inside the unrar directory, you should read the text files that it comes with, but more importantly, you need to find the SlackBuild script it will be named like this unrar.SlackBuild (or generically file.SlackBuild), from there make it executable with this command if it isn't already to play it safe just issue the command like so -
$ chmod +x unrar.SlackBuild

9. Open the unrar.SlackBuild with your chosen editor, Look for an ARCH text at the top of the file after all the comments - in this example it will be this:

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

- Do replace the i486 value with x86_64 if your system is a 64 bit otherwise it is likely a 32 bit and you need not change the value, as stated at the start of this tutorial to find out what your system is at the terminal type in :   uname -m
the value to print out is your system. And FYI an i386, i486, i686 are all 32 bit systems and are not x86_64 or 64 bit systems.

example for 64 bit change:

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=x86_64 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi


- And make sure also that the package source download version you have is the same as the one mentioned in the SlackBuild script in this example it is this:

example:

PRGNAM=unrar
VERSION=4.0.7
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}


- And as in this SlackBuild script and our package both at version 4.0.7 meaning they are the same, and that means that you need not change anything in this file. If however the version we had was newer for the source package downloaded say 4.0.9, you must edit the VERSION value and change it to VERSION=4.0.9 in the script, save and exit the editor program.

example for 4.0.9:

PRGNAM=unrar
VERSION=4.0.9
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}


10. Now it's time to build the program, from the command line, change into root, by typing in the terminal, and yes the space and the dash, matter :    su -

- And press enter, and input your root password and then enter again.

- If you were successful you should now have a # on your prompt instead of the typical $ prompt for normal/non-root users.

- From there issue the command, the dot slash is important
$ ./unrar.SlackBuild

- If all things went well it should start building the package and you will see tons of cryptic stuff roll down your terminal. And if everything is good and done for after the wait to build the package, it will end without error.

11. After the build process, the terminal console will indicate that your file has been built and can be found in the /tmp directory as default where slackbuild scripts from slackbuilds usually puts them. You can install directly from the same directory your in, by issuing the command as root -

installpkg /tmp/unrar.tgz

- It should then start to install it, if all goes well it will install without a hitch.

- And there you have it, you have successfully installed a program from the slackbuilds website, Congratulations.


* Note 1: If your packages chosen from slackbuilds needs dependencies, you must build and install those dependencies in the order mentioned, the information will be shown in the programs pages in slackbuilds, also if you do not meet this criteria properly you wont be able to install anyways.

* Note 2: Tip - After properly building the program before installing or after, save the binary file from the /tmp directory either by GUI or CLI, thats up to you, this way you will have a program already built as a backup and you can install whenever on your system/s, should you need to, saving time, the effort and and power, Hey, compiles task the processor which eats power.

* Note 3: The Binary Packages/Programs you can install in slackware with the package manager end with .tgz or .txz file extensions. The latter one has a much better compression algorithm and saves more space than .tgz, this could matter when your building and saving backups of your built files, regarding saving space. However installing by .tgz is faster, but by modern hardware it shouldn't matter so much. The .tgz has been the more common one as it's been the default for awhile, .txz was introduced to later versions of slackware, I think 13.0, so installing .tgz wont work out of the box for older slackware versions and their package manager.

* Note 4: Below shows the complete unrar.SlackBuild file used in this example for the sake of brevity:

#!/bin/sh

# Slackware build script for unrar

# Copyright 2006  Halim Issa <yallaone@gmail.com>
# 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.

# Updated by Andrew Brouwers
# Updated by Niklas 'Nille' Åkerström

PRGNAM=unrar
VERSION=4.0.7
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

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/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

DOCS="license.txt readme.txt"

case "$ARCH" in
  i486)      SLKCFLAGS="-O2 -march=i486 -mtune=i686"
             ;;
  i686)      SLKCFLAGS="-O2 -march=i686 -mtune=i686"
             ;;
  x86_64)    SLKCFLAGS="-O2 -fPIC"
             ;;
  *)         SLKCFLAGS="-O2"
             ;;
esac

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM
tar xvf $CWD/${PRGNAM}src-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
chmod -R a-s,u+w,go+r-w .

make CXXFLAGS="$SLKCFLAGS" -f makefile.unix

install -D -m 755 unrar $PKG/usr/bin/unrar
strip --strip-unneeded $PKG/usr/bin/unrar

mkdir -p $PKG/usr/man/man1
gzip -9c $CWD/unrar.1 > $PKG/usr/man/man1/unrar.1.gz

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chmod 0644 $PKG/usr/doc/$PRGNAM-$VERSION/*

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}



* Note 5: Sometimes the Source Downloads are actually already pre-built compiled packages that may just need some re-packaging, and may come with other files, not to worry, just download the program's slackbuild, extract the directory and put in the extra files inside, do the same steps, edit the needed information such as ARCH and VERSION in the SlackBuild Script. And generically it should be done. Sometimes the binary can be .deb or .rpm files these are actually linux binaries for easy installs for certain distributions .deb for debian and maybe other debian based distributions and .rpm for RHEL/Centos/SL distributions and clones or derivatives. You may even come across src deb and src rpm which are typically source files for those platforms with some extra configs.

* Note 6: Make sure to make the slackbuild script executable with the chmod +x file.SlackBuild command, failure to make the file executable will make hinder you from building the program/s.

* Note 7: Tip - Learn some Bourne or Bash shell scripting so you can script Linux and understand the slackbuild scripts if not create your very own slackbuild scripts and submit to the slackbuilds.org site to contribute to the community. These 2 shell scripting languages are the Norm in Linux, and bourne for even other *nix systems. Bash is based on Bourne and extends it's features but bash is at the very basic level compatible to the Bourne shell. No matter what it will be useful to you, and it's not at all that hard. You can also make this a stepping stone to learning other scripting languages be it shell or general programming interpreted types or even the full blown compiler/VM byte compiled type languages.

* Note 8: To avoid problems, It's preferred to keep and use one Terminal window only for this tutorial, to avoid confusion and whatever hassle or getting lost for newbie/s.

* Note 9: Some packages/programs do need dependencies some do not and even then there are some which ask if you want to include even other optional dependencies.

* Note 10: GUI=Graphical User Interface and CLI=Command Line Interface...

* Note 11: For window's users Directory is synonymous to mean folder in your world...

* Note 12: By Default the $ is a prompt for normal non-root users and the # is a prompt usually used for root users.






********* Should this help anyone at all, it is my pleasure to, and I will try to refine, edit and update this article whenever I can,

********* However you are solely responsible for your actions and what you do to your system/s, and that means, I cannot be held liable for anything you do wrong at all to any or all of your system/s, well I just had to add that disclaimer. :-P

********* Should you need extra help in slackware the best place to go to is the slackware subforums in Linuxquestions.org, which effectively is the official slackware forums anyways.

so,
Happy Slacking!








After a Stock Slackware Linux Install What to do?

After a Stock Slackware Linux Install, What to do?

Suggestions are:





1.) To read the announcements and other information in the official website - Slackware Linux Website.

2.) Read the SlackBook 2.0 at SlackBook, somewhat dated but it is free. There's been a project for a version 3.0 but as of this date that is still nothing but a dream. There is also the SlackWiki at slackwiki.com and Slack-Docs at docs.slackware.com and highly recommended Alien's SlackBook at alien.slackbook.org.

3.) Check Dugan Chen's Blog site on how to install the Rute Linux Tutorial into your Slackware and other stuff. The tutorial is pretty old but is still pretty good, you can also not install it and just read it online at LINUX - Rute User's Tutorial and Exposition, 1st edition

4.) Suggest to check the slackpkg tool to easily update your base slackware packages at Slackpkg.

5.) Perhaps you want to enable your slackware to be multimedia able? See my article regarding it: "How to make Slackware Linux Multimedia Enabled" link here.  

6.) Go check the SlackBuilds website at SlackBuilds.org, and their HOWTO use their website and slack build scripts at HOWTO at SlackBuilds.org. It's the best place to look for 3rd party software for Slackware.

7.) Suggest to check the sbopkg tool to easily use the slackbuilds.org site, it's at Sbopkg.

8.) Suggest to check the slackpkg+ tool to easily update 3rd party repos for slackware packages at Slackpkg+ (actually its more of a plugin that extends the function of slackpkg tool mentioned above at number 4).

9.) Go register at the LinuxQuestions (LQ) forum, its a very good forum for all Linux and other unix stuff, and has many sub-forums that cater to specific types of Linux Distributions, but not only does it cater to Slackware it is also the offically sanctioned forums for Slackware Linux.











Fix stock Slackware bash-prompt to show current directories

Fix stock Slackware bash-prompt to show current directories


issue at the command line the following command:

$ . /etc/profile

or add the . /etc/profile line to .bashrc file with your favorite editor to make it constant (dont forget theres a space between the . and /)


To have immediate results after doing the above, or if it doesnt work for some reason or errored, issue command below:

$ source .bashrc
read bash man.
 $ man bash


example:

before -               bash-4.1$

after -                  user@Slackware:~/Downloads$          (success)

How to Enable Multilib on a Stock Slackware 13.37 x86_64 Bit Linux System


How to Enable Multilib on a Stock Slackware 13.37 x86_64 Bit Linux System


* Enable Multilib to be able to run both 32 and 64 bit programs on the same Slackware 13.37 x86_64 Linux system.


Instructions:

First download all the packages from alien’s repository. Issue the command below:

$ wget -r -l1 --no-parent http://connie.slackware.com/~alien/multilib/13.37/ && cd connie.slackware.com/~alien/multilib/13.37/

then upgrade the packages

$ su -c'upgradepkg --reinstall --install-new *.t?z'

input your root password, and let it do its job.

This sets up your system as “multilib enabled.” Next you need to download, and install the compat32 packages that allow 32 bit applications to run on your system. The second part is longer but the procedure is basically the same, issue the command.

$ wget -r --no-parent http://connie.slackware.com/~alien/multilib/13.37/slackware64-compat32/ && cd connie.slackware.com/~alien/multilib/13.37/slackware64-compat32/

From the slackware64-compat32/, Go into each subdirectory with cd command (example: $ cd a-compat32, to go into the a-compat32/ subdirectory), input cd .. to go back to the previous directory and then change into the next subdirectory, and then issue the command below within each subdirectory:

$ su -c'upgradepkg --reinstall --install-new *.t?z'

input your root password, and let it do its job.

After doing all of each subdirectory, your system will be Multilib.

The Subdirectory list:
a-compat32/
ap-compat32/
d-compat32/
l-compat32/
n-compat32/
x-compat32/
xap-compat32/

BUT, if you’re building a SlackBuild though please read the following below:

* Compiling 32-bit programs
In case you need to compile a 32-bit program (wine and grub are two examples of open source programs that are 32-bit only) you first configure your shell environment by running the command:

$ ./etc/profile.d/32dev.sh

Note the 'dot' in front of the filename - that is actually part of the commandline! Running this command changes or creates several environment variables. The effect of this is, that 32-bit versions of binaries are preferred over 64bit binaries when you compile source code - you will be running a 32bit compilation. The effect will last until you logout from your shell.

In this changed environment, you will be able to use standard SlackBuilds to build 32-bit packages for Slackware64. There are two things to keep in mind:
  1. You will have to define the ARCH variable as 'x86_64' even though you are compiling a 32-bit program!
    This is related to the triplet of “$ARCH-slackware-linux” which is normally used in the “configure” command. Also, try setting the ARCH to for instance “i486” and you will see that the CFLAGS definition for that architecture will result in gcc errors like ”compiler can not create executables”. This is related to the design of a SlackBuild script. Rather than editing the script and change/remove CFLAGS definitions, you can set the ARCH to “x86_64” and save yourself some time. The real work is being done by the 32dev.sh script.
  2. You will have to edit the SlackBuild if it wants to use 'lib64/' directories for “$ARCH = x86_64”. You have to force it to use 'lib/' directories instead. Usually, this is accomplished by finding a definition like:


          LIBDIRSUFFIX="64"




    and changing this line to


          LIBDIRSUFFIX=""


Reference Links -
http://www.hydronitrogen.com/374/slackware-13-0-and-13-1-multilib-quick-and-easy-script/   (last i checked it was defunct/down)
http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:multilib#compiling_32-bit_programs
http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:multilib

*Note1: When installing proprietary NVIDIA drivers the stock 64 bit drivers will haveboth 32 and 64 bit drivers unless otherwise mentioned, by making the system multilib enabled ahead,you can install both versions drivers and it will work, if nvidia drivers were installed first with only 64 bit before enabling multilib, you must rebuild/reinstall the proprietary nvidia drivers to do so.

*Note2: Of course needless to say, but for brevity, Root priviledges are needed for these instructions to work.

Clean or clear the /tmp directory each time on shutdown in Slackware Linux

Clean or clear the /tmp directory each time on shutdown in Slackware Linux 

Create a file called rc.local_shutdown, in the /etc/rc.d/ directory and put the line below, make it executable.

#
# The Line below will be executed each time you shutdown, and clean and clear the /tmp directory.
#

/usr/bin/find /tmp -mindepth 1 -maxdepth 1 -print0 | xargs -0r /bin/rm -fr
#
# Explanatioon of script:
#
# /usr/bin/find that command
# /tmp looks in that directory
# -1mindepth 1 to process all files except the command line arguments
# -maxdepth 1 descending one level below the command line arguments
# -print0 and printing the full file names followed by a null characters
# | then all the output is redirected
# xargs to the command building and executing commands
# -0r which looks for the arguments separated by null characters
# /bin/rm and runs the command removing files and directories
# -fr by force and recursively
#
# See: man find; man xargs; man rm
#

or

/usr/bin/find /tmp -mindepth 1 -maxdepth 1 -exec /bin/rm -rf {} +;



This script will be executed each time you'll shut down Slackware, name this file "rc.local_shutdown" and put it in the # "/etc/rc.d/" directory.

Make this file executable with:
chmod +x /etc/rc.d/rc.local_shutdown.

How to repackage a .txz to a .tgz Slackware Installable Package

How to repackage a .txz to a .tgz Slackware Installable Package

Command:

$ cat file.txz | xz -cd | gzip > file.tgz

example:

$ cat vlc-1.1.1-x86_64-1alien.txz | xz -cd | gzip > vlc-1.1.1-x86_64-1alien.tgz


this example repackages .txz to .tgz (But does nothing else, which means if the txz was a legal slackware linux package, converting it to tgz
will make the tgz version just like the txz version installable with installpkg tool)


*NOTE: Slackware packages typically end with file extensions .tgz and .txz(txz starting version 13) for installation with installpkg tool.

*NOTE: The only difference with the tgz from the txz, is the compression used, the tgz is just a typically tarball compressed with gz while the
txz is a tarball that uses LZMA compression, which greatly compresses the file size of the txz compared to the tgz.

*NOTE: One common reason to do this conversion is if one is using a slackware version prior to version 13, but the user/admin wants to use new
packages compressed into txz.

*NOTE: It's faster to install a tgz file compared to txz file, since the tgz extracts and installs faster and needs less RAM and resources, than the txz file type, however for the most part this speed comparison is negligible with most packages and with modern hardware, but it could still be an
issue to keep in mind depending on how many packages to install and how big they are, and if there is a time limit schedule to meet, in theory.

Where to find Slackware Packages

Where to find Slackware Packages

Aside from the official packages from official slackware servers and mirrors, there are several freely available online repositories that have slackware packages to take from:


http://www.slackbuilds.org
http://linuxpackages.net/
http://www.slacky.eu
http://connie.slackware.com/~alien/slackbuilds/
http://rlworkman.net/pkgs/
http://pkgs.org/   (other distros also available, lots of ADs, check carefully your not pressing an AD instead of the right links)
http://distro.ibiblio.org/pub/linux/distributions/amigolinux/download/src2pkg/src2pkg-2.5-noarch-2.tgz    (src2pkg)
http://slackware.org.uk/people/alien/restricted_slackbuilds/vlc/pkg64/13.37/ (no deps, full featured VLC slackware binary)
http://ponce.cc/slackware/slackware-13.37/ (LXDE binaries and other)
http://www.slackabduction.com/sse/index.php

http://packages.slackverse.org/
http://slackfind.net/en/
http://www.nielshorn.net/slackware/slack_pkg.php

Install Firefox 8.x and Thunderbird 8.x to Slackware 13.37

Install Firefox 8.x and Thunderbird 8.x to Slackware 13.37


Assuming your slackware installation is the full slackware stock install, there would be firefox and thunderbird versions included but really old ones, remove them with the removepkg command first.

pick the proper package version for your system
wget ftp://63.245.208.138/pub/mozilla.org/firefox/releases/8.0/linux-i686/it/firefox-8.0.tar.bz2
wget ftp://63.245.208.138/pub/mozilla.org/firefox/releases/8.0/linux-x86_64/it/firefox-8.0.tar.bz2
or head over to firefox and thunderbird website and download the latest stable version 8 bz2 binary packages for linux
tar xvjf firefox-8.0.tar.bz2
sudo cp -r firefox/ /opt/firefox
sudo rm firefox-8.0.tar.bz2
sudo rm -r firefox/
sudo mv /usr/bin/firefox /usr/bin/firefox-old
sudo ln -s /opt/firefox/firefox /usr/bin/firefox
killall firefox-bin
Now we start our Firefox and have the new version 8.0

If we want to restore the default version simply type in terminal
sudo mv /usr/bin/firefox-old /usr/bin/firefox
sudo rm -r /opt/firefox

For thunderbird the procedure is the same:

pick the proper package version for your system

wget ftp://63.245.208.138/pub/mozilla.org/firefox/releases/8.0/linux-i686/it/firefox-8.0.tar.bz2
wget ftp://63.245.208.138/pub/mozilla.org/firefox/releases/8.0/linux-x86_64/it/firefox-8.0.tar.bz2
or head over to firefox and thunderbird website and download the latest stable version 8 bz2 binary packages for linux

issue the commands below:

tar xvjf thunderbird-8.0.tar.bz2
sudo cp -r thunderbird/ /opt/thunderbird

sudo rm thunderbird-8.0.tar.bz2
sudo rm -r thunderbird/
now made the connection with our Menu to do this type:
sudo mv /usr/bin/thunderbird /usr/bin/thunderbird-old
sudo ln -s /opt/thunderbird/thunderbird /usr/bin/thunderbird
Now we start our Firefox and have the new version 8.0

even if you start the default version we type in terminal
killall thunderbird-bin
If we want to restore the default version simply type in terminal
sudo mv /usr/bin/thunderbird-old /usr/bin/thunderbird
sudo rm -r /opt/thunderbird

after that your firefox and thunderbird will be version 8.x when you click the icons or start by termina.

(tested working on Slackware13.37 x86_64 GNU Linux)

Note1: It is possible to use other versions for this, just edit the links/urls/commands to accomodate the proper version, for lower or higher available binary packages from Mozilla.org corresponing project urls for firefox and thunderbird website.

The Classic Way to Install Packages from Source in Slackware


The Classic Way to Install Packages from Source in Slackware:


In the past, most Slackware users built their packages from source, after downloading them from the package maintainers’ websites, rather than using pre-built/pre-compiled binary packages.

Nowadays while it is still being done more and more people use buildscripts to compile and install Slackware Packages, the most known buildscript repository is the SlackBuilds.org website. And it seems to be the preferred way, Heck I prefer it. However there is still need or use for doing it the classic build from source procedure, and this is what this article is about.

To build from source, you open up the tarball and read the provided instructions (particularly the README and INSTALL files).


  1. Download the source package
  2. Extract the source package via command line - $ tar xvvf foo.tar.bz2
  3. Change into the extracted directory via commandline - $ cd foo
  4. Read any readme or text or instructional files included.
  5. $ ./configure –help
  6. $ ./configure plus any appropriate options from the last step
  7. $ make
  8. as root - #  make install 
  9. # make clean
  10. Get out of the current directory back to where you started - $ cd ..
  11. Move the package directory to a different directory so you may easily uninstall it nex time as mentioned below as root -  # mv foo /usr/local/src
When you want to uninstall it, you do the following:
  • cd /usr/local/src/foo
  • as root - # make uninstall 


* Note1: To install binary packages read about pkgtool and its suite of tools
* Note2: To Install from source easier/quicker use the tool src2pkg
* Note3: Nowadays most people use SlackBuilds or Build Scripts to automate the build/compile and install of slackware packages, However there is still use and worth knowing how to do it the classic way to build/compile and install the package from source, common place to get from is http://www.slackbuilds.org.
* Note4: Check the tool sbopkg, its a commandline tool to help install packages from the slackbuilds.org website.
* Note5: Also there is a tool called slapt-get its a commandline tool that mimicks apt-get package manager from debian for slackware, handles dependency management, software could be limited depending on servers/repos online, however the SalixOS distro based on Slackware Linux uses this package manager and its packages supposed to be compatible to slackware provided the versions are the same as SalixOS releases are based on releases of slackware (example: salixOS version 13.37 is based from the orginal Slackware 13.37, so use packages made for versions of the same number scheme), by using the repos/servers of SalixOS one can have more software available via slapt-get for slackware if one chooses to use slapt-get for their slackware system/s.
* Note6: Another Package manager that hadles dependency management for slackware is emerde, a tool that mimicks the portage package manager of Gentoo Linux, from the website of http://emerde.freaknet.org/
* Note7: Another way to repackage and install a .rpm binary to slackware tgz package, is to use the rpm2tgz tool.
* Note8: Another way to repackage  and install a .deb binary to slackware tgz package, is to use deb2tgz tool.
* Note9: Check the tool called Checkinstall - Installs a compiled binary package from the program's source directory, it's similar to src2pkg.
* Note10: Slackware Linux Package manager is pkgtool suite, but it doesn't feature dependency management its left to the user/admin to handle that manually, this is the slackware way, and its meant as a feature to not have that automatic dependency management, while there are package managers that do dependecy management automatically, they are not preferred by real slackware users nor are they offically sanctioned by the author/creator of slackware, as it completely devoids a major part of the KISS philosophy of slackware, simplicity in design not in ease for newbie use.