This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository buildscripts. from ea92e30 bin/slave-start-prepare.sh: let sudo spawn login shells. new e0fd833 bin/build-rpm-package: embed vendor tag into RPM packages for *SuSE packages. The 1 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 | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) -- Alioth's /home/x2go-admin/maintenancescripts/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 e0fd833f5a5cd7888c3a9979c35a8733e6a1e63c Author: Mihai Moldovan <ionic@ionic.de> Date: Fri Dec 8 08:32:35 2017 +0100 bin/build-rpm-package: embed vendor tag into RPM packages for *SuSE packages. --- bin/build-rpm-package | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 32a4e9d..89a53e6 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -718,6 +718,34 @@ setup_opensuse_tumbleweed_config() { return "0" } +# Maps a prefix string to a vendor tag. +# Takes a prefix string. +# Returns 0 on success or non-0 on failure. +map_prefix_to_vendor() { + typeset prefix="${1:?"Error: no prefix string passed to ${FUNCNAME}()."}" + + typeset out='' + typeset ret='1' + + case "${prefix}" in + ('x2go') + out="X2Go" + ret='0' + ;; + ('arctica') + out="Arctica" + ret='0' + ;; + (*) + out='Unknown prefix. Mapping failed.' + ;; + esac + + printf '%s' "${out}" + + return "${ret}" +} + prepare_workspace() { # make sure our local working copy is up to date... if [ -d "${PROJECT_DIR}/.git" ]; then @@ -928,6 +956,16 @@ build_packages() { typeset obs_config_dir="obs-config" typeset -a extra_obs_build_args=( ) + typeset obs_build_vendor_tag='' + obs_build_vendor_tag="$(map_prefix_to_vendor "${PREFIX}")" + + if [ "${?}" -ne "0" ]; then + echo "Unable to map prefix '${PREFIX}' to vendor tag." + exit "1" + fi + + extra_obs_build_args+=( "--define" "%vendor ${obs_build_vendor_tag}" ) + typeset -i tmp_suse_major_version="0" typeset -i tmp_suse_minor_version="0" if [[ "${l_CODENAME}" = "tumbleweed" ]]; then -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/buildscripts.git