summaryrefslogtreecommitdiff
path: root/slackware-bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'slackware-bootstrap')
-rw-r--r--slackware-bootstrap/bootstrap17
-rw-r--r--slackware-bootstrap/repositories.toml132
-rwxr-xr-xslackware-bootstrap/slackpkg30
-rw-r--r--slackware-bootstrap/slackpkg-blacklist52
-rwxr-xr-xslackware-bootstrap/slpkg17
-rw-r--r--slackware-bootstrap/slpkg.toml173
-rwxr-xr-xslackware-bootstrap/sudo8
-rw-r--r--slackware-bootstrap/sudoers96
-rwxr-xr-xslackware-bootstrap/user13
9 files changed, 538 insertions, 0 deletions
diff --git a/slackware-bootstrap/bootstrap b/slackware-bootstrap/bootstrap
new file mode 100644
index 0000000..9960bc0
--- /dev/null
+++ b/slackware-bootstrap/bootstrap
@@ -0,0 +1,17 @@
+#!/bin/bash
+basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+username="user"
+
+while getopts u:a:f: flag
+do
+ case "${flag}" in
+ u) username=${OPTARG};;
+ esac
+done
+
+echo "working dir: $basedir"
+
+sh $basedir/user
+sh $basedir/sudo
+sh $basedir/slackpkg
+sh $basedir/slpkg
diff --git a/slackware-bootstrap/repositories.toml b/slackware-bootstrap/repositories.toml
new file mode 100644
index 0000000..06e9d1b
--- /dev/null
+++ b/slackware-bootstrap/repositories.toml
@@ -0,0 +1,132 @@
+# This is the general repositories configuration file of slpkg:
+# /etc/slpkg/repositories.toml
+# Updated: 29/09/2024, Version: 5.1.4
+
+# Set 'true' or 'false' to enable or disable the repository you want.
+# You can use a mirror not included in this file.
+
+# Notes: Before using a repository, make sure you have read about it.
+# Some repositories are for -current only. Change the mirror
+# if it is necessary. The mirror or every part of the mirror
+# should end with a slash '/' except for git repositories.
+
+# Template to define a binary custom repository.
+# At least are required [NAME], ENABLE, MIRROR and TAG options.
+# The MIRROR should include the files ChangeLog.txt, PACKAGES.TXT,
+# and CHECKSUMS.md5. If the file ChangeLog.txt is located in
+# a different branch, it should be set a variable CHANGELOG.
+# Example:
+# [ALIEN]
+# ENABLE = true
+# MIRROR = "https://slackware.nl/people/alien/sbrepos/15.0/x86_64/"
+# CHANGELOG = "https://slackware.nl/people/alien/sbrepos/"
+# TAG = "alien"
+
+# Salix OS Distribution:
+# Replace the SLACK, SLACK_EXTRA and SLACK_PATCHES with the mirrors:
+# https://repo.greeklug.gr/data/pub/linux/salix/x86_64/slackware-15.0/
+# https://repo.greeklug.gr/data/pub/linux/salix/x86_64/slackware-15.0/extra/
+# https://repo.greeklug.gr/data/pub/linux/salix/x86_64/slackware-15.0/patches/
+
+[DEFAULT]
+# This is the DEFAULT REPOSITORY.
+# You can change it with one that you see below.
+# Make sure you have enabled it before.
+REPOSITORY = "slack"
+
+[NEW_PACKAGES]
+# Configure the repositories that you want new packages to be added
+# when upgrading installed packages. Only useful for repositories that
+# are fully installed on the system. Example ["slack", "gnome"].
+# Normally you should see the new packages first to install.
+REPOSITORIES = []
+
+[REMOVE_PACKAGES]
+# Configure the repositories that you want to remove installed packages
+# that no longer exist in the repository. Only useful for repositories
+# that are fully installed on the system. Example ["slack", "gnome"].
+# WARNING: Always check which packages are going to remove before proceed.
+REPOSITORIES = []
+
+[SBOSRCARCH]
+# Archive of source files linked to by .info files on SlackBuilds.org.
+# Used as an alternative download source for SBo and Ponce repositories.
+# For more information, visit: https://slackware.uk/sbosrcarch/README
+MIRROR = "https://slackware.uk/sbosrcarch/by-name/"
+
+[SBO]
+ENABLE = true
+MIRROR = "https://slackbuilds.org/slackbuilds/15.0/"
+# Alternative, you can use a git repository.
+# MIRROR = "https://github.com/SlackBuildsOrg/slackbuilds.git"
+# MIRROR = "https://gitlab.com/SlackBuilds.org/slackbuilds.git"
+
+[PONCE]
+ENABLE = false
+MIRROR = "https://github.com/Ponce/slackbuilds.git"
+# Alternative, you can use the this repository.
+# MIRROR = "https://cgit.ponce.cc/slackbuilds/plain/"
+
+[SLACK]
+ENABLE = true
+MIRROR = "http://ftp.slackware.pl/pub/slackware/slackware64-current/"
+
+[SLACK_EXTRA]
+ENABLE = true
+MIRROR = "http://ftp.slackware.pl/pub/slackware/slackware64-current/extra/"
+
+[SLACK_PATCHES]
+ENABLE = true
+MIRROR = "http://ftp.slackware.pl/pub/slackware/slackware64-current/patches/"
+
+[ALIEN]
+ENABLE = true
+MIRROR = "https://slackware.nl/people/alien/sbrepos/current/x86_64/"
+
+[MULTILIB]
+ENABLE = true
+MIRROR = "https://slackware.nl/people/alien/multilib/current/"
+
+[RESTRICTED]
+ENABLE = false
+MIRROR = "https://slackware.nl/people/alien/restricted_sbrepos/15.0/x86_64/"
+
+[GNOME]
+ENABLE = false
+MIRROR = "https://slackware.uk/gfs/15.0/41.10/x86_64/"
+
+[MSB]
+ENABLE = false
+MIRROR = "https://slackware.uk/msb/15.0/1.28/x86_64/"
+
+[CSB]
+ENABLE = false
+MIRROR = "https://slackware.uk/csb/15.0/x86_64/"
+
+[CONRAID]
+ENABLE = true
+MIRROR = "https://slackers.it/repository/slackware64-current/"
+
+[SLACKONLY]
+ENABLE = true
+MIRROR = "https://packages.slackonly.com/pub/packages/current-x86_64/"
+
+[SALIX]
+ENABLE = false
+MIRROR = "https://repo.greeklug.gr/data/pub/linux/salix/x86_64/15.0/"
+
+[SALIX_EXTRA]
+ENABLE = false
+MIRROR = "https://repo.greeklug.gr/data/pub/linux/salix/x86_64/extra-15.0/"
+
+[SLACKEL]
+ENABLE = false
+MIRROR = "http://www.slackel.gr/repo/x86_64/current/"
+
+[SLINT]
+ENABLE = false
+MIRROR = "https://slackware.uk/slint/x86_64/slint-15.0/"
+
+[PPRKUT]
+ENABLE = false
+MIRROR = "https://repo.liwjatan.org/pprkut/15.0/x86_64/"
diff --git a/slackware-bootstrap/slackpkg b/slackware-bootstrap/slackpkg
new file mode 100755
index 0000000..b6af825
--- /dev/null
+++ b/slackware-bootstrap/slackpkg
@@ -0,0 +1,30 @@
+#!/bin/sh
+basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+
+printf "\x1b[1;31m======================= [ \x1b[7;31m ATTENTION \x1b[0;0m\x1b[1;31m ] ========================\n\x1b[0;0m"
+printf "\x1b[16;32mREAD CAREFULLY:\n\x1b[0;0m"
+echo "this script will open a text editor to edit the mirror list"
+echo "for the package manager."
+echo "please uncomment a mirror from a location near you,"
+echo "by removing the '#' from the beginning of the line."
+printf "\x1b[16;32mONLY CHOOSE ONE MIRROR !\n\x1b[0;0m"
+echo "you can save the file by pressing ctrl+x."
+
+printf "\x1b[1;31m================================================================\n\x1b[0;0m"
+
+read -p "press enter to continue"
+nano /etc/slackpkg/mirrors
+
+echo "running slackpkg update ..."
+slackpkg update
+
+echo "============== [ system update ] ==============="
+echo "simply press OK on the package selection screen"
+echo "================================================"
+
+read -p "press enter to continue"
+echo "running full system update ..."
+slackpkg upgrade-all
+cp $basedir/slackpkg-blacklist /etc/slackpkg/blacklist
+slackpkg update
+slackpkg install-new
diff --git a/slackware-bootstrap/slackpkg-blacklist b/slackware-bootstrap/slackpkg-blacklist
new file mode 100644
index 0000000..e5eef92
--- /dev/null
+++ b/slackware-bootstrap/slackpkg-blacklist
@@ -0,0 +1,52 @@
+# /etc/slackpkg/blacklist
+#
+# This is a blacklist file. Any packages listed here won't be
+# upgraded, removed, or installed by slackpkg.
+
+# aaa_libraries should NOT be blacklisted!
+#
+# You can blacklist using regular expressions.
+#
+# All of the following will be checked for the regex:
+# Package series, name, version, arch, build, and fullname
+# When blacklisting packages, you can use extended regex on package names
+# (such as xorg-.* instead of xorg-server, xorg-docs, etc), and a trailing
+# slash for package series ("n/", "ap/", "xap/", etc).
+#
+# To blacklist *only* the "xorg-server" package, use this:
+# xorg-server
+#
+# To blacklist *all* of the "xorg-server-*" packages, use this:
+# xorg-server.*
+#
+# To blacklist the entire KDE package set, use this:
+# kde/
+#
+# You will need to escape any special characters that are present in the
+# package name. For example, to blacklist the gcc-g++ package, use this:
+# gcc-g\+\+
+#
+# DON'T put any space(s) before or after the package name or regex.
+#
+# Automated upgrade of kernel packages may not be wanted in some situations;
+# uncomment the lines below if that fits your circumstances, but note that
+# kernel-headers should *not* be blacklisted:
+#
+kernel-generic.*
+kernel-huge.*
+kernel-modules.*
+kernel-source.*
+#
+# This one will blacklist all SBo packages:
+[0-9]+_SBo
+
+[0-9]+alien
+[0-9]+compat32
+[0-9]+_slonly
+
+slpkg
+fcitx5.*
+alligator*
+merkuro*
+fcitx*
+tokodon*
diff --git a/slackware-bootstrap/slpkg b/slackware-bootstrap/slpkg
new file mode 100755
index 0000000..8b05caf
--- /dev/null
+++ b/slackware-bootstrap/slpkg
@@ -0,0 +1,17 @@
+#!/bin/bash
+basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+
+oldpwd=$(pwd)
+cd $basedir
+
+wget https://gitlab.com/dslackw/slpkg/-/archive/5.2.5/slpkg-5.2.5.tar.gz
+tar -xvf slpkg-5.2.5.tar.gz
+cd slpkg-5.2.5
+./install.sh
+
+cp -f $basedir/repositories.toml /etc/slpkg/repositories.toml
+cp -f $basedir/slpkg.toml /etc/slpkg/slpkg.toml
+
+slpkg -U
+
+cd $oldpwd
diff --git a/slackware-bootstrap/slpkg.toml b/slackware-bootstrap/slpkg.toml
new file mode 100644
index 0000000..84afc7d
--- /dev/null
+++ b/slackware-bootstrap/slpkg.toml
@@ -0,0 +1,173 @@
+# This is the general configuration file of slpkg:
+# /etc/slpkg/slpkg.toml
+# Updated: 24/09/2024, Version: 5.1.3
+
+[CONFIGS]
+
+# OS architecture by default.
+OS_ARCH = "x86_64"
+
+# Where the packages download.
+# This path works only with the command download.
+DOWNLOAD_ONLY_PATH = "/tmp/slpkg/"
+
+# File suffix for list packages.
+# Change here if you are going to use '.sqf' files.
+FILE_LIST_SUFFIX = ".pkgs"
+
+# List of suffixes for binary packages.
+PACKAGE_TYPE = [".tgz", ".txz"]
+
+# Configs for displaying colorful menu. Default is true. [true/false]
+COLORS = true
+
+# Specify the number of jobs to run concurrently. Default is '-j4'.
+MAKEFLAGS = "-j12"
+
+# Set for GPG verification. Default is false.
+# If you set true, you should update the repositories for GPG-KEY import.
+GPG_VERIFICATION = false
+
+# Set for checksum md5 verification. Default is true. [true/false]
+CHECKSUM_MD5 = true
+
+# Dialog is a program that will let you present a variety of questions or
+# display messages using dialog boxes from a shell script.
+# Default is true. [true/false]
+DIALOG = true
+
+# View missing dependencies as main packages from the repository.
+# Some repositories include packages as dependencies,
+# but not as main packages. Default is true. [true/false]
+VIEW_MISSING_DEPS = true
+
+# There are two different methods to choose when you want to upgrade
+# your installed packages, "version" method and "package" method.
+# With the "version" method (it is by default), it will compare
+# the version and the build number of the packages following the
+# semantic versioning, and with the "package" method it will compare
+# for different package between installed and repository and this
+# means it will suggest also downgrades if the installed package
+# is newer than the repository package. Default is false. [true/false]
+PACKAGE_METHOD = false
+
+# This setting allows you to downgrade packages.
+# It works if the package method it is false.
+# Default is false. [true/false]
+DOWNGRADE_PACKAGES = false
+
+# Delete downloaded sources after build or install packages.
+# Default is false. [true/false]
+DELETE_SOURCES = false
+
+# Choose ascii printable characters.
+# If true, it uses the extended characters, otherwise the basic ones.
+# Default is true. [true/false].
+ASCII_CHARACTERS = true
+
+# Set false to all the questions. If set false, option --yes will
+# not work. Default is true. [true/false].
+ASK_QUESTION = true
+
+# This config removes the kernel version from some slackbuilds custom
+# version build, like nvidia-kernel and virtualbox-kernel slackbuild packages.
+# It helps to compare install and repository versions.
+# Default is true. [true/false].
+KERNEL_VERSION = true
+
+# Download sources in parallel. Default is false. [true/false]
+# Alternatively, you can use the option '--parallel'.
+PARALLEL_DOWNLOADS = true
+
+# Specifies number of concurrent download streams. Default is 5.
+MAXIMUM_PARALLEL = 3
+
+# If progress bar is true, it does not print the commands as they
+# are executed. Default is false. [true/false]
+PROGRESS_BAR = false
+
+# There are 5 predefined spinners for the progress bar.
+# Default is spinner. [spinner/pie/moon/line/pixel/ball/clock]
+PROGRESS_SPINNER = "spinner"
+
+# Choose color for the progress bar spinner.
+# Default is white. [white/green/violet/yellow/blue/cyan/grey/red]
+SPINNER_COLOR = "green"
+
+# Choose color for the border box.
+# Bold colors: [bold_green/bold_cyan/bold_yellow/bold_red/bold_blue]
+# Colors: [white/green/cyan/yellow/red/blue]
+# Default is bold_green.
+BORDER_COLOR = "bold_green"
+
+# Keep process log files on /var/log/slpkg/ folder.
+# Default is true. [true/false]
+PROCESS_LOG = true
+
+# Slackware command for installation packages, instead, you can use
+# 'installpkg'. Normally upgradepkg only upgrades packages that are
+# already installed on the system, and will skip any packages that
+# do not already have a version installed. If --install-new is specified,
+# the behavior is modified to install new packages in addition to
+# upgrading existing ones. See manpage of the upgradepkg.
+INSTALLPKG = "upgradepkg --install-new"
+
+# Slackware command to reinstall packages.
+# Upgradepkg usually skips packages if the exact same package
+# (matching name, version, arch, and build number) is already installed
+# on the system. Use the --reinstall option if you want to upgrade all
+# packages even if the same version is already installed.
+REINSTALL = "upgradepkg --reinstall"
+
+# Slackware command to remove packages.
+# removepkg removes a previously installed Slackware package, while
+# writing a progress report to the standard output. A package may be
+# specified either by the full package name (as you'd see listed in
+# /var/lib/pkgtools/packages/), or by the base package name.
+# See manpage of the removepkg.
+REMOVEPKG = "removepkg"
+
+# You can choose a downloader among wget, wget2, curl and lftp.
+# Default is wget. [wget/wget2/curl/lftp]
+DOWNLOADER = "wget"
+
+# Wget downloader options.
+# -c, --continue: resume getting a partially-downloaded file.
+# -q, Turn off Wget's output.
+# --show-progress, Force wget to display the progress bar in any verbosity.
+WGET_OPTIONS = "-c -q --progress=bar:force:noscroll --show-progress"
+
+# Curl downloader options.
+CURL_OPTIONS = ""
+
+# Lftp donwloader options.
+LFTP_GET_OPTIONS = "-c get -e"
+
+# Lftp mirror options are used to synchronize with the SBo and
+# Ponce repositories or for the local repositories.
+LFTP_MIRROR_OPTIONS = "-c mirror --parallel=100 --only-newer --delete"
+
+# Instead of the lftp command to synchronize the Slackbuilds repositories
+# (sbo and ponce) you can use the git clone command, after you have also
+# changed the mirror in the repositories.toml file.
+GIT_CLONE = "git clone --depth 1"
+
+# Python urllib3 settings used for checking between two changelog files.
+# Timeouts allow you to control how long (in seconds) requests are allowed
+# to run before being aborted. In simple cases, you can specify a timeout
+# as a float. By default, urllib3 will retry requests 3 times and follow
+# up to 3 redirects. For more please visit:
+# https://urllib3.readthedocs.io/en/stable/user-guide.html
+URLLIB_RETRIES = false
+URLLIB_REDIRECT = false
+URLLIB_TIMEOUT = 3.0
+
+# If you are going to use a proxy server, try to fill in these variables.
+# Choose between http or socks proxy type.
+# For a sock proxy, you need to install the PySocks package.
+# https://urllib3.readthedocs.io/en/stable/advanced-usage.html#socks-proxies
+PROXY_ADDRESS = ""
+PROXY_USERNAME = ""
+PROXY_PASSWORD = ""
+BOOTLOADER_COMMAND = ""
+ARIA2_OPTIONS = "-c"
diff --git a/slackware-bootstrap/sudo b/slackware-bootstrap/sudo
new file mode 100755
index 0000000..c5ec129
--- /dev/null
+++ b/slackware-bootstrap/sudo
@@ -0,0 +1,8 @@
+#!/bin/sh
+basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+
+echo "setting up /etc/sudoers ..."
+cp -f $basedir/sudoers /etc/sudoers
+chown root:root /etc/sudoers
+chmod 440 /etc/sudoers
+echo "done"
diff --git a/slackware-bootstrap/sudoers b/slackware-bootstrap/sudoers
new file mode 100644
index 0000000..a12b223
--- /dev/null
+++ b/slackware-bootstrap/sudoers
@@ -0,0 +1,96 @@
+## sudoers file.
+##
+## This file MUST be edited with the 'visudo' command as root.
+## Failure to use 'visudo' may result in syntax or file permission errors
+## that prevent sudo from running.
+##
+## See the sudoers man page for the details on how to write a sudoers file.
+##
+
+##
+## Host alias specification
+##
+## Groups of machines. These may include host names (optionally with wildcards),
+## IP addresses, network numbers or netgroups.
+# Host_Alias WEBSERVERS = www1, www2, www3
+
+##
+## User alias specification
+##
+## Groups of users. These may consist of user names, uids, Unix groups,
+## or netgroups.
+# User_Alias ADMINS = millert, dowdy, mikef
+
+##
+## Cmnd alias specification
+##
+## Groups of commands. Often used to group related commands together.
+# Cmnd_Alias PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \
+# /usr/bin/pkill, /usr/bin/top
+# Cmnd_Alias REBOOT = /sbin/halt, /sbin/reboot, /sbin/poweroff
+
+##
+## Defaults specification
+##
+## You may wish to keep some of the following environment variables
+## when running commands via sudo.
+##
+## Locale settings
+# Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
+##
+## Run X applications through sudo; HOME is used to find the
+## .Xauthority file. Note that other programs use HOME to find
+## configuration files and this may lead to privilege escalation!
+# Defaults env_keep += "HOME"
+##
+## X11 resource path settings
+# Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
+##
+## Desktop path settings
+# Defaults env_keep += "QTDIR KDEDIR"
+##
+## Allow sudo-run commands to inherit the callers' ConsoleKit session
+# Defaults env_keep += "XDG_SESSION_COOKIE"
+##
+## Uncomment to enable special input methods. Care should be taken as
+## this may allow users to subvert the command being run via sudo.
+# Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
+##
+## Uncomment to use a hard-coded PATH instead of the user's to find commands
+# Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+##
+## Uncomment to send mail if the user does not enter the correct password.
+# Defaults mail_badpass
+##
+## Uncomment to enable logging of a command's output, except for
+## sudoreplay and reboot. Use sudoreplay to play back logged sessions.
+# Defaults log_output
+# Defaults!/usr/bin/sudoreplay !log_output
+# Defaults!/usr/local/bin/sudoreplay !log_output
+# Defaults!REBOOT !log_output
+
+##
+## Runas alias specification
+##
+
+##
+## User privilege specification
+##
+root ALL=(ALL:ALL) ALL
+
+## Uncomment to allow members of group wheel to execute any command
+%wheel ALL=(ALL:ALL) ALL
+
+## Same thing without a password
+# %wheel ALL=(ALL:ALL) NOPASSWD: ALL
+
+## Uncomment to allow members of group sudo to execute any command
+# %sudo ALL=(ALL:ALL) ALL
+
+## Uncomment to allow any user to run sudo if they know the password
+## of the user they are running the command as (root by default).
+# Defaults targetpw # Ask for the password of the target user
+# ALL ALL=(ALL:ALL) ALL # WARNING: only use this together with 'Defaults targetpw'
+
+## Read drop-in files from /etc/sudoers.d
+@includedir /etc/sudoers.d
diff --git a/slackware-bootstrap/user b/slackware-bootstrap/user
new file mode 100755
index 0000000..320c229
--- /dev/null
+++ b/slackware-bootstrap/user
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+user="user"
+if [[ $1 != '' ]]; then
+ user=$1
+fi
+
+useradd $user
+echo "created user $user"
+passwd $user
+
+usermod -a -G wheel $user
+echo "added user $user to wheel group"