Skip to contentSkip to conversation

How to prevent fetching?

DISCUSSION Dave Beal 4 participants 7 messages Aug 31, 2011

lore
Share & tools
lore

Dave Beal

author
#0 lore raw

My company is using OE to develop the embedded Linux infrastructure of a medical device. The US government agency that approves such devices (FDA) requires that its source code be strictly controlled. We would like to configure our OE installation to prevent the fetching of new source code except when we explicitly allow it.

Is there a way to accomplish this that doesn't require modifying all the individual .bb files? Is there a global configuration option that would prevent fetching? I've looked through the OE and Bitbake User Manuals, but haven't found an answer.

Thank you!

Dave Beal
Cardinal Peak, LLC
Lafayette, Colorado, USA

Dave Beal
Cardinal Peak
(303) 665-3962 x124 | Email | vCard
| Web | Company Blog | LinkedIn

#1 lore raw

2011/8/31 Dave Beal <[email protected]>

Quoted 6 lines

My company is using OE to develop the embedded Linux infrastructure of a medical device. The US government agency that approves such devices (FDA) requires that its source code be strictly controlled. We would like to configure our OE installation to prevent the fetching of new source code except when we explicitly allow it.

Quoted 8 lines

Is there a way to accomplish this that doesn't require modifying all the individual .bb files? Is there a global configuration option that would prevent fetching? I've looked through the OE and Bitbake User Manuals, but haven't found an answer.

Thank you!

Simplest way is to set up a premirror with all source packages you need;

then change the routing table of your build system allowing only routing to your premirror (and maybe some other hosts you want to access during development).
Personally I do this with a VM.
At a certain point you probably also want to pin your OE tree on a certain git hash to avoid that suddenly you drag in new code (and new problems) late in your development cycle.
When you have pinned a version you could still backport fixes and put them in a local overlay.

Good luck!

Frans

#2 lore raw
In reply to Dave Beal
Quoted 10 lines · Dave Beal

My company is using OE to develop the embedded Linux infrastructure of a medical device. The US government agency that approves such devices (FDA) requires that its source code be strictly controlled. We would like to configure our OE installation to prevent the fetching of new source code except when we explicitly allow it.

Is there a way to accomplish this that doesn't require modifying all the individual .bb files? Is there a global configuration option that would prevent fetching? I've looked through the OE and Bitbake User Manuals, but haven't found an answer.

If you're using relatively recent BitBake and your metadata uses fetch2 (I don't know if oe.dev does, but oe-core is using fetch2) you can set BB_NO_NETWORK="1" in a conf file somewhere.

Regards,
Joshua

Signature · 3 lines
Joshua Lock
        Yocto Project "Johannes factotum"
        Intel Open Source Technology Centre
author
#3 lore raw

Thank you, Joshua. I don't know what you mean by "if your metadata uses fetch2". Is fetch2 some python function? How would I know if I'm using it?

- Dave

-----Original Message-----
From: Joshua Lock <[email protected]>
Reply-to: [email protected]
To: [email protected]
Subject: Re: [oe] How to prevent fetching?
Date: Wed, 31 Aug 2011 12:35:00 -0700

Quoted 10 lines · Dave Beal

My company is using OE to develop the embedded Linux infrastructure of a medical device. The US government agency that approves such devices (FDA) requires that its source code be strictly controlled. We would like to configure our OE installation to prevent the fetching of new source code except when we explicitly allow it.

Is there a way to accomplish this that doesn't require modifying all the individual .bb files? Is there a global configuration option that would prevent fetching? I've looked through the OE and Bitbake User Manuals, but haven't found an answer.

If you're using relatively recent BitBake and your metadata uses fetch2 (I don't know if oe.dev does, but oe-core is using fetch2) you can set BB_NO_NETWORK="1" in a conf file somewhere.

Regards,
Joshua

Dave Beal
Cardinal Peak
(303) 665-3962 x124 | Email | vCard
| Web | Company Blog | LinkedIn

#4 lore raw
Quoted 3 lines · Dave Beal

Thank you, Joshua. I don't know what you mean by "if your metadata uses fetch2". Is fetch2 some python function? How would I know if I'm using it?

Fetch2 is a Python module that's part of BitBake. It's used from the base_do_fetch() method of base.bbclass.

You can see that OE.dev isn't using fetch2[1] but OE-Core is[2].

Joshua

1.
http://git.openembedded.org/cgit.cgi/openembedded/tree/classes/base.bbclass#n99
2.
http://git.openembedded.org/cgit.cgi/openembedded-core/tree/meta/classes/base.bbclass#n80

Signature · 3 lines
Joshua Lock
        Yocto Project "Johannes factotum"
        Intel Open Source Technology Centre
author
#5 lore raw

Thanks again, Joshua. I found my base.bbclass (in sources/openembedded/classes), and sadly, my base_do_fetch() uses bb.fetch, not bb.fetch2.

- Dave

-----Original Message-----
From: Joshua Lock <[email protected]>
Reply-to: [email protected]
To: [email protected]
Subject: Re: [oe] How to prevent fetching?
Date: Wed, 31 Aug 2011 15:30:24 -0700

Quoted 3 lines · Dave Beal

Thank you, Joshua. I don't know what you mean by "if your metadata uses fetch2". Is fetch2 some python function? How would I know if I'm using it?

Fetch2 is a Python module that's part of BitBake. It's used from the base_do_fetch() method of base.bbclass.

You can see that OE.dev isn't using fetch2[1] but OE-Core is[2].

Joshua

1.
http://git.openembedded.org/cgit.cgi/openembedded/tree/classes/base.bbclass#n99
2.
http://git.openembedded.org/cgit.cgi/openembedded-core/tree/meta/classes/base.bbclass#n80

Dave Beal
Cardinal Peak
(303) 665-3962 x124 | Email | vCard
| Web | Company Blog | LinkedIn

#6 lore raw
Quoted 3 lines · Dave Beal

Thanks again, Joshua. I found my base.bbclass (in sources/openembedded/classes), and sadly, my base_do_fetch() uses bb.fetch, not bb.fetch2.

Depending on your system requirements, you may be able to transition to oe-core or yocto, both of which support fetch2.

Quoted 40 lines

-----Original Message-----
From: Joshua Lock<[email protected]>
Reply-to: [email protected]
To: [email protected]
Subject: Re: [oe] How to prevent fetching?
Date: Wed, 31 Aug 2011 15:30:24 -0700

Quoted 3 lines · Dave Beal

Thank you, Joshua. I don't know what you mean by "if your metadata uses fetch2". Is fetch2 some python function? How would I know if I'm using it?

Fetch2 is a Python module that's part of BitBake. It's used from the base_do_fetch() method of base.bbclass.

You can see that OE.dev isn't using fetch2[1] but OE-Core is[2].

Joshua

1.
http://git.openembedded.org/cgit.cgi/openembedded/tree/classes/base.bbclass#n99
2.
http://git.openembedded.org/cgit.cgi/openembedded-core/tree/meta/classes/base.bbclass#n80

Dave Beal
Cardinal Peak
(303) 665-3962 x124 | Email | vCard
| Web | Company Blog | LinkedIn

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------