Skip to content

Commit

Permalink
make-dist: don't set Release tag in ceph.spec for SUSE distros
Browse files Browse the repository at this point in the history
SUSE's Open Build Service overwrites the Release tag with checkin
and build counters, so we can't use it to record the number of
commits since the last tag, and the last commit hash.  This commit
appends that extra information to the Version tag instead for
SUSE builds.

Fixes: https://tracker.ceph.com/issues/57893
Signed-off-by: Tim Serong <[email protected]>
Signed-off-by: Nathan Cutler <[email protected]>
  • Loading branch information
smithfarm authored and tserong committed Oct 24, 2022
1 parent 5dc16be commit dfc9ef6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions make-dist
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,19 @@ echo "including src/.git_version, ceph.spec"

(git rev-parse HEAD ; echo $version) 2> /dev/null > src/.git_version

if [ -r /etc/os-release ]; then
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
fi

for spec in ceph.spec.in; do
cat $spec |
sed "s/@PROJECT_VERSION@/$rpm_version/g" |
Expand Down

0 comments on commit dfc9ef6

Please sign in to comment.