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 python dependencies for SUIT #73

Merged
merged 1 commit into from
Aug 9, 2019

Conversation

kaspar030
Copy link
Contributor

This PR adds needed dependencies for SUIT (RIOT-OS/RIOT#11818)

To test, make sure docker is correctly installed.

Then:

  • check out this PR
  • build the container (eg. docker build -t riotdocker_dev .)
  • check out #11818
  • from the checkout root, run riot (suit-pr)]$ docker run -ti --rm -v $(pwd):/data/riotbuild -u $(id -u) riotdocker_dev /bin/bash
  • in the container, cd examples/suit_update; make suit/publish

It should succeed.
Otherwise this shouldn't affect anything, as this is only an addition of python packages.

@kaspar030
Copy link
Contributor Author

Otherwise this shouldn't affect anything, as this is only an addition of python packages.

Basic functioning of the container is checked by Travis.

Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed the testing procedure and got this error:

creating /data/riotbuild/examples/suit_update/bin/samr21-xpro/suit_update-slot0.1562671759.riot.bin...
creating /data/riotbuild/examples/suit_update/bin/samr21-xpro/suit_update-slot1.1562671759.riot.bin...
/data/riotbuild/dist/tools/suit_v4/gen_manifest.py \
  --template /data/riotbuild/dist/tools/suit_v4/test-2img.json \
  --urlroot coap://localhost/fw/samr21-xpro \
  --seqnr 1562671759 \
  --uuid-vendor "riot-os.org" \
  --uuid-class samr21-xpro \
  --offsets 0x1000,133120 \
  -o /data/riotbuild/examples/suit_update/bin/samr21-xpro/suit_update-riot.suitv4.1562671759.bin \
  /data/riotbuild/examples/suit_update/bin/samr21-xpro/suit_update-slot0.1562671759.riot.bin /data/riotbuild/examples/suit_update/bin/samr21-xpro/suit_update-slot1.1562671759.riot.bin
Traceback (most recent call last):
  File "/data/riotbuild/dist/tools/suit_v4/gen_manifest.py", line 87, in <module>
    main()
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 696, in main
    _verify_python3_env()
  File "/usr/local/lib/python3.6/dist-packages/click/_unicodefun.py", line 124, in _verify_python3_env
    ' mitigation steps.' + extra
RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult https://click.palletsprojects.com/en/7.x/python3/ for mitigation steps.

This system supports the C.UTF-8 locale which is recommended.
You might be able to resolve your issue by exporting the
following environment variables:

    export LC_ALL=C.UTF-8
    export LANG=C.UTF-8
/data/riotbuild/makefiles/suit.v4.inc.mk:64: recipe for target '/data/riotbuild/examples/suit_update/bin/samr21-xpro/suit_update-riot.suitv4.1562671759.bin' failed
make: *** [/data/riotbuild/examples/suit_update/bin/samr21-xpro/suit_update-riot.suitv4.1562671759.bin] Error 1

Doing as suggested fixed the issue.

@fjmolinas
Copy link
Contributor

Re-based on #75 it now succeeds. So lets wait for #75.

@emmanuelsearch
Copy link
Member

@fjmolinas is this an ACK ;)
(now that #75 is merged)

@kaspar030
Copy link
Contributor Author

Doing as suggested fixed the issue.

This has been resolved.

Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since click was removed from RIOT-OS/RIOT#11818 (comment) lets remove it.

requirements.txt Outdated
ed25519==1.4
cbor==1.0.0
cryptography==2.6.1
click==7.0
Copy link
Contributor

@fjmolinas fjmolinas Aug 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This click can be removed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaspar030 seems like an easy fix ;)
so let's merge this PR the last one preliminary to #11818 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, GO.

@fjmolinas
Copy link
Contributor

GO!

@fjmolinas fjmolinas merged commit 0d22c55 into RIOT-OS:master Aug 9, 2019
@kaspar030 kaspar030 deleted the add_suit_deps branch August 9, 2019 13:14
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.

3 participants