Setting up a compile vserver for third party packages

From Alpine Linux
Jump to: navigation, search
Underconstruction clock icon gray.svg
This material is work-in-progress ...

Do not follow instructions here until this notice is removed.
(Last edited by Dubiousjim on 25 Mar 2012.)

Goal: Create a buildserver that will compile third party packages (ones not in the main aports tree) that can be used for unofficial repositories. One example of use could be used to build packages that provide a set of custom default configurations for a group of packages (making quick roll-out of similar servers easier). This box will not build regular aports, just custom packages.

Prepare buildserver

First, follow Setting up a compile vserver.

Customize buildserver

First, we're going to use this server as both a buildbox and a mirror, so we need lighttpd installed.

apk add lighttpd

Next, set the buildozer package directory to be the lighttpd root, by editing the following lines in /etc/lighttpd/lighttpd.conf:

var.basedir  = "/home/buildozer"
server.document-root = var.basedir + "/packages"

Create a softlink to also share the distfiles directory.

ln -s /var/cache/distfiles /home/buildozer/packages/distfiles

Uploading to rsync.alpinelinux.org isn't going to work from this buildbox, so comment out line 133 in /usr/local/bin/update-repos.

Move the old aports directory, create a new aports directory, initialize it as a git directory, setup it's "upstream" source.

mv /home/buildozer/aports /home/buildozer/aports.old mkdir /home/buildozer/aports.new cd /home/buildozer/aports.old cp Makefile aport.lua makeall.sh rebuild-alpine.sh /home/buildozer/aports.new mkdir -p /home/buildozer/aports.new/main mkdir -p /home/buildozer/aports.new/testing cd /home/buildozer/aports.new git init git commit -a git clone --bare /home/buildozer/aports.new /home/buildozer/aports.git git clone /home/buildozer/aports.git /home/buildozer/aports

Make a new test package in the main repo and test build.

cd /home/buildozer/aports/main newapkbuild testing

Edit /home/buildozer/aports/main/testing/APKBUILD, put in some bogus info so that the package will build, then test using the sircbot control that you made in the base document.