Created
February 4, 2020 18:09
-
-
Save peat-psuwit/94a9d34b80e3ebf2027fcc2e231de6b2 to your computer and use it in GitHub Desktop.
Build a minimalist Debian packages build server (UBports repo)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CCACHEDIR=/var/cache/pbuilder/ccache/ | |
EXTRAPACKAGES=pkg-create-dbgsym | |
export DEB_BUILD_OPTIONS=parallel=`nproc` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -ex | |
if ! [ -e "$HOME/.pbuilderrc" ]; then | |
echo "Copy .pbuilderrc first" | |
exit 1 | |
fi | |
apt install wget cowbuilder apt-utils nginx tmux | |
KEYRING=$(mktemp --tmpdir XXXXXXX.gpg) | |
wget -O "$KEYRING" https://repo.ubports.com/keyring.gpg | |
cowbuilder create \ | |
--basepath /var/cache/pbuilder/bases/xenial+ubports.cow \ | |
--distribution xenial --components "main universe" \ | |
--othermirror "deb http://ports.ubuntu.com/ubuntu-ports xenial-updates main universe|deb http://repo.ubports.com/ xenial main" \ | |
--keyring "$KEYRING" | |
rm "$KEYRING" | |
mkdir -p /var/www/html/repo/xenial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -ex | |
DISTS=xenial | |
for DIST in $DISTS; do | |
cd /var/www/html/repo/$DIST || exit 1 | |
apt-ftparchive packages pool | tee Packages | gzip >Packages.gz | |
apt-ftparchive sources pool | tee Sources | gzip >Sources.gz | |
apt-ftparchive release \ | |
-o APT::FTPArchive::Release::Origin="Peat SCW" \ | |
. | tee Release | gzip >Release.gz | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment