All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] dosfstools-2.11: Fix memory leak in mkdosfs
@ 2015-08-06  9:06 Amarnath Valluri
  2015-08-06  9:12 ` Alexander Kanavin
  0 siblings, 1 reply; 12+ messages in thread
From: Amarnath Valluri @ 2015-08-06  9:06 UTC (permalink / raw)
  To: openembedded-core

Added new patch that fixes the memory leak that was introduced in
mkdosfs-dir.patch.

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
---
 .../dosfstools/dosfstools-Fix-memroy-leak.patch    | 30 ++++++++++++++++++++++
 .../recipes-devtools/dosfstools/dosfstools_2.11.bb |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 meta/recipes-devtools/dosfstools/dosfstools/dosfstools-Fix-memroy-leak.patch

diff --git a/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-Fix-memroy-leak.patch b/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-Fix-memroy-leak.patch
new file mode 100644
index 0000000..555250f
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-Fix-memroy-leak.patch
@@ -0,0 +1,30 @@
+From 2c2408d815b7cd76a2edd4261eb051e264993090 Mon Sep 17 00:00:00 2001
+From: Amarnath Valluri <amarnath.valluri@intel.com>
+Date: Wed, 5 Aug 2015 16:25:51 +0300
+Subject: [PATCH] dosfstools: Fix memroy leak
+
+Upstream-Status:[Inappropriate]
+
+Avoid leaking memory allocated for buffer.
+
+Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
+---
+ mkdosfs/mkdosfs.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/mkdosfs/mkdosfs.c b/mkdosfs/mkdosfs.c
+index 88b0dc2..2822358 100644
+--- a/mkdosfs/mkdosfs.c
++++ b/mkdosfs/mkdosfs.c
+@@ -1693,6 +1693,8 @@ static int add_file(char *filename, struct dir_entry *dir, unsigned char attr)
+     writebuf(buffer, size, "data");    
+   }
+ 
++  free(buffer);
++
+  exit_add:
+   if (infile) close(infile);
+   return 0;
+-- 
+2.1.4
+
diff --git a/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb b/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
index beec488..824c04d 100644
--- a/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
+++ b/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
@@ -19,6 +19,7 @@ SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.src.tar.gz/407d4
            file://nofat32_autoselect.patch \
            file://fix_populated_dosfs_creation.patch \
 	   file://0001-Include-fcntl.h-for-getting-loff_t-definition.patch \
+           file://dosfstools-Fix-memroy-leak.patch \
 	   "
 
 SRC_URI[md5sum] = "407d405ade410f7597d364ab5dc8c9f6"
-- 
2.1.4

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



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

* Re: [meta-oe][PATCH] dosfstools-2.11: Fix memory leak in mkdosfs
  2015-08-06  9:06 [meta-oe][PATCH] dosfstools-2.11: Fix memory leak in mkdosfs Amarnath Valluri
@ 2015-08-06  9:12 ` Alexander Kanavin
  2015-08-06  9:25   ` Paul Eggleton
  0 siblings, 1 reply; 12+ messages in thread
From: Alexander Kanavin @ 2015-08-06  9:12 UTC (permalink / raw)
  To: openembedded-core

On 08/06/2015 12:06 PM, Amarnath Valluri wrote:
> Added new patch that fixes the memory leak that was introduced in
> mkdosfs-dir.patch.

You should update the original patch then, not pile additional patches 
on top. The least painful way is:

1) unpack the sources (manually from tarball, or using bitbake -c unpack)
2) 'git init; git add *; git commit' to create an git repository from 
the sources
3) apply the patch that needs fixing, then do the fix
4) make a git commit, then produce a patch using git format-patch, then 
move the new patch back to the recipe directory and update the recipe
5) build the recipe to make sure it still builds
6) make a git commit with the recipe update, and submit it here :)

Alex



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

* Re: [meta-oe][PATCH] dosfstools-2.11: Fix memory leak in mkdosfs
  2015-08-06  9:12 ` Alexander Kanavin
@ 2015-08-06  9:25   ` Paul Eggleton
  2015-08-06 12:17     ` Valluri, Amarnath
  2015-08-07  2:52     ` Khem Raj
  0 siblings, 2 replies; 12+ messages in thread
From: Paul Eggleton @ 2015-08-06  9:25 UTC (permalink / raw)
  To: Alexander Kanavin, Amarnath Valluri; +Cc: openembedded-core

On Thursday 06 August 2015 12:12:35 Alexander Kanavin wrote:
> On 08/06/2015 12:06 PM, Amarnath Valluri wrote:
> > Added new patch that fixes the memory leak that was introduced in
> > mkdosfs-dir.patch.
> 
> You should update the original patch then, not pile additional patches
> on top. The least painful way is:
> 
> 1) unpack the sources (manually from tarball, or using bitbake -c unpack)
> 2) 'git init; git add *; git commit' to create an git repository from
> the sources
> 3) apply the patch that needs fixing, then do the fix
> 4) make a git commit, then produce a patch using git format-patch, then
> move the new patch back to the recipe directory and update the recipe
> 5) build the recipe to make sure it still builds
> 6) make a git commit with the recipe update, and submit it here :)

On the contrary - the much less painful way (as of fido) is to use devtool:

1) Extract source and set the build system up to use it: 
   devtool modify dosfstools -x ~/projects/dosfstools

2) Make whatever changes you want to in the git tree that has been set up in 
the specified path

3) Build the recipe (as you would normally) to make sure it still builds

4) Write the modified/added commits as patches back to the recipe:
    devtool update-recipe dosfstools

5) Make a git commit with the recipe update, and submit it here :)

I'd really like people to start using devtool for this kind of thing. If it's 
not working for some reason please do let me know.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: [meta-oe][PATCH] dosfstools-2.11: Fix memory leak in mkdosfs
  2015-08-06  9:25   ` Paul Eggleton
@ 2015-08-06 12:17     ` Valluri, Amarnath
  2015-08-07  2:52     ` Khem Raj
  1 sibling, 0 replies; 12+ messages in thread
From: Valluri, Amarnath @ 2015-08-06 12:17 UTC (permalink / raw)
  To: Paul Eggleton, Alexander Kanavin; +Cc: openembedded-core

Alex & Paul,

Thanks both of you, I have resubmitted the patch as per you suggestions.

- Amarnath
________________________________________
From: Paul Eggleton [paul.eggleton@linux.intel.com]
Sent: Thursday, August 06, 2015 12:25 PM
To: Alexander Kanavin; Valluri, Amarnath
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [meta-oe][PATCH] dosfstools-2.11: Fix memory leak in mkdosfs

On Thursday 06 August 2015 12:12:35 Alexander Kanavin wrote:
> On 08/06/2015 12:06 PM, Amarnath Valluri wrote:
> > Added new patch that fixes the memory leak that was introduced in
> > mkdosfs-dir.patch.
>
> You should update the original patch then, not pile additional patches
> on top. The least painful way is:
>
> 1) unpack the sources (manually from tarball, or using bitbake -c unpack)
> 2) 'git init; git add *; git commit' to create an git repository from
> the sources
> 3) apply the patch that needs fixing, then do the fix
> 4) make a git commit, then produce a patch using git format-patch, then
> move the new patch back to the recipe directory and update the recipe
> 5) build the recipe to make sure it still builds
> 6) make a git commit with the recipe update, and submit it here :)

On the contrary - the much less painful way (as of fido) is to use devtool:

1) Extract source and set the build system up to use it:
   devtool modify dosfstools -x ~/projects/dosfstools

2) Make whatever changes you want to in the git tree that has been set up in
the specified path

3) Build the recipe (as you would normally) to make sure it still builds

4) Write the modified/added commits as patches back to the recipe:
    devtool update-recipe dosfstools

5) Make a git commit with the recipe update, and submit it here :)

I'd really like people to start using devtool for this kind of thing. If it's
not working for some reason please do let me know.

Cheers,
Paul

--

Paul Eggleton
Intel Open Source Technology Centre
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



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

* Re: [meta-oe][PATCH] dosfstools-2.11: Fix memory leak in mkdosfs
  2015-08-06  9:25   ` Paul Eggleton
  2015-08-06 12:17     ` Valluri, Amarnath
@ 2015-08-07  2:52     ` Khem Raj
  2015-08-07  9:51       ` Paul Eggleton
  1 sibling, 1 reply; 12+ messages in thread
From: Khem Raj @ 2015-08-07  2:52 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: Patches and discussions about the oe-core layer

