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

Re: Using custom macro files

Hash: SHA1

On Thursday January 30, 2003 01:31 am, Todd Pytel wrote:
> Perhaps I'm missing some complexity, but doesn't /etc/rpm/macros fit
> your needs? It's part of the default macro path, so specs don't need
> modification. And it won't be overwritten by new RPM versions - first
> off because it's a config file in /etc, and second because RPM, IIRC,
> doesn't install this file anyway.

If rpm did install the file it would need to be added with %config(noreplace) 
to be safe, but as you mentioned, this point is moot.

First, I hate to be creating files on the system not owned by any package, but 
I'm not sure that my package should (or even can) own the file 
/etc/rpm/macros, since the file is being autogenerated, not simply copied 
over, as this would replace any file which the user has created on his own.

Second, and more importantly, the custom macros file is fairly large and 
contains many macros. I simply can't cat the contents into /etc/rpm/macros 
since, besides obviously being a mess, it makes upgrading these macros a 
nightmare. I was hoping I could use %include and simply include my macros 
file, but this isn't making the macros available when building, yet it 
doesn't tell me that %include is an invalid macro, so I'm not sure what's 
going on, but it's not what I'm expecting to happen.

When I was modifying the macrofiles portion of /usr/lib/rpm/rpmrc, it did make 
the macros available when building and thus worked like I expected it to.

So I'm not sure if I am making it more complex than it needs to be, but I 
can't seem to get it to work. Either it only works by modifying a file that 
rpm will later replace, or I can get rpm to read a file in /etc that it will 
not replace, but then the macros do not seem to be available.

- -- 

David Walluck
Version: GnuPG v1.2.1 (GNU/Linux)


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