Datera / configshell

Python framework for building CLI interfaces and shells
http://linux-iscsi.org/wiki/targetcli
Apache License 2.0
7 stars 8 forks source link

"make rpm" on CentOS 6.5 fails due to too many dashes in filename #1

Closed ExecDevOps closed 10 years ago

ExecDevOps commented 10 years ago

When running "make rpm" on CentOS 6.5, it fails stating that the version (filename) contains illegal character, i.e. it only allows one dash ("-") in the name. By adding an extra filter to the creation of the VERSION variable this can be eliminated.

sed -i -e "s/(^VERSION =.))/\1 | tr - \~)/" ./Makefile

  • result in the file, note the extra pipeing to tr at the end:

VERSION = $$(echo $(GIT_DESC) | sed s/^$(GIT_LAST_TAG)/$(GIT_PKG_TAG)/ | tr - ~)

This may not be the prettiest solution but it works to eliminate this bug. This same method needs to be used also for rtslib, and a more comprehensive method has to be used when make:ing targetcli.

tramjoe commented 10 years ago

This is a known regression from 2.x branch, and is scheduled to be fixed soon. Thanks for reporting!

On 10/15/2014 10:15 PM, ExecDevOps wrote:

When running "make rpm" on CentOS 6.5, it fails stating that the version (filename) contains illegal character, i.e. it only allows one dash ("-") in the name. By adding an extra filter to the creation of the VERSION variable this can be eliminated.

  • shell script:

    sed -i -e "s/(^VERSION /=./))/\1 | tr - ~)/" ./Makefile

  • result in the file, note the extra pipeing to tr at the end:

    VERSION = $$(echo $(GIT_DESC) | sed s/^$(GIT_LAST_TAG)/$(GIT_PKG_TAG)/ | tr - ~)

This may not be the prettiest solution but it works to eliminate this bug. This same method needs to be used also for rtslib, and a more comprehensive method has to be used when make:ing targetcli.

— Reply to this email directly or view it on GitHub https://github.com/Datera/configshell/issues/1.

tramjoe commented 10 years ago

This has been fixed and tested on RHEL6.5 and RHEL7, both work just fine now.