All of lore.kernel.org
 help / color / mirror / Atom feed
* migrating simple tarballs over to OE recipes?
@ 2016-11-23 10:42 Robert P. J. Day
  2016-11-23 11:21 ` Burton, Ross
  0 siblings, 1 reply; 7+ messages in thread
From: Robert P. J. Day @ 2016-11-23 10:42 UTC (permalink / raw)
  To: OE Core mailing list


  colleague has a pile of tarballs that were used to customize an x86
centos system, wants to move all that to OE with as little fuss as
possible, i guess the simplest way is to just create recipes that have
the same tarball in the files/ directory, and write a trivial
do_install() task that untars it into the root fs, yes?

  hacky, but it should work. is there a cleaner solution that i'm just
stupidly overlooking?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



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

* Re: migrating simple tarballs over to OE recipes?
  2016-11-23 10:42 migrating simple tarballs over to OE recipes? Robert P. J. Day
@ 2016-11-23 11:21 ` Burton, Ross
  2016-11-23 11:34   ` Robert P. J. Day
  0 siblings, 1 reply; 7+ messages in thread
From: Burton, Ross @ 2016-11-23 11:21 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list

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

On 23 November 2016 at 10:42, Robert P. J. Day <rpjday@crashcourse.ca>
wrote:

>   colleague has a pile of tarballs that were used to customize an x86
> centos system, wants to move all that to OE with as little fuss as
> possible, i guess the simplest way is to just create recipes that have
> the same tarball in the files/ directory, and write a trivial
> do_install() task that untars it into the root fs, yes?
>

Pretty much, yeah.

If you've a large pile and they're all effectively the same then a little
class can automate it even more.

Ross

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

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

* Re: migrating simple tarballs over to OE recipes?
  2016-11-23 11:21 ` Burton, Ross
@ 2016-11-23 11:34   ` Robert P. J. Day
  2016-11-23 12:00     ` Ulf Magnusson
  0 siblings, 1 reply; 7+ messages in thread
From: Robert P. J. Day @ 2016-11-23 11:34 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE Core mailing list

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

On Wed, 23 Nov 2016, Burton, Ross wrote:

>
> On 23 November 2016 at 10:42, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
>         colleague has a pile of tarballs that were used to customize an x86
>       centos system, wants to move all that to OE with as little fuss as
>       possible, i guess the simplest way is to just create recipes that have
>       the same tarball in the files/ directory, and write a trivial
>       do_install() task that untars it into the root fs, yes?
>
>
> Pretty much, yeah.
>
> If you've a large pile and they're all effectively the same then a
> little class can automate it even more.

  already going down that road, just wanted to make sure i hadn't
overlooked something obvious.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

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

* Re: migrating simple tarballs over to OE recipes?
  2016-11-23 11:34   ` Robert P. J. Day
@ 2016-11-23 12:00     ` Ulf Magnusson
  2016-11-23 15:05       ` Martin Jansa
  0 siblings, 1 reply; 7+ messages in thread
From: Ulf Magnusson @ 2016-11-23 12:00 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list

On Wed, Nov 23, 2016 at 12:34 PM, Robert P. J. Day
<rpjday@crashcourse.ca> wrote:
> On Wed, 23 Nov 2016, Burton, Ross wrote:
>
>>
>> On 23 November 2016 at 10:42, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
>>         colleague has a pile of tarballs that were used to customize an x86
>>       centos system, wants to move all that to OE with as little fuss as
>>       possible, i guess the simplest way is to just create recipes that have
>>       the same tarball in the files/ directory, and write a trivial
>>       do_install() task that untars it into the root fs, yes?
>>
>>
>> Pretty much, yeah.
>>
>> If you've a large pile and they're all effectively the same then a
>> little class can automate it even more.
>
>   already going down that road, just wanted to make sure i hadn't
> overlooked something obvious.
>
> rday

bin_package.bbclass might be useful as well, especially if the files
are already arranged like in the rootfs inside the tarballs.

Cheers,
Ulf


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

* Re: migrating simple tarballs over to OE recipes?
  2016-11-23 12:00     ` Ulf Magnusson
@ 2016-11-23 15:05       ` Martin Jansa
  2016-11-23 16:52         ` Robert P. J. Day
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Jansa @ 2016-11-23 15:05 UTC (permalink / raw)
  To: Ulf Magnusson; +Cc: OE Core mailing list

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

On Wed, Nov 23, 2016 at 01:00:12PM +0100, Ulf Magnusson wrote:
> On Wed, Nov 23, 2016 at 12:34 PM, Robert P. J. Day
> <rpjday@crashcourse.ca> wrote:
> > On Wed, 23 Nov 2016, Burton, Ross wrote:
> >
> >>
> >> On 23 November 2016 at 10:42, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> >>         colleague has a pile of tarballs that were used to customize an x86
> >>       centos system, wants to move all that to OE with as little fuss as
> >>       possible, i guess the simplest way is to just create recipes that have
> >>       the same tarball in the files/ directory, and write a trivial
> >>       do_install() task that untars it into the root fs, yes?
> >>
> >>
> >> Pretty much, yeah.
> >>
> >> If you've a large pile and they're all effectively the same then a
> >> little class can automate it even more.
> >
> >   already going down that road, just wanted to make sure i hadn't
> > overlooked something obvious.
> >
> > rday
> 
> bin_package.bbclass might be useful as well, especially if the files
> are already arranged like in the rootfs inside the tarballs.

If these files are overwriting files owned by some other packages, then
you will loose that customization when the package is upgraded by
package manager (unless those files are listed in CONFFILES). You need
to use RREPLACES at least.

> do_install() task that untars it into the root fs, yes?

? do_install installs them to $D not root fs which doesn't even exist yet.

You might also need to skip strip if there are also some binaries which are
already stripped, skip ldflash qa check if they don't have matching hash
type etc

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

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

* Re: migrating simple tarballs over to OE recipes?
  2016-11-23 15:05       ` Martin Jansa
@ 2016-11-23 16:52         ` Robert P. J. Day
  2016-11-24 16:50           ` Burton, Ross
  0 siblings, 1 reply; 7+ messages in thread
From: Robert P. J. Day @ 2016-11-23 16:52 UTC (permalink / raw)
  To: Martin Jansa; +Cc: OE Core mailing list

On Wed, 23 Nov 2016, Martin Jansa wrote:

> On Wed, Nov 23, 2016 at 01:00:12PM +0100, Ulf Magnusson wrote:
> > On Wed, Nov 23, 2016 at 12:34 PM, Robert P. J. Day
> > <rpjday@crashcourse.ca> wrote:
> > > On Wed, 23 Nov 2016, Burton, Ross wrote:
> > >
> > >>
> > >> On 23 November 2016 at 10:42, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> > >>         colleague has a pile of tarballs that were used to
> > >>       customize an x86 centos system, wants to move all that to
> > >>       OE with as little fuss as possible, i guess the simplest
> > >>       way is to just create recipes that have the same tarball
> > >>       in the files/ directory, and write a trivial do_install()
> > >>       task that untars it into the root fs, yes?
> > >>
> > >>
> > >> Pretty much, yeah.
> > >>
> > >> If you've a large pile and they're all effectively the same
> > >> then a little class can automate it even more.
> > >
> > >   already going down that road, just wanted to make sure i
> > > hadn't overlooked something obvious.
> > >
> > > rday
> >
> > bin_package.bbclass might be useful as well, especially if the
> > files are already arranged like in the rootfs inside the tarballs.
>
> If these files are overwriting files owned by some other packages,
> then you will loose that customization when the package is upgraded
> by package manager (unless those files are listed in CONFFILES). You
> need to use RREPLACES at least.
>
> > do_install() task that untars it into the root fs, yes?
>
> ? do_install installs them to $D not root fs which doesn't even exist yet.
>
> You might also need to skip strip if there are also some binaries
> which are already stripped, skip ldflash qa check if they don't have
> matching hash type etc

  ok, let me clarify/simplify a few things to zero in on the optimal
solution.

  first, there are several dozen tarballs, all containing content
relative to the very top of the root directory, and i've been assured
they're proprietary application-specific and hence won't clash with
any "regular" recipes/RPMs. rather than trying to verify that, i'm
just going to accept that. so something along the lines of
bin_package.bbclass would seem to be acceptable.

  (SIDE NOTE: i was asked if recipes could be written so that the
accompanying "files/" directory contained, not a single tarball, but
the actual, *exploded* content in directory structure to be copied
as-is into the target rootfs. i've never seen that, is that ever done?
i'm not sure how i'd even assign to SRC_URI to handle that. so i'll
insist on tarballs.)

  second, given content all in a single tarball, i'm assuming i'd use
simply:

    SRC_URI = "file://rday.tar.gz"

  finally, looking at bin_package.bbclass, i'm puzzled by this:

  do_configure[noexec] = "1"
  do_compile[noexec] = "1"

  # Install the files to ${D}
  bin_package_do_install () {
    # Do it carefully
    [ -d "${S}" ] || exit 1
    cd ${S} || exit 1
    tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \
        | tar --no-same-owner -xpf - -C ${D}
  }

  FILES_${PN} = "/"

  EXPORT_FUNCTIONS do_install

what is the relationship between bin_package_do_install() and the
EXPORTed do_install()? seems like an overriding/inheritance thing,
yes?

  anyway, i think i can see the way to go.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



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

* Re: migrating simple tarballs over to OE recipes?
  2016-11-23 16:52         ` Robert P. J. Day
@ 2016-11-24 16:50           ` Burton, Ross
  0 siblings, 0 replies; 7+ messages in thread
From: Burton, Ross @ 2016-11-24 16:50 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list

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

On 23 November 2016 at 16:52, Robert P. J. Day <rpjday@crashcourse.ca>
wrote:

> what is the relationship between bin_package_do_install() and the
> EXPORTed do_install()? seems like an overriding/inheritance thing,
> yes?
>

Pretty much, that says that bin_package_do_install is this classes
do_install implementation.  This lets you inherit the class and override
do_install(), calling bin_package_do_install as required.  If you don't
provide an alternative implementation of do_install then
bin_package_do_install will be called.

This inheritance isn't used very often as generally it's sufficient to just
do_install_append() or _prepend().

Ross

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

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

end of thread, other threads:[~2016-11-24 16:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-23 10:42 migrating simple tarballs over to OE recipes? Robert P. J. Day
2016-11-23 11:21 ` Burton, Ross
2016-11-23 11:34   ` Robert P. J. Day
2016-11-23 12:00     ` Ulf Magnusson
2016-11-23 15:05       ` Martin Jansa
2016-11-23 16:52         ` Robert P. J. Day
2016-11-24 16:50           ` Burton, Ross

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.