Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pyrex support #77

Open
wants to merge 2 commits into
base: kirkstone
Choose a base branch
from
Open

Add pyrex support #77

wants to merge 2 commits into from

Conversation

kergoth
Copy link
Member

@kergoth kergoth commented Nov 9, 2022

This is intended not for the customer as much as for internal engineers to more easily run their Linux bitbake builds in docker containers. With this:

git clone https://github.com/garmin/pyrex
cd build
. ./setup-environment

Then all your bitbake commands will automatically be run in a docker container, not natively, making it largely transparent, and enabling use of your existing tooling on the host otherwise.

@kergoth kergoth changed the base branch from main to kirkstone November 9, 2022 21:49
@abelal
Copy link
Contributor

abelal commented Nov 10, 2022

@kergoth looks reasonable. How do we specify the container that is to be used for the build?

@kergoth
Copy link
Member Author

kergoth commented Nov 10, 2022

@kergoth looks reasonable. How do we specify the container that is to be used for the build?

Good question! Pyrex has a pyrex.ini file that governs behavior. You can specify one yourself via PYREXCONFFILE, otherwise the setup script will create one in conf/ next to your local.conf. That file has a commented line to control the docker image to be used.

The one downside to this approach is that you must use pyrex's docker images, or modify your own to meet its requirements, as it has supplementary scripts it uses to set everything up. A random docker image isn't going to do the trick.

Of course, using a random docker image would have its own issues due to inconsistency in how you align the host user id and group id with the container's. Some images require they be set at docker image build time, but others do it at first login via another means, either passed environment variables which modify the running user, or via a wrapper script such as how crops does it.

@kergoth kergoth marked this pull request as ready for review January 9, 2023 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants