diff --git a/bin/build-packages-for-obs b/bin/build-packages-for-obs index c1a3762..60635f5 100755 --- a/bin/build-packages-for-obs +++ b/bin/build-packages-for-obs @@ -152,6 +152,7 @@ while read PKG_NAME PKG_VER PKG_DIR; do # Convert to obscpio SPEC_VER=$(sed -n -e 's/^Version:\s*\(.*\)/\1/p' ${T_DIR}/${PKG_NAME}.spec) SOURCE=$(sed -n -e 's/^\(Source\|Source0\):\s*.*[[:space:]\/]\(.*\)/\2/p' ${T_DIR}/${PKG_NAME}.spec|sed -e "s/%{name}/${PKG_NAME}/"|sed -e "s/%{version}/${SPEC_VER}/") + SPEC_REL=$(sed -n -e 's/^Release: \+\([0-9]\).*/\1/p' ${T_DIR}/${PKG_NAME}.spec) # If the package does not have sources, we don't need to repackage them if [ "${SOURCE}" != "" ]; then FOLDER=$(tar -tf ${T_DIR}/${SOURCE}|head -1|sed -e 's/\///') @@ -176,8 +177,10 @@ commit: $(git rev-parse --verify HEAD) EOF fi # Release is handled by the Buildservice - # Remove everything what prevents us from submitting - sed -i 's/^Release.*$/Release: 0/i' $SRPM_DIR/$PKG_NAME/*.spec + # With untagged changes we can only build using --test with tito build. + # tito build with --test appends the git hash to the release version and we do not want this. + # Remove everything preventing us from submitting + sed -i "s/^Release.*$/Release: ${SPEC_REL}/i" ${SRPM_DIR}/${PKG_NAME}/${PKG_NAME}.spec SUCCEED_CNT=$(($SUCCEED_CNT+1)) break diff --git a/uyuni-releng-tools.changes.deneb-alpha.do_not_hardcode_release_value b/uyuni-releng-tools.changes.deneb-alpha.do_not_hardcode_release_value new file mode 100644 index 0000000..85ccbdc --- /dev/null +++ b/uyuni-releng-tools.changes.deneb-alpha.do_not_hardcode_release_value @@ -0,0 +1,2 @@ +- Do not hardcode a fixed release value but align it with the + value used while tagging