Re: [yocto] [opkg-devel] [PATCH][opkg] bug 13528 add SPDX id to opkg

2019-10-25 Thread Alejandro Del Castillo
merged

thanks again for doing this, its been on the wish-list for a while!

--
Cheers,

Alejandro

On 10/25/19 2:50 AM, Yann CARDAILLAC wrote:
> Hi Alejandro,
> 
> Here's patch v2
> 
> Thanks for your sharpened eyes !
> 
> Regards,
> 
> On Thu, Oct 24, 2019 at 9:39 PM Alejandro Del Castillo 
> mailto:alejandro.delcasti...@ni.com>> wrote:
> 
> Hi Yann,
> 
> Thanks again for adding the headers. Your patch looks good, except for
> one line that has a duplicated header:
> 
> /core/26_prefer_arch_to_version.py
> index 0a0d66b..82934c1 100755
> --- a/tests/core/26_prefer_arch_to_version.py
> +++ b/tests/core/26_prefer_arch_to_version.py
> @@ -1,4 +1,5 @@
> -#! /usr/bin/env python3
> +#! /usr/bin/env python3# SPDX-License-Identifier: GPL-2.0-only
> +# SPDX-License-Identifier: GPL-2.0-only
>    #
> 
> could you send a v2? regarding m4 files, I looked around a bit and
> didn't find project adding SPDX identifiers to them
> 
> Cheers,
> 
> Alejandro
> 
> On 10/22/19 9:55 AM, Yann CARDAILLAC wrote:
>  > Hi,
>  >
>  > I'm working on bug :
>  > https://bugzilla.yoctoproject.org/show_bug.cgi?id=13528
> 
> <https://urldefense.com/v3/__https://bugzilla.yoctoproject.org/show_bug.cgi?id=13528__;!fqWJcnlTkjM!_NRJm0riDVYWYSwk41uLwFAc8pov9_Aan6ToLWDKa3XaLmZTeqMU-_W19-CH2QtnHU_a0g$>
> 
>  >
> 
> <https://urldefense.com/v3/__https://bugzilla.yoctoproject.org/show_bug.cgi?id=13528__;!fqWJcnlTkjM!4DVD9lP2UdCF5UedI8J-XjhQQuyDhmAiLaOXk8OW5KMCFRzG2ASP_BdrxnvBnCnb0TyYNQ$>
>  >
>  >  I've a first patch proposal. Note that I didn't knew what to do with
>  >  m4/gpgme.m4 the license header seems pretty weird to me...
>  >
>  > Regards,
>  >
>  > -- SMILE
>  >
> 
> <https://urldefense.com/v3/__http://www.smile.eu/__;!fqWJcnlTkjM!4DVD9lP2UdCF5UedI8J-XjhQQuyDhmAiLaOXk8OW5KMCFRzG2ASP_BdrxnvBnCnfbDCHYw$>
>  >
>  >  20 rue des Jardins 92600 Asnières-sur-Seine
>  >
>  >  *Yann CARDAILLAC* Ingénieur Systèmes Embarqués
>  >
>  > email yann.cardail...@smile.fr <mailto:yann.cardail...@smile.fr>
> <mailto:yann.cardail...@smile.fr <mailto:yann.cardail...@smile.fr>> url
>  > http://www.smile.eu
> 
> <https://urldefense.com/v3/__http://www.smile.eu__;!fqWJcnlTkjM!_NRJm0riDVYWYSwk41uLwFAc8pov9_Aan6ToLWDKa3XaLmZTeqMU-_W19-CH2QssIf3-qg$>
> 
>  >
> 
> <https://urldefense.com/v3/__http://www.smile.eu__;!fqWJcnlTkjM!4DVD9lP2UdCF5UedI8J-XjhQQuyDhmAiLaOXk8OW5KMCFRzG2ASP_BdrxnvBnCmV9R4jPA$>
>  >
>  >
>  >
>  > Twitter
>  >
> 
> <https://urldefense.com/v3/__https://twitter.com/GroupeSmile__;!fqWJcnlTkjM!4DVD9lP2UdCF5UedI8J-XjhQQuyDhmAiLaOXk8OW5KMCFRzG2ASP_BdrxnvBnCkq-mFzcw$>
>  >  Facebook
>  >
> 
> <https://urldefense.com/v3/__https://www.facebook.com/smileopensource__;!fqWJcnlTkjM!4DVD9lP2UdCF5UedI8J-XjhQQuyDhmAiLaOXk8OW5KMCFRzG2ASP_BdrxnvBnCk8LxW08A$>
>  >  LinkedIn
>  >
> 
> <https://urldefense.com/v3/__https://www.linkedin.com/company/smile__;!fqWJcnlTkjM!4DVD9lP2UdCF5UedI8J-XjhQQuyDhmAiLaOXk8OW5KMCFRzG2ASP_BdrxnvBnCk5-3y08w$>
>  >  Github
>  >
> 
> <https://urldefense.com/v3/__https://github.com/Smile-SA__;!fqWJcnlTkjM!4DVD9lP2UdCF5UedI8J-XjhQQuyDhmAiLaOXk8OW5KMCFRzG2ASP_BdrxnvBnClEOxUzoA$>
>  >
>  >
>  >
>  >
>  >
>  > eco Pour la planète, n'imprimez ce mail que si c'est nécessaire
>  >
>  > -- You received this message because you are subscribed to the Google
>  >  Groups "opkg-devel" group. To unsubscribe from this group and stop
>  > receiving emails from it, send an email to
>  > opkg-devel+unsubscr...@googlegroups.com
> <mailto:opkg-devel%2bunsubscr...@googlegroups.com>
>  > <mailto:opkg-devel+unsubscr...@googlegroups.com
> <mailto:opkg-devel%2bunsubscr...@googlegroups.com>>. To view this
>  > discussion on the web visit
>  >
> 
> https://groups.google.com/d/msgid/opkg-devel/CAA984JWqcX5oDhumXYBom%2BZyxD%2Bbo7oGmTzLx_tXejvPaR1UKQ%40mail.gmail.com
> 
> <https://urldefense.com/v3/__https://groups.google.com/d/msgid/opkg-devel/CAA984JWqcX5oDhumXYBom*2BZyxD*2Bbo7oGmTzLx_tXejvPaR1UKQ*40mail.gmail.com__;JSUl!fqWJcnlTkjM!_NRJm0riDVYWYSwk41uLwFAc8pov9_Aan6ToLWDKa3XaLmZTeqMU-_W19-CH2QuwKRd4LQ$>
>  >
>  >
> 
> <https://urldefense.com/v3/__https://groups.go

Re: [yocto] [opkg-devel] [PATCH][opkg] bug 13528 add SPDX id to opkg

2019-10-24 Thread Alejandro Del Castillo
Hi Yann,

Thanks again for adding the headers. Your patch looks good, except for
one line that has a duplicated header:

/core/26_prefer_arch_to_version.py
index 0a0d66b..82934c1 100755
--- a/tests/core/26_prefer_arch_to_version.py
+++ b/tests/core/26_prefer_arch_to_version.py
@@ -1,4 +1,5 @@
-#! /usr/bin/env python3
+#! /usr/bin/env python3# SPDX-License-Identifier: GPL-2.0-only
+# SPDX-License-Identifier: GPL-2.0-only
  #

could you send a v2? regarding m4 files, I looked around a bit and 
didn't find project adding SPDX identifiers to them

Cheers,

Alejandro

On 10/22/19 9:55 AM, Yann CARDAILLAC wrote:
> Hi,
> 
> I'm working on bug : 
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=13528 
> 
>
>  I've a first patch proposal. Note that I didn't knew what to do with
>  m4/gpgme.m4 the license header seems pretty weird to me...
> 
> Regards,
> 
> -- SMILE 
> 
>
>  20 rue des Jardins 92600 Asnières-sur-Seine
> 
>  *Yann CARDAILLAC* Ingénieur Systèmes Embarqués
> 
> email yann.cardail...@smile.fr  url
> http://www.smile.eu 
> 
> 
> 
> 
> Twitter 
> 
>  Facebook 
> 
>  LinkedIn 
> 
>  Github 
> 
> 
> 
> 
> 
> 
> eco Pour la planète, n'imprimez ce mail que si c'est nécessaire
> 
> -- You received this message because you are subscribed to the Google
>  Groups "opkg-devel" group. To unsubscribe from this group and stop
> receiving emails from it, send an email to
> opkg-devel+unsubscr...@googlegroups.com 
> . To view this
> discussion on the web visit 
> https://groups.google.com/d/msgid/opkg-devel/CAA984JWqcX5oDhumXYBom%2BZyxD%2Bbo7oGmTzLx_tXejvPaR1UKQ%40mail.gmail.com
>  
> .

--
> 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [opkg-devel] [OE-core][opkg-utils ] Bug 13528 : adding SPDX license identifier

2019-10-18 Thread Alejandro Del Castillo
merged, thanks!

On 10/15/19 2:58 PM, Alejandro Del Castillo wrote:
> 
> 
> On 10/14/19 7:36 AM, Ycn aKaJoseph wrote:
>> Hi,
>>
>> GPL-2.0-only was applied to script without previous Licences and
>> GPL-2.0-or-later to those mentioning it, however I'm wondering if I
>> should also add a SPDX id to the makefile ?
>>
>> Here's first attempt without identifier to the Makefile.
> 
> I don't have a preference regarding adding a SPDX identifier for the
> Makefile. If I don't see any comments one way or the other, I will pull
> the patch in, by the end of the week.
> 
> thanks again for taking care of this,
> 
> Alejandro
> 
>> On Fri, Oct 11, 2019 at 6:45 PM > <mailto:richard.pur...@linuxfoundation.org>> wrote:
>>
>>  On Fri, 2019-10-11 at 15:54 +, Alejandro Del Castillo wrote:
>>   > On 10/11/19 8:51 AM, Ycn aKaJoseph wrote:
>>   > > Hi guys,
>>   > >
>>   > > 
>> https://urldefense.com/v3/__https://bugzilla.yoctoproject.org/show_bug.cgi?id=13528__;!fqWJcnlTkjM!4_UTkft6YvqISMi_ZyxT3nbBDdxbyllWZ59OHmmikFQqAnQ-ln7pGeLjNidedeIGY0iDgA$
>>  
>> <https://urldefense.com/v3/__https://bugzilla.yoctoproject.org/show_bug.cgi?id=13528__;!fqWJcnlTkjM!4ZugVhFkOciFucw9FbYbLCErJ647XFyLvF76MP_0Uo4F8sa51hi1GbwmPmZTisU17VqszQ$>
>>
>>   > > <
>>   > >
>>  
>> https://urldefense.com/v3/__https://bugzilla.yoctoproject.org/show_bug.cgi?id=13528__;!fqWJcnlTkjM!8RtsWJXbDz_l063ZSVKrRMwvQ5KGdD0lk9aSjlUW9VHM2wufITJnBuIvovQxoT0yJXu-6Q$
>>   > > >
>>   > >
>>   > > I'm about to work on that bug however most of the script in opkg-
>>   > > utils
>>   > > dir are un-licenced and there's no hint for me to decide what SPDX
>>   > > Identifier to add.
>>   >
>>   > thanks for doing this!
>>   >
>>   > > The doubt concerns those script :
>>   > > makePackage
>>   > > opkg-build
>>   > > opkg-buildpackage
>>   > > opkg-compare-indexes
>>   > > opkg-diff
>>   > > opkg-extract-file
>>   > > opkg-graph-deps
>>   > > opkg-list-fields
>>   > > opkg-make-index
>>   > > opkg-show-deps
>>   > > opkg-unbuild
>>   > > opkg-update-index
>>   > >
>>   > > What license do you want them to carry ?
>>   >
>>   > Looking at the commit history, opkg-graph-deps was authored by Haris
>>   > Okanovic, and the rest by Richard Purdie (included them on the
>>   > thread).
>>   >
>>   > My take on it:  since opkg is licensed as GPLv2+, and the files that
>>   > have a license in opkg-utils are GPLv2+, make sense to me to license
>>   > the rest as GPLv2+ too.
>>
>>  I didn't author these, they were imported from ipkg-utils which was
>>  part of handhelds.org
>>  
>> <https://urldefense.com/v3/__http://handhelds.org__;!fqWJcnlTkjM!4ZugVhFkOciFucw9FbYbLCErJ647XFyLvF76MP_0Uo4F8sa51hi1GbwmPmZTisWdWuYokA$>.
>>  I did modify things quite a bit during the
>>  import.
>>
>>  handhelds.org
>>  
>> <https://urldefense.com/v3/__http://handhelds.org__;!fqWJcnlTkjM!4ZugVhFkOciFucw9FbYbLCErJ647XFyLvF76MP_0Uo4F8sa51hi1GbwmPmZTisWdWuYokA$>'s
>>  CVS repos aren't there any more but I do have old
>>  sources lying around locally. I have a snapshot of the CVS repo from
>>  20050930 and it has GPLv2 COPYING file (not 2+, just 2).
>>
>>  I'd suggest we follow the original licensing of that and go with GPLv2.
>>
>>  Cheers,
>>
>>  Richard
>>
>>
>>
>>
> 

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [opkg-devel] [OE-core][opkg-utils ] Bug 13528 : adding SPDX license identifier

2019-10-15 Thread Alejandro Del Castillo


On 10/14/19 7:36 AM, Ycn aKaJoseph wrote:
> Hi,
> 
> GPL-2.0-only was applied to script without previous Licences and 
> GPL-2.0-or-later to those mentioning it, however I'm wondering if I 
> should also add a SPDX id to the makefile ?
> 
> Here's first attempt without identifier to the Makefile.

I don't have a preference regarding adding a SPDX identifier for the 
Makefile. If I don't see any comments one way or the other, I will pull 
the patch in, by the end of the week.

thanks again for taking care of this,

Alejandro

> On Fri, Oct 11, 2019 at 6:45 PM  <mailto:richard.pur...@linuxfoundation.org>> wrote:
> 
> On Fri, 2019-10-11 at 15:54 +, Alejandro Del Castillo wrote:
>  > On 10/11/19 8:51 AM, Ycn aKaJoseph wrote:
>  > > Hi guys,
>  > >
>  > > https://bugzilla.yoctoproject.org/show_bug.cgi?id=13528
> 
> <https://urldefense.com/v3/__https://bugzilla.yoctoproject.org/show_bug.cgi?id=13528__;!fqWJcnlTkjM!4ZugVhFkOciFucw9FbYbLCErJ647XFyLvF76MP_0Uo4F8sa51hi1GbwmPmZTisU17VqszQ$>
> 
>  > > <
>  > >
> 
> https://urldefense.com/v3/__https://bugzilla.yoctoproject.org/show_bug.cgi?id=13528__;!fqWJcnlTkjM!8RtsWJXbDz_l063ZSVKrRMwvQ5KGdD0lk9aSjlUW9VHM2wufITJnBuIvovQxoT0yJXu-6Q$
>  > > >
>  > >
>  > > I'm about to work on that bug however most of the script in opkg-
>  > > utils
>  > > dir are un-licenced and there's no hint for me to decide what SPDX
>  > > Identifier to add.
>  >
>  > thanks for doing this!
>  >
>  > > The doubt concerns those script :
>  > > makePackage
>  > > opkg-build
>  > > opkg-buildpackage
>  > > opkg-compare-indexes
>  > > opkg-diff
>  > > opkg-extract-file
>  > > opkg-graph-deps
>  > > opkg-list-fields
>  > > opkg-make-index
>  > > opkg-show-deps
>  > > opkg-unbuild
>  > > opkg-update-index
>  > >
>  > > What license do you want them to carry ?
>  >
>  > Looking at the commit history, opkg-graph-deps was authored by Haris
>  > Okanovic, and the rest by Richard Purdie (included them on the
>  > thread).
>  >
>  > My take on it:  since opkg is licensed as GPLv2+, and the files that
>  > have a license in opkg-utils are GPLv2+, make sense to me to license
>  > the rest as GPLv2+ too.
> 
> I didn't author these, they were imported from ipkg-utils which was
> part of handhelds.org
> 
> <https://urldefense.com/v3/__http://handhelds.org__;!fqWJcnlTkjM!4ZugVhFkOciFucw9FbYbLCErJ647XFyLvF76MP_0Uo4F8sa51hi1GbwmPmZTisWdWuYokA$>.
> I did modify things quite a bit during the
> import.
> 
> handhelds.org
> 
> <https://urldefense.com/v3/__http://handhelds.org__;!fqWJcnlTkjM!4ZugVhFkOciFucw9FbYbLCErJ647XFyLvF76MP_0Uo4F8sa51hi1GbwmPmZTisWdWuYokA$>'s
> CVS repos aren't there any more but I do have old
> sources lying around locally. I have a snapshot of the CVS repo from
> 20050930 and it has GPLv2 COPYING file (not 2+, just 2).
> 
> I'd suggest we follow the original licensing of that and go with GPLv2.
> 
> Cheers,
> 
> Richard
> 
> 
> 
> 
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [opkg-devel] [OE-core][opkg-utils ] Bug 13528 : adding SPDX license identifier

2019-10-11 Thread Alejandro Del Castillo


On 10/11/19 8:51 AM, Ycn aKaJoseph wrote:
> Hi guys,
> 
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=13528 
> 
> 
> I'm about to work on that bug however most of the script in opkg-utils 
> dir are un-licenced and there's no hint for me to decide what SPDX 
> Identifier to add.

thanks for doing this!

> The doubt concerns those script :
> makePackage
> opkg-build
> opkg-buildpackage
> opkg-compare-indexes
> opkg-diff
> opkg-extract-file
> opkg-graph-deps
> opkg-list-fields
> opkg-make-index
> opkg-show-deps
> opkg-unbuild
> opkg-update-index
> 
> What license do you want them to carry ?

Looking at the commit history, opkg-graph-deps was authored by Haris 
Okanovic, and the rest by Richard Purdie (included them on the thread).

My take on it:  since opkg is licensed as GPLv2+, and the files that 
have a license in opkg-utils are GPLv2+, make sense to me to license the 
rest as GPLv2+ too.

Haris, Richard, thoughts?

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [opkg-devel] [opkg-utils PATCH] Makefile: fixed for-loop in install receipe

2019-05-30 Thread Alejandro Del Castillo
indeed, thanks for the fix!

merged

