[TriLUG] hacking a broken src rpm
Vestal, Roy L.
rvestal at rti.org
Mon Jun 3 09:10:02 EDT 2002
Newbie question:
What's the difference between src.rpms and regular rpms?
-----Original Message-----
From: rpjday [mailto:rpjday at mindspring.com]
Sent: Friday, May 31, 2002 4:43 PM
To: TriLUG
Subject: [TriLUG] hacking a broken src rpm
since there might be a couple other people who might need to
do this some day, here's the quick-and-dirty for hacking a src rpm
that refuses to build.
as an example, the autolog-0.40-1.src.rpm that kevin was trying
to build. if you want to play along at home, go get it from
rpmfind.net. (make sure you've installed the rpm-build rpm first.)
first,
# rpm --rebuild autolog...src.rpm (fails badly)
so, one step at a time.
first,
# rpm -ivh autolog...src.rpm
that installs the source tarball and spec file under /usr/src/redhat,
subdirs SPECS and SOURCES. cd to the SPECS directory, try to just do
the "prep" stage of building from a src rpm:
# rpm -bp autolog.spec (seems to work)
since that works, try to compile:
# rpm -bc autolog.spec
whoops, fails badly, something about "gcc %{rpmcflags}", no such file
or directory. not knowing enough about spec files, edit the spec file,
find the "%{__make}" line and totally remove the CFLAGS options part
of it. when in doubt, toss it out. try again:
# rpm -bc autolog.spec
works. finally, build the binary RPM itself, adding the "--short-circuit"
option to avoid redoing the previous steps for efficiency:
# rpm -bb --short-circuit autolog.spec
seems to work, you now have a binary RPM under the RPMS/i386 directory.
someone more knowledgeable about spec files can probably suggest what
was wrong with the line
%{__make} CFLAGS="%{rpmcflags}"
rday
_______________________________________________
TriLUG mailing list
http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ:
http://www.trilug.org/~lovelace/faq/TriLUG-faq.html
More information about the TriLUG
mailing list