I use rpm-maven-plugin to generate installation package. This runs fine on UBUNTU but when i run it on mac os, I met the following errors. Is there a way to make it work on mac os?
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>rpm</goal>
</goals>
</execution>
</executions>
[WARNING] /bin/sh: rpm: command not found
[ERROR] Failed to execute goal org.codehaus.mojo:rpm-maven-plugin:2.0.1:rpm (default) on project mongodb: RPM query for default vendor returned: '127' executing '/bin/sh -c rpm -E '%{_host_vendor}'' -> [Help 1]
it is invoking native rpm
command which is available in your ubuntu environment, for your apple environment you will have to install rpm executable
$ brew install rpm
$ brew install rpmbuild
Needless to say you can also install it via macports:
$> sudo port install rpm
---> Computing dependencies for rpm
---> Dependencies to be installed: beecrypt neon kerberos5 libcomerr openssl libproxy python27 db48 db_select python_select sqlite3 vala
---> Fetching archive for beecrypt
---> Attempting to fetch beecrypt-4.2.1_5.darwin_14.x86_64.tbz2 from http://packages.macports.org/beecrypt
...
---> Applying patches to rpm
---> Configuring rpm <== takes a long time
---> Building rpm <== takes a long time
---> Staging rpm into destroot
---> Installing rpm @4.4.9_17
---> Activating rpm @4.4.9_17
---> Cleaning rpm
---> Updating database of binaries
---> Scanning binaries for linking errors
---> No broken files found.
$>
Note that in the above install, the 'Configuring rpm' and 'Building rpm' steps took a long time, so be patient, it's working in the background (but doesn't print progress markers)
$> which rpm
/opt/local/bin/rpm
I ran into another problem too while running my build; the rpmbuild step failed with: 'Unable to open temp file'.
Solution from https://www.redhat.com/archives/rpm-list/2002-June/msg00258.html is to
$> vi $HOME/.rpmmacros
& add one line to it
%_tmppath /tmp
You should be golden.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With