Results 1 to 4 of 4

Thread: Rpm packaging on Suse Linux

  1. #1
    Junior Member
    Join Date
    Feb 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default Rpm packaging on Suse Linux

    Hi All,
    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.

    --RPMS
    --SOURCES
    --tasmportlets-1.tar.gz(its a tar file)
    --tasmportlets-1(its a folder)
    --tasmportlets.war
    --BUILD
    --SPECS
    --mySpecs.spec
    --SRPMS

    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
    LSB_VERSION="core-2.0-noarch:core-3.0-noarch:core-2.0-x86_64:core-3.0-x86_64"

    Thanks in advance.

  2. #2
    Senior Member monk's Avatar
    Join Date
    Jan 2005
    Location
    Tibet
    Posts
    643
    Thanks
    5
    Thanked 43 Times in 38 Posts
    Rep Power
    15

    Default

    Can you post your spec file?
    May the force with you!

  3. #3
    Junior Member
    Join Date
    Feb 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Hi,
    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
    Code:
    %build
    :
    but no benefit.
    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)
    Thanks for looking into the matter BTW.
    Attached Files Attached Files

  4. #4
    Junior Member
    Join Date
    Feb 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default Solved

    Hi Guys,
    Finally I did it. I skipped the %build stage bu just writing echo "1" in the stage like

    Code:
    %build
    echo "1"
    HTH someone else.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Suse Enterprise Linux NTP Guide
    By phands in forum Novell Suse / OpenSuse
    Replies: 6
    Last Post: 12th November 2010, 01:15 AM
  2. [Solved] Suse Linux Mount a NAS Volume
    By sweta in forum Novell Suse / OpenSuse
    Replies: 6
    Last Post: 8th February 2010, 05:59 PM
  3. HowTo Setup up a VPN in Novell SUSE Linux 10
    By a31modela in forum Networking, Firewalls and Security
    Replies: 1
    Last Post: 4th January 2010, 08:09 AM
  4. Vmware on Suse Linux
    By lacloai in forum Linux software
    Replies: 7
    Last Post: 16th July 2007, 09:37 PM
  5. I Have Installed Suse 10.2 Linux
    By Pravin192006 in forum Linux software
    Replies: 2
    Last Post: 23rd April 2007, 10:06 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •