All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Issues with SVN keywords and SITE_METHOD = svn
@ 2021-08-19 18:26 Oscar Gomez Fuente
  2021-08-19 18:58 ` Vincent Fazio
  2021-08-19 20:13 ` Yann E. MORIN
  0 siblings, 2 replies; 4+ messages in thread
From: Oscar Gomez Fuente @ 2021-08-19 18:26 UTC (permalink / raw)
  To: buildroot

Hi everyone,

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:

! /usr/bin/python
# /**
#  * @file name.py
#  * @author  Oscar Gomez Fuente <ogomez@xxxx.xxx>
#  * @version $Rev: 161 $
#  * @date $Date: 2021-08-19 11:50:25 +0200 (jue, 19 ago 2021) $
#  * @section DESCRIPTION
....

But with buildroot 2021.05.1 doesn't work fine:

#! /usr/bin/python
# /**
#  * @file name.py
#  * @author  Oscar Gomez Fuente <ogomez@xxxx.xxx>
#  * @version $Rev$
#  * @date $Date$
#  * @section DESCRIPTION
...

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?

Thanks.

Óscar Gómez Fuente
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] Issues with SVN keywords and SITE_METHOD = svn
  2021-08-19 18:26 [Buildroot] Issues with SVN keywords and SITE_METHOD = svn Oscar Gomez Fuente
@ 2021-08-19 18:58 ` Vincent Fazio
  2021-08-19 19:30   ` Oscar Gomez Fuente
  2021-08-19 20:13 ` Yann E. MORIN
  1 sibling, 1 reply; 4+ messages in thread
From: Vincent Fazio @ 2021-08-19 18:58 UTC (permalink / raw)
  To: Oscar Gomez Fuente, buildroot

Please see BR commit c92be85e3a2

https://patchwork.ozlabs.org/project/buildroot/patch/20210310225937.3155075-1-yann.morin.1998@free.fr/


On 8/19/21 1:26 PM, Oscar Gomez Fuente wrote:
> Hi everyone,
>
> 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:
>
> ! /usr/bin/python
> # /**
> #  * @file name.py
> #  * @author  Oscar Gomez Fuente <ogomez@xxxx.xxx>
> #  * @version $Rev: 161 $
> #  * @date $Date: 2021-08-19 11:50:25 +0200 (jue, 19 ago 2021) $
> #  * @section DESCRIPTION
> ....
>
> But with buildroot 2021.05.1 doesn't work fine:
>
> #! /usr/bin/python
> # /**
> #  * @file name.py
> #  * @author  Oscar Gomez Fuente <ogomez@xxxx.xxx>
> #  * @version $Rev$
> #  * @date $Date$
> #  * @section DESCRIPTION
> ...
>
> 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?
>
> Thanks.
>
> Óscar Gómez Fuente
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
Vincent Fazio
Embedded Software Engineer - ATS
Extreme Engineering Solutions, Inc
http://www.xes-inc.com

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] Issues with SVN keywords and SITE_METHOD = svn
  2021-08-19 18:58 ` Vincent Fazio
@ 2021-08-19 19:30   ` Oscar Gomez Fuente
  0 siblings, 0 replies; 4+ messages in thread
From: Oscar Gomez Fuente @ 2021-08-19 19:30 UTC (permalink / raw)
  To: Vincent Fazio; +Cc: buildroot

I have made these two changes:

---
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 2527ba5..088f006 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -20,7 +20,7 @@ export LOCALFILES := $(call qstrip,$(BR2_LOCALFILES))
 # Version of the format of the archives we generate in the corresponding
 # download backend:
 BR_FMT_VERSION_git = -br1
-BR_FMT_VERSION_svn = -br2
+BR_FMT_VERSION_svn = -br1

 DL_WRAPPER = support/download/dl-wrapper

diff --git a/support/download/svn b/support/download/svn
index b23b777..71a1042 100755
--- a/support/download/svn
+++ b/support/download/svn
@@ -50,7 +50,7 @@ _plain_svn() {
     eval ${SVN} "${@}"
 }

-_svn export --ignore-keywords ${quiet} "${@}" "'${uri}@${rev}'" "'${basename}'"
+_svn export ${quiet} "${@}" "'${uri}@${rev}'" "'${basename}'"
---

And it works perfectly.

Thank you.

On Thu, 19 Aug 2021 at 20:58, Vincent Fazio <vfazio@xes-inc.com> wrote:
>
> Please see BR commit c92be85e3a2
>
> https://patchwork.ozlabs.org/project/buildroot/patch/20210310225937.3155075-1-yann.morin.1998@free.fr/
>
>
> On 8/19/21 1:26 PM, Oscar Gomez Fuente wrote:
> > Hi everyone,
> >
> > 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:
> >
> > ! /usr/bin/python
> > # /**
> > #  * @file name.py
> > #  * @author  Oscar Gomez Fuente <ogomez@xxxx.xxx>
> > #  * @version $Rev: 161 $
> > #  * @date $Date: 2021-08-19 11:50:25 +0200 (jue, 19 ago 2021) $
> > #  * @section DESCRIPTION
> > ....
> >
> > But with buildroot 2021.05.1 doesn't work fine:
> >
> > #! /usr/bin/python
> > # /**
> > #  * @file name.py
> > #  * @author  Oscar Gomez Fuente <ogomez@xxxx.xxx>
> > #  * @version $Rev$
> > #  * @date $Date$
> > #  * @section DESCRIPTION
> > ...
> >
> > 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?
> >
> > Thanks.
> >
> > Óscar Gómez Fuente
> > _______________________________________________
> > buildroot mailing list
> > buildroot@busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
>
> --
> Vincent Fazio
> Embedded Software Engineer - ATS
> Extreme Engineering Solutions, Inc
> http://www.xes-inc.com
>
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Buildroot] Issues with SVN keywords and SITE_METHOD = svn
  2021-08-19 18:26 [Buildroot] Issues with SVN keywords and SITE_METHOD = svn Oscar Gomez Fuente
  2021-08-19 18:58 ` Vincent Fazio
@ 2021-08-19 20:13 ` Yann E. MORIN
  1 sibling, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2021-08-19 20:13 UTC (permalink / raw)
  To: Oscar Gomez Fuente; +Cc: buildroot

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.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-19 20:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-19 18:26 [Buildroot] Issues with SVN keywords and SITE_METHOD = svn Oscar Gomez Fuente
2021-08-19 18:58 ` Vincent Fazio
2021-08-19 19:30   ` Oscar Gomez Fuente
2021-08-19 20:13 ` Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.