NAME

sbokeeper - SlackBuild package manager helper

SYNOPSIS

sbokeeper [options] command [args]

DESCRIPTION

sbokeeper is a tool that can help a Slackware system administrator keep track of their installed SlackBuilds by maintaining a database of added packages and their dependencies. It is not a package manager itself, it simply helps in the task of managing SlackBuilds.

The package database is a text file that stores all of sbokeeper's package data. By default, it is stored in ~/.local/share/sbokeeper/data.sbokeeper, but it can be configured to be stored in another location.

CONFIGURATION

sbokeeper reads it's configuration from a configuration file. A sbokeeper configuration file consists of lines of key-value pairs. A key-value pair follows this format:

Key = Value

Blank lines and lines starting with a hash (#) are ignored.

Unless the -c option is used, sbokeeper will search for a configuration file in the following paths in descending order:

~/.config/sbokeeper.conf
~/.sbokeeper.conf
/etc/sbokeeper.conf

If no configuration file is found, sbokeeper will use default values for everything.

The following are valid configuration entries:

DataFile

Absolute path to file where package database will be stored. A '~' can be expanded into the running user's home directory, but other kinds of shell expansion are not performed.

Can be overrided by the -d option.

Default value is ~/.local/share/sbokeeper/data.sbokeeper.

SBoPath

Absolute to path to directory where local SlackBuild repository is kept. The directory should look something like this:

SBoPath
  academic
    pkg1
    pkg2
    ...
  business
    pkg3
    pkg4
  ...

The package categories themselves do not actually matter, all that matters is that each SlackBuild is inside a directory that is inside SBoPath.

If your SlackBuild repository directory follows the same format as the official git repository then you should be good.

A '~' can be expanded into the running user's home directory, but other kinds of shell expansion are not performed.

Can be overrided with the -s option.

The default value depends on what SlackBuild package management tools are installed on your system. If you are using one the following:

sbopkg
sbotools
sbotools2
sbpkg
slpkg
sboui

then sbokeeper will use the first one found's default repo location. If none can be found, sbokeeper is going to croak and just tell you to set it manually.

COMMANDS

add pkg ...

Adds packages to package database, along with any of their dependencies. Added packages are marked as manually added, dependencies are not. If a package that is specified is already present in the database but not marked as manually added, it will be marked as manually added.

If add encounters a package that is already present in the package database, it will skip adding it. This means that if the package is missing dependencies, it will not try to re-add those dependencies. If this poses a problem, the depwant command can help users track down missing dependencies.

This command supports aliases.

tack pkg ...

Adds package to package database. Does not add any of their dependencies. Added packages are marked as manually added. If a package that is specified is already present in the database but not marked as manually added, it will be marked as manually added.

This command supports aliases.

addish pkg ...

Same thing as add, but added packages are not marked as manually added.

This command supports aliases.

tackish pkg ...

Same thing as tack, but added packages are not marked as manually added.

This command supports aliases.

rm pkg ...

Remove packages from package database. Does not remove dependencies.

This command supports aliases.

clean

Remove unnecessary packages from package database. This command is the same as running sbokeeper rm @unnecessary.

deps pkg

Prints list of dependencies for pkg. Does not print dependencies of those dependencies, for that I'd recommend the tree command. The dependency list is according to the dependencies found in the database, not the dependencies listed in the SlackBuild repo.

depadd pkg deps ...

Add deps to pkg's dependency list. Dependencies that are not present in the database will automatically be added.

** IMPORTANT **

This command provides an easy way for you to introduce circular dependencies into your package database, which sbokeeper cannot handle and can leave your database unable to be read. Refrain from carelessly using this command!

This command supports aliases for deps, they do not work for pkg.

deprm pkg deps ...

Remove deps from pkg's dependency list.

This command supports aliases for deps, they do not work for pkg.

pull

Finds any SlackBuilds.org package installed on your system that is not present in your package database and tries to add it to your database. All packages that are added are marked as manually added. Packages that are already present in your database are skipped.

diff

Prints a list of SlackBuild packages that are present on your system but not in your database and vice versa.

depwant

Prints a list of packages that are, according to the SlackBuild repo, missing dependencies in your database.

depextra

Prints a list of packages with extra dependencies and said extra dependencies. Extra dependencies are dependencies listed in the package database that are not present in the SlackBuild repo.

unmanual pkg ...

Unset packages as being manually installed, but do not remove them from the database.

This command supports aliases.

Print list of packages that are a part of the specified category. The following are valid categories:

all

All packages present in the database.

manual

Packages that were manually added.

nonmanual

Packages that were not manually added.

necessary

Packages that were added manually or are a dependency of a manually added package.

unnecessary

Packages that were not manually added or a dependency of a manually added package.

missing

Packages that are not present in the database but are needed by packages in the database.

If cat is not specified, defaults to 'all'.

This command supports aliases.

tree pkgs ...

Prints a dependency tree. If pkgs are not specified, prints a dependency tree for each manually added package in the database. If pkgs are specified, prints a dependency tree for each package given.

A dependency tree will look something like this:

libplacebo
  python3-meson-opt
    python3-build
      python3-pyproject-hooks
        python3-installer
          python3-flit_core
    python3-wheel
      python3-installer
        python3-flit_core
  python3-glad

This command supports aliases.

dump

Dumps contents of data file to stdout.

help cmd

Print help message for specified command.

Aliases

Some commands can accept aliases as arguments. An alias is an 'at' symbol (@) followed by the package category it is aliasing. sbokeeper will convert the alias to the list of packages it is meant to represent. For example, if you wanted to remove all packages from a package database, you could do:

sbokeeper rm @all

and @all would be substituted for a list of every package present in the database.

The following are valid aliases:

@all
@manual
@nonmanual
@necessary
@unnecessary
@missing

Please refer to the documentation for the print command for what each of these categories mean.

OPTIONS

-c path, --config=path

Specify the path to the configuration file.

-d path, --datafile=path

Specify the path to the data file.

-s path, --sbodir=path

Specify the path to the local SlackBuild repository.

-y, --yes

Automatically agree to any prompts.

-h, --help

Print help message and exit.

-v, --version

Print version and copyright information, then exit.

DATA FILES

sbokeeper stores SlackBuild information in data files. sbokeeper is designed so that you would ideally never have to edit these files by hand. It is strongly discouraged that you edit these files, however if you do anyway, carefully make sure that your edits are valid according to the data file format, which will be described below.

sbokeeper data files are text files. Data files contain packages, which are a series of lines that contain package information ended by a pair of percentage signs (%%). A package entry should look something like this:

PACKAGE: libreoffice
DEPS: avahi zulu-openjdk8
MANUAL: 1
%%
PACKAGE

Name of the package, which must have a corresponding SlackBuild in the configured SlackBuild repo. This must be the first line in a package entry.

DEPS

Whitespace-seperated list of packages that PACKAGE depends on. Each package must be present in the SlackBuild repo.

MANUAL

Specifies whether the package was manually added or not. 1 for yes, 0 for no.

%%

Marks the end of the current package entry.

AUTHOR

Written by Samuel Young <samyoung12788@gmail.com>.

BUGS

sbokeeper is (as of right now) incapable of handling circular dependencies. If you stick with the official SlackBuild.org repos, this should not happen in the wild. Circular dependencies can easily be introduced if one does not use depadd carefully. So beware.

Report bugs on my Codeberg, https://codeberg.org/1-1sam.

COPYRIGHT

Copyright (C) 2024 Samuel Young

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See https://dev.perl.org/licenses/ for more information.

SEE ALSO

sbopkg(1), sboui(1), slackpkg(1), pkgtool(1)