Hide Forgot
Created attachment 519279 [details] patch Description of problem: When you execute make rpm in a test directory which is not under version control then the version is always 1.0 regardless of what the Makefile says. This is useful sometimes when you develop locally before committing to version control or even when users decide to use some SCM different from cv, svn and git which are currently supported. To fix apply this simple patch: --- rhts-mk-get-current-tag.orig 2011-08-22 15:47:48.173392306 +0300 +++ rhts-mk-get-current-tag 2011-08-22 15:55:40.843376412 +0300 @@ -16,6 +16,10 @@ # # determine the next available package tag for test package +function usage { + echo "Usage: rhts-mk-get-current-tag [directory]" +} + if [ $# -gt 1 ]; then usage exit 1 @@ -26,6 +30,8 @@ fi PACKAGE_NAME=`rhts-mk-get-test-package-name` +CURRENT_VERSION=$(echo $TESTVERSION | sed -e 's/\./_/g') # from the make file. +CURRENT_TAG="$PACKAGE_NAME-$CURRENT_VERSION-1" # for CVS, find the tag with the package name if [ -d "CVS" ]; then Also adds the usage function which was missing. Version-Release number of selected component (if applicable): rhts-devel-4.29-1.git.1.1342206.el6.noarch How reproducible: always Steps to Reproduce: 1. Run rhts-wizard/beaker-wizard in an empty directory outside version control to create a test skeleton. TESTVERSION=1.0 by default 2. make rpm - the resulting RPM has version 1.0 3. change TESTVERSION in Makefile to 2.0 or something different than 1.0 4. make rpm again - version is still 1.0 Actual results: version doesn't change regardless of what Makefile says Expected results: version field is taken from Makefile Additional info: The patch adds a default value for version and current tag. Release field is always 1. If we're under version control these value will be overridden.
This change has been pushed into rhts-devel-4.39-1 to test please use beaker-stage repo yum upgrade --enablerepo=beaker-stage rhts\*
Verified with rhts-devel-4.39-1.git.1.7288cd1.el6eso.noarch. Tried to "make package" with TESTVERSION=1.0/1.1/2.1 and expected rpms were created: $ ls Makefile tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-1.noarch.rpm PURPOSE tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.1-1.noarch.rpm runtest.sh tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-2.1-1.noarch.rpm
Beaker 0.7.1 has been released.