iot-lab/iot-lab-yocto

gateway-code_git.bb Failure expanding SRCPV

Closed this issue · 7 comments

I'm trying to build an image with the project but when I try to run make build-all I get the following error:

ERROR: ExpansionError during parsing /home/alonso/Desktop/iot-lab-yocto/build/../meta-iotlab/recipes-support/gateway-code/gateway-code_git.bb: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: Fetch command failed with exit code 128, output:
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I cloned the repository after installing the required packages and then run the instruction to check if it worked but couldn't get passed it and I'm guessing it's not a bug but a configuration issue and I don't know how to fix it.

Hi @AlonsoReyes

When you launch $make build-all command you build all IoT-LAB images: open A8 image (for IoT-LAB A8 nodes) and gateway image. The gateway image is a private image (eg. used for IoT-LAB nodes management) and depends of private Github repository.

So I advice you to build only open A8 image. For this purpose just try $make iotlab-image-open-a8
The gateway-code_git.bb recipe is not included in this build image configuration.

Should you also try a git clone (with ssh) of iot-lab-gateway project on your computer:
$ git clone git@github.com:iot-lab/iot-lab-gateway.git
and say me if it's ok or not for you ? In the bitbake recipe gateway-code we use a SRC_URI with git and ssh.

Hi @fsaintma

After adding my SSH Key to github which I noticed I hadn't done I was able to clone the gateway repository running git clone git@github.com:iot-lab/iot-lab-gateway.git (my bad here, sorry). With this done I tried running make iotlab-image-open-a8 and got past the previous error, but now I got the following one:

ERROR: ExpansionError during parsing /home/alonso/Desktop/iot-lab-yocto/build/../meta-iotlab/recipes-core/ssh-keys/root-sshd-ssh-keys-gw_git.bb: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: Fetch command failed with exit code 128, output:
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

The git repository that is used in root-sshd-ssh-keys-gw_git.bb in the variable SRC_URI is defined SRC_URI = "git://github.com/iot-lab/iot-lab-dev.git;user=git;protocol=ssh;branch=master".

Hi @AlonsoReyes

It's really strange that you obtain this error with root-sshd-ssh-keys-gw. Indeed this recipe is only include in gateway image package group (eg. recipes-core/packagegroups/gateway-packagegroup.bb: root-sshd-ssh-keys-gw). So when you launch make iotlab-image-open-a8 you should not parse this recipe.

After I have just seen all recipes with private access and I saw that iotlab-image-open-a8 include base-packagegroup which include a recipe with private access: admin-servers-ssh-keys_git.bb. So actually without private IoT-LAB github repository access you cannot build a fully image and you are right

So I will try to find a workaround and keep up you when it will be ready.

Sorry for the inconvenience

Hi @AlonsoReyes
I have just pushed a new branch "remove_git_private_depedencies" which remove all depedencies for IoT-LAB Github private repositories.
You should try it and if it's OK I will publish a pull request and integrate these modifications.
Best regards

Hi @fsaintma
I'll try this out. I'll build an image with make iotlab-image-open-a8 and then I'll post here how it went and if there were any errors.
I've got a question if you don't mind. Is the version that is actually running on the A8 nodes available in the testbed the one that will be generated by that make instruction? If I upload the image generated it should be exactly the same as it is now, right?

Thank you for helping me and I'll post how the build went when it's done!
Best regards

Yes, we use this repository to build all IoT-LAB Linux images installed on the testbed. So the target iotlab-image-open-a8 will build the open A8 image booted by A8 nodes.

Just for your information we don't offer yet the feature to upload a new image (build by you) and boot your A8 experiment nodes on it. It's on our roadmap but not available.

Actually you should only build packages (make build-pkg-xxx) and install them manually after the experiment is started and A8 nodes are booted. You should also do a Pull Request for new fetaures (ex: add new packages) and we will review it and push this new A8 Linux image version on IoT-LAB servers.

You can find some informations about customize A8 images here: https://github.com/iot-lab/iot-lab/wiki/Yocto-Build-System

Best regards

Hi @fsaintma

Sorry for the delay, I wasn't running the build on a fast computer so it took a long while. The build ended and didn't raise any other exceptions. It threw a bunch of warnings, mostly about checking for other mirrors in do_fetch and in do_package_qa about possible host contamination.

I was wondering if what I wanted to do was possible, I want to add packages to the build because I want to try an implementation of http2 on the A8 node and the library, called nghttp2, needs some dependencies that aren't in the provided layers. So to do this I would need to create my own recipes, build the packages and then install them manually by uploading all the .ipk files created to the A8 directory as it is shown in the wiki? This is possible, right?

Is there any other place or way that I can ask questions about how to use the project and what is and isn't possible so I don't end up asking things unrelated to the issue? Thank you for taking the time to answer.

Best regards