This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository maintenancescripts. from 0a4d762 git/hooks/post-receive: fix execution. All of these scripts are strictly bash scripts, don't use /bin/sh. new 7474d77 common: use 'my-style' curly braces everywhere. new 3ce2087 git/hooks/common.sh: fix bad hooks error: it's git rev-parse --is-bare-repository, not git rev-parse --is-bare-directory. The 2 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/killstalevms.bash | 34 ++++++++++++------------ git/hooks/common.sh | 2 +- git/hooks/update-script._branches+tags_ | 44 +++++++++++++++---------------- git/hooks/update-script._check_ | 18 ++++++------- git/hooks/x2go-post-receive-tag-pending | 2 +- 5 files changed, 50 insertions(+), 50 deletions(-) -- Alioth's /srv/git/code.x2go.org/maintenancescripts.git//../..//_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository maintenancescripts. commit 7474d7747e6e041864b97473c709125ce077eeb9 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Mar 4 23:22:02 2015 +0100 common: use 'my-style' curly braces everywhere. --- bin/killstalevms.bash | 34 ++++++++++++------------ git/hooks/update-script._branches+tags_ | 44 +++++++++++++++---------------- git/hooks/update-script._check_ | 18 ++++++------- git/hooks/x2go-post-receive-tag-pending | 2 +- 4 files changed, 49 insertions(+), 49 deletions(-) diff --git a/bin/killstalevms.bash b/bin/killstalevms.bash index fb3956f..3624703 100755 --- a/bin/killstalevms.bash +++ b/bin/killstalevms.bash @@ -14,30 +14,30 @@ done < <(pgrep -f -u root '^kvm.*pbuilder.*qemu.*') typeset -a BUILDER_LIST for ((i = 0; i < ${#VM_LIST[@]}; ++i)); do - BUILDER_LIST[$i]="$(perl -pe 's/.*?qemu\.(\d+)\.dev.*/\1/' < /proc/${VM_LIST[$i]}/cmdline)" + BUILDER_LIST[${i}]="$(perl -pe 's/.*?qemu\.(\d+)\.dev.*/\1/' < /proc/${VM_LIST[${i}]}/cmdline)" done typeset -a COMPONENT_LIST BRANCH_LIST SYSTEM_LIST SYSTEM_VERSION_LIST ARCH_LIST VERSION_LIST for ((i = 0; i < ${#BUILDER_LIST[@]}; ++i)); do - TMP_CMDLINE="/proc/${BUILDER_LIST[$i]}/cmdline" - BRANCH_LIST[$i]="$(perl -pe 's#.*?/pkg-dist/(.*?)/.*#\1#' "${TMP_CMDLINE}")" - COMPONENT_LIST[$i]="$(perl -pe 's#.*?/pkg-dist/.*?/(.*?)/.*#\1#' "${TMP_CMDLINE}")" - SYSTEM_LIST[$i]="$(perl -pe 's#.*?/pkg-dist/.*?/.*?/(.*?)/.*#\1#' "${TMP_CMDLINE}")" - SYSTEM_VERSION_LIST[$i]="$(perl -pe 's#.*?/pkg-dist/.*?/.*?/.*?/(.*?)/.*#\1#' "${TMP_CMDLINE}")" - ARCH_LIST[$i]="$(perl -pe 's#.*?/pkg-dist/.*?/.*?/.*?/.*?/(.*?)\0.*#\1#' "${TMP_CMDLINE}")" - VERSION_LIST[$i]="$(perl -pe "s#.*?/${COMPONENT_LIST[$i]}_([\d.]+)-.*#\1#" "${TMP_CMDLINE}")" + TMP_CMDLINE="/proc/${BUILDER_LIST[${i}]}/cmdline" + BRANCH_LIST[${i}]="$(perl -pe 's#.*?/pkg-dist/(.*?)/.*#\1#' "${TMP_CMDLINE}")" + COMPONENT_LIST[${i}]="$(perl -pe 's#.*?/pkg-dist/.*?/(.*?)/.*#\1#' "${TMP_CMDLINE}")" + SYSTEM_LIST[${i}]="$(perl -pe 's#.*?/pkg-dist/.*?/.*?/(.*?)/.*#\1#' "${TMP_CMDLINE}")" + SYSTEM_VERSION_LIST[${i}]="$(perl -pe 's#.*?/pkg-dist/.*?/.*?/.*?/(.*?)/.*#\1#' "${TMP_CMDLINE}")" + ARCH_LIST[${i}]="$(perl -pe 's#.*?/pkg-dist/.*?/.*?/.*?/.*?/(.*?)\0.*#\1#' "${TMP_CMDLINE}")" + VERSION_LIST[${i}]="$(perl -pe "s#.*?/${COMPONENT_LIST[${i}]}_([\d.]+)-.*#\1#" "${TMP_CMDLINE}")" done printf "Currently running VMs:\n\n" for ((i = 0; i < ${#BUILDER_LIST[@]}; ++i)); do - echo "$i:" - echo " PID: ${VM_LIST[$i]}" - echo " Component: ${COMPONENT_LIST[$i]}" - echo " Version: ${VERSION_LIST[$i]}" - echo " OS: ${SYSTEM_LIST[$i]} -- ${SYSTEM_VERSION_LIST[$i]} -- ${ARCH_LIST[$i]}" - echo " Branch: ${BRANCH_LIST[$i]}" + echo "${i}:" + echo " PID: ${VM_LIST[${i}]}" + echo " Component: ${COMPONENT_LIST[${i}]}" + echo " Version: ${VERSION_LIST[${i}]}" + echo " OS: ${SYSTEM_LIST[${i}]} -- ${SYSTEM_VERSION_LIST[${i}]} -- ${ARCH_LIST[${i}]}" + echo " Branch: ${BRANCH_LIST[${i}]}" echo done @@ -45,15 +45,15 @@ RESULT="0" while [ "${RESULT}" -eq "0" ]; do typeset -a DIALOGMENU=() for ((i = 0; i < ${#BUILDER_LIST[@]}; ++i)); do - DIALOGMENU+=("$i" "${VM_LIST[$i]}: ${COMPONENT_LIST[$i]} (${VERSION_LIST[$i]}) for ${BRANCH_LIST[$i]}") + DIALOGMENU+=("${i}" "${VM_LIST[${i}]}: ${COMPONENT_LIST[${i}]} (${VERSION_LIST[${i}]}) for ${BRANCH_LIST[${i}]}") done MOREINFO=$(dialog --menu "Select VM to kill" 0 0 10 "${DIALOGMENU[@]}" 2>&1 >/dev/tty) - RESULT="$?" + RESULT="${?}" if [ "${RESULT}" -eq "0" ]; then dialog --yesno "PID: ${VM_LIST[${MOREINFO}]}\nComponent: ${COMPONENT_LIST[${MOREINFO}]}\nVersion: ${VERSION_LIST[${MOREINFO}]}\nOS: ${SYSTEM_LIST[${MOREINFO}]} -- ${SYSTEM_VERSION_LIST[${MOREINFO}]} -- ${ARCH_LIST[${MOREINFO}]}\nBranch: ${BRANCH_LIST[${MOREINFO}]}\n\nPlease check that this job is currently not being actively executed by Jenkins!\n\nAre you sure you want to kill this process?" 0 0 - RESULT="$?" + RESULT="${?}" if [ "${RESULT}" -eq "0" ]; then echo kill -9 "${VM_LIST[${MOREINFO}]}" diff --git a/git/hooks/update-script._branches+tags_ b/git/hooks/update-script._branches+tags_ index 972803c..23f761b 100755 --- a/git/hooks/update-script._branches+tags_ +++ b/git/hooks/update-script._branches+tags_ @@ -25,20 +25,20 @@ # # --- Command line -refname="$1" -oldrev="$2" -newrev="$3" +refname="${1}" +oldrev="${2}" +newrev="${3}" # --- Safety check -if [ -z "$GIT_DIR" ]; then +if [ -z "${GIT_DIR}" ]; then echo "Don't run this script from the command line." >&2 echo " (if you want, you could supply GIT_DIR then run" >&2 - echo " $0 <ref> <oldrev> <newrev>)" >&2 + echo " ${0} <ref> <oldrev> <newrev>)" >&2 exit 1 fi -if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then - echo "Usage: $0 <ref> <oldrev> <newrev>" >&2 +if [ -z "${refname}" -o -z "${oldrev}" -o -z "${newrev}" ]; then + echo "Usage: ${0} <ref> <oldrev> <newrev>" >&2 exit 1 fi @@ -50,8 +50,8 @@ allowdeletetag=$(git config --bool hooks.allowdeletetag) allowmodifytag=$(git config --bool hooks.allowmodifytag) # check for no description -projectdesc=$(sed -e '1q' "$GIT_DIR/description") -case "$projectdesc" in +projectdesc=$(sed -e '1q' "${GIT_DIR}/description") +case "${projectdesc}" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 @@ -59,50 +59,50 @@ case "$projectdesc" in esac # --- Check types -# if $newrev is 0000...0000, it's a commit to delete a ref. +# if ${newrev} is 0000...0000, it's a commit to delete a ref. zero="0000000000000000000000000000000000000000" -if [ "$newrev" = "$zero" ]; then +if [ "${newrev}" = "${zero}" ]; then newrev_type=delete else - newrev_type=$(git-cat-file -t $newrev) + newrev_type=$(git-cat-file -t ${newrev}) fi -case "$refname","$newrev_type" in +case "${refname}","${newrev_type}" in refs/tags/*,commit) # un-annotated tag short_refname=${refname##refs/tags/} - if [ "$allowunannotated" != "true" ]; then - echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 + if [ "${allowunannotated}" != "true" ]; then + echo "*** The un-annotated tag, ${short_refname}, is not allowed in this repository" >&2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag - if [ "$allowdeletetag" != "true" ]; then + if [ "${allowdeletetag}" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag - if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + if [ "${allowmodifytag}" != "true" ] && git rev-parse ${refname} > /dev/null 2>&1 then - echo "*** Tag '$refname' already exists." >&2 + echo "*** Tag '${refname}' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch - if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + if [ "${oldrev}" = "${zero}" -a "${denycreatebranch}" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch - if [ "$allowdeletebranch" != "true" ]; then + if [ "${allowdeletebranch}" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi @@ -112,14 +112,14 @@ case "$refname","$newrev_type" in ;; refs/remotes/*,delete) # delete tracking branch - if [ "$allowdeletebranch" != "true" ]; then + if [ "${allowdeletebranch}" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) - echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + echo "*** Update hook: unknown type of update to ref ${refname} of type ${newrev_type}" >&2 exit 1 ;; esac diff --git a/git/hooks/update-script._check_ b/git/hooks/update-script._check_ index cbca29f..19ae208 100755 --- a/git/hooks/update-script._check_ +++ b/git/hooks/update-script._check_ @@ -8,24 +8,24 @@ if [ -z "${UPDATE_DONE}" ]; then MERGE="0" [ "$(basename "${0}")" = "update-script_check+allow-merges_" ] && MERGE="1" - case "$1" in + case "${1}" in (refs/tags/*) - [ -f "$GIT_DIR/$1" ] && deny >/dev/null "You can't overwrite an existing tag" + [ -f "${GIT_DIR}/${1}" ] && deny >/dev/null "You can't overwrite an existing tag" ;; (refs/heads/*) BRANCH="${1#refs/heads/}" # No rebasing or rewinding on release, build or master branches. - if expr "$2" : '0*$' >/dev/null; then + if expr "${2}" : '0*$' >/dev/null; then case "${BRANCH}" in - (release/*|build-*|master|feature/*|bugfix/*) info "The branch '$1' is new..." ;; + (release/*|build-*|master|feature/*|bugfix/*) info "The branch '${1}' is new..." ;; (*) deny >/dev/null "ERROR: Branch name does not meet the project policies. Please contact git-admin@x2go.org." ;; esac else case "${BRANCH}" in (release/*|build-*|master) # updating -- check for merge commit and deny or warn - [ -n "$(git rev-list --merges $2..$3)" ] && { + [ -n "$(git rev-list --merges "${2}..${3}")" ] && { if [ "${MERGE}" = "0" ]; then deny > /dev/null "ERROR: update contains a merge." else @@ -34,9 +34,9 @@ if [ -z "${UPDATE_DONE}" ]; then } # updating -- make sure it is a fast forward - mb="$(git merge-base "$2" "$3")" - case "$mb,$2" in - ("$2,$mb") info "Update is fast-forward" ;; + mb="$(git merge-base "${2}" "${3}")" + case "${mb},${2}" in + ("${2},${mb}") info "Update is fast-forward" ;; (*) deny > /dev/null "ERROR: This is not a fast-forward update. History has been rewritten." ;; esac ;; @@ -44,7 +44,7 @@ if [ -z "${UPDATE_DONE}" ]; then (*) deny >/dev/null "ERROR: Branch name does not meet the project policies. Please contact git-admin@x2go.org." ;; esac fi - for REVISION in $(git rev-list --reverse "$2..$3") ; do + for REVISION in $(git rev-list --reverse "${2}..${3}") ; do # Make sure that the log message contains some text. check_log_message diff --git a/git/hooks/x2go-post-receive-tag-pending b/git/hooks/x2go-post-receive-tag-pending index 8932477..b79ffbb 100755 --- a/git/hooks/x2go-post-receive-tag-pending +++ b/git/hooks/x2go-post-receive-tag-pending @@ -56,7 +56,7 @@ X2Go issue #${bug} (src:${PROJECT}) reported by you has been fixed in X2Go Git. You can see the changelog below, and you can check the diff of the fix at: - ${BASEURL};a=commitdiff;h=$(git show -s --pretty='format:%h' "$rev") + ${BASEURL};a=commitdiff;h=$(git show -s --pretty='format:%h' "${rev}") The issue will most likely be fixed in src:${PROJECT} (${version}). -- Alioth's /srv/git/code.x2go.org/maintenancescripts.git//../..//_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository maintenancescripts. commit 3ce20871ea6cca2332713707dcbed70c20677a13 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Mar 4 23:22:59 2015 +0100 git/hooks/common.sh: fix bad hooks error: it's git rev-parse --is-bare-repository, not git rev-parse --is-bare-directory. --- git/hooks/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/hooks/common.sh b/git/hooks/common.sh index c350386..9079bf3 100755 --- a/git/hooks/common.sh +++ b/git/hooks/common.sh @@ -2,7 +2,7 @@ umask 002 -if [ "$(git rev-parse --is-bare-directory)" = "true" ]; then +if [ "$(git rev-parse --is-bare-repository)" = "true" ]; then GIT_REPO_NAME="$(basename "${PWD}")" OUTSIDE_REPO="/../" else -- Alioth's /srv/git/code.x2go.org/maintenancescripts.git//../..//_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git