RPM Community Forums

Mailing List Message of <rpm-users>

Re: underscores and dashes

From: Aristedes Maniatis <ari@ish.com.au>
Date: Wed 05 Mar 2008 - 02:07:35 CET
Message-Id: <F0ADF511-81FD-461A-8C5C-EBDA19714DBE@ish.com.au>

On 05/03/2008, at 10:41 AM, Jeff Johnson wrote:

> Hmmm ....
> I don't know of any code within rpmbuild that converts dashes to  
> underscores in file paths.
> Nor can I think of any reason that the conversion would be needed on  
> a unix-like file system.
> Are you building with port(1) or rpmbuild directly? I seem to recall  
> port(1) undertaking
> certain dash-to-underscore conversions.
> If you have a reproducer (i.e. a URI to a src.rpm) that reproduces  
> the problem, I'll
> try to figure out what is going on.
> hth
> 73 de Jeff

Thanks for your help Jeff,

The environment is OSX and rpm is built using the scripts and patches  
found here:


rpmbuild is called from an ant script, but I've not come across  
port(1) before so I'm not sure what that is (and you'd imagine that  
Googling for 'port' doesn't help me :-)

I'll reproduce the entire SPEC for you inline. It is pretty simple,  
although I'm not sure if we are doing the right thing. It is meant to  
be a binary only rpm since we the ant script has already built the  
appropriate jars. Really it is very simple: put startup script in the  
right place, put jar in the right place and create a couple of  
folders. rpm is overkill but I thought it might be a convenient  
packaging tool. It really is quite complicated to do simple things  
though (compared to what I know well which is the FreeBSD ports/ 
packaging system). But that might be my inexperience with it and the  
lack of documentation about use cases which aren't ./configure && make  
style installs.

The ant target used is fairly understandable even if you haven't used  
ant much:

<rpm rpmBuildCommand="/opt/local/bin/rpmbuild"  
specFile="onCourseServer.spec" topDir="${distribution.dir}/rpm"  
failOnError="true" command="-bb"/>


Summary:    ish onCourse Server
Name:       onCourseServer
Version:    0.8b2
Release:    1
Group:          Applications/onCourse
License:        freeware
Vendor:     ish group
URL:        http://www.ish.com.au/onCourse
Requires:   java >= 1.5
Provides:       onCourseServer
Source0:        onCourseServer.jar
Source1:        linux-startup.sh
BuildArch:      noarch
BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix:     /opt


%{__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/ 
%{__install} -m0755 %{SOURCE1} %{buildroot}/etc/init.d/onCourseServer

%{__rm} -rf %{buildroot}



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 02:07:39 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.