This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository buildscripts. from c35447b bin/build-rpm-package: rename RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME to RPM_EXTRA_REPO_MOCK_CONFIG_BASE. new b815f45 bin/build-rpm-package: lose parameter CUSTOM_REPO to create_mock_config(). It is implicit. new 11e37d2 bin/build-rpm-package: set RPM_MOCK_CONFIG_DIR to a sane value (/etc/mock) for all projects. new 24ce892 bin/build-rpm-package: add make_boolean() function to convert a semi-random string into boolean 0 or 1. Shameless copy from maintenancescripts. new 12348a4 {bin/build-rpm-package,home/.buildscripts/x2go.conf}: add new parameter RPM_WANT_EXTRA_REPOS, set for X2Go projects but otherwise default to 0. new 5784e37 bin/build-rpm-package: use RPM_WANT_EXTRA_REPOS when calling get_extra_repository(). The 5 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 | 74 +++++++++++++++++++++++++++--------------- home/.buildscripts/x2go.conf | 3 +- 2 files changed, 50 insertions(+), 27 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 b815f457196ca5c3ca0c1d8bf4af9d39a82271c9 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Apr 1 08:59:46 2015 +0200 bin/build-rpm-package: lose parameter CUSTOM_REPO to create_mock_config(). It is implicit. Change RPM_MOCK_CONFIG_DIR to /etc/mock and use in create_mock_config(). --- bin/build-rpm-package | 41 +++++++++++++++++++++-------------------- home/.buildscripts/x2go.conf | 2 +- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 47b5f25..4902186 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -235,35 +235,18 @@ repeat_str () { # INPUT COUNT } # Creates a custom mock config file given a base config (taken from -# /etc/mock/), a custom repository file (also taken from /etc/mock/), -# the build component and the target specification ("full" or "base"). +# /etc/mock/), the build component and the target specification ("full" or "base"). # Base refers to adding x2go-extras only, while full means also # adding the full X2Go upstream repository with all published files. # The created config file path is returned. create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET typeset MOCK_BASE="${1:?"Error: no mock base config passed to ${FUNCNAME}()."}" - typeset CUSTOM_REPO="${2:?"Error: no mock custom repository file passed to ${FUNCNAME}()."}" - typeset COMPONENT="${3:?"Error: no component (X2Go release group) passed to ${FUNCNAME}()."}" - typeset TARGET="${4:?"Error: no target (full or base) passed to ${FUNCNAME}()."}" + typeset COMPONENT="${2:?"Error: no component (X2Go release group) passed to ${FUNCNAME}()."}" + typeset TARGET="${3:?"Error: no target (full or base) passed to ${FUNCNAME}()."}" typeset ret="" # Check argument sanity. - typeset i="" - for i in MOCK_BASE CUSTOM_REPO; do - # Must be plain file. - grep -q -s "/" <<< "${!i}" && { - echo "Error: ${i} parameter must not be a path but a simple file name." >&2 - exit -1 - } - - # Must exist and be readable. - if [ ! -f "/etc/mock/${!i}" ] || [ ! -r "/etc/mock/${!i}" ]; then - echo "Error: ${i} parameter must exist, be a regular file and readable." >&2 - exit -1 - fi - done - typeset DISTRO="" typeset TMP_REGEX='^([[:alpha:]]+)-[[:alnum:]]+-[[:alnum:]].cfg$' # distribution - version - arch @@ -274,6 +257,24 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET DISTRO="${BASH_REMATCH[1]}" fi + typeset CUSTOM_REPO="${RPM_EXTRA_REPO_MOCK_CONFIG_BASE}-${DISTRO}.repo" + + typeset CFG_FILE="" + TMP_REGEX='/' + for CFG_FILE in MOCK_BASE CUSTOM_REPO; do + # Must be plain file. + if [[ "${!CFG_FILE}" =~ ${TMP_REGEX} ]]; then + echo "Error: (implicit) ${CFG_FILE} parameter must not be a path but a simple file name." >&2 + exit -1 + fi + + # Must exist and be readable. + if [ ! -f "${RPM_MOCK_CONFIG_DIR}/${!CFG_FILE}" ] || [ ! -r "${RPM_MOCK_CONFIG_DIR}/${!CFG_FILE}" ]; then + echo "Error: ${CFG_FILE} parameter must exist, be a regular file and readable." >&2 + exit -1 + fi + done + # Rename "main" to "release" and "heuler" to "nightly". if [ "${COMPONENT}" = "main" ]; then COMPONENT="release" diff --git a/home/.buildscripts/x2go.conf b/home/.buildscripts/x2go.conf index 57fa75b..0e7dd39 100644 --- a/home/.buildscripts/x2go.conf +++ b/home/.buildscripts/x2go.conf @@ -16,7 +16,7 @@ GPG_KEY="F4A7678C9C6B0B2B" 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_MOCK_CONFIG_DIR="/etc/mock/" RPM_EXTRA_REPO_MOCK_CONFIG_BASE="x2go" RPM_EXTRA_REPO_MOCK_CONFIG_FULL_NAME="full" -- 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 11e37d21cb5a262af10e38acb0cd90be5df505f1 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Apr 1 09:11:12 2015 +0200 bin/build-rpm-package: set RPM_MOCK_CONFIG_DIR to a sane value (/etc/mock) for all projects. --- bin/build-rpm-package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 4902186..2cb6302 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -32,7 +32,7 @@ EPEL_DISTROS="6,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_MOCK_CONFIG_DIR="/etc/mock" RPM_EXTRA_REPO_MOCK_CONFIG_BASE="" RPM_EXTRA_REPO_MOCK_CONFIG_FULL_NAME="" -- 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 24ce892af5dea9652051f9e74d771c828e4e22cc Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Apr 1 09:15:00 2015 +0200 bin/build-rpm-package: add make_boolean() function to convert a semi-random string into boolean 0 or 1. Shameless copy from maintenancescripts. Add FIXME to remember to outsource this some sunny day. --- bin/build-rpm-package | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 2cb6302..5ba3334 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -109,6 +109,18 @@ cleanup () { # Run cleanup() automatically. trap cleanup EXIT SIGTERM SIGINT SIGHUP SIGPIPE SIGALRM SIGUSR1 SIGUSR2 +# FIXME: this should really be in a common.(sh) file! +function make_boolean () { + typeset -l OPTION="${1}" + + case "${OPTION}" in + ("0"|"no"|"false"|"") OPTION="0";; + (*) OPTION="1";; + esac + + printf "${OPTION}" +} + set_vars() { TEMP_BASE="$HOME/tmp/" mkdir -p "$TEMP_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 12348a47ef3dd6605c8557956bbb9e8aa3c80f48 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Apr 1 09:24:00 2015 +0200 {bin/build-rpm-package,home/.buildscripts/x2go.conf}: add new parameter RPM_WANT_EXTRA_REPOS, set for X2Go projects but otherwise default to 0. Add description of what get_extra_repository() does and what parameters it accepts. Add new optional parameter WANT_EXTRA, defaulting to false. --- bin/build-rpm-package | 9 +++++++++ home/.buildscripts/x2go.conf | 1 + 2 files changed, 10 insertions(+) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 5ba3334..948ea6a 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -32,6 +32,7 @@ EPEL_DISTROS="6,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_WANT_EXTRA_REPOS="0" RPM_MOCK_CONFIG_DIR="/etc/mock" RPM_EXTRA_REPO_MOCK_CONFIG_BASE="" RPM_EXTRA_REPO_MOCK_CONFIG_FULL_NAME="" @@ -391,6 +392,13 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET printf "${TMP_MOCK_CFG_FILE}" } +# Fetches extras repositories, if requested. +# Takes the build system type (suse or redhat -- implicitly means OBS or mock), +# the distribution, its version (either a real number or a codename), +# the build component (X2Go release group), the package, the architecture +# and an optional boolean value that determines whether to add any additional +# repositories at all. +# Returns a string that can be passed to obs-build or mock. get_extra_repository () { typeset TYPE="${1:?"Error: no type passed to ${FUNCNAME}()."}" typeset DIST="${2:?"Error: no distribution passed to ${FUNCNAME}()."}" @@ -398,6 +406,7 @@ get_extra_repository () { typeset COMPONENT="${4:?"Error: no component (X2Go release group) passed to ${FUNCNAME}()."}" typeset PACKAGE="${5:?"Error: no package passed to ${FUNCAME}()."}" typeset ARCH="${6:?"Error: no architecture passed to ${FUNCNAME}()."}" + typeset WANT_EXTRA="$(make_boolean "${7}")" typeset ret="" # Note: we always add the extras repo, because that's defined as "packages missing from the main repository". diff --git a/home/.buildscripts/x2go.conf b/home/.buildscripts/x2go.conf index 0e7dd39..4a44c1c 100644 --- a/home/.buildscripts/x2go.conf +++ b/home/.buildscripts/x2go.conf @@ -16,6 +16,7 @@ GPG_KEY="F4A7678C9C6B0B2B" 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_WANT_EXTRA_REPOS="1" RPM_MOCK_CONFIG_DIR="/etc/mock/" RPM_EXTRA_REPO_MOCK_CONFIG_BASE="x2go" RPM_EXTRA_REPO_MOCK_CONFIG_FULL_NAME="full" -- 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 5784e3747b6ea2b0fc9e60a54676fa9ccabeacef Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Apr 1 09:27:59 2015 +0200 bin/build-rpm-package: use RPM_WANT_EXTRA_REPOS when calling get_extra_repository(). --- bin/build-rpm-package | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 948ea6a..f0ffdcd 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -595,7 +595,7 @@ build_packages() { rm -f $PKGDIST/$l_DIST/$l_CODENAME/x86_64/build.log # Obtain packages from our RPM repository. - MOCK_CHROOT_CONFIG="$(get_extra_repository "redhat" "${l_DIST}" "${l_CODENAME}" "${COMPONENT}" "${PROJECT}" "x86_64")" + MOCK_CHROOT_CONFIG="$(get_extra_repository "redhat" "${l_DIST}" "${l_CODENAME}" "${COMPONENT}" "${PROJECT}" "x86_64" "${RPM_WANT_EXTRA_REPOS}")" if mock --buildsrpm \ ${MOCK_CHROOT_CONFIG} \ --resultdir="$PKGDIST/$l_DIST/$l_CODENAME/rpmbuild/SRPMS" \ @@ -635,7 +635,7 @@ build_packages() { done # Obtain packages from our RPM repository. - OTHERMIRROR="$(get_extra_repository "suse" "${l_DIST}" "${l_CODENAME}" "${COMPONENT}" "${PROJECT}" "x86_64")" + OTHERMIRROR="$(get_extra_repository "suse" "${l_DIST}" "${l_CODENAME}" "${COMPONENT}" "${PROJECT}" "x86_64" "${RPM_WANT_EXTRA_REPOS}")" if sudo obs-build \ --nosignature \ ${OTHERMIRROR} \ @@ -666,7 +666,7 @@ build_packages() { done # Obtain packages from our RPM repository. - MOCK_CHROOT_CONFIG="$(get_extra_repository "redhat" "${l_DIST}" "${l_CODENAME}" "${COMPONENT}" "${PROJECT}" "x86_64")" + MOCK_CHROOT_CONFIG="$(get_extra_repository "redhat" "${l_DIST}" "${l_CODENAME}" "${COMPONENT}" "${PROJECT}" "x86_64" "${RPM_WANT_EXTRA_REPOS}")" ls $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/rpmbuild/SRPMS/$PROJECT-$UPSTREAM_VERSION-$PKG_SRCRELEASE.$IS_RELEASE.git$DATE.$GITREV.$COMPONENT.*.src.rpm | while read srpm; do if mock ${MOCK_CHROOT_CONFIG} --resultdir="$PKGDIST/$l_DIST/$l_CODENAME/x86_64" "$srpm"; then # copy and later sign source RPM @@ -712,7 +712,7 @@ build_packages() { done # Obtain packages from our RPM repository. - OTHERMIRROR="$(get_extra_repository "suse" "${l_DIST}" "${l_CODENAME}" "${COMPONENT}" "${PROJECT}" "i386")" + OTHERMIRROR="$(get_extra_repository "suse" "${l_DIST}" "${l_CODENAME}" "${COMPONENT}" "${PROJECT}" "i386" "${RPM_WANT_EXTRA_REPOS}")" if linux32 sudo obs-build \ --nosignature \ ${OTHERMIRROR} \ @@ -746,7 +746,7 @@ build_packages() { rm -f $PKGDIST/$l_DIST/$l_CODENAME/i386/build.log # Obtain packages from our RPM repository. - MOCK_CHROOT_CONFIG="$(get_extra_repository "redhat" "${l_DIST}" "${l_CODENAME}" "${COMPONENT}" "${PROJECT}" "i386")" + MOCK_CHROOT_CONFIG="$(get_extra_repository "redhat" "${l_DIST}" "${l_CODENAME}" "${COMPONENT}" "${PROJECT}" "i386" "${RPM_WANT_EXTRA_REPOS}")" ls $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/rpmbuild/SRPMS/$PROJECT-$UPSTREAM_VERSION-$PKG_SRCRELEASE.$IS_RELEASE.git$DATE.$GITREV.$COMPONENT.*.src.rpm | while read srpm; do if nice mock ${MOCK_CHROOT_CONFIG} --resultdir="$PKGDIST/$l_DIST/$l_CODENAME/i386" "$srpm"; then # only copy and sign source RPM if necessary -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git