[X2Go-Commits] [buildscripts] 04/05: {bin/build-rpm-package, home/.buildscripts/x2go.conf}: add new parameter RPM_WANT_EXTRA_REPOS, set for X2Go projects but otherwise default to 0.

git-admin at x2go.org git-admin at x2go.org
Wed Apr 1 09:28:50 CEST 2015


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 at 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


More information about the x2go-commits mailing list