Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I have list of tar files, and one shell script in that tar. ( I have to just execute that shell script when installing an rpm, that is my ...
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Posts
    12

    creating rpm

    Hi,

    I have list of tar files, and one shell script in that tar.

    ( I have to just execute that shell script when installing an rpm, that is my requirement)

    i have to create a rpm, which should those tar files and it has to execute that shell script when installing this rpm.

    I have a src.tgz in SOURCES directory.
    I have written a spec file like below:

    %define version 0.2.2
    %define release 1

    Summary: Package for testing
    Name: src
    Version: %{version}
    Release: %{release}
    Source: src.tgz
    Vendor: Project
    License: LGPL
    Group: System Environment/Libraries
    Buildroot: %{_tmppath}/%{name}

    %description
    testing


    %description
    The package contains the testing date for rpm

    %prep

    %setup -n %{name}

    %build

    %install
    sh install.sh


    I executed rpmbuild -ba test.spec, when executing this command, it is executing install.sh.... and it is created rpm.

    But i just taken that rpm and ran 'rpm -Uvh new.rpm' it is not executing the shell script..

    pls help me..

    regds
    skmdu

  2. #2
    Just Joined!
    Join Date
    Apr 2009
    Posts
    12
    basically i want to execute a shell script when installing an rpm...

Posting Permissions

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