Re: use of 'date' in rpm .spec %define concats add'l str chars?

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

 



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 keep bolting new workarounds over old
workarounds insteak of fixing it once and for all. The original lua
integration in rpm was justified by the needs of the %sources macro,
that’s not an accident).

It is unsafe to use % for anything except rpm macro calls in a spec
file, unless you escape it with % first.

As for date, you’ll be generally better using a standard like --iso-
8601 or --rfc-3339, even if that means a lua gsub pass to replace
characters rpm does not like, than inventing your own. And don’t forget
the -u flag or you’ll have surprises as soon as you start working with
people not in your own timezone.

Reagrds,

-- 
Nicolas Mailhot
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux