Can you post your spec file?
I am new to linux. Still I am asked to package a war file as an RPM package. That is an unusual RPM packaging(To me). If you guys could guide me, on how to do that, will be great. I have a war file inside a folder, that folder is inside a tar file as a SOURCE for RPM package. The structure is like below.
--tasmportlets-1.tar.gz(its a tar file)
--tasmportlets-1(its a folder)
I simply want that the war file from sources is transferred to the web app of my tomcat server through RPM. I try to package it as an RPM, but its always giving me errors in %build stage. When I try to remove %build from stage from the spec file, then it says command missing.
Can anyone please help me here Or point me in the right direction? An example will be great.
My system details are:
SUSE Linux Enterprise Server 10 (x86_64)
VERSION = 10
PATCHLEVEL = 1
Thanks in advance.
I have attached the spec file. Someone told me that I do not need the %build stage. Now I do not know how to skip that. I tried this
but no benefit.Code:%build :
Thanks for looking into the matter BTW.Code:Here is the output of rpm command [rpm] Building the RPM based on the tasmportlets.spec file [rpm] Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.59191 [rpm] + umask 022 [rpm] + cd /opt/RPM_Faw/RPMProject/rpmbuild/BUILD [rpm] + cd /opt/RPM_Faw/RPMProject/rpmbuild/BUILD [rpm] + rm -rf linuxProj-1 [rpm] + /usr/bin/gzip -dc /opt/RPM_Faw/RPMProject/rpmbuild/SOURCES/linuxProj-1.tar.gz [rpm] + tar -xvvf - [rpm] drwxr-xr-x 0/0 0 2031-12-09 08:38 linuxProj-1/ [rpm] -rw-r--r-- 0/0 1471 2031-12-09 08:38 linuxProj-1/linuxProj.war [rpm] tar: linuxProj-1/linuxProj.war: time stamp 2031-12-09 08:38:31 is 222837.591477181 s in the future [rpm] tar: linuxProj-1: time stamp 2031-12-09 08:38:31 is 222837.590296863 s in the future [rpm] + STATUS=0 [rpm] + '[' 0 -ne 0 ']' [rpm] + cd linuxProj-1 [rpm] ++ /usr/bin/id -u [rpm] + '[' 0 = 0 ']' [rpm] + /bin/chown -Rhf root . [rpm] ++ /usr/bin/id -u [rpm] + '[' 0 = 0 ']' [rpm] + /bin/chgrp -Rhf root . [rpm] + /bin/chmod -Rf a+rX,u+w,g-w,o-w . [rpm] + exit 0 [rpm] Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.59191 [rpm] + umask 022 [rpm] + cd /opt/RPM_Faw/RPMProject/rpmbuild/BUILD [rpm] + /bin/rm -rf /tmp/linuxProj-1-buildroot [rpm] ++ dirname /tmp/linuxProj-1-buildroot [rpm] + /bin/mkdir -p /tmp [rpm] + /bin/mkdir /tmp/linuxProj-1-buildroot [rpm] + cd linuxProj-1 [rpm] + $':\r' [rpm] /var/tmp/rpm-tmp.59191: line 27: : [rpm] [rpm] [rpm] RPM build errors: [rpm] : command not founderror: Bad exit status from /var/tmp/rpm-tmp.59191 (%build) [rpm] Bad exit status from /var/tmp/rpm-tmp.59191 (%build)
Finally I did it. I skipped the %build stage bu just writing echo "1" in the stage like
HTH someone else.Code:%build echo "1"
There are currently 1 users browsing this thread. (0 members and 1 guests)