rpm development question: %prep section - Setup

This is a discussion on rpm development question: %prep section - Setup ; Hello, I am new to rpm and creating spec files. I am having difficulty with the %prep section and the %setup macro for starters. My rpm consists of a number of files, not all of which are archives. No matter ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: rpm development question: %prep section

  1. rpm development question: %prep section


    Hello,
    I am new to rpm and creating spec files. I am having difficulty with
    the %prep section and the %setup macro for starters.
    My rpm consists of a number of files, not all of which are archives.
    No matter what I do, the script being generated keeps trying to untar
    all the files, and it fails when it detects a non-archive.

    I have several sources:
    Source0: XXX.tar.gz
    Source1: build.sh
    Source2: config.h

    my %prep section is just like follows:
    %setup -c -q
    %setup -D -T -a 1
    %setup -D -T -a 2

    Once build.sh is detected as a non-archive, rpmbuild fails. I have used
    rpmbuild -bb and -ba, trying to build the binary rpm as root.

    Also, I have had a real problem finding proper documentation on spec
    file DEVELOPMENT. There is tons of redundant information on using and
    installing rpms, but little on actual development. That which I have
    found is cursory at best. The %setup macro in particular is one of
    those "do-all" kind of macros. How come there isn't ample documentation
    and detail on this?
    >From this short experience using rpm, I am very surprised this has

    persisted in any way as a standard for installation and package
    management.
    Well, if anyone can help. I would appreciate it.
    Thanks.
    - Keith


  2. Re: rpm development question: %prep section

    Keith wrote:
    > Once build.sh is detected as a non-archive, rpmbuild fails. I have used
    > rpmbuild -bb and -ba, trying to build the binary rpm as root.


    What I do is not have %setup for the sources that aren't archive files,
    but instead copy them over in the %build or %install section, referring
    to them via the %{SOURCEn} macros.

    Binand

  3. Re: rpm development question: %prep section


    Binand Sethumadhavan wrote:
    > Keith wrote:
    > > Once build.sh is detected as a non-archive, rpmbuild fails. I have used
    > > rpmbuild -bb and -ba, trying to build the binary rpm as root.

    >
    > What I do is not have %setup for the sources that aren't archive files,
    > but instead copy them over in the %build or %install section, referring
    > to them via the %{SOURCEn} macros.
    >
    > Binand


    Me, too, and that's how RedHat does it. SuSE tends to bundle them up in
    tarballs for no conceivable reason.....


+ Reply to Thread