[X2Go-Commits] [buildscripts] 02/12: bin/build-osx-package: rewrite for the OS X builder.

git-admin at x2go.org git-admin at x2go.org
Thu Apr 6 08:34:53 CEST 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository buildscripts.

commit 3eb67fa4028787c6bad2ffce4c227df6307712a2
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Apr 6 08:23:50 2017 +0200

    bin/build-osx-package: rewrite for the OS X builder.
---
 bin/build-osx-package | 325 +++++++++++++++++++-------------------------------
 1 file changed, 121 insertions(+), 204 deletions(-)

diff --git a/bin/build-osx-package b/bin/build-osx-package
index ccb4b86..096db91 100755
--- a/bin/build-osx-package
+++ b/bin/build-osx-package
@@ -26,10 +26,8 @@ GIT_HOSTNAME="git.mydomain.org"
 DEBEMAIL="firstname.lastname at mydomain.org"
 DEBFULLNAME="Firstname Lastname"
 GPG_KEY=""
-DEB_DISTS_SUPPORTED="debian ubuntu raspbian"
-DEBIAN_DISTROS="lenny,squeeze,wheezy,jessie,stretch,sid"
-RASPBIAN_DISTROS="jessie"
-UBUNTU_DISTROS="lucid,precise,trusty,xenial,yakkety"
+OSX_DISTROS="10.10,10.12"
+OSX_REPOS_BASE="/var/www/"
 
 COMPONENT_RELEASE="main"
 COMPONENT_NIGHTLY="nightly"
@@ -53,11 +51,11 @@ test -f "${HOME}/.buildscripts/${PREFIX}.conf" && . "${HOME}/.buildscripts/${PRE
 
 : ${NO_DELAY:="no"}
 : ${FORCE_BUILD:="no"}
-: ${DEB_BUILD_FOR:="debian:${DEBIAN_DISTROS} ubuntu:${UBUNTU_DISTROS} raspbian:${RASPBIAN_DISTROS}"}
-: ${FLAVOR:="native"}
+: ${OSX_BUILD_FOR:="${OSX_DISTROS}"}
 
 # These parts are not user-serviceable.
 typeset -ag temp_cleanup=""
+typeset -g upstream_version=""
 # End of non-user-serviceable part.
 
 set -ex
@@ -77,7 +75,6 @@ cleanup () {
 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}"
@@ -86,7 +83,6 @@ set_vars() {
 	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}/")"
@@ -117,18 +113,10 @@ set_vars() {
 	mkdir -p -- "${PROJECT_DIR}"
 	mkdir -p -- "${PKGDIST}"
 
-	# by default we build for all current debian versions
+	# by default we build for all current OS X versions
 	if [ "x${ARGV2_CODENAME}" != "x" ]; then
-		if [[ "$FLAVOR" = "raspbian" ]]; then
-			if grep -qs "${ARGV2_CODENAME}" <<< "${RASPBIAN_DISTROS}"; then
-				DEB_BUILD_FOR="raspbian:${ARGV2_CODENAME}"
-			fi
-		else
-			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
+		if grep -qs "${ARGV2_CODENAME}" <<< "${OSX_DISTROS}"; then
+			OSX_BUILD_FOR="${ARGV2_CODENAME}"
 		fi
 	fi
 
@@ -168,232 +156,161 @@ prepare_workspace() {
 	GIT_OBJECT_ID="$(git rev-parse --verify HEAD)"
 	cd "${PROJECT_DIR}"
 
-	# extract Debian source package name from debian/changelog
-	if [ -e debian/changelog ]; then
-		DEBSRCPKG="$(dpkg-parsechangelog -S Source)"
-	fi
-
 	return 0
 }
 
+# Cleans up the pkgdist directory used for building packages.
+# Does not take parameters.
+# Does not "return" anything.
 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 -a osx_build_for_arr
 	typeset OLDIFS="${IFS}"
 	IFS=" "
-	read -a deb_build_for_arr <<< "${DEB_BUILD_FOR}"
+	read -a osx_build_for_arr <<< "${OSX_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
-
-				typeset arch="amd64 i386"
-
-				[ "${l_DIST}" = "raspbian" ] && arch="armhf"
-
-				for l_ARCH in ${arch}; 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
-		}
+	for line in "${osx_build_for_arr[@]}"; do
+		l_CODENAMES="${CODENAMES:-$(sed -e 's/,/ /g' <<< "${line}" | 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
+
+			mkdir -p -- "${PKGDIST}/${l_CODENAME}/"
+			rm -f -- "${PKGDIST}/${l_CODENAME}/"*.dmg
+			rm -f -- "${PKGDIST}/${l_CODENAME}/"*.dmg.git.txt
+		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 -a osx_build_for_arr
 	typeset OLDIFS="${IFS}"
 	IFS=" "
