summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2015-04-01 09:24:00 +0200
committerMihai Moldovan <ionic@ionic.de>2015-04-01 09:27:27 +0200
commit12348a47ef3dd6605c8557956bbb9e8aa3c80f48 (patch)
treec0c68c3b796d640f5972dd54a3d8db62dcf86711
parent24ce892af5dea9652051f9e74d771c828e4e22cc (diff)
downloadbuildscripts-12348a47ef3dd6605c8557956bbb9e8aa3c80f48.tar.gz
buildscripts-12348a47ef3dd6605c8557956bbb9e8aa3c80f48.tar.bz2
buildscripts-12348a47ef3dd6605c8557956bbb9e8aa3c80f48.zip
{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.
-rwxr-xr-xbin/build-rpm-package9
-rw-r--r--home/.buildscripts/x2go.conf1
2 files changed, 10 insertions, 0 deletions
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"