Why should I use slackrepo?
That depends on your needs. If you don't build your own packages, you don't need slackrepo. The existing popular tools like sbopkg and sqg, AST, src2pkg, mkslack, etc. remain good choices for personal package building and installing, but for repeatable, clean batch building and regular maintenance of large repositories, you need slackrepo.
If you want to visualise the difference between other tools and slackrepo, perhaps this classic illustration from Devops Reactions will help.
other tools | slackrepo |
---|---|
All this automation stinks, I want complete control by doing everything manually.
Automation will give you huge gains in accuracy, reproducibility and productivity. You still have complete control of the details with slackrepo's hintfiles. By building in a dynamically created and destroyed chroot environment (available in Slackware-current), slackrepo will keep your build system clean, and by calculating trees of dependencies rather than linear queues, slackrepo will keep your packages clean too. Good luck doing that manually!
Why does the output have stupid smileys?
So you can search and grep in the logfile. That's not stupid. ;-)
Why does it do so many rebuilds?
To be foolproof :-) A future version might examine the sonames inside each package and do something more intelligent, but "too many" rebuilds is always safer than "too few".
The build time estimates are rubbish.
They are better than nothing. If you can improve the code, please send me a patch.
How do I setup slackrepo to run as an ordinary (non-root) user?
You need to build and install fakeroot manually
and you need to create the file /etc/sudoers.d/slackrepo
, containing this (replacing yourusername
with your username):
User_Alias SLACKREPOERS = yourusername Defaults:SLACKREPOERS !env_reset,!env_delete SLACKREPOERS ALL=(ALL) NOPASSWD: /usr/libexec/slackrepo/*
and you need to create the file .slackreporc
in the user's home directory, containing something like this (and of course you can set any other configuration variables in the same file):
SBREPO=~/slackrepo/%REPO%/slackbuilds SRCREPO=~/slackrepo/%REPO%/source PKGREPO=~/slackrepo/%REPO%/packages/%SLACKVER%/%ARCH% PKGBACKUP=~/slackrepo/%REPO%/backups/%SLACKVER%/%ARCH% HINTDIR=~/slackrepo/%REPO%/hintfiles DEFAULT_HINTDIR="/etc/slackrepo/%REPO%/default_hintfiles/%SLACKVER%" LOGDIR=~/slackrepo/%REPO%/logs DATABASE=~/slackrepo/%REPO%/database_%REPO%.sqlite3
By default this will be initialised as the SBo repository.
If you want to have multiple user-mode repositories, your
.slackreporc
file should contain these two lines:
REPO=default CONFIGDIR=~
(where default
is your favourite repository ID)
and then slackrepo will read everything else from the files slackrepo_csb.conf,
slackrepo_SBo.conf, etc. in your home directory instead of /etc.
Can I run more than one instance of slackrepo at the same time?
Yes, but only if they are building different repos. You can have one instance building SBo and another instance building msb, but you can not have two instances building SBo at the same time. Please don't try to have two hosts building the same repo at the same time using NFS.
Why does it use so much disk space?
It depends on how many packages you build and how large the packages are.
Some of the SBo games are truly enormous. Many people have the habit of deleting source files and packages as soon as they have been built and installed,
so they don't understand how much disk space a repository needs. By default, slackrepo keeps a backup
copy of old packages, but you can disable backups by setting PKGBACKUP=''
in the configuration file.
The log files can be quite large; if this is a problem you can delete them manually.
Does slackrepo work on older versions of Slackware?
Maybe :-) The SBo default hintfiles are for the SlackBuilds.org '14.1' branch, so some of them will need to be edited if you want to use them with an earlier branch or with Slackware -current. The code has been tested only with bash-4.2, so there may be problems with 13.37 or earlier.
Does slackrepo work on other distros like Salix?
Maybe, but this is untested. The package repo metadata can be configured for slapt-get compatibility.
SlackBuilds.org has just pushed a public update, but slackrepo hasn't updated its copy of the SBo git repository.
To be polite to SlackBuilds.org, slackrepo only checks for an update once every 24 hours. If you are impolite and impatient, you can update the git repository manually.
Why is gen_repos_files.sh so slow?
It needs to make a new MANIFEST.bz2 file etc. In a very big repository (thousands of packages), this can take hours.
This SlackBuild works when I run it manually, but fails in slackrepo. wtf?
Try some of these hints:
NUMJOBS="-j1"
(slackrepo uses multiple jobs unless you specify this hint)
PRAGMA="unset_ARCH"
(the ARCH code in many SlackBuilds is broken, particularly for i486 and i686)
PRAGMA="nofakeroot"
(if you're building as a non-root user)
I get the error message tar: Directory renamed before its status could be extracted
Use the PRAGMA="abstar"
hint. Gnu tar sometimes gets confused if the archive
contains symlinks with .. in the path.