-	read -a deb_build_for_arr <<< "${DEB_BUILD_FOR}"
+	read -a osx_build_for_arr <<< "${OSX_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
-
-				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}"
-
-				cd "${PROJECT_DIR}"
-				git clone --no-hardlinks --no-local "${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" ] || [ "${l_DIST}" = "raspbian" ]; 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 \"${pretty_dist}\"? Aborting." >&2
-					exit 1
-				fi
-
-				# 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
-				}
-
-				# 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} (${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} (${numerical_version}) package for ${REPOS_SERVER} repository (Git commit: ${GIT_OBJECT_ID})."
-				fi
-				[ "${l_DIST}" = "raspbian" ] && mkdir -p -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/armhf" || 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_RELEASE} ${COMPONENT}"
-				else
-					grep "${PROJECT}" <<< "${PACKAGE_WITHOUT_OTHERMIRROR}" || OTHERMIRROR="deb http://${REPOS_SERVER}/${l_DIST} ${l_CODENAME} ${COMPONENT}"
-				fi
-				if [ "${PROJECT}" = "x2gomatebindings" ] && [ "${codename}" = "wheezy" ]; then
-					OTHERMIRROR="deb http://httpredir.debian.org/debian ${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
-
-				typeset -a sbuild_options
-				sbuild_options=("-n" "--jobs=2" "-sA" "--dist=${codename}" "--keyid=${GPG_KEY}" "--build-dep-resolver=aptitude")
-
-				if [ -n "${SA_OPTION}" ]; then
-					sbuild_options+=("${SA_OPTION}")
-				fi
-
-				if [ -n "${OTHERMIRROR}" ]; then
-					sbuild_options+=("--extra-repository=${OTHERMIRROR}")
-				fi
-
-				typeset -a sbuild_options_64 sbuild_options_32 sbuild_options_armhf
-				sbuild_options_64=("${sbuild_options[@]}")
-				sbuild_options_32=("${sbuild_options[@]}" "--arch=i386" "--debbuildopts=-B")
-				sbuild_options_armhf=("${sbuild_options[@]}" "--arch=armhf" "--chroot=${codename}-armhf-raspbian-sbuild")
-
-				if [ "${l_DIST}" = "raspbian" ]; then
-					[ "${SKIP_ARCH}" != "armhf" ] && grep -Eqs 'Architecture.*(all|any|armhf)' "${TEMP_DIR}/${PROJECT}/debian/control" && {
-						cd "${PKGDIST}/${l_DIST}/${l_CODENAME}/armhf"
-						nice ${SBUILD} "${sbuild_options_armhf[@]}" "${TEMP_DIR}/${PROJECT}"
-					}
-				else
-					[ "x${SKIP_ARCH}" != "xamd64" ] && grep -Eqs 'Architecture.*(all|any|amd64)' "${TEMP_DIR}/${PROJECT}/debian/control" && {
-						cd "${PKGDIST}/${l_DIST}/${l_CODENAME}/amd64"
-						nice ${SBUILD} "${sbuild_options_64[@]}" "${TEMP_DIR}/${PROJECT}"
-					}
-					[ "x${SKIP_ARCH}" != "xi386" ] && grep -Eqs 'Architecture.*(any|i386)' "${TEMP_DIR}/${PROJECT}/debian/control" && {
-						cd "${PKGDIST}/${l_DIST}/${l_CODENAME}/i386"
-						nice ${SBUILD} "${sbuild_options_32[@]}" "${TEMP_DIR}/${PROJECT}"
-					}
-				fi
-			done
-		}
+	for line in "${osx_build_for_arr[@]}"; do
+		l_CODENAMES="${CODENAMES:-$(sed -e 's/,/ /g' <<< "${line}" | 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
+
+			typeset temp_dir="$(mktemp -d "${TEMP_BASE}/tmp.$(repeat_str "X" "24")")"
+			temp_cleanup+=("${temp_dir}")
+			mkdir -p -- "${temp_dir}/${PROJECT}"
+			chmod 2770 -Rf -- "${temp_dir}"
+
+			cd "${PROJECT_DIR}"
+			git clone --no-hardlinks --no-local "${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 ..
+			typeset gitrev="$(gitrevno)"
+
+			# 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
+
+			upstream_version="$(cat VERSION)"
+
+			typeset is_release="1"
+			if [ "${COMPONENT}" = "${COMPONENT_NIGHTLY}" ]; then
+				is_release="0"
+			fi
+
+			# apply patches from debian/patches/* if necessary
+			if [ -f "${PROJECT}/debian/patches/series" ]; then
+				( cd "${PROJECT}" && QUILT_PATCHES="debian/patches" quilt push -a && rm -Rf -- ".pc/"; )
+			fi
+
+			# Make qt4 tools available.
+			export PATH="${PATH}:/opt/local/libexec/qt4/bin/"
+
+			typeset -a macbuild_env
+			macbuild_env=("BUNDLE=1" "UNIVERSAL=0")
+			[ "${is_release}" -eq "0" ] && macbuild_env+=("DEBUG=1") || macbuild_env+=("DEBUG=0")
+
+			"${macbuild_env[@]}" "./macbuild.sh"
+
+			typeset -i os_major="0"
+			typeset -i os_minor="0"
+			os_major="$(get_generic_major_version "${l_CODENAME}")"
+
+			if [ "${?}" -ne "0" ]; then
+				echo "Unable to extract major OS X version."
+				exit "1"
+			fi
+
+			os_minor="$(get_generic_minor_version "${l_CODENAME}")"
+
+			if [ "${?}" -ne "0" ] || [ "${os_minor}" -lt "0" ]; then
+				echo "Unable to extract minor OS X version."
+				exit "1"
+			fi
+
+			# FIXME: this is not generic at all.
+			typeset top_commit_id="$(git rev-parse --no-flags "HEAD^{commit}")"
+			typeset base_name="${PROJECT}-${UPSTREAM_VERSION}."
+			if [ "${is_release}" -eq "0" ]; then
+				base_name="${base_name}git${DATE}.${GITREV}.${COMPONENT}."
+			else
+				base_name="${base_name}${DATE}."
+			fi
+			base_name="${base_name}OSX_${os_major}_${os_minor}.dmg"
+			mv "client_build/${PROJECT}.dmg" "${PKGDIST}/${l_CODENAME}/${base_name}"
+			echo 'https://code.x2go.org/gitweb?p=x2goclient.git;a=commit;h='"${top_commit_id}" > "${PKG_DIST}/${l_CODENAME}/${base_name}.git.txt"
+		done
 	done
 	return 0
 }
 
