Slackware

The original Linux distribution, geared towards power and stability.

http://www.slackware.com

Vagrant on Slackware 14 32 bit

Ruby version: ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux]

VirtualBox version, Oracle VM VirtualBox Manager 4.2.8

Install Vagrant from source

Based on https://github.com/mitchellh/vagrant/wiki/Installing-Vagrant-from-source

As root run the following:

   1 cd /tmp
   2 mkdir gitVagrant
   3 cd gitVagrant
   4 git clone https://github.com/mitchellh/vagrant.git
   5 cd vagrant
   6 git pull origin master #get latest version
   7 #git reset a40522f5fabccb9ddabad03d836e120ff5d14093 --hard # reset to v1.3.5 
   8 git reset 7ec0ee1d00a916f80b109a298bab08e391945243 --hard #reset to v1.2.7
   9 gem install bundle #it may not be installed
  10 bundle install
  11 rake install
  12 gem list
  13 gem uninstall vagrant #uninstall other old gems
  14 vagrant -v #check vagrant version
  15 

Install VirtualBox on Slackware 14 32 bit

Get VirtualBox 4.2.8 for Linux, i386, all distributions http://download.virtualbox.org/virtualbox/4.2.8/VirtualBox-4.2.8-83876-Linux_x86.run.

For 4.2.18 http://download.virtualbox.org/virtualbox/4.2.18/VirtualBox-4.2.18-88781-Linux_x86.run

As root run the following commands:

   1 cd <place where the downloaded virtualbox installer is>
   2 chmod 755 VirtualBox-4.2.8-83876-Linux_x86.run
   3 ./VirtualBox-4.2.8-83876-Linux_x86.run
   4 usermod -a -G vboxusers <username>
   5 id <username> #check user groups
   6 

As a normal user run the following:

   1 virtualbox --help # check the version and parameters
   2 virtualbox #start virtualbox
   3 

Get and run a base box - Ubuntu Lucid32

In http://www.vagrantbox.es/ there is a list of available vagrant boxes.

As normal user run the following

   1 mkdir -p /tmp/vgbox
   2 cd /tmp/vgbox
   3 wget http://files.vagrantup.com/lucid32.box #Ubuntu 10.04 LTS (big file with the whole VM)
   4 vagrant box add UbuntuLucid32 lucid32.box # associate the VM file with an alias
   5 vagrant init UbuntuLucid32 
   6 vagrant up
   7 vagrant ssh #access the VM through SSH
   8 ping www.sapo.pt #inside VM ... does not reply
   9 exit
  10 vagrant suspend

Run the following as stated in http://serverfault.com/questions/453185/vagrant-virtualbox-dns-10-0-2-3-not-working:

   1 VBoxManage list vms
   2 VBoxManage modifyvm "vgbox_1372194938" --natdnsproxy1 on
   3 VBoxManage modifyvm "vgbox_1372194938" --natdnshostresolver1 on
   4 vagrant resume
   5 vagrant ssh
   6 ping www.sapo.pt # OK ! it gets ping replies
   7 dpkg -l | more # show all installed packages
   8 

Running cat /etc/debian_version show its based on squeeze/sid.

Running cat /etc/issue.net show it's Ubuntu 10.04.4 LTS http://releases.ubuntu.com/lucid/.

Current user and pass for the lucid32 box is vagrant vagrant. To get superuser access run sudo bash.

Inspecting the file /etc/shadow we can see that only the user vagrant has a password defined.

In /etc/sudoers it is said that all users belonging to group can gain root privileges with supplying a password.

In /etc/group it is stated that vagrant belongs to the admin group.

Ubuntu Precise32

In http://www.vagrantbox.es/ there is a list of available vagrant boxes.

As normal user run the following

   1 mkdir -p ~/Downloads/vagrantBoxes/
   2 cd ~/Downloads/vagrantBoxes/
   3 wget http://files.vagrantup.com/precise32.box #Ubuntu 12.04 LTS
   4 mkdir -p /tmp/precise32
   5 cd /tmp/precise32
   6 vagrant box add UbuntuPrecise32 ~/Downloads/vagrantBoxes/precise32.box
   7 vagrant init UbuntuPrecise32 
   8 vagrant up
   9 vagrant ssh #access the VM through SSH
  10 ping www.sapo.pt 
  11 exit
  12 vagrant suspend

Slackware NAT router with Pen 3G

Configure Slackware PC to share a 3G internet connection (TMN portuguese ISP).

Internet connection

The used APN is internet.

There is no PIN defined in the used SIM card.

