[Users] Getting the following error when creating rpm on CentOS

Juan Hernandez jhernand at redhat.com
Wed Apr 3 07:45:54 UTC 2013


On 03/29/2013 07:29 AM, qyddbear wrote:
> Hi,
> I am trying to create a rpm using ovirt-engine-3.1.0-3.26.3.el6.centos.alt.src.rpm on CentOS 6.3. After ran rpmbuild -ba ovirt-engine.spec, I got error message like this:
>

Version 3.1.0 is not prepared to be built on CentOS. If you want to 
build it you will need to apply the patches prepared by Dreyou:

   http://www.dreyou.org/ovirt/

Or you can use version 3.2.1 which already includes similar changes.

>
> *** Deploying service
> # Install the files:
> install -dm 755 /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/ovirt-engine/service
> install -m 644 packaging/fedora/engine-service.xml.in /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/ovirt-engine/service
> install -m 644 packaging/fedora/engine-service-logging.properties /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/ovirt-engine/service
> install -m 755 packaging/fedora/engine-service.py /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/ovirt-engine/service
> install -m 644 packaging/fedora/engine-service.sysconfig /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/etc/sysconfig/ovirt-engine
> install -m 644 packaging/fedora/engine-service.limits /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/etc/security/limits.d/10-ovirt-engine.conf
> install -m 755 packaging/fedora/engine-service.systemv /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/etc/rc.d/init.d/ovirt-engine
> # Install the links:
> ln -s /usr/share/ovirt-engine/service/engine-service.py /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/bin/engine-service
> + install -dm 755 /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64//var/lib/ovirt-engine/deployments
> + install -dm 755 /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64//var/lib/ovirt-engine/content
> + install -dm 755 /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64//var/log/ovirt-engine/notifier /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64//var/log/ovirt-engine/engine-manage-domains
> + install -dm 755 /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64//var/run/ovirt-engine/notifier
> + install -dm 755 /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64//var/lock/ovirt-engine
> + for war in restapi userportal webadmin
> + sed -i 's#<transport-guarantee>NONE</transport-guarantee>#<transport-guarantee>CONFIDENTIAL</transport-guarantee>#' /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/ovirt-engine/engine.ear/restapi.war/WEB-INF/web.xml
> + for war in restapi userportal webadmin
> + sed -i 's#<transport-guarantee>NONE</transport-guarantee>#<transport-guarantee>CONFIDENTIAL</transport-guarantee>#' /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/ovirt-engine/engine.ear/userportal.war/WEB-INF/web.xml
> + for war in restapi userportal webadmin
> + sed -i 's#<transport-guarantee>NONE</transport-guarantee>#<transport-guarantee>CONFIDENTIAL</transport-guarantee>#' /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/ovirt-engine/engine.ear/webadmin.war/WEB-INF/web.xml
> + for pom in '/root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/maven2/poms/*.pom'
> ++ dirname /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/maven2/poms/ovirt-engine-backend.pom
> + pomdir=/root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/maven2/poms
> ++ basename /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/maven2/poms/ovirt-engine-backend.pom
> + pom=ovirt-engine-backend.pom
> + jpppom=JPP.ovirt-engine-backend.pom
> + mv /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/maven2/poms/ovirt-engine-backend.pom /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/maven2/poms/JPP.ovirt-engine-backend.pom
> ++ sed -e 's/^ovirt-engine-//' -e 's/\.pom//'
> ++ echo ovirt-engine-backend.pom
> + artifact_id=backend
> + '[' -f /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/java/ovirt-engine/backend.jar ']'
> + %add_maven_depmap JPP.ovirt-engine-backend.pom
> /var/tmp/rpm-tmp.hR92jC: line 86: fg: no job control
> error: Bad exit status from /var/tmp/rpm-tmp.hR92jC (%install)
>
>
>
>
> RPM build errors:
>      Bad exit status from /var/tmp/rpm-tmp.hR92jC (%install)
>
>
>
>
> And here is rpm-tmp.hR92jC:
>
>
>
>
> #!/bin/sh
>
>
>    RPM_SOURCE_DIR="/root/rpmbuild/SOURCES"
>    RPM_BUILD_DIR="/root/rpmbuild/BUILD"
>    RPM_OPT_FLAGS="-O2 -g"
>    RPM_ARCH="x86_64"
>    RPM_OS="linux"
>    export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
>    RPM_DOC_DIR="/usr/share/doc"
>    export RPM_DOC_DIR
>    RPM_PACKAGE_NAME="ovirt-engine"
>    RPM_PACKAGE_VERSION="3.1.0"
>    RPM_PACKAGE_RELEASE="3.26.3.el6"
>    export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
>    LANG=C
>    export LANG
>    unset CDPATH DISPLAY ||:
>    RPM_BUILD_ROOT="/root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64"
>    export RPM_BUILD_ROOT
>
>    PKG_CONFIG_PATH="/usr/lib64/pkgconfig:/usr/share/pkgconfig"
>    export PKG_CONFIG_PATH
>
>    set -x
>    umask 022
>    cd "/root/rpmbuild/BUILD"
> cd 'ovirt-engine-3.1.0'
>
>
> rm -fr "/root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64"
>
>
> # Use the makefile to do the normal installation, after that we
> # will need to replace jar files with links to their actual
> # locations:
> make \
> -j1 \
> PACKAGE_NAME=ovirt-engine \
> ENGINE_NAME=ovirt-engine \
> LOCALSTATE_DIR=/var \
> ENGINE_STATE=/var/lib/ovirt-engine \
> PREFIX=/usr \
> SYSCONF_DIR=/etc \
> BIN_DIR=/usr/bin \
> DATAROOT_DIR=/usr/share \
> MAN_DIR=/usr/share/man \
> PYTHON=/usr/bin/python \
> PYTHON_DIR=/usr/lib/python2.6/site-packages \
> JAVA_DIR=/usr/share/java \
> MAVENPOM_DIR=/usr/share/maven2/poms \
> PKG_JAVA_DIR=/usr/share/java/ovirt-engine \
> PKG_SYSCONF_DIR=/etc/ovirt-engine \
> PKG_EAR_DIR=/usr/share/ovirt-engine/engine.ear \
> PKG_PKI_DIR=/etc/pki/ovirt-engine \
> PKG_JBOSS_MODULES=/usr/share/ovirt-engine/modules \
> \
> install DESTDIR=/root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64
>
>
> install -dm 755 /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64//var/lib/ovirt-engine/deployments
> install -dm 755 /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64//var/lib/ovirt-engine/content
> install -dm 755 /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64//var/log/ovirt-engine/{notifier,engine-manage-domains}
> install -dm 755 /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64//var/run/ovirt-engine/notifier
> install -dm 755 /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64//var/lock/ovirt-engine
>
>
> # Needed for compatibility if package is different than the directory structure
>
>
> #
> # Force TLS/SSL for selected applications.
> #
> for war in restapi userportal webadmin; do
>      sed -i \
>          's#<transport-guarantee>NONE</transport-guarantee>#<transport-guarantee>CONFIDENTIAL</transport-guarantee>#' \
>          "/root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/ovirt-engine/engine.ear/${war}.war/WEB-INF/web.xml"
> done
>
>
> # Register poms
> for pom in /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/maven2/poms/*.pom
> do
>    pomdir=`dirname "${pom}"`
>    pom=`basename "${pom}"`
>    jpppom="JPP.${pom}"
>    mv "${pomdir}/${pom}" "${pomdir}/${jpppom}"
>    artifact_id=`echo "${pom}" | sed -e 's/^ovirt-engine-//' -e 's/\.pom//'`
>    if [ -f "/root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/java/ovirt-engine/${artifact_id}.jar" ]
>    then
>      %add_maven_depmap "${jpppom}" "ovirt-engine/${artifact_id}.jar"
>    else
>      %add_maven_depmap "${jpppom}"
>    fi
> done
>
>
>
>
> # Copy the module definitions:
> install -dm 755 /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/ovirt-engine/modules
> cp -r deployment/modules/* /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/ovirt-engine/modules
> find /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/ovirt-engine/modules -type d -exec chmod 755 {} \;
> find /root/rpmbuild/BUILDROOT/ovirt-engine-3.1.0-3.26.3.el6.x86_64/usr/share/ovirt-engine/modules -type f -exec chmod 644 {} \;
>
>
>
>
>      /usr/lib/rpm/brp-compress
>      /usr/lib/rpm/brp-strip
>      /usr/lib/rpm/brp-strip-static-archive
>      /usr/lib/rpm/brp-strip-comment-note
>
>
>
>
>
>
>
>
> I installed jpackage-utils. From a former mai http://lists.ovirt.org/pipermail/users/2012-July/002794.html , it seems that something wrong with %add_maven_depmap macro and POM file. But I didn't find the attached patch which was supplied by Robert Middleswarth. Can anyone teach me how to fix it? Thanks!
>
>
>
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>


-- 
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta 
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.



More information about the Users mailing list