On Thu, Aug 6, 2015 at 2:25 AM, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> On Thursday 06 August 2015 12:12:35 Alexander Kanavin wrote:
>> On 08/06/2015 12:06 PM, Amarnath Valluri wrote:
>> > Added new patch that fixes the memory leak that was introduced in
>> > mkdosfs-dir.patch.
>>
>> You should update the original patch then, not pile additional patches
>> on top. The least painful way is:
>>
>> 1) unpack the sources (manually from tarball, or using bitbake -c unpack)
>> 2) 'git init; git add *; git commit' to create an git repository from
>> the sources
>> 3) apply the patch that needs fixing, then do the fix
>> 4) make a git commit, then produce a patch using git format-patch, then
>> move the new patch back to the recipe directory and update the recipe
>> 5) build the recipe to make sure it still builds
>> 6) make a git commit with the recipe update, and submit it here :)
>
> On the contrary - the much less painful way (as of fido) is to use devtool:
>
> 1) Extract source and set the build system up to use it:
>    devtool modify dosfstools -x ~/projects/dosfstools
>
> 2) Make whatever changes you want to in the git tree that has been set up in
> the specified path
>
> 3) Build the recipe (as you would normally) to make sure it still builds
>
> 4) Write the modified/added commits as patches back to the recipe:
>     devtool update-recipe dosfstools
>
> 5) Make a git commit with the recipe update, and submit it here :)
>
> I'd really like people to start using devtool for this kind of thing. If it's
> not working for some reason please do let me know.
>

This assumes either we use OE-Core or poky, I dont get it to work with
angstrom out of box
what am I missing

> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [meta-oe][PATCH] dosfstools-2.11: Fix memory leak in mkdosfs
  2015-08-07  2:52     ` Khem Raj
@ 2015-08-07  9:51       ` Paul Eggleton
  2015-08-07 19:26         ` Khem Raj
  0 siblings, 1 reply; 12+ messages in thread
From: Paul Eggleton @ 2015-08-07  9:51 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On Thursday 06 August 2015 19:52:28 Khem Raj wrote:
> On Thu, Aug 6, 2015 at 2:25 AM, Paul Eggleton
> 
> <paul.eggleton@linux.intel.com> wrote:
> > On Thursday 06 August 2015 12:12:35 Alexander Kanavin wrote:
> >> On 08/06/2015 12:06 PM, Amarnath Valluri wrote:
> >> > Added new patch that fixes the memory leak that was introduced in
> >> > mkdosfs-dir.patch.
> >> 
> >> You should update the original patch then, not pile additional patches
> >> on top. The least painful way is:
> >> 
> >> 1) unpack the sources (manually from tarball, or using bitbake -c unpack)
> >> 2) 'git init; git add *; git commit' to create an git repository from
> >> the sources
> >> 3) apply the patch that needs fixing, then do the fix
> >> 4) make a git commit, then produce a patch using git format-patch, then
> >> move the new patch back to the recipe directory and update the recipe
> >> 5) build the recipe to make sure it still builds
> >> 6) make a git commit with the recipe update, and submit it here :)
> > 
> > On the contrary - the much less painful way (as of fido) is to use
> > devtool:
> > 
> > 1) Extract source and set the build system up to use it:
> >    devtool modify dosfstools -x ~/projects/dosfstools
> > 
> > 2) Make whatever changes you want to in the git tree that has been set up
> > in the specified path
> > 
> > 3) Build the recipe (as you would normally) to make sure it still builds
> > 
> > 4) Write the modified/added commits as patches back to the recipe:
> >     devtool update-recipe dosfstools
> > 
> > 5) Make a git commit with the recipe update, and submit it here :)
> > 
> > I'd really like people to start using devtool for this kind of thing. If
> > it's not working for some reason please do let me know.
> 
> This assumes either we use OE-Core or poky, I dont get it to work with
> angstrom out of box
> what am I missing

Well, whatever error / problem you are experiencing seems to be missing at 
least ;)

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: [meta-oe][PATCH] dosfstools-2.11: Fix memory leak in mkdosfs
  2015-08-07  9:51       ` Paul Eggleton
@ 2015-08-07 19:26         ` Khem Raj
  2015-08-07 19:54           ` Paul Eggleton
  0 siblings, 1 reply; 12+ messages in thread
From: Khem Raj @ 2015-08-07 19:26 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2492 bytes --]


> On Aug 7, 2015, at 2:51 AM, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:
> 
> On Thursday 06 August 2015 19:52:28 Khem Raj wrote:
>> On Thu, Aug 6, 2015 at 2:25 AM, Paul Eggleton
>> 
>> <paul.eggleton@linux.intel.com> wrote:
>>> On Thursday 06 August 2015 12:12:35 Alexander Kanavin wrote:
>>>> On 08/06/2015 12:06 PM, Amarnath Valluri wrote:
>>>>> Added new patch that fixes the memory leak that was introduced in
>>>>> mkdosfs-dir.patch.
>>>> 
>>>> You should update the original patch then, not pile additional patches
>>>> on top. The least painful way is:
>>>> 
>>>> 1) unpack the sources (manually from tarball, or using bitbake -c unpack)
>>>> 2) 'git init; git add *; git commit' to create an git repository from
>>>> the sources
>>>> 3) apply the patch that needs fixing, then do the fix
>>>> 4) make a git commit, then produce a patch using git format-patch, then
>>>> move the new patch back to the recipe directory and update the recipe
>>>> 5) build the recipe to make sure it still builds
>>>> 6) make a git commit with the recipe update, and submit it here :)
>>> 
>>> On the contrary - the much less painful way (as of fido) is to use
>>> devtool:
>>> 
>>> 1) Extract source and set the build system up to use it:
>>>   devtool modify dosfstools -x ~/projects/dosfstools
>>> 
>>> 2) Make whatever changes you want to in the git tree that has been set up
>>> in the specified path
>>> 
>>> 3) Build the recipe (as you would normally) to make sure it still builds
>>> 
>>> 4) Write the modified/added commits as patches back to the recipe:
>>>    devtool update-recipe dosfstools
>>> 
>>> 5) Make a git commit with the recipe update, and submit it here :)
>>> 
>>> I'd really like people to start using devtool for this kind of thing. If
>>> it's not working for some reason please do let me know.
>> 
>> This assumes either we use OE-Core or poky, I dont get it to work with
>> angstrom out of box
>> what am I missing
> 
> Well, whatever error / problem you are experiencing seems to be missing at
> least ;)


devtool modify dosfstools -x ~/projects/dosfstools
ERROR: This script can only be run after initialising the build environment (e.g. by using oe-init-build-env)

so is it must now to use the setup script ? or can be extract some needed setup from it to let it work with setups
not using the init script
> 
> Cheers,
> Paul
> 
> --
> 
> Paul Eggleton
> Intel Open Source Technology Centre


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

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

* Re: [meta-oe][PATCH] dosfstools-2.11: Fix memory leak in mkdosfs
  2015-08-07 19:26         ` Khem Raj
@ 2015-08-07 19:54           ` Paul Eggleton
  2015-08-08 18:54             ` Khem Raj
  0 siblings, 1 reply; 12+ messages in thread
From: Paul Eggleton @ 2015-08-07 19:54 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On Friday 07 August 2015 12:26:56 Khem Raj wrote:
> > On Aug 7, 2015, at 2:51 AM, Paul Eggleton <paul.eggleton@linux.intel.com>
> > wrote:> 
> > On Thursday 06 August 2015 19:52:28 Khem Raj wrote:
> >> On Thu, Aug 6, 2015 at 2:25 AM, Paul Eggleton
> >> 
> >> <paul.eggleton@linux.intel.com> wrote:
> >>> On Thursday 06 August 2015 12:12:35 Alexander Kanavin wrote:
> >>>> On 08/06/2015 12:06 PM, Amarnath Valluri wrote:
> >>>>> Added new patch that fixes the memory leak that was introduced in
> >>>>> mkdosfs-dir.patch.
> >>>> 
> >>>> You should update the original patch then, not pile additional patches
> >>>> on top. The least painful way is:
> >>>> 
> >>>> 1) unpack the sources (manually from tarball, or using bitbake -c
> >>>> unpack)
> >>>> 2) 'git init; git add *; git commit' to create an git repository from
> >>>> the sources
> >>>> 3) apply the patch that needs fixing, then do the fix
> >>>> 4) make a git commit, then produce a patch using git format-patch, then
> >>>> move the new patch back to the recipe directory and update the recipe
> >>>> 5) build the recipe to make sure it still builds
> >>>> 6) make a git commit with the recipe update, and submit it here :)
> >>> 
> >>> On the contrary - the much less painful way (as of fido) is to use
> >>> devtool:
> >>> 
> >>> 1) Extract source and set the build system up to use it:
> >>>   devtool modify dosfstools -x ~/projects/dosfstools
> >>> 
> >>> 2) Make whatever changes you want to in the git tree that has been set
> >>> up
> >>> in the specified path
> >>> 
> >>> 3) Build the recipe (as you would normally) to make sure it still builds
> >>> 
> >>> 4) Write the modified/added commits as patches back to the recipe:
> >>>    devtool update-recipe dosfstools
> >>> 
> >>> 5) Make a git commit with the recipe update, and submit it here :)
> >>> 
> >>> I'd really like people to start using devtool for this kind of thing. If
> >>> it's not working for some reason please do let me know.
> >> 
> >> This assumes either we use OE-Core or poky, I dont get it to work with
> >> angstrom out of box
> >> what am I missing
> > 
> > Well, whatever error / problem you are experiencing seems to be missing at
> > least ;)
> 
> devtool modify dosfstools -x ~/projects/dosfstools
> ERROR: This script can only be run after initialising the build environment
> (e.g. by using oe-init-build-env)
> 
> so is it must now to use the setup script ? or can be extract some needed
> setup from it to let it work with setups not using the init script

Well it needs to be able to run bitbake internally (directly and using 
tinfoil), hence the need to have the environment set up to do so. I don't 
really see a way around that.

Cheers,
Paul


-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: [meta-oe][PATCH] dosfstools-2.11: Fix memory leak in mkdosfs
  2015-08-07 19:54           ` Paul Eggleton
@ 2015-08-08 18:54             ` Khem Raj
  2015-08-09 16:21               ` Paul Eggleton
  0 siblings, 1 reply; 12+ messages in thread
From: Khem Raj @ 2015-08-08 18:54 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2926 bytes --]


> On Aug 7, 2015, at 12:54 PM, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:
> 
> On Friday 07 August 2015 12:26:56 Khem Raj wrote:
>>> On Aug 7, 2015, at 2:51 AM, Paul Eggleton <paul.eggleton@linux.intel.com>
>>> wrote:>
>>> On Thursday 06 August 2015 19:52:28 Khem Raj wrote:
>>>> On Thu, Aug 6, 2015 at 2:25 AM, Paul Eggleton
>>>> 
>>>> <paul.eggleton@linux.intel.com> wrote:
>>>>> On Thursday 06 August 2015 12:12:35 Alexander Kanavin wrote:
>>>>>> On 08/06/2015 12:06 PM, Amarnath Valluri wrote:
>>>>>>> Added new patch that fixes the memory leak that was introduced in
>>>>>>> mkdosfs-dir.patch.
>>>>>> 
>>>>>> You should update the original patch then, not pile additional patches
>>>>>> on top. The least painful way is:
>>>>>> 
>>>>>> 1) unpack the sources (manually from tarball, or using bitbake -c
>>>>>> unpack)
>>>>>> 2) 'git init; git add *; git commit' to create an git repository from
>>>>>> the sources
>>>>>> 3) apply the patch that needs fixing, then do the fix
>>>>>> 4) make a git commit, then produce a patch using git format-patch, then
>>>>>> move the new patch back to the recipe directory and update the recipe
>>>>>> 5) build the recipe to make sure it still builds
>>>>>> 6) make a git commit with the recipe update, and submit it here :)
>>>>> 
>>>>> On the contrary - the much less painful way (as of fido) is to use
>>>>> devtool:
>>>>> 
>>>>> 1) Extract source and set the build system up to use it:
>>>>>  devtool modify dosfstools -x ~/projects/dosfstools
>>>>> 
>>>>> 2) Make whatever changes you want to in the git tree that has been set
>>>>> up
>>>>> in the specified path
>>>>> 
>>>>> 3) Build the recipe (as you would normally) to make sure it still builds
>>>>> 
>>>>> 4) Write the modified/added commits as patches back to the recipe:
>>>>>   devtool update-recipe dosfstools
>>>>> 
>>>>> 5) Make a git commit with the recipe update, and submit it here :)
>>>>> 
>>>>> I'd really like people to start using devtool for this kind of thing. If
>>>>> it's not working for some reason please do let me know.
>>>> 
>>>> This assumes either we use OE-Core or poky, I dont get it to work with
>>>> angstrom out of box
>>>> what am I missing
>>> 
>>> Well, whatever error / problem you are experiencing seems to be missing at
>>> least ;)
>> 
>> devtool modify dosfstools -x ~/projects/dosfstools
>> ERROR: This script can only be run after initialising the build environment
>> (e.g. by using oe-init-build-env)
>> 
>> so is it must now to use the setup script ? or can be extract some needed
>> setup from it to let it work with setups not using the init script
> 
> Well it needs to be able to run bitbake internally (directly and using
> tinfoil), hence the need to have the environment set up to do so. I don't
> really see a way around that.
> 

Then limited use of  devtool should be documented as available

[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

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

* Re: [meta-oe][PATCH] dosfstools-2.11: Fix memory leak in mkdosfs
  2015-08-08 18:54             ` Khem Raj
@ 2015-08-09 16:21               ` Paul Eggleton
  2015-08-09 17:03                 ` Khem Raj
  0 siblings, 1 reply; 12+ messages in thread
From: Paul Eggleton @ 2015-08-09 16:21 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On Saturday 08 August 2015 11:54:45 Khem Raj wrote:
> > On Aug 7, 2015, at 12:54 PM, Paul Eggleton <paul.eggleton@linux.intel.com>
> > wrote:> 
> > On Friday 07 August 2015 12:26:56 Khem Raj wrote:
> >>> On Aug 7, 2015, at 2:51 AM, Paul Eggleton
> >>> <paul.eggleton@linux.intel.com>
> >>> wrote:>
> >>> 
> >>> On Thursday 06 August 2015 19:52:28 Khem Raj wrote:
> >>>> On Thu, Aug 6, 2015 at 2:25 AM, Paul Eggleton
> >>>> 
> >>>> <paul.eggleton@linux.intel.com> wrote:
> >>>>> On Thursday 06 August 2015 12:12:35 Alexander Kanavin wrote:
> >>>>>> On 08/06/2015 12:06 PM, Amarnath Valluri wrote:
> >>>>>>> Added new patch that fixes the memory leak that was introduced in
> >>>>>>> mkdosfs-dir.patch.
> >>>>>> 
> >>>>>> You should update the original patch then, not pile additional
> >>>>>> patches
> >>>>>> on top. The least painful way is:
> >>>>>> 
> >>>>>> 1) unpack the sources (manually from tarball, or using bitbake -c
> >>>>>> unpack)
> >>>>>> 2) 'git init; git add *; git commit' to create an git repository from
> >>>>>> the sources
> >>>>>> 3) apply the patch that needs fixing, then do the fix
> >>>>>> 4) make a git commit, then produce a patch using git format-patch,
> >>>>>> then
> >>>>>> move the new patch back to the recipe directory and update the recipe
> >>>>>> 5) build the recipe to make sure it still builds
> >>>>>> 6) make a git commit with the recipe update, and submit it here :)
> >>>>> 
> >>>>> On the contrary - the much less painful way (as of fido) is to use
> >>>>> devtool:
> >>>>> 
> >>>>> 1) Extract source and set the build system up to use it:
> >>>>>  devtool modify dosfstools -x ~/projects/dosfstools
> >>>>> 
> >>>>> 2) Make whatever changes you want to in the git tree that has been set
> >>>>> up
> >>>>> in the specified path
> >>>>> 
> >>>>> 3) Build the recipe (as you would normally) to make sure it still
> >>>>> builds
> >>>>> 
> >>>>> 4) Write the modified/added commits as patches back to the recipe:
> >>>>>   devtool update-recipe dosfstools
> >>>>> 
> >>>>> 5) Make a git commit with the recipe update, and submit it here :)
> >>>>> 
> >>>>> I'd really like people to start using devtool for this kind of thing.
> >>>>> If
> >>>>> it's not working for some reason please do let me know.
> >>>> 
> >>>> This assumes either we use OE-Core or poky, I dont get it to work with
> >>>> angstrom out of box
> >>>> what am I missing
> >>> 
> >>> Well, whatever error / problem you are experiencing seems to be missing
> >>> at
> >>> least ;)
> >> 
> >> devtool modify dosfstools -x ~/projects/dosfstools
> >> ERROR: This script can only be run after initialising the build
> >> environment
> >> (e.g. by using oe-init-build-env)
> >> 
> >> so is it must now to use the setup script ? or can be extract some needed
> >> setup from it to let it work with setups not using the init script
> > 
> > Well it needs to be able to run bitbake internally (directly and using
> > tinfoil), hence the need to have the environment set up to do so. I don't
> > really see a way around that.
> 
> Then limited use of  devtool should be documented as available

How is this limited? It operates under the same conditions as bitbake itself 
does.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: [meta-oe][PATCH] dosfstools-2.11: Fix memory leak in mkdosfs
  2015-08-09 16:21               ` Paul Eggleton
@ 2015-08-09 17:03                 ` Khem Raj
  2015-08-09 21:30                   ` Paul Eggleton
  0 siblings, 1 reply; 12+ messages in thread
From: Khem Raj @ 2015-08-09 17:03 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 3888 bytes --]

On Aug 9, 2015 9:21 AM, "Paul Eggleton" <paul.eggleton@linux.intel.com>
wrote:
>
> On Saturday 08 August 2015 11:54:45 Khem Raj wrote:
> > > On Aug 7, 2015, at 12:54 PM, Paul Eggleton <
paul.eggleton@linux.intel.com>
> > > wrote:>
> > > On Friday 07 August 2015 12:26:56 Khem Raj wrote:
> > >>> On Aug 7, 2015, at 2:51 AM, Paul Eggleton
> > >>> <paul.eggleton@linux.intel.com>
> > >>> wrote:>
> > >>>
> > >>> On Thursday 06 August 2015 19:52:28 Khem Raj wrote:
> > >>>> On Thu, Aug 6, 2015 at 2:25 AM, Paul Eggleton
> > >>>>
> > >>>> <paul.eggleton@linux.intel.com> wrote:
> > >>>>> On Thursday 06 August 2015 12:12:35 Alexander Kanavin wrote:
> > >>>>>> On 08/06/2015 12:06 PM, Amarnath Valluri wrote:
> > >>>>>>> Added new patch that fixes the memory leak that was introduced
in
> > >>>>>>> mkdosfs-dir.patch.
> > >>>>>>
> > >>>>>> You should update the original patch then, not pile additional
> > >>>>>> patches
> > >>>>>> on top. The least painful way is:
> > >>>>>>
> > >>>>>> 1) unpack the sources (manually from tarball, or using bitbake -c
> > >>>>>> unpack)
> > >>>>>> 2) 'git init; git add *; git commit' to create an git repository
from
> > >>>>>> the sources
> > >>>>>> 3) apply the patch that needs fixing, then do the fix
> > >>>>>> 4) make a git commit, then produce a patch using git
format-patch,
> > >>>>>> then
> > >>>>>> move the new patch back to the recipe directory and update the
recipe
> > >>>>>> 5) build the recipe to make sure it still builds
> > >>>>>> 6) make a git commit with the recipe update, and submit it here
:)
> > >>>>>
> > >>>>> On the contrary - the much less painful way (as of fido) is to use
> > >>>>> devtool:
> > >>>>>
> > >>>>> 1) Extract source and set the build system up to use it:
> > >>>>>  devtool modify dosfstools -x ~/projects/dosfstools
> > >>>>>
> > >>>>> 2) Make whatever changes you want to in the git tree that has
been set
> > >>>>> up
> > >>>>> in the specified path
> > >>>>>
> > >>>>> 3) Build the recipe (as you would normally) to make sure it still
> > >>>>> builds
> > >>>>>
> > >>>>> 4) Write the modified/added commits as patches back to the recipe:
> > >>>>>   devtool update-recipe dosfstools
> > >>>>>
> > >>>>> 5) Make a git commit with the recipe update, and submit it here :)
> > >>>>>
> > >>>>> I'd really like people to start using devtool for this kind of
thing.
> > >>>>> If
> > >>>>> it's not working for some reason please do let me know.
> > >>>>
> > >>>> This assumes either we use OE-Core or poky, I dont get it to work
with
> > >>>> angstrom out of box
> > >>>> what am I missing
> > >>>
> > >>> Well, whatever error / problem you are experiencing seems to be
missing
> > >>> at
> > >>> least ;)
> > >>
> > >> devtool modify dosfstools -x ~/projects/dosfstools
> > >> ERROR: This script can only be run after initialising the build
> > >> environment
> > >> (e.g. by using oe-init-build-env)
> > >>
> > >> so is it must now to use the setup script ? or can be extract some
needed
> > >> setup from it to let it work with setups not using the init script
> > >
> > > Well it needs to be able to run bitbake internally (directly and using
> > > tinfoil), hence the need to have the environment set up to do so. I
don't
> > > really see a way around that.
> >
> > Then limited use of  devtool should be documented as available
>
> How is this limited? It operates under the same conditions as bitbake
itself
> does.

Your last email indicated as if it always needs internal build environment.
If that's not the case then it's what I was requesting for the settings
that are required to execute it provided bitbake is in path and is building
fine but it's not using the settings provided by setup environment script
>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre

[-- Attachment #2: Type: text/html, Size: 5934 bytes --]

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

* Re: [meta-oe][PATCH] dosfstools-2.11: Fix memory leak in mkdosfs
  2015-08-09 17:03                 ` Khem Raj
@ 2015-08-09 21:30                   ` Paul Eggleton
  0 siblings, 0 replies; 12+ messages in thread
From: Paul Eggleton @ 2015-08-09 21:30 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

On Sunday 09 August 2015 10:03:25 Khem Raj wrote:
> On Aug 9, 2015 9:21 AM, "Paul Eggleton" <paul.eggleton@linux.intel.com>
> wrote:
> > On Saturday 08 August 2015 11:54:45 Khem Raj wrote:
> > > > On Aug 7, 2015, at 12:54 PM, Paul Eggleton <
> paul.eggleton@linux.intel.com>
> > > > wrote:>
> > > > 
> > > > On Friday 07 August 2015 12:26:56 Khem Raj wrote:
> > > >>> On Aug 7, 2015, at 2:51 AM, Paul Eggleton
> > > >>> <paul.eggleton@linux.intel.com>
> > > >>> wrote:>
> > > >> devtool modify dosfstools -x ~/projects/dosfstools
> > > >> ERROR: This script can only be run after initialising the build
> > > >> environment
> > > >> (e.g. by using oe-init-build-env)
> > > >> 
> > > >> so is it must now to use the setup script ? or can be extract some
> > > >> needed setup from it to let it work with setups not using the init
> > > >> script
> > > >
> > > > Well it needs to be able to run bitbake internally (directly and using
> > > > tinfoil), hence the need to have the environment set up to do so. I
> > > > don't really see a way around that.
> > > 
> > > Then limited use of  devtool should be documented as available
> > 
> > How is this limited? It operates under the same conditions as bitbake
> > itself does.
> 
> Your last email indicated as if it always needs internal build environment.
> If that's not the case then it's what I was requesting for the settings
> that are required to execute it provided bitbake is in path and is building
> fine but it's not using the settings provided by setup environment script

There aren't any special settings though - if you can run bitbake, you should 
be able to run devtool. If you're getting the error you pasted, it's because 
BUILDDIR is not set.

I just fetched Angstrom's setup-scripts, checked out the angstrom-v2015.06-
yocto1.8 branch, and ran through the steps mentioned in the README. 
Unfortunately it didn't check out all the layers successfully (someone should 
probably look at that...) once I tweaked bblayers.conf to remove the missing 
layers, devtool ran just fine. (Of course as part of setting up I had run 
. environment-angstrom - you are doing that, right?)

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

end of thread, other threads:[~2015-08-09 21:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-06  9:06 [meta-oe][PATCH] dosfstools-2.11: Fix memory leak in mkdosfs Amarnath Valluri
2015-08-06  9:12 ` Alexander Kanavin
2015-08-06  9:25   ` Paul Eggleton
2015-08-06 12:17     ` Valluri, Amarnath
2015-08-07  2:52     ` Khem Raj
2015-08-07  9:51       ` Paul Eggleton
2015-08-07 19:26         ` Khem Raj
2015-08-07 19:54           ` Paul Eggleton
2015-08-08 18:54             ` Khem Raj
2015-08-09 16:21               ` Paul Eggleton
2015-08-09 17:03                 ` Khem Raj
2015-08-09 21:30                   ` Paul Eggleton

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.