yalpack is a simple set of package management tools for LFS/BLFS-based systems. It consists of POSIX-compliant scripts and man pages designed to make managing upgrades and trying out new software easier:
- Install compiled software as a package
- Easily remove unwanted software
- Make upgrades simple(r)
- No space to keep package tarballs? No problem.
- Manage and log .new files
- Generate and retrieve dynamic library information to help with dependency management
- Retrieve a list of installed packages (with or without version information)
- Search for which package provided which file/directory/symlink
- Regenerate the yalpack directory in case of damage
yalpack can be used at any point in the Linux From Scratch installation process once all temporary tools have been built and the chroot stage has been reached. This has been tested successfully on Linux From Scratch 10.1 (sysvinit), as well as the development version (as of June 20th, 2021), which has a merged-usr setup.
Under no circumstances should yalpack be used on the "host" system. yalpack is untested on pre-10.1 versions of Linux From Scratch, and should not be used with glibc-2.26 or earlier.
See INSTALL or run "make all" for details about installation!
Release Notes
Unless important bugs come to light, 0.1.8 is likely to be the last yalpack release until the upcoming Linux From Scratch 11.0-rc comes out. The main feature addition is /etc/yalpack.conf, which allows the administrator to more easily choose the two backup package tree locations, the main yalpack data directory, the build destination directory and the location of the root-only scripts.
In addition, the yalpack scripts have been improved "under the hood." In many ways, these changes are more interesting. The goals here were verifying POSIX compliance and increasing speed and convenience with script optimizations. If nothing else, yalpack-0.1.8 is certainly faster and more flexible than yalpack-0.1.7!
On the POSIX front, all yalpack-0.1.8 scripts have been tested to run with /bin/sh as a symlink to bash, dash and zsh. The dash result was particularly encouraging. POSIX compliance in all scripts will continue to be a goal of this project moving forward.
Feature Changes
- Added /etc/yalpack.conf: The top-level directories used by the yalpack scripts can be specified here.
- Reworked all scripts to collect variables from yalpack.conf and perform sanity checks.
- libcheck has been reworked to be more accurate and informative; a recursive search of the library-related directories can be requested with
libcheck -d
. - Makefile:
- "make install" has been removed; "make package" should be used instead. Using the new scripts during upgrades is less prone to bugs resulting from bad interactions with the already-installed version.
- POSIX-noncompliant globs have been removed.
- Added config validation to ensure that mismatched TMP and SBINDIR values don't cause upgrade or installation failure.
- Added /usr/share/yalpack/backups: Quickly set up the primary or secondary backup location post-install. Useful if either backup location is changed in yalpack.conf.
- Renamed "pkgfind" to "yalfind." The old name didn't really make any sense, since the script actually looks for things inside packages, not packages themselves.
- Comments are now word-wrapped for readability.
Script Optimizations
Although a configuration file was introduced, along with sanity checks for every script, optimizations have made using yalpack significantly faster than before. The improvements in pkgcheck and liblist also affect the operation of pkginst, pkgup, pkgremove and restore-yalpack:
- pkgcheck: Choosing not to check for unexecutable libraries increased speeds markedly for larger packages, and dramatically for packages with a high ratio of non-executable files.
- liblist: Improved loop logic resulted in a speed increase of around 20%.
- pkginst, install.sh, restore-yalpack: Finding and reporting on files, etc. installed under symlinked paths has had a full rewrite. This reporting process in the new version is much faster than before for all packages; it takes practically no time at all for packages without symlinks to directories.
- libcheck: Unless run with --deep, improved loop logic has increased speed.
- newfiles: Cut down on calls to the main method (because newfiles is interactive, the speed is not directly measurable, but the script is now noticeably snappier).
- pkglist: Better loop logic; 50% improvement (but it was fast in any case)
Bugfixes
- pkginst, install.sh, restore-yalpack: Symlinks under non-symlinked paths are no longer reported. (This used to be possible if a symlink in a non-symlinked directory pointed to a file in a symlinked directory.)
- pkgremove: .new files installed under symlinked paths (edge case) are handled in the same manner as other .new files.
- restore-yalpack: Alerts the user to the presence of any directories under PKGTREES and exits.
- Output formatting fixes.
- newfiles: diff output is more readable.
For the Future
The plan for yalpack with respect to future LFS versions is to test the most recent releases on one LFS version only, with additional testing on the development version in case of major changes on the LFS side. Once LFS 11.0 is available, the following will occur:
- The final pre-11.0 release (probably this one) will be retained on the GitHub page; all earlier release tags that were tested against LFS 10.1 will be deleted.
- Subsequent yalpack releases will be tested against 11.0 for as long as it is the current stable LFS; once 11.1 arrives, only one of those releases will remain on GitHub.
- Repeat.
So, there will be one final yalpack release and release tag associated with each version of LFS from 10.1 onwards retained permanently. Although these releases will probably be compatible with the immediately following LFS version as well, it is too early to make a blanket guarantee to that effect. All retained yalpack releases on the GitHub page will have a notice as to which LFS release(s) they were tested against.