On 5/29/19 1:57 PM, Josh Deweese wrote:
> The install receipe would have copied all the manpages to each of the
> section folders. This change will do what I believe the original
> author had intended.
> 
> Signed-off-by: Joshua DeWeese 
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 69a1c5a..817a8c1 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -23,7 +23,7 @@ install: all
> for m in $(MANPAGES); \
> do \
> install -d $(DESTDIR)$(mandir)/man$${m##*.}; \
> - install -m 644 $(MANPAGES) $(DESTDIR)$(mandir)/man$${m##*.}; \
> + install -m 644 "$$m" $(DESTDIR)$(mandir)/man$${m##*.}; \
> done
> 
> .PHONY: install all
> -- 
> 2.7.4
> 
> 
> 
> This email has been scanned for email related threats and delivered 
> safely by Mimecast.
> For more information please visit http://www.mimecast.com 
> 
>  
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google 
> Groups "opkg-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to opkg-devel+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/opkg-devel/1559156195-16281-1-git-send-email-jdeweese%40hennypenny.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [opkg-devel] [opkg-utils] Question: why update-alternatives from opkg-utils chooses /usr/lib to hold database?

2019-03-05 Thread Alejandro Del Castillo



On 3/5/19 12:11 AM, ChenQi wrote:
> Hi All,
> 
> Recently I'm dealing with issue from which some discussion raises.
> I'd like to ask why update-alternatives from opkg-utils chooses /usr/lib 
> to hold its alternatives database?
> I looked into debian, its update-alternatives chooses /var/lib by default.
> Is there some design consideration? Or some historical reason?

Update-alternatives used to be on the opkg repo. I did a search there 
all the way to the first commit on 2008-12-15 [1], but even then 
/usr/lib was used. I can't think of a design consideration that would 
make /usr/lib more palatable than the Debian default.

Maybe someone with more knowledge of the previous history can chime in?

[1] 
http://git.yoctoproject.org/clean/cgit.cgi/opkg/commit/?id=8bf49d16a637cca0cd116450dfcabc4c941baf6c

> Best Regards,
> Chen Qi
> 

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [OE-core] [PATCH 1/3] opkg: add --ignore-recommends flag

2019-02-07 Thread Alejandro Del Castillo


On 2/7/19 11:36 AM, Scott Rifenbark wrote:
> This change looks like it impacts documentation (i.e. 
> https://yoctoproject.org/docs/2.7/ref-manual/ref-manual.html#var-BAD_RECOMMENDATIONS.
>   
> When will this change go into effect? 

I believe it doesn't. It is refactoring the opkg implementation to 
leverage a new opkg feature (--add-ignore-recommends), which is a more 
robust implementation. Should be transparent to users.

> On Thu, Feb 7, 2019 at 7:58 AM Alejandro del Castillo 
> mailto:alejandro.delcasti...@ni.com>> wrote:
> 
> To be used for BAD_RECOMMENDATIONS feature.
> 
> Signed-off-by: Alejandro del Castillo  <mailto:alejandro.delcasti...@ni.com>>
> ---
>   ...pkg-add-add-ignore-recommends-option.patch | 259 ++
>   meta/recipes-devtools/opkg/opkg_0.4.0.bb
> 
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__opkg-5F0.4.0.bb=DwMFaQ=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA=wNcrL2akRn6jfxhHaKavUrJB_C9JAMXtynjLd8ZzgXQ=8hd_9vew95YIf_VIv2QHNu2EFnc3G2WZ5KA2Upnv5j8=JvgzuAyAoVrkeSZAdWZUuIsFWQ8okApbCk1iiF13CDc=>
>  
>      |   1 +
>   2 files changed, 260 insertions(+)
>   create mode 100644
> 
> meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
> 
> diff --git
> 
> a/meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
> 
> b/meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
> new file mode 100644
> index 00..47d1b3c37e
> --- /dev/null
> +++
> 
> b/meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
>     @@ -0,0 +1,259 @@
> +From 64aa98646a17c299bf37af2975b98daf5d7d30b4 Mon Sep 17 00:00:00 2001
> +From: Alejandro del Castillo  <mailto:alejandro.delcasti...@ni.com>>
> +Date: Thu, 31 Jan 2019 18:16:08 -0600
> +Subject: [PATCH] libopkg: add --add-ignore-recommends option
> +
> +Add option to ignore specific recommended packages. On the libsolv
> +backed, this feature will only work on libsolv version > 0.7.2 [1].
> +
> +[1]
> 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openSUSE_libsolv_issues_254=DwIBaQ=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA=wNcrL2akRn6jfxhHaKavUrJB_C9JAMXtynjLd8ZzgXQ=GObNHzFJpWpf_PripIrf-K2RhsktYdAUEieAJexXOKw=3G-meChUqClFggFPqsrAxIZBfLnRKIHm62Uuy1X6nQQ=
> +
> +Signed-off-by: Alejandro del Castillo  <mailto:alejandro.delcasti...@ni.com>>
> +
> +Upstream-Status: Accepted
> +---
> + libopkg/opkg_conf.c                           |  2 +
> + libopkg/opkg_conf.h                           |  1 +
> + .../solvers/internal/pkg_depends_internal.c   |  3 +-
> + libopkg/solvers/libsolv/opkg_solver_libsolv.c | 21 ++-
> + man/opkg.1.in
> 
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__opkg.1.in=DwMFaQ=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA=wNcrL2akRn6jfxhHaKavUrJB_C9JAMXtynjLd8ZzgXQ=8hd_9vew95YIf_VIv2QHNu2EFnc3G2WZ5KA2Upnv5j8=8yIWRVT6JV0YnkHzVgeo8pAkiFPM4xz8y9APvxobmhY=>
>  
>                                 |  3 +
> + src/opkg.c                                    |  6 ++
> + tests/Makefile                                |  1 +
> + tests/core/43_add_ignore_recommends.py        | 62 +++
> + 8 files changed, 97 insertions(+), 2 deletions(-)
> + create mode 100755 tests/core/43_add_ignore_recommends.py
> +
> +diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
> +index 06880a1..f2330cd 100644
> +--- a/libopkg/opkg_conf.c
>  b/libopkg/opkg_conf.c
> +@@ -597,6 +597,7 @@ int opkg_conf_init(void)
> +     pkg_dest_list_init(_config->tmp_dest_list);
> +     nv_pair_list_init(_config->arch_list);
> +     str_list_init(_config->exclude_list);
> ++    str_list_init(_config->ignore_recommends_list);
> +
> +     return 0;
> + }
> +@@ -938,6 +939,7 @@ void opkg_conf_deinit(void)
> +     pkg_dest_list_deinit(_config->pkg_dest_list);
> +     nv_pair_list_deinit(_config->arch_list);
> +     str_list_deinit(_config->exclude_list);
> ++    str_list_deinit(_config->ignore_recommends_list);
> +
> +     if (opkg_config->verbosity >= DEBUG) {
> +         hash_print_stats(_config->pkg_hash);
> +diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h
> +index eb56a29..316c500 100644
> +--- a/libopkg/opkg_conf.h
>  b/libopkg/opkg_conf.h
> +@@ -61,6 +61,7 @@ typedef struct opkg_conf {
> +     pkg_dest_list_t tmp_dest_list;
> +     n

Re: [yocto] [opkg-devel] [opkg-utils PATCH] update-alternatives: Fix link relocation support

2018-11-12 Thread Alejandro Del Castillo
good catch, thanks for the fix!

merged

On 11/11/18 8:19 AM, Niko Mauno wrote:
> Commit fcb2633921eb9bb711aa264247aebcfdd4ae which added Debian-style
> support for link relocation tries to relocate symbolic link on host OS,
> resulting in following-like error when two alternative packages have
> symbolic link source located in different directories (/bin/rev ->
> /bin/busybox.nosuid and /usr/bin/rev -> /usr/bin/rev.util-linux):
> 
>update-alternatives: renaming rev link from /bin/rev to /usr/bin/rev
>mv: cannot stat '/bin/rev': No such file or directory
> 
> Fix the issue by prefixing 'olink' and 'link' variable references with
> path to targeted root filesystem's root directory.
> 
> Signed-off-by: Niko Mauno 
> ---
>   update-alternatives | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/update-alternatives b/update-alternatives
> index 89a440b..d4fa7eb 100644
> --- a/update-alternatives
> +++ b/update-alternatives
> @@ -58,7 +58,7 @@ register_alt() {
>   local link_str=`echo $link | protect_slashes`
>   sed -e "1s/.*/$link_str/" $ad/$name > $ad/$name.new
>   mv $ad/$name.new $ad/$name
> - mv $olink $link
> + mv $OPKG_OFFLINE_ROOT$olink $OPKG_OFFLINE_ROOT$link
>   fi
>   else
>   echo "$link" > "$ad/$name"
> 

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [opkg-devel] [opkg-utils PATCH] opkg-make-index: use ctime instead of mtime

2018-11-07 Thread Alejandro Del Castillo



On 11/7/18 6:07 AM, Stefan Agner wrote:
> Hi Alejandro,
> 
> On 22.10.2018 16:45, Alejandro Del Castillo wrote:
>> makes sense, sounds like this is going to fix a bunch of nasty
>> intermittent failures, thanks!
>>
>> merged
> 
> Thanks for merging!

np

> With the merge in opkg-utils this is not yet actively used in OE of
> course. So my question: Is there a new release of opkg-utils planned
> anytime soon? Or should that be added as a patch in the OE recipe for
> now?

I plan to release opkg & opkg-utils, version 0.4.0 on mid-December. 
Maybe its worth adding the patch now?

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [opkg-devel] [opkg-utils PATCH] opkg-make-index: use ctime instead of mtime

2018-10-22 Thread Alejandro Del Castillo
makes sense, sounds like this is going to fix a bunch of nasty 
intermittent failures, thanks!

merged

On 10/19/18 10:38 AM, Stefan Agner wrote:
> From: Stefan Agner 
> 
> When using sstate, two parallel builds can produce two packages
> with the same mtime but different checksums. When later one of
> those two builds fetches the others ipk, the package index does
> not get udpated properly (since mtime matches). This ends up with
> messages such as:
>Downloading file:/../tmp/work/../image/...ipk.
>Removing corrupt package file /../sysroot/../var/cache/opkg/volatile/...ipk
> 
> However, in that case, ctime is different. Use ctime instead of
> mtime to prevent failures like this.
> 
> Suggested-by: Khem Raj 
> Signed-off-by: Stefan Agner 
> ---
> This addresses the issue discussed here:
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.openembedded.org_pipermail_openembedded-2Dcore_2018-2DOctober_156348.html=DwIBaQ=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA=wNcrL2akRn6jfxhHaKavUrJB_C9JAMXtynjLd8ZzgXQ=Innit37H69hUyZPGuuhwO6R5CbUNNTfXQwxbqsEA2NE=oFvqASrFTgasDqZ901HeIBFSsf6Cn4FcBieOOBU4MdI=
> 
>   opkg-make-index | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/opkg-make-index b/opkg-make-index
> index 3227fc0..db7bf64 100755
> --- a/opkg-make-index
> +++ b/opkg-make-index
> @@ -115,12 +115,12 @@ for abspath in files:
>pkg = None
>fnameStat = os.stat(abspath)
>if filename in old_pkg_hash:
> -  if filename in pkgsStamps and int(fnameStat.st_mtime) == 
> pkgsStamps[filename]:
> +  if filename in pkgsStamps and int(fnameStat.st_ctime) == 
> pkgsStamps[filename]:
>   if (verbose):
>  sys.stderr.write("Found %s in Packages\n" % (filename,))
>   pkg = old_pkg_hash[filename]
> else:
> -   sys.stderr.write("Found %s in Packages, but mtime differs - 
> re-reading\n" % (filename,))
> +   sys.stderr.write("Found %s in Packages, but ctime differs - 
> re-reading\n" % (filename,))
>   
>if not pkg:
> if (verbose):
> @@ -137,7 +137,7 @@ for abspath in files:
>else:
> old_filename = ""
>s = packages.add_package(pkg, opt_a)
> - pkgsStamps[filename] = fnameStat.st_mtime
> + pkgsStamps[filename] = fnameStat.st_ctime
>if s == 0:
> if old_filename:
>  # old package was displaced by newer
> 

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [opkg-devel] [opkg-utils PATCH] opkg-build: Add support for explicit pigz

2018-10-05 Thread Alejandro Del Castillo
Hi Mike,

Thanks for the patch! Just merged it into master (I updated the man page 
to reflect the new option)


On 10/4/18 11:53 AM, Mike Crowe wrote:
> From: Mike Crowe 
> 
> oe-core has stopped[1] installing pigz as gzip. This means that in order to
> persuade opkg-build to use pigz it must be specified explicitly. Let's
> teach opkg-build to deal with being passed pigz as a compressor. We can't
> combine the check for whether -T is required because opkg-build calls both
> $compressor and gzip explicitly.
> 
> Signed-off-by: Mike Crowe 
> ---
>   opkg-build | 6 +-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/opkg-build b/opkg-build
> index 0050c2b..d5f5b8f 100755
> --- a/opkg-build
> +++ b/opkg-build
> @@ -170,7 +170,7 @@ fi
>   
>   compressor_ext() {
>   case $1 in
> - gzip)
> + gzip|pigz)
>   echo gz
>   ;;
>   bzip2)
> @@ -230,6 +230,10 @@ if gzip --help 2>&1 | grep -- "-T" > /dev/null; then
>   fi
>   if [ $compressor = "gzip" ] ; then
>   compressorargs=$zipargs
> +elif [ $compressor = "pigz" ] ; then
> + if $compressor --help 2>&1 | grep -- "-T" > /dev/null; then
> + compressorargs="-9nT"
> + fi
>   fi
>   
>   tsortargs=
> 

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] opkg-utils 0.3.6

2018-02-22 Thread Alejandro del Castillo

Hi all,

I am please to announce the 0.3.6 release of opkg-utils. In this 
release, we had 10 commits, contributed by 7 developers:


Jeffrey Pautler 3
Alejandro del Castillo  3
Zhu Mumu1
Adam Trhon  1
Jackie Huang1
Juro Bystricky  1

Jeffrey, Zhu, Adam, Jackie, Juro, thanks for your contributions!

Changes included on this release:

- opkg-build: make Section, Priority and Source fields optional
- opkg.py: add compatibility with ipks which outer is tar
- opkg-build{package}: fix error message
- opkg.py: remove brittle formatting of description field
- opkg-make-index: add option to include all fields on index file
- update-alternatives: fix the sed pattern in remove_alt
- update-alternatives: add support for link renames (issue 8344)
- opkg-build: improve package reproducibility (issue 11242)

looking forward to the 0.4.0 release cycle!

--
Cheers,

Alejandro
--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [PATCH] opkg-build: improve package reproducibility

2018-02-01 Thread Alejandro del Castillo
merged


From: Alejandro del Castillo <alejandro.delcasti...@ni.com>
Sent: Monday, January 29, 2018 4:23:15 AM
To: opkg-de...@googlegroups.com; yocto@yoctoproject.org
Cc: Alejandro del Castillo
Subject: [PATCH] opkg-build: improve package reproducibility

Implements some of the recommendations by reproducible-build.org [1]

- Set modification time to SOURCE_DATE_EPOCH env variable
- Enable deterministic sorting of directory entries
- Do not save timestamp on gzip compressed archive

bugzilla #11242

[1] https://reproducible-builds.org/docs/archives/

Signed-off-by: Alejandro del Castillo <alejandro.delcasti...@ni.com>
---
 opkg-build | 18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/opkg-build b/opkg-build
index 0fe513a..7bfdd99 100755
--- a/opkg-build
+++ b/opkg-build
@@ -149,6 +149,7 @@ outer=ar
 noclean=0
 opkext=0
 compressor=gzip
+compressorargs="-9n"

 # Determine if tar supports the --format argument by checking the help output.
 #
@@ -222,6 +223,15 @@ done

 cext=$(compressor_ext $compressor)

+if [ $compressor = "gzip" ] ; then
+   # pgzip requires -T to avoid timestamps on the gzip archive
+   if gzip --help 2>&1 | grep -- "-T" > /dev/null; then
+   compressorargs="-9nT"
+   fi
+else
+   compressorargs=""
+fi
+
 shift $(($OPTIND - 1))

 # continue on to process additional arguments
@@ -267,9 +277,11 @@ fi
 tmp_dir=$dest_dir/IPKG_BUILD.$$
 mkdir $tmp_dir

+build_date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" 
+%Y-%m-%d)"
+
 echo $CONTROL > $tmp_dir/tarX
-( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -c --$compressor $tarformat -f 
$tmp_dir/data.tar.$cext . )
-( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f 
$tmp_dir/control.tar.gz . )
+( cd $pkg_dir && tar $ogargs --sort=name --mtime=$build_date -X $tmp_dir/tarX 
-c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
+( cd $pkg_dir/$CONTROL && tar $ogargs --sort=name --mtime=$build_date -c 
$tarformat . | gzip $compressorargs > $tmp_dir/control.tar.gz )
 rm $tmp_dir/tarX

 echo "2.0" > $tmp_dir/debian-binary
@@ -284,7 +296,7 @@ rm -f $pkg_file
 if [ "$outer" = "ar" ] ; then
   ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./control.tar.gz 
./data.tar.$cext )
 else
-  ( cd $tmp_dir && tar -cz $tarformat -f $pkg_file ./debian-binary 
./control.tar.gz ./data.tar.$cext )
+  ( cd $tmp_dir && tar -c --sort=name --mtime=$build_date $tarformat 
./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $compressorargs > 
$pkg_file )
 fi

 rm $tmp_dir/debian-binary $tmp_dir/data.tar.$cext $tmp_dir/control.tar.gz
--
2.15.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [PATCH] opkg-build: improve package reproducibility

2018-01-29 Thread Alejandro del Castillo
Implements some of the recommendations by reproducible-build.org [1]

- Set modification time to SOURCE_DATE_EPOCH env variable
- Enable deterministic sorting of directory entries
- Do not save timestamp on gzip compressed archive

bugzilla #11242

[1] https://reproducible-builds.org/docs/archives/

Signed-off-by: Alejandro del Castillo <alejandro.delcasti...@ni.com>
---
 opkg-build | 18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/opkg-build b/opkg-build
index 0fe513a..7bfdd99 100755
--- a/opkg-build
+++ b/opkg-build
@@ -149,6 +149,7 @@ outer=ar
 noclean=0
 opkext=0
 compressor=gzip
+compressorargs="-9n"
 
 # Determine if tar supports the --format argument by checking the help output.
 #
@@ -222,6 +223,15 @@ done
 
 cext=$(compressor_ext $compressor)
 
+if [ $compressor = "gzip" ] ; then
+   # pgzip requires -T to avoid timestamps on the gzip archive
+   if gzip --help 2>&1 | grep -- "-T" > /dev/null; then
+   compressorargs="-9nT"
+   fi
+else
+   compressorargs=""
+fi
+
 shift $(($OPTIND - 1))
 
 # continue on to process additional arguments
@@ -267,9 +277,11 @@ fi
 tmp_dir=$dest_dir/IPKG_BUILD.$$
 mkdir $tmp_dir
 
+build_date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" 
+%Y-%m-%d)"
+
 echo $CONTROL > $tmp_dir/tarX
-( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -c --$compressor $tarformat -f 
$tmp_dir/data.tar.$cext . )
-( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f 
$tmp_dir/control.tar.gz . )
+( cd $pkg_dir && tar $ogargs --sort=name --mtime=$build_date -X $tmp_dir/tarX 
-c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
+( cd $pkg_dir/$CONTROL && tar $ogargs --sort=name --mtime=$build_date -c 
$tarformat . | gzip $compressorargs > $tmp_dir/control.tar.gz )
 rm $tmp_dir/tarX
 
 echo "2.0" > $tmp_dir/debian-binary
@@ -284,7 +296,7 @@ rm -f $pkg_file
 if [ "$outer" = "ar" ] ; then
   ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./control.tar.gz 
./data.tar.$cext )
 else
-  ( cd $tmp_dir && tar -cz $tarformat -f $pkg_file ./debian-binary 
./control.tar.gz ./data.tar.$cext )
+  ( cd $tmp_dir && tar -c --sort=name --mtime=$build_date $tarformat 
./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $compressorargs > 
$pkg_file )
 fi
 
 rm $tmp_dir/debian-binary $tmp_dir/data.tar.$cext $tmp_dir/control.tar.gz
-- 
2.15.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [opkg-devel] [opkg-utils PATCH] update-alternatives: fix the sed pattern in remove_alt

2018-01-21 Thread Alejandro del Castillo
merged


From: opkg-de...@googlegroups.com  on behalf of 
jackie.hu...@windriver.com 
Sent: Thursday, January 18, 2018 8:59 PM
To: yocto@yoctoproject.org; opkg-de...@googlegroups.com
Subject: [opkg-devel] [opkg-utils PATCH] update-alternatives: fix the sed 
pattern in remove_alt

From: Jackie Huang 

'\>' is to matches the end of a word, but the executable is
not always a 'word', e.g. /usr/lib64/busybox/usr/bin/[

then such alternatives can not be removed.

So change to use '\s' in the pattern since the following
character of the $path is whitespace.

Signed-off-by: Jackie Huang 
---
 update-alternatives | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/update-alternatives b/update-alternatives
index ffad853..ce7d66c 100644
--- a/update-alternatives
+++ b/update-alternatives
@@ -80,7 +80,7 @@ remove_alt() {
[ ! -f $ad/$name ] && return 0

path=`echo $path | protect_slashes | protect_special_character`
-   sed -ne "/^$path\>.*/!p" $ad/$name > $ad/$name.new
+   sed -ne "/^$path\s.*/!p" $ad/$name > $ad/$name.new
mv $ad/$name.new $ad/$name
 }

--
2.7.4

--
You received this message because you are subscribed to the Google Groups 
"opkg-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to opkg-devel+unsubscr...@googlegroups.com.
For more options, visit 
https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout=DwIBaQ=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA=wNcrL2akRn6jfxhHaKavUrJB_C9JAMXtynjLd8ZzgXQ=yP6B3nYh5DMMS7JjJioLfn3jVyH-4GTPElZp4VeNx-Q=zO7LsP7fVT0yerk7aCY5q3_lclpvVYcHsT8gWG3B29g=.
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [opkg-devel] [opkg-utils PATCH] opkg.py/opkg-make-index: Add option to include all fields

2017-10-06 Thread Alejandro del Castillo

yep, that makes sense, thanks for the contribution

merged

On 10/05/2017 12:03 PM, Jeffrey Pautler wrote:

If the -f option is enabled, opkg-make-index will include user-defined

fields in the package index rather than discarding them. This change is

motivated by the fact that opkg now has support for user-defined fields

in the package index.

Signed-off-by: Jeffrey Pautler 

---

opkg-make-index | 11 +++

opkg.py | 28 ++--

2 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/opkg-make-index b/opkg-make-index

index 3f757f6..3227fc0 100755

--- a/opkg-make-index

+++ b/opkg-make-index

@@ -11,7 +11,7 @@ import re

verbose = 0

  def usage():

- sys.stderr.write("%s [-h] [-s] [-m] [-a] [-l Packages.filelist] 
[-p Packages] [-r Packages.old] [-L localesdir] [-v] packagesdir\n" % 
(sys.argv[0],))


+ sys.stderr.write("%s [-h] [-s] [-m] [-a] [-f] [-l 
Packages.filelist] [-p Packages] [-r Packages.old] [-L localesdir] [-v] 
packagesdir\n" % (sys.argv[0],))


   sys.exit(-1)

  def to_morgue(filename):

@@ -43,7 +43,8 @@ stamplist_filename = "Packages.stamps"

opt_s = 0

opt_m = 0

opt_a = 0

-(opts, remaining_args) = getopt.getopt(sys.argv[1:], "hl:p:vsmr:L:a")

+opt_f = 0

+(opts, remaining_args) = getopt.getopt(sys.argv[1:], "hl:p:vsmr:L:af")

for (optkey, optval) in opts:

   if optkey == '-h':

    usage()

@@ -64,6 +65,8 @@ for (optkey, optval) in opts:

    locales_dir = optval

   if optkey == '-a':

    opt_a = 1

+ if optkey == '-f':

+  opt_f = 1

  if ( not remaining_args ):

   usage()

@@ -81,7 +84,7 @@ if old_filename:

   if (verbose):

    sys.stderr.write("Reading package list from " + old_filename 
+ "\n")


   old_packages = opkg.Packages()

- old_packages.read_packages_file(old_filename)

+ old_packages.read_packages_file(old_filename, opt_f)

   for k in list(old_packages.packages.keys()):

    p = old_packages.packages[k]

    old_pkg_hash[p.filename] = p

@@ -122,7 +125,7 @@ for abspath in files:

   if not pkg:

    if (verbose):

     sys.stderr.write("Reading info for package %s\n" % 
(filename,))


-  pkg = opkg.Package(abspath, relpath=pkg_dir)

+  pkg = opkg.Package(abspath, relpath=pkg_dir, all_fields=opt_f)

   if opt_a:

    pkg_key = ("%s:%s:%s" % (pkg.package, pkg.architecture, 
pkg.version))


diff --git a/opkg.py b/opkg.py

index 9131755..cdadcab 100644

--- a/opkg.py

+++ b/opkg.py

@@ -45,6 +45,7 @@ from stat import ST_SIZE

import arfile

import tarfile

import textwrap

+import collections

  class Version(object):

  """A class for holding parsed package version information."""

@@ -123,7 +124,7 @@ class Package(object):

  # relpath: If this argument is set, the file path is given 
relative to this


  #   path when a string representation of the Package object is 
created. If


  #   this argument is not set, the basename of the file path is given.

-    def __init__(self, fn=None, relpath=None):

+    def __init__(self, fn=None, relpath=None, all_fields=None):

      self.package = None

  self.version = 'none'

  self.parsed_version = None

@@ -153,6 +154,7 @@ class Package(object):

  self.fn = fn

  self.license = None

+    self.user_defined_fields = collections.OrderedDict()

  if fn:

  # see if it is deb format

  f = open(fn, "rb")

@@ -176,7 +178,7 @@ class Package(object):

  except KeyError:

  control = tarf.extractfile("./control")

  try:

-    self.read_control(control)

+    self.read_control(control, all_fields)

  except TypeError as e:

  sys.stderr.write("Cannot read control file '%s' - 
%s\n" % (fn, e))


  control.close()

@@ -215,7 +217,7 @@ class Package(object):

  self.size = stat[ST_SIZE]

  return int(self.size)

-    def read_control(self, control):

+    def read_control(self, control, all_fields=None):

  import os

  line = control.readline()

@@ -227,19 +229,22 @@ class Package(object):

  line = line.rstrip()

  lineparts = re.match(r'([\w-]*?):\s*(.*)', line)

  if lineparts:

-    name = lineparts.group(1).lower()

+    name = lineparts.group(1)

+    name_lowercase = name.lower()

  value = lineparts.group(2)

  while 1:

  line = control.readline()

  if not line: break

  if line[0] != ' ': break

  value = value + '\n' + line

-    if name == 'size':

+    if name_lowercase == 'size':

  self.size = int(value)

-    elif name == 

Re: [yocto] [opkg-devel] [opkg-utils PATCH] opkg.py: Remove reformatting of description field

2017-10-06 Thread Alejandro del Castillo
Agreed, opkg-make-index spould not be formatting control files. 
Description should be treated as any other field.


merged

On 10/05/2017 09:05 AM, Jeffrey Pautler wrote:

The Debian Policy Manual describes the format of the description field.

This includes information about how lines might be wrapped by programs

displaying this information, how to mark lines to not be wrapped, how

to mark a line as blank, and how leading spaces on a multi-line

description might be deleted.

By reformatting the description field in opkg.py, we are breaking many

of these behaviors and taking control of formatting away from the

author of the control file. Instead, we should simply copy the

description field with no reformatting.

Signed-off-by: Jeffrey Pautler 

---

opkg.py | 8 ++--

1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/opkg.py b/opkg.py

index 9131755..c0cdcd5 100644

--- a/opkg.py

+++ b/opkg.py

@@ -230,7 +230,7 @@ class Package(object):

  name = lineparts.group(1).lower()

  value = lineparts.group(2)

  while 1:

-    line = control.readline()

+    line = control.readline().rstrip()

  if not line: break

  if line[0] != ' ': break

  value = value + '\n' + line

@@ -480,11 +480,7 @@ class Package(object):

  if self.installed_size: out = out + "InstalledSize: %d\n" % 
int(self.installed_size)


  if self.filename: out = out + "Filename: %s\n" % (self.filename)

  if self.source: out = out + "Source: %s\n" % (self.source)

-    if self.description:

-    printable_description = 
textwrap.dedent(self.description).strip()


-    summary = printable_description.split('\n', 1)[0]

-    printable_description = printable_description.split('\n', 
1)[-1].strip()


-    out = out + "Description: %s\n%s\n" % (summary, 
textwrap.fill(printable_description, width=74, initial_indent=' ', 
subsequent_indent=' '))


+    if self.description: out = out + "Description: %s\n" % 
(self.description)


  if self.oe: out = out + "OE: %s\n" % (self.oe)

  if self.homepage: out = out + "HomePage: %s\n" % (self.homepage)

  if self.license: out = out + "License: %s\n" % (self.license)

--

2.7.4

--
You received this message because you are subscribed to the Google 
Groups "opkg-devel" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to opkg-devel+unsubscr...@googlegroups.com 
.
For more options, visit https://groups.google.com/d/optout 
.


--
Cheers,

Alejandro
--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [opkg-devel] [opkg-utils PATCH] opkg.py: Fix run-time error in call to ArFile

2017-10-03 Thread Alejandro del Castillo

ouch...this was clearly wrong

opkg-utils is badly needing an ATS to prevent this bugs from slipping in...

thanks a bunch for the fix! (just merged it into master)


On 10/02/2017 02:37 PM, Jeffrey Pautler wrote:

Signed-off-by: Jeffrey Pautler 

---

opkg.py | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/opkg.py b/opkg.py

index 4d6f020..9131755 100644

--- a/opkg.py

+++ b/opkg.py

@@ -168,7 +168,7 @@ class Package(object):

  tar = tarfile.open(fn, "r", f)

  tarStream = tar.extractfile("./control.tar.gz")

  else:

-    ar = ArFile(f, fn)

+    ar = arfile.ArFile(f, fn)

  tarStream = ar.open("control.tar.gz")

  tarf = tarfile.open("control.tar.gz", "r", tarStream)

  try:

--

2.7.4

--
You received this message because you are subscribed to the Google 
Groups "opkg-devel" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to opkg-devel+unsubscr...@googlegroups.com 
.
For more options, visit https://groups.google.com/d/optout 
.


--
Cheers,

Alejandro
--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [opkg-devel] [opkg-utils PATCH] opkg-build*: fix empty package name in error message

2017-09-11 Thread Alejandro del Castillo
merged, thanks!

On 09/02/2017 11:23 AM, Adam Trhon wrote:
> When opkg-build detects illegal character in package name it prints an error
> message with this name. Due to a wrong variable name the package name in the
> error message is empty. The same error occurs in opkg-buildpackage as well.
> This patch fixes both.
> 
> Signed-off-by: Adam Trhon 
> ---
>  opkg-build| 2 +-
>  opkg-buildpackage | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/opkg-build b/opkg-build
> index e02eaca..0fe513a 100755
> --- a/opkg-build
> +++ b/opkg-build
> @@ -108,7 +108,7 @@ You probably want to chown these to a system user: " >&2
>   [ "$?" -ne 0 ] && PKG_ERROR=1
>  
>   if echo $pkg | grep '[^a-z0-9.+-]'; then
> - echo "*** Error: Package name $name contains illegal 
> characters, (other than [a-z0-9.+-])" >&2
> + echo "*** Error: Package name $pkg contains illegal characters, 
> (other than [a-z0-9.+-])" >&2
>   PKG_ERROR=1;
>   fi
>  
> diff --git a/opkg-buildpackage b/opkg-buildpackage
> index 719c9a5..b7c0e8c 100755
> --- a/opkg-buildpackage
> +++ b/opkg-buildpackage
> @@ -66,7 +66,7 @@ pkg_appears_sane_control() {
>   required_field Description >/dev/null
>  
>   if echo $pkg | grep '[^a-z0-9.+-]'; then
> - echo "opkg-build: Error: Package name $name contains illegal 
> characters, (other than [a-z0-9.+-])"
> + echo "opkg-build: Error: Package name $pkg contains illegal 
> characters, (other than [a-z0-9.+-])"
>   PKG_ERROR=1;
>   fi
>  
> 

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] GPG signed package feeds and packages: opkg update fails with "No public key"

2017-08-11 Thread Alejandro del Castillo


On 08/07/2017 04:51 AM, Andersen, Christian wrote:
> Hello,
> 
> I am trying to sign our ipk-packages and the package feed using GPG. As
> far as I can tell the signatures are correctly generated using this in
> the local.conf:
> 
> INHERIT += "sign_package_feed sign_ipk"
> PACKAGE_FEED_GPG_NAME ?= "73CE8000"
> PACKAGE_FEED_GPG_PASSPHRASE_FILE ?= "/var/lib/jenkins/.gnupg/passwd.txt"
> IPK_GPG_NAME ?= "73CE8000"
> IPK_GPG_PASSPHRASE_FILE ?= "/var/lib/jenkins/.gnupg/passwd.txt"
> GPG_PATH ?= "/var/lib/jenkins/.gnupg"
> 
> The public key is installed using opkg-keyrings and this config:
>  
> OPKG_KEYRING_KEYS = "73CE8000"
> 
> On the target I am able to verify that the public key is available:
> 
> root@scb-anders05:~# opkg-key list
> 
> /etc/opkg/trusted.gpg
> 
> -
> 
> pub   rsa2048 2017-08-04 [SC]
>   B104E37136084E68203BB2CD5676B9F373CE8000
> uid   [unknown] Company 
> sub   rsa2048 2017-08-04 [E]

Have you tried to sign using a key with non-default values? I can't see 
anything clearly off on your config, other than your key being " [unknown] 
Company "

> The opkg.conf contains:
> 
> option check_signature 1
> #option check_pkg_signature 1
> option signature_type gpg-asc
> 
> But when I try opkg update I get:
> 
> root@scb-anders05:~# opkg update
> Downloading http://internalhost:8000/puck/pyro-develop/ipk/all/Packages.gz.
> Downloading http://internalhost:8000/puck/pyro-develop/ipk/all/Packages.asc.
> Downloading
> http://internalhost:8000/puck/pyro-develop/ipk/cortexa8hf-neon/Packages.gz.
> Downloading
> http://internalhost:8000/puck/pyro-develop/ipk/cortexa8hf-neon/Packages.asc.
> Downloading http://internalhost:8000/puck/pyro-develop/ipk/scb/Packages.gz.
> Downloading http://internalhost:8000/puck/pyro-develop/ipk/scb/Packages.asc.
> Collected errors:
> 
> * opkg_verify_gpg_signature: Signature status returned error: No public key
> * pkg_src_verify: Signature verification failed for all.
> * opkg_verify_gpg_signature: Signature status returned error: No public key
> * pkg_src_verify: Signature verification failed for cortexa8hf-neon.
> * opkg_verify_gpg_signature: Signature status returned error: No public key
> * pkg_src_verify: Signature verification failed for scb.
> 
> When manually loading the Packages and Packages.asc and verify the
> signature on the target it seems to work:
> 
> root@scb-anders05:~# opkg-key adv --verify Packages.asc Packages
> 
> Executing: gpg --no-options --no-default-keyring --keyring
> /etc/opkg/trusted.gpg --secret-keyring /etc/opkg/secring.gpg
> --trustdb-name /etc/opkg/trustdb.gpg --verify Packages.asc Packages
> 
> gpg: Signature made Fri Aug  4 17:00:52 2017 CEST
> gpg:using RSA key 5676B9F373CE8000
> gpg: Good signature from "Company " [unknown]
> gpg: WARNING: This key is not certified with a trusted signature!
> gpg:  There is no indication that the signature belongs to the
> owner.
> 
> Primary key fingerprint: B104 E371 3608 4E68 203B  B2CD 5676 B9F3 73CE 8000
> 
> Even after changing the trust-level for the public key to 5 (ultimate),
> opkg update does not accept the signature.
> 
> Does anybody have an idea what’s going on and how I can fix this?


-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Why can't I install eudev-hwdb

2017-06-05 Thread Alejandro del Castillo


On 06/04/2017 12:30 AM, Gary Thomas wrote:
>> Which version of opkg are you using? do you have the libsolv backend
>> enabled? running opkg --version should tell you the opkg version and the
>> libsolv version, if the backend is enabled.
> 
> # opkg --version
> opkg version 0.3.4 (libsolv 0.6.27)
> 
> Built using poky:master (a3d160f9e5826140cc8d6b2ed1b38bf022443b08)
> 
>>
>> Also, could you send a verbose log of the installation? opkg install -V4
>> . While you are at it, it would be helpful to attach your
>> /var/lib/opkg/status file too.
>>
> Attached.  This looks like good information - opkd thinks that eudev-hwdb
> is in a strange (to me) state of 'deinstall hold not-installed'

Indeed. The BAD_RECOMMENDATONS for eudev-hwdb directly hacks into the
status file and sets the package status to 'deinstall hold
not-installed'. That works if the opkg internal solver is being used,
but fails with libsolv. This bug is already being tracked [1].

We need to get the root issue fixed, but for now, as a workaround you
could revert 1ff3de844c78e3766c7f92ca17c308ef3c9427e1 and use the
internal solver.

Ross: I added some thoughts to a possible solution into the bugzilla ticket


[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=11427

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Why can't I install eudev-hwdb

2017-06-02 Thread Alejandro del Castillo


On 06/01/2017 09:52 AM, Gary Thomas wrote:
> On 2017-06-01 15:46, Burton, Ross wrote:
>>
>> On 1 June 2017 at 14:38, Gary Thomas > > wrote:
>>
>> Thanks for the suggestion.  Sadly, still no go.
>>
>>
>> No idea then.  CCing Alejandro...
> 
> Very interesting - I'm building two different system images for this
> target and I tried to apply the BAD_RECOMMENDS to only one of them.
> The target images (pure result of bitbake) did the right thing, one
> image had eudev-hwdb and the other did not.  The image without eudev-hwdb
> seems to be never able to install it using opkg install/upgrade, but
> only if the package would need to be downloaded from the IPK server.
> I copied the appropriate IPK package to that image manually and opkg
> happily installed it from the direct file.

Interesting...

Which version of opkg are you using? do you have the libsolv backend
enabled? running opkg --version should tell you the opkg version and the
libsolv version, if the backend is enabled.

Also, could you send a verbose log of the installation? opkg install -V4
. While you are at it, it would be helpful to attach your
/var/lib/opkg/status file too.

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] opkg behavior

2017-04-11 Thread Alejandro del Castillo


On 04/11/2017 08:03 AM, Gary Thomas wrote:
> I'm using opkg (IPK) packaging with my Yocto builds (using recent
> master 633ad6c9f).  For the most part, this seems to work well,
> but occasionally I'll rebuild a recipe along with the packaging
> indexes on my build machine only to find that opkg doesn't want
> to upgrade to the changes.  Here's an example:
> 
> * Update the package databases on the target board
>   root@teton-p7621:~# opkg update
>   Downloading http://192.168.1.12/teton-p7621-feeds/all/Packages.gz.
>   Updated source 'poky_am-all'.
>   Downloading
> http://192.168.1.12/teton-p7621-feeds/cortexa7hf-neon/Packages.gz.
>   Updated source 'poky_am-cortexa7hf-neon'.
>   Downloading
> http://192.168.1.12/teton-p7621-feeds/teton_p7621/Packages.gz.
>   Updated source 'poky_am-teton_p7621'.
> 
> * Try to update the package I just rebuilt.  Normally, this does the
> right thing
>   root@teton-p7621:~# opkg install production-tests
>   No packages installed or removed.
> 
> * Odd, check the packaging
>   root@teton-p7621:~# opkg list-installed | grep prod
>   production-tests - 1.0-r0.74
> 
> * Force the install by removing the existing package, etc
>   root@teton-p7621:~# opkg remove production-tests
>   Removing production-tests (1.0) from root...
>   root@teton-p7621:~# opkg install production-tests
>   Installing production-tests (1.0) on root
>   Downloading
> http://192.168.1.12/teton-p7621-feeds/teton_p7621/production-tests_1.0-r0.76_teton_p7621.ipk.
> 
>   Configuring production-tests.
> 
> So from this you can see that the package has been rebuilt (using
> the PR server) and that I can indeed install the new version.  That
> said, why did opkg not "upgrade" as expected.  Note: I often use
> the 'opkg upgrade' command but I recently updated my Poky/Yocto
> repository which caused nearly every package to be rebuilt and I
> didn't want to have to download everything (none of which affected
> my current program which is just a python script), so I chose the
> 'opkg install ...' method instead, which does seem to work sometimes.
> 
> Any ideas what I can look at or tweak to get this to work the way
> I expect?

Opkg uses libsolv as it's solver backend. When you say 'opkg install
production-tests', the solver doesn't do anything since package
'production-tests' is already installed.

What you want is a targeted upgrade, which can be done by calling 'opkg
upgrade production-tests'. Another option is to do a by version install,
which can be done by calling 'opkg install production-tests=1.0-r0.76'


-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [opkg-devel] [opkg-utils PATCH] Added support to generate index file with multiple version per package

2016-12-30 Thread Alejandro del Castillo
Looks good!

merged

On 12/30/2016 11:39 AM, Desmond Correia wrote:
> Hi Alejandro,
> 
> Thanks for catching that see attached.
> 
> 
> 
> On Fri, Dec 30, 2016 at 12:21 PM, Alejandro del Castillo
> <alejandro.delcasti...@ni.com <mailto:alejandro.delcasti...@ni.com>> wrote:
> 
> Hi Desmond, thanks for sending the patch, works as expected.
> 
> The only thing missing is your Signed-off-by line, do you mind resending
> with it?
> 
> I also have a very minor comment below
> 
> On 12/28/2016 01:15 PM, Desmond Correia wrote:
> > From aefa378d6a167124bdfb0b8d6c92aadb4c36fa46 Mon Sep 17 00:00:00 2001
> > From: Desmond <desmond.corr...@prolucid.ca 
> <mailto:desmond.corr...@prolucid.ca>
> > <mailto:desmond.corr...@prolucid.ca
> <mailto:desmond.corr...@prolucid.ca>>>
> > Date: Wed, 28 Dec 2016 13:16:48 -0500
> > Subject: [opkg-utils PATCH] Added support to generate index file with
> > multiple
> >  version per package
> > To: opkg-de...@googlegroups.com
> <mailto:opkg-de...@googlegroups.com>
> <mailto:opkg-de...@googlegroups.com
> <mailto:opkg-de...@googlegroups.com>>,
> > yocto@yoctoproject.org <mailto:yocto@yoctoproject.org>
> <mailto:yocto@yoctoproject.org <mailto:yocto@yoctoproject.org>>
> >
> > Using the -a option with opkg-make-index, you can now generate an
> index
> > file which will list multiple version of the same package. Added since
> > opkg now supports specifying version of package.
> > ---
> >  opkg-make-index | 16 
> >  opkg.py |  8 +++-
> >  2 files changed, 19 insertions(+), 5 deletions(-)
> >
> > diff --git a/opkg-make-index b/opkg-make-index
> > index 7897918..3f757f6 100755
> > --- a/opkg-make-index
> > +++ b/opkg-make-index
> > @@ -11,7 +11,7 @@ import re
> >  verbose = 0
> >
> >  def usage():
> > - sys.stderr.write("%s [-h] [-s] [-m] [-l Packages.filelist] [-p
> > Packages] [-r Packages.old] [-L localesdir] [-v] packagesdir\n" %
> > (sys.argv[0],))
> > + sys.stderr.write("%s [-h] [-s] [-m] [-a] [-l Packages.filelist]
> > [-p Packages] [-r Packages.old] [-L localesdir] [-v] packagesdir\n" %
> > (sys.argv[0],))
> >   sys.exit(-1)
> >
> >  def to_morgue(filename):
> > @@ -42,7 +42,8 @@ filelist_filename = None
> >  stamplist_filename = "Packages.stamps"
> >  opt_s = 0
> >  opt_m = 0
> > -(opts, remaining_args) = getopt.getopt(sys.argv[1:], "hl:p:vsmr:L:")
> > +opt_a = 0
> > +(opts, remaining_args) = getopt.getopt(sys.argv[1:], "hl:p:vsmr:L:a")
> >  for (optkey, optval) in opts:
> >   if optkey == '-h':
> >usage()
> > @@ -61,6 +62,8 @@ for (optkey, optval) in opts:
> >old_filename = optval
> >   if optkey == '-L':
> >locales_dir = optval
> > + if optkey == '-a':
> > +  opt_a = 1
> >
> >  if ( not remaining_args ):
> >   usage()
> > @@ -120,12 +123,17 @@ for abspath in files:
> >if (verbose):
> > sys.stderr.write("Reading info for package %s\n" %
> > (filename,))
> >pkg = opkg.Package(abspath, relpath=pkg_dir)
> > - pkg_key = ("%s:%s" % (pkg.package, pkg.architecture))
> > +
> > + if opt_a:
> > +  pkg_key = ("%s:%s:%s" % (pkg.package, pkg.architecture,
> > pkg.version))
> > + else:
> > + pkg_key = ("%s:%s" % (pkg.package, pkg.architecture))
> > +
> >   if (pkg_key in packages.packages):
> >old_filename = packages.packages[pkg_key].filename
> >   else:
> >old_filename = ""
> > - s = packages.add_package(pkg)
> > + s = packages.add_package(pkg, opt_a)
> >   pkgsStamps[filename] = fnameStat.st_mtime
> >   if s == 0:
> >if old_filename:
> > diff --git a/opkg.py b/opkg.py
> > index b0d79a6..47473da 100644
> > --- a/opkg.py
> > +++ b/opkg.py
> > @@ -501,10 +501,16 @@ class Packages(object):
> >  self.packages = {}
> >  return
> >
> > -de

Re: [yocto] [opkg-devel] [opkg-utils PATCH] Added support to generate index file with multiple version per package

2016-12-30 Thread Alejandro del Castillo
Hi Desmond, thanks for sending the patch, works as expected.

The only thing missing is your Signed-off-by line, do you mind resending
with it?

I also have a very minor comment below

On 12/28/2016 01:15 PM, Desmond Correia wrote:
> From aefa378d6a167124bdfb0b8d6c92aadb4c36fa46 Mon Sep 17 00:00:00 2001
> From: Desmond  >
> Date: Wed, 28 Dec 2016 13:16:48 -0500
> Subject: [opkg-utils PATCH] Added support to generate index file with
> multiple
>  version per package
> To: opkg-de...@googlegroups.com ,
> yocto@yoctoproject.org 
> 
> Using the -a option with opkg-make-index, you can now generate an index
> file which will list multiple version of the same package. Added since
> opkg now supports specifying version of package.
> ---
>  opkg-make-index | 16 
>  opkg.py |  8 +++-
>  2 files changed, 19 insertions(+), 5 deletions(-)
> 
> diff --git a/opkg-make-index b/opkg-make-index
> index 7897918..3f757f6 100755
> --- a/opkg-make-index
> +++ b/opkg-make-index
> @@ -11,7 +11,7 @@ import re
>  verbose = 0
>  
>  def usage():
> - sys.stderr.write("%s [-h] [-s] [-m] [-l Packages.filelist] [-p
> Packages] [-r Packages.old] [-L localesdir] [-v] packagesdir\n" %
> (sys.argv[0],))
> + sys.stderr.write("%s [-h] [-s] [-m] [-a] [-l Packages.filelist]
> [-p Packages] [-r Packages.old] [-L localesdir] [-v] packagesdir\n" %
> (sys.argv[0],))
>   sys.exit(-1)
>  
>  def to_morgue(filename):
> @@ -42,7 +42,8 @@ filelist_filename = None
>  stamplist_filename = "Packages.stamps"
>  opt_s = 0
>  opt_m = 0
> -(opts, remaining_args) = getopt.getopt(sys.argv[1:], "hl:p:vsmr:L:")
> +opt_a = 0
> +(opts, remaining_args) = getopt.getopt(sys.argv[1:], "hl:p:vsmr:L:a")
>  for (optkey, optval) in opts:
>   if optkey == '-h': 
>usage()
> @@ -61,6 +62,8 @@ for (optkey, optval) in opts:
>old_filename = optval
>   if optkey == '-L':
>locales_dir = optval
> + if optkey == '-a':
> +  opt_a = 1
>  
>  if ( not remaining_args ):
>   usage()
> @@ -120,12 +123,17 @@ for abspath in files:
>if (verbose):
> sys.stderr.write("Reading info for package %s\n" %
> (filename,))
>pkg = opkg.Package(abspath, relpath=pkg_dir)
> - pkg_key = ("%s:%s" % (pkg.package, pkg.architecture))
> +
> + if opt_a:
> +  pkg_key = ("%s:%s:%s" % (pkg.package, pkg.architecture,
> pkg.version))
> + else:
> + pkg_key = ("%s:%s" % (pkg.package, pkg.architecture))
> +
>   if (pkg_key in packages.packages):
>old_filename = packages.packages[pkg_key].filename
>   else:
>old_filename = ""
> - s = packages.add_package(pkg)
> + s = packages.add_package(pkg, opt_a)
>   pkgsStamps[filename] = fnameStat.st_mtime
>   if s == 0:
>if old_filename:
> diff --git a/opkg.py b/opkg.py
> index b0d79a6..47473da 100644
> --- a/opkg.py
> +++ b/opkg.py
> @@ -501,10 +501,16 @@ class Packages(object):
>  self.packages = {}
>  return
>  
> -def add_package(self, pkg):
> +def add_package(self, pkg, opt_a=0):
>  package = pkg.package
>  arch = pkg.architecture
>  name = ("%s:%s" % (package, arch))

since you are defining name on the else case, you can delete the line above

> +ver = pkg.version
> +if opt_a:
> +name = ("%s:%s:%s" % (package, arch, ver))
> +else:
> +name = ("%s:%s" % (package, arch))
> +
>  if (name not in self.packages):
>  self.packages[name] = pkg
>  
> -- 
> 2.7.4
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "opkg-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to opkg-devel+unsubscr...@googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils PATCH 0/2] migrate to python 3

2016-05-27 Thread Alejandro del Castillo
First patch migrates all opkg-utils scrips to python 3. opkg-graph-deps
doesn't work on python 3 since it depends on pydot, which hasn't migrated
to python 3. Second patch fixes opkg-update-index, which was broken.

Alejandro del Castillo (2):
  migrate to python 3
  opkg.py/write_packages_file: call __str__ instead of __repr__

 arfile.py| 10 --
 makePackage  |  2 ++
 opkg-compare-indexes |  2 ++
 opkg-graph-deps  | 39 +--
 opkg-list-fields |  2 ++
 opkg-make-index  |  2 ++
 opkg-show-deps   |  2 ++
 opkg-unbuild |  2 ++
 opkg-update-index|  1 +
 opkg.py  | 19 +++
 10 files changed, 53 insertions(+), 28 deletions(-)

-- 
1.9.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils PATCH 2/2] opkg.py/write_packages_file: call __str__ instead of __repr__

2016-05-27 Thread Alejandro del Castillo
Commit b9eec00a67f13ad9f9526caf591578b40d73a391 correctly renamed
__repr__to __str__. A call site in write_packages_file was missed.

Signed-off-by: Alejandro del Castillo <alejandro.delcasti...@ni.com>
---
 opkg.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/opkg.py b/opkg.py
index fe6b9e0..2acc469 100644
--- a/opkg.py
+++ b/opkg.py
@@ -533,7 +533,7 @@ class Packages(object):
 names = list(self.packages.keys())
 names.sort()
 for name in names:
-f.write(self.packages[name].__repr__())
+f.write(self.packages[name].__str__())
 return
 
 def keys(self):
-- 
1.9.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils PATCH 1/2] migrate to python 3

2016-05-27 Thread Alejandro del Castillo
General fixes
* Add __future__ imports
* Use print function instead of print statement
* Use new style classes
* Iterate over list, instead of over object.keys()
* Use six.iteritems  instead of iteritems()

opkg.py:
* Add conditional to decode string if needed in Package:read_control

arfile.py
* Add seekable method to FileSection class (needed by tarfile)

Signed-off-by: Alejandro del Castillo <alejandro.delcasti...@ni.com>
---
 arfile.py| 10 --
 makePackage  |  2 ++
 opkg-compare-indexes |  2 ++
 opkg-graph-deps  | 39 +--
 opkg-list-fields |  2 ++
 opkg-make-index  |  2 ++
 opkg-show-deps   |  2 ++
 opkg-unbuild |  2 ++
 opkg-update-index|  1 +
 opkg.py  | 17 ++---
 10 files changed, 52 insertions(+), 27 deletions(-)

diff --git a/arfile.py b/arfile.py
index 88ace46..4bab526 100644
--- a/arfile.py
+++ b/arfile.py
@@ -5,12 +5,15 @@ Copyright (c) 2006-7 Paul Sokolovsky
 This file is released under the terms 
 of GNU General Public License v2 or later.
 """
+from __future__ import absolute_import
+from __future__ import print_function
+from builtins import object
 import sys
 import os
 import tarfile 
 
 
-class FileSection:
+class FileSection(object):
 "A class which allows to treat portion of file as separate file object."
 
 def __init__(self, f, offset, size):
@@ -30,6 +33,9 @@ class FileSection:
 else:
 assert False
 
+def seekable(self):
+return True 
+
 def tell(self):
 #print("tell()")
 return self.f.tell() - self.offset
@@ -38,7 +44,7 @@ class FileSection:
 #print("read(%d)" % size)
 return self.f.read(size)
 
-class ArFile:
+class ArFile(object):
 
 def __init__(self, f, fn):
 self.f = f
diff --git a/makePackage b/makePackage
index ec76338..4bdfc56 100755
--- a/makePackage
+++ b/makePackage
@@ -5,6 +5,8 @@
 #   Insert the filename, size, and md5 lines before the description.
 # Call it like this:
 #  find . -name \*.opk | xargs -n 1 makePackage > Packages
+from __future__ import absolute_import
+from __future__ import print_function
 
 import sys
 import opkg
diff --git a/opkg-compare-indexes b/opkg-compare-indexes
index 7bb3c69..b60d20a 100755
--- a/opkg-compare-indexes
+++ b/opkg-compare-indexes
@@ -1,4 +1,6 @@
 #!/usr/bin/env python
+from __future__ import absolute_import
+from __future__ import print_function
 
 import sys, os
 from glob import glob
diff --git a/opkg-graph-deps b/opkg-graph-deps
index d7f4fd2..6653fd5 100755
--- a/opkg-graph-deps
+++ b/opkg-graph-deps
@@ -1,18 +1,21 @@
 #!/usr/bin/env python
+from __future__ import absolute_import
+from __future__ import print_function
 
 import sys
 import os
 import getopt
 import pydot
 import opkg
+import six
 
 def usage(more=False):
-print >>sys.stderr, ( 'Usage: opkg-graph-deps '
+print(( 'Usage: opkg-graph-deps '
 '[-h] [-d] [-o feed.dot] '
 '[-u ] '
-'' )
+'' ), file=sys.stderr)
 if more:
-print >>sys.stderr, '\n'.join( [
+print('\n'.join( [
 '',
 'Generates a dot formatted dependency graph of an IPK feed.',
 '',
@@ -56,7 +59,7 @@ def usage(more=False):
 '  the alias != (to).',
 ' ipkBrokenDep: Set to "1" if (to) is missing from the feed.',
 '',
-] )
+] ), file=sys.stderr)
 exit(1)
 
 # optional args
@@ -76,19 +79,19 @@ for (optkey, optval) in opts:
 feed_url = optval
 
 if not index_files:
-print >>sys.stderr, 'Must specify a path to at least one Packages file'
+print('Must specify a path to at least one Packages file', file=sys.stderr)
 usage()
 
 def fatal_error(msg):
-print >>sys.stderr, ('ERROR: ' + str(msg))
+print(('ERROR: ' + str(msg)), file=sys.stderr)
 exit(1)
 
 def warn(msg):
-print >>sys.stderr, str(msg)
+print(str(msg), file=sys.stderr)
 
 def debug(msg):
 if enable_debug:
-print >>sys.stderr, ('DEBUG: ' + str(msg))
+print(('DEBUG: ' + str(msg)), file=sys.stderr)
 
 def split_dep_list(lst):
 '''
@@ -190,7 +193,7 @@ for indexFilePath in index_files:
 packages.read_packages_file(indexFilePath)
 
 # add each package
-for pkgKey in packages.keys():
+for pkgKey in list(packages.keys()):
 pkg = packages[pkgKey]
 
 # sanity check: verify important attributes are defined for
@@ -228,7 +231,7 @@ for indexFilePath in index_files:
 # provides the alias.
 # These packages are not added to the graph because their implementations
 # are already there.
-for pkgKey, pkg in real_pkg_map.iteritems():
+for pkgKey, pkg in six.iteritems(real_pkg_map):
 for alias in split_dep_list(pkg.provides):
 if alias not in active_pkg_map:
 # add it
@@ -260,7 +263,7 @@ for pkgKey, pkg in real_pkg_map.iteritems():
 virt_pkg_map[alias].app

[yocto] [PATCH] opkg-build: return error if Version is missing

2016-05-02 Thread Alejandro del Castillo
If Version is missing in a control file, opkg-build reports an error to
stdout, but returns 0. Fix condition on pkg_appears_sane to properly
return an error if Version is missing.

Suggested-by: Thomas de Schampheleire <patrickdeping...@gmail.com>
Signed-off-by: Alejandro del Castillo <alejandro.delcasti...@ni.com>
---
 opkg-build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/opkg-build b/opkg-build
index 82a0a51..ebbf5a3 100755
--- a/opkg-build
+++ b/opkg-build
@@ -86,8 +86,9 @@ You probably want to chown these to a system user: " >&2
pkg=`required_field Package`
[ "$?" -ne 0 ] && PKG_ERROR=1
 
-   version=`required_field Version | sed 's/Version://; s/^.://g;'`
+   version=`required_field Version`
[ "$?" -ne 0 ] && PKG_ERROR=1
+   version=`echo $version | sed 's/Version://; s/^.://g;'`
 
arch=`required_field Architecture`
[ "$?" -ne 0 ] && PKG_ERROR=1
-- 
1.9.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [PATCH][opkg-utils] opkg-build: Exit when fail to list files.

2016-04-05 Thread Alejandro del Castillo



On 04/01/2016 09:50 AM, Aníbal Limón wrote:

Hi,

Comments below,

alimon


On 03/31/2016 11:26 PM, Mike Looijmans wrote:

On 31-03-16 23:27, Aníbal Limón wrote:

We have an issue when ls segfaults in some cases [1] so it's
better to detect the failure at this level instead of continue
the build process.

[YOCTO #8926]

[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8926#c0

Signed-off-by: Aníbal Limón 
---
   opkg-build | 8 
   1 file changed, 8 insertions(+)

diff --git a/opkg-build b/opkg-build
index 98008b6..a9ccad2 100755
--- a/opkg-build
+++ b/opkg-build
@@ -53,6 +53,10 @@ pkg_appears_sane() {
   echo "*** Warning: The following files have names ending in
'~'.
   You probably want to remove them: " >&2
   ls -ld $tilde_files
+if [ $? -ne 0 ]; then


Instead of using $? you could just use the result of "ls" directly, i.e.:


Do you have any specific reason for not use $? variable?, for me is more
simple to test the exit status in this way.


Using $? works, but I agree with Mike: I think it's cleaner to directly test
the result of ls (and avoids and extra line).


if ! ls -ld $tilde_files; then



+echo "*** Error: Fail to list files have names ending in
'~'."
+exit 1
+fi
   echo >&2
   else
   echo "*** Removing the following files: $tilde_files"
@@ -66,6 +70,10 @@ You probably want to remove them: " >&2
   echo "*** Warning: The following files have a UID greater
than 99.
   You probably want to chown these to a system user: " >&2
   ls -ld $large_uid_files
+if [ $? -ne 0 ]; then
+echo "*** Error: Fail to list files have a UID greater
than 99."
+exit 1
+fi
   echo >&2
   fi




--
Cheers,

Alejandro
--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [OE-core] OpenEmbedded Developer meeting April 8 after ELC/Yocto Project developer day

2016-03-15 Thread Alejandro del Castillo
Hey Phil,

I am not going to make it this time to ELC...but I did see that the
meta-debian guys are presenting again...please troll them for me! =)

On 03/14/2016 06:16 PM, Philip Balister wrote:
> Yes, I am nagging.
> 
> On the Friday after ELC in San Diego (Yocto Project Dev Day is
> Thursday), we will have a developer meeting near the conference venue
> Jefro has arranged for a room at the Marriot next to the conference
> venue, sponsored by the Yocto Project.
> 
> OpenEmbedded would like to thank the Yocto Project for sponsoring the
> room. If you would like to sponsor a future meeting, let me know. Also,
> we can accept tax deductible contributions via Software in the Public
> Interest (http://spi-inc.org/).
> 
> http://openembedded.org/wiki/OEDAM_2016
> 
> At these meetings we try to follow an agenda we develop before hand on
> the wiki page. I've created a rough agenda by posting notes from the
> meeting in Dublin. Everyone, please go over the notes and add remarks
> for completed items.
> 
> Please add your name to the attendee list on the wiki. You'll need an
> account, I should get an email when you sign up, but nag me if it isn't
> approved quickly. I've seen some issues with the emails from the wiki.
> 
> You can also bring up issues at the meeting. We only have one day
> scheduled for the meeting, so a little pre-planning helps keep us on time.
> 
> Everyone involved in the project is welcome to attend, no how
> knowledgeable in the overall OpenEmbedded project We like to hear from
> people from many different use cases.
> 
> Thanks for reading and we are looking forward to meeting new people!
> 
> Philip
> 

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-selinux][PATCH] busybox: explicitly set temporary shell scripts to be executable

2016-03-07 Thread Alejandro del Castillo


On 03/01/2016 11:43 PM, Philip Tricca wrote:
> On 03/01/2016 02:58 PM, Alejandro del Castillo wrote:
>> I first started looking at busybox postinst (modified on meta-selinux) since 
>> I
>> am getting errors during "opkg upgrade buysbox". The errors that I am getting
>> are of the form:
>>
>> update-alternatives: Error: not linking /bin/gunzip to
>> /usr/lib/busybox/bin/gunzip since /bin/gunzip exists and is not a link
>>
>> Which only happen for utilities that don't have any alternative installed 
>> after
>> removing busybox, hence no symlink. Utilities that do have an alternative
>> installed are correctly processed, for example:
>>
>> update-alternatives: Linking /usr/bin/ar to /usr/bin/x86_64-nilrt-linux-ar
>>
>> The root problem is that meta-selinux on commit
>> 521ca9c9cf370840e9f8c808a7955aa5da7c356e replaced the temporary symlink 
>> creation
>> on postinst with sh wrappers, which breaks update-alternatives when it tries 
>> to
>> update symlinks (which are now sh wrappers).
>>
>> Is there a reason why the postinst needs to be different on the selinux 
>> version
>> of busybox? If the postinst is just creating temporary symlinks which will go
>> away once the update-alternatives block later on the script runs, do we need 
>> the
>> sh wrappers?
> 
> Thanks for the additional context Alejandro. I don't have enough history
> yet to pull answers to stuff like this out at will though. Hopefully
> someone with the right background will chime in. Either way I'll circle
> back once the easy stuff in the backlog is done and we'll try to sort
> something out.

Sounds good, I hope someone can provide background since it looks to me like the
postinst is wrong, but I don't have historic context.

Let me know if I can help in any way.

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-selinux][PATCH] busybox: explicitly set temporary shell scripts to be executable

2016-03-01 Thread Alejandro del Castillo
I first started looking at busybox postinst (modified on meta-selinux) since I
am getting errors during "opkg upgrade buysbox". The errors that I am getting
are of the form:

update-alternatives: Error: not linking /bin/gunzip to
/usr/lib/busybox/bin/gunzip since /bin/gunzip exists and is not a link

Which only happen for utilities that don't have any alternative installed after
removing busybox, hence no symlink. Utilities that do have an alternative
installed are correctly processed, for example:

update-alternatives: Linking /usr/bin/ar to /usr/bin/x86_64-nilrt-linux-ar

The root problem is that meta-selinux on commit
521ca9c9cf370840e9f8c808a7955aa5da7c356e replaced the temporary symlink creation
on postinst with sh wrappers, which breaks update-alternatives when it tries to
update symlinks (which are now sh wrappers).

Is there a reason why the postinst needs to be different on the selinux version
of busybox? If the postinst is just creating temporary symlinks which will go
away once the update-alternatives block later on the script runs, do we need the
sh wrappers?


On 02/19/2016 04:45 PM, Alejandro del Castillo wrote:
> During an on target upgrade, the postinst script is creating scripts
> that call buysbox, to avoid missing commands errors. However, the
> scripts permissions are not set explicitly, relying on the mask.
> 
> Signed-off-by: Alejandro del Castillo <alejandro.delcasti...@ni.com>
> ---
>  recipes-core/busybox/busybox_%.bbappend | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/recipes-core/busybox/busybox_%.bbappend 
> b/recipes-core/busybox/busybox_%.bbappend
> index b4935b2..2e806af 100644
> --- a/recipes-core/busybox/busybox_%.bbappend
> +++ b/recipes-core/busybox/busybox_%.bbappend
> @@ -78,6 +78,7 @@ pkg_postinst_${PN} () {
>   # we can use busybox here 
> because even if we are using splitted busybox
>   # we've made a symlink from 
> /bin/busybox to /bin/busybox.nosuid.
>   busybox echo 
> "#!/bin/busybox$suffix" > $link
> +/bin/busybox.nosuid chmod 
> 755 $link
>   fi
>   done < /etc/busybox.links$suffix
>   fi
> 

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-selinux][PATCH] busybox: explicitly set temporary shell scripts to be executable

2016-02-19 Thread Alejandro del Castillo
During an on target upgrade, the postinst script is creating scripts
that call buysbox, to avoid missing commands errors. However, the
scripts permissions are not set explicitly, relying on the mask.

Signed-off-by: Alejandro del Castillo <alejandro.delcasti...@ni.com>
---
 recipes-core/busybox/busybox_%.bbappend | 1 +
 1 file changed, 1 insertion(+)

diff --git a/recipes-core/busybox/busybox_%.bbappend 
b/recipes-core/busybox/busybox_%.bbappend
index b4935b2..2e806af 100644
--- a/recipes-core/busybox/busybox_%.bbappend
+++ b/recipes-core/busybox/busybox_%.bbappend
@@ -78,6 +78,7 @@ pkg_postinst_${PN} () {
# we can use busybox here 
because even if we are using splitted busybox
# we've made a symlink from 
/bin/busybox to /bin/busybox.nosuid.
busybox echo 
"#!/bin/busybox$suffix" > $link
+/bin/busybox.nosuid chmod 755 
$link
fi
done < /etc/busybox.links$suffix
fi
-- 
1.9.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [PATCH] libopkg: Add disable_intercepts option to opkg.conf

2016-01-06 Thread Alejandro del Castillo


On 01/06/2016 05:07 PM, Haris Okanovic wrote:
> When set, this option disables interception and deferral of certain
> utilities (E.g. depmod, ldconfig) when called from maintainer scripts
> (E.g. postinst). Disabled by default to maintain old behavior.
> 
> Append "option disable_intercepts 1" to opkg.conf to set it.
> 
> Testing:
>  * Installed package containing postinst script and verified
>intercept prep/finalize does not run via DEBUG output.
>  * Ran `make check` with option set in the test suite's opkg.conf,
>no additional failures.
> 
> Yocto bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=8837
> 
> Signed-off-by: Haris Okanovic <haris.okano...@ni.com>
> Cc: Alejandro del Castillo <alejandro.delcasti...@ni.com>
> Cc: Paul Barker <p...@paulbarker.me.uk>
> ---
>  libopkg/opkg_cmd.c  | 22 ++
>  libopkg/opkg_conf.c |  1 +
>  libopkg/opkg_conf.h |  1 +
>  3 files changed, 16 insertions(+), 8 deletions(-)
> 
> diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c
> index 050e6ec..ff3dcc0 100644
> --- a/libopkg/opkg_cmd.c
> +++ b/libopkg/opkg_cmd.c
> @@ -328,7 +328,7 @@ static int opkg_configure_packages(char *pkg_name)
>  pkg_vec_t *all, *ordered, *visited;
>  unsigned int i;
>  pkg_t *pkg;
> -opkg_intercept_t ic;
> +opkg_intercept_t ic = NULL;
>  int r, err = 0;
>  
>  if (opkg_config->offline_root && !opkg_config->force_postinstall) {
> @@ -352,10 +352,13 @@ static int opkg_configure_packages(char *pkg_name)
>  opkg_recurse_pkgs_in_order(pkg, all, visited, ordered);
>  }
>  
> -ic = opkg_prep_intercepts();
> -if (ic == NULL) {
> -err = -1;
> -goto error;
> +if (!opkg_config->disable_intercepts) {
> +ic = opkg_prep_intercepts();
> +if (ic == NULL) {
> +err = -1;
> +goto error;
> +}
> +opkg_msg(DEBUG, "Intercepts enabled; statedir=\"%s\"\n", 
> ic->statedir);
>  }
>  
>  for (i = 0; i < ordered->len; i++) {
> @@ -379,9 +382,12 @@ static int opkg_configure_packages(char *pkg_name)
>  }
>  }
>  
> -r = opkg_finalize_intercepts(ic);
> -if (r != 0)
> -err = -1;
> +if (!opkg_config->disable_intercepts) {
> +opkg_msg(DEBUG, "Finalizing intercepts\n");
> +r = opkg_finalize_intercepts(ic);
> +if (r != 0)
> +err = -1;
> +}
>  
>   error:
>  pkg_vec_free(all);
> diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
> index f52a4db..2d2f4f7 100644
> --- a/libopkg/opkg_conf.c
> +++ b/libopkg/opkg_conf.c
> @@ -85,6 +85,7 @@ static opkg_option_t options[] = {
>  {"overwrite_no_owner", OPKG_OPT_TYPE_BOOL, &_conf.overwrite_no_owner},
>  {"combine", OPKG_OPT_TYPE_BOOL, &_conf.combine},
>  {"cache_local_files", OPKG_OPT_TYPE_BOOL, &_conf.cache_local_files},
> +{"disable_intercepts", OPKG_OPT_TYPE_BOOL, &_conf.disable_intercepts},
>  #if defined(HAVE_OPENSSL)
>  {"signature_ca_file", OPKG_OPT_TYPE_STRING, &_conf.signature_ca_file},
>  {"signature_ca_path", OPKG_OPT_TYPE_STRING, &_conf.signature_ca_path},
> diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h
> index 7460ca2..5421044 100644
> --- a/libopkg/opkg_conf.h
> +++ b/libopkg/opkg_conf.h
> @@ -107,6 +107,7 @@ typedef struct opkg_conf {
>  int volatile_cache;
>  int combine;
>  int cache_local_files;
> +int disable_intercepts;
>  int host_cache_dir;
>  
>  /* ssl options: used only when opkg is configured with '--enable-curl',
> 

Wrong ml, could you resend to opkg-de...@googlegroups.com? Also, you no longer
needed to CC Paul

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [PATCH] opkg-utils: Add opkg-graph-deps

2016-01-06 Thread Alejandro del Castillo


On 01/04/2016 05:45 PM, Haris Okanovic wrote:
> Usage: opkg-graph-deps [-h] [-o feed.dot] [-u ]  Packages>
> 
> Generates a dot formatted dependency graph of an IPK feed.
> 
> The feed is specified by a list of IPK index (Packages) files, which
> are sourced in the order specified to build a dependency graph. Last
> index to declare a package wins, but also generates a warning to stderr.
> 

opkg-utils development happens on opkg-de...@googlegroups.com. Can you resend?
(you also don't need to CC Paul anymore)

Thanks for the work on this, look like a great addition to opkg-utils.

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] yocto package naming

2016-01-06 Thread Alejandro del Castillo


On 12/22/2015 03:40 AM, Simon Ruetzler wrote:
> Hello,
> I want to create different packages from one recipe.
> 
> This is working except for one package.
> I addes this package with
> PACKAGES += " ${PN}-demo"
> and I expected that it is named with the recipe name and demo. In this case
> rumo-cpp-demo-1.0-rc...
> But the name is libscom1-1.0-rc..
> 
> The demo package contains the files for a dynamic library: libscom.so,
> libscom.so.1 and libscom.so.1.5.0
> and this library name is automatically used for the package name.
> 
> For the other packages the name are as expected. All package are defined in 
> the
> same way except that FILES_.. definition is different.
> This packages also have dynamic libs but only the libname.so.1 files and the
> libname.so as a link.
> 
> Why is the demo package created with the libscom name? How can I disable this?
> 
> Regards Simon

I believe setting DEBIAN_NOAUTONAME_${PN}-demo = "1" should do it.

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] opkg 0.3.0 or rootfs task

2015-11-02 Thread Alejandro del Castillo


On 11/02/2015 09:31 AM, Christopher Larson wrote:
> 
> On Mon, Nov 2, 2015 at 8:25 AM, Nicolas Dechesne  > wrote:
> 
> On Mon, Oct 26, 2015 at 12:46 AM, Christopher Larson  > wrote:
> 
> 
> I've just posted patches to the opkg-devel list which should fix 
> this. I had
> intended to give them a bit more testing before I sent them but a 
> quick fix is
> needed.
> 
> 
> Thanks for your quick work on this, Paul, it's much appreciated. From 
> some initial testing, builds are completing now. We'll keep testing it out.
> 
> 
> 
> I just hit the same issue. I was pointed out to this thread on IRC today. 
> I found the patches on the 0.3.x branch in the opkg git tree. Apart from 
> applying these patches, do i need to do anything in any OE variables to use 
> the newly added options? I am not entirely sure after reading this thread and 
> looking at the patches..
> 
> 
> No, there's nothing else you need to do. The patches fromPaul change the opkg 
> download cache to use checksums rather than the entire url as the filename, 
> which avoids the file name length problem.

The patches are under review on the opkg mailing list: 
https://groups.google.com/forum/#!topic/opkg-devel/UzDigiuKBcs. I asked Paul 
for a small modification on one of the patches, once that's done, I will pull 
them into the opkg repo (and we'll need to update the opkg recipe).

> I would not apply the first patch in the series, however, since that's not 
> related to this. The first patch (memory leak fix) caused double-free 
> failures in glibc in our testing.

yes, the first patch needs to be dropped

-- 
Cheers,

Alejandro
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] opkg 0.3.0 or rootfs task

2015-10-24 Thread Alejandro del Castillo



On 10/21/2015 02:49 AM, Ahsan, Noor wrote:

We are hitting this issue on another BSP

file:_var_jenkins_workspace_ce-main_buildhost_SB64_buildtype_industrial_machine_zedboard-zynq7-mel_build_zedboard-zynq7-mel_tmp_deploy_ipk_zedboard_zynq7_mel_kernel-module-lttng-ring-buffer-client-mmap-overwrite_2.6.2+git0+7a88f8b506-r0.0_zedboard_zynq7_mel.ipk

need its solution quickly


If you are in need of a quick workaround, try setting:

option cache_local_files 0

on opkg.conf. This will make a copy of your ipk's instead of creating 
symlinks (haven't try it myself, but that's my understanding).


Also, please open a bug report for opkg on 
https://bugzilla.yoctoproject.org to track the issue.



*From:*kerg...@gmail.com [mailto:kerg...@gmail.com] *On Behalf Of
*Christopher Larson
*Sent:* Tuesday, October 20, 2015 10:20 PM
*To:* Paul Barker
*Cc:* Ahsan, Noor; yocto@yoctoproject.org
*Subject:* Re: [yocto] opkg 0.3.0 or rootfs task

On Tue, Oct 20, 2015 at 10:14 AM, Christopher Larson
> wrote:

On Sun, Oct 18, 2015 at 2:57 AM, Paul Barker > wrote:

On Fri, Oct 16, 2015 at 07:38:19PM +, Ahsan, Noor wrote:
 > On Oct 16, 2015, at 5:47 AM, Ahsan, Noor
>> wrote:
 >
 > Hello,
 >
 > I noticed that at the time of rootfs creation symbolic links
of the ipk files present in deploy/ipk. The problem what have it
while creation of symbolic link it take the full path till that
ipk and remove slashes and convert them into underscores. Use
that as the name of the symbolic link. This make a very long
file names. If we have very long path then name of the symlink
exceed from max filename limits. And we get following error
 >
 > Collected errors:
 > * file_link: unable to stat

`/var/jenkins/workspace/mel_cedar-main/buildhost/amd-ubuntu14-32b/buildtype/iot/machine/mel-dra7xx-evm/build_mel-dra7xx-evm/tmp/work/mel_dra7xx_evm-mel-linux-gnueabi/console-image/1.0-r0/rootfs//var/cache/opkg/volatile/file:_var_jenkins_workspace_mel_cedar-main_buildhost_amd-ubuntu14-32b_buildtype_iot_machine_mel-dra7xx-evm_build_mel-dra7xx-evm_tmp_deploy_ipk_mel_dra7xx_evm_kernel-module-lttng-ring-buffer-client-mmap-overwrite_2.6.2+git0+7a88f8b506-r0.0_mel_dra7xx_evm.ipk':
File name too long.
 >
 > Can anyone tell me why the addition of full path was added to
the symlink name and can we remove it cause it is cause issues?
 >
 > what does
 >
 > getconf PATH_MAX /
 >
 > show ?
 >
 > jenkins@amd-ubu14-32-3:~$ getconf -a | grep  PATH_MAX
 > PATH_MAX   4096
 > _POSIX_PATH_MAX4096
 >
 >
 > I think the issue is with file name not the path.
 >
 > Secondly the googling which I did reveals that symlink
creation can't be stopped. I just wanna confirm that is my
findings correct?
 >

This looks like something we overlooked in opkg. When we added
the caching code
we didn't think about how long the paths and filenames might get
during the
rootfs step. It's not currently possible to reduce the length of
the symlink
filenames, but it is possible to change the directory in which
the symlinks are
created.

Currently the opkg cache dir can only be set in the opkg.conf
file. I think we
should add a '--cache-dir' argument to opkg. If this is added
you'll be able to
set the following in your local.conf file to change the cache
location. Eg. to
use '/tmp/opkg' on the host during rootfs creation.

 OPKG_ARGS = "--cache-dir=/tmp/opkg"

I'll submit a patch to opkg to add this option.

This will only shorten the full path, not the filename length, so I
doubt this'll solve it. That said, I can't actually successfully
test this today, because cache_dir is made relative to offline_root,
so setting such a path as you suggest doesn't shorten the full path
either.


Also, did a touch of just the cache filename and it gives the same
filename length error, so where the cache dir is really isn't going to
matter, it's the filename including the full path to a deep BUILDDIR,
and therefore DEPLOY_DIR_IPK, which is the problem.
--

Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics




--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [opkg-devel] Stepping back from opkg maintenance

2015-03-10 Thread Alejandro del Castillo
HI Paul,

Thanks for leading the project during the past 18 months. You can tell 
from the features/bug fixes that opkg improved a lot. Regarding the future 
of opkg, I would like to put my name forward to step in and help maintain 
the project. I am really interested in the continued success of it, and 
will like to take a more active role on it. My employer agreed to let me 
spend time maintaining it, which should give me bandwidth to continue the 
work you have been doing. 

I have been following the list for some time now, and have played with the 
code on my own. However, I do need to ramp my knowledge up, which I intend 
to do (probably start tackling some of the defects, and testing of 0.3).

Thanks again for all your hard work,

-Alejandro




From:   Paul Barker p...@paulbarker.me.uk
To: opkg-devel opkg-de...@googlegroups.com, 
Cc: Yocto discussion list yocto@yoctoproject.org, OE Core 
openembedded-c...@lists.openembedded.org
Date:   03/01/2015 09:14 AM
Subject:[opkg-devel] Stepping back from opkg maintenance
Sent by:opkg-de...@googlegroups.com



Hi all,

I had a change of circumstances at the beginning of January. Previously I 
was a
full-time PhD student and maintaining opkg was my side project. Now I'm a
full-time software engineer and finishing up my PhD thesis is my side 
project.
I've been trying to find time to fit opkg in there as well but it's just 
not
happening. I had at least hoped that I could get opkg to a v0.3.0 release 
before
I had to step back from opkg development but as I haven't really made any
commits to opkg in 2 months now I don't think it's reasonable to expect 
that
I'll get this done any time soon.

I'll try to keep an eye on the opkg mailing list and contribute with 
answers and
suggestions when I can but I think someone else will have to take over as 
the
maintainer of opkg. I'll do whatever I can to ensure as smooth transition 
if
someone else wants to take up the job of moving opkg forward.

I'd like to thank everyone that's contributed to opkg, whether by sending
patches or just by reporting bugs or making suggestions. I've only been
maintainer for around 18 months but I'd like to think we've made some good
progress in that time and I hope that that can continue forwards under 
someone
else's leadership.

Once I've submitted my PhD thesis I'll hopefully find some time to get 
back
involved with open source projects, whether that's further work on opkg or
getting involved in a different project.

Many thanks again,

-- 
Paul Barker

Email: p...@paulbarker.me.uk
http://www.paulbarker.me.uk

-- 
You received this message because you are subscribed to the Google Groups 
opkg-devel group.
To unsubscribe from this group and stop receiving emails from it, send an 
email to opkg-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[attachment signature.asc deleted by Alejandro del Castillo/AUS/NIC] 

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto