RPM Community Forums

Mailing List Message of <rpm-users>

underscores and dashes

From: Aristedes Maniatis <ari@ish.com.au>
Date: Tue 04 Mar 2008 - 23:39:44 CET
Message-Id: <8F46EA71-C134-457E-8032-D2D3B55C7D68@ish.com.au>
I am new to the rpm world and a little confused by the two rival  
projects with the same name. Please excuse me if this question should  
be directed elsewhere.

With the 'other' rpm (version 4.4.1) this problem does not occur. With  
'this' rpm (4.4.9 and 5.0.3) I see a problem in that path names with  
dashes "-" are converted to underscores "_" and then rpm fails to find  
the path. Here is the output from an ant script which creates the  
relevant paths and then executes the rpmbuild command.

      [copy] Copying 1 file to /Users/Shared/bamboo/xml-data/build-dir/ 
ANGEL-SRV/server/dist/rpm/SPECS
      [copy] Copying 2 files to /Users/Shared/bamboo/xml-data/build- 
dir/ANGEL-SRV/server/dist/rpm/SOURCES
       [rpm] Building the RPM based on the onCourseServer.spec file
       [rpm] Executing(%install): /bin/sh -e /opt/local/var/tmp/rpm- 
tmp.82429
       [rpm] + umask 022
       [rpm] + cd /Users/Shared/bamboo/xml_data/build_dir/ANGEL_SRV/ 
server/dist/rpm/BUILD
       [rpm] /opt/local/var/tmp/rpm-tmp.82429: line 25: cd: /Users/ 
Shared/bamboo/xml_data/build_dir/ANGEL_SRV/server/dist/rpm/BUILD: No  
such file or directory
       [rpm] error: Bad exit status from /opt/local/var/tmp/rpm-tmp. 
82429 (%install)

The relevant part of the spec file is:

%install
%{__install} -d -m0755 %{buildroot}/var/db/onCourse
%{__install} -d -m0755 %{buildroot}/var/log/onCourse
%{__install} -d -m0755 %{buildroot}/opt/onCourse/
%{__install} -d -m0755 %{buildroot}/etc/init.d
%{__install} -m0755 %{SOURCE0} %{buildroot}/opt/onCourse/ 
onCourseServer.jar
%{__install} -m0755 %{SOURCE1} %{buildroot}/etc/init.d/onCourseServer


And the rpm temp file has this line:

RPM_BUILD_DIR="/Users/Shared/bamboo/xml_data/build_dir/ANGEL_SRV/ 
server/dist/rpm/BUILD"



So, why do the dashes in the input path get all converted to  
underscores and how do I stop it? This doesn't happen with the 'other'  
rpm, but in this situation I'm stuck using 'this' rpm since I need to  
build on OSX and the packaging of MacPorts only links here. I guess I  
could compile the other one up by hand, but I'm hoping this has a  
simple solution. I also can't change the path naming since other  
things rely on it.

Thanks

Ari



-------------------------->
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
Received on Wed Mar 5 00:21:38 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.