Re: Newbie rpmbuild question: change directory error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Circa 2006-03-20 02:45 dixit Raman Gupta:

: Jim Knoble wrote:
: > Circa 2006-03-20 01:53 dixit Raman Gupta:
: > : I am now attempting to build the msttcorefonts RPM (spec file at [2]).
: > : However, any lines that involve "cd <somedir>" seem to fail during building:
: > 
: >   [...]
: > 
: > : It works fine if I edit the spec file and change all lines involving cd,
: > : and prefix a `pwd`/ before them e.g.
: > : 
: > : cd %{name}
: > : 
: > : change to
: > : 
: > : cd `pwd`/%{name}
: > 
: >   [...]
: > 
: > : Can anyone tell me why this is happening and how I can fix it? I don't
: > : want to continue to build RPMs as root.
: > 
: > Please share your ~/.rpmmacros and ~/.rpmrc files.
: 
: They are exactly as contained in this archive:
: ftp://people.redhat.com/mharris/hacks/rpmbuild-nonroot-1.0.tar.gz
: 
: Except that I changed one thing in .rpmmacros:
: 
: %_buildroot     %{_topdir}/%{_tmppath}/%{name}-%{version}-root
: 
: to
: 
: %_buildroot     %{_tmppath}/%{name}-%{version}-root
: 
: (since _tmppath already includes _topdir)

I'd suggest creating a minimal specfile (such as the one below) and
using it to try to reproduce the problem.  For example create the file
'blah.spec' as follows:

    Name: blah
    Version: 1.0
    Release: 1
    Summary: blah
    Group: blah
    License: blah

    %description
    blah

    %prep
    pwd

    %build

    %install

    %files

Then run 'rpmbuild -bp blah.spec' and inspect the output.  Does the
'pwd' return what you expect?  Try creating a minimal source tarball
(containing a directory, 'blah-1.0', and a single file,
'blah-1.0/blah').  Add a 'Source0: blah-1.0.tar.gz' line to the
specfile, drop the tarball into your SOURCES directory, and add a %setup
line to your %prep section.  Does that do what you expect?  If those
things work, then your other, more complex specfile may be at fault.....

-- 
jim knoble  |  jmknoble@xxxxxxxxx  |  http://www.pobox.com/~jmknoble/
(GnuPG key ID: 6F39C2CC  >>>>>>  http://www.pobox.com/~jmknoble/keys/ )
(GnuPG fingerprint: 5024:D578:7CF4:5660:7269::F6F3:B919:9307:6F39:C2CC)
________________________________________________________________________
|"[L]iberty, as we all know, cannot flourish in a country that is perma-
| nently on a war footing, or even a near-war footing."  --Aldous Huxley
|_______________________________________________________________________

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux