All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH krogoth+] fetch2: fix unpack of symbolic links
@ 2016-06-22  9:34 Stefan Christ
  2016-06-22 15:49 ` akuster
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Christ @ 2016-06-22  9:34 UTC (permalink / raw)
  To: bitbake-devel

Files in the download directory can be symbolic links to the real file.
The fetcher must copy the real file instead of copying the symbolic
link. Otherwise other tasks will fail, like patching, or the recipe will
modify files in the download directory.

This patch fixes commit 865d2fef ("bitbake: fetch2: fixes copying of
file://dir; subdir=foo, bug 6128 and bug 6129").

Signed-off-by: Stefan Christ <s.christ@phytec.de>
---
 bitbake/lib/bb/fetch2/__init__.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index e8fbe89..a1819e7 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1423,7 +1423,9 @@ class FetchMethod(object):
                     if urlpath.find("/") != -1:
                         destdir = urlpath.rsplit("/", 1)[0] + '/'
                         bb.utils.mkdirhier("%s/%s" % (unpackdir, destdir))
-                cmd = 'cp -fpPR %s %s' % (file, destdir)
+                # Use -L to always resolve symbolic links. Files in download
+                # directory can be links to the real file.
+                cmd = 'cp -fpLR %s %s' % (file, destdir)
 
         if not cmd:
             return
-- 
1.9.1



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

* Re: [PATCH krogoth+] fetch2: fix unpack of symbolic links
  2016-06-22  9:34 [PATCH krogoth+] fetch2: fix unpack of symbolic links Stefan Christ
@ 2016-06-22 15:49 ` akuster
  2016-06-23 11:00   ` Stefan Christ
  0 siblings, 1 reply; 4+ messages in thread
From: akuster @ 2016-06-22 15:49 UTC (permalink / raw)
  To: Stefan Christ, bitbake-devel

Does the "Krogoth+" mean "master" too?

- armin

On 06/22/2016 02:34 AM, Stefan Christ wrote:
> Files in the download directory can be symbolic links to the real file.
> The fetcher must copy the real file instead of copying the symbolic
> link. Otherwise other tasks will fail, like patching, or the recipe will
> modify files in the download directory.
> 
> This patch fixes commit 865d2fef ("bitbake: fetch2: fixes copying of
> file://dir; subdir=foo, bug 6128 and bug 6129").
> 
> Signed-off-by: Stefan Christ <s.christ@phytec.de>
> ---
>  bitbake/lib/bb/fetch2/__init__.py | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
> index e8fbe89..a1819e7 100644
> --- a/bitbake/lib/bb/fetch2/__init__.py
> +++ b/bitbake/lib/bb/fetch2/__init__.py
> @@ -1423,7 +1423,9 @@ class FetchMethod(object):
>                      if urlpath.find("/") != -1:
>                          destdir = urlpath.rsplit("/", 1)[0] + '/'
>                          bb.utils.mkdirhier("%s/%s" % (unpackdir, destdir))
> -                cmd = 'cp -fpPR %s %s' % (file, destdir)
> +                # Use -L to always resolve symbolic links. Files in download
> +                # directory can be links to the real file.
> +                cmd = 'cp -fpLR %s %s' % (file, destdir)
>  
>          if not cmd:
>              return
> 


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

* Re: [PATCH krogoth+] fetch2: fix unpack of symbolic links
  2016-06-22 15:49 ` akuster
@ 2016-06-23 11:00   ` Stefan Christ
  2016-06-23 20:50     ` Leonardo Sandoval
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Christ @ 2016-06-23 11:00 UTC (permalink / raw)
  To: akuster; +Cc: bitbake-devel

Hi Armin,

On Wed, Jun 22, 2016 at 08:49:42AM -0700, akuster wrote:
> Does the "Krogoth+" mean "master" too?
> 
> - armin
> 

Yes. The patch applies on master and krogoth.

Mit freundlichen Grüßen / Kind regards,
	Stefan Christ

> On 06/22/2016 02:34 AM, Stefan Christ wrote:
> > Files in the download directory can be symbolic links to the real file.
> > The fetcher must copy the real file instead of copying the symbolic
> > link. Otherwise other tasks will fail, like patching, or the recipe will
> > modify files in the download directory.
> > 
> > This patch fixes commit 865d2fef ("bitbake: fetch2: fixes copying of
> > file://dir; subdir=foo, bug 6128 and bug 6129").
> > 
> > Signed-off-by: Stefan Christ <s.christ@phytec.de>
> > ---
> >  bitbake/lib/bb/fetch2/__init__.py | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
> > index e8fbe89..a1819e7 100644
> > --- a/bitbake/lib/bb/fetch2/__init__.py
> > +++ b/bitbake/lib/bb/fetch2/__init__.py
> > @@ -1423,7 +1423,9 @@ class FetchMethod(object):
> >                      if urlpath.find("/") != -1:
> >                          destdir = urlpath.rsplit("/", 1)[0] + '/'
> >                          bb.utils.mkdirhier("%s/%s" % (unpackdir, destdir))
> > -                cmd = 'cp -fpPR %s %s' % (file, destdir)
> > +                # Use -L to always resolve symbolic links. Files in download
> > +                # directory can be links to the real file.
> > +                cmd = 'cp -fpLR %s %s' % (file, destdir)
> >  
> >          if not cmd:
> >              return
> > 


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

* Re: [PATCH krogoth+] fetch2: fix unpack of symbolic links
  2016-06-23 11:00   ` Stefan Christ
@ 2016-06-23 20:50     ` Leonardo Sandoval
  0 siblings, 0 replies; 4+ messages in thread
From: Leonardo Sandoval @ 2016-06-23 20:50 UTC (permalink / raw)
  To: Stefan Christ, akuster; +Cc: bitbake-devel

I believe there is no agreement but in general, sending n patches 
(perhaps all identical) just changing the branch target would be the way 
to do this. Doing some patchwork patch fetching and parsing, this is 
what I found related to the format between [XXX]


* fraction only, i.e. [0/10]
* version only, i.e. [v2]
* fraction + branch, i.e. [0/10, fido]
* branch + fraction, i.e. [fido, 0/10]
* fraction + branch + version, i.e. [0/10, fido, v2]
* patch string, i.e. [PATCH]
* patch string + version, i.e. [PATCHv2]
* etc..

So this indicates that we need a better guideline to submit patches, at 
least on this area.

On 06/23/2016 06:00 AM, Stefan Christ wrote:
> Hi Armin,
>
> On Wed, Jun 22, 2016 at 08:49:42AM -0700, akuster wrote:
>> Does the "Krogoth+" mean "master" too?
>>
>> - armin
>>
> Yes. The patch applies on master and krogoth.
>
> Mit freundlichen Grüßen / Kind regards,
> 	Stefan Christ
>
>> On 06/22/2016 02:34 AM, Stefan Christ wrote:
>>> Files in the download directory can be symbolic links to the real file.
>>> The fetcher must copy the real file instead of copying the symbolic
>>> link. Otherwise other tasks will fail, like patching, or the recipe will
>>> modify files in the download directory.
>>>
>>> This patch fixes commit 865d2fef ("bitbake: fetch2: fixes copying of
>>> file://dir; subdir=foo, bug 6128 and bug 6129").
>>>
>>> Signed-off-by: Stefan Christ <s.christ@phytec.de>
>>> ---
>>>   bitbake/lib/bb/fetch2/__init__.py | 4 +++-
>>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
>>> index e8fbe89..a1819e7 100644
>>> --- a/bitbake/lib/bb/fetch2/__init__.py
>>> +++ b/bitbake/lib/bb/fetch2/__init__.py
>>> @@ -1423,7 +1423,9 @@ class FetchMethod(object):
>>>                       if urlpath.find("/") != -1:
>>>                           destdir = urlpath.rsplit("/", 1)[0] + '/'
>>>                           bb.utils.mkdirhier("%s/%s" % (unpackdir, destdir))
>>> -                cmd = 'cp -fpPR %s %s' % (file, destdir)
>>> +                # Use -L to always resolve symbolic links. Files in download
>>> +                # directory can be links to the real file.
>>> +                cmd = 'cp -fpLR %s %s' % (file, destdir)
>>>   
>>>           if not cmd:
>>>               return
>>>



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

end of thread, other threads:[~2016-06-23 20:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-22  9:34 [PATCH krogoth+] fetch2: fix unpack of symbolic links Stefan Christ
2016-06-22 15:49 ` akuster
2016-06-23 11:00   ` Stefan Christ
2016-06-23 20:50     ` Leonardo Sandoval

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.