Bug 11385 - poky-container: clarify that meta-data should be checked out using native tools that run the host and not with tools in container
Summary: poky-container: clarify that meta-data should be checked out using native too...
Status: RESOLVED INVALID
Alias: None
Product: CROPS
Classification: Yocto Project Subprojects
Component: crops-default (show other bugs)
Version: 2.1.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 5.1
Assignee: Tim Orling
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks: 11097
  Show dependency tree
 
Reported: 2017-04-19 18:04 UTC by Henry Bruce
Modified: 2024-07-18 14:51 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Bruce 2017-04-19 18:04:29 UTC
Google's repo tool is a popular way of checking out multiple repos at known revisions so is very useful when setting up Yocto layers.

For more about repo, see https://source.android.com/source/downloading#installing-repo

For an example of repo in use, see https://github.com/intel-aero/meta-intel-aero/wiki/Quickstart-Guide#yocto-for-intel-aero.
Comment 1 Henry Bruce 2017-04-19 18:15:08 UTC
As shown by initial comment it is not obvious for developers new to containers that the poky-container should *not* be used to obtain the meta-data, but just to build it.

Docs at https://github.com/crops/poky-container/blob/master/README.md should be update accordingly.
Comment 2 brian avery 2017-07-30 13:31:00 UTC
Moving to M3
Comment 3 brian avery 2017-08-25 22:06:17 UTC
to m4
Comment 4 brian avery 2017-12-08 22:06:57 UTC
Moving to Joshua

seems like this should be the documentation bug for the solution in Bug 11097's comments.
Comment 5 Randy MacLeod 2023-10-30 15:37:30 UTC
Build move to 5.0 -- ../Randy
Comment 6 Javier Carrasco 2024-03-16 12:34:57 UTC
It has been addressed, and a fix has been suggested:

https://github.com/crops/poky-container/pull/104
Comment 7 Randy MacLeod 2024-05-23 15:21:10 UTC
Does not seem to be merged yet.
Comment 8 Javier Carrasco 2024-05-23 15:27:26 UTC
(In reply to Randy MacLeod from comment #7)
> Does not seem to be merged yet.

No, it has not been reviewed yet either. Apparently, the CROPS project has a very limited amount of reviewers. The PR will stay open, though.
Comment 9 Tim Orling 2024-05-24 16:36:42 UTC
This bug is not exactly correct. The problem is if the workspace has not been created before launching the container (and properly passed in as a volume). This is documented in the README and the wiki (for Windows and MacOS).

See example of fully functional cloning of metadata in:
https://github.com/crops/poky-container/pull/104#discussion_r1613742020

While this could perhaps be better clarified in the README, the statement that it MUST be done outside of the container is false. It is only conditionally true when the user did not first create the workspace and pass in the volume, per the instructions.
Comment 10 Tim Orling 2024-05-24 16:38:30 UTC
Perhaps the real issue here is 'repo' tool. The way to fix that is to create a derivative container with 'repo' added to it. This was rejected for the mainstream container because not everyone needs 'repo' tool.
Comment 11 Tim Orling 2024-05-24 16:40:17 UTC
See https://github.com/crops/yocto-dockerfiles/pull/42 for discussion about git-lfs and repo tool and why they are not going to be added to the maintstream poky-container.
Comment 12 Tim Orling 2024-05-24 16:58:30 UTC
Dockerfile.repo:
FROM crops/poky:ubuntu-18.04

USER root

RUN  wget https://storage.googleapis.com/git-repo-downloads/repo -O /usr/local/bin/repo && \
     chmod +x /usr/local/bin/repo

# We always need to return to the usersetup and ENTRYPOINT
USER usersetup
ENV LANG=en_US.UTF-8

ENTRYPOINT ["/usr/bin/distro-entry.sh", "/usr/bin/dumb-init", "--", "/usr/bin/poky-entry.py"]

Build:
docker build -t crops/poky-repo:ubuntu-18.04 -f ./Docker.repo .


Execution:
ttorling@chiron:/srv/build/ttorling$ docker run --rm -it -v /srv/build/ttorling/crops-workspace:/workdir crops/poky-repo:ubuntu-18.04 --workdir=/workdir
pokyuser@aa90fb6f937a:/workdir$ which repo
/usr/local/bin/repo
pokyuser@aa90fb6f937a:/workdir$ repo --help
usage: repo COMMAND [ARGS]

repo is not yet installed.  Use "repo init" to install it here.

The most commonly used repo commands are:

  init      Install repo in the current working directory
  help      Display detailed help on a command

For access to the full online help, install repo ("repo init").

Bug reports: https://issues.gerritcodereview.com/issues/new?component=1370071
Comment 13 Tim Orling 2024-05-24 17:00:02 UTC
Because `repo` will always try to "phone home" and update itself, you will likely need to rebuild this container from time to time to have the latest version and avoid warnings.
Comment 14 Javier Carrasco 2024-07-18 05:41:14 UTC
Should this ticket be closed? Maybe updated to restrict it to a better clarification in the README as stated in comment 9?
Comment 15 Randy MacLeod 2024-07-18 14:24:17 UTC
Javier,

Assigning to Tim and putting in NEEDINFO.
Comment 16 Tim Orling 2024-07-18 14:51:33 UTC
I made significant comments on the pull request and do not believe this is valid.

https://github.com/crops/poky-container/pull/104