Slackware - nurmi-labs/blogger GitHub Wiki

DHCP client

If NetworkManager displays on password protected WiFi connections a message "DHCP failed to start" try commenting out dhcp=dhcpcd in the below and uncommenting #dhcp=dhclient.

bash-4.3# cat /etc/NetworkManager/conf.d/00-dhcp-client.conf
[main]
# Choose a DHCP client below.  Upstream recommends dhclient, but results may vary.
# dhcpcd is the DHCP client usually used by Slackware:
dhcp=dhcpcd
# dhclient is the ISC reference DHCP client, part of the dhcp package:
#dhcp=dhclient
# This is a simple DHCP client that is built into NetworkManager:
#dhcp=internal
bash-4.3# 

R

Deal with Sys.timezone() output and set a default CRAN "repo" mirror.

bash-4.3$ cat ~/.Rprofile
local({
  zoneinfopath <- Sys.readlink("/etc/localtime-copied-from")
  tz <- sub("/usr/share/zoneinfo/", "", zoneinfopath, fixed = TRUE)
  Sys.setenv(TZ = tz)
})

options(repos = c(CRAN = "https://mirrors.dotsrc.org/cran/"))
bash-4.3$ R --no-echo -e 'Sys.getenv("TZ")'
[1] "Europe/Copenhagen"
bash-4.3$ R --no-echo -e 'getOption("repos")'
                              CRAN 
"https://mirrors.dotsrc.org/cran/" 
bash-4.3$ 

The timezone workaround as of the configuration change (2020-12-09) is redundant.

R

multilib

A script that rsyncs with alienBOB’s repo and installs the multilib packages.

bash-5.1$ curl https://slackware.uk/~dive/scripts/alien-multilib-rsync.sh
#!/bin/sh

# NOTE

# THIS SCRIPT IS FOR SLACKWARE 15.0!
# To use the -current repo, change RELEASE=15.0 to RELEASE="-current".
# (-current is not actually a release.)

# Also important: Don't forget to blacklist multilib in slackpkg if you
# use it.  /etc/slackpkg/blacklist:
#
# [0-9]+alien
# [0-9]+compat32

# Set MULTILIBDIR to a directory of your choosing.  Make sure that the
# directory is empty before running this for the first time.
# Default: /root/multilib

# You need to be root to run this script.

# This was written from the instructions on alienBOB's multilib blog post:

# https://wiki.alienbase.nl/doku.php?id=slackware:multilib

set -e

RELEASE=15.0
# RELEASE="-current"
MULTILIBDIR="/root/multilib"
mkdir -p "$MULTILIBDIR"
cd "$MULTILIBDIR"

URL="rsync://bear.alienbase.nl/mirrors/people/alien/multilib/$RELEASE/"

# Take an md5sum "snapshot" of the multilib package directory before we start
# and then after syncing take another to compare it with.
md5sum1=$( find "$MULTILIBDIR" -name "*.t?z" | md5sum )

rsync -ruhv --progress --exclude=debug/ --include=*/ --include=*t?z \
  --delete --exclude=* "$URL" ./

# snapshot #2
md5sum2=$( find "$MULTILIBDIR" -name "*.t?z" | md5sum )

if [ "$md5sum1" = "$md5sum2" ]; then
  printf "%s\n" "No changes detected."
  exit 0
fi

# Upgrade/install everything
upgradepkg --reinstall --install-new *.t?z
upgradepkg --install-new slackware64-compat32/*-compat32/*.t?z
bash-5.1$ 

slackpkg

root@darkstar:~# ed /etc/slackpkg/mirrors
23291
27,28p
# You only need to select one mirror and uncomment it.
# ONLY ONE mirror can be uncommented.
97
# ftp://mirrors.dotsrc.org/.disk1/slackware/slackware-14.2/
c
 ftp://mirrors.dotsrc.org/slackware/slackware-14.2/
.
w
23283
q
root@darkstar:~# 

slackpkg

slackpkg+

A slackpkg plugin for third-party repositories.

slackpkg+