]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
osc: report osc build release correctly 1400/head
authorKyr Shatskyy <kyrylo.shatskyy@gmail.com>
Tue, 1 Oct 2019 16:53:40 +0000 (18:53 +0200)
committerKyr Shatskyy <kyrylo.shatskyy@suse.com>
Sun, 6 Oct 2019 17:42:19 +0000 (19:42 +0200)
This patch addresses the issue when for osc build
it has been reporting always a distro version of
the host system for any branch. However the target
release should be reported to shaman instead.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@gmail.com>
ceph-dev-build/build/build_osc
ceph-dev-build/build/setup_osc

index 21d1838f076fed4625912afff03760c748fefa07..c1b42aa377ec41800a362180615f795ce1ee0869 100644 (file)
@@ -1,10 +1,6 @@
 #!/bin/bash
 set -ex
 
-# create a release directory for ceph-build tools
-raw_version=`echo $vers | cut -d '-' -f 1`
-
-RELEASE_BRANCH=$(release_from_version $raw_version)
 case $RELEASE_BRANCH in
 nautilus|octopus)
     OBSREPO="openSUSE_Leap_15.1"
index de692e30bebfd762ba973cd7cebdb005080e1e25..c794917ebe1d9fe7de03c124c1be1e85d855e017 100644 (file)
@@ -29,61 +29,35 @@ tar xzf $ORIGTAR
 cd $ORIGDIR
 pwd
 
-# do not need this on opensuse
-#maybe_downgrade_gcc
-
 BRANCH=`branch_slash_filter $BRANCH`
 
 cd $WORKSPACE
 
-get_rpm_dist() {
-    LSB_RELEASE=/usr/bin/lsb_release
-    [ ! -x $LSB_RELEASE ] && echo unknown && exit
-
-    ID=`$LSB_RELEASE --short --id`
-
-    case $ID in
-    RedHatEnterpriseServer)
-        RELEASE=`$LSB_RELEASE --short --release | cut -d. -f1`
-        DIST=rhel$RELEASE
-        DISTRO=rhel
-        ;;
-    CentOS)
-        RELEASE=`$LSB_RELEASE --short --release | cut -d. -f1`
-        DIST=el$RELEASE
-        DISTRO=centos
-        ;;
-    Fedora)
-        RELEASE=`$LSB_RELEASE --short --release`
-        DIST=fc$RELEASE
-        DISTRO=fedora
-        ;;
-    SUSE\ LINUX|openSUSE)
-        DESC=`$LSB_RELEASE --short --description`
-        RELEASE=`$LSB_RELEASE --short --release`
-        case $DESC in
-        *openSUSE*)
-                DIST=leap${RELEASE%%.*}
-                DISTRO=opensuse
-            ;;
-        *Enterprise*)
-                DIST=sles$RELEASE
-                DISTRO=sles
-                ;;
-            esac
-        ;;
-    *)
-        DIST=unknown
-        DISTRO=unknown
-        ;;
-    esac
-
-    echo $DIST
-}
-
-get_rpm_dist
-
-# Normalize variables across rpm/deb builds
+vers=$(cat ./dist/version)
+raw_version=`echo $vers | cut -d '-' -f 1`
+
+RELEASE_BRANCH=$(release_from_version $raw_version)
+case $RELEASE_BRANCH in
+nautilus|octopus)
+    DISTRO=opensuse
+    RELEASE="15.1"
+    ;;
+mimic)
+    DISTRO=opensuse
+    RELEASE="15.0"
+    ;;
+luminous)
+    DISTRO=opensuse
+    RELEASE="42.3"
+    ;;
+*)
+    echo Not supported release '$RELEASE_BRANCH' by openSUSE
+    exit 1
+    ;;
+esac
+
+DIST=leap${RELEASE%%.*}
+
 NORMAL_DISTRO=$DISTRO
 NORMAL_DISTRO_VERSION=$RELEASE
 NORMAL_ARCH=$ARCH
@@ -103,9 +77,7 @@ dist=$DIST
 [ -z "$dist" ] && echo no dist && exit 1
 echo dist $dist
 
-vers=`cat ./dist/version`
 chacra_ref="$BRANCH"
-
 chacra_endpoint="ceph/${chacra_ref}/${SHA1}/${DISTRO}/${RELEASE}"
 chacra_check_url="${chacra_endpoint}/${ARCH}/flavors/${FLAVOR}/librados2-${vers}-0.${DIST}.${ARCH}.rpm"