The branch, master has been updated via 3fd1dc346f2b9310ecbdeed2c696121d05dfdc2b (commit) via 097ee18b3a57ad5a414646a84e84bc70d4558de1 (commit) via 81324fff912a530295fddb187245d71808487a09 (commit) from d77abe540ea30abb0d4b9e01d513b24d8011058b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3fd1dc346f2b9310ecbdeed2c696121d05dfdc2b Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Dec 3 21:49:43 2013 +0100 prefer files in rpm/ subfolder, continue with next source file if we found a file here commit 097ee18b3a57ad5a414646a84e84bc70d4558de1 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Dec 3 21:48:39 2013 +0100 try to grab RPM source files from upstream project commit 81324fff912a530295fddb187245d71808487a09 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Dec 3 21:46:50 2013 +0100 add lock file support to build-rpm-package, as well ----------------------------------------------------------------------- Summary of changes: bin/build-rpm-package | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) The diff of changes is: diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 5f6b4ae..804f52b 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -81,6 +81,9 @@ set_vars() { PROJECT_DIR="$HOME/build/$COMPONENT/$PROJECT" PKGDIST="$HOME/pkg-dist/$COMPONENT/$PROJECT" + # lock file + LOCK_FILE=$PROJECT_DIR/../.$PROJECT.lock + # creating paths mkdir -p "$TEMP_BASE" mkdir -p "$PROJECT_DIR" @@ -177,6 +180,12 @@ build_packages() { IS_RELEASE="1" fi sed -i $PROJECT.spec -e "s/%{?dist}/.$IS_RELEASE.git$DATE.$GITREV.$COMPONENT%{?dist}/" + + cat $PROJECT.spec | egrep "^Source[0-9]+:.*" | awk '{ print $2 }' | while read source_file; do + find $PROJECT/rpm/$source_file -maxdepth 0 1> /dev/null && cp $PROJECT/rpm/$source_file . && continue + find $PROJECT/$source_file -maxdepth 0 1> /dev/null && cp $PROJECT/$source_file . + done + mv $TEMP_DIR/$PROJECT $TEMP_DIR/$PROJECT-$UPSTREAM_VERSION tar -czf $PKGDIST/rpmbuild/SOURCES/$PROJECT-$UPSTREAM_VERSION.tar.gz $PROJECT-$UPSTREAM_VERSION @@ -257,14 +266,37 @@ upload_packages() { return 0 } +wait_for_lock() { + while [ -f $LOCK_FILE ]; do + pid=$(head -n1 $LOCK_FILE) + if ! ps $pid 1>/dev/null; then rm -f $LOCK_FILE + else + echo "PROJECT directory is locked, sleeping for 10 seconds..." + sleep 10 + fi + done +} + +lock_workspace() { + wait_for_lock + echo $$ > $LOCK_FILE +} + +unlock_workspace() { + rm -f $LOCK_FILE +} + ### MAIN ### set_vars $@ && { if [ "x$(basename $0)" = "x$PREFIX-build-rpm-package" ] || [ "x$(basename $0)" = "x$PREFIX-build+upload-rpm-package" ]; then cd $PROJECT_DIR && pkgneedsbuild $CHECKOUT || [ "$FORCE_BUILD" = "yes" ] && { + lock_workspace prepare_workspace && { + unlock_workspace clear_pkgdist build_packages } + unlock_workspace } fi if [ "x$(basename $0)" = "x$PREFIX-upload-rpm-package" ] || [ "x$(basename $0)" = "x$PREFIX-build+upload-rpm-package" ]; then hooks/post-receive -- buildscripts.git (X2Go packaging scripts) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "buildscripts.git" (X2Go packaging scripts).