Skip to content

Commit

Permalink
Merge pull request #29 from MingliuYan/fix-rac-build-issues
Browse files Browse the repository at this point in the history
rac: fix some compilation problems
  • Loading branch information
jsrc27 authored Feb 26, 2024
2 parents 00dc9fa + e8853bf commit 6e5029c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions recipes-sota/rac/rac_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -353,24 +353,27 @@ SRC_URI += " \
SRCREV_FORMAT .= "russh"
SRCREV_russh = "0.37.0-beta.1"
SRCREV_FORMAT .= "tough"
SRCREV_tough = "rac"
SRCREV_tough = "28c2deb20a654426f09129bcd0938ad92de02f33"

# There is a postfunc that runs after do_configure. This fixing logic needs to run after this postfunc.
# It is because of this ordering this is do_compile:prepend instead of do_configure:append.
do_compile:prepend() {
cargo_add_rac_patch_paths() {
# Need to fix config file due to the tough and russh repo having a virtual manifest.
# Which is not supported by the cargo bbclasses currently,
# see: https://github.com/openembedded/openembedded-core/commit/684a8af41c5bb70db68e75f72bdc4c9b09630810
sed -i 's|tough =.*|tough = { path = "${WORKDIR}/tough/tough" }|g' ${CARGO_HOME}/config
sed -i '/olpc-cjson =.*/d' ${CARGO_HOME}/config
sed -i '/^tough =.*/a olpc-cjson = { path = "${WORKDIR}/tough/olpc-cjson" }' ${CARGO_HOME}/config

sed -i 's|russh =.*|russh = { path = "${WORKDIR}/russh/russh" }|g' ${CARGO_HOME}/config
sed -i '/^russh =.*/a \
russh-keys = { path = "${WORKDIR}/russh/russh-keys" } \
russh-cryptovec = { path = "${WORKDIR}/russh/cryptovec" }' ${CARGO_HOME}/config

sed -i '/russh-keys =.*/d' ${CARGO_HOME}/config
sed -i '/russh-cryptovec =.*/d' ${CARGO_HOME}/config
sed -i '/^russh =.*/a russh-cryptovec = { path = "${WORKDIR}/russh/cryptovec" }' ${CARGO_HOME}/config
sed -i '/^russh =.*/a russh-keys = { path = "${WORKDIR}/russh/russh-keys" }' ${CARGO_HOME}/config
}

do_configure[postfuncs] += "cargo_add_rac_patch_paths"

do_install:append() {
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/remote-access.service ${D}${systemd_unitdir}/system/remote-access.service
Expand Down

0 comments on commit 6e5029c

Please sign in to comment.