mirror of
https://github.com/YunoHost/vinaigrette.git
synced 2024-09-03 20:06:11 +02:00
Fixing more craziness
This commit is contained in:
parent
1f81193659
commit
36c23db374
7 changed files with 17 additions and 78 deletions
|
@ -36,8 +36,8 @@ function build_chroot()
|
|||
|
||||
if [ "$ARCH" == "amd64" ];
|
||||
then
|
||||
# This is for building yunohost-admin
|
||||
chroot $CHROOT apt install npm nodejs
|
||||
# This is for building yunohost-admin
|
||||
chroot $CHROOT apt install -y npm nodejs
|
||||
fi
|
||||
|
||||
chroot $CHROOT apt clean
|
||||
|
|
|
@ -13,32 +13,9 @@ build_more_recent = 1
|
|||
more_archs = i386 armel armhf arm64 all any
|
||||
no_system_arch = 0
|
||||
|
||||
[mail]
|
||||
from = rebuildd@yunohost.org
|
||||
mailto = rebuildd@yunohost.org
|
||||
subject_prefix = [rebuildd]
|
||||
smtp_host = localhost
|
||||
smtp_port = 25
|
||||
|
||||
[telnet]
|
||||
port = 9999
|
||||
ip = 127.0.0.1
|
||||
prompt = rebuildd@localhost->
|
||||
motd = Connected on rebuildd on localhost
|
||||
|
||||
[http]
|
||||
port = 9998
|
||||
ip = 0.0.0.0
|
||||
log_lines_nb = 30
|
||||
templates_dir = /usr/share/rebuildd/templates
|
||||
cache = 1
|
||||
logfile = /var/log/rebuildd/httpd.log
|
||||
|
||||
[log]
|
||||
file = /var/log/rebuildd/rebuildd.log
|
||||
time_format = %Y-%m-%d %H:%M:%S
|
||||
logs_dir = /var/log/rebuildd/build_logs
|
||||
mail_failed = 1
|
||||
mail_failed = 0
|
||||
mail_successful = 0
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
START_REBUILDD=1
|
||||
START_REBUILDD_HTTPD=1
|
||||
START_REBUILDD_HTTPD=0
|
||||
PBUILDER_BIN=/usr/sbin/pbuilder
|
||||
PBUILDER_CACHE_PATH="/var/cache/pbuilder"
|
||||
PBUILDER_MIRROR=https://ftp.debian.org/debian
|
||||
|
|
|
@ -86,7 +86,7 @@ function build_if_needed()
|
|||
"Daily build." \
|
||||
> /dev/null 2>&1
|
||||
|
||||
head -n 10 debian/changelog
|
||||
head -n 5 debian/changelog
|
||||
|
||||
# Launch the build using build_deb script
|
||||
build
|
||||
|
|
|
@ -9,14 +9,16 @@ cd $PKG_PATH
|
|||
echo "--------------------------------"
|
||||
echo "Installing build-dependencies..."
|
||||
|
||||
mk-build-deps -i -r -t "apt-get --no-install-recommends -y" || exit 1
|
||||
LOG="/var/log/mk-build-deps.log"
|
||||
mk-build-deps -i -t "apt-get --no-install-recommends -y" >> $LOG 2>&1 \
|
||||
|| { echo "mk-build-deps failed, logs are in $LOG"; exit 1; }
|
||||
rm -f *build-deps*_all.deb
|
||||
|
||||
echo "--------------------------------"
|
||||
echo "Creating source package..."
|
||||
|
||||
# Creating source package without signing it
|
||||
debuild -S -sa -uc
|
||||
debuild -S -sa -uc --no-lintian
|
||||
|
||||
# Be sure to clean directory
|
||||
debclean
|
||||
|
|
|
@ -29,40 +29,26 @@ get_source_component() {
|
|||
listfilter $CODENAME "\$Source (==${package}), \$SourceVersion (==${version})"
|
||||
}
|
||||
COMPONENT=$(get_source_component)
|
||||
if [ -z "$COMPONENT" ]; then
|
||||
echo "Unable to retrieve source package component"
|
||||
exit 1
|
||||
fi
|
||||
[ -n "$COMPONENT" ] || echo "Unable to retrieve source package component"
|
||||
|
||||
echo "#########################"
|
||||
echo " Adding binary package..."
|
||||
echo "#########################"
|
||||
|
||||
include_to() {
|
||||
# Include changes to the given repo (waiting 1m max)
|
||||
echo "Adding to ${1}/$COMPONENT..."
|
||||
reprepro --waitforlock 6 -b $REPO_DIR -C $COMPONENT include $1 \
|
||||
$CHANGES_FILE > /dev/null 1>&1 || return 1
|
||||
}
|
||||
# Include changes to the given repo (waiting 1m max)
|
||||
echo "Adding to $CODENAME/$COMPONENT..."
|
||||
|
||||
if include_to $CODENAME ; then
|
||||
status=0
|
||||
else
|
||||
status=1
|
||||
fi
|
||||
reprepro --waitforlock 6 -b $REPO_DIR -C $COMPONENT include $CODENAME $CHANGES_FILE > /dev/null
|
||||
|
||||
status=$?
|
||||
if [ $status -eq 0 ]; then
|
||||
# Clean pbuilder results
|
||||
for f in $(get_files $CHANGES_FILE); do
|
||||
rm -f /var/cache/pbuilder/result/$f
|
||||
done
|
||||
sendxmpppy "Completed build of ${package}/${version} for ${CODENAME}/${COMPONENT}/${arch}."
|
||||
else
|
||||
sendxmpppy "Failed to include change of ${package}/${version} for ${CODENAME}/${COMPONENT}/${arch} ?!"
|
||||
fi
|
||||
|
||||
|
||||
# Send notification on xmpp dev room
|
||||
|
||||
export HOME=$HOME_PBUILDER
|
||||
|
||||
sendxmpppy "Completed build of ${package}/${version} for ${CODENAME}/${COMPONENT}/${arch}."
|
||||
|
||||
exit $status
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
changes_file=$1
|
||||
|
||||
source /home/vinaigrette/config/config
|
||||
source /home/vinaigrette/scripts/package_helpers.sh
|
||||
|
||||
INCOMING_DIR=${REPO_DIR}/incoming
|
||||
|
||||
# Retrieve changes file directory
|
||||
dir=$(cd `dirname $changes_file` && pwd)
|
||||
|
||||
# Move file to incoming directory
|
||||
for f in $(get_files ${changes_file}); do
|
||||
if [[ $f =~ \.orig\.tar\.(gz|xz)$ ]]; then
|
||||
echo "* Copying ${f}..."
|
||||
sudo cp ${dir}/${f} $INCOMING_DIR
|
||||
else
|
||||
echo "* Moving ${f}..."
|
||||
sudo mv ${dir}/${f} $INCOMING_DIR
|
||||
fi
|
||||
done
|
||||
|
||||
# Move changes file too
|
||||
echo "* Moving $(basename ${changes_file})..."
|
||||
sudo mv ${changes_file} $INCOMING_DIR
|
Loading…
Add table
Reference in a new issue