I'm trying to set up a maven project on OSX and use the rpm-maven-plugin
to build it as an RPM package. However, even the simplest configuration of the plugin seems to fail. The error I get is Bad exit status from /usr/local/Cellar/rpm/5.4.10/var/tmp/rpm-tmp.50667 (%install)
. The verbose output doesn't give very much information. The generated spec file looks like this:
Name: server
Version: 1.0
Release: SNAPSHOT20130920084527
Summary: MySummary
License: 2013 MyCompany
Distribution: MyDistribution
Group: Application/SomeGroup
Packager: me
autoprov: yes
autoreq: yes
Prefix: /app/theapp
BuildRoot: /Users/me/Projects/projectname/server/target/rpm/server/buildroot
%description
My Description
%install
if [ -e $RPM_BUILD_ROOT ];
then
mv /Users/me/Projects/projectname/server/target/rpm/server/tmp-buildroot/* $RPM_BUILD_ROOT
else
mv /Users/me/Projects/projectname/server/target/rpm/server/tmp-buildroot $RPM_BUILD_ROOT
fi
%files
%defattr(644,-,-,755)
"/"
The command that builds the RPM is /usr/local/bin/rpmbuild -vvv -bb --target noarch --buildroot /Users/me/Projects/projectname/server/target/rpm/server/buildroot --define '_topdir /tmp' server.spec
I'm not really sure if it's an OSX problem or a general rpm-maven-plugin problem, but I suspect it is an OSX problem since I have been building RPMs with the rpm-maven-plugin on other platforms.
Have anyone else succeeded in using the rpm-maven-plugin
on OSX?
Edit
I'm using rpm-maven-plugin
2.1-alpha-3, OS X 10.8.4 and installed rpm via homebrew. I have also verified that the same config works on a CentOS Vagrant box.