[meta-mingw] mingw32-common: change mingw sdk to .zip type

Submitted by changqing.li@windriver.com on Jan. 16, 2019, 9:36 a.m. | Patch ID: 157983

Details

Message ID 1547631395-435805-1-git-send-email-changqing.li@windriver.com
State New
Headers show

Commit Message

changqing.li@windriver.com Jan. 16, 2019, 9:36 a.m.
From: Changqing Li <changqing.li@windriver.com>

Current sdk type is tar.xz, but for mingw sdk, since we
have symlink under the sdk folder, 7zip which used to
extract tar.xz cannot handle it, refer 7zip upstream bug:
https://sourceforge.net/p/sevenzip/discussion/45797/thread/c71d6b96/
so change to .zip type

Also tried to use option --dereference of tar which use means:
"follow symlinks; archive and dump the files they point to"
with this option, when archive it will deal with symlink to hard link,
but windows not support hard link, so drop this solution,
and use .zip for windows.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 conf/machine-sdk/include/mingw32-common.inc | 5 +++++
 1 file changed, 5 insertions(+)

Patch hide | download patch | download mbox

diff --git a/conf/machine-sdk/include/mingw32-common.inc b/conf/machine-sdk/include/mingw32-common.inc
index 9011ded..dbad50a 100644
--- a/conf/machine-sdk/include/mingw32-common.inc
+++ b/conf/machine-sdk/include/mingw32-common.inc
@@ -46,3 +46,8 @@  GCCPIE_mingw32 = ""
 # wine and wineserver are required to test MinGW SDKs
 HOSTTOOLS += "${@'wine wineserver' if (bb.utils.contains_any('IMAGE_CLASSES', 'testsdk', True, False, d) or any(x in (d.getVar("BBINCLUDED") or "") for x in ["testsdk.bbclass"])) else ''}"
 
+# mingw sdk use .zip type
+SDK_TAR_TYPE = "zip"
+SDK_TAR_DEPENDS = "zip-native"
+SDK_TAR_CMD ?= "zip -r  ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_TAR_TYPE} ."
+

Comments

Joshua Watt Jan. 16, 2019, 1:12 p.m.
On Wed, Jan 16, 2019, 3:37 AM <changqing.li@windriver.com wrote:

> From: Changqing Li <changqing.li@windriver.com>
>
> Current sdk type is tar.xz, but for mingw sdk, since we
> have symlink under the sdk folder, 7zip which used to
> extract tar.xz cannot handle it, refer 7zip upstream bug:
> https://sourceforge.net/p/sevenzip/discussion/45797/thread/c71d6b96/
> so change to .zip type
>
> Also tried to use option --dereference of tar which use means:
> "follow symlinks; archive and dump the files they point to"
> with this option, when archive it will deal with symlink to hard link,
> but windows not support hard link, so drop this solution,
> and use .zip for windows.
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
>  conf/machine-sdk/include/mingw32-common.inc | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/conf/machine-sdk/include/mingw32-common.inc
> b/conf/machine-sdk/include/mingw32-common.inc
> index 9011ded..dbad50a 100644
> --- a/conf/machine-sdk/include/mingw32-common.inc
> +++ b/conf/machine-sdk/include/mingw32-common.inc
> @@ -46,3 +46,8 @@ GCCPIE_mingw32 = ""
>  # wine and wineserver are required to test MinGW SDKs
>  HOSTTOOLS += "${@'wine wineserver' if
> (bb.utils.contains_any('IMAGE_CLASSES', 'testsdk', True, False, d) or any(x
> in (d.getVar("BBINCLUDED") or "") for x in ["testsdk.bbclass"])) else ''}"
>
> +# mingw sdk use .zip type
> +SDK_TAR_TYPE = "zip"
> +SDK_TAR_DEPENDS = "zip-native"
> +SDK_TAR_CMD ?= "zip -r
> ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_TAR_TYPE} ."
> +
>

You will also need to update the QA tests, since right now they expecting a
tar file (lib/oeqa/sdkmingw/testsdk.py)

--

2.7.4
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
Ross Burton Jan. 16, 2019, 1:17 p.m.
Just in case you hadn't noticed, that this depends on a corresponding
patch to oe-core, which I've comments on.

Ross

On Wed, 16 Jan 2019 at 13:14, Joshua Watt <jpewhacker@gmail.com> wrote:
>
>
>
> On Wed, Jan 16, 2019, 3:37 AM <changqing.li@windriver.com wrote:
>>
>> From: Changqing Li <changqing.li@windriver.com>
>>
>> Current sdk type is tar.xz, but for mingw sdk, since we
>> have symlink under the sdk folder, 7zip which used to
>> extract tar.xz cannot handle it, refer 7zip upstream bug:
>> https://sourceforge.net/p/sevenzip/discussion/45797/thread/c71d6b96/
>> so change to .zip type
>>
>> Also tried to use option --dereference of tar which use means:
>> "follow symlinks; archive and dump the files they point to"
>> with this option, when archive it will deal with symlink to hard link,
>> but windows not support hard link, so drop this solution,
>> and use .zip for windows.
>>
>> Signed-off-by: Changqing Li <changqing.li@windriver.com>
>> ---
>>  conf/machine-sdk/include/mingw32-common.inc | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/conf/machine-sdk/include/mingw32-common.inc b/conf/machine-sdk/include/mingw32-common.inc
>> index 9011ded..dbad50a 100644
>> --- a/conf/machine-sdk/include/mingw32-common.inc
>> +++ b/conf/machine-sdk/include/mingw32-common.inc
>> @@ -46,3 +46,8 @@ GCCPIE_mingw32 = ""
>>  # wine and wineserver are required to test MinGW SDKs
>>  HOSTTOOLS += "${@'wine wineserver' if (bb.utils.contains_any('IMAGE_CLASSES', 'testsdk', True, False, d) or any(x in (d.getVar("BBINCLUDED") or "") for x in ["testsdk.bbclass"])) else ''}"
>>
>> +# mingw sdk use .zip type
>> +SDK_TAR_TYPE = "zip"
>> +SDK_TAR_DEPENDS = "zip-native"
>> +SDK_TAR_CMD ?= "zip -r  ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_TAR_TYPE} ."
>> +
>
>
> You will also need to update the QA tests, since right now they expecting a tar file (lib/oeqa/sdkmingw/testsdk.py)
>
>> --
>>
>> 2.7.4
>>
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
changqing.li@windriver.com Jan. 17, 2019, 7:49 a.m.
Ross and Joshua,  thanks for your comments,  I will send a v2 later.

On 1/16/19 9:17 PM, Burton, Ross wrote:
> Just in case you hadn't noticed, that this depends on a corresponding
> patch to oe-core, which I've comments on.
>
> Ross
>
> On Wed, 16 Jan 2019 at 13:14, Joshua Watt <jpewhacker@gmail.com> wrote:
>>
>>
>> On Wed, Jan 16, 2019, 3:37 AM <changqing.li@windriver.com wrote:
>>> From: Changqing Li <changqing.li@windriver.com>
>>>
>>> Current sdk type is tar.xz, but for mingw sdk, since we
>>> have symlink under the sdk folder, 7zip which used to
>>> extract tar.xz cannot handle it, refer 7zip upstream bug:
>>> https://sourceforge.net/p/sevenzip/discussion/45797/thread/c71d6b96/
>>> so change to .zip type
>>>
>>> Also tried to use option --dereference of tar which use means:
>>> "follow symlinks; archive and dump the files they point to"
>>> with this option, when archive it will deal with symlink to hard link,
>>> but windows not support hard link, so drop this solution,
>>> and use .zip for windows.
>>>
>>> Signed-off-by: Changqing Li <changqing.li@windriver.com>
>>> ---
>>>   conf/machine-sdk/include/mingw32-common.inc | 5 +++++
>>>   1 file changed, 5 insertions(+)
>>>
>>> diff --git a/conf/machine-sdk/include/mingw32-common.inc b/conf/machine-sdk/include/mingw32-common.inc
>>> index 9011ded..dbad50a 100644
>>> --- a/conf/machine-sdk/include/mingw32-common.inc
>>> +++ b/conf/machine-sdk/include/mingw32-common.inc
>>> @@ -46,3 +46,8 @@ GCCPIE_mingw32 = ""
>>>   # wine and wineserver are required to test MinGW SDKs
>>>   HOSTTOOLS += "${@'wine wineserver' if (bb.utils.contains_any('IMAGE_CLASSES', 'testsdk', True, False, d) or any(x in (d.getVar("BBINCLUDED") or "") for x in ["testsdk.bbclass"])) else ''}"
>>>
>>> +# mingw sdk use .zip type
>>> +SDK_TAR_TYPE = "zip"
>>> +SDK_TAR_DEPENDS = "zip-native"
>>> +SDK_TAR_CMD ?= "zip -r  ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_TAR_TYPE} ."
>>> +
>>
>> You will also need to update the QA tests, since right now they expecting a tar file (lib/oeqa/sdkmingw/testsdk.py)
>>
>>> --
>>>
>>> 2.7.4
>>>
>>> --
>>> _______________________________________________
>>> yocto mailing list
>>> yocto@yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/yocto
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
changqing.li@windriver.com Jan. 17, 2019, 9:49 a.m.
change in V2:
1. move zip part to oe-core, and if usr want to use .zip file
   set SDK_ARCHIVE_TYPE to zip in local.conf 
2. correct extract sdk function for qa test 

Changqing Li (1):
  testsdk: enhance extract sdk part

 lib/oeqa/sdkmingw/testsdk.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)