+# Uploads the built packages.
+# Has no parameters.
+# Does not "return" any value.
 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
+
+	if [ -z "${upstream_version}" ]; then
+		echo '${upstream_version} must be set (automatically determined via top-level VERSION file in build phase)' >&2
+		exit 1
+	fi
+
+	typeset -a osx_build_for_arr
 	typeset OLDIFS="${IFS}"
 	IFS=" "
-	read -a deb_build_for_arr <<< "${DEB_BUILD_FOR}"
+	read -a osx_build_for_arr <<< "${OSX_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 line in "${osx_build_for_arr[@]}"; do
+		l_CODENAMES="${CODENAMES:-$(sed -e 's/,/ /g' <<< "${line}" | 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
 
-			typeset arch="amd64 i386"
+			cd "${PKGDIST}/${l_CODENAME}/"
+			0</dev/null ssh -- "${REPOS_SERVER}" "mkdir -p '${OSX_REPOS_BASE}/${PROJECT}/${COMPONENT}/${upstream_version}'"
+
+			# Remove packages that are older than 30 days, if building nightlies.
+			[ "${COMPONENT}" = "${COMPONENT_NIGHTLY}" ] && 0</dev/null ssh -- "${REPOS_SERVER}" "find '${OSX_REPOS_BASE}/${PROJECT}/${COMPONENT}/${upstream_version}/' -mtime +30 -name '*.dmg' -exec rm -f '{}' ';'" || true
 
-			[ "${l_DIST}" = "raspbian" ] && arch="armhf"
+			scp *.dmg "${REPOS_SERVER}:'${OSX_REPOS_BASE}/${PROJECT}/${COMPONENT}/${upstream_version}/'" || true
 
-			for l_ARCH in ${arch}; 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"
-					ls -- "${DEBSRCPKG}_"*.changes >/dev/null 2>&1 && dupload -c --to "${PREFIX}-${l_DIST}-${l_CODENAME}" "${DEBSRCPKG}_"*.changes 0<&-
-				}
-			done
+			# Generate checksums.
+			0</dev/null ssh -- "${REPOS_SERVER}" "sudo -u x2go-admin -- x2go-signtarballs '${OSX_REPOS_BASE}/${PROJECT}/${COMPONENT}/${upstream_version}'"
 		done
 	done
 	return 0
@@ -402,7 +319,7 @@ upload_packages() {
 
 ### MAIN ###
 set_vars "${@}" && {
-	if [ "x$(basename "${0}")" = "x${PREFIX}-sbuild-deb-package" ] || [ "x$(basename "${0}")" = "x${PREFIX}-sbuild+upload-deb-package" ]; then
+	if [ "x$(basename "${0}")" = "x${PREFIX}-build-osx-package" ] || [ "x$(basename "${0}")" = "x${PREFIX}-build+upload-osx-package" ]; then
 		FORCE_BUILD="$(make_boolean "${FORCE_BUILD}")"
 		NO_DELAY="$(make_boolean "${NO_DELAY}")"
 
@@ -421,7 +338,7 @@ set_vars "${@}" && {
 			unlock_workspace "${LOCK_FILE}"
 		}
 	fi
-	if [ "x$(basename "${0}")" = "x${PREFIX}-upload-deb-package" ] || [ "x$(basename "${0}")" = "x${PREFIX}-sbuild+upload-deb-package" ]; then
+	if [ "x$(basename "${0}")" = "x${PREFIX}-upload-osx-package" ] || [ "x$(basename "${0}")" = "x${PREFIX}-build+upload-osx-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


More information about the x2go-commits mailing list