Skip to content
Snippets Groups Projects
Commit d9c1936f authored by Pavel Vondruska's avatar Pavel Vondruska
Browse files

initial

parents
Branches
No related tags found
No related merge requests found
Pipeline #1651 passed
build:bullseye:
cache: []
image: debian:bullseye
script:
- ./make.sh
artifacts:
paths:
- build/*
make.sh 0 → 100755
#!/bin/bash
set -x
# Nastaveni promennych, pokud je SINVERSION zakomentovana, pokusime se odhadnout nejnovejsi
export DEBIAN_FRONTEND=noninteractive
export DEBEMAIL="Pavel Vondruska <vondruska@cesnet.cz>"
# Nacteni promennych o bezicim systemu vcetne verzi
. /etc/os-release
# Od Debian 11 Bullseye ma debian-security trochu jinou cestu, abychom mohli pouzit heredoc, rozskocime si pres funkci
function get_debian_security() {
if [ "${VERSION_ID}" -lt "11" ]; then echo "${VERSION_CODENAME}/updates"; else echo "${VERSION_CODENAME}-security"; fi
}
# Vygenerovani sources.list podle verze Debianu
cat > /etc/apt/sources.list << EOSOURCES
deb http://ftp.zcu.cz/pub/linux/debian ${VERSION_CODENAME} main contrib non-free
deb http://ftp.zcu.cz/pub/linux/debian ${VERSION_CODENAME}-updates main contrib non-free
deb http://ftp.zcu.cz/pub/linux/debian-security $(get_debian_security) main contrib non-free
deb-src http://ftp.zcu.cz/pub/linux/debian ${VERSION_CODENAME} main contrib non-free
deb-src http://ftp.zcu.cz/pub/linux/debian ${VERSION_CODENAME}-updates main contrib non-free
deb-src http://ftp.zcu.cz/pub/linux/debian-security $(get_debian_security) main contrib non-free
EOSOURCES
# Instalace buildovacich veci a zavislosti
apt update -qqq
apt install -yqqq git devscripts build-essential wget
wget https://lancelot.netknights.it/NetKnights-Release.asc
apt-key add NetKnights-Release.asc
echo 'deb http://lancelot.netknights.it/community/focal/stable focal main' > /etc/apt/sources.list.d/pi.list
echo 'deb-src http://lancelot.netknights.it/community/focal/stable focal main' >> /etc/apt/sources.list.d/pi.list
apt update -qqq
apt source privacyidea privacyidea-server privacyidea-radius
cd privacyidea-3.7.1
mk-build-deps --install --tool='apt-get -o Debug::pkgProblemResolver=yes --yes' debian/control
sed "1 s/focal/bullseye/" debian/changelog -i
echo "opt/venvs/privacyidea /opt/privacyidea" > debian/privacyidea.links
dpkg-buildpackage -uc -us -b
cd ..
cd privacyidea-server-3.7.1
sed "1 s/focal/bullseye/" debian/changelog -i
dpkg-buildpackage -uc -us -b
cd ..
cd privacyidea-radius-3.4.2
sed "1 s/focal/bullseye/" debian/changelog -i
dpkg-buildpackage -uc -us -b
cd ..
mkdir build
mv *.deb build/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment