Create Binary RPM from ZIP-File

devzero2000 pinto.elia at gmail.com
Thu Mar 12 15:18:00 UTC 2009


On Wed, Mar 4, 2009 at 11:21 AM, <Fred_aus_Sacka at web.de> wrote:

> Hi.
>
> I got a problem with building a binary rpm from a zip file. I have got a
> jboss zip file and want to build a rpm to install jboss by using yum.
> My OS is SLES 10.2. Yum is already installed.
>
> Here my jboss.spec:
> Summary: rpmbuild-jboss
> Name: jboss
> Version: 5.0.0.GA
> Release: jdk6
> License: GPL
> Group: Development/Languages/Java
> Source: jboss-5.0.0.GA-jdk6.zip
> Source1: jboss-5.0.0.GA-jdk6.zip
> BuildRoot: /opt/jboss_data
> Packager: Fred
> Prefix: /opt/jboss_bernd
> BuildArchitectures: noarch
>
> %description
> Na das ist jetzt meine Beschreibung des Paketes
>
>
> %prep
> %setup -q
>
> %build
>
>
> %install
> mkdir -p $RPM_BUILD_ROOT/usr/local/jboss
> cd $RPM_BUILD_ROOT/usr/local/jboss
>
> #%cleancd
>
> #%files
>
> #%changelog
>
> ---------------------------------------------------
>
>
> And that is my Output after "rpmbuild -bb SPECS/jboss.spec"
> Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.56187
> + umask 022
> + cd /usr/src/packages/BUILD
> + cd /usr/src/packages/BUILD
> + rm -rf jboss-5.0.0.GA
> + /usr/bin/unzip -qq /usr/src/packages/SOURCES/jboss-5.0.0.GA-jdk6.zip
> + STATUS=0
> + '[' 0 -ne 0 ']'
> + cd jboss-5.0.0.GA
> ++ /usr/bin/id -u
> + '[' 0 = 0 ']'
> + /bin/chown -Rhf root .
> ++ /usr/bin/id -u
> + '[' 0 = 0 ']'
> + /bin/chgrp -Rhf root .
> + /bin/chmod -Rf a+rX,u+w,g-w,o-w .
> + pwd
> /usr/src/packages/BUILD/jboss-5.0.0.GA
> + exit 0
> Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.48461
> + umask 022
> + cd /usr/src/packages/BUILD
> + /bin/rm -rf /opt/jboss_data
> ++ dirname /opt/jboss_data
> + /bin/mkdir -p /opt
> + /bin/mkdir /opt/jboss_data
> + cd jboss-5.0.0.GA
> + exit 0
> Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.48461
> + umask 022
> + cd /usr/src/packages/BUILD
> + cd jboss-5.0.0.GA
> + RPM_BUILD_ROOT=/opt/jboss_data
> + export RPM_BUILD_ROOT
> + test -x /usr/sbin/Check -a 0 = 0 -o -x /usr/sbin/Check -a '!' -z
> /opt/jboss_data
> + echo 'I call /usr/sbin/Check...'
> I call /usr/sbin/Check...
> + /usr/sbin/Check
> + /usr/lib/rpm/brp-compress
> + /usr/lib/rpm/brp-symlink
> Checking for unpackaged file(s): /usr/lib/rpm/check-files /opt/jboss_data
> ------------------------------------------------------
>
> Has somebody experience with zip and rpmbuild and can maybe help me out?
>

BuildRoot is wrong, unless you are building as root. Put something like

BuildRoot: %{_tmppath}/%{name}-root

In fact with your SPEC you are "installing" into /opt/jboss_data. No good.
The BuildRoot is a temp directory a.k.a a sandbox. In general it is
"cleaned" automatically after the build.

BTW, you have missed the %files section


%files
%defattr(-,root,root)
/opt/jboss_data

hth



>
> Many greets and Thanks
> Fred
>
> _______________________________________________________________________
> DSL zum Nulltarif + 20 Euro Extraprämie bei Online-Bestellung über die
> DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a
>
> _______________________________________________
> Rpm-list mailing list
> Rpm-list at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20090312/7985f6f4/attachment-0001.htm>


More information about the Rpm-list mailing list