mirror of
https://github.com/YunoHost/vinaigrette.git
synced 2024-09-03 20:06:11 +02:00
Fixes after tests on the battlefield
This commit is contained in:
parent
ddc6307dd9
commit
93ef7cdf83
5 changed files with 44 additions and 29 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,3 @@
|
||||||
chroots/*
|
.chroots
|
||||||
config/keys/*
|
config/keys/*
|
||||||
gitrepos/*
|
gitrepos/*
|
||||||
|
|
|
@ -8,6 +8,6 @@ BUILD_DEB="$HOME_VINAIGRETTE/scripts/build_deb"
|
||||||
|
|
||||||
REPO_URL="forge.yunohost.org"
|
REPO_URL="forge.yunohost.org"
|
||||||
REPO_DIR="/var/www/repo/debian"
|
REPO_DIR="/var/www/repo/debian"
|
||||||
REPO_CONFIG=$REPO_DIR/config/distributions
|
REPO_CONFIG=$REPO_DIR/conf/distributions
|
||||||
REPO_ARCHS="$(grep "Architectures" $REPO_CONFIG | head -n 1 | awk -F: '{print $2}' | sed 's/source//g')"
|
REPO_ARCHS="$(grep "Architectures" $REPO_CONFIG | head -n 1 | awk -F: '{print $2}' | sed 's/source//g')"
|
||||||
|
|
||||||
|
|
|
@ -4,14 +4,11 @@ readonly THISSCRIPT=$0
|
||||||
readonly DISTRIB=$1
|
readonly DISTRIB=$1
|
||||||
readonly BRANCH=$2
|
readonly BRANCH=$2
|
||||||
readonly FOLDER=$3
|
readonly FOLDER=$3
|
||||||
|
readonly ARCHS=$4
|
||||||
|
|
||||||
source /home/vinaigrette/config/config
|
source /home/vinaigrette/config/config
|
||||||
source /home/vinaigrette/scripts/common.sh
|
source /home/vinaigrette/scripts/common.sh
|
||||||
|
|
||||||
#export DEBSIGN_KEYID
|
|
||||||
#export DEBFULLNAME
|
|
||||||
#export DEBEMAIL
|
|
||||||
|
|
||||||
# ##### #
|
# ##### #
|
||||||
# Usage #
|
# Usage #
|
||||||
# ##### #
|
# ##### #
|
||||||
|
@ -27,6 +24,7 @@ Arguments:
|
||||||
<distrib> buster or bullseye
|
<distrib> buster or bullseye
|
||||||
<branch> stable, testing, or unstable
|
<branch> stable, testing, or unstable
|
||||||
<folder> the folder in which to build...
|
<folder> the folder in which to build...
|
||||||
|
<archs> list of archs to build (or empty for autodetect). For example: amd63,armhf
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,9 +44,12 @@ function main()
|
||||||
|
|
||||||
boxed "Building ${PACKAGE} ${VERSION} ..."
|
boxed "Building ${PACKAGE} ${VERSION} ..."
|
||||||
|
|
||||||
|
if [[ -n "$ARCHS" ]]
|
||||||
|
then
|
||||||
|
archs="$(echo $ARCHS | tr ',' ' ')"
|
||||||
# Architecture-agnostic packages have 'architecture: all' in their control files
|
# Architecture-agnostic packages have 'architecture: all' in their control files
|
||||||
# others have 'architecture: any'
|
# others have 'architecture: any'
|
||||||
if grep -q "Architecture: all" $PKG_DIR/debian/control
|
elif grep -q "Architecture: all" $PKG_DIR/debian/control
|
||||||
then
|
then
|
||||||
archs="all"
|
archs="all"
|
||||||
else
|
else
|
||||||
|
@ -57,18 +58,25 @@ function main()
|
||||||
|
|
||||||
for arch in $archs
|
for arch in $archs
|
||||||
do
|
do
|
||||||
sendxmpppy "⏳ Starting build for ${package}/${version} for $DISTRIB/$BRANCH/$ARCH ..."
|
sendxmpppy "⏳ Starting build for ${PACKAGE}/${VERSION} for $DISTRIB/$BRANCH/$arch ..."
|
||||||
if ! build $arch
|
if ! build $arch
|
||||||
then
|
then
|
||||||
sendxmpppy "❌ Failed build for ${package}/${version} for $DISTRIB/$BRANCH/$ARCH ?!"
|
sendxmpppy "❌ Failed build for ${PACKAGE}/${VERSION} for $DISTRIB/$BRANCH/$arch ?!"
|
||||||
critical "Failed to build ${package}/${version} for $DISTRIB/$BRANCH/$ARCH"
|
critical "Failed to build ${PACKAGE}/${VERSION} for $DISTRIB/$BRANCH/$arch"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if reprepro --waitforlock 6 -b $REPO_DIR -C $BRANCH include $DISTRIB ${ROOT_DIR}/${PACKAGE}_${VERSION}_$arch.changes
|
if [[ $arch == "all" ]]
|
||||||
then
|
then
|
||||||
sendxmpppy "✔️ Completed build for ${package}/${version} for $DISTRIB/$BRANCH/$ARCH."
|
changearch="amd64"
|
||||||
else
|
else
|
||||||
sendxmpppy "❌ Failed to include change of ${package}/${version} for $DISTRIB/$BRANCH/$ARCH ?!"
|
changearch=$arch
|
||||||
|
fi
|
||||||
|
|
||||||
|
if reprepro --waitforlock 6 -b $REPO_DIR -C $BRANCH include $DISTRIB ${ROOT_DIR}/${PACKAGE}_${VERSION}_$changearch.changes
|
||||||
|
then
|
||||||
|
sendxmpppy "✔️ Completed build for ${PACKAGE}/${VERSION} for $DISTRIB/$BRANCH/$arch."
|
||||||
|
else
|
||||||
|
sendxmpppy "❌ Failed to include change of ${PACKAGE}/${VERSION} for $DISTRIB/$BRANCH/$arch ?!"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -78,14 +86,24 @@ function build()
|
||||||
{
|
{
|
||||||
local arch=$1
|
local arch=$1
|
||||||
|
|
||||||
if [[ "$arch" == "all" ]]
|
local opts=""
|
||||||
|
|
||||||
|
opts+=" -d $DISTRIB"
|
||||||
|
opts+=" --no-run-lintian"
|
||||||
|
opts+=" --no-run-piuparts"
|
||||||
|
opts+=" --no-run-autopkgtest"
|
||||||
|
|
||||||
|
if [[ "$arch" != "all" ]]
|
||||||
then
|
then
|
||||||
local arch_opt=""
|
opts+=" --host=$arch"
|
||||||
else
|
|
||||||
local arch_opt="--host=$arch"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sbuild $arch_opt -d $DISTRIB # --anything-failed-commands='%s'
|
if [[ -n "$DEBUG" ]]
|
||||||
|
then
|
||||||
|
opts+="--anything-failed-commands='%s'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
sbuild $opts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
DIST=$1
|
||||||
|
PREINSTALL="eatmydata,ccache,build-essential,perl-openssl-defaults,debhelper,cmake,wget,devscripts,git,aptitude,debhelper,dh-python,python3-all,python3-yaml,python3-jinja2,python3-setuptools,python3-psutil,lua5.1,liblua5.1-0-dev,libidn11-dev,libssl-dev,txt2man,quilt,npm,nodejs"
|
||||||
|
|
||||||
|
mkdir -p /home/vinaigrette/.chroots/
|
||||||
|
|
||||||
# FIXME : to be replaced with
|
sbuild-createchroot --include=$PREINSTALL $DIST /home/vinaigrette/.chroots/$DIST-all
|
||||||
|
|
||||||
# sbuild-createchroot --include=eatmydata,ccache $DIST /some/location
|
|
||||||
# sbuild-createchroot --include=eatmydata,ccache --arch=$ARCH $DIST /some/location
|
|
||||||
# + check how to preinstall dependencies
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ function tweak_gevent-websocket()
|
||||||
|
|
||||||
function tweak_metronome()
|
function tweak_metronome()
|
||||||
{
|
{
|
||||||
readonly VERSION="$(dpkg-parsechangelog -S Version 2>/dev/null)+ynh$DISTRIB_N-1"
|
readonly VERSION="$(dpkg-parsechangelog -S Version 2>/dev/null)+ynh$DISTRIB_N"
|
||||||
}
|
}
|
||||||
|
|
||||||
function build()
|
function build()
|
||||||
|
|
Loading…
Reference in a new issue