Support Questions

Find answers, ask questions, and share your expertise

Problem in building rpms

avatar
Rising Star

hi, I have 5 openstack nodes and I want to install metron on them using this link.

after I ran following command I get an error:

mvn clean install -DskipTests -PHDP-2.5.0.0
[INFO] --- exec-maven-plugin:1.5.0:exec (rpm-build) @ metron-rpm ---
/bin/bash: ./build.sh: Permission denied
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 126 (Exit value: 126)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:764)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:711)
    at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:289)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)

permissions for build.sh are OK.

I tried to run it in terminal, and I got following error:

[root@node1 rpm-docker]# ./build.sh 
FULL_VERSION: 
VERSION: 
PRERELEASE: 
error: Macro %_version has empty body
error: Macro %_version has empty body
error: Macro %_prerelease has empty body
error: Macro %_prerelease has empty body
(...)
error: Bad exit status from /var/tmp/rpm-tmp.68RZ1K (%install)


RPM build errors:
    Macro %_version has empty body
    Macro %_version has empty body
    Macro %_prerelease has empty body
    Macro %_prerelease has empty body
    Bad exit status from /var/tmp/rpm-tmp.68RZ1K (%install)


why values related to versions are null?? since these are null, when it refers to files it needs in SOURCES, it can not find what it needs

any help here?

Does any one know valid values for them, so I can set them manually?

1 ACCEPTED SOLUTION

avatar
Contributor

@Sara Alizadeh

I had similar problem. Here bash is not working from maven.

I took a work around, commented the 'rpm-build' execution in the 'incubator-metron/metron-deployment/packaging/docker/rpm-docker/pom.xml' file

I am able to run mvn clean install -DskipTests -PHDP-2.5.0.0 successfully.

I triggered the ./incubator-metron/metron-deployment/packaging/docker/rpm-docker/build.sh 0.4.0

I could see the rpm files generated under the folder 'incubator-metron/metron-deployment/packaging/docker/rpm-docker/RPMS/noarch'

Thanks,

Bala

View solution in original post

3 REPLIES 3

avatar
Contributor

@Sara Alizadeh

I had similar problem. Here bash is not working from maven.

I took a work around, commented the 'rpm-build' execution in the 'incubator-metron/metron-deployment/packaging/docker/rpm-docker/pom.xml' file

I am able to run mvn clean install -DskipTests -PHDP-2.5.0.0 successfully.

I triggered the ./incubator-metron/metron-deployment/packaging/docker/rpm-docker/build.sh 0.4.0

I could see the rpm files generated under the folder 'incubator-metron/metron-deployment/packaging/docker/rpm-docker/RPMS/noarch'

Thanks,

Bala

avatar
Rising Star

Well,I checked it and this works for me too.thanks a world.

avatar
Explorer

For the records, for a more cleaner way, the issue was with SELinux set to enforcing

disable it by running this as root: setenforce 0

then re-run :

mvn clean install -DskipTests -PHDP-2.5.0.0