All of lore.kernel.org
 help / color / mirror / Atom feed
* how many ways can a recipe place content in its own ${STAGING_BINDIR_CROSS}?
@ 2017-02-07 12:21 Robert P. J. Day
  2017-02-07 12:46 ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Robert P. J. Day @ 2017-02-07 12:21 UTC (permalink / raw)
  To: OE Core mailing list

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


  looking at how a recipe builds its own recipe-sysroot and
recipe-sysroot-native based on build dependencies, so i need to back
up and look at how a recipe installs content under its own sysroot, so
i'll use apache2 as an example.

  if i look at what is installed under
sysroots-components/ppc7400/apache2, i can see that this is the entire
contents further under usr/bin:

$ tree usr/bin
usr/bin
└── crossscripts
    └── apxs

  fair enough, so how did that "apxs" script come to be there? ah, in
the apache2_2.4.25.bb recipe file, it's simply done manually:

  SYSROOT_PREPROCESS_FUNCS += "apache_sysroot_preprocess"

  apache_sysroot_preprocess () {
      install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
      install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts}/
      ... snip ...

ok, that's easy enough, but let's look at "apr" now. if i look at what
apr installs under its sysroot and specifically under the same usr/bin
directory, i see:

$ tree usr/bin
usr/bin
└── crossscripts
    └── apr-1-config

  so how did *that* script come to be under there? if i look at the
apr_1.5.2.bb recipe, there's no manual installation of that script as
there was with apache2. rather, there's all this:

do_install_append_class-target() {
        sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${datadir}/build-1/apr_rules.mk
        sed -i -e 's,${STAGING_DIR_HOST},,g' \
               -e 's,APR_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
               -e 's,APR_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apr-1-config
}

SSTATE_SCAN_FILES += "apr_rules.mk libtool"

SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess"

apr_sysroot_preprocess () {
        d=${SYSROOT_DESTDIR}${datadir}/apr
        install -d $d/
        cp ${S}/build/apr_rules.mk $d/
        sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
        sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk
        sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk
        sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk
        cp ${S}/build/mkdir.sh $d/
        cp ${S}/build/make_exports.awk $d/
        cp ${S}/build/make_var_export.awk $d/
        cp ${S}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool

  so i can only assume that, somewhere in the middle of all that,
there is an implied installation of the "apr-1-config" script in the
crossscripts directory.  is that what's happening?

  i can see a number of recipes that install content under their
sysroot/usr/bin/crossscripts, i'm just trying to clarify the different
ways that that happens.

  one more crossscripts question coming shortly.

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] 3+ messages in thread

* Re: how many ways can a recipe place content in its own ${STAGING_BINDIR_CROSS}?
  2017-02-07 12:21 how many ways can a recipe place content in its own ${STAGING_BINDIR_CROSS}? Robert P. J. Day
@ 2017-02-07 12:46 ` Richard Purdie
  2017-02-07 12:47   ` Robert P. J. Day
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2017-02-07 12:46 UTC (permalink / raw)
  To: Robert P. J. Day, OE Core mailing list

On Tue, 2017-02-07 at 07:21 -0500, Robert P. J. Day wrote:
> ok, that's easy enough, but let's look at "apr" now. if i look at
> what
> apr installs under its sysroot and specifically under the same
> usr/bin
> directory, i see:
> 
> $ tree usr/bin
> usr/bin
> └── crossscripts
>     └── apr-1-config
> 
>   so how did *that* script come to be under there? if i look at the
> apr_1.5.2.bb recipe, there's no manual installation of that script as
> there was with apache2. rather, there's all this:

Look at binconfig.bbclass which I'd bet apr inherits (although I didn't
actually look).

Cheers,

Richard


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

* Re: how many ways can a recipe place content in its own ${STAGING_BINDIR_CROSS}?
  2017-02-07 12:46 ` Richard Purdie
@ 2017-02-07 12:47   ` Robert P. J. Day
  0 siblings, 0 replies; 3+ messages in thread
From: Robert P. J. Day @ 2017-02-07 12:47 UTC (permalink / raw)
  To: Richard Purdie; +Cc: OE Core mailing list

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

On Tue, 7 Feb 2017, Richard Purdie wrote:

> On Tue, 2017-02-07 at 07:21 -0500, Robert P. J. Day wrote:
> > ok, that's easy enough, but let's look at "apr" now. if i look at
> > what
> > apr installs under its sysroot and specifically under the same
> > usr/bin
> > directory, i see:
> >
> > $ tree usr/bin
> > usr/bin
> > └── crossscripts
> >     └── apr-1-config
> >
> >   so how did *that* script come to be under there? if i look at the
> > apr_1.5.2.bb recipe, there's no manual installation of that script as
> > there was with apache2. rather, there's all this:
>
> Look at binconfig.bbclass which I'd bet apr inherits (although I didn't
> actually look).

  that is exactly what it inherits, thanks, that clears it up.

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] 3+ messages in thread

end of thread, other threads:[~2017-02-07 12:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-07 12:21 how many ways can a recipe place content in its own ${STAGING_BINDIR_CROSS}? Robert P. J. Day
2017-02-07 12:46 ` Richard Purdie
2017-02-07 12:47   ` Robert P. J. Day

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.