Re: adding a macrofile to macrofiles list

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

 




On Aug 8, 2006, at 11:18 AM, Lars Wilke wrote:

Hi,

i am trying to *add* another macrofile to the list of sourced
macrofiles. But i cannot find a way to do so. The --macros
option to rpmbuild and rpm say that this file list is used
instead of the original list. So i ask is there a simple
way to do this. The only solution i can think of is:

 1.  Parse the output of --showrc
 2.  Extract the macrofiles setting
 3.  Append my files to it
 4.  Pass this to rpm/rpmbuild via --macros

Is this really the way to go?


Actually what you need to do is generate a 2 line rcfile, and put macrofiles within.

So the rcfile you want is
	include: /usr/lib/rpm/rpmrc
	macrofiles: whatever you want here
and invoke as
	rpmbuild --rcfile myrpmrc

Strange, i tried that with

   rpm --macros=<my_file> --eval "%{_topdir}"

Which returned /usr/src/redhat, though _topdir is redefined in
<my_file>!?

When i use

   rpm --rcfile=bla --eval "%{_topdir}"

and the rcfile contains macrofiles: <my_file>
the eval returns the correct _topdir.


You can try rpm-4.4.7-0.15 if you want
	ftp://wraptastic.org/pub/rpm-devel

All of the above got repaired this weekend past, see <rpm- devel@xxxxxxxxxxxxxxxxxxxx>.

Be forewarned: Hardly anyone but me has tried using rpm-4.4.7.

The reason for all this is, that i do the builds in some
subdirectories of various repository branches (mercurial).
Depending on the branch, this is in mercurial just another
directory, some macro definitions have to be changed i.e.
_topdir etc. and some branches do even define their own
macros depending on the release branch (stable, devel ...).
The release branch is parsed from the repository/directory name.
With a wrapper script this is all good and fine. On the first
run the necessary macros are generated and stored in a repo_rpm_macros
file. Now i tried to rerun a build from the commandline
passing the generated macros file via --macros to rpmbuild,
but this, according to the docs, would not allow me to source all
the default macro files.

Any hints?


Good luck!

73 de Jeff

_______________________________________________
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