There are a lot of generally useful macros in Fedora, which are not
described in the Fedora wiki: %__awk, %__bzip2, %__cat, %__chgrp,
%__chmod, %__chown, %__cp, %__cpio, %__file, %__gpg, %__grep,
%__gzip, %__id, %__install, %__ln_s, %__lzma, %__xz, %__make,
%__mkdir, %__mkdir_p, %__mv, %__patch, %__perl, %__pgp, %__python,
%__rm, %__rsh, %__sed, %__ssh, %__tar, %__unzip, etc.
These macros are defined in /usr/lib/rpm/macros.
Some maintainers use them, some do not.
What is recommended way?
--
With best regards,
Nikolay Ulyanitsky
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
03-13-2010, 04:15 PM
Adam Williamson
Using generally useful macros
On Sat, 2010-03-13 at 19:10 +0200, Nikolay Ulyanitsky wrote:
> Hi
>
> There are a lot of generally useful macros in Fedora, which are not
> described in the Fedora wiki: %__awk, %__bzip2, %__cat, %__chgrp,
> %__chmod, %__chown, %__cp, %__cpio, %__file, %__gpg, %__grep,
> %__gzip, %__id, %__install, %__ln_s, %__lzma, %__xz, %__make,
> %__mkdir, %__mkdir_p, %__mv, %__patch, %__perl, %__pgp, %__python,
> %__rm, %__rsh, %__sed, %__ssh, %__tar, %__unzip, etc.
>
> These macros are defined in /usr/lib/rpm/macros.
>
> Some maintainers use them, some do not.
>
> What is recommended way?
I've always considered most of those to be fairly useless, since the
chance of any of those command names changing on a timescale we care
much about is pretty tiny.
--
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Fedora Talk: adamwill AT fedoraproject DOT org
http://www.happyassassin.net
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
03-13-2010, 04:30 PM
"Jason L Tibbitts III"
Using generally useful macros
>>>>> "NU" == Nikolay Ulyanitsky <lystor@lystor.org.ua> writes:
NU> Some maintainers use them, some do not.
I guess people who really like extra typing, wrist pain or spec files
which are difficult to read would use them.
NU> What is recommended way?
It's up to you, but something like "%{__cp}" is absolutely pointless and
five shifted characters longer than "cp". When doing package reviews
(on the rare occasion these days that I have time to do them) if I see a
spec that uses that kind of junk I simply skip right over it.
- J<
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
03-13-2010, 04:51 PM
Michael Schwendt
Using generally useful macros
On Sat, 13 Mar 2010 19:10:44 +0200, Nikolay wrote:
> Hi
>
> There are a lot of generally useful macros in Fedora, which are not
> described in the Fedora wiki: %__awk, %__bzip2, %__cat, %__chgrp,
> %__chmod, %__chown, %__cp, %__cpio, %__file, %__gpg, %__grep,
> %__gzip, %__id, %__install, %__ln_s, %__lzma, %__xz, %__make,
> %__mkdir, %__mkdir_p, %__mv, %__patch, %__perl, %__pgp, %__python,
> %__rm, %__rsh, %__sed, %__ssh, %__tar, %__unzip, etc.
>
> These macros are defined in /usr/lib/rpm/macros.
>
> Some maintainers use them, some do not.
>
> What is recommended way?
Not to use them.
Unless you ensure that the entire build framework uses them, too (which
means, for example, that you have "configure" scripts and Makefiles also
run what those macros expand to). Or else it would run whatever it finds
in $PATH. And if that is fine, why not rely on $PATH also in the spec
file?
Btw, the set of macros is incomplete, and some of the macros don't even
include an absolute path, e.g.
--
With best regards,
Nikolay Ulyanitsky
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
03-16-2010, 05:09 PM
Kevin Kofler
Using generally useful macros
Nikolay Ulyanitsky wrote:
> There are a lot of generally useful macros in Fedora, which are not
> described in the Fedora wiki: %__awk, %__bzip2, %__cat, %__chgrp,
> %__chmod, %__chown, %__cp, %__cpio, %__file, %__gpg, %__grep,
> %__gzip, %__id, %__install, %__ln_s, %__lzma, %__xz, %__make,
> %__mkdir, %__mkdir_p, %__mv, %__patch, %__perl, %__pgp, %__python,
> %__rm, %__rsh, %__sed, %__ssh, %__tar, %__unzip, etc.
They're not described because they're actually not "generally useful" at
all, but completely useless. They just expand to full paths which makes no
sense because PATH exists for a reason, and sometimes not even that.
> These macros are defined in /usr/lib/rpm/macros.
Mostly for historical/backwards-compatibility reasons, I guess. It also
increases compatibility with specfiles from some other distros which really
like those macros for some reason.
> Some maintainers use them, some do not.
>
> What is recommended way?
As others have already recommended: Don't use that junk. :-)
Kevin Kofler
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
03-16-2010, 05:32 PM
Till Maas
Using generally useful macros
On Tue, Mar 16, 2010 at 07:09:59PM +0100, Kevin Kofler wrote:
> Nikolay Ulyanitsky wrote:
> > There are a lot of generally useful macros in Fedora, which are not
> > described in the Fedora wiki: %__awk, %__bzip2, %__cat, %__chgrp,
> > %__chmod, %__chown, %__cp, %__cpio, %__file, %__gpg, %__grep,
> > %__gzip, %__id, %__install, %__ln_s, %__lzma, %__xz, %__make,
> > %__mkdir, %__mkdir_p, %__mv, %__patch, %__perl, %__pgp, %__python,
^^^^^^^^^
> > %__rm, %__rsh, %__sed, %__ssh, %__tar, %__unzip, etc.
>
> They're not described because they're actually not "generally useful" at
> all, but completely useless. They just expand to full paths which makes no
> sense because PATH exists for a reason, and sometimes not even that.
>
> > These macros are defined in /usr/lib/rpm/macros.
>
> Mostly for historical/backwards-compatibility reasons, I guess. It also
> increases compatibility with specfiles from some other distros which really
> like those macros for some reason.
>
> > Some maintainers use them, some do not.
> >
> > What is recommended way?
>
> As others have already recommended: Don't use that junk. :-)
The python rpmdev-newspec templates use %__python btw. I do not know,
whether it is somehow required for the python multiple stack support,
though.
Regards
Till
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
03-16-2010, 05:53 PM
Peter Jones
Using generally useful macros
On 03/16/2010 02:32 PM, Till Maas wrote:
> On Tue, Mar 16, 2010 at 07:09:59PM +0100, Kevin Kofler wrote:
>> Nikolay Ulyanitsky wrote:
>>> There are a lot of generally useful macros in Fedora, which are not
>>> described in the Fedora wiki: %__awk, %__bzip2, %__cat, %__chgrp,
>>> %__chmod, %__chown, %__cp, %__cpio, %__file, %__gpg, %__grep,
>>> %__gzip, %__id, %__install, %__ln_s, %__lzma, %__xz, %__make,
>>> %__mkdir, %__mkdir_p, %__mv, %__patch, %__perl, %__pgp, %__python,
> ^^^^^^^^^
>>> %__rm, %__rsh, %__sed, %__ssh, %__tar, %__unzip, etc.
>>
>> They're not described because they're actually not "generally useful" at
>> all, but completely useless. They just expand to full paths which makes no
>> sense because PATH exists for a reason, and sometimes not even that.
>>
>>> These macros are defined in /usr/lib/rpm/macros.
>>
>> Mostly for historical/backwards-compatibility reasons, I guess. It also
>> increases compatibility with specfiles from some other distros which really
>> like those macros for some reason.
>>
>>> Some maintainers use them, some do not.
>>>
>>> What is recommended way?
>>
>> As others have already recommended: Don't use that junk. :-)
>
> The python rpmdev-newspec templates use %__python btw. I do not know,
> whether it is somehow required for the python multiple stack support,
> though.
I'm pretty sure the point of these was to support other /operating systems/,
where e.g. you might need sed from /usr/lib/ucb .
That's total hogwash, of course, and these are actually completely useless.
--
Peter
Obviously, a major malfunction has occurred.
-- Steve Nesbitt, voice of Mission Control, January 28, 1986
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
03-17-2010, 06:54 AM
Matěj Cepl
Using generally useful macros
Dne 16.3.2010 19:53, Peter Jones napsal(a):
> I'm pretty sure the point of these was to support other /operating systems/,
> where e.g. you might need sed from /usr/lib/ucb .
>
> That's total hogwash, of course, and these are actually completely useless.
Of course, +100.
Also to have platform-independent platform-dependent metadata (that's
all what .spec is IMHO) is a goal which I just cannot get my brain around.