Skip to content

Commit

Permalink
simpleiot: Make curl from curl-native to function correctly
Browse files Browse the repository at this point in the history
Fixes

|     curl -#fLw "" https://github.com/zwilias/elm-json/releases/download/v0.2.13/elm-json-v0.2.13-x86_64-unknown-linux-musl.tar.gz
|     The above command exited with exit code 77:
|     curl: (77) error setting certificate file: /mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/simpleiot/0.12.3-r0/recipe-sysroot-native/etc/ssl/certs/ca-certificates.crt

Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
kraj committed Aug 4, 2023
1 parent 6a9b23f commit 37afa95
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sources/meta-yoe/recipes-siot/simpleiot/simpleiot_0.12.3.bb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
SECTION = "apps"

DEPENDS = "go-native elm-binary-native nodejs-native"
DEPENDS += "go-native elm-binary-native nodejs-native curl-native ca-certificates-native"

inherit systemd update-rc.d goarch

Expand All @@ -30,6 +30,11 @@ INITSCRIPT_PARAMS = "start 99 5 . stop 20 6 ."
do_configure[network] = "1"
do_compile[network] = "1"

# It uses curl-native to fetch npm dependencies which need to also use
# native certs bundle, by default curl is compiled to point to curl-native's RSS
# location which is buildtime path of curl-native not the recipe where it is being used
export CURL_CA_BUNDLE = "${RECIPE_SYSROOT_NATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"

do_configure() {
export GOPATH=${GOPATH}
export GOFLAGS="-modcacherw"
Expand Down

1 comment on commit 37afa95

@cbrake
Copy link
Contributor

@cbrake cbrake commented on 37afa95 Aug 4, 2023

Choose a reason for hiding this comment

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

very nice -- thanks for sorting this one out.

Please sign in to comment.