Lect08 - Packet Management Flashcards
Name three ways to install software on Linux?
- Compile from source
- Use a pre-built package (usually distro dependent)
- Build your own package
Name the steps to compile software from source?
- Go to GitHub and download the tarball file: cooltool-2.0.tar.gz
- Extract the contents: # tar xzvf cooltool-2.0.tar.gz
- Change into the resulting directory: # cd cooltool-2.0
- Run and compile the source code and install:
# ./configure
sets environment variables and enables or disables program features based on available libraries and arguments
# make
Compiles the program using param provided by ./configure
# make install
Moves compiled executables, libraries and documentation to their respective directories on the computer.
What are the drawbacks of building from source?
- Unless configuration options are changed, the package will be installed in default directories that might not meet your particular distribution’s standards
- There will be no catalog of installed software and no easy upgrade path or removal method (in most cases)
- There may be times when you cannot find a distribution package and source is your only option. Learn to build your own package.
How is the internal package management called in Slackware?
- pkgtools [installpkg, upgradepkg, removepkg]
- slackpkg - front end (CLI) for pkgtools
Slackpkg - Automated tool for package management in Slackware. Mirror config file under: /etc/slackpkg/mirrors
The blacklist specifies those programs and packages that we do not want upgraded on a regular basis. The blacklist file is located at /etc/slackpkg/blacklist. Useful commands:
# slackpkg update
# slackpkg upgrade-all
To install Slackware package, when we are not using the slackpkg front end, we use the pkgtool command installpkg:
# installpkg software.tgz
Packages can be similarly removed or upgraded with removepkg or upgradepkg.
How is the external package management called in Slackware?
- Normally use SlackBuilds (slackbuilds.org)
- sbotools is one front end tool for SlackBuilds
In short, a SlackBuild is a script that (normally) takes source code and compiles and packages it into a Slackware .tgz (or .tzx) file that we can install using installpkg. There are normally four files included in the SlackBuild package:
- software.info
- README
- software.SlackBuild
- slack-desc
To build a Slackware compatible package, you simply drop the source code for the software into the same directory the SlackBuild is in (no need to extract the source tarball) and execute the SlackBuild script. The package is created and (normally) placed in the /tmp directory ready for installation via installpkg.
Explain the following commands for sbtools:
- # sbosnap fetch
- # sbofind
- # sbocheck
- # sboinstall <packagename></packagename>
- # sboupgrade <packagename></packagename>
-
# sbosnap fetch
Initialize the SlackBuild repository into /usr/sbo/repo - # sbofind
Search for packages based on names and keywords
- e: exact match
- t: no tags
- r: view the README file for the package
- te: only find apps and no keyword hits
-
# sbocheck
Update the repository and identify packages that need upgrading -
# sboinstall <packagename></packagename>
Install a package (and it’s dependencies) -
# sboupgrade <packagename></packagename>
Upgrade an already installed package
A complete list of packages installed on your system is maintained in /var/log/packages.