All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem building meta-mono gtk-sharp with dunfell release
@ 2020-05-19 17:50 Alex J Lennon
  2020-05-19 21:05 ` [poky] " Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Alex J Lennon @ 2020-05-19 17:50 UTC (permalink / raw)
  To: poky

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

Hi,

I've run into a problem with my CI building meta-mono gtk-sharp recipe with dunfell and I wonder if anybody can advise?

> 
> File: '/data_drive/git/monotest/poky/meta/lib/oe/sstatesig.py', lineno:
> 548, function: process
> 0544:                    add_perm(stat.S_IXOTH, 'x')
> 0545:
> 0546:                if include_owners:
> 0547:                    try:
> *** 0548:                        update_hash(" %10s" %
> pwd.getpwuid(s.st_uid).pw_name)
> 0549:                        update_hash(" %10s" %
> grp.getgrgid(s.st_gid).gr_name)
> 0550:                    except KeyError:
> 0551:                        bb.warn("KeyError in %s" % path)
> 0552:                        raise
> Exception: KeyError: 'getpwuid(): uid not found: 1000'
> 
> 

Full log is here ( http://jenkins.dynamicdevices.co.uk:8080/job/meta-mono%20(dunfell,x86-64)/6/console )

Thanks,

Alex

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

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

* Re: [poky] Problem building meta-mono gtk-sharp with dunfell release
  2020-05-19 17:50 Problem building meta-mono gtk-sharp with dunfell release Alex J Lennon
@ 2020-05-19 21:05 ` Richard Purdie
  2020-05-20 12:10   ` Alex J Lennon
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2020-05-19 21:05 UTC (permalink / raw)
  To: Alex J Lennon, poky

On Tue, 2020-05-19 at 10:50 -0700, Alex J Lennon wrote:
> Hi,
> 
> I've run into a problem with my CI building meta-mono gtk-sharp
> recipe with dunfell and I wonder if anybody can advise?
> 
> > File: '/data_drive/git/monotest/poky/meta/lib/oe/sstatesig.py',
> > lineno: 548, function: process
> >      0544:                    add_perm(stat.S_IXOTH, 'x')
> >      0545:
> >      0546:                if include_owners:
> >      0547:                    try:
> >  *** 0548:                        update_hash(" %10s" %
> > pwd.getpwuid(s.st_uid).pw_name)
> >      0549:                        update_hash(" %10s" %
> > grp.getgrgid(s.st_gid).gr_name)
> >      0550:                    except KeyError:
> >      0551:                        bb.warn("KeyError in %s" % path)
> >      0552:                        raise
> > Exception: KeyError: 'getpwuid(): uid not found: 1000'
> >  
>  Full log is here

It means the ownership of files in the output of that recipe is
questionable. Adding some "chown root.root ${D}/XXX" would probably fix
it.

Cheers,

Richard


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

* Re: [poky] Problem building meta-mono gtk-sharp with dunfell release
  2020-05-19 21:05 ` [poky] " Richard Purdie
@ 2020-05-20 12:10   ` Alex J Lennon
  2020-05-20 12:19     ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Alex J Lennon @ 2020-05-20 12:10 UTC (permalink / raw)
  To: Richard Purdie, poky


On 19/05/2020 22:05, Richard Purdie wrote:
> On Tue, 2020-05-19 at 10:50 -0700, Alex J Lennon wrote:
>> Hi,
>>
>> I've run into a problem with my CI building meta-mono gtk-sharp
>> recipe with dunfell and I wonder if anybody can advise?
>>
>>> File: '/data_drive/git/monotest/poky/meta/lib/oe/sstatesig.py',
>>> lineno: 548, function: process
>>>       0544:                    add_perm(stat.S_IXOTH, 'x')
>>>       0545:
>>>       0546:                if include_owners:
>>>       0547:                    try:
>>>   *** 0548:                        update_hash(" %10s" %
>>> pwd.getpwuid(s.st_uid).pw_name)
>>>       0549:                        update_hash(" %10s" %
>>> grp.getgrgid(s.st_gid).gr_name)
>>>       0550:                    except KeyError:
>>>       0551:                        bb.warn("KeyError in %s" % path)
>>>       0552:                        raise
>>> Exception: KeyError: 'getpwuid(): uid not found: 1000'
>>>   
>>   Full log is here
> It means the ownership of files in the output of that recipe is
> questionable. Adding some "chown root.root ${D}/XXX" would probably fix
> it.
>
Thanks Richard! I went down this line:

addtask do_file_ownership after do_install before do_package

do_file_ownership() {
   chown root.root ${D}${libdir}/mono/${PN}-2.0/*.dll
}

I'm getting an error that I can't change ownership

...

| ERROR: Execution of 
'/data_drive/git/monotest/poky/build/tmp/work/core2-32-poky-linux/gtk-sharp/2.12.45-r0/temp/run.do_file_ownership.29234' 
failed with exit code 1:
| chown: changing ownership of 
'/data_drive/git/monotest/poky/build/tmp/work/core2-32-poky-linux/gtk-sharp/2.12.45-r0/image/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll': 
Operation not permitted

...

Cheers,

Alex



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

* Re: [poky] Problem building meta-mono gtk-sharp with dunfell release
  2020-05-20 12:10   ` Alex J Lennon
@ 2020-05-20 12:19     ` Richard Purdie
  2020-05-20 13:10       ` Alex J Lennon
  2020-05-26 21:07       ` Alex J Lennon
  0 siblings, 2 replies; 6+ messages in thread
From: Richard Purdie @ 2020-05-20 12:19 UTC (permalink / raw)
  To: Alex J Lennon, poky

On Wed, 2020-05-20 at 13:10 +0100, Alex J Lennon wrote:
> On 19/05/2020 22:05, Richard Purdie wrote:
> > On Tue, 2020-05-19 at 10:50 -0700, Alex J Lennon wrote:
> > > Hi,
> > > 
> > > I've run into a problem with my CI building meta-mono gtk-sharp
> > > recipe with dunfell and I wonder if anybody can advise?
> > > 
> > > > File: '/data_drive/git/monotest/poky/meta/lib/oe/sstatesig.py',
> > > > lineno: 548, function: process
> > > >       0544:                    add_perm(stat.S_IXOTH, 'x')
> > > >       0545:
> > > >       0546:                if include_owners:
> > > >       0547:                    try:
> > > >   *** 0548:                        update_hash(" %10s" %
> > > > pwd.getpwuid(s.st_uid).pw_name)
> > > >       0549:                        update_hash(" %10s" %
> > > > grp.getgrgid(s.st_gid).gr_name)
> > > >       0550:                    except KeyError:
> > > >       0551:                        bb.warn("KeyError in %s" %
> > > > path)
> > > >       0552:                        raise
> > > > Exception: KeyError: 'getpwuid(): uid not found: 1000'
> > > >   
> > >   Full log is here
> > It means the ownership of files in the output of that recipe is
> > questionable. Adding some "chown root.root ${D}/XXX" would probably
> > fix
> > it.
> > 
> Thanks Richard! I went down this line:
> 
> addtask do_file_ownership after do_install before do_package
> 
> do_file_ownership() {
>    chown root.root ${D}${libdir}/mono/${PN}-2.0/*.dll
> }
> 
> I'm getting an error that I can't change ownership

That is because its not running under pseudo.

do_file_ownership[fakeroot] = "1"

should fix that.

Cheers,

Richard



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

* Re: [poky] Problem building meta-mono gtk-sharp with dunfell release
  2020-05-20 12:19     ` Richard Purdie
@ 2020-05-20 13:10       ` Alex J Lennon
  2020-05-26 21:07       ` Alex J Lennon
  1 sibling, 0 replies; 6+ messages in thread
From: Alex J Lennon @ 2020-05-20 13:10 UTC (permalink / raw)
  To: Richard Purdie, poky


On 20/05/2020 13:19, Richard Purdie wrote:
> On Wed, 2020-05-20 at 13:10 +0100, Alex J Lennon wrote:
>> On 19/05/2020 22:05, Richard Purdie wrote:
>>> On Tue, 2020-05-19 at 10:50 -0700, Alex J Lennon wrote:
>>>> Hi,
>>>>
>>>> I've run into a problem with my CI building meta-mono gtk-sharp
>>>> recipe with dunfell and I wonder if anybody can advise?
>>>>
>>>>> File: '/data_drive/git/monotest/poky/meta/lib/oe/sstatesig.py',
>>>>> lineno: 548, function: process
>>>>>        0544:                    add_perm(stat.S_IXOTH, 'x')
>>>>>        0545:
>>>>>        0546:                if include_owners:
>>>>>        0547:                    try:
>>>>>    *** 0548:                        update_hash(" %10s" %
>>>>> pwd.getpwuid(s.st_uid).pw_name)
>>>>>        0549:                        update_hash(" %10s" %
>>>>> grp.getgrgid(s.st_gid).gr_name)
>>>>>        0550:                    except KeyError:
>>>>>        0551:                        bb.warn("KeyError in %s" %
>>>>> path)
>>>>>        0552:                        raise
>>>>> Exception: KeyError: 'getpwuid(): uid not found: 1000'
>>>>>    
>>>>    Full log is here
>>> It means the ownership of files in the output of that recipe is
>>> questionable. Adding some "chown root.root ${D}/XXX" would probably
>>> fix
>>> it.
>>>
>> Thanks Richard! I went down this line:
>>
>> addtask do_file_ownership after do_install before do_package
>>
>> do_file_ownership() {
>>     chown root.root ${D}${libdir}/mono/${PN}-2.0/*.dll
>> }
>>
>> I'm getting an error that I can't change ownership
> That is because its not running under pseudo.
>
> do_file_ownership[fakeroot] = "1"
>
> should fix that.
>
> Cheers,
>
> Richard
>
>
Thanks again. Still fighting here unfortunately. I tried a couple of 
approaches but get the same error.

I'm not sure what to think. Is it because fakeroot is intercepting and 
the files aren't really changing ownership and then we are checking the 
real ownership ?

(1)

addtask do_file_ownership after do_install before do_package

do_file_ownership[fakeroot] = "1"

do_file_ownership() {
   find ${D} -name *.dll -exec chown root.root {} \;
}

or (2)

do_install_append() {
   find ${D} -name *.dll -exec chown root.root {} \;
}

Still results in some kind of failure on the sstate files

WARNING: gtk-sharp-2.12.45-r0 do_package: KeyError in 
./package/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll

Cheers,

Alex



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

* Re: [poky] Problem building meta-mono gtk-sharp with dunfell release
  2020-05-20 12:19     ` Richard Purdie
  2020-05-20 13:10       ` Alex J Lennon
@ 2020-05-26 21:07       ` Alex J Lennon
  1 sibling, 0 replies; 6+ messages in thread
From: Alex J Lennon @ 2020-05-26 21:07 UTC (permalink / raw)
  To: Richard Purdie, poky


On 20/05/2020 13:19, Richard Purdie wrote:
> On Wed, 2020-05-20 at 13:10 +0100, Alex J Lennon wrote:
>> On 19/05/2020 22:05, Richard Purdie wrote:
>>> On Tue, 2020-05-19 at 10:50 -0700, Alex J Lennon wrote:
>>>> Hi,
>>>>
>>>> I've run into a problem with my CI building meta-mono gtk-sharp
>>>> recipe with dunfell and I wonder if anybody can advise?
>>>>
>>>>> File: '/data_drive/git/monotest/poky/meta/lib/oe/sstatesig.py',
>>>>> lineno: 548, function: process
>>>>>        0544:                    add_perm(stat.S_IXOTH, 'x')
>>>>>        0545:
>>>>>        0546:                if include_owners:
>>>>>        0547:                    try:
>>>>>    *** 0548:                        update_hash(" %10s" %
>>>>> pwd.getpwuid(s.st_uid).pw_name)
>>>>>        0549:                        update_hash(" %10s" %
>>>>> grp.getgrgid(s.st_gid).gr_name)
>>>>>        0550:                    except KeyError:
>>>>>        0551:                        bb.warn("KeyError in %s" %
>>>>> path)
>>>>>        0552:                        raise
>>>>> Exception: KeyError: 'getpwuid(): uid not found: 1000'
>>>>>    
>>>>    Full log is here
>>> It means the ownership of files in the output of that recipe is
>>> questionable. Adding some "chown root.root ${D}/XXX" would probably
>>> fix
>>> it.
>>>
>> Thanks Richard! I went down this line:
>>
>> addtask do_file_ownership after do_install before do_package
>>
>> do_file_ownership() {
>>     chown root.root ${D}${libdir}/mono/${PN}-2.0/*.dll
>> }
>>
>> I'm getting an error that I can't change ownership
> That is because its not running under pseudo.
>
> do_file_ownership[fakeroot] = "1"
>
> should fix that.
>
> Cheers,
>
> Richard
>
>
Hey Richard,

OK I have been having another look and have a solution that builds.

It looks like there was a problem with symlinks as chown seems not to 
modify ownership unless you give it a prod with -h

For others who see this problem try

do_install_append() {
   find ${D} -name *.dll -exec chown -h root:root {} \;
}

Still fairly unclear on why ownership needs to be changed, and why other 
recipes aren't having the problem but Jenkins is happy so I am happy :)

Thanks!

Alex



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

end of thread, other threads:[~2020-05-26 21:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-19 17:50 Problem building meta-mono gtk-sharp with dunfell release Alex J Lennon
2020-05-19 21:05 ` [poky] " Richard Purdie
2020-05-20 12:10   ` Alex J Lennon
2020-05-20 12:19     ` Richard Purdie
2020-05-20 13:10       ` Alex J Lennon
2020-05-26 21:07       ` Alex J Lennon

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