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

edgesec: bump to v0.1.0-alpha.0 #21

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

aloisklink
Copy link
Contributor

@aloisklink aloisklink commented Nov 4, 2022

Bumps edgesec to v0.1.0-alpha.0.

See https://github.com/nqminds/edgesec/releases/tag/v0.1.0-alpha.0 for changelog.

I've also adjusted the edgesec Makefile to use https to download the .tar.gz, instead of using git, which should make the download slightly faster.

edgsec downloads the uthash source code at build time, which seems to be failing for some unknown reason.

Downloading the uthash source code in the OpenWRT download steps seems to work fine however, so let's do that instead.

The uthash source code is now downloaded in the OpenWRT SDK's dl folder, in case other packages need to use it (and so that a redownloaded isn't needed, even after a make clean)

(patch at nqminds/edgesec@f66d465)


DRAFT

  • Compiling now works without any errors!
    • Fixed! Currently failing due to:

      /home/alois/Documents/nqminds/many-secured/deployment/openwrt-sdk-21.02.5-mvebu-cortexa9_gcc-8.4.0_musl_eabi.Linux-x86_64/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/usr/include/pcap/bpf.h:236:2: error: unknown type name 'u_char'
      

      It looks like the BSD types are not being defined properly.

  • Test on an actual OpenWRT box

See https://github.com/nqminds/edgesec/releases/tag/v0.1.0-alpha.0
for changelog.

I've also adjusted the edgesec Makefile to use https to download the
.tar.gz, instead of using `git`, which should make the download
slightly faster.
Name the downloaded `.tar.gz` file so that it starts with
the `edgesec-` prefix.

Currently, the downloaded `.tar.gz` is just called
`v0.1.0-alpha.0.tar.gz`, which isn't super useful, and may conflict
with another package's download.
edgsec downloads the uthash source code at build time,
which seems to be failing for some unknown reason.

Downloading the uthash source code in the OpenWRT download steps
seems to work fine however, so let's do that instead.

The uthash source code is now downloaded in the OpenWRT SDK's `dl`
folder, in case other packages need to use it
(and so that a redownloaded isn't needed, even after a `make clean`)

(patch at nqminds/edgesec@f66d465)
@aloisklink aloisklink force-pushed the edgesec/bump-to-v0.1.0-alpha.0 branch from 9bc89f5 to 1b0caf6 Compare November 7, 2022 11:50
The version of libpcap compiled by the OpenWRT SDK
requires the _BSD_SOURCE compiler definition to be defined
before including the pcap headers.

This is supported in glibc, uClibc, and musl libc.

Patched at nqminds/edgesec@caa49be
@aloisklink aloisklink force-pushed the edgesec/bump-to-v0.1.0-alpha.0 branch from 1b0caf6 to 89dc0c9 Compare November 7, 2022 13:09
When compiling using standard ISO C, (e.g. `-std=c11`),
many non-standard C functions are not included.

Declaring _POSIX_C_SOURCE and _DEFAULT_SOURCE renables these when
we need to use these non-standard C functions/macros.

Patched at nqminds/edgesec@c7e67ac
@aloisklink aloisklink self-assigned this Nov 8, 2022
@aloisklink
Copy link
Contributor Author

aloisklink commented Nov 8, 2022

Hi @antmcc49, I'm pretty sure edgesec-v0.1.0-alpha.0 now compiles for OpenWRT 21.02 (CI is giving a green tick (but that's for OpenWRT 22.03), but I haven't yet tested it on the Turris Omnia

I've tried compiling it over the last few hours, but the first time I made a stupid mistake git clean -fxd to fix an NPM issue, and the second time my build crashed (might be too much RAM usage).

I don't mind working on this on Friday, but if you want to make some progress while I'm gone, you're welcome to try to build and test it yourself.

You'd have to modify feeds.conf in https://github.com/nqminds/many-secured/blob/6394575aefee86f2ca59b5a6ecc4cf6aeebcb061/deployment/feeds.conf#L15 so that it points to this PR branch.

Then you should be able to follow the instructions here to install the new edgesec ipk: https://github.com/nqminds/many-secured/blob/main/docs/Setup-Turris-Omnia.md#updating (please don't update the manysecured-app or manysecured-rest-server though, since they're both broken due to Python issues).

aloisklink and others added 2 commits November 11, 2022 10:48
Updates `config.ini` or OpenWRT based on edgesec 0.1.0-alpha0
from the main edgesec repo.
edgesec: update config to latest edgesec
@mereacre
Copy link
Contributor

@aloisklink Is this still a draft?

@aloisklink
Copy link
Contributor Author

@aloisklink Is this still a draft?

Yep. At some point, we really do need to test this PR. It should only take 30 minutes or so, the hard part is just waiting for everything to compile.

@mereacre
Copy link
Contributor

@aloisklink Can you allocate the task? Who need to do what?

@aloisklink
Copy link
Contributor Author

@aloisklink Can you allocate the task? Who need to do what?

Instructions are unchanged from: #21 (comment) You're welcome to try if you have time!

I can try looking at in Monday. The problem is, on my laptop it takes a few hours to compile everything for Turris OS. But I can't compile on much faster desktop when I'm working from home, since I don't have access to any Turris OS devices (I'll need to play around with WiFi).

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