This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository maintenancescripts. from 6286298 git/hooks/update: make script generic to be used as update and update-merge (via symlink name). The latter name will allow merges. Use common.sh. new bd94bdf git/hooks/update: fix X2go -> X2Go. new 62dad3a git/hooks: remove redundant update._code.x2go.org_ file. new 17f1f9f git/hooks/common.sh: fix typo in conditional command. new e25a06f git/hooks/common.sh: add umask command, verbose variable, make_boolean() function, grant() function and set GLOBIGNORE special bash variable. new 21764ab git/hooks/update-script._grant_: use common.sh. new c906bf3 git/hooks/common.sh: fix bug in common.sh: also use basename to retrieve project name for non-bare archives. new f71d538 git/hooks/common.sh: add info() function. new 8993cca git/hooks/x2go-post-receive-close-bugs: use common.sh. new 6d2ce2f git/hooks/x2go-post-receive-close-bugs: change tabs to spaces, add quoting and curly braces around variables in big block. new b02a6f1 git/hooks/x2go-post-receive-close-bugs: more curly braces, quoting and backtick to $() changes. The 10 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: git/hooks/common.sh | 38 +++++++++- git/hooks/update | 2 +- git/hooks/update-script._grant_ | 15 +--- git/hooks/update._code.x2go.org_ | 9 --- git/hooks/x2go-post-receive-close-bugs | 120 +++++++++++++++----------------- 5 files changed, 98 insertions(+), 86 deletions(-) delete mode 100755 git/hooks/update._code.x2go.org_ -- Alioth's /srv/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 17f1f9f7e1fc93626ab75b94ecadec8f021c1ef5 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 21:04:27 2015 +0100 git/hooks/common.sh: fix typo in conditional command. --- 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 d40f2a7..1cd8118 100755 --- a/git/hooks/common.sh +++ b/git/hooks/common.sh @@ -1,6 +1,6 @@ #!/bin/bash -if [[ "$(git rev-parse --is-bare-directory)" = "true" ]] then +if [ "$(git rev-parse --is-bare-directory)" = "true" ]; then GIT_REPO_NAME="$(basename "${PWD}")" OUTSIDE_REPO="/../" else -- Alioth's /srv/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 bd94bdf6bf4173b086bdb6edab77d381db100bcf Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 20:45:18 2015 +0100 git/hooks/update: fix X2go -> X2Go. --- git/hooks/update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/hooks/update b/git/hooks/update index e06d6d9..cfdc956 100755 --- a/git/hooks/update +++ b/git/hooks/update @@ -1,6 +1,6 @@ #!/bin/bash # -# Update hook for X2go Git projects +# Update hook for X2Go Git projects # . hooks/common.sh -- Alioth's /srv/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 62dad3a4a1d03a70f5a862c0ec30c63f4e5d1dc9 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 20:45:50 2015 +0100 git/hooks: remove redundant update._code.x2go.org_ file. --- git/hooks/update._code.x2go.org_ | 9 --------- 1 file changed, 9 deletions(-) diff --git a/git/hooks/update._code.x2go.org_ b/git/hooks/update._code.x2go.org_ deleted file mode 100755 index c4fdc78..0000000 --- a/git/hooks/update._code.x2go.org_ +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -# -# Update hook for X2go Git projects -# - -. /srv/git/_hooks_/update-script._check_ -#. /srv/git/_hooks_/update-script._branches+tags_ -#. /srv/git/_hooks_/update-script._acl_ -. /srv/git/_hooks_/update-script._grant_ -- Alioth's /srv/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 e25a06f8d7e2fcb1da8c435e4c75896724dc4f7c Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 21:06:04 2015 +0100 git/hooks/common.sh: add umask command, verbose variable, make_boolean() function, grant() function and set GLOBIGNORE special bash variable. --- git/hooks/common.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/git/hooks/common.sh b/git/hooks/common.sh index 1cd8118..f973c5c 100755 --- a/git/hooks/common.sh +++ b/git/hooks/common.sh @@ -1,5 +1,7 @@ #!/bin/bash +umask 002 + if [ "$(git rev-parse --is-bare-directory)" = "true" ]; then GIT_REPO_NAME="$(basename "${PWD}")" OUTSIDE_REPO="/../" @@ -10,3 +12,30 @@ fi # GIT_DIR will always be the current repository's .git dir. GIT_DIR="$(pwd)" + +function make_boolean() { + OPTION="${1}" + + case "${OPTION}" in + ("0"|"no"|""|"No"|"nO"|"NO"|"false"|"FALSE") OPTION="0";; + (*) OPTION="1";; + esac + + printf "${OPTION}" +} + +# If you are having trouble with any access control hook script +# you can try setting this to true. It will tell you exactly +# why a user is being allowed/denied access. +# This setting may be overridden in specific scripts. + +verbose="1" + +# Default shell globbing messes things up downstream. +GLOBIGNORE=* + +function grant() { + [ "$(make_boolean "${verbose}")" = "1" ] && echo "-Grant- ${1}" >&2 + echo grant + exit 0 +} -- Alioth's /srv/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 21764ab1c1a46123857915c2e0ae000e5aee11ae Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 21:07:04 2015 +0100 git/hooks/update-script._grant_: use common.sh. --- git/hooks/update-script._grant_ | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/git/hooks/update-script._grant_ b/git/hooks/update-script._grant_ index eec2d2b..fb3c2c1 100755 --- a/git/hooks/update-script._grant_ +++ b/git/hooks/update-script._grant_ @@ -1,20 +1,11 @@ #!/bin/bash -umask 002 -x +. hooks/common.sh # If you are having trouble with this access control hook script # you can try setting this to true. It will tell you exactly # why a user is being allowed/denied access. -verbose=true +verbose="1" -# Default shell globbing messes things up downstream -GLOBIGNORE=* - -function grant { - $verbose && echo >&2 "-Grant- $1" - echo grant - exit 0 -} - -grant "Granting access." \ No newline at end of file +grant "Granting access." -- Alioth's /srv/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 c906bf3eda93a27118e50c48a3f2eebe36716295 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 21:26:55 2015 +0100 git/hooks/common.sh: fix bug in common.sh: also use basename to retrieve project name for non-bare archives. --- 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 f973c5c..9cf0882 100755 --- a/git/hooks/common.sh +++ b/git/hooks/common.sh @@ -6,7 +6,7 @@ if [ "$(git rev-parse --is-bare-directory)" = "true" ]; then GIT_REPO_NAME="$(basename "${PWD}")" OUTSIDE_REPO="/../" else - GIT_REPO_NAME="$(readlink -nf "${PWD}/..")" + GIT_REPO_NAME="$(basename "$(readlink -nf "${PWD}/..")")" OUTSIDE_REPO="/../../" fi -- Alioth's /srv/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 f71d5385daec8aee83ccea8eef890a298a837140 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 21:27:58 2015 +0100 git/hooks/common.sh: add info() function. --- git/hooks/common.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/git/hooks/common.sh b/git/hooks/common.sh index 9cf0882..e5b2f21 100755 --- a/git/hooks/common.sh +++ b/git/hooks/common.sh @@ -39,3 +39,8 @@ function grant() { echo grant exit 0 } + +function info() { + [ "$(make_boolean "${verbose}")" = "1" ] && echo "-Info- ${1}" >&2 +} + -- Alioth's /srv/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 8993cca33a0a52fa04f53d2f85226fe205c1c095 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 21:29:00 2015 +0100 git/hooks/x2go-post-receive-close-bugs: use common.sh. --- git/hooks/x2go-post-receive-close-bugs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/git/hooks/x2go-post-receive-close-bugs b/git/hooks/x2go-post-receive-close-bugs index b666a49..4ff4478 100755 --- a/git/hooks/x2go-post-receive-close-bugs +++ b/git/hooks/x2go-post-receive-close-bugs @@ -16,21 +16,16 @@ # post-receive's stdin, you can use pee(1), from the moreutils package. # No configuration is necessary. +. hooks/common.sh + set -e set -u -verbose=true - -function info { - $verbose && echo >&2 "-Info- $1" -} +verbose="1" -REPODIR=`readlink -f "$PWD"` -REPOREL=${REPODIR#/srv/git/code.x2go.org/} -BASEURL="http://code.x2go.org/gitweb?p=$REPOREL" +BASEURL="http://code.x2go.org/gitweb?p=${GIT_REPO_NAME}" -PROJECT=${REPOREL//.git/} -PROJECT=$(basename $PROJECT) +PROJECT="${GIT_REPO_NAME//.git/}" tempdir=`mktemp -d` trap "rm -rf \"${tempdir}\"" EXIT -- Alioth's /srv/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 6d2ce2fff0e86dbebfd9a95ec3e1e95c18b52f16 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 21:30:20 2015 +0100 git/hooks/x2go-post-receive-close-bugs: change tabs to spaces, add quoting and curly braces around variables in big block. --- git/hooks/x2go-post-receive-close-bugs | 61 ++++++++++++++++---------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/git/hooks/x2go-post-receive-close-bugs b/git/hooks/x2go-post-receive-close-bugs index 4ff4478..28217c9 100755 --- a/git/hooks/x2go-post-receive-close-bugs +++ b/git/hooks/x2go-post-receive-close-bugs @@ -77,37 +77,38 @@ EOF cat "$diff") | /usr/sbin/sendmail -oi -t } +## FIXME ## really go through this some time... while read oldrev newrev refname; do - if echo $refname | egrep "refs/tags/" >/dev/null; then - # find the last tag on this branch - tag=${refname/refs\/tags\//} - oldrev=$(git rev-parse $tag)^ - # rewind back from current ref back to the previous tag we find - while ! git describe $oldrev --exact-match 2>/dev/null; do oldrev=${oldrev}^; done - oldrev=$(git rev-parse $oldrev) - oldtag=$(git tag --contains $oldrev | head -n1) - - c="$tempdir/$newrev.changelog" - d="$tempdir/$newrev.diff" - - git show ${newrev}:debian/changelog >"$c" 2>/dev/null - cat "$c" | sed 's/Fixes:/Closes:/i' | dpkg-parsechangelog -l- | sed 's/Closes:/Fixes:/i' | - sed -e 's/^Source: /X2Go Component: src:/' \ - -e 's/-0~x2go[0-9]//' \ - -e 's/-0$//' \ - -e 's/^Distribution: unstable/Status: RELEASE/' \ - -e 's/ unstable;/ RELEASED;/' \ - -e 's/^Distribution: UNRELEASED/Status: PREVIEW/' \ - -e 's/ UNRELEASED;/ PREVIEW;/' \ - | egrep -v "^(Urgency:|Maintainer:).*" > "$d" - #git diff ${oldrev}..${newrev} -- debian/changelog >"$d" - version=`cat "$c" | sed 's/Fixes:/Closes:/i' | dpkg-parsechangelog -l- | sed -rne 's/^Version: *//pi' -e 's/[0-9]+://' | cut -d"-" -f1` - bugs=`cat "$c" | sed 's/Fixes:/Closes:/i' | dpkg-parsechangelog -l- | sed -rne 's/^Closes: *//pi'` - for bug in $bugs; do - info "Marking X2Go issue #$bug as resolved/closed." - send_mail $bug "$version" "$oldrev" "$newrev" "$d" - done - fi + if echo "${refname}" | egrep "refs/tags/" >/dev/null; then + # find the last tag on this branch + tag="${refname/refs\/tags\//}" + oldrev="$(git rev-parse "${tag}")^" + # rewind back from current ref back to the previous tag we find + while ! git describe "${oldrev}" --exact-match 2>/dev/null; do oldrev="${oldrev}^"; done + oldrev="$(git rev-parse "${oldrev}")" + oldtag="$(git tag --contains "${oldrev}" | head -n1)" + + c="${tempdir}/${newrev}.changelog" + d="${tempdir}/${newrev}.diff" + + git show "${newrev}:debian/changelog" >"${c}" 2>/dev/null + cat "${c}" | sed 's/Fixes:/Closes:/i' | dpkg-parsechangelog -l- | sed 's/Closes:/Fixes:/i' | + sed -e 's/^Source: /X2Go Component: src:/' \ + -e 's/-0~x2go[0-9]//' \ + -e 's/-0$//' \ + -e 's/^Distribution: unstable/Status: RELEASE/' \ + -e 's/ unstable;/ RELEASED;/' \ + -e 's/^Distribution: UNRELEASED/Status: PREVIEW/' \ + -e 's/ UNRELEASED;/ PREVIEW;/' \ + | egrep -v "^(Urgency:|Maintainer:).*" > "${d}" + #git diff "${oldrev}..${newrev}" -- "debian/changelog" >"${d}" + version="$(cat "${c}" | sed 's/Fixes:/Closes:/i' | dpkg-parsechangelog -l- | sed -rne 's/^Version: *//pi' -e 's/[0-9]+://' | cut -d"-" -f1)" + bugs="$(cat "${c}" | sed 's/Fixes:/Closes:/i' | dpkg-parsechangelog -l- | sed -rne 's/^Closes: *//pi')" + for bug in ${bugs}; do + info "Marking X2Go issue #${bug} as resolved/closed." + send_mail "${bug}" "${version}" "${oldrev}" "${newrev}" "${d}" + done + fi done # vi: et -- Alioth's /srv/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 b02a6f19dcce7edbd3e9b55122df2008d73acdec Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 21:34:34 2015 +0100 git/hooks/x2go-post-receive-close-bugs: more curly braces, quoting and backtick to $() changes. --- git/hooks/x2go-post-receive-close-bugs | 44 ++++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/git/hooks/x2go-post-receive-close-bugs b/git/hooks/x2go-post-receive-close-bugs index 28217c9..24ae34a 100755 --- a/git/hooks/x2go-post-receive-close-bugs +++ b/git/hooks/x2go-post-receive-close-bugs @@ -27,45 +27,45 @@ BASEURL="http://code.x2go.org/gitweb?p=${GIT_REPO_NAME}" PROJECT="${GIT_REPO_NAME//.git/}" -tempdir=`mktemp -d` +tempdir="$(mktemp -d)" trap "rm -rf \"${tempdir}\"" EXIT -send_mail() { # send_mail bugno revno diff_file - local bug="$1" - local fixed_in_version="$2" - local oldrev="$3" - local newrev="$4" - local diff="$5" - local from=$(git show -s --pretty='format:%cn <%ce>' `git rev-parse --verify ${newrev}^{commit}` | - perl -CI -MEncode -e 'print Encode::encode("MIME-Q", <STDIN>)') +function send_mail() { # send_mail bugno revno diff_file + local bug="${1}" + local fixed_in_version="${2}" + local oldrev="${3}" + local newrev="${4}" + local diff="${5}" + local from="$(git show -s --pretty='format:%cn <%ce>' "$(git rev-parse --verify "${newrev}^{commit}")" | + perl -CI -MEncode -e 'print Encode::encode("MIME-Q", <STDIN>)')" (cat <<EOF -From: $from -To: $bug-submitter@bugs.x2go.org -Cc: control@bugs.x2go.org, $bug@bugs.x2go.org -Subject: X2Go issue (in src:$PROJECT) has been marked as closed +From: ${from} +To: ${bug}-submitter@bugs.x2go.org +Cc: control@bugs.x2go.org, ${bug}@bugs.x2go.org +Subject: X2Go issue (in src:${PROJECT}) has been marked as closed Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit -close #$bug +close #${bug} thanks Hello, -we are very hopeful that X2Go issue #$bug reported by you -has been resolved in the new release ($version) of the -X2Go source project »src:$PROJECT«. +we are very hopeful that X2Go issue #${bug} reported by you +has been resolved in the new release (${version}) of the +X2Go source project »src:${PROJECT}«. -You can view the complete changelog entry of src:$PROJECT ($version) +You can view the complete changelog entry of src:${PROJECT} (${version}) below, and you can use the following link to view all the code changes -between this and the last release of src:$PROJECT. +between this and the last release of src:${PROJECT}. - ${BASEURL};a=commitdiff;h=$(git rev-parse $newrev);hp=$(git rev-parse $oldrev) + ${BASEURL};a=commitdiff;h=$(git rev-parse ${newrev});hp=$(git rev-parse ${oldrev}) If you feel that the issue has not been resolved satisfyingly, feel free to reopen this bug report or submit a follow-up report with further observations described based on the new released version -of src:$PROJECT. +of src:${PROJECT}. Thanks a lot for contributing to X2Go!!! @@ -74,7 +74,7 @@ X2Go Git Admin (on behalf of the sender of this mail) --- EOF - cat "$diff") | /usr/sbin/sendmail -oi -t + cat "${diff}") | /usr/sbin/sendmail -oi -t } ## FIXME ## really go through this some time... -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git