slapt-get
slapt-get copied to clipboard
slapt-get is an APT like system for Slackware package management.
Copyright (C) 2003-2024 Jason Woodward
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Table of Contents:
-
Features
-
Requirements
-
Installation
-
slapt-getrc
-
Getting started
-
Troubleshooting
-
Thanks and contributions
-
Features
slapt-get tries to emulate Debian's apt-get as closely as possible.
- uses native Slackware tools (installpkg, upgradepkg, and removepkg)
- supports packages as tgz, tlz, tbz, and txz files
- supports multiple package sources with the ability to assign priorities to each source.
- cache data concerning packages and updates from package sources
- supports sources from ftp, ftps, http, https, file:/// and more (libcurl)
- resumes broken downloads and will verify package integrity with MD5 checksum
- show packages that are available (from cached data) and installed
- search package listing using POSIX and extended regular expressions by package name, location, and description
- retrieve, install, and remove packages by name or by specific version
- retrieve and apply updates
- upgrade from one Slackware release to another in a few simple steps
- show description of packages, including mirror location, version, size, dependencies (where available), conflicts (where available), suggestions (where available), description, installation status, and the package changelog entry (where available).
- exclude (hold) packages from upgrades, by name or by regular expression
- transaction engine for install, remove, and upgrades, reporting concise information on what is to be done, ensuring each step happens correctly
- "compare package version" algorithm to prevent downgrades
- recursive dependency resolution using slack-required meta-data (see FAQ) supporting hard, soft, and conditional dependencies
- package conflict resolution using slack-conflicts meta-data (see FAQ)
- package suggestion support for complimentary packages (see FAQ)
- Package data download robustness, only writing changes if all sources download successfully as well as only downloading those sources that have changed since the last download
- i18n support via GNU gettext with over 30 language translations
- extremely fast and easy to script with
-
Requirements
slapt-get requires Slackware-9.0 or better, due to glibc and openssl updates. You can also use slapt-get under Slackware 8.1 if you upgrade glibc-solibs and openssl from Slackware 9.0, or if slapt-get is built statically linked.
The following packages are required to build slapt-get from source: make, gcc, curl, glibc, kernel-headers, binutils, zlib, gettext-tools, and openssl.
If gpgpme is installed, slapt-get can be built with support for signature verification with gnupg. gpgme requires libgpg-error.
The unit tests in t/ require check (http://check.sourceforge.net/).
-
Installation
You can install via meson or make (deprecated).
-
Meson
meson setup build # or any dir of your choosing meson compile -C build # or
ninja -C buildfor older meson releases meson install -C build # orninja -C build installfor older meson releasesMeson/ninja supports
DESTDIR=/path meson install -C buildTIP: slapt-get.Slackbuild will create a Slackware package. Run with sudo or as a privileged user.
-
make (deprecated)
make make install # as privileged user
The Makefile honors DESTDIR.
TIP:
make pkg(as privileged user) will create a Slackware package.
-
-
slapt-getrc
The slapt-getrc file consists currently of the following keys: SOURCE WORKINGDIR EXCLUDE
Choose a mirror from the slackware.com mirror list at http://www.slackware.com/getslack/
-
SOURCE must be a path to a valid Slackware release directory, or a third party source (see example within rc). All that is required is the PACKAGES.TXT (see FAQ entry #17) and CHECKSUMS.md5. Multiple sources can be defined.
NOTE: It is not recommended to mix 3rd party package sources with the official on production servers. Sometimes third party sources contain the same packages as the official mirrors. Third party packages might not be as rigorously tested as official packages.
Each SOURCE can be a assigned a priority level, by appending :{PRIORITY} to the source URI. For example:
SOURCE={url}:DEFAULT is the default, lowest priority SOURCE={url}:PREFERRED assigns more weight to this source SOURCE={url}:OFFICIAL even more weight, used to denote official sources SOURCE={url}:CUSTOM highest priority, for your custom package source
See the FAQ for more information.
-
WORKINGDIR will hold the package data and downloaded packages. This directory will be created automatically as permissions allow.
-
EXCLUDE is a comma separated list of packages you want excluded from updating. This can be the package name, or a extended POSIX regex. For example, to exclude Dropline, use .*-[0-9]dl$. See regex(7).
-
-
Getting started
After installing and customizing the slapt-getrc configuration file, you need to run slapt-get with the --update option to download the package data available from all the package sources you specified within the slapt-getrc file.
Once this is done, you can use the following options:
- --upgrade to upgrade your installed packages.
- --dist-upgrade to upgrade to a newer release (Please refer to the FAQ concerning dist-upgrade prior to running the command).
- --search to locate packages of interest by the package name, disk set, or version. This supports POSIX and extended regular expressions.
- --install to install a package. If the package is already installed it will be upgraded.
- --list to see all the packages available from the package sources you specified within the slapt-getrc configuration file.
- --installed to list all the packages you already have installed.
- --remove to remove packages.
- --show to show information about packages.
- --clean to remove all downloaded packages from the local cache.
- --autoclean to remove packages from local cache that are no longer available on the package sources specified in the slapt-getrc file.
- --remove-obsolete along with --remove or --dist-upgrade will mark all non-downloadable packages for removal.
-
Troubleshooting
Probably some bugs. Email bug reports to me:
Jason Woodward
or file a github issue: https://github.com/jaos/slapt-get/issues
Make sure --update is ran once initially and the data file (package_data) is good.
Some mirrors are incomplete and the downloaded file is actually HTML specifying the web servers error message. MD5 checking has been incorporated in order to alleviate this problem.
Please do not add redundant mirror locations to the same release. Mirror fall back is not implemented (see FAQ #50). Also, any time the source url(s) are changed, slapt-get --update must be run to update the local cache.
If you are getting segfaults, add -g to CFLAGS in the Makefile, change the DEBUG define in src/main.h to 1, and rebuild ( make clean && make ). Run in gdb and let me know via email where the fault happens.
Run the test suite and report any failing tests to github issues.
See the FAQ for more info.
- Thanks and contributions
John Babiak
Big thanks to Dan Barber
Thanks to James Simmons over at linuxpackages.net for his interest, support, and ideas.
nixon
Arnaldo de Moraes Pereira
Michiel H.
Joran Kvalvaag
Ruben
Francesco Gigli
Joel Bjurman
Savvas Efstratiadis
Niklas Volbers
Oto Petrik <oto.petrik at centrum dot cz > authored the Czech translation.
Piotr Simon
Miguel Santinho <info at Simplicidade dot com> authored the Portuguese_Portugal
translation with updates by Sérgio Marques
Vu Nguyen (vncasper at yahoo dot com) authored the Vietnamese translation.
publikum at users dot sourceforge dot net authored the Slovenian translation.
Verachten Bruno
freerock
Erik Gyepes
sin of the DeepStyle team
Victor Keranov <victor_keranov at mail dot bg> contributed the Bulgarian translation.
Kemas Antonius
S_A
Yang Jinsong
Bekir SONAT
Reteaua PTM
Ken Milmore
Anders F Bjorklund
Vitaly Chernookiy <vitaly.v.ch at gmail dot com> contributed the initial cross compiling support
Other translators credited within the translation source files.