]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
make-dist: respect Factory rules downstream
authorNathan Cutler <ncutler@suse.com>
Mon, 29 Jan 2018 12:38:08 +0000 (13:38 +0100)
committerStefen Allen <sallen@suse.com>
Thu, 9 Dec 2021 19:29:43 +0000 (12:29 -0700)
In Tumbleweed and SLE, it is not allowed to use <B_CI> and <B_CNT>. The
Release field must be populated exclusively by the OBS.

Use "opensuse*" to support Tumbleweed and newer versions of Leap.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
Conflicts:
make-dist

make-dist

index 75528c1b8608abfdb13e20ba7c44fee2b71d274a..d2492b6aeb50964dcf5232766f84daea30ee1ec1 100755 (executable)
--- a/make-dist
+++ b/make-dist
@@ -168,6 +168,17 @@ echo "including src/.git_version, ceph.spec"
 
 (git rev-parse HEAD ; echo $version) 2> /dev/null > src/.git_version
 
+source /etc/os-release
+case $ID in
+    opensuse*|suse|sles)
+        if [ "x$rpm_release" != "x0" ] ; then
+            rpm_release=$(echo $rpm_release | sed 's/.g/+g/')
+            rpm_version="${rpm_version}.${rpm_release}"
+            rpm_release="0"
+        fi
+        ;;
+esac
+
 for spec in ceph.spec.in; do
     cat $spec |
         sed "s/@PROJECT_VERSION@/$rpm_version/g" |