This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository buildscripts. from a6bf0b9 bin/build-rpm-package: add some boilerplate code for reading in config files. new 6ffb5a5 bin/build-rpm-package: save old input field separator value and re-set to newline only. new 2b13ca6 bin/build-rpm-package: populate arrays with data read from .repo files. new a4926c2 bin/build-rpm-package: use single quotes where more appropriate for regex variables, escape single dollar sign in double quoted regex variable strings. new dec04af bin/build-rpm-package: add (incomplete) attempt at parsing the base mock config file. new b00b97e bin/build-rpm-package: add the repos and do pass-through correctly. new 5a7b10e bin/build-rpm-package: write out end of yum configuration marker, reset IFS to old value and return temporary file path as promised. new c35447b bin/build-rpm-package: rename RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME to RPM_EXTRA_REPO_MOCK_CONFIG_BASE. The 7 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-rpm-package | 79 +++++++++++++++++++++++++++++++++++++----- home/.buildscripts/x2go.conf | 2 +- 2 files changed, 72 insertions(+), 9 deletions(-) -- 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 6ffb5a53faf63f828bbe7cbbda14c9d875a61bde Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Apr 1 07:52:00 2015 +0200 bin/build-rpm-package: save old input field separator value and re-set to newline only. --- bin/build-rpm-package | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index f088bb9..ba4c23b 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -302,6 +302,10 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET exit -1 fi + # Save old input field separator value and set it to newline only. + OLDIFS="${IFS}" + IFS="$(printf '\n')" + # Fetch the requested lines from ${CUSTOM_REPO} and store them in an array. typeset -a extra_repo typeset -i FETCH_SECTION=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 2b13ca64c90372ffb28d2565fb13447240ced016 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Apr 1 07:52:36 2015 +0200 bin/build-rpm-package: populate arrays with data read from .repo files. --- bin/build-rpm-package | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index ba4c23b..44384bd 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -306,11 +306,32 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET OLDIFS="${IFS}" IFS="$(printf '\n')" - # Fetch the requested lines from ${CUSTOM_REPO} and store them in an array. + # Fetch the requested lines from ${CUSTOM_REPO} and store them in arrays. typeset -a extra_repo - typeset -i FETCH_SECTION=0 + typeset -a full_repo + typeset -i FETCH_EXTRA_SECTION=0 + typeset -i FETCH_FULL_SECTION=0 + TMP_REGEX_EXTRA="^[[:space:]]*\[[[:space:]]*${RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME}-extras-${DISTRO}[[:space:]]*\][[:space:]]*$" + TMP_REGEX_FULL="^[[:space:]]*\[[[:space:]]*${RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME}-${COMPONENT}-${DISTRO}[[:space:]]*\][[:space:]]*$" + TMP_REGEX_OTHER="^[[:space:]]*\[.*\][[:space:]]*$" + while read line; do + if [[ "${line}" =~ ${TMP_REGEX_EXTRA} ]]; then + FETCH_EXTRA_SECTION=1 + FETCH_FULL_SECTION=0 + elif [[ "${line}" =~ ${TMP_REGEX_FULL} ]]; then + FETCH_FULL_SECTION=1 + FETCH_EXTRA_SECTION=0 + elif [[ "${line}" =~ ${TMP_REGEX_OTHER} ]]; then + FETCH_FULL_SECTION=0 + FETCH_EXTRA_SECTION=0 + fi + if [ "${FETCH_EXTRA_SECTION}" -eq "1" ]; then + extra_repo+=("${line}") + elif [ "${FETCH_FULL_SECTION}" -eq "1" ]; then + full_repo+=("${line}") + fi done < "/etc/mock/${CUSTOM_REPO}" typeset -i REPO_START=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 a4926c29ecd09ab655a2dff35af057334ad67d81 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Apr 1 08:14:17 2015 +0200 bin/build-rpm-package: use single quotes where more appropriate for regex variables, escape single dollar sign in double quoted regex variable strings. --- bin/build-rpm-package | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 44384bd..4d8676c 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -265,7 +265,7 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET done typeset DISTRO="" - typeset TMP_REGEX="^([[:alpha:]]+)-[[:alnum:]]+-[[:alnum:]].cfg$" + typeset TMP_REGEX='^([[:alpha:]]+)-[[:alnum:]]+-[[:alnum:]].cfg$' # distribution - version - arch if [[ ! "${MOCK_BASE}" =~ ${TMP_REGEX} ]]; then echo "Error: MOCK_BASE parameter not well formed. Must be: 'distro-version-arch.cfg'." >&2 @@ -311,9 +311,9 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET typeset -a full_repo typeset -i FETCH_EXTRA_SECTION=0 typeset -i FETCH_FULL_SECTION=0 - TMP_REGEX_EXTRA="^[[:space:]]*\[[[:space:]]*${RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME}-extras-${DISTRO}[[:space:]]*\][[:space:]]*$" - TMP_REGEX_FULL="^[[:space:]]*\[[[:space:]]*${RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME}-${COMPONENT}-${DISTRO}[[:space:]]*\][[:space:]]*$" - TMP_REGEX_OTHER="^[[:space:]]*\[.*\][[:space:]]*$" + typeset TMP_REGEX_EXTRA="^[[:space:]]*\[[[:space:]]*${RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME}-extras-${DISTRO}[[:space:]]*\][[:space:]]*\$" + typeset TMP_REGEX_FULL="^[[:space:]]*\[[[:space:]]*${RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME}-${COMPONENT}-${DISTRO}[[:space:]]*\][[:space:]]*\$" + typeset TMP_REGEX_OTHER='^[[:space:]]*\[.*\][[:space:]]*$' while read line; do if [[ "${line}" =~ ${TMP_REGEX_EXTRA} ]]; 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 dec04afb6d38cf62c12fbfdd72b7fb8fc12d27bc Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Apr 1 08:15:08 2015 +0200 bin/build-rpm-package: add (incomplete) attempt at parsing the base mock config file. --- bin/build-rpm-package | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 4d8676c..1db9c77 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -335,8 +335,22 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET done < "/etc/mock/${CUSTOM_REPO}" typeset -i REPO_START=0 + TMP_REGEX='^[[:space:]]*config_opts\['"'"'yum\.conf'"'"'\][[:space:]]*=[[:space:]]*"""[[:space:]]*$' + typeset TMP_REGEX_END='^[[:space:]]*"""[[:space:]]*$' + while read line; do + if [[ "${line}" =~ ${TMP_REGEX} ]]; then + REPO_START=1 + elif [ "${REPO_START}" -eq "1" ] && [[ "${line}" =~ ${TMP_REGEX_END} ]]; then + # Time to insert whatever is required. + elif [ "${REPO_START}" -eq "0" ] && [[ "${line}" =~ ${TMP_REGEX_END} ]]; then + echo "Error: Parsing mock base config file failed: unexpected end of yum configuration, no start found." >&2 + exit -1 + elif [ "${REPO_START}" -eq "0" ]; then + # Write-through. + echo "${line}" >> "${TMP_MOCK_CFG_FILE}" + fi done < "/etc/mock/${MOCK_BASE}" } -- 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 b00b97e3ea1d3279c772321a92fea3139ba76d47 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Apr 1 08:27:58 2015 +0200 bin/build-rpm-package: add the repos and do pass-through correctly. --- bin/build-rpm-package | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 1db9c77..8409321 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -343,11 +343,27 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET REPO_START=1 elif [ "${REPO_START}" -eq "1" ] && [[ "${line}" =~ ${TMP_REGEX_END} ]]; then # Time to insert whatever is required. + printf '\n' >> "${TMP_MOCK_CFG_FILE}" + # Extras repo. + typeset -i i=0 + for ((i = 0; i < ${#extra_repo[@]}; ++i)); do + echo "${extra_repo[${i}]}" >> "${TMP_MOCK_CFG_FILE}" + done + + # Full repo if required. + if [ "${TARGET}" = "full" ]; then + printf '\n' >> "${TMP_MOCK_CFG_FILE}" + + typeset -i i=0 + for ((i = 0; i < ${#full_repo[@]}; ++i)); do + echo "${full_repo[${i}]}" >> "${TMP_MOCK_CFG_FILE}" + done + fi elif [ "${REPO_START}" -eq "0" ] && [[ "${line}" =~ ${TMP_REGEX_END} ]]; then echo "Error: Parsing mock base config file failed: unexpected end of yum configuration, no start found." >&2 exit -1 - elif [ "${REPO_START}" -eq "0" ]; then + else # Write-through. echo "${line}" >> "${TMP_MOCK_CFG_FILE}" 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 5a7b10e867542e5411d60a7a0e7440ced3c5f956 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Apr 1 08:34:15 2015 +0200 bin/build-rpm-package: write out end of yum configuration marker, reset IFS to old value and return temporary file path as promised. --- bin/build-rpm-package | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 8409321..20f3d7d 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -360,6 +360,8 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET echo "${full_repo[${i}]}" >> "${TMP_MOCK_CFG_FILE}" done fi + + echo "${line}" >> "${TMP_MOCK_CFG_FILE}" elif [ "${REPO_START}" -eq "0" ] && [[ "${line}" =~ ${TMP_REGEX_END} ]]; then echo "Error: Parsing mock base config file failed: unexpected end of yum configuration, no start found." >&2 exit -1 @@ -368,6 +370,12 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET echo "${line}" >> "${TMP_MOCK_CFG_FILE}" fi done < "/etc/mock/${MOCK_BASE}" + + # Reset input field separator to original value. + IFS="${OLDIFS}" + + # Strictly speaking not necessary, but do it anyway. + printf "${TMP_MOCK_CFG_FILE}" } get_extra_repository () { -- 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 c35447b875f6bd1a0edaa6838a3a09c854d56b28 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Apr 1 08:44:56 2015 +0200 bin/build-rpm-package: rename RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME to RPM_EXTRA_REPO_MOCK_CONFIG_BASE. --- bin/build-rpm-package | 14 +++++++------- home/.buildscripts/x2go.conf | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 20f3d7d..47b5f25 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -33,7 +33,7 @@ OPENSUSE_DISTROS="12.2,12.3,13.1,13.2" SLE_DISTROS="11.2,11.3,12.0" RPM_REPOS_BASE=/var/www/ RPM_MOCK_CONFIG_DIR="" -RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME="" +RPM_EXTRA_REPO_MOCK_CONFIG_BASE="" RPM_EXTRA_REPO_MOCK_CONFIG_FULL_NAME="" @@ -290,13 +290,13 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET fi # Create temporary directory for our soon-to-be temporary mock config file. - TMP_MOCK_CFG_DIR="$(mktemp -d --tmpdir="${TEMP_BASE}" "${RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME}-mock-$(repeat_str "X" "24")")" + TMP_MOCK_CFG_DIR="$(mktemp -d --tmpdir="${TEMP_BASE}" "${RPM_EXTRA_REPO_MOCK_CONFIG_BASE}-mock-$(repeat_str "X" "24")")" if [ "$?" -ne "0" ]; then echo "Error: creating mock temporary config directory failed. Aborting." >&2 exit -1 fi - TMP_MOCK_CFG_FILE="$(mktemp --tmpdir="${TEMP_BASE}" "$(basename "${TMP_MOCK_CFG_DIR}")/${MOCK_BASE}-${RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME}-${COMPONENT}-${TARGET}.$(repeat_str "X" "24").cfg")" + TMP_MOCK_CFG_FILE="$(mktemp --tmpdir="${TEMP_BASE}" "$(basename "${TMP_MOCK_CFG_DIR}")/${MOCK_BASE}-${RPM_EXTRA_REPO_MOCK_CONFIG_BASE}-${COMPONENT}-${TARGET}.$(repeat_str "X" "24").cfg")" if [ "$?" -ne "0" ]; then echo "Error: creating mock temporary config file failed. Aborting." >&2 exit -1 @@ -311,8 +311,8 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET typeset -a full_repo typeset -i FETCH_EXTRA_SECTION=0 typeset -i FETCH_FULL_SECTION=0 - typeset TMP_REGEX_EXTRA="^[[:space:]]*\[[[:space:]]*${RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME}-extras-${DISTRO}[[:space:]]*\][[:space:]]*\$" - typeset TMP_REGEX_FULL="^[[:space:]]*\[[[:space:]]*${RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME}-${COMPONENT}-${DISTRO}[[:space:]]*\][[:space:]]*\$" + typeset TMP_REGEX_EXTRA="^[[:space:]]*\[[[:space:]]*${RPM_EXTRA_REPO_MOCK_CONFIG_BASE}-extras-${DISTRO}[[:space:]]*\][[:space:]]*\$" + typeset TMP_REGEX_FULL="^[[:space:]]*\[[[:space:]]*${RPM_EXTRA_REPO_MOCK_CONFIG_BASE}-${COMPONENT}-${DISTRO}[[:space:]]*\][[:space:]]*\$" typeset TMP_REGEX_OTHER='^[[:space:]]*\[.*\][[:space:]]*$' while read line; do @@ -422,8 +422,8 @@ get_extra_repository () { # Add mandatory, default value. ret="${ret}${DIST}-${CODENAME}-${ARCH}" - if [ -n "${RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME}" ]; then - ret="${ret}-${COMPONENT}-${RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME}" + if [ -n "${RPM_EXTRA_REPO_MOCK_CONFIG_BASE}" ]; then + ret="${ret}-${COMPONENT}-${RPM_EXTRA_REPO_MOCK_CONFIG_BASE}" if [ -n "${RPM_EXTRA_REPO_MOCK_CONFIG_FULL_NAME}" ] && [ -z "${PACKAGE_WITHOUT_OTHERMIRROR}" ] || \ [ "${PACKAGE_WITHOUT_OTHERMIRROR}" != "${PACKAGE}" ]; then diff --git a/home/.buildscripts/x2go.conf b/home/.buildscripts/x2go.conf index 757736d..57fa75b 100644 --- a/home/.buildscripts/x2go.conf +++ b/home/.buildscripts/x2go.conf @@ -17,7 +17,7 @@ RPM_DISTS_SUPPORTED="fedora epel opensuse sle" RPM_BUILD_FOR=${RPM_BUILD_FOR:-"fedora:18,19,20,21,rawhide epel:6 opensuse:12.2,12.3,13.1,13.2 sle:11.2,11.3,12.0"} RPM_REPOS_BASE=/srv/sites/x2go.org/packages/ RPM_MOCK_CONFIG_DIR="${HOME}/mock-config" -RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME="x2go" +RPM_EXTRA_REPO_MOCK_CONFIG_BASE="x2go" RPM_EXTRA_REPO_MOCK_CONFIG_FULL_NAME="full" COMPONENT_MAIN="main" -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git