Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: HELP NEEDED USING RPMBUILD

  1. #1
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,068

    Default HELP NEEDED USING RPMBUILD

    Hello.

    I have to modify a *.spec file before recreating a rpm file because I need vendor name when the package is installed.

    I have an error in the last step ( calling rpmbuild ) after directories are create and files are copied into the right folders.

    From the tar file ( project_name-version_number.tar.bz2 ) I get all the stuff in :
    ~/project_name-version_number
    ~/project_name-version_number/doc
    ~/project_name-version_number/src
    ~/project_name-version_number/test
    ~/project_name.spec

    In ~/project_name-version_number directory are the makefile.*, configure.*, libtools

    First :
    I modify project_name.spec by adding :
    %define vendor vendor_name

    and after other macro definitions
    Vendor: %{vendor}


    this spec file contains :
    %define name project_name
    %define version version_number
    %define release release_number
    %define major major_number

    then
    I use a macro file ".rpmmacros" which contain :
    Code:
    %_topdir /tmp/rpmbuild/project_name/rpm
    this redirect all the files in
    /tmp/rpmbuild/project_name/rpm/BUILD
    /tmp/rpmbuild/project_name/rpm/SOURCE
    /tmp/rpmbuild/project_name/rpm/SPECS
    /tmp/rpmbuild/project_name/rpm/RPMS
    /tmp/rpmbuild/project_name/rpm/SRPMS

    and then
    I use a shell file which delete and recreate all directories,

    from /tmp/rpmbuild/project_name/rpm/SOURCE
    copy all files from ~/project_name-version_number

    Code:
    cp   ~/project_name-version_number/*
    
    /tmp/rpmbuild/project_name/rpm/SOURCE/project_name-version_number
    there is no project_name.spec file in that directory

    from /tmp/rpmbuild/project_name/rpm/SOURCE
    Code:
    tar  -cvjf    /tmp/rpmbuild/project_name/rpm/SOURCE/project_name-version_number.tar.bz2
    
    /tmp/rpmbuild/project_name/rpm/SOURCE/project_name-version_number
    Code:
    cp   ~/project_name.spec   /tmp/rpmbuild/project_name/rpm/SPECS
    Then call
    Code:
    rpmbuild  -ba   /tmp/rpmbuild/project_name/rpm/SPECS/project_name.spec
    Here is the error :

    Code:
    ...............
    no errors
    ..............
    + /usr/bin/bzip2 -dc /tmp/rpmbuild/project_name/rpm/SOURCES/project_name-project_numpber.tar.bz2
    + /bin/tar -xf -
    + STATUS=0
    + '[' 0 -ne 0 ']'
    + cd project_name-project_number
    /var/tmp/rpm-tmp.S6sP4v: line 32: cd: project_name-project_number: No such file or directory
    error: Bad exit status from /var/tmp/rpm-tmp.S6sP4v (%prep)
    in /var/tmp/rpm-tmp.S6sv I can read

    Code:
    cd '/tmp/rpmbuild/project_name/rpm/BUILD'
    rm -rf 'project_name-project_number'
    /usr/bin/bzip2 -dc '/tmp/rpmbuild/project_name/rpm/SOURCES/project_name-project_number.tar.bz2' | /bin/tar -xf - 
    STATUS=$?
    if [ $STATUS -ne 0 ]; then
      exit $STATUS
    fi
    cd 'project_name-project_number'
    There is no project_name-project_number in the directory /tmp/rpmbuild/project_name/rpm/BUILD
    But there is a directory project_name

    I think that rpmbuild using project_name.spec parameters use the directory project_name in /tmp/rpmbuild/project_name/rpm/BUILD instead of project_name-project_number

    Assistance would be welcome.
    Thanks for helping. JCD
    __________
    server leap 15.0 -- ASUS g75vw KDE leap 15.0 -- ASUS g750JZ Optimus KDE leap 15.1 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  2. #2

    Default Re: HELP NEEDED USING RPMBUILD

    Take a look at this example maybe: http://forums.opensuse.org/english/g...ml#post2418989.

  3. #3
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,068

    Default Re: HELP NEEDED USING RPMBUILD

    Quote Originally Posted by please_try_again View Post
    Take a look at this example maybe: http://forums.opensuse.org/english/g...ml#post2418989.
    I am going to read your link.

    But I am wondering if rpmbuild is using some other configuration file.

    Where does "/var/tmp/rpm-tmp.S6sv" come from. I can imagine that some temp directories are necessary but why using /var.
    Thanks for helping. JCD
    __________
    server leap 15.0 -- ASUS g75vw KDE leap 15.0 -- ASUS g750JZ Optimus KDE leap 15.1 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  4. #4

    Default Re: HELP NEEDED USING RPMBUILD

    Quote Originally Posted by jcdole View Post
    I am going to read your link.

    But I am wondering if rpmbuild is using some other configuration file.
    Set your build environment properly first! And don't build as root!

  5. #5
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,068

    Default Re: HELP NEEDED USING RPMBUILD

    Quote Originally Posted by jcdole View Post
    Hello.

    from /tmp/rpmbuild/project_name/rpm/SOURCE
    Code:
    tar  -cvjf    /tmp/rpmbuild/project_name/rpm/SOURCE/project_name-version_number.tar.bz2
    
    /tmp/rpmbuild/project_name/rpm/SOURCE/project_name-version_number
    Re reading screen logs I found the problem.

    I get this
    Code:
    tar  -cvjf    /tmp/rpmbuild/project_name/rpm/SOURCE/project_name-version_number-version_number.tar.bz2
    
    /tmp/rpmbuild/project_name/rpm/SOURCE/project_name-version_number-version_number
    but I want that :
    Code:
    tar  -cvjf    /tmp/rpmbuild/project_name/rpm/SOURCE/project_name-version_number.tar.bz2
    
    /tmp/rpmbuild/project_name/rpm/SOURCE/project_name-version_number
    Correcting my script it is running correctly.

    Please read following reply.
    Thanks for helping. JCD
    __________
    server leap 15.0 -- ASUS g75vw KDE leap 15.0 -- ASUS g750JZ Optimus KDE leap 15.1 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  6. #6
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,068

    Default Re: HELP NEEDED USING RPMBUILD

    Hello,

    Now when extracting files from the internet tarball, running and following the readme :
    ./configure --prefix=/usr
    make
    I get no error.

    Now when using the script with rpmbuild :

    make --> error: Installed (but unpackaged) file(s) found:
    /usr/lib64/pkgconfig/libdvdcss.pc

    any idea


    RPM build errors:
    Installed (but unpackaged) file(s) found:
    /usr/lib64/pkgconfig/libdvdcss.pc

    I di
    Thanks for helping. JCD
    __________
    server leap 15.0 -- ASUS g75vw KDE leap 15.0 -- ASUS g750JZ Optimus KDE leap 15.1 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  7. #7

    Default Re: HELP NEEDED USING RPMBUILD

    Quote Originally Posted by jcdole View Post
    Now when using the script with rpmbuild :

    make --> error: Installed (but unpackaged) file(s) found:
    /usr/lib64/pkgconfig/libdvdcss.pc

    any idea


    RPM build errors:
    Installed (but unpackaged) file(s) found:
    /usr/lib64/pkgconfig/libdvdcss.pc
    Add /usr/lib64/pkgconfig/libdvdcss.pc in the %files section of your .spec file.

  8. #8
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,071
    Blog Entries
    15

    Default Re: HELP NEEDED USING RPMBUILD

    Quote Originally Posted by jcdole
    jcdole;2421888 Wrote:
    > Hello.
    >
    > from /tmp/rpmbuild/project_name/rpm/SOURCE

    Hi
    You just need to use the %setup macro to expand how you want is the src
    tarball is different, no need to change anything from defaults.
    http://www.rpm.org/max-rpm/s1-rpm-inside-macros.html

    Just make sure your buildroot is set to default
    Code:
    BuildRoot: %{_tmppath}/%{name}-%{version}-build
    --
    Cheers Malcolm °¿° (Linux Counter #276890)
    openSUSE 12.1 (x86_64) Kernel 3.1.0-1.2-desktop
    up 1 day 20:09, 3 users, load average: 0.10, 0.11, 0.07
    CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU


  9. #9
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,068

    Default Re: HELP NEEDED USING RPMBUILD

    hello.

    When extracting files from the internet tarball, running and following the readme :
    ./configure --prefix=/usr
    make
    It seems to make a 32bits library
    and not using the spec file
    Code:
    ....................
    test -z "/usr/include/dvdcss" || /bin/mkdir -p "/usr/include/dvdcss"
     /usr/bin/install -c -m 644 'dvdcss.h' '/usr/include/dvdcss/dvdcss.h'
    ....................
    ....................
    ....................
    ....................
    test -z "/usr/lib" || /bin/mkdir -p "/usr/lib"
     /bin/sh ../libtool --mode=install /usr/bin/install -c  'libdvdcss.la' '/usr/lib/libdvdcss.la'
    libtool: install: /usr/bin/install -c .libs/libdvdcss.so.2.1.0 /usr/lib/libdvdcss.so.2.1.0

    When I try to make the rpm package running rpmbuild, rpmbuild try to make a 64bit library because it using the spec file and ran configure with these parameters
    ./configure --host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info
    Code:
    ....................
    test -z "/usr/include/dvdcss" || /bin/mkdir -p "/tmp/rpmbuild/libdvdcss/rpm/BUILDROOT/libdvdcss-1.2.11-1.x86_64/usr/include/dvdcss"
     /usr/bin/install -c -m 644 'dvdcss.h' '/tmp/rpmbuild/libdvdcss/rpm/BUILDROOT/libdvdcss-1.2.11-1.x86_64/usr/include/dvdcss/dvdcss.h'
    ....................
    ....................
    ....................
    test -z "/usr/lib64" || /bin/mkdir -p "/tmp/rpmbuild/libdvdcss/rpm/BUILDROOT/libdvdcss-1.2.11-1.x86_64/usr/lib64"
     /bin/sh ../libtool --mode=install /usr/bin/install -c  'libdvdcss.la' '/tmp/rpmbuild/libdvdcss/rpm/BUILDROOT/libdvdcss-1.2.11-1.x86_64/usr/lib64/libdvdcss.la'
    libtool: install: /usr/bin/install -c .libs/libdvdcss.so.2.1.0 /tmp/rpmbuild/libdvdcss/rpm/BUILDROOT/libdvdcss-1.2.11-1.x86_64/usr/lib64/libdvdcss.so.2.1.0
    so I suppose that I must modify the spec file ?

    nota : I am doing this for :
    1°) install and update this package
    2°) add the vendor name in the rpm database by modifying the spec file. I want
    Code:
     rpm -qa --queryformat '%{NAME} -> %{VENDOR}\n' | grep -i Vendor-name
    return the package with the vendor name (which is not in the initial internet package).


    merry Christmas and happy holidays.
    Thanks for helping. JCD
    __________
    server leap 15.0 -- ASUS g75vw KDE leap 15.0 -- ASUS g750JZ Optimus KDE leap 15.1 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  10. #10
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,068

    Default Re: HELP NEEDED USING RPMBUILD

    Quote Originally Posted by jcdole View Post
    hello.

    When extracting files from the internet tarball, running and following the readme :
    ./configure --prefix=/usr
    make
    Code:
    It seems to make a 32bits library
    and not using the spec file
    Remove this stupidity on my part.
    Read :
    When extracting files from the internet tarball, running and following the readme :
    ./configure --prefix=/usr
    make
    It seems it is not using the spec file.


    happy holidays.
    Thanks for helping. JCD
    __________
    server leap 15.0 -- ASUS g75vw KDE leap 15.0 -- ASUS g750JZ Optimus KDE leap 15.1 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

Page 1 of 2 12 LastLast

Posting Permissions

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