Edit /etc/ppp/peers/tmnpub

   1 /dev/ttyUSB0
   2 460800
   3 connect 'chat -v -f /etc/ppp/chat/tmnpub'
   4 defaultroute
   5 usepeerdns

Edit /etc/ppp/chat/tmnpub

   1 ABORT 'BUSY'
   2 ABORT 'NO CARRIER'
   3 ABORT 'ERROR'
   4 ABORT 'SIM PIN'
   5 ABORT 'SIM PUK'
   6 '' AT
   7 OK AT+CGDCONT=1,"IP","internet"
   8 OK AT+CPIN?
   9 READY ATDT*99#
  10 CONNECT

To connect to the internet we must use the command:

Using the command ifconfig we should see the device ppp0 in the output.

Issuing a command ping www.google.com we should get a reply with the IP address from Google.

Configure NAT (Network Address Translation) router

Translate internal network addresses (source address) to a public/usable IP address given to the 3G modem.

View the routing table:

   1  * route -n

It should appear the devices ppp0 and eth0, and based on the Destination and Netmask the destination interface.

Enable IP forwarding:

   1 echo 1 > /proc/sys/net/ipv4/ip_forward

Configure iptables to translate the address after they are forwarded to the correct interface, from eth0 to ppp0:

   1 iptables -F
   2 iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

To view the iptables configuration run the commands:

   1 iptables -L -t nat -v
   2 iptables -L -t filter -v

#script
#Enable IP forwarding:
echo 1 > /proc/sys/net/ipv4/ip_forward
#Configure iptables to translate the address after they are forwarded to the correct interface, from eth0 to ppp0:
iptables -F
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

Configure client computer

The routing table must be configure to use the NAT on Slackware, that will act as a router.

Check the current default gateway:

   1 route -n

The line with destination equal to 0.0.0.0 and gateway 0.0.0.0, is the default router/gateway and must be deleted. We must run a command to do that, adapted to the current situation:

   1 route del -net 0.0.0.0 gw 192.168.1.1

The previous command is to delete a route with destination 0.0.0.0 and gateway 192.168.1.1.

If the NAT router have the IP 192.168.1.123 then the following command must be sent:

   1 route add default gw 192.168.1.123
   2 route -n 

After that running route -n should return a line with:

   1 Gateway: 192.168.1.123
   2 Netmask: 0.0.0.0
   3 Destination: 0.0.0.0
   4 Iface: eth0

Running a ping www.google.com from the client computer should return the IP address from Google.

Running a traceroute www.google.com should show the IP address from the NAT router.

Windows

   1 route print
   2 route delete 0.0.0.0
   3 route add 0.0.0.0 192.168.1.123

Generic kernel

The “generic” kernel on the other hand, is a kernel which has virtually no drivers built in. All drivers will be loaded into RAM on demand.

   1 #/usr/share/mkinitrd/mkinitrd_command_generator.sh
   2 #
   3 # mkinitrd_command_generator.sh revision 1.45
   4 #
   5 # This script will now make a recommendation about the command to use
   6 # in case you require an initrd image to boot a kernel that does not
   7 # have support for your storage or root filesystem built in
   8 # (such as the Slackware 'generic' kernels').
   9 # A suitable 'mkinitrd' command will be:
  10 
  11 mkinitrd -c -k 3.2.45-smp -f ext4 -r /dev/sda1 -m usb-storage:ehci-hcd:usbhid:uhci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz
  12 # Add to /etc/lilo.conf
  13 image = /boot/vmlinuz-generic-smp-3.2.45-smp
  14   initrd = /boot/initrd.gz # add this line so that lilo sees initrd.gz
  15   root = /dev/sda1
  16   label = SlackwareGeneric
  17   read-only
  18 # run lilo -v
  19 

USB boot in VirtualBox

   1 VBoxManage convertfromraw -format VDI usbboot.img usbboot.vdi

Generic on Slackware64 14.0

   1 /usr/share/mkinitrd/mkinitrd_command_generator.sh
   2 mkinitrd -c -k 3.2.29 -f ext4 -r /dev/sda5 -m usbhid:ehci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz

Add to /etc/lilo.conf

   1 image = /boot/vmlinuz-generic-3.2.29
   2   initrd = /boot/initrd.gz # add this line so that lilo sees initrd.gz
   3   root = /dev/sda5
   4   label = SlackGen
   5   read-only

   1 lilo -v

System V (Sys V) init

Slackware since 7.0 also allows Sys V inits.

Sample service /etc/init.d/blah:

   1 #! /bin/sh
   2 # /etc/init.d/blah
   3 #
   4 
   5 # Some things that run always
   6 touch /var/lock/blah
   7 
   8 # Carry out specific functions when asked to by the system
   9 case "$1" in
  10   start)
  11     echo "Starting script blah "
  12     echo "Could do more here"
  13     ;;
  14   stop)
  15     echo "Stopping script blah"
  16     echo "Could do more here"
  17     ;;
  18   *)
  19     echo "Usage: /etc/init.d/blah {start|stop}"
  20     exit 1
  21     ;;
  22 esac
  23 
  24 exit 0

Mark script as executable:

   1 chmod 755 /etc/init.d/blah

Default runlevels (2 3 4 5):

   1 ln -s /etc/init.d/blah /etc/rc2.d/S99blah
   2 ln -s /etc/init.d/blah /etc/rc2.d/K10blah
   3 ln -s /etc/init.d/blah /etc/rc3.d/S99blah
   4 ln -s /etc/init.d/blah /etc/rc3.d/K10blah
   5 ln -s /etc/init.d/blah /etc/rc4.d/S99blah
   6 ln -s /etc/init.d/blah /etc/rc4.d/K10blah
   7 ln -s /etc/init.d/blah /etc/rc5.d/S99blah
   8 ln -s /etc/init.d/blah /etc/rc5.d/K10blah

Check symbolic links:

   1 ls /etc/rc*.d

Sys V init for Python script

Sample service /etc/init.d/blah:

   1 #! /bin/sh
   2 # /etc/init.d/blah
   3 #
   4 
   5 # Some things that run always
   6 touch /var/lock/blah
   7 
   8 # Carry out specific functions when asked to by the system
   9 case "$1" in
  10   start)
  11     logger "Starting beat.py"     
  12     echo   "Starting beat.py"
  13     /usr/bin/python /tmp/beat.py &
  14     ;;
  15   status)
  16     PID=`cat /var/run/beat.pid`
  17     logger "Process running with PID $PID"
  18     echo   "Process running with PID $PID"
  19     ;;    
  20   stop)
  21     PID=`cat /var/run/beat.pid`
  22     logger "Killing process with PID $PID"
  23     echo   "Killing process with PID $PID"
  24     kill -9 $PID
  25     rm /var/run/beat.pid
  26     ;;
  27   *)
  28     echo "Usage: /etc/init.d/blah {start|status|stop}"
  29     exit 1
  30     ;;
  31 esac
  32 
  33 exit 0

Mark script as executable:

   1 chmod 755 /etc/init.d/blah

Default runlevels (2 3 4 5):

   1 ln -s /etc/init.d/blah /etc/rc2.d/S99blah
   2 ln -s /etc/init.d/blah /etc/rc2.d/K10blah
   3 ln -s /etc/init.d/blah /etc/rc3.d/S99blah
   4 ln -s /etc/init.d/blah /etc/rc3.d/K10blah
   5 ln -s /etc/init.d/blah /etc/rc4.d/S99blah
   6 ln -s /etc/init.d/blah /etc/rc4.d/K10blah
   7 ln -s /etc/init.d/blah /etc/rc5.d/S99blah
   8 ln -s /etc/init.d/blah /etc/rc5.d/K10blah

Check symbolic links:

   1 ls /etc/rc*.d

Python /tmp/beat.py code:

   1 #!/usr/bin/python
   2 import threading
   3 import time
   4 import os
   5 import syslog
   6 import datetime
   7 
   8 class Beat(threading.Thread):
   9     def __init__(self):
  10         threading.Thread.__init__(self) #required
  11 
  12     def run(self):
  13         loop=True
  14         while loop:
  15             syslog.syslog(syslog.LOG_INFO, "Beat %s"%(datetime.datetime.now()) )
  16             time.sleep(5)
  17 
  18 if __name__=="__main__":
  19     f=open('/var/run/beat.pid','wa')
  20     f.write('%d'%(os.getpid()))
  21     f.close()
  22     os.getpid()
  23     b = Beat()
  24     b.start()

Packages updates

Check patches/packages and patches/PACKAGES.TXT for the desired Slackware version. URL for Slackware 14.0 ftp://ftp.slackware.com/pub/slackware/slackware-14.0/patches/

