This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository buildscripts. from c45a8a8 {bin/build-rpm-package,home/.buildscripts/x2go.conf}: add support for OpenSuSE Leap 42.2. new a6be736 bin/: add new script sbuild-deb-package - copied from Arctica buildscripts. new 5fc5da0 bin/build-{deb,rpm}-package: move some variable settings to the more-appropriate function. new 9671e72 bin/build-{deb,rpm}-package: backport from bin/sbuild-deb-package: rename ${COMPONENT_MAIN} to ${COMPONENT_RELEASE}. new 26c68db bin/build-deb-package: backport from bin/build-rpm-package: add missing parameter terminator to chmod call. new b12fc0c bin/build-deb-package: backport from bin/sbuild-deb-package: fix find call by specifying the -maxdepth and -mindepth options before the -type predicate. new de53f9f bin/build-deb-package: backport from bin/sbuild-deb-package: wrap the debbuildopts argument in double quotes. new 4025494 bin/build-deb-package: backport from bin/sbuild-deb-package: expect {debian,ubuntu}-codename-to-version.sh in ${PATH}. new ef525bd bin/sbuild-deb-package: backport from bin/build-deb-package: update Copyright and License header. new f6b93f6 bin/sbuild-deb-package: backport from bin/build-deb-package: set ${script_path} and include common.sh. new 53297fe bin/sbuild-deb-package: backport from bin/build-deb-package: set ${COMPONENT_RELEASE} to "main". new 6f9026f bin/{{s,}build-deb,build-rpm}-package: simplify branch checkout logic a bit. new a1a879a bin/build-{deb,rpm}-package: rewrite prepare_workspace to error out if switching to the directory is not possible. new a8d2e00 bin/build-deb-package: drop extraneous redirection. new 1b06141 bin/sbuild-deb-package: backport from bin/build-deb-package: make usage- and prefix-checks multiline. new 97be97f bin/sbuild-deb-package: backport from bin/build-deb-package: check temp_dir to be non-empty. new 86edbfc bin/sbuild-deb-package: backport from bin/build-deb-package: rewrite main function, drop TIMESTAMP, backport NO_DELAY and locking feature. new 3bad0d4 bin/sbuild-deb-package: backport from bin/build-deb-package: copy prepare_workspace () body, as we now use another layout and cache the git dir again. new ffaa7be bin/sbuild-deb-package: backport from bin/build-deb-package: add missing parameter terminator to chmod call. new 4e505cc bin/sbuild-deb-package: backport from bin/build-deb-package: fix variable typo (${dist_pretty} => ${pretty_dist}.) new 4425d7b bin/sbuild-deb-package: backport from bin/build-deb-package: add numerical distro version to package description. new d477e3f bin/sbuild-deb-package: backport from bin/build-deb-package: fix hardcoded "release" string to use ${COMPONENT_RELEASE}. new 8eab7d4 bin/sbuild-deb-package: backport from bin/build-deb-package: rename git-changelog file back to ChangeLog.gitlog. new 0f3aaf1 bin/sbuild-deb-package: backport from bin/build-deb-package: fix dupload call to actually use the symlinked config file in CWD. new 299354c bin/sbuild-deb-package: backport from bin/build-deb-package: drop unnecessary "&& true". new 67bc89b bin/sbuild-deb-package: backport from bin/build-deb-package: fix othermirror usage. Within X2Go package range, we need to pull in main, nightly or both depending on what package COMPONENT we are building. new c70ad4f bin/sbuild-deb-package: backport from bin/build-deb-package: re-add othermirror workaround for x2gomatemabindings on wheezy. The 26 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: bin/build-deb-package | 85 +++++----- bin/build-rpm-package | 65 +++---- bin/{build-deb-package => sbuild-deb-package} | 223 ++++++++++++------------- 3 files changed, 189 insertions(+), 184 deletions(-) copy bin/{build-deb-package => sbuild-deb-package} (62%) -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit a6be73623749fecdd3ce46271c34a3b5c025e99a Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 06:49:05 2016 +0100 bin/: add new script sbuild-deb-package - copied from Arctica buildscripts. --- bin/sbuild-deb-package | 388 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 388 insertions(+) diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package new file mode 100755 index 0000000..a479059 --- /dev/null +++ b/bin/sbuild-deb-package @@ -0,0 +1,388 @@ +#!/bin/bash + +# Copyright (C) 2011-2015 by Mike Gabriel <mike.gabriel@das-netzwerkteam.de> +# +# This programme is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This programme is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +export PATH="${HOME}/bin:${PATH}" + +GIT_USER="gituser" +GIT_HOSTNAME="git.mydomain.org" + +DEBEMAIL="firstname.lastname@mydomain.org" +DEBFULLNAME="Firstname Lastname" +GPG_KEY="" +DEB_DISTS_SUPPORTED="debian ubuntu" +DEBIAN_DISTROS="lenny,squeeze,wheezy,jessie,stretch,sid" +UBUNTU_DISTROS="lucid,precise,trusty,xenial,yakkety" + +COMPONENT_RELEASE="release" +COMPONENT_NIGHTLY="nightly" +COMPONENT_BUNDLES="bundle-release1 bundle-release2" +REPOS_SERVER="packages.mydomain.org" +PACKAGES_WITHOUT_OTHERMIRROR="keyring" +GNUPGHOME="${HOME}/.gnupg" + +TIMESTAMP=$(date +%s%N) + +test -z "${1}" && { echo "usage: $(basename "${0}") [<subpath>/]<git-project> {release,release/<codename>,nightly,nightly/<codename>} [<git-checkout>]"; exit 1; } + +PREFIX="$(cut -d"-" -f1 <<< "$(basename "${0}")")" +test -f "${HOME}/.buildscripts/${PREFIX}.conf" && . "${HOME}/.buildscripts/${PREFIX}.conf" || { echo "${0} has no valid context prefix..." >&2; exit 1; } + +: ${FORCE_BUILD:="no"} +: ${DEB_BUILD_FOR:="debian:${DEBIAN_DISTROS} ubuntu:${UBUNTU_DISTROS}"} + +# These parts are not user-serviceable. +typeset -ag temp_cleanup="" +# End of non-user-serviceable part. + +set -ex + +# Cleans up temporary directories and files. +# RFC SHOULD be called by trap handlers. +cleanup () { + typeset temp_dir="" + for temp_dir in "${temp_cleanup[@]}"; do + if [ -d "${temp_dir}" ]; then + rm -Rf -- "${temp_dir}" + fi + done +} + +# Run cleanup() automatically. +trap cleanup ERR EXIT SIGTERM SIGINT SIGHUP SIGPIPE SIGALRM SIGUSR1 SIGUSR2 + +set_vars() { + SBUILD="sbuild" + TEMP_BASE="${HOME}/tmp/" + mkdir -p -- "${TEMP_BASE}" + chmod 2770 "${TEMP_BASE}" + + # first argv is the name of the Git project + PROJECT_PATH="${1}" + PROJECT_PATH="${PROJECT_PATH/%.git/}" + PROJECT="$(basename "${PROJECT_PATH}")" + DEBSRCPKG="${PROJECT}" + + # grab repository component area from command line (2nd argv) or guess it + ARGV2_COMPONENT="$(cut -d"/" -f1 <<< "${2}/")" + ARGV2_CODENAME="$(cut -d"/" -f2 <<< "${2}/")" + COMPONENT="${ARGV2_COMPONENT:-${COMPONENT:-$COMPONENT_NIGHTLY}}" + CODENAMES="${ARGV2_CODENAME:-${CODENAMES}}" + [ -n "${ARGV2_CODENAME}" ] && FORCE_BUILD="yes" || true + DATE="${DATE:-$(date +%Y%m%d)}" + if [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}" ]; then + CHECKOUT="${3:-release-builds}" + elif [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}-test" ]; then + CHECKOUT="${3:-release-testbuilds}" + elif grep -qs "$COMPONENT" <<< "${COMPONENT_BUNDLES}"; then + CHECKOUT="${3:-build-$COMPONENT}" + elif [ "x${COMPONENT}" = "x${COMPONENT_NIGHTLY}" ]; then + CHECKOUT="${3:-master}" + else + echo "error: no such package component area for this Git project. Aborting..." + exit 1 + fi + # the DATE might be given as ,,today'' from the command line + [ "x${DATE}" = "xtoday" ] && DATE="$(date +%Y%m%d)" + + # setting paths + PROJECT_DIR="${HOME}/build/${COMPONENT}/${TIMESTAMP}/${PROJECT}" + temp_cleanup+=("${PROJECT_DIR}") + temp_cleanup+=("$(dirname ${PROJECT_DIR})") + + PKGDIST="${HOME}/pkg-dist/${COMPONENT}/${PROJECT}" + + # creating paths + mkdir -p -- "${PROJECT_DIR}" + mkdir -p -- "${PKGDIST}" + + # by default we build for all current debian versions + if [ "x${ARGV2_CODENAME}" != "x" ]; then + if grep -qs "${ARGV2_CODENAME}" <<< "${DEBIAN_DISTROS}"; then + DEB_BUILD_FOR="debian:${ARGV2_CODENAME}" + elif grep -qs "${ARGV2_CODENAME}" <<< "${UBUNTU_DISTROS}"; then + DEB_BUILD_FOR="ubuntu:${ARGV2_CODENAME}" + fi + fi + + return 0 +} + +prepare_workspace() { + # make sure our local working copy is up to date... + + my_DIST="$1" + my_CODENAME="$2" + my_WORKDIR="$(dirname ${PROJECT_DIR})" + + cd ${my_WORKDIR} + if [ ! -d ${PROJECT}/.git ]; then + git clone "git://${GIT_HOSTNAME}/${PROJECT_PATH}.git" + cd "${PROJECT}" + git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}" + + GIT_OBJECT_ID="$(git rev-parse --verify HEAD)" + fi + + cd "${PROJECT_DIR}" + + # extract Debian source package name from debian/changelog + if [ -e debian/changelog ]; then + DEBSRCPKG="$(dpkg-parsechangelog -S Source)" + fi + + return 0 +} + +clear_pkgdist() { + # pkgdist directory cleanup + + # Do NOT spawn a subshell here. + # Allow changing global variables in the main process. + typeset -a deb_build_for_arr + typeset OLDIFS="${IFS}" + IFS=" " + read -a deb_build_for_arr <<< "${DEB_BUILD_FOR}" + IFS="${OLDIFS}" + + typeset line="" + for line in "${deb_build_for_arr[@]}"; do + l_DIST="$(cut -d":" -f1 <<< "${line/: /:}" | tr [:upper:] [:lower:])" + l_CODENAMES="${CODENAMES:-$(cut -d":" -f2- <<< "${line/: /:}" | sed -e 's/,/ /g' | tr [:upper:] [:lower:])}" + grep -qs "${l_DIST}" <<< "${DEB_DISTS_SUPPORTED}" && { + for l_CODENAME in ${l_CODENAMES}; do + + # in case we build a special CODENAME (squeeze, wheezy, lucid, ...) do skip + # the wrong distribution here... + test -z "${CODENAMES}" || grep "${CODENAMES}" <<< "${line}" || break + + for l_ARCH in amd64 i386; do + [ "x${SKIP_ARCH}" != "x${l_ARCH}" ] && { + mkdir -p -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}" + rm -f -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/dupload.conf" + rm -f -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/"*_*.changes + rm -f -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/"*_*.upload + rm -f -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/"*_*.build + rm -f -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/"*_*.dsc + rm -f -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/"*_*.tar.gz + rm -f -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/"*.deb + } + done + done + } + done + return 0 +} + +build_packages() { + # use pbuilder for building all variants of this package + + # Do NOT spawn a subshell here. + # Allow changing global variables in the main process. + typeset -a deb_build_for_arr + typeset OLDIFS="${IFS}" + IFS=" " + read -a deb_build_for_arr <<< "${DEB_BUILD_FOR}" + IFS="${OLDIFS}" + + typeset line="" + for line in "${deb_build_for_arr[@]}"; do + l_DIST="$(cut -d":" -f1 <<< "${line/: /:}" | tr [:upper:] [:lower:])" + l_CODENAMES="${CODENAMES:-$(cut -d":" -f2- <<< "${line/: /:}" | sed -e 's/,/ /g' | tr [:upper:] [:lower:])}" + grep -qs "${l_DIST}" <<< "${DEB_DISTS_SUPPORTED}" && { + for l_CODENAME in ${l_CODENAMES}; do + + # prepare workspace + prepare_workspace "${l_DIST}" "${l_CODENAME}" + + # in case we build a special CODENAME (squeeze, wheezy, lucid, ...) do skip + # the wrong distribution here... + test -z "${CODENAMES}" || grep "${CODENAMES}" <<< "${line}" || break + + TEMP_DIR="$(mktemp -d --tmpdir=${TEMP_BASE})" + temp_cleanup+=("${TEMP_DIR}") + + mkdir -p -- "${TEMP_DIR}/${PROJECT}" + chmod 2770 -Rf -- "${TEMP_DIR}" + + cd "${PROJECT_DIR}" + git clone "${PROJECT_DIR}" "${TEMP_DIR}/${PROJECT}/" + cd "${TEMP_DIR}/${PROJECT}" + git checkout "${CHECKOUT}" || git checkout master + find "${PROJECT_DIR}/../" -maxdepth 0 -mindepth 0 -type f | grep -qs "${PROJECT}_"*.orig.tar.gz && cp -- "${PROJECT_DIR}/../${PROJECT}_"*.orig.tar.gz .. + GITREV="$(gitrevno)" + + # we always build native packages for our repos + SA_OPTION="" + test -f "debian/source/format" && grep -Eqs '^3.0.*\(quilt\)$' "debian/source/format" && { + git fetch origin upstream:upstream + UPSTREAM_VERSION="$(dpkg-parsechangelog | grep "Version:" | cut -d " " -f2 | sed -e 's/-.*//' -e 's/^.*://')" + REVISION="$(dpkg-parsechangelog | grep "Version:" | cut -d " " -f2 | sed -e 's/.*-//')" + git archive --prefix="${PROJECT}-${UPSTREAM_VERSION}/" -o "../${PROJECT}_${UPSTREAM_VERSION}.orig.tar.gz" "upstream/${UPSTREAM_VERSION}" && { + SA_OPTION="--debbuildopts=\"-sa\"" + } || echo "1.0" > "debian/source/format" + } + + # for Ubuntu version is the codename of the distribution release + if [ -n "${BASH_VERSINFO[0]}" ] && [ "${BASH_VERSINFO[0]}" -gt 3 ]; then + typeset -l codename="${l_CODENAME}" + else + typeset codename="$(tr '[:upper:]' '[:lower:]' <<< "${l_CODENAME}")" + fi + + # translate the version name for Debian releases + [ "x${l_CODENAME}" = "xsid" ] && codename="unstable" + #[ "x$l_CODENAME" = "xjessie" ] && codename=testing + #[ "x$l_CODENAME" = "xwheezy" ] && codename=stable + #[ "x$l_CODENAME" = "xoldstable" ] && codename=oldstable + + typeset numerical_version="" + typeset -i tmp_ret="1" + typeset pretty_dist="" + + if [ -n "${l_DIST}" ] && [ "${l_DIST}" = "debian" ]; then + pretty_dist="Debian" + numerical_version="$("debian-codename-to-version.sh" "${codename}")" + tmp_ret="${?}" + fi + + if [ -n "${l_DIST}" ] && [ "${l_DIST}" = "ubuntu" ]; then + pretty_dist="Ubuntu" + numerical_version="$("ubuntu-codename-to-version.sh" "${codename}")" + tmp_ret="${?}" + fi + + if [ "${tmp_ret}" -ne "0" ] || [ -z "${numerical_version}" ]; then + echo "Error: unable to map code name \"${codename}\" to Debian or Ubuntu numerical versions. Unknown code name or not applicable to distribution \"${dist_pretty}\"? Aborting." >&2 + exit 1 + fi + + # modify the section for non-release package builds + [ "x${COMPONENT}" != "xrelease" ] && { + mv -- "debian/control" "debian/control.tmp" + sed "s,Section:[\ ]*\(.*\),Section: ${COMPONENT}/\1,g" debian/control.tmp > debian/control + } + + # modify changelog for this build + if [ "${COMPONENT}" != "${COMPONENT_NIGHTLY}" ]; then + dch --distribution "${codename}" --force-distribution -l "+git${DATE}.${GITREV}+${numerical_version}.${COMPONENT}." "Auto-built ${pretty_dist} ${l_CODENAME} package for ${REPOS_SERVER} repository (Git commit: ${GIT_OBJECT_ID})." + else + dch --distribution "${codename}" --force-distribution -l "~git${DATE}.${GITREV}+${numerical_version}.${COMPONENT}." "Development-Snapshot!!! Auto-built ${pretty_dist} ${l_CODENAME} package for ${REPOS_SERVER} repository (Git commit: ${GIT_OBJECT_ID})." + fi + mkdir -p -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/"{amd64,i386} + OTHERMIRROR="" + if [ "x${COMPONENT}" = "x${COMPONENT_NIGHTLY}" ]; then + grep -qs "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="deb http://${REPOS_SERVER}/${l_DIST}-nightly ${l_CODENAME} main" + else + grep "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="deb http://${REPOS_SERVER}/${l_DIST} ${l_CODENAME} main" + fi + # create git changelog immediately prior to building the package + git --no-pager log --since "2 years ago" --format="%ai %aN (%h) %n%n%x09*%w(68,0,10) %s%d%n" > ChangeLog + + # build the source package + dpkg-buildpackage -uc -us -S -d + cd .. + DSCFILE="$(pwd)/$(ls -1 "${DEBSRCPKG}_"*.dsc | head -n1)" + + SBUILD_OPTIONS="-n -j2 -sAd ${codename} -k ${GPG_KEY} --build-dep-resolver=aptitude" + SBUILD_OPTIONS_64="${SBUILD_OPTIONS} -c arctica-${l_CODENAME}" + SBUILD_OPTIONS_32="${SBUILD_OPTIONS} -c arctica-${l_CODENAME}-i386 --arch=i386 --debbuildopts=-B" + if [ -n "${SA_OPTION}" ]; then + SBUILD_OPTIONS_64=${SBUILD_OPTIONS}" ${SA_OPTION}" + fi + + [ "x${SKIP_ARCH}" != "xamd64" ] && grep -Eqs 'Architecture.*(all|any|amd64)' "${TEMP_DIR}/${PROJECT}/debian/control" && { + cd "${PKGDIST}/${l_DIST}/${l_CODENAME}/amd64" + tac ${DSCFILE} | while read line; do + if echo $line | grep -E "^Files:" 1>/dev/null; then break; fi + # each line contains a file that is part of the src:package + filename="$(echo $line | cut -d" " -f3-)" + if [ -n "$filename" ]; then cp "${TEMP_DIR}/${filename}" .; fi + done + if [ -z "${OTHERMIRROR}" ]; then + nice ${SBUILD} ${SBUILD_OPTIONS_64} "${DSCFILE}" + else + nice ${SBUILD} ${SBUILD_OPTIONS_64} --extra-repository="${OTHERMIRROR}" "${DSCFILE}" + fi + } + [ "x${SKIP_ARCH}" != "xi386" ] && grep -Eqs 'Architecture.*(any|i386)' "${TEMP_DIR}/${PROJECT}/debian/control" && { + cd "${PKGDIST}/${l_DIST}/${l_CODENAME}/i386" + tac ${DSCFILE} | while read line; do + if echo $line | grep -E "^Files:" 1>/dev/null; then break; fi + # each line contains a file that is part of the src:package + filename="$(echo $line | cut -d" " -f3-)" + if [ -n "$filename" ]; then cp "${TEMP_DIR}/${filename}" .; fi + done + if [ -z "${OTHERMIRROR}" ]; then + nice ${SBUILD} ${SBUILD_OPTIONS_32} "${DSCFILE}" + else + nice ${SBUILD} ${SBUILD_OPTIONS_32} --extra-repository="${OTHERMIRROR}" "${DSCFILE}" + fi + } + done + } + done + return 0 +} + +upload_packages() { + # dupload the new packages to the reprepro repository + + # Do NOT spawn a subshell here. + # Allow changing global variables in the main process. + typeset -a deb_build_for_arr + typeset OLDIFS="${IFS}" + IFS=" " + read -a deb_build_for_arr <<< "${DEB_BUILD_FOR}" + IFS="${OLDIFS}" + + typeset line="" + for line in "${deb_build_for_arr[@]}"; do + l_DIST="$(cut -d":" -f1 <<< "${line/: /:}" | tr [:upper:] [:lower:])" + l_CODENAMES="${CODENAMES:-$(cut -d":" -f2- <<< "${line/: /:}" | sed -e 's/,/ /g' | tr [:upper:] [:lower:])}" + for l_CODENAME in ${l_CODENAMES}; do + + # in case we build a special CODENAME (squeeze, wheezy, lucid, ...) do skip + # the wrong distribution here... + test -z "${CODENAMES}" || grep "${CODENAMES}" <<< "${line}" || break + + for l_ARCH in amd64 i386; do + [ "x${SKIP_ARCH}" != "x${l_ARCH}" ] && { + cd "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}" + test -f "./dupload.conf" || ln -s -- "${HOME}/.dupload.conf.${PREFIX}" "./dupload.conf" && true + ls -- "${DEBSRCPKG}_"*.changes >/dev/null 2>&1 && dupload --to "${PREFIX}-${l_DIST}-${COMPONENT}" "${DEBSRCPKG}_"*.changes 0<&- + } + done + done + done + return 0 +} + +### MAIN ### +set_vars "$@" && { + if [ "x$(basename "${0}")" = "x${PREFIX}-build-deb-package" ] || [ "x$(basename "${0}")" = "x${PREFIX}-build+upload-deb-package" ]; then + # Treat any value other than "no" and "0" as true. + cd "${PROJECT_DIR}" && pkgneedsbuild "${CHECKOUT}" || ( [ "x${FORCE_BUILD}" != "xno" ] && [ "x${FORCE_BUILD}" != "x0" ] ) && { + clear_pkgdist + build_packages + } + fi + if [ "x$(basename "${0}")" = "x${PREFIX}-upload-deb-package" ] || [ "x$(basename "${0}")" = "x${PREFIX}-build+upload-deb-package" ]; then + upload_packages + fi +} -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 9671e72e9fe649df5e1469ef22500b96ee150b04 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 18:58:33 2016 +0100 bin/build-{deb,rpm}-package: backport from bin/sbuild-deb-package: rename ${COMPONENT_MAIN} to ${COMPONENT_RELEASE}. --- bin/build-deb-package | 12 ++++++------ bin/build-rpm-package | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/build-deb-package b/bin/build-deb-package index 61fe04e..33eae0f 100755 --- a/bin/build-deb-package +++ b/bin/build-deb-package @@ -30,7 +30,7 @@ DEB_DISTS_SUPPORTED="debian ubuntu" DEBIAN_DISTROS="lenny,squeeze,wheezy,jessie,stretch,sid" UBUNTU_DISTROS="lucid,precise" -COMPONENT_MAIN="main" +COMPONENT_RELEASE="main" COMPONENT_NIGHTLY="nightly" COMPONENT_BUNDLES="bundle-release1 bundle-release2" REPOS_SERVER="packages.mydomain.org" @@ -93,9 +93,9 @@ set_vars() { CODENAMES="${ARGV2_CODENAME:-${CODENAMES}}" [ -n "${ARGV2_CODENAME}" ] && FORCE_BUILD="yes" || true DATE="${DATE:-$(date +%Y%m%d)}" - if [ "x${COMPONENT}" = "x${COMPONENT_MAIN}" ]; then + if [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}" ]; then CHECKOUT="${3:-build-main}" - elif [ "x${COMPONENT}" = "x${COMPONENT_MAIN}-test" ]; then + elif [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}-test" ]; then CHECKOUT="${3:-build-main-test}" elif grep -qs "$COMPONENT" <<< "${COMPONENT_RELEASES}"; then CHECKOUT="${3:-build-$COMPONENT}" @@ -294,8 +294,8 @@ build_packages() { exit 1 fi - # modify the section for non-main package builds - [ "x${COMPONENT}" != "xmain" ] && { + # modify the section for non-release package builds + [ "x${COMPONENT}" != "x${COMPONENT_RELEASE}" ] && { mv -- "debian/control" "debian/control.tmp" sed "s,Section:[\ ]*\(.*\),Section: ${COMPONENT}/\1,g" debian/control.tmp > debian/control } @@ -309,7 +309,7 @@ build_packages() { mkdir -p -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/"{amd64,i386} OTHERMIRROR="" if [ "x${COMPONENT}" = "x${COMPONENT_NIGHTLY}" ]; then - grep -qs "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="deb http://${REPOS_SERVER}/${l_DIST} ${l_CODENAME} ${COMPONENT_MAIN} ${COMPONENT}" + grep -qs "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="deb http://${REPOS_SERVER}/${l_DIST} ${l_CODENAME} ${COMPONENT_RELEASE} ${COMPONENT}" else grep "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="deb http://${REPOS_SERVER}/${l_DIST} ${l_CODENAME} ${COMPONENT}" fi diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 0150295..bc6791f 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -145,9 +145,9 @@ set_vars() { CODENAMES="${ARGV2_CODENAME:-${CODENAMES}}" [ -n "${ARGV2_CODENAME}" ] && FORCE_BUILD="yes" || true DATE="${DATE:-$(date +%Y%m%d)}" - if [ "x${COMPONENT}" = "x${COMPONENT_MAIN}" ]; then + if [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}" ]; then CHECKOUT="${3:-build-main}" - elif [ "x${COMPONENT}" = "x${COMPONENT_MAIN}-test" ]; then + elif [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}-test" ]; then CHECKOUT="${3:-build-main-test}" COMPONENT="maintest" elif grep -qs "${COMPONENT}" <<< "${COMPONENT_RELEASES}"; then -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 26c68db37b476efbc834a2b42839dc94841396cb Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 19:00:31 2016 +0100 bin/build-deb-package: backport from bin/build-rpm-package: add missing parameter terminator to chmod call. --- bin/build-deb-package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build-deb-package b/bin/build-deb-package index 33eae0f..2526110 100755 --- a/bin/build-deb-package +++ b/bin/build-deb-package @@ -79,7 +79,7 @@ set_vars() { PDEBUILD="pdebuild --pbuilder qemubuilder" TEMP_BASE="${HOME}/tmp/" mkdir -p -- "${TEMP_BASE}" - chmod 2770 "${TEMP_BASE}" + chmod 2770 -- "${TEMP_BASE}" # first argv is the name of the Git project PROJECT_PATH="${1}" -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit b12fc0c0792a51aaed47238743a6cd96db08370d Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 19:02:04 2016 +0100 bin/build-deb-package: backport from bin/sbuild-deb-package: fix find call by specifying the -maxdepth and -mindepth options before the -type predicate. --- bin/build-deb-package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build-deb-package b/bin/build-deb-package index 2526110..1209347 100755 --- a/bin/build-deb-package +++ b/bin/build-deb-package @@ -246,7 +246,7 @@ build_packages() { git clone "${PROJECT_DIR}" "${TEMP_DIR}/${PROJECT}/" cd "${TEMP_DIR}/${PROJECT}" git checkout "${CHECKOUT}" || git checkout master - find "${PROJECT_DIR}/../" -type f -maxdepth 0 -mindepth 0 | grep -qs "${PROJECT}_"*.orig.tar.gz && cp -- "${PROJECT_DIR}/../${PROJECT}_"*.orig.tar.gz .. + find "${PROJECT_DIR}/../" -maxdepth 0 -mindepth 0 -type f | grep -qs "${PROJECT}_"*.orig.tar.gz && cp -- "${PROJECT_DIR}/../${PROJECT}_"*.orig.tar.gz .. GITREV="$(gitrevno)" # we always build native packages for our repos -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 4025494a1bd3c6ed24bb8fe19bd385830a5b4319 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 19:09:25 2016 +0100 bin/build-deb-package: backport from bin/sbuild-deb-package: expect {debian,ubuntu}-codename-to-version.sh in ${PATH}. --- bin/build-deb-package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build-deb-package b/bin/build-deb-package index efd8c58..a37c056 100755 --- a/bin/build-deb-package +++ b/bin/build-deb-package @@ -279,13 +279,13 @@ build_packages() { if [ -n "${l_DIST}" ] && [ "${l_DIST}" = "debian" ]; then pretty_dist="Debian" - numerical_version="$("${script_path}/debian-codename-to-version.sh" "${codename}")" + numerical_version="$("debian-codename-to-version.sh" "${codename}")" tmp_ret="${?}" fi if [ -n "${l_DIST}" ] && [ "${l_DIST}" = "ubuntu" ]; then pretty_dist="Ubuntu" - numerical_version="$("${script_path}/ubuntu-codename-to-version.sh" "${codename}")" + numerical_version="$("ubuntu-codename-to-version.sh" "${codename}")" tmp_ret="${?}" fi -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit de53f9fcb7346c2a735757e6e3624fd9b9f063f4 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 19:04:21 2016 +0100 bin/build-deb-package: backport from bin/sbuild-deb-package: wrap the debbuildopts argument in double quotes. --- bin/build-deb-package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build-deb-package b/bin/build-deb-package index 1209347..efd8c58 100755 --- a/bin/build-deb-package +++ b/bin/build-deb-package @@ -256,7 +256,7 @@ build_packages() { UPSTREAM_VERSION="$(dpkg-parsechangelog | grep "Version:" | cut -d " " -f2 | sed -e 's/-.*//' -e 's/^.*://')" REVISION="$(dpkg-parsechangelog | grep "Version:" | cut -d " " -f2 | sed -e 's/.*-//')" git archive --prefix="${PROJECT}-${UPSTREAM_VERSION}/" -o "../${PROJECT}_${UPSTREAM_VERSION}.orig.tar.gz" "upstream/${UPSTREAM_VERSION}" && { - SA_OPTION="--debbuildopts=-sa" + SA_OPTION="--debbuildopts=\"-sa\"" } || echo "1.0" > "debian/source/format" } -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 5fc5da0205d72099617f06bb606669c0ec032573 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 08:53:05 2016 +0100 bin/build-{deb,rpm}-package: move some variable settings to the more-appropriate function. --- bin/build-deb-package | 17 +++++++++-------- bin/build-rpm-package | 15 ++++++++------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/bin/build-deb-package b/bin/build-deb-package index cd307de..61fe04e 100755 --- a/bin/build-deb-package +++ b/bin/build-deb-package @@ -123,6 +123,15 @@ set_vars() { mkdir -p -- "${PROJECT_DIR}" mkdir -p -- "${PKGDIST}" + # by default we build for all current debian versions + if [ "x${ARGV2_CODENAME}" != "x" ]; then + if grep -qs "${ARGV2_CODENAME}" <<< "${DEBIAN_DISTROS}"; then + DEB_BUILD_FOR="debian:${ARGV2_CODENAME}" + elif grep -qs "${ARGV2_CODENAME}" <<< "${UBUNTU_DISTROS}"; then + DEB_BUILD_FOR="ubuntu:${ARGV2_CODENAME}" + fi + fi + return 0 } @@ -151,14 +160,6 @@ prepare_workspace() { GIT_OBJECT_ID="$(git rev-parse --verify HEAD)" cd "${PROJECT_DIR}" - # by default we build for all current debian versions - if [ "x${ARGV2_CODENAME}" != "x" ]; then - if grep -qs "${ARGV2_CODENAME}" <<< "${DEBIAN_DISTROS}"; then - DEB_BUILD_FOR="debian:${ARGV2_CODENAME}" - elif grep -qs "${ARGV2_CODENAME}" <<< "${UBUNTU_DISTROS}"; then - DEB_BUILD_FOR="ubuntu:${ARGV2_CODENAME}" - fi - fi return 0 } diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 7764622..0150295 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -172,6 +172,14 @@ set_vars() { mkdir -p -- "${PROJECT_DIR}" mkdir -p -- "${PKGDIST}" + if [ "x${ARGV2_CODENAME}" != "x" ]; then + if grep -qs "${ARGV2_CODENAME}" <<< "${FEDORA_DISTROS}"; then + RPM_BUILD_FOR="fedora:${ARGV2_CODENAME}" + elif grep -qs "${ARGV2_CODENAME}" <<< "${EPEL_DISTROS}"; then + RPM_BUILD_FOR="epel:${ARGV2_CODENAME}" + fi + fi + return 0 } @@ -588,13 +596,6 @@ prepare_workspace() { GIT_OBJECT_ID="$(git rev-parse --verify HEAD)" cd "${PROJECT_DIR}" - if [ "x${ARGV2_CODENAME}" != "x" ]; then - if grep -qs "${ARGV2_CODENAME}" <<< "${FEDORA_DISTROS}"; then - RPM_BUILD_FOR="fedora:${ARGV2_CODENAME}" - elif grep -qs "${ARGV2_CODENAME}" <<< "${EPEL_DISTROS}"; then - RPM_BUILD_FOR="epel:${ARGV2_CODENAME}" - fi - fi return 0 } -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit a1a879a34978d10c94e321a7b570ad7b9e1e571d Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 19:30:07 2016 +0100 bin/build-{deb,rpm}-package: rewrite prepare_workspace to error out if switching to the directory is not possible. --- bin/build-deb-package | 40 ++++++++++++++++++++++++---------------- bin/build-rpm-package | 39 ++++++++++++++++++++++++--------------- 2 files changed, 48 insertions(+), 31 deletions(-) diff --git a/bin/build-deb-package b/bin/build-deb-package index 8f89693..c172286 100755 --- a/bin/build-deb-package +++ b/bin/build-deb-package @@ -133,24 +133,32 @@ set_vars() { prepare_workspace() { # make sure our local working copy is up to date... - if [ -d "${PROJECT_DIR}/.git" ]; then - cd "$PROJECT_DIR" && git reset --hard - git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}" - git pull origin "${CHECKOUT}" - git fetch origin upstream:upstream || true - git fetch origin pristine-tar:pristine-tar || true - # and again, get the ${CHECKOUT} refspec in pure state - git reset --hard - git clean -df + cd "${PROJECT_DIR}" && { + git reset --hard + git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}" + git pull origin "${CHECKOUT}" + git fetch origin upstream:upstream || true + git fetch origin pristine-tar:pristine-tar || true + # and again, get the ${CHECKOUT} refspec in pure state + git reset --hard + git clean -df + } || { + echo "Unable to switch to project directory \"${PROJECT_DIR}\". Check the permissions." >&2 + exit 1 + } else - cd "$(dirname "${PROJECT_DIR}")" - git clone "git://${GIT_HOSTNAME}/${PROJECT_PATH}.git" - cd "${PROJECT}" - git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}" - git fetch origin upstream:upstream - git fetch origin pristine-tar:pristine-tar || true - git clean -df + cd "$(dirname "${PROJECT_DIR}")" && { + git clone "git://${GIT_HOSTNAME}/${PROJECT_PATH}.git" + cd "${PROJECT}" + git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}" + git fetch origin upstream:upstream + git fetch origin pristine-tar:pristine-tar || true + git clean -df + } || { + echo "Unable to switch to project directory \"$(dirname "${PROJECT_DIR}")\". Does it exist? Check the permissions." >&2 + exit 1 + } fi GIT_OBJECT_ID="$(git rev-parse --verify HEAD)" diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 890ae66..c6735f4 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -570,22 +570,31 @@ get_extra_repository () { prepare_workspace() { # make sure our local working copy is up to date... if [ -d "${PROJECT_DIR}/.git" ]; then - cd "${PROJECT_DIR}" && git reset --hard - git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}" - git pull origin "${CHECKOUT}" - git fetch origin upstream:upstream || true - git fetch origin pristine-tar:pristine-tar || true - # and again, get the ${CHECKOUT} refspec in pure state - git reset --hard - git clean -df + cd "${PROJECT_DIR}" && { + git reset --hard + git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}" + git pull origin "${CHECKOUT}" + git fetch origin upstream:upstream || true + git fetch origin pristine-tar:pristine-tar || true + # and again, get the ${CHECKOUT} refspec in pure state + git reset --hard + git clean -df + } || { + echo "Unable to switch to project directory \"${PROJECT_DIR}\". Check the permissions." >&2 + exit 1 + } else - cd "$(dirname "${PROJECT_DIR}")" - git clone "git://${GIT_HOSTNAME}/${PROJECT_PATH}.git" - cd "${PROJECT}" - git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}" - git fetch origin upstream:upstream - git fetch origin pristine-tar:pristine-tar || true - git clean -df + cd "$(dirname "${PROJECT_DIR}")" && { + git clone "git://${GIT_HOSTNAME}/${PROJECT_PATH}.git" + cd "${PROJECT}" + git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}" + git fetch origin upstream:upstream + git fetch origin pristine-tar:pristine-tar || true + git clean -df + } || { + echo "Unable to switch to project directory \"$(dirname "${PROJECT_DIR}")\". Does it exist? Check the permissions." >&2 + exit 1 + } fi GIT_OBJECT_ID="$(git rev-parse --verify HEAD)" -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit f6b93f65c2faad0045565e12c531e8aa98b82132 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 19:25:16 2016 +0100 bin/sbuild-deb-package: backport from bin/build-deb-package: set ${script_path} and include common.sh. --- bin/sbuild-deb-package | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index 56e8619..3de8e1f 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -16,7 +16,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -export PATH="${HOME}/bin:${PATH}" +typeset script_path="$(dirname "$(readlink -e "${BASH_SOURCE}")")" + +. "${script_path}/common.sh" GIT_USER="gituser" GIT_HOSTNAME="git.mydomain.org" -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit ef525bd9ab278e25970dd824e481fea2874f784c Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 19:24:09 2016 +0100 bin/sbuild-deb-package: backport from bin/build-deb-package: update Copyright and License header. --- bin/sbuild-deb-package | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index a479059..56e8619 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -1,21 +1,20 @@ #!/bin/bash # Copyright (C) 2011-2015 by Mike Gabriel <mike.gabriel@das-netzwerkteam.de> +# Copyright (C) 2016 by Mihai Moldovan <ionic@ionic.de> # -# This programme is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This programme is distributed in the hope that it will be useful, +# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the -# Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. export PATH="${HOME}/bin:${PATH}" -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 53297fe81e0d0c7d048562e23f78caf60df391a1 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 19:27:19 2016 +0100 bin/sbuild-deb-package: backport from bin/build-deb-package: set ${COMPONENT_RELEASE} to "main". --- bin/sbuild-deb-package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index 3de8e1f..9bd3cbd 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -30,7 +30,7 @@ DEB_DISTS_SUPPORTED="debian ubuntu" DEBIAN_DISTROS="lenny,squeeze,wheezy,jessie,stretch,sid" UBUNTU_DISTROS="lucid,precise,trusty,xenial,yakkety" -COMPONENT_RELEASE="release" +COMPONENT_RELEASE="main" COMPONENT_NIGHTLY="nightly" COMPONENT_BUNDLES="bundle-release1 bundle-release2" REPOS_SERVER="packages.mydomain.org" -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 6f9026f3847c2be57f7ccfeaa41204323f154b35 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 19:29:02 2016 +0100 bin/{{s,}build-deb,build-rpm}-package: simplify branch checkout logic a bit. --- bin/build-deb-package | 8 ++------ bin/build-rpm-package | 11 +++-------- bin/sbuild-deb-package | 8 ++------ 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/bin/build-deb-package b/bin/build-deb-package index a37c056..8f89693 100755 --- a/bin/build-deb-package +++ b/bin/build-deb-package @@ -93,12 +93,8 @@ set_vars() { CODENAMES="${ARGV2_CODENAME:-${CODENAMES}}" [ -n "${ARGV2_CODENAME}" ] && FORCE_BUILD="yes" || true DATE="${DATE:-$(date +%Y%m%d)}" - if [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}" ]; then - CHECKOUT="${3:-build-main}" - elif [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}-test" ]; then - CHECKOUT="${3:-build-main-test}" - elif grep -qs "$COMPONENT" <<< "${COMPONENT_RELEASES}"; then - CHECKOUT="${3:-build-$COMPONENT}" + if [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}" ] || [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}-test" ] || grep -qs "$COMPONENT" <<< "${COMPONENT_RELEASES}"; then + CHECKOUT="${3:-build-${COMPONENT}}" elif [ "x${COMPONENT}" = "x${COMPONENT_NIGHTLY}" ]; then CHECKOUT="${3:-master}" else diff --git a/bin/build-rpm-package b/bin/build-rpm-package index bc6791f..890ae66 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -145,14 +145,9 @@ set_vars() { CODENAMES="${ARGV2_CODENAME:-${CODENAMES}}" [ -n "${ARGV2_CODENAME}" ] && FORCE_BUILD="yes" || true DATE="${DATE:-$(date +%Y%m%d)}" - if [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}" ]; then - CHECKOUT="${3:-build-main}" - elif [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}-test" ]; then - CHECKOUT="${3:-build-main-test}" - COMPONENT="maintest" - elif grep -qs "${COMPONENT}" <<< "${COMPONENT_RELEASES}"; then - CHECKOUT="${3:-build-$COMPONENT}" - elif [ "x${COMPONENT}" = "x$COMPONENT_NIGHTLY" ]; then + if [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}" ] || [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}-test" ] || grep -qs "$COMPONENT" <<< "${COMPONENT_RELEASES}"; then + CHECKOUT="${3:-build-${COMPONENT}}" + elif [ "x${COMPONENT}" = "x${COMPONENT_NIGHTLY}" ]; then CHECKOUT="${3:-master}" else echo "error: no such package component area for this Git project. Aborting..." diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index 9bd3cbd..377f3fd 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -86,12 +86,8 @@ set_vars() { CODENAMES="${ARGV2_CODENAME:-${CODENAMES}}" [ -n "${ARGV2_CODENAME}" ] && FORCE_BUILD="yes" || true DATE="${DATE:-$(date +%Y%m%d)}" - if [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}" ]; then - CHECKOUT="${3:-release-builds}" - elif [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}-test" ]; then - CHECKOUT="${3:-release-testbuilds}" - elif grep -qs "$COMPONENT" <<< "${COMPONENT_BUNDLES}"; then - CHECKOUT="${3:-build-$COMPONENT}" + if [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}" ] || [ "x${COMPONENT}" = "x${COMPONENT_RELEASE}-test" ] || grep -qs "$COMPONENT" <<< "${COMPONENT_RELEASES}"; then + CHECKOUT="${3:-build-${COMPONENT}}" elif [ "x${COMPONENT}" = "x${COMPONENT_NIGHTLY}" ]; then CHECKOUT="${3:-master}" else -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit a8d2e005f0013e3863f792d9f555edad13bae387 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 19:39:48 2016 +0100 bin/build-deb-package: drop extraneous redirection. --- bin/build-deb-package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build-deb-package b/bin/build-deb-package index c172286..c7dcea2 100755 --- a/bin/build-deb-package +++ b/bin/build-deb-package @@ -46,7 +46,7 @@ test -z "${1}" && { PREFIX="$(cut -d"-" -f1 <<< "$(basename "${0}")")" test -f "${HOME}/.buildscripts/${PREFIX}.conf" && . "${HOME}/.buildscripts/${PREFIX}.conf" || { exec >&2 - echo "${0} has no valid context prefix..." >&2 + echo "${0} has no valid context prefix..." exit 1; } -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 97be97f59c0195608838da7dfbca08196693c3c8 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 19:42:52 2016 +0100 bin/sbuild-deb-package: backport from bin/build-deb-package: check temp_dir to be non-empty. --- bin/sbuild-deb-package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index 27f2720..7905648 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -66,7 +66,7 @@ set -ex cleanup () { typeset temp_dir="" for temp_dir in "${temp_cleanup[@]}"; do - if [ -d "${temp_dir}" ]; then + if [ -n "${temp_dir}" ] && [ -d "${temp_dir}" ]; then rm -Rf -- "${temp_dir}" fi done -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 1b061415fe23061ff01083a2b10e4f0366d08c75 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 19:41:59 2016 +0100 bin/sbuild-deb-package: backport from bin/build-deb-package: make usage- and prefix-checks multiline. --- bin/sbuild-deb-package | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index 377f3fd..27f2720 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -39,10 +39,18 @@ GNUPGHOME="${HOME}/.gnupg" TIMESTAMP=$(date +%s%N) -test -z "${1}" && { echo "usage: $(basename "${0}") [<subpath>/]<git-project> {release,release/<codename>,nightly,nightly/<codename>} [<git-checkout>]"; exit 1; } +test -z "${1}" && { + exec >&2 + echo "usage: $(basename "${0}") [<subpath>/]<git-project> {main,main/<codename>,nightly,nightly/<codename>} [<git-checkout>]" + exit 1 +} PREFIX="$(cut -d"-" -f1 <<< "$(basename "${0}")")" -test -f "${HOME}/.buildscripts/${PREFIX}.conf" && . "${HOME}/.buildscripts/${PREFIX}.conf" || { echo "${0} has no valid context prefix..." >&2; exit 1; } +test -f "${HOME}/.buildscripts/${PREFIX}.conf" && . "${HOME}/.buildscripts/${PREFIX}.conf" || { + exec >&2 + echo "${0} has no valid context prefix..." + exit 1; +} : ${FORCE_BUILD:="no"} : ${DEB_BUILD_FOR:="debian:${DEBIAN_DISTROS} ubuntu:${UBUNTU_DISTROS}"} -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 299354c7b4e260e6ef87aa91ae988b397a85ee9b Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 20:23:13 2016 +0100 bin/sbuild-deb-package: backport from bin/build-deb-package: drop unnecessary "&& true". --- bin/sbuild-deb-package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index 357c59c..b46214b 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -379,7 +379,7 @@ upload_packages() { for l_ARCH in amd64 i386; do [ "x${SKIP_ARCH}" != "x${l_ARCH}" ] && { cd "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}" - test -f "./dupload.conf" || ln -s -- "${HOME}/.dupload.conf.${PREFIX}" "./dupload.conf" && true + test -f "./dupload.conf" || ln -s -- "${HOME}/.dupload.conf.${PREFIX}" "./dupload.conf" ls -- "${DEBSRCPKG}_"*.changes >/dev/null 2>&1 && dupload -c --to "${PREFIX}-${l_DIST}-${COMPONENT}" "${DEBSRCPKG}_"*.changes 0<&- } done -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 3bad0d42f0e5a8ca8dc30631840d0b39eec86ad0 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 19:56:38 2016 +0100 bin/sbuild-deb-package: backport from bin/build-deb-package: copy prepare_workspace () body, as we now use another layout and cache the git dir again. --- bin/sbuild-deb-package | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index 6eb3731..de52f6b 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -129,20 +129,35 @@ set_vars() { prepare_workspace() { # make sure our local working copy is up to date... - - my_DIST="$1" - my_CODENAME="$2" - my_WORKDIR="$(dirname ${PROJECT_DIR})" - - cd ${my_WORKDIR} - if [ ! -d ${PROJECT}/.git ]; then - git clone "git://${GIT_HOSTNAME}/${PROJECT_PATH}.git" - cd "${PROJECT}" - git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}" - - GIT_OBJECT_ID="$(git rev-parse --verify HEAD)" + if [ -d "${PROJECT_DIR}/.git" ]; then + cd "${PROJECT_DIR}" && { + git reset --hard + git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}" + git pull origin "${CHECKOUT}" + git fetch origin upstream:upstream || true + git fetch origin pristine-tar:pristine-tar || true + # and again, get the ${CHECKOUT} refspec in pure state + git reset --hard + git clean -df + } || { + echo "Unable to switch to project directory \"${PROJECT_DIR}\". Check the permissions." >&2 + exit 1 + } + else + cd "$(dirname "${PROJECT_DIR}")" && { + git clone "git://${GIT_HOSTNAME}/${PROJECT_PATH}.git" + cd "${PROJECT}" + git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}" + git fetch origin upstream:upstream + git fetch origin pristine-tar:pristine-tar || true + git clean -df + } || { + echo "Unable to switch to project directory \"$(dirname "${PROJECT_DIR}")\". Does it exist? Check the permissions." >&2 + exit 1 + } fi + GIT_OBJECT_ID="$(git rev-parse --verify HEAD)" cd "${PROJECT_DIR}" # extract Debian source package name from debian/changelog -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 4e505cc0e8f0df201fa2ba56071d032afa39e6df Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 20:18:00 2016 +0100 bin/sbuild-deb-package: backport from bin/build-deb-package: fix variable typo (${dist_pretty} => ${pretty_dist}.) --- bin/sbuild-deb-package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index 948286e..d47cf71 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -283,7 +283,7 @@ build_packages() { fi if [ "${tmp_ret}" -ne "0" ] || [ -z "${numerical_version}" ]; then - echo "Error: unable to map code name \"${codename}\" to Debian or Ubuntu numerical versions. Unknown code name or not applicable to distribution \"${dist_pretty}\"? Aborting." >&2 + echo "Error: unable to map code name \"${codename}\" to Debian or Ubuntu numerical versions. Unknown code name or not applicable to distribution \"${pretty_dist}\"? Aborting." >&2 exit 1 fi -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit ffaa7bedc3a0839e5fe7583eebffdf7c3ed88e17 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 20:16:09 2016 +0100 bin/sbuild-deb-package: backport from bin/build-deb-package: add missing parameter terminator to chmod call. --- bin/sbuild-deb-package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index de52f6b..948286e 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -78,7 +78,7 @@ set_vars() { SBUILD="sbuild" TEMP_BASE="${HOME}/tmp/" mkdir -p -- "${TEMP_BASE}" - chmod 2770 "${TEMP_BASE}" + chmod 2770 -- "${TEMP_BASE}" # first argv is the name of the Git project PROJECT_PATH="${1}" -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 4425d7ba6bfaaeb1edcb94ad36afc444f30ec667 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 20:18:50 2016 +0100 bin/sbuild-deb-package: backport from bin/build-deb-package: add numerical distro version to package description. --- bin/sbuild-deb-package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index d47cf71..8a076b2 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -295,9 +295,9 @@ build_packages() { # modify changelog for this build if [ "${COMPONENT}" != "${COMPONENT_NIGHTLY}" ]; then - dch --distribution "${codename}" --force-distribution -l "+git${DATE}.${GITREV}+${numerical_version}.${COMPONENT}." "Auto-built ${pretty_dist} ${l_CODENAME} package for ${REPOS_SERVER} repository (Git commit: ${GIT_OBJECT_ID})." + dch --distribution "${codename}" --force-distribution -l "+git${DATE}.${GITREV}+${numerical_version}.${COMPONENT}." "Auto-built ${pretty_dist} ${l_CODENAME} (${numerical_version}) package for ${REPOS_SERVER} repository (Git commit: ${GIT_OBJECT_ID})." else - dch --distribution "${codename}" --force-distribution -l "~git${DATE}.${GITREV}+${numerical_version}.${COMPONENT}." "Development-Snapshot!!! Auto-built ${pretty_dist} ${l_CODENAME} package for ${REPOS_SERVER} repository (Git commit: ${GIT_OBJECT_ID})." + dch --distribution "${codename}" --force-distribution -l "~git${DATE}.${GITREV}+${numerical_version}.${COMPONENT}." "Development-Snapshot!!! Auto-built ${pretty_dist} ${l_CODENAME} (${numerical_version}) package for ${REPOS_SERVER} repository (Git commit: ${GIT_OBJECT_ID})." fi mkdir -p -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/"{amd64,i386} OTHERMIRROR="" -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit d477e3ffadd01f46516879d0930f848376bcfdbc Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 20:19:37 2016 +0100 bin/sbuild-deb-package: backport from bin/build-deb-package: fix hardcoded "release" string to use ${COMPONENT_RELEASE}. --- bin/sbuild-deb-package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index 8a076b2..c9e9b6d 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -288,7 +288,7 @@ build_packages() { fi # modify the section for non-release package builds - [ "x${COMPONENT}" != "xrelease" ] && { + [ "x${COMPONENT}" != "x${COMPONENT_RELEASE}" ] && { mv -- "debian/control" "debian/control.tmp" sed "s,Section:[\ ]*\(.*\),Section: ${COMPONENT}/\1,g" debian/control.tmp > debian/control } -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 8eab7d489496c70deefbbc67951953ba81d627f2 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 20:20:11 2016 +0100 bin/sbuild-deb-package: backport from bin/build-deb-package: rename git-changelog file back to ChangeLog.gitlog. --- bin/sbuild-deb-package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index c9e9b6d..39d8111 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -307,7 +307,7 @@ build_packages() { grep "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="deb http://${REPOS_SERVER}/${l_DIST} ${l_CODENAME} main" fi # create git changelog immediately prior to building the package - git --no-pager log --since "2 years ago" --format="%ai %aN (%h) %n%n%x09*%w(68,0,10) %s%d%n" > ChangeLog + git --no-pager log --since "2 years ago" --format="%ai %aN (%h) %n%n%x09*%w(68,0,10) %s%d%n" > ChangeLog.gitlog # build the source package dpkg-buildpackage -uc -us -S -d -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 0f3aaf111b967dc9564c570ab0d16936dd4b307d Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 20:21:05 2016 +0100 bin/sbuild-deb-package: backport from bin/build-deb-package: fix dupload call to actually use the symlinked config file in CWD. --- bin/sbuild-deb-package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index 39d8111..357c59c 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -380,7 +380,7 @@ upload_packages() { [ "x${SKIP_ARCH}" != "x${l_ARCH}" ] && { cd "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}" test -f "./dupload.conf" || ln -s -- "${HOME}/.dupload.conf.${PREFIX}" "./dupload.conf" && true - ls -- "${DEBSRCPKG}_"*.changes >/dev/null 2>&1 && dupload --to "${PREFIX}-${l_DIST}-${COMPONENT}" "${DEBSRCPKG}_"*.changes 0<&- + ls -- "${DEBSRCPKG}_"*.changes >/dev/null 2>&1 && dupload -c --to "${PREFIX}-${l_DIST}-${COMPONENT}" "${DEBSRCPKG}_"*.changes 0<&- } done done -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 86edbfc61756bee1db4c00828ca4d26da785f190 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 19:55:48 2016 +0100 bin/sbuild-deb-package: backport from bin/build-deb-package: rewrite main function, drop TIMESTAMP, backport NO_DELAY and locking feature. --- bin/sbuild-deb-package | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index 7905648..6eb3731 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -37,8 +37,6 @@ REPOS_SERVER="packages.mydomain.org" PACKAGES_WITHOUT_OTHERMIRROR="keyring" GNUPGHOME="${HOME}/.gnupg" -TIMESTAMP=$(date +%s%N) - test -z "${1}" && { exec >&2 echo "usage: $(basename "${0}") [<subpath>/]<git-project> {main,main/<codename>,nightly,nightly/<codename>} [<git-checkout>]" @@ -52,6 +50,7 @@ test -f "${HOME}/.buildscripts/${PREFIX}.conf" && . "${HOME}/.buildscripts/${PRE exit 1; } +: ${NO_DELAY:="no"} : ${FORCE_BUILD:="no"} : ${DEB_BUILD_FOR:="debian:${DEBIAN_DISTROS} ubuntu:${UBUNTU_DISTROS}"} @@ -106,12 +105,12 @@ set_vars() { [ "x${DATE}" = "xtoday" ] && DATE="$(date +%Y%m%d)" # setting paths - PROJECT_DIR="${HOME}/build/${COMPONENT}/${TIMESTAMP}/${PROJECT}" - temp_cleanup+=("${PROJECT_DIR}") - temp_cleanup+=("$(dirname ${PROJECT_DIR})") - + PROJECT_DIR="${HOME}/build/${COMPONENT}/${PROJECT}" PKGDIST="${HOME}/pkg-dist/${COMPONENT}/${PROJECT}" + # lock file + LOCK_FILE="${PROJECT_DIR}/../.${PROJECT}.lock" + # creating paths mkdir -p -- "${PROJECT_DIR}" mkdir -p -- "${PKGDIST}" @@ -212,16 +211,12 @@ build_packages() { grep -qs "${l_DIST}" <<< "${DEB_DISTS_SUPPORTED}" && { for l_CODENAME in ${l_CODENAMES}; do - # prepare workspace - prepare_workspace "${l_DIST}" "${l_CODENAME}" - # in case we build a special CODENAME (squeeze, wheezy, lucid, ...) do skip # the wrong distribution here... test -z "${CODENAMES}" || grep "${CODENAMES}" <<< "${line}" || break - TEMP_DIR="$(mktemp -d --tmpdir=${TEMP_BASE})" + TEMP_DIR="$(mktemp -d --tmpdir="${TEMP_BASE}" "tmp.$(repeat_str "X" "24")")" temp_cleanup+=("${TEMP_DIR}") - mkdir -p -- "${TEMP_DIR}/${PROJECT}" chmod 2770 -Rf -- "${TEMP_DIR}" @@ -378,16 +373,29 @@ upload_packages() { return 0 } + ### MAIN ### -set_vars "$@" && { - if [ "x$(basename "${0}")" = "x${PREFIX}-build-deb-package" ] || [ "x$(basename "${0}")" = "x${PREFIX}-build+upload-deb-package" ]; then - # Treat any value other than "no" and "0" as true. - cd "${PROJECT_DIR}" && pkgneedsbuild "${CHECKOUT}" || ( [ "x${FORCE_BUILD}" != "xno" ] && [ "x${FORCE_BUILD}" != "x0" ] ) && { - clear_pkgdist - build_packages +set_vars "${@}" && { + if [ "x$(basename "${0}")" = "x${PREFIX}-sbuild-deb-package" ] || [ "x$(basename "${0}")" = "x${PREFIX}-sbuild+upload-deb-package" ]; then + FORCE_BUILD="$(make_boolean "${FORCE_BUILD}")" + NO_DELAY="$(make_boolean "${NO_DELAY}")" + + cd "${PROJECT_DIR}" && { + pkgneedsbuild "${CHECKOUT}" || [ "${FORCE_BUILD}" -eq "1" ] + } && { + if [ "${FORCE_BUILD}" -eq "1" ] && [ "${NO_DELAY}" -eq "0" ]; then + delay_build + fi + lock_workspace "${LOCK_FILE}" + prepare_workspace && { + unlock_workspace "${LOCK_FILE}" + clear_pkgdist + build_packages + } + unlock_workspace "${LOCK_FILE}" } fi - if [ "x$(basename "${0}")" = "x${PREFIX}-upload-deb-package" ] || [ "x$(basename "${0}")" = "x${PREFIX}-build+upload-deb-package" ]; then + if [ "x$(basename "${0}")" = "x${PREFIX}-upload-deb-package" ] || [ "x$(basename "${0}")" = "x${PREFIX}-sbuild+upload-deb-package" ]; then upload_packages fi } -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 67bc89b8b1533dd3ce5fc2496a8966d3854eeece Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 20:34:04 2016 +0100 bin/sbuild-deb-package: backport from bin/build-deb-package: fix othermirror usage. Within X2Go package range, we need to pull in main, nightly or both depending on what package COMPONENT we are building. --- bin/sbuild-deb-package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index b46214b..a356b90 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -302,9 +302,9 @@ build_packages() { mkdir -p -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/"{amd64,i386} OTHERMIRROR="" if [ "x${COMPONENT}" = "x${COMPONENT_NIGHTLY}" ]; then - grep -qs "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="deb http://${REPOS_SERVER}/${l_DIST}-nightly ${l_CODENAME} main" + grep -qs "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="deb http://${REPOS_SERVER}/${l_DIST} ${l_CODENAME} ${COMPONENT_RELEASE} ${COMPONENT}" else - grep "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="deb http://${REPOS_SERVER}/${l_DIST} ${l_CODENAME} main" + grep "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="deb http://${REPOS_SERVER}/${l_DIST} ${l_CODENAME} ${COMPONENT}" fi # create git changelog immediately prior to building the package git --no-pager log --since "2 years ago" --format="%ai %aN (%h) %n%n%x09*%w(68,0,10) %s%d%n" > ChangeLog.gitlog -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit c70ad4f3f0e84726812f8aa50cd56144d0c8b45f Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Nov 13 20:34:40 2016 +0100 bin/sbuild-deb-package: backport from bin/build-deb-package: re-add othermirror workaround for x2gomatemabindings on wheezy. --- bin/sbuild-deb-package | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package index a356b90..898d581 100755 --- a/bin/sbuild-deb-package +++ b/bin/sbuild-deb-package @@ -306,6 +306,10 @@ build_packages() { else grep "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="deb http://${REPOS_SERVER}/${l_DIST} ${l_CODENAME} ${COMPONENT}" fi + if [ "${PROJECT}" = "x2gomatebindings" ] && [ "${l_CODENAME}" = "wheezy" ]; then + OTHERMIRROR="deb http://http.debian.net/debian ${l_CODENAME}-backports main" + fi + # create git changelog immediately prior to building the package git --no-pager log --since "2 years ago" --format="%ai %aN (%h) %n%n%x09*%w(68,0,10) %s%d%n" > ChangeLog.gitlog -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git