All of lore.kernel.org
 help / color / mirror / Atom feed
* How and where does yocto find lighttpd-module-fastcgi?
@ 2018-03-08 21:52 Wayne Witzke
  2018-03-08 23:13 ` Andre McCurdy
  0 siblings, 1 reply; 5+ messages in thread
From: Wayne Witzke @ 2018-03-08 21:52 UTC (permalink / raw)
  To: yocto

Hello everyone,

I'm very new to Yocto, and I'm currently building an embedded system 
with a web interface. As I worked through the process of creating a 
Yocto configuration and layer to configure the specific build I needed 
(based on core-image-minimal), I discovered that I could add packages to 
my image by adding it to the configuration file via 
CORE_EXTRA_IMAGES_INSTALL. In this way, I was able to add lighttpd, php, 
php-cgi, and lighttpd-module-fastcgi to my build. It worked great!

However, now I am attempting to determine if mod_openssl is installed on 
my server, and using "CORE_EXTRA_IMAGES_INSTALL += 
'lighttpd-module-openssl'" to simply add it does NOT magically work like 
it did with lighttpd-module-fastcgi. My original guess was that adding 
"CORE_EXTRA_IMAGES_INSTALL += 'lighttpd-module-fastcgi'" caused a 
configuration option to be matched in the lighttpd.bb file so that the 
appropriate build option was used when building lighttpd. However, 
fastcgi doesn't actually show up in that file at all, and openssl does, 
so that clearly isn't the option . . . furthermore, mod_fastcgi doesn't 
appear in *any* of the layers I'm using to build, except in the 
lighttpd.conf portion of the recipe-extended/lighttpd directory structure.

So, my question is, how does bitbake know what to do when I add 
lighttpd-module-fastcgi, and where in the world does it find the source 
for mod_fastcgi?

Thank you in advance for your help :)

Wayne


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

* Re: How and where does yocto find lighttpd-module-fastcgi?
  2018-03-08 21:52 How and where does yocto find lighttpd-module-fastcgi? Wayne Witzke
@ 2018-03-08 23:13 ` Andre McCurdy
  2018-03-09 14:18   ` Wayne Witzke
  0 siblings, 1 reply; 5+ messages in thread
From: Andre McCurdy @ 2018-03-08 23:13 UTC (permalink / raw)
  To: Wayne Witzke; +Cc: Yocto discussion list

On Thu, Mar 8, 2018 at 1:52 PM, Wayne Witzke <wwitzke@asgrp.com> wrote:
>
> However, now I am attempting to determine if mod_openssl is installed on my
> server, and using "CORE_EXTRA_IMAGES_INSTALL += 'lighttpd-module-openssl'"
> to simply add it does NOT magically work like it did with
> lighttpd-module-fastcgi. My original guess was that adding
> "CORE_EXTRA_IMAGES_INSTALL += 'lighttpd-module-fastcgi'" caused a
> configuration option to be matched in the lighttpd.bb file so that the
> appropriate build option was used when building lighttpd.

No, that's not how it works. A very key point to understand with OE is
that options associated with one recipe can never affect the build of
another recipe (in this case, the image recipe can't affect the build
of the lighttpd recipe).

If adding lighttpd-module-fastcgi to your image worked, it's because
the lighttpd recipe was already creating that package.

> However, fastcgi
> doesn't actually show up in that file at all, and openssl does, so that
> clearly isn't the option . . . furthermore, mod_fastcgi doesn't appear in
> *any* of the layers I'm using to build, except in the lighttpd.conf portion
> of the recipe-extended/lighttpd directory structure.

If lighttpd doesn't have a configure option to control building of the
fastcgi module, then there won't be a PACKAGECONFIG option for it in
the recipe - it will just always be built.

(Even if lighttpd does have a configure option for the fastcgi module,
there's no guarantee that the recipe will allow it to be controlled -
it's common for PACKAGECONFIG options in recipes to only reflect the
configure options which people care about the most).

> So, my question is, how does bitbake know what to do when I add
> lighttpd-module-fastcgi,

The build for lighttpd isn't affected by whether or not you add
lighttpd-module-fastcgi to your image.

ie running "bitbake lighttpd", should always result in a package for
lighttpd-module-fastcgi being placed in tmp/deploy/ipk/i586/ (or
whatever your packaging format / architecture combination is). It
doesn't matter what image you may choose to build later, or what
packages you choose to include in it.

> and where in the world does it find the source for
> mod_fastcgi?

The source which gets compiled into lighttpd-module-fastcgi must be
coming from lighttpd.

> Thank you in advance for your help :)
>
> Wayne
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


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

* Re: How and where does yocto find lighttpd-module-fastcgi?
  2018-03-08 23:13 ` Andre McCurdy
@ 2018-03-09 14:18   ` Wayne Witzke
  2018-03-09 22:35     ` Andre McCurdy
  0 siblings, 1 reply; 5+ messages in thread
From: Wayne Witzke @ 2018-03-09 14:18 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Yocto discussion list

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

Thank you for the reply!

When I wasn't adding lighttpd-module-fastcgi, it definitely was not 
including it in the build. I have the lighttpd.conf file set up use 
mod_fastcgi, and without lighttpd-module-fastcgi in my local.conf file, 
lighttpd would fail to start on the embedded build, complaining that it 
could not find the fastcgi module. In fact, the same thing happens with 
php-cgi. I can't find anyplace in any of the layers that I'm using that 
actually references php-cgi as a package or option, but unless I add it 
to local.conf using EXTRA_CORE_IMAGES_INSTALL, it doesn't get included 
in the build.

I would have assumed exactly what you are saying, if I hadn't seen 
lighttpd fail to start before adding lighttpd-module-fastcgi, and then, 
with no other changes, start correctly (finding the module) after adding 
lighttpd-module-fastcgi.

Wayne


On 03/08/2018 06:13 PM, Andre McCurdy wrote:
> On Thu, Mar 8, 2018 at 1:52 PM, Wayne Witzke <wwitzke@asgrp.com> wrote:
>> However, now I am attempting to determine if mod_openssl is installed on my
>> server, and using "CORE_EXTRA_IMAGES_INSTALL += 'lighttpd-module-openssl'"
>> to simply add it does NOT magically work like it did with
>> lighttpd-module-fastcgi. My original guess was that adding
>> "CORE_EXTRA_IMAGES_INSTALL += 'lighttpd-module-fastcgi'" caused a
>> configuration option to be matched in the lighttpd.bb file so that the
>> appropriate build option was used when building lighttpd.
> No, that's not how it works. A very key point to understand with OE is
> that options associated with one recipe can never affect the build of
> another recipe (in this case, the image recipe can't affect the build
> of the lighttpd recipe).
>
> If adding lighttpd-module-fastcgi to your image worked, it's because
> the lighttpd recipe was already creating that package.
>
>> However, fastcgi
>> doesn't actually show up in that file at all, and openssl does, so that
>> clearly isn't the option . . . furthermore, mod_fastcgi doesn't appear in
>> *any* of the layers I'm using to build, except in the lighttpd.conf portion
>> of the recipe-extended/lighttpd directory structure.
> If lighttpd doesn't have a configure option to control building of the
> fastcgi module, then there won't be a PACKAGECONFIG option for it in
> the recipe - it will just always be built.
>
> (Even if lighttpd does have a configure option for the fastcgi module,
> there's no guarantee that the recipe will allow it to be controlled -
> it's common for PACKAGECONFIG options in recipes to only reflect the
> configure options which people care about the most).
>
>> So, my question is, how does bitbake know what to do when I add
>> lighttpd-module-fastcgi,
> The build for lighttpd isn't affected by whether or not you add
> lighttpd-module-fastcgi to your image.
>
> ie running "bitbake lighttpd", should always result in a package for
> lighttpd-module-fastcgi being placed in tmp/deploy/ipk/i586/ (or
> whatever your packaging format / architecture combination is). It
> doesn't matter what image you may choose to build later, or what
> packages you choose to include in it.
>
>> and where in the world does it find the source for
>> mod_fastcgi?
> The source which gets compiled into lighttpd-module-fastcgi must be
> coming from lighttpd.
>
>> Thank you in advance for your help :)
>>
>> Wayne
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto

-- 
ASG Logo

Wayne Witzke
Staff Engineer
Applied Sciences Group, Inc.
4455 Genesee St., Suite 103
Buffalo, NY 14225
716-626-5100 x306
www.asgrp.com

*Connect with ASG*
LinkedIn 
<https://www.linkedin.com/company/99150?trk=tyah&trkInfo=clickedVertical%3Acompany%2Cidx%3A1-1-1%2CtarId%3A1427119746545%2Ctas%3Aapplied+sciences+group> 
| Twitter <https://twitter.com/AppliedSciGrp> | Facebook 
<https://www.facebook.com/applied.sciences.group> | Google+ 
<https://plus.google.com/u/0/b/112847765558045826229/+AppliedSciencesGroupIncBuffalo/posts> 
| YouTube <https://www.youtube.com/user/asgrp4455>

Our Mission: To Integrate Software Solutions With the People Who Use Them.

[-- Attachment #2.1: Type: text/html, Size: 6105 bytes --]

[-- Attachment #2.2: ASG-icon-no-shadow.png --]
[-- Type: image/png, Size: 4816 bytes --]

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

* Re: How and where does yocto find lighttpd-module-fastcgi?
  2018-03-09 14:18   ` Wayne Witzke
@ 2018-03-09 22:35     ` Andre McCurdy
  2018-03-11  1:52       ` Wayne Witzke
  0 siblings, 1 reply; 5+ messages in thread
From: Andre McCurdy @ 2018-03-09 22:35 UTC (permalink / raw)
  To: Wayne Witzke; +Cc: Yocto discussion list

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

On Fri, Mar 9, 2018 at 6:18 AM, Wayne Witzke <wwitzke@asgrp.com> wrote:

> Thank you for the reply!
>
> When I wasn't adding lighttpd-module-fastcgi, it definitely was not
> including it in the build.
>

The lighttpd-module-fastcgi package is created (unconditionally) when the
lighttpd recipe is built (you can verify by checking the installable
packages under tmp/deploy/ after building lighttpd).

However, since nothing in the default images has a runtime dependency on
lighttpd-module-fastcgi, that package will only be included in the rootfs
if you manually add it (e.g. by adding to CORE_IMAGE_EXTRA_INSTALL, as you
have done).

ie you need to make the distinction between "is this package being built"
and "is this package being included in the rootfs when the image is built".

I have the lighttpd.conf file set up use mod_fastcgi, and without
> lighttpd-module-fastcgi in my local.conf file, lighttpd would fail to start
> on the embedded build, complaining that it could not find the fastcgi
> module. In fact, the same thing happens with php-cgi. I can't find anyplace
> in any of the layers that I'm using that actually references php-cgi as a
> package or option, but unless I add it to local.conf using
> EXTRA_CORE_IMAGES_INSTALL, it doesn't get included in the build.
>

It's a similar story with the php-cgi package. It's created
(unconditionally) when the php recipe is built, but will not be installed
in the rootfs unless you add it to your image.

The reason you don't find a direct reference to the string "php-cgi"
anywhere is because the php recipe defines it's list of packages in terms
of the "${PN}" variable. So the php recipe contains references to
"${PN}-cgi" but rather than "php-cgi".

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

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

* Re: How and where does yocto find lighttpd-module-fastcgi?
  2018-03-09 22:35     ` Andre McCurdy
@ 2018-03-11  1:52       ` Wayne Witzke
  0 siblings, 0 replies; 5+ messages in thread
From: Wayne Witzke @ 2018-03-11  1:52 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Yocto discussion list

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

That makes perfect sense. Thank you very much for your help!

Wayne


On 03/09/2018 05:35 PM, Andre McCurdy wrote:
> On Fri, Mar 9, 2018 at 6:18 AM, Wayne Witzke <wwitzke@asgrp.com 
> <mailto:wwitzke@asgrp.com>> wrote:
>
>     Thank you for the reply!
>
>     When I wasn't adding lighttpd-module-fastcgi, it definitely was
>     not including it in the build.
>
>
> The lighttpd-module-fastcgi package is created (unconditionally) when 
> the lighttpd recipe is built (you can verify by checking the 
> installable packages under tmp/deploy/ after building lighttpd).
>
> However, since nothing in the default images has a runtime dependency 
> on lighttpd-module-fastcgi, that package will only be included in the 
> rootfs if you manually add it (e.g. by adding to 
> CORE_IMAGE_EXTRA_INSTALL, as you have done).
>
> ie you need to make the distinction between "is this package being 
> built" and "is this package being included in the rootfs when the 
> image is built".
>
>     I have the lighttpd.conf file set up use mod_fastcgi, and without
>     lighttpd-module-fastcgi in my local.conf file, lighttpd would fail
>     to start on the embedded build, complaining that it could not find
>     the fastcgi module. In fact, the same thing happens with php-cgi.
>     I can't find anyplace in any of the layers that I'm using that
>     actually references php-cgi as a package or option, but unless I
>     add it to local.conf using EXTRA_CORE_IMAGES_INSTALL, it doesn't
>     get included in the build.
>
>
> It's a similar story with the php-cgi package. It's created 
> (unconditionally) when the php recipe is built, but will not be 
> installed in the rootfs unless you add it to your image.
>
> The reason you don't find a direct reference to the string "php-cgi" 
> anywhere is because the php recipe defines it's list of packages in 
> terms of the "${PN}" variable. So the php recipe contains references 
> to "${PN}-cgi" but rather than "php-cgi".
>
>

-- 
ASG Logo

Wayne Witzke
Staff Engineer
Applied Sciences Group, Inc.
4455 Genesee St., Suite 103
Buffalo, NY 14225
716-626-5100 x306
www.asgrp.com

*Connect with ASG*
LinkedIn 
<https://www.linkedin.com/company/99150?trk=tyah&trkInfo=clickedVertical%3Acompany%2Cidx%3A1-1-1%2CtarId%3A1427119746545%2Ctas%3Aapplied+sciences+group> 
| Twitter <https://twitter.com/AppliedSciGrp> | Facebook 
<https://www.facebook.com/applied.sciences.group> | Google+ 
<https://plus.google.com/u/0/b/112847765558045826229/+AppliedSciencesGroupIncBuffalo/posts> 
| YouTube <https://www.youtube.com/user/asgrp4455>

Our Mission: To Integrate Software Solutions With the People Who Use Them.

[-- Attachment #2.1: Type: text/html, Size: 5364 bytes --]

[-- Attachment #2.2: ASG-icon-no-shadow.png --]
[-- Type: image/png, Size: 4816 bytes --]

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

end of thread, other threads:[~2018-03-11  1:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-08 21:52 How and where does yocto find lighttpd-module-fastcgi? Wayne Witzke
2018-03-08 23:13 ` Andre McCurdy
2018-03-09 14:18   ` Wayne Witzke
2018-03-09 22:35     ` Andre McCurdy
2018-03-11  1:52       ` Wayne Witzke

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.