Own packages repository

I decided to try and make my own repository of precompiled packages from SBo. Exactly the same idea as SlackOnly, but made by me for my own use (not public). The tool to use is SlackRepo, which has extensive documentation, that I highly recommend. This post is not meant as a tutorial on how to use SlackRepo. It merely lists the settings I used and the steps I took for my own use.

Where to build

I made a clean install of Slackware64 14.2 in a virtual machine (I use VirtualBox). I have an 8-core CPU (AMD FX8350) and I dedicated all 8 cores to the build machine with PAE/NX enabled. Also, in the “Network” settings, I chose “Bridged Adapter“, because I wanted to set up the build virtual machine as a server (read below).

Obtaining SlackRepo

The web-page of slackrepo suggests in its Download section to install slackrepo from git. So, clone slackrepo from git

git clone https://github.com/idlemoor/slackrepo.git

navigate to the newly created folder called slackrepo, login as root and set these two:

gitrev=git$(git log -n 1 --format=format:%h .)
git archive --format=tar --prefix=slackrepo-$gitrev/ HEAD | gzip > SlackBuild/slackrepo-$gitrev.tar.gz

There is a SlackBuild subfoder, navigate there and execute the slackrepo.SlackBuild like this:

VERSION=$gitrev TAG=_github sh ./slackrepo.SlackBuild

The package is in /tmp and it is ready to be installed in the virtual machine.

SlackRepo settings

I want to create my repository from the scripts at SlackBuilds.org. The necessary configuration file for this is /etc/slackrepo/slackrepo_SBo.conf. I did some customizations, so I copied this to root’s home as follows:

cp /etc/slackrepo/slackrepo_SBo.conf /root/.slackreporc

First, I added a line defining the repo I am using, in the very beginning of the file. The file header has useful info about priorities:

# The priority order for configuration is:
# (1) Environment variables when slackrepo is called
# (2) ~/.genreprc   [for gen_repos_files.sh only]
# (3) ~/.slackreporc
# (4) /etc/slackrepo/slackrepo_SBo.conf
#
# %REPO%, %SLACKVER% and %ARCH% will be replaced by the repo ID, Slackware version and arch

REPO="SBo"

Then I did a few modifications. Read the file comments carefully for more information. The modifications are for my personal use only, and may not be suitable for you.

Packages to be substituted by others:

SUBSTITUTE="xarchiver => file-roller, kbgoffice => gbgoffice"

Number of cores to use for building:

NUMJOBS='-j8'

I do not publish the packages, so I did not modify the tag:

TAG='_SBo'

Use TGZ for the packages, the default at SBo:

PKGTYPE='tgz'

I want a verbose output:

VERBOSE='y'

Generate a repo:

USE_GENREPOS='1'

My name and contact info:

REPOSOWNER="My Name "

Make this blank! (the URL may change):

DL_URL=""

Put a title to your RSS feed.

RSS_TITLE="MyPackages"

Generate a unique feed RSS identifier by running:

uuidgen -t

Now put the output of the command above here:

RSS_UUID="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"

I want to use slapt-get for the repo:

FOR_SLAPTGET="1"

Repository server

Now, let’s make a home repository server so the packages are easy to install on the computers from the home network. I followed the instructions at SlackDocs and ended up modifying only the following /etc/httpd/httpd.conf:

I listed my email address:

ServerAdmin email@address.com

Wrote the IP address of the virtual machine:

ServerName XXX.XXX.X.XXX:80

Uncommented the fancy directory listings:

Include /etc/httpd/extra/httpd-autoindex.conf

Uncommented the various default settings

Include /etc/httpd/extra/httpd-default.conf

Then, I navigated to /var/www/htdocs and made a symlink to the repo itself:

ln -s /var/lib/slackrepo/SBo/packages/ packages

The repository to be used with slapt-get is:

XXX.XXX.X.XXX/packages/14.2/x86_64/

PS

I know that all this flies in the face of these musings of mine from some three years ago. However, things change, including opinions. The reason is that I made a fresh re-install of Slackware64 14.2 on my laptop, but I did not want to build all additional software on it. It would take days. SlackOnly was down for quite some time and its future seemed uncertain, so I opted for my own packages. I exchanged several emails with Panagiotis, the guy behind SlackOnly, and he was very willing to continue this project. Shortly after, SlackOnly was back online, which is great!


2 Comments on “Own packages repository”

  1. […] hang. This was particularly annoying when I was installing packages via slapt-get from my own home package repository. Also, dmesg would show the following […]

  2. […] idea is analogous to what I describe in this previous post of mine for Slackware. Here, I do this on […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s