[Buildroot] Issues with SVN keywords and SITE_METHOD = svn

Yann E. MORIN yann.morin.1998 at free.fr
Thu Aug 19 20:13:44 UTC 2021


Oscar, All,

On 2021-08-19 20:26 +0200, Oscar Gomez Fuente spake thusly:
> I am updating my buildroot from 2020.08.2 to 2021.05.1 and I have
> found a problem.
> 
> I have my own package created years ago with SITE_METHOD = svn. There
> are some files in that repository with keyword substitution that with
> buildroot 2020.08.2 works perfectly and the headers of the file is
> downloads from the repository perfectly, as you can see:
[--SNIP--]
> But with buildroot 2021.05.1 doesn't work fine:
[--SNIP--]
> I have check that my subversion is working propelrly in my computer,
> so I donot knoe what to do, to know this Rev keyword is very important
> for me due to the fact I use it for showing when I execute the
> program.
> 
> Does anyone have any idea how to fix this issue?

As Vincent alerady replied, this was done intentionally, because keyword
substitution is dependent upon the settings at export/checkout:
different timezones and/or locales can yield different substitutions,
and this is thus not reproducible.

If knowing the revision is important in your package, you already have
it in the .mk, and so you could try a few things, like pass it at
configure time via a environment variable or via a file...

Altenatively, you could also decide to do the replacement on your own,
with a post-extract hook, something like:

    $(SED) 's,$$Rev$$,$(FOO_VERSION),' $(shell grep -r -l -E '$$Rev$$' $(@D))

But this is not very robust, and keyword substitution is anyway a really
bad idea...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



More information about the buildroot mailing list