Modify

Ticket #1022 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

Can't build v1.2.0pre3 tag on OS X 10.6.8

Reported by: rcuza Owned by: rcuza
Priority: major Milestone: Bcfg2 1.2.0 Release
Component: bcfg2-server Version: 1.0
Keywords: package, osx Cc:

Description

When trying to build the OS X package of Bcfg2 I run into a repeatable error (see attached text file for full make output) related to BCFGVER variable in the makefile:

...
<snip snip>
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `/bin/echo if sys.hexversion < 0x03000000 and os.path.exists(py3lib): 1.2.0pre3 | /usr/bin/cut -d"." -f1'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `/bin/echo if sys.hexversion < 0x03000000 and os.path.exists(py3lib): 1.2.0pre3 | /usr/bin/cut -d"." -f2'
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `/bin/echo if sys.hexversion < 0x03000000 and os.path.exists(py3lib): 1.2.0pre3 | /usr/bin/cut -d"." -f3'
...
<snip snip>
...
rm -rf `pwd`/bcfg2-if sys.hexversion < 0x03000000 and os.path.exists(py3lib): 1.2.0pre3.pkg
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `rm -rf `pwd`/bcfg2-if sys.hexversion < 0x03000000 and os.path.exists(py3lib): 1.2.0pre3.pkg'
make: *** [server] Error 2

Here are the occurrences of the BCFGVER variable in the makefile:

$ grep BCFGVER Makefile 
BCFGVER = $(shell /usr/bin/grep version ../setup.py | cut -d\" -f2)
BCFGVER1 = $(shell /bin/echo ${BCFGVER} | /usr/bin/cut -d"." -f1)
BCFGVER2 = $(shell /bin/echo ${BCFGVER} | /usr/bin/cut -d"." -f2)
BCFGVER3 = $(shell /bin/echo ${BCFGVER} | /usr/bin/cut -d"." -f3)
BCFGVER3I = $(shell /usr/bin/python -c "import sys; print sys.argv[1][0:1]" ${BCFGVER3})
MAJOR = ${BCFGVER1}
MINOR = ${BCFGVER2}${BCFGVER3I}
        sed -i '' "s/{SHORTVERSION}/${BCFGVER}/g" "${PKGTMP}/${PROTO_PLIST}"
        rm -rf `pwd`/bcfg2-${BCFGVER}.pkg
                          --out `pwd`/bcfg2-${BCFGVER}.pkg
        rm -rf `pwd`/bcfg2-${BCFGVER}.pkg
                          --out `pwd`/bcfg2-${BCFGVER}.pkg

When run manually this is the output:

$ grep version ../setup.py | cut -d\" -f2
if sys.hexversion < 0x03000000 and os.path.exists(py3lib):
1.2.0pre3

The expected output is 1.2.0pre3.

Attachments

bcfg2-build-error.txt (53.0 KB) - added by rcuza 12 years ago.

Change History

Changed 12 years ago by rcuza

comment:1 Changed 12 years ago by rcuza

  • Owner changed from desai to rcuza
  • Status changed from new to assigned

comment:2 Changed 12 years ago by rcuza

  • Status changed from assigned to closed
  • Resolution set to fixed

A pull request was made to help solve this issue. The solution involves using tools/export.py to update the version info in osx/Makefile. This solution was adopted by other packaging files like debian/changelog.

Marking this ticket as resolved(fixed).

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.