Get packages to be updated

   1 cd ~/Downloads/slack14i386patches
   2 wget ftp://ftp.slackware.com/pub/slackware/slackware-14.0/patches/PACKAGES.TXT
   3 cat PACKAGES.TXT | grep "PACKAGE NAME" | awk '//{print $3}'| sed 's/.txz//g'  | xargs -i ls /var/log/packages/{} &> /tmp/out.txt ;mkdir -p /tmp/packages;cd /tmp/packages;  cat /tmp/out.txt | grep cannot | awk '//{print $4}' | sed 's/\/var\/log\/packages\///g' | sed 's/://g' | xargs -i wget ftp://ftp.slackware.com/pub/slackware/slackware-14.0/patches/packages/{}.txz

Caching only nameserver/DNS server

   1  * chmod 755 /etc/rc.d/rc.bind

Edit /etc/resolv.conf

nameserver 127.0.0.1

Edit /etc/named.conf

options {
 directory "/var/named";
 forwarders { 8.8.8.8; 8.8.4.4; };
};

// a caching only nameserver config
zone "." IN {
 type hint;
 file "caching-example/named.root";
};

zone "localhost" IN {
 type master;
 file "caching-example/localhost.zone";
 allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
 type master;
 file "caching-example/named.local";
 allow-update { none; };
};

logging {
  channel my_named_channel {
  file "/tmp/named.log";
  // syslog info;
  // Set the severity to dynamic to see all the debug messages.
  severity dynamic;
  print-time yes;
  print-severity yes;
  print-category yes;
 };
 category queries {   my_named_channel; };
 category client {   my_named_channel; };
 category default { default_syslog; };
};

Update bash on Slackware64 14

   1 wget ftp://ftp.slackware.com/pub/slackware/slackware64-14.0/patches/packages/bash-4.2.048-x86_64-2_slack14.0.txz
   2 upgradepkg bash-4.2.048-x86_64-2_slack14.0.txz 

Upgrade from Slackware 14.0 to 14.1

   1 # ctrl+alt+f1
   2 mount /dev/cdrom /mnt/cdrom
   3 cd /mnt/cdrom
   4 cp slackware /root/ -r
   5 cd /root
   6 telninit 1
   7 # login as root
   8 cd /root/slackware
   9 upgradepkg a/glibc-solibs-*.t?z
  10 upgradepkg a/pkgtools-*.tgz
  11 upgradepkg a/tar-*.tgz
  12 upgradepkg a/xz-*.tgz
  13 upgradepkg a/findutils-*.txz
  14 upgradepkg --install-new /root/slackware/*/*.t?z
  15 removepkg Terminal aumix kdegames kdemultimedia ksecrets mysql printer-applet quanta rexima scim-bridge xxgdb
  16 # Check file /etc/lilo.conf to see which old kernel is used #/boot/vmlinuz-generic-smp-3.2.45-smp
  17 /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 3.10.17-smp | bash
  18 # In /etc/lilo.conf use image=/boot/vmlinuz-generic-smp-3.10.17-smp
  19 lilo -v
  20 telinit 3
  21 reboot
  22 # After the reboot shows the kernel version 3.10.17
  23 # In /etc/rc.d/rc.local add modprobe snd_mixer_oss
  24 

Get patches for Slackware 14.1

Get packages to be updated

   1 mkdir -p ~/Downloads/slack14_1i386patches
   2 cd ~/Downloads/slack14_1i386patches
   3 wget ftp://ftp.slackware.com/pub/slackware/slackware-14.1/patches/PACKAGES.TXT
   4 cat PACKAGES.TXT | grep "PACKAGE NAME" | awk '//{print $3}'| sed 's/.txz//g' | xargs -i ls /var/log/packages/{} &> /tmp/out.txt ;mkdir -p /tmp/packages;cd /tmp/packages; cat /tmp/out.txt | grep cannot | awk '//{print $4}' | sed 's/\/var\/log\/packages\///g' | sed 's/://g' | xargs -i wget ftp://ftp.slackware.com/pub/slackware/slackware-14.1/patches/packages/{}.txz
   5 cd /tmp/packages
   6 mv * ~/Downloads/slack14_1i386patches

Upgrade from 14.1 to 14.2

Get and burn ISO

   1 wget http://ftp.slackware.com/pub/slackware-iso/slackware-14.2-iso/slackware-14.2-install-dvd.iso
   2 modprobe sg # fpr cdrecord
   3 cdrecord -scanbus #identify the device DVDRAM LG GP08NU6B
   4 cdrecord -dev=6,0,0 -pad -data slackware-14.2-install-dvd.iso
   5 # eject the DVD after burning
   6 cd /
   7 mount /dev/sr0 /mnt/cdrom #check DVD
   8 cd /mnt/cdrom
   9 ls
  10 cd /
  11 umount /mnt/cdrom 

Upgrade script

   1 #!/bin/sh
   2 #CURRDIR=`cd`
   3 CURRDIR=`pwd`
   4 URL=http://ftp.rnl.tecnico.ulisboa.pt/pub/slackware/slackware-14.2
   5 PACKAGEURL=packagesUrl.txt  
   6 LOCATIONS=locations.txt
   7 
   8 # get packages
   9 function getpackages
  10 {
  11   cd /tmp
  12   mkdir -p slack14_2
  13   cd slack14_2
  14   wget $URL/UPGRADE.TXT
  15   wget $URL/slackware/PACKAGES.TXT
  16   cat PACKAGES.TXT | grep 'NAME\|LOCATION' | tr -d '\n' | sed 's/PACKAGE NAME:/\n/g' | sed 's/PACKAGE LOCATION://g' | awk '/slackware/{print $2 , "/" , $1}' | sed 's/ \/ /\//g' | sort  | sed "s/\.\/slack/http:\/\/ftp.rnl.tecnico.ulisboa.pt\/pub\/slackware\/slackware-14.2\/slack/g" > $PACKAGEURL
  17 
  18   cat PACKAGES.TXT | grep 'LOCATION' | sort | uniq | sed "s/PACKAGE LOCATION:  \.//g" > $LOCATIONS
  19   cat $PACKAGEURL  | xargs -i wget {}
  20 }
  21 
  22 # upgrade stuff
  23 function upgrade
  24 {  
  25   # must be in single user mode !!!
  26   # telinit 1
  27   cd /tmp/slack14_2
  28   echo Backup /etc
  29   tar cvzf backetc14_3.tgz /etc
  30   
  31   echo Initial install 
  32   upgradepkg glibc-solibs-*.txz
  33   upgradepkg pkgtools-*.txz
  34   upgradepkg tar-*.txz
  35   upgradepkg xz-*.txz
  36   upgradepkg findutils-*.txz
  37   
  38   echo Install other stuff
  39   upgradepkg --install-new *.t?z
  40 
  41   echo Remove old packages 
  42   removepkg ConsoleKit apmd bluez-hcidump cxxlibs foomatic-filters gnome-icon-theme imlib kdeadmin kdenetwork kdesdk kdetoys kwallet lesstif libelf libjpeg libxfcegui4 networkmanagement obex-data-server obexfs open-cobol oxygen-gtk3 phonon-mplayer phonon-xine pil portmap procps qca-cyrus-sasl qca-gnupg qca-ossl udev xchat xf86-input-aiptek  xf86-video-modesetting xfce4-mixer xfce4-volumed xfwm4-themes
  43 
  44   echo Configure kernel
  45   /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.14-smp | bash
  46  
  47   echo Check lilo.conf to point to 4.4.14-smp in image=
  48   cat /etc/lilo.conf | grep image
  49   echo Run lilo
  50   lilo
  51   echo Probable error above if image does not have the kernel 4.4.14-smp
  52   telinit 3
  53   # reboot 
  54   # in case of problems to get a login in lilo after '''boot: SlackwareGen single''' to start in single user mode
  55   # /etc/rc.d/rc.modules should point to rc.modules.new to use modules for 4.4.14
  56 }
  57 
  58 upgrade
  59 echo $CURRDIR
  60 cd $CURRDIR

Chromium

   1 cd /tmp
   2 wget https://slackbuilds.org/slackbuilds/14.2/development/ninja.tar.gz
   3 tar xvzf ninja.tar.gz
   4 cd ninja
   5 wget https://github.com/ninja-build/ninja/archive/v1.7.1.tar.gz
   6 ./ninja.SlackBuild
   7 installpkg /tmp/ninja-1.7.1-i486-1_SBo.tgz
   8 cd ..
   9 wget https://slackbuilds.org/slackbuilds/14.2/network/chromium.tar.gz
  10 tar xvzf chromium.tar.gz
  11 cd chromium
  12 wget https://commondatastorage.googleapis.com/chromium-browser-official/chromium-48.0.2564.97.tar.xz #about 413MB
  13 ./chromium.SlackBuild

VirtualBox

   1 wget http://download.virtualbox.org/virtualbox/5.1.4/VirtualBox-5.1.4-110228-Linux_x86.run

As root run the following commands:

   1 cd <place where the downloaded virtualbox installer is>
   2 chmod 755 VirtualBox-5.1.4-110228-Linux_x86.run
   3 ./VirtualBox-5.1.4-110228-Linux_x86.run
   4 usermod -a -G vboxusers <username>
   5 id <username> #check user groups
   6 

As a normal user run the following:

   1 virtualbox --help # check the version and parameters
   2 virtualbox #start virtualbox
   3 

BSD init script

/etc/rc.d/rc.beat

#chmod 755 rc.beat

   1 #! /bin/sh
   2 # /etc/rc.d/rc.beat
   3 #
   4 PROC_NAME=beat
   5 touch /var/lock/beat
   6 
   7 case "$1" in
   8   start)
   9     logger "Starting ${PROC_NAME}"     
  10     echo   "Starting ${PROC_NAME}"
  11     /usr/bin/python /tmp/${PROC_NAME}.py &
  12     ;;
  13   status)
  14     PID=$(cat /var/run/beat.pid)
  15     logger "${PROC_NAME} running with PID $PID"
  16     echo   "${PROC_NAME} running with PID $PID"
  17     ;;    
  18   stop)
  19     PID=$(cat /var/run/beat.pid)
  20     logger "Killing ${PROC_NAME} with PID $PID"
  21     echo   "Killing ${PROC_NAME} with PID $PID"
  22     kill -9 $PID
  23     rm /var/run/beat.pid
  24     ;;
  25   *)
  26     echo "Usage: /etc/rc.d/beat {start|status|stop}"
  27     exit 1
  28     ;;
  29 esac
  30 
  31 exit 0

/tmp/beat.py

   1 #!/usr/bin/python
   2 import threading
   3 import time
   4 import os
   5 import syslog
   6 import datetime
   7 
   8 class Beat(threading.Thread):
   9     def __init__(self):
  10         threading.Thread.__init__(self) #required
  11 
  12     def run(self):
  13         loop=True
  14         while loop:
  15             syslog.syslog(syslog.LOG_INFO, "Beat %s"%(datetime.datetime.now()) )
  16             time.sleep(5)
  17 
  18 if __name__=="__main__":
  19     f=open('/var/run/beat.pid','wa')
  20     f.write('%d'%(os.getpid()))
  21     f.close()
  22     os.getpid()
  23     b = Beat()
  24     b.start()

Pidgin-sipe build for Slackware 14.2

   1 cd /tmp
   2 wget https://slackbuilds.org/slackbuilds/14.2/network/pidgin-sipe.tar.gz
   3 tar xvzf pidgin-sipe.tar.gz
   4 cd pidgin-sipe
   5 wget http://downloads.sourceforge.net/sipe/pidgin-sipe-1.21.1.tar.xz
   6 ./pidgin-sipe.SlackBuild
   7 installpkg /tmp/pidgin-sipe-1.21.1-i586-1_SBo.tgz

Slackbuild pidgin-sipe-1.21.1-i586-1_SBo.tgz

pidgin-skype slackbuild

   1 cd /tmp
   2 wget https://slackbuilds.org/slackbuilds/14.2/libraries/json-glib.tar.gz
   3 tar xvzf json-glib.tar.gz
   4 cd json-glib
   5 wget http://ftp.acc.umu.se/pub/GNOME/sources/json-glib/1.0/json-glib-1.0.4.tar.xz
   6 ./json-glib.SlackBuild
   7 installpkg /tmp/json-glib-1.0.4-i486-1_SBo.tgz
   8 cd /tmp
   9 wget https://slackbuilds.org/slackbuilds/14.2/network/pidgin-skypeweb.tar.gz
  10 tar xvzf pidgin-skypeweb.tar.gz
  11 cd pidgin-skypeweb
  12 wget https://github.com/EionRobb/skype4pidgin/archive/1.1.tar.gz
  13 ./pidgin-skypeweb.SlackBuild
  14 installpkg /tmp/pidgin-skypeweb-1.1-i486-1_SBo.tgz

Slackbuils json-glib-1.0.4-i486-1_SBo.tgz pidgin-skypeweb-1.1-i486-1_SBo.tgz json-glib-1.0.4-x86_64-1_SBo.tgz pidgin-skypeweb-1.1-x86_64-1_SBo.tgz

Get patches for Slackware 14.2

Get packages to be updated

   1 URL_PATCHES=ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches
   2 mkdir -p ~/Downloads/slack14_2i386patches
   3 cd ~/Downloads/slack14_2i386patches
   4 rm PACKAGES.TXT 
   5 wget $URL_PATCHES/PACKAGES.TXT 
   6 head PACKAGES.TXT 
   7 rm /tmp/packages/*
   8 cat PACKAGES.TXT | grep "PACKAGE NAME" | awk '//{print $3}'| sed 's/.txz//g' | xargs -i ls /var/log/packages/{} &> /tmp/outpatches.txt ;mkdir -p /tmp/packages;cd /tmp/packages; cat /tmp/outpatches.txt | grep cannot | awk '//{print $4}' | sed 's/\/var\/log\/packages\///g' | sed 's/://g' | sed "s/'//g" | xargs -i wget $URL_PATCHES/packages/{}.txz
   9 cd /tmp/packages
  10 su # run as root the upgradepkg
  11 # ls *.txz | xargs -i upgradepkg {}
  12 find /tmp/packages/*txz | xargs -i upgradepkg {}
  13 exit # return to normal user
  14 mv * ~/Downloads/slack14_2i386patches 

Update kernel (4.4.14 to 4.4.172)

   1 function get_packages
   2 {
   3   cd /tmp/packages
   4   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-firmware-20190118_a8b75ca-noarch-1.txz
   5   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-generic-4.4.172-i586-1.txz
   6   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-generic-smp-4.4.172_smp-i686-1.txz
   7   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-headers-4.4.172_smp-x86-1.txz
   8   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-huge-4.4.172-i586-1.txz
   9   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-huge-smp-4.4.172_smp-i686-1.txz
  10   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-modules-4.4.172-i586-1.txz
  11   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-modules-smp-4.4.172_smp-i686-1.txz
  12   wget ftp://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.172/kernel-source-4.4.172_smp-noarch-1.txz
  13 }
  14 
  15 function update
  16 {
  17   cp /etc/lilo.conf /etc/lilo.conf.old20190222
  18   ls /boot
  19   cd /tmp/packages
  20   upgradepkg kernel-*.txz
  21   # uname -a says that it has a SMP kernel
  22   /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.172-smp | bash
  23   ls /boot
  24   cat /etc/lilo.conf | grep image
  25   echo "Check content, image should have kernel 4.4.172"
  26   read
  27   echo "Going to execute lilo"
  28   lilo
  29   mv *.txz /home/user/Downloads/slack14_2i386patches
  30 }
  31 
  32 #get_packages
  33 update

/etc/dhclient.conf

   1 # dhclient.conf
   2 #
   3 # Configuration file for ISC dhclient (see 'man dhclient.conf')
   4 #
   5 send host-name = "hostx"

Toshiba NB200 and Samsung Monitor

Set nb200 monitor (LVDS1) on the left and Samsung on the right (VGA1)

   1 /usr/bin/xrandr --output LVDS1 --left-of VGA1

Slackware 15.0

The links above are for the Slackware file tree. If you already have Slackware 14.2 installed, you can use these files and follow the instructions in the UPGRADE.TXT document to upgrade your system to Slackware 15.0.

Update kernel to 4.4.301

   1 BASE_URL=http://ftp.slackware.com/pub/slackware/slackware-14.2/patches/packages/linux-4.4.301/
   2 
   3 function get_packages
   4 {
   5   cd /tmp/packages
   6   wget $BASE_URL/kernel-generic-4.4.301-i586-1.txz
   7   wget $BASE_URL/kernel-generic-smp-4.4.301_smp-i686-1.txz
   8   wget $BASE_URL/kernel-headers-4.4.301_smp-x86-1.txz
   9   wget $BASE_URL/kernel-huge-4.4.301-i586-1.txz
  10   wget $BASE_URL/kernel-huge-smp-4.4.301_smp-i686-1.txz
  11   wget $BASE_URL/kernel-modules-4.4.301-i586-1.txz
  12   wget $BASE_URL/kernel-modules-smp-4.4.301_smp-i686-1.txz
  13   wget $BASE_URL/kernel-source-4.4.301_smp-noarch-1.txz
  14 }
  15 
  16 function update
  17 {
  18   cp /etc/lilo.conf /etc/lilo.conf.old20220213
  19   ls /boot
  20   cd /tmp/packages
  21   upgradepkg kernel-*.txz
  22   # uname -a says that it has a SMP kernel
  23   /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.301-smp | 
  24 bash
  25   ls /boot
  26   cat /etc/lilo.conf | grep image
  27   echo "Check content, image should have kernel 4.4.301"
  28   read
  29   echo "Going to execute lilo"
  30   lilo
  31   mv *.txz /home/vitor/Downloads/slack14_2i386patches
  32 }
  33 
  34 # get_packages
  35 # update
  36 

Slackware docker image

   1 docker run --rm -d -it --name slack15 liveslak/slackware cat
   2 docker exec -it slack15 bash
   3 # https://slackpkg.org/documentation.html
   4 slackpkg update 
   5 slackpkg search python 
   6 slackpkg install python3 nano python-pip
   7 # python3-3.9.16-x86_64-1_slack15.0.txz
   8 python3 -V
   9 cd /tmp/
  10 wget https://slackbuilds.org/slackbuilds/15.0/development/amazon-corretto.tar.gz 
  11 tar xvzf amazon-corretto.tar.gz 
  12 cd amazon-corretto
  13 wget https://corretto.aws/downloads/resources/17.0.4.8.1/amazon-corretto-17.0.4.8.1-linux-x64.tar.gz 
  14 sh amazon-corretto.SlackBuild 
  15 installpkg /tmp/amazon-corretto-17.0.4.8.1-x86_64-1_SBo.tgz 
  16 /usr/lib64/java/bin/java
  17 /usr/lib64/java/bin/javac
  18 PATH=$PATH:/usr/lib64/java/bin/ 
  19 echo $PATH 
  20 export PATH
  21 docker stop slack15

With slackpkg+ and slackonly (builds from slackbuilds)

   1 docker run --rm -d -it --name slack15 liveslak/slackware cat
   2 docker exec -it slack15 bash
   3 wget https://sourceforge.net/projects/slackpkgplus/files/slackpkg%2B-1.8.0-noarch-7mt.txz/download
   4 mv download download.txz
   5 installpkg download.txz
   6 slackpkg update gpg
   7 slackpkg update 
   8 #vi /etc/slackpkg/slackpkgplus.conf
   9 #REPOPLUS=( slackpkgplus slackonly )
  10 #MIRRORPLUS['slackonly']=https://slackonly.com/pub/packages/15.0-x86_64/
  11 sed -i 's/slackpkgplus /slackpkgplus slackonly /g' /etc/slackpkg/slackpkgplus.conf
  12 echo "MIRRORPLUS['slackonly']=https://slackonly.com/pub/packages/15.0-x86_64/" >> /etc/slackpkg/slackpkgplus.conf
  13 slackpkg update gpg
  14 slackpkg update
  15 slackpkg search deb2tgz
  16 # [unin] slackonly : deb2tgz-0.2-noarch-1_slonl
  17 slackpkg search jdk17
  18 # [unin] slackonly : zulu-openjdk17-17.0.2-x86_64-1_slonly
  19 slackpkg install zulu-openjdk17-17.0.2-x86_64-1_slonly
  20 find . -name "java"
  21 ./etc/file/magic/java
  22 ./usr/lib64/zulu-openjdk17/bin/java
  23 ./usr/lib64/zulu-openjdk17/bin/java -version
  24 # openjdk version "17.0.2" 2022-01-18 LTS
  25 ./usr/lib64/zulu-openjdk17/bin/javac -version
  26 # javac 17.0.2
  27 

Slackware docker java environment

Dockerfile

FROM liveslak/slackware
RUN wget https://sourceforge.net/projects/slackpkgplus/files/slackpkg%2B-1.8.0-noarch-7mt.txz/download
RUN mv download download.txz
RUN installpkg download.txz
RUN slackpkg update gpg
RUN slackpkg update 
RUN sed -i 's/slackpkgplus /slackpkgplus slackonly /g' /etc/slackpkg/slackpkgplus.conf
RUN echo "MIRRORPLUS['slackonly']=https://slackonly.com/pub/packages/15.0-x86_64/" >> /etc/slackpkg/slackpkgplus.conf
RUN slackpkg update gpg
RUN slackpkg update
RUN slackpkg install zulu-openjdk17-17.0.2-x86_64-1_slonly
RUN slackpkg install apache-maven git-2.35 htop
ENV PATH=/bin:/sbin/:/usr/bin:/usr/sbin:/usr/lib64/zulu-openjdk17/bin/
RUN mkdir /app
WORKDIR /app
COPY . .
CMD ["/bin/bash"]

Steps

   1 docker build -t slack-openjdk-image  .
   2 docker run --rm -d -it --name slack15 slack-openjdk-image
   3 docker exec -it slack15 bash
   4 # inside the container
   5 git clone https://github.com/vborrego/springboot-test.git
   6 cd springboot-test/
   7 mvn clean install 
   8 nohup java -jar target/test-spring-boot-0.1.0.jar &
   9 curl localhost:8080/dummy
  10 curl http://localhost:8080/login
  11 exit # exit the container
  12 docker stop slack15 

Slackware (last edited 2023-11-23 13:41:32 by vitor)