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

Malformed Git SSH URL from Cargo.toml appears in SRC_URI #41

Open
IsaacJT opened this issue Nov 3, 2021 · 2 comments
Open

Malformed Git SSH URL from Cargo.toml appears in SRC_URI #41

IsaacJT opened this issue Nov 3, 2021 · 2 comments
Labels

Comments

@IsaacJT
Copy link

IsaacJT commented Nov 3, 2021

When running cargo-bitbake bitbake in a package containing a Git SSH dependency, the URL is then mangled and copied into SRC_URI. This is an unnecessary step as the Git dependency does not need to be in the SRC_URI (the package builds fine without it) and the URL string is malformed.

For example, the following dependency in Cargo.toml:

[dependencies]
testlib = { git = "ssh://git@192.168.0.1:10022/test/testlib.git" }

Is converted to the following in SRC_URI:

git://ssh///git@192.168.0.1/10022/test/testlib.git;protocol=ssh;nobranch=1;name=testlib;destsuffix=testlib 
@codyps
Copy link
Member

codyps commented Nov 3, 2021

Hey @IsaacJT, thanks for reporting this. cargo-bitbake definitely should make sure it's generating reasonable SRC_URI contents.

While crates in general will build correctly even if we miss some dep in SRC_URI, generally in open-embedded it's not considered great form to have packages that depend on network access at build time to build their content. As a result, we'd really want to generate the right SRC_URI including the correct git path here. You should be able to test builds without networking by setting the BB_NO_NETWORK=1 bitbake variable.

@codyps codyps added the bug label Nov 3, 2021
@koenhausmans
Copy link

Having the same problem here, reason for it to fail is because the SSH_STYLE_REMOTE regex is incorrectly matching on the example URL provided above. Potential solution is for checking whether the repository URL does not start with ssh://.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants