I'm late to the party, but there are factual errors here that deserve
correcting.
On 7/4/20 10:23 AM, Nicolas Mailhot via devel wrote:
Le vendredi 03 juillet 2020 à 11:09 -0700, PGNet Dev a écrit :
%define _build_timestamp %( date +%Y%m%d_%H%M%S )
You’re hitting rpm macro expansion
Le vendredi 03 juillet 2020 à 11:09 -0700, PGNet Dev a écrit :
>
> %define _build_timestamp %( date +%Y%m%d_%H%M%S )
>
You’re hitting rpm macro expansion and the fact someone added %S as
alias to%SOURCE in recent rpm versions (source management is an unholly
mess in original rpm and people
On 7/3/20 11:22 AM, Paul Howarth wrote:
> Remember
ugh. well, i certainly will NOW! ;-)
> that '%' introduces a macro expansion, so if that's not what
> you want, you should escape the '%' as '%%':
>
> %define _build_timestamp %( date +%%Y%%m%%d_%%H%%M%%S )
works perfectly. thx!
___
PGNet Dev wrote:
> %define _build_timestamp %( date +%Y%m%d_%H%M%S )
Percent signs that are not to be interpreted as RPM syntax need to be
doubled. Write this as:
%define _build_timestamp %(date +%%Y%%m%%d_%%H%%M%%S)
Björn Persson
pgpSR1gksDcHm.pgp
Description: OpenPGP digital signatur
On Fri, 3 Jul 2020 11:09:47 -0700
PGNet Dev wrote:
> on F32,
>
> date +FORMAT,
> date +%Y%m%d_%H%M%S
>
> returns
> 20200703_105351
>
>
>
> as expected.
>
> in an rpm .spec, if I define
>
> %define _build_timestamp %( date +%Y%m%d_%H%M%S )
>
> and _use_ %{_build_timestamp
on F32,
date +FORMAT,
date +%Y%m%d_%H%M%S
returns
20200703_105351
as expected.
in an rpm .spec, if I define
%define _build_timestamp %( date +%Y%m%d_%H%M%S )
and _use_ %{_build_timestamp) _anywhere_ else in the spec, at exec of any of
rpmbuild/mock