My thoughts on Slackware, life and everything

Tag: slackpkg

Mirror for slackpkg+ and slakfinder

For some time now, the slakfinder.org website has been offline. The domain still exists, but the web site just does not respond. Matteo Rossini (zerouno) needed a break from computers, so it is likely that the site won’t return on short notice.

The effect of the site’s unavailability becomes quite obvious if you use the slackpkg+ extension for slackpkg to manage the packages you installed from 3rd-party community repositories. The “/etc/slackpkg/slackpkgplus.conf” configuration file contains these lines:

?# use this to keep the slackpkg+ package updated to the latest stable release
MIRRORPLUS['slackpkgplus']=https://slakfinder.org/slackpkg+15/

… and that causes a problem every time you run “slackpkg update“. There will be a timeout querying slakfinder.org and a subsequent error. After that, slackpkg will function as usual, you just won’t be able to check on updates for slackpkg+. But the error is annoying.
Luckily I am mirroring the repository for a long while now, so this is easy to fix. Replace the MIRRORPLUS URL above with the following line and run a “slackpkg update“, which will solve the timeout issue:

MIRRORPLUS['slackpkgplus']=https://slackware.nl/slackpkgplus15/

Now, slakfinder.org fulfilled another role!
It hosted a web-based Slackware package search tool. That may actually have been used a lot more than the slackpkg+ repository.

Unfortunately there has never been another instance of that package searcher available online, and the only thing I could dig up is a 10-year old Git repository archive for its code at https://github.com/mrossini/slakfinder . The code does not work with PHP 7, it has no documentation and the sparse comments in the code are mostly in Italian. It’s greek to me 😉
I thought, “a nice weekend project” and I spent the last few days understanding and then fixing the code. I looked at the repositories that it searched (the Internet Archive luckily created a snapshot early December 2022, right before the site disappeared) and decided to prune that repository collection to just the ones that support Slackware 14.2 and newer, and are known to me. That still leaves 62 repositories.

Today I am opening a custom instance of slakfinder on slackware.nl which will hopefully prevent new downtime. Get a look at it here: https://slackware.nl/slakfinder/ .

I haven’t tested the Guest Book, feel free to leave your comments there as well as in the comments section below. Commenting here on the blog will give you a much higher probability of me answering.
If there’s repositories (Slackware-compatible and for Slackware 14.2 or newer) that you want me to add, let me know.

Enjoy! Eric

Introducing slackpkg+, an extension to slackpkg for 3rd party repositories

I want to introduce you to a tool written by Matteo Rossini (nicknamed zerouno of the Italian slacky.it community and contributor of several SlackBuild scripts at SlackBuilds.org as well as creator of the Slackware package search site slakfinder.org) with some serious contributions from phenixia2003, author of compat32pkg.

The tool is “slackpkg+“. It is not a stand-alone piece of software. In fact, it is an extension to Slackware’s package manager “slackpkg“. I will first describe the strengths of “slackpkg” and then come to the reasons why “slackpkg+” was written.

Slackpkg itself is a wrapper around the Slackware pkgtools (installpkg, upgradepkg, removepkg) with built-in package search capabilities and very useful when you want to keep your Slackware installation up to date. It was written with a modular design in mind: it can be extended with new functionality by adding new or extending existing functions in the “/usr/libexec/slackpkg/functions.d/” directory.

Slackpkg is my preferred tool for system upgrades (i.e. upgrading from one Slackware release to the next). People who do not use slackpkg usually have to do much more handywork like reading ChangeLog.txt entries for package additions, updates and removals, and/or follow the official Slackware guideline as found in “UPGRADE.TXT“. One disadvantage of the instructions found in UPGRADE.TXT is that the suggested “upgradepkg –install-new *.t?z” command will install every package you did not yet have installed – not just the packages that were introduced in the latest Slackware release but also the packages which you did not want to install anyway in the past.

Slackpkg allows you to keep full control over the packages that get installed, by showing you lists of candidate packages for every action you want to perform. You can de-select any package you do not want to be acted upon.

So far its strengths. The most heard “complaint” about slackpkg is that it will install and upgrade packages only from official Slackware repositories – it does not support 3rd party package repositories. This is why some users switch to other (unofficial) package managers like slapt-get, which do support 3rd party repositories. Slackware spin-offs like Salix and Vector use slapt-get. Slackpkg also does not allow you to keep a Slackware multilib installation correctly updated. The community tool compat32pkg was written for that purpose.

Both these issues (3rd party repository support and multilib support) are addressed in the slackpkg+ extension to slackpkg.

Slackpkg+ is NOT a new tool with new commands. Because it extends slackpkg, you can continue to use the well-known slackpkg commands after adding your 3rd party repository configuration:

# slackpkg update gpg
# slackpkg update
# slackpkg install openjdk
# slackpkg upgrade-all

etc..

The slackpkg+ extension also extends the search functionality in slackpkg:

# slackpkg search vlc    

DONE

The list below shows all packages with name matching "vlc".

[ Status           ] [ Repository               ] [ Package                                  ]
   installed           alienbob                     phonon-vlc-0.6.0-x86_64-1alien            
  upgrade              alienbob                     npapi-vlc-20130818-x86_64-1alien --> npapi-vlc-20130408-x86_64-1alien  
  upgrade              alienbob                     vlc-20130819-x86_64-1alien --> vlc-2.0.8-x86_64-1alien  
   installed           alienbob_current             npapi-vlc-20130818-x86_64-1alien          
   installed           alienbob_current             vlc-20130819-x86_64-1alien                
  upgrade              restricted                   npapi-vlc-20130818-x86_64-1alien --> npapi-vlc-20130408-x86_64-1alien  
  upgrade              restricted                   vlc-20130819-x86_64-1alien --> vlc-2.0.8-x86_64-1alien  
   installed           restricted_current           npapi-vlc-20130818-x86_64-1alien          
   installed           restricted_current           vlc-20130819-x86_64-1alien                

You can search specific files using "slackpkg file-search file".

You probably noticed that the package “vlc” is listed several times in this search exxample. That happens because I have this package in several repositories. You can (as shown further down) configure slackpkg+ with the correct priority in which these repositories are consulted when installing/upgrading software, so that the correct package will always be used.

Let me show you how I use slackpkg+ to maintain my computers.

I run Slackware-current 64-bit, with multilib added. I install my packages from multilib-current as well as my Slackware 14.0 package repository. Sometimes, I create a package specifically for Slackware-current (such as calibre, vlc, …) because the Slackware 14.0 version of that package will not work on Slackware-current. In such a case I want slackpkg to install the -current package and not the 14.0 package.

This is my configuration file “/etc/slackpkg/slackpkgplus.conf”:

SLACKPKGPLUS=on
PKGS_PRIORITY=( multilib:.* restricted_current:.* restricted:.* alienbob_current:.* alienbob:.* ktown:.* )
REPOPLUS=( slackpkgplus multilib ktown alienbob alienbob_current restricted )
MIRRORPLUS[‘alienbob’]=http://192.168.0.1/slackware/sbrepos/14.0/x86_64/
MIRRORPLUS[‘restricted’]=http://192.168.0.1/slackware/restricted_sbrepos/14.0/x86_64/
MIRRORPLUS[‘slackpkgplus’]=http://slakfinder.org/slackpkg+/
MIRRORPLUS[‘multilib’]=http://192.168.0.1/slackware/multilib/current/
MIRRORPLUS[‘alienbob_current’]=http://192.168.0.1/slackware/sbrepos/current/x86_64/
MIRRORPLUS[‘restricted_current’]=http://192.168.0.1/slackware/restricted_sbrepos/current/x86_64/
MIRRORPLUS[‘ktown’]=http://192.168.0.1/ktown/current/latest/x86_64/

A breakdown of these lines:

  • You will notice that I have a local webserver running in my LAN (IP address 192.168.0.1) but you can use any public webserver which hosts these repositories. Having the repositories mirrored locally in the LAN has benefits for download speeds of course.
  • The variable “SLACKPKGPLUS” determines whether the functionality of slackpkg+ will be enabled at all. If you set it to”off” then slackpkg will not use any of the new code. The default is “on”
  • The “MIRRORPLUS” variables define an array of 3rd party repositories which you want slackpkg to know about.The array indices of the MIRRORPLUS array (like ‘alienbob’, ‘restricted’, ‘ktown’, etc…) are used in other variables, as will be explained next:
  • The “REPOPLUS” variable defines which of the 3rd party repositories you have defined in MIRRORPLUS are actually actively used. The order in which the repositories are mentioned is not important.
  • That repository order is important in the “PKGS_PRIORITY” variable. With this variable, you can force priority for certain repositories, or even for individual packages in these repositories. For instance, having “multilib:.*” listed first, means that my multilib package always have priority over the Slackware versions of these packages (gcc and glibc to be specific). Also, by defining the order “alienbob_current:.* alienbob:.*” I will ensure that when a package (such as calibre) is found in both repositories, slackpkg will install the one from the “-current” repository. The “.*” behind the repository’s name is a wildcard meaning “any package“. If you want you can make that more specific, like “restricted:vlc” which means “the vlc package in the ‘restricted’ repository“.

NOTE:

You will probably have added 3rd party packages to your slackpkg blacklist. When you install slackpkg+ you should of course remove those blacklist lines! If you don’t, then slackpkg will never show those blacklisted packages…

For instance, the lines you need to remove from “/etc/slackpkg/blacklist” in order to let slackpkg/slackpkg+ manage my packages, are:
[0-9]+alien
[0-9]+compat32

NOTE:

Similar to enabling a Slackware repository for your specific Slackware version and architecture in /etc/slackpkg/mirrors , you will add additional 3rd party repositories in /etc/slackpkg/slackpkgplus.conf . Take good care that you only add repositories which contain packages compatible with your particular version and architecture of Slackware ! The example repositories which I showed you above are suited for my Slackware64-current-with-multilib installation. If you are running Slackware 14.1 you should add repositories that offer packages for Slackware 14.1.

As a rule of thumb, do not mix packages for different versions of Slackware. Specifically, do not attempt to install packages for a more recent version of Slackware than you have installed on your computer. Most packages built for an older release of Slackware will still work on newer versions of Slackware (as an example, Slackware64-current contains several packages that have not changed since 13.0 and those still work).

CAVEAT:

The slackpkg tool parses the Slackware ChangeLog.txt to determine which packages are being added to Slackware. It looks for strings like “Added.” in the changelog when you run the command “slackpkg install-new”. This functionality does not work for 3rd party repositories. That means I can not simply run “slackpkg upgrade kde” to get my newest KDE “ktown” release installed – any package which is not present in Slackware itself, will not be installed with that command. On the other hand; keeping your “ktown” installed packages up to date afterwards, is easy with slackpkg+ because it will detect any upgrade to individual packages. .

The “slackpkg+” extension has its homepage on http://slakfinder.org/slackpkg+.html You can find more of slackpkg+ here:

If you have a set of packages that are not part of any repository yet, and you want to create your own slackpkg+-compatible repository for them, you should check out an older article on this blog: http://alien.slackbook.org/blog/local-slackware-mirror/ . In there you will find an explanation about how to use my “gen_repos_files.sh” script.

Have fun! Eric

OS upgrade for taper mirror aka docs wiki

Last night I upgraded the Operating System of my taper mirror (which also hosts the Wiki for docs.slackware.com) to Slackware 13.37 plus patches. It has been running Slackware 13.1 reliably for two years now, but I do not want my public servers to be more than one OS release behind the most recent version.

With Slackware 14 around the corner this was the perfect opportunity to spend a sleepless night on an upgrade. Using slackpkg, I basically followed the procedure which I recently added to SlackDocs: http://docs.slackware.com/howtos:slackware_admin:systemupgrade using my own local package mirror.

No issues were encountered. I kept all services running, as long as they were in RAM they would not be affected by the package’s binaries being replaced on disk.

The upgrade to 13.37 was also a requirement for any future upgrade to the Dokuwiki software which I use for the docs.slackware.com Wiki. The pcre package in Slackware 13.1 lacks proper unicode support and that breaks the search function in the new beta of Dokuwiki. This is what you should see (and Slackware 13.37 does it right):

$ pcretest -C | grep -i unicode
Unicode properties support
\R matches all Unicode newlines

Nobody has noticed that I upgraded the OS 🙂 The server did not go down except for a reboot into the new kernel… all in all, the server was unavailable for 30 seconds. A Slackware system upgrade works flawlessly, which distro can beat that?!?

Eric

© 2024 Alien Pastures

Theme by Anders NorenUp ↑