[Slackbuilds-users] Template updates, 20261004
B. Watson
urchlay at slackware.uk
Sun Oct 4 08:51:23 UTC 2026
Announcing: New updates to the SBo build templates.
We thought about holding this back until the Slackware 16.0 release,
but we decided it's useful for whatever remaining time 15.0 has, too.
As always, you can get the templates here:
https://slackbuilds.org/templates/
...or by doing this:
git clone git://git.slackbuilds.org/templates.git
What does this mean for your SlackBuild scripts? For existing scripts,
nothing yet. As you update your scripts, we encourage you to modify them
to align with the new template, but we don't expect everyone to update
all their scripts *just* to make them match the new stuff.
For totally new scripts that aren't updates of existing ones, please
base them on the new template. For now, we're not actually going
to enforce this, but eventually (probably after the Slackware 16.0
release), we will add new checks to sbolint to make it complain about
outdated template code.
The most important changes:
- We now have not one but two rust templates. One for builds that
will list dozens of .crate files in DOWNLOAD, and a rust-vendored
template (with support scripts) for those who prefer to "vendor"
the required sources and have the ability to host a tarball on
some web server. The support scripts are cargo-mkvendored.sh
for rust-vendored-template, and gen_crate_dependencies.sh
for rust-template.
- The new find/chmod template that was discussed on this list a
while back is finally implemented. It's faster than the old
template, and also more accurate (doesn't trip over broken
symlinks, and catches "weird" permissions like 501 or 701).
- No more "chown -R root:root ." after tarball extraction.
Instead, the tarball is extracted with --no-same-owner, which
creates the files as root:root in the first place.
- rubygem-template no longer installs file in /usr/doc/$PRGNAM-$VERSION
with incorrect permissions/ownership. It also now uses the SLKCFLAGS,
instead of setting them and then not passing them to 'gem install'.
- All the templates now use a new variable PKGDOC, to help avoid
repetitious code. What used to be written as this:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
<documentation> \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
is now written:
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
cp -a \
<documentation> \
$PKGDOC
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
...which is more maintainable (see "DRY Principle").
- In the same vein, the section that sets SLKCFLAGS based on ARCH
has been condensed.
- Some extra commentary, e.g. a section explaining "make -j1".
More information about the SlackBuilds-users
mailing list