From 7618c4a08229834883c8ade90e52c8c41eb81901 Mon Sep 17 00:00:00 2001 From: Ludwig Schwiedrzik Date: Tue, 18 Jun 2024 09:58:07 +0200 Subject: Add persistent storage grpc API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the current demo, user settings such as radio stations and HVAC preferences are lost upon poweroff. The agl-persistent-storage-api adds a simple grpc API that enables persistent storage of key-value pairs using RocksDB. The API supports Write, Read, Delete, and Search calls, as well as calls to recursively list or delete nodes (intended for use with VSS-like keys) and to destroy the database. Separate namespaces are also supported. The API is written in Rust, the repo can be viewed under this URL: https://github.com/LSchwiedrzik/agl-persistent-storage-api Test builds were successfully carried out by Jan-Simon Möller. Bug-AGL: [SPEC-5187] Change-Id: Ic11d31c75268f922c84785da8cd29fa6b022612f Signed-off-by: Ludwig Schwiedrzik Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/29996 Reviewed-by: Jan-Simon Moeller Tested-by: Jenkins Job builder account --- .../agl-persistent-storage-api-crates.inc | 360 +++++++++++++++++++++ .../agl-persistent-storage-api_git.bb | 46 +++ .../files/agl-persistent-storage-api.service | 11 + 3 files changed, 417 insertions(+) create mode 100644 recipes-demo/agl-persistent-storage-api/agl-persistent-storage-api-crates.inc create mode 100644 recipes-demo/agl-persistent-storage-api/agl-persistent-storage-api_git.bb create mode 100644 recipes-demo/agl-persistent-storage-api/files/agl-persistent-storage-api.service diff --git a/recipes-demo/agl-persistent-storage-api/agl-persistent-storage-api-crates.inc b/recipes-demo/agl-persistent-storage-api/agl-persistent-storage-api-crates.inc new file mode 100644 index 000000000..d51afe8d7 --- /dev/null +++ b/recipes-demo/agl-persistent-storage-api/agl-persistent-storage-api-crates.inc @@ -0,0 +1,360 @@ +# Autogenerated with 'bitbake -c update_crates agl-persistent-storage-api' + +# from Cargo.lock +SRC_URI += " \ + crate://crates.io/addr2line/0.21.0 \ + crate://crates.io/adler/1.0.2 \ + crate://crates.io/aho-corasick/1.1.3 \ + crate://crates.io/anstream/0.6.13 \ + crate://crates.io/anstyle/1.0.6 \ + crate://crates.io/anstyle-parse/0.2.3 \ + crate://crates.io/anstyle-query/1.0.2 \ + crate://crates.io/anstyle-wincon/3.0.2 \ + crate://crates.io/anyhow/1.0.82 \ + crate://crates.io/async-stream/0.3.5 \ + crate://crates.io/async-stream-impl/0.3.5 \ + crate://crates.io/async-trait/0.1.80 \ + crate://crates.io/autocfg/1.2.0 \ + crate://crates.io/axum/0.6.20 \ + crate://crates.io/axum-core/0.3.4 \ + crate://crates.io/backtrace/0.3.71 \ + crate://crates.io/base64/0.13.1 \ + crate://crates.io/bindgen/0.69.4 \ + crate://crates.io/bitflags/1.3.2 \ + crate://crates.io/bitflags/2.5.0 \ + crate://crates.io/bytes/1.6.0 \ + crate://crates.io/bzip2-sys/0.1.11+1.0.8 \ + crate://crates.io/cc/1.0.95 \ + crate://crates.io/cexpr/0.6.0 \ + crate://crates.io/cfg-if/1.0.0 \ + crate://crates.io/clang-sys/1.7.0 \ + crate://crates.io/clap/4.5.4 \ + crate://crates.io/clap_builder/4.5.2 \ + crate://crates.io/clap_derive/4.5.4 \ + crate://crates.io/clap_lex/0.7.0 \ + crate://crates.io/colorchoice/1.0.0 \ + crate://crates.io/either/1.11.0 \ + crate://crates.io/equivalent/1.0.1 \ + crate://crates.io/errno/0.3.8 \ + crate://crates.io/fastrand/2.1.0 \ + crate://crates.io/fixedbitset/0.4.2 \ + crate://crates.io/fnv/1.0.7 \ + crate://crates.io/futures/0.3.30 \ + crate://crates.io/futures-channel/0.3.30 \ + crate://crates.io/futures-core/0.3.30 \ + crate://crates.io/futures-executor/0.3.30 \ + crate://crates.io/futures-io/0.3.30 \ + crate://crates.io/futures-macro/0.3.30 \ + crate://crates.io/futures-sink/0.3.30 \ + crate://crates.io/futures-task/0.3.30 \ + crate://crates.io/futures-util/0.3.30 \ + crate://crates.io/getrandom/0.2.14 \ + crate://crates.io/gimli/0.28.1 \ + crate://crates.io/glob/0.3.1 \ + crate://crates.io/h2/0.3.26 \ + crate://crates.io/hashbrown/0.12.3 \ + crate://crates.io/hashbrown/0.14.5 \ + crate://crates.io/heck/0.4.1 \ + crate://crates.io/heck/0.5.0 \ + crate://crates.io/hermit-abi/0.3.9 \ + crate://crates.io/home/0.5.9 \ + crate://crates.io/http/0.2.12 \ + crate://crates.io/http-body/0.4.6 \ + crate://crates.io/httparse/1.8.0 \ + crate://crates.io/httpdate/1.0.3 \ + crate://crates.io/hyper/0.14.28 \ + crate://crates.io/hyper-timeout/0.4.1 \ + crate://crates.io/indexmap/1.9.3 \ + crate://crates.io/indexmap/2.2.6 \ + crate://crates.io/itertools/0.10.5 \ + crate://crates.io/itertools/0.12.1 \ + crate://crates.io/itoa/1.0.11 \ + crate://crates.io/jobserver/0.1.31 \ + crate://crates.io/lazy_static/1.4.0 \ + crate://crates.io/lazycell/1.3.0 \ + crate://crates.io/libc/0.2.153 \ + crate://crates.io/libloading/0.8.3 \ + crate://crates.io/libz-sys/1.1.16 \ + crate://crates.io/linux-raw-sys/0.4.13 \ + crate://crates.io/lock_api/0.4.12 \ + crate://crates.io/log/0.4.21 \ + crate://crates.io/lz4-sys/1.9.4 \ + crate://crates.io/matchit/0.7.3 \ + crate://crates.io/memchr/2.7.2 \ + crate://crates.io/mime/0.3.17 \ + crate://crates.io/minimal-lexical/0.2.1 \ + crate://crates.io/miniz_oxide/0.7.2 \ + crate://crates.io/mio/0.8.11 \ + crate://crates.io/multimap/0.8.3 \ + crate://crates.io/nom/7.1.3 \ + crate://crates.io/num_cpus/1.16.0 \ + crate://crates.io/object/0.32.2 \ + crate://crates.io/once_cell/1.19.0 \ + crate://crates.io/parking_lot/0.12.2 \ + crate://crates.io/parking_lot_core/0.9.10 \ + crate://crates.io/percent-encoding/2.3.1 \ + crate://crates.io/petgraph/0.6.4 \ + crate://crates.io/pin-project/1.1.5 \ + crate://crates.io/pin-project-internal/1.1.5 \ + crate://crates.io/pin-project-lite/0.2.14 \ + crate://crates.io/pin-utils/0.1.0 \ + crate://crates.io/pkg-config/0.3.30 \ + crate://crates.io/ppv-lite86/0.2.17 \ + crate://crates.io/prettyplease/0.1.25 \ + crate://crates.io/proc-macro2/1.0.81 \ + crate://crates.io/prost/0.11.9 \ + crate://crates.io/prost-build/0.11.9 \ + crate://crates.io/prost-derive/0.11.9 \ + crate://crates.io/prost-types/0.11.9 \ + crate://crates.io/quote/1.0.36 \ + crate://crates.io/rand/0.8.5 \ + crate://crates.io/rand_chacha/0.3.1 \ + crate://crates.io/rand_core/0.6.4 \ + crate://crates.io/redox_syscall/0.5.1 \ + crate://crates.io/regex/1.10.4 \ + crate://crates.io/regex-automata/0.4.6 \ + crate://crates.io/regex-syntax/0.8.3 \ + crate://crates.io/rust-librocksdb-sys/0.22.0+9.2.1 \ + crate://crates.io/rust-rocksdb/0.26.0 \ + crate://crates.io/rustc-demangle/0.1.23 \ + crate://crates.io/rustc-hash/1.1.0 \ + crate://crates.io/rustix/0.38.34 \ + crate://crates.io/rustversion/1.0.15 \ + crate://crates.io/scc/2.1.1 \ + crate://crates.io/scopeguard/1.2.0 \ + crate://crates.io/sdd/0.2.0 \ + crate://crates.io/serde/1.0.200 \ + crate://crates.io/serde_derive/1.0.200 \ + crate://crates.io/serial_test/3.1.1 \ + crate://crates.io/serial_test_derive/3.1.1 \ + crate://crates.io/shlex/1.3.0 \ + crate://crates.io/slab/0.4.9 \ + crate://crates.io/smallvec/1.13.2 \ + crate://crates.io/socket2/0.5.7 \ + crate://crates.io/strsim/0.11.1 \ + crate://crates.io/syn/1.0.109 \ + crate://crates.io/syn/2.0.60 \ + crate://crates.io/sync_wrapper/0.1.2 \ + crate://crates.io/tempfile/3.10.1 \ + crate://crates.io/tokio/1.37.0 \ + crate://crates.io/tokio-io-timeout/1.2.0 \ + crate://crates.io/tokio-macros/2.2.0 \ + crate://crates.io/tokio-stream/0.1.15 \ + crate://crates.io/tokio-util/0.7.10 \ + crate://crates.io/tonic/0.8.3 \ + crate://crates.io/tonic-build/0.8.4 \ + crate://crates.io/tonic-reflection/0.6.0 \ + crate://crates.io/tower/0.4.13 \ + crate://crates.io/tower-layer/0.3.2 \ + crate://crates.io/tower-service/0.3.2 \ + crate://crates.io/tracing/0.1.40 \ + crate://crates.io/tracing-attributes/0.1.27 \ + crate://crates.io/tracing-core/0.1.32 \ + crate://crates.io/tracing-futures/0.2.5 \ + crate://crates.io/try-lock/0.2.5 \ + crate://crates.io/unicode-ident/1.0.12 \ + crate://crates.io/utf8parse/0.2.1 \ + crate://crates.io/uuid/1.8.0 \ + crate://crates.io/vcpkg/0.2.15 \ + crate://crates.io/want/0.3.1 \ + crate://crates.io/wasi/0.11.0+wasi-snapshot-preview1 \ + crate://crates.io/which/4.4.2 \ + crate://crates.io/windows-sys/0.48.0 \ + crate://crates.io/windows-sys/0.52.0 \ + crate://crates.io/windows-targets/0.48.5 \ + crate://crates.io/windows-targets/0.52.5 \ + crate://crates.io/windows_aarch64_gnullvm/0.48.5 \ + crate://crates.io/windows_aarch64_gnullvm/0.52.5 \ + crate://crates.io/windows_aarch64_msvc/0.48.5 \ + crate://crates.io/windows_aarch64_msvc/0.52.5 \ + crate://crates.io/windows_i686_gnu/0.48.5 \ + crate://crates.io/windows_i686_gnu/0.52.5 \ + crate://crates.io/windows_i686_gnullvm/0.52.5 \ + crate://crates.io/windows_i686_msvc/0.48.5 \ + crate://crates.io/windows_i686_msvc/0.52.5 \ + crate://crates.io/windows_x86_64_gnu/0.48.5 \ + crate://crates.io/windows_x86_64_gnu/0.52.5 \ + crate://crates.io/windows_x86_64_gnullvm/0.48.5 \ + crate://crates.io/windows_x86_64_gnullvm/0.52.5 \ + crate://crates.io/windows_x86_64_msvc/0.48.5 \ + crate://crates.io/windows_x86_64_msvc/0.52.5 \ + crate://crates.io/zstd-sys/2.0.10+zstd.1.5.6 \ +" + +SRC_URI[addr2line-0.21.0.sha256sum] = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +SRC_URI[adler-1.0.2.sha256sum] = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +SRC_URI[aho-corasick-1.1.3.sha256sum] = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +SRC_URI[anstream-0.6.13.sha256sum] = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +SRC_URI[anstyle-1.0.6.sha256sum] = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +SRC_URI[anstyle-parse-0.2.3.sha256sum] = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +SRC_URI[anstyle-query-1.0.2.sha256sum] = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +SRC_URI[anstyle-wincon-3.0.2.sha256sum] = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +SRC_URI[anyhow-1.0.82.sha256sum] = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +SRC_URI[async-stream-0.3.5.sha256sum] = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +SRC_URI[async-stream-impl-0.3.5.sha256sum] = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +SRC_URI[async-trait-0.1.80.sha256sum] = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +SRC_URI[autocfg-1.2.0.sha256sum] = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +SRC_URI[axum-0.6.20.sha256sum] = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +SRC_URI[axum-core-0.3.4.sha256sum] = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +SRC_URI[backtrace-0.3.71.sha256sum] = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +SRC_URI[base64-0.13.1.sha256sum] = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +SRC_URI[bindgen-0.69.4.sha256sum] = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +SRC_URI[bitflags-1.3.2.sha256sum] = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +SRC_URI[bitflags-2.5.0.sha256sum] = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +SRC_URI[bytes-1.6.0.sha256sum] = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +SRC_URI[bzip2-sys-0.1.11+1.0.8.sha256sum] = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +SRC_URI[cc-1.0.95.sha256sum] = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" +SRC_URI[cexpr-0.6.0.sha256sum] = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +SRC_URI[clang-sys-1.7.0.sha256sum] = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +SRC_URI[clap-4.5.4.sha256sum] = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +SRC_URI[clap_builder-4.5.2.sha256sum] = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +SRC_URI[clap_derive-4.5.4.sha256sum] = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +SRC_URI[clap_lex-0.7.0.sha256sum] = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +SRC_URI[colorchoice-1.0.0.sha256sum] = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +SRC_URI[either-1.11.0.sha256sum] = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +SRC_URI[equivalent-1.0.1.sha256sum] = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +SRC_URI[errno-0.3.8.sha256sum] = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +SRC_URI[fastrand-2.1.0.sha256sum] = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +SRC_URI[fixedbitset-0.4.2.sha256sum] = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +SRC_URI[fnv-1.0.7.sha256sum] = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +SRC_URI[futures-0.3.30.sha256sum] = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +SRC_URI[futures-channel-0.3.30.sha256sum] = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +SRC_URI[futures-core-0.3.30.sha256sum] = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +SRC_URI[futures-executor-0.3.30.sha256sum] = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +SRC_URI[futures-io-0.3.30.sha256sum] = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +SRC_URI[futures-macro-0.3.30.sha256sum] = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +SRC_URI[futures-sink-0.3.30.sha256sum] = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +SRC_URI[futures-task-0.3.30.sha256sum] = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +SRC_URI[futures-util-0.3.30.sha256sum] = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +SRC_URI[getrandom-0.2.14.sha256sum] = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +SRC_URI[gimli-0.28.1.sha256sum] = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +SRC_URI[glob-0.3.1.sha256sum] = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +SRC_URI[h2-0.3.26.sha256sum] = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +SRC_URI[hashbrown-0.12.3.sha256sum] = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +SRC_URI[hashbrown-0.14.5.sha256sum] = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +SRC_URI[heck-0.4.1.sha256sum] = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +SRC_URI[heck-0.5.0.sha256sum] = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +SRC_URI[hermit-abi-0.3.9.sha256sum] = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +SRC_URI[home-0.5.9.sha256sum] = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +SRC_URI[http-0.2.12.sha256sum] = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +SRC_URI[http-body-0.4.6.sha256sum] = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +SRC_URI[httparse-1.8.0.sha256sum] = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +SRC_URI[httpdate-1.0.3.sha256sum] = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +SRC_URI[hyper-0.14.28.sha256sum] = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +SRC_URI[hyper-timeout-0.4.1.sha256sum] = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +SRC_URI[indexmap-1.9.3.sha256sum] = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +SRC_URI[indexmap-2.2.6.sha256sum] = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +SRC_URI[itertools-0.10.5.sha256sum] = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +SRC_URI[itertools-0.12.1.sha256sum] = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +SRC_URI[itoa-1.0.11.sha256sum] = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +SRC_URI[jobserver-0.1.31.sha256sum] = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +SRC_URI[lazy_static-1.4.0.sha256sum] = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +SRC_URI[lazycell-1.3.0.sha256sum] = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" +SRC_URI[libc-0.2.153.sha256sum] = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +SRC_URI[libloading-0.8.3.sha256sum] = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +SRC_URI[libz-sys-1.1.16.sha256sum] = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" +SRC_URI[linux-raw-sys-0.4.13.sha256sum] = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +SRC_URI[lock_api-0.4.12.sha256sum] = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +SRC_URI[log-0.4.21.sha256sum] = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +SRC_URI[lz4-sys-1.9.4.sha256sum] = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +SRC_URI[matchit-0.7.3.sha256sum] = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +SRC_URI[memchr-2.7.2.sha256sum] = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +SRC_URI[mime-0.3.17.sha256sum] = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +SRC_URI[minimal-lexical-0.2.1.sha256sum] = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +SRC_URI[miniz_oxide-0.7.2.sha256sum] = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +SRC_URI[mio-0.8.11.sha256sum] = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +SRC_URI[multimap-0.8.3.sha256sum] = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" +SRC_URI[nom-7.1.3.sha256sum] = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +SRC_URI[num_cpus-1.16.0.sha256sum] = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +SRC_URI[object-0.32.2.sha256sum] = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +SRC_URI[once_cell-1.19.0.sha256sum] = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +SRC_URI[parking_lot-0.12.2.sha256sum] = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +SRC_URI[parking_lot_core-0.9.10.sha256sum] = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +SRC_URI[percent-encoding-2.3.1.sha256sum] = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +SRC_URI[petgraph-0.6.4.sha256sum] = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +SRC_URI[pin-project-1.1.5.sha256sum] = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +SRC_URI[pin-project-internal-1.1.5.sha256sum] = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +SRC_URI[pin-project-lite-0.2.14.sha256sum] = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +SRC_URI[pin-utils-0.1.0.sha256sum] = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +SRC_URI[pkg-config-0.3.30.sha256sum] = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +SRC_URI[ppv-lite86-0.2.17.sha256sum] = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +SRC_URI[prettyplease-0.1.25.sha256sum] = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +SRC_URI[proc-macro2-1.0.81.sha256sum] = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +SRC_URI[prost-0.11.9.sha256sum] = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +SRC_URI[prost-build-0.11.9.sha256sum] = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" +SRC_URI[prost-derive-0.11.9.sha256sum] = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +SRC_URI[prost-types-0.11.9.sha256sum] = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +SRC_URI[quote-1.0.36.sha256sum] = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +SRC_URI[rand-0.8.5.sha256sum] = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +SRC_URI[rand_chacha-0.3.1.sha256sum] = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +SRC_URI[rand_core-0.6.4.sha256sum] = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +SRC_URI[redox_syscall-0.5.1.sha256sum] = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +SRC_URI[regex-1.10.4.sha256sum] = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +SRC_URI[regex-automata-0.4.6.sha256sum] = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +SRC_URI[regex-syntax-0.8.3.sha256sum] = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +SRC_URI[rust-librocksdb-sys-0.22.0+9.2.1.sha256sum] = "eacd840bcfbba938d74f67981a32bc908fe57d1cf6f39b131cb8c3f33fe67d1c" +SRC_URI[rust-rocksdb-0.26.0.sha256sum] = "aa60811a194b1d25b8b7761786fe8a4a3fb962ccb15ec246a337187ebcd9b8fd" +SRC_URI[rustc-demangle-0.1.23.sha256sum] = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +SRC_URI[rustc-hash-1.1.0.sha256sum] = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +SRC_URI[rustix-0.38.34.sha256sum] = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +SRC_URI[rustversion-1.0.15.sha256sum] = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" +SRC_URI[scc-2.1.1.sha256sum] = "76ad2bbb0ae5100a07b7a6f2ed7ab5fd0045551a4c507989b7a620046ea3efdc" +SRC_URI[scopeguard-1.2.0.sha256sum] = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +SRC_URI[sdd-0.2.0.sha256sum] = "b84345e4c9bd703274a082fb80caaa99b7612be48dfaa1dd9266577ec412309d" +SRC_URI[serde-1.0.200.sha256sum] = "ddc6f9cc94d67c0e21aaf7eda3a010fd3af78ebf6e096aa6e2e13c79749cce4f" +SRC_URI[serde_derive-1.0.200.sha256sum] = "856f046b9400cee3c8c94ed572ecdb752444c24528c035cd35882aad6f492bcb" +SRC_URI[serial_test-3.1.1.sha256sum] = "4b4b487fe2acf240a021cf57c6b2b4903b1e78ca0ecd862a71b71d2a51fed77d" +SRC_URI[serial_test_derive-3.1.1.sha256sum] = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" +SRC_URI[shlex-1.3.0.sha256sum] = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +SRC_URI[slab-0.4.9.sha256sum] = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +SRC_URI[smallvec-1.13.2.sha256sum] = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +SRC_URI[socket2-0.5.7.sha256sum] = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +SRC_URI[strsim-0.11.1.sha256sum] = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +SRC_URI[syn-1.0.109.sha256sum] = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +SRC_URI[syn-2.0.60.sha256sum] = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +SRC_URI[sync_wrapper-0.1.2.sha256sum] = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +SRC_URI[tempfile-3.10.1.sha256sum] = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +SRC_URI[tokio-1.37.0.sha256sum] = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +SRC_URI[tokio-io-timeout-1.2.0.sha256sum] = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +SRC_URI[tokio-macros-2.2.0.sha256sum] = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +SRC_URI[tokio-stream-0.1.15.sha256sum] = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +SRC_URI[tokio-util-0.7.10.sha256sum] = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +SRC_URI[tonic-0.8.3.sha256sum] = "8f219fad3b929bef19b1f86fbc0358d35daed8f2cac972037ac0dc10bbb8d5fb" +SRC_URI[tonic-build-0.8.4.sha256sum] = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4" +SRC_URI[tonic-reflection-0.6.0.sha256sum] = "67494bad4dda4c9bffae901dfe14e2b2c0f760adb4706dc10beeb81799f7f7b2" +SRC_URI[tower-0.4.13.sha256sum] = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +SRC_URI[tower-layer-0.3.2.sha256sum] = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +SRC_URI[tower-service-0.3.2.sha256sum] = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +SRC_URI[tracing-0.1.40.sha256sum] = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +SRC_URI[tracing-attributes-0.1.27.sha256sum] = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +SRC_URI[tracing-core-0.1.32.sha256sum] = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +SRC_URI[tracing-futures-0.2.5.sha256sum] = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +SRC_URI[try-lock-0.2.5.sha256sum] = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +SRC_URI[unicode-ident-1.0.12.sha256sum] = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +SRC_URI[utf8parse-0.2.1.sha256sum] = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +SRC_URI[uuid-1.8.0.sha256sum] = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +SRC_URI[vcpkg-0.2.15.sha256sum] = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +SRC_URI[want-0.3.1.sha256sum] = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +SRC_URI[wasi-0.11.0+wasi-snapshot-preview1.sha256sum] = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +SRC_URI[which-4.4.2.sha256sum] = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +SRC_URI[windows-sys-0.48.0.sha256sum] = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +SRC_URI[windows-sys-0.52.0.sha256sum] = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +SRC_URI[windows-targets-0.48.5.sha256sum] = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +SRC_URI[windows-targets-0.52.5.sha256sum] = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +SRC_URI[windows_aarch64_gnullvm-0.48.5.sha256sum] = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +SRC_URI[windows_aarch64_gnullvm-0.52.5.sha256sum] = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +SRC_URI[windows_aarch64_msvc-0.48.5.sha256sum] = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +SRC_URI[windows_aarch64_msvc-0.52.5.sha256sum] = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +SRC_URI[windows_i686_gnu-0.48.5.sha256sum] = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +SRC_URI[windows_i686_gnu-0.52.5.sha256sum] = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +SRC_URI[windows_i686_gnullvm-0.52.5.sha256sum] = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +SRC_URI[windows_i686_msvc-0.48.5.sha256sum] = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +SRC_URI[windows_i686_msvc-0.52.5.sha256sum] = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +SRC_URI[windows_x86_64_gnu-0.48.5.sha256sum] = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +SRC_URI[windows_x86_64_gnu-0.52.5.sha256sum] = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +SRC_URI[windows_x86_64_gnullvm-0.48.5.sha256sum] = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +SRC_URI[windows_x86_64_gnullvm-0.52.5.sha256sum] = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +SRC_URI[windows_x86_64_msvc-0.48.5.sha256sum] = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +SRC_URI[windows_x86_64_msvc-0.52.5.sha256sum] = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +SRC_URI[zstd-sys-2.0.10+zstd.1.5.6.sha256sum] = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" diff --git a/recipes-demo/agl-persistent-storage-api/agl-persistent-storage-api_git.bb b/recipes-demo/agl-persistent-storage-api/agl-persistent-storage-api_git.bb new file mode 100644 index 000000000..63a315fd6 --- /dev/null +++ b/recipes-demo/agl-persistent-storage-api/agl-persistent-storage-api_git.bb @@ -0,0 +1,46 @@ +DESCRIPTION = "A grpc API that provides persistent storage for the Automotive Grade Linux demo" +SUMMARY = "Our goal is to develop a grpc API for AGLthat serves as persistent storage API for the demo. The API will be written in Rust and make use of tonic for grpc functionality as well as RocksDB as a database backend, using rust-rocksdb. Use cases include retaining settings over a system shutdown (e.g. audio, HVAC, profile data, Wifi settings, radio presets, metric vs imperial units)." +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=493c464569a4f93a01fc9025ee76a69b" + +SRC_URI = "git://github.com/LSchwiedrzik/agl-persistent-storage-api.git;protocol=https;branch=master \ + file://agl-persistent-storage-api.service \ + " + +# Modify these as desired +PV = "1.0+git${SRCPV}" +SRCREV = "f69d46510e5b13cdb559dbc077aced1f74e19f66" + +S = "${WORKDIR}/git" + +DEPENDS = "protobuf-native grpc-native rocksdb clang-native" +TOOLCHAIN = "clang" + +require ${BPN}-crates.inc + +inherit cargo cargo-update-recipe-crates systemd +#useradd + +SYSTEMD_SERVICE:${PN} = "${BPN}.service" + +USERADD_PACKAGES = "${PN}" +USERADDEXTENSION = "useradd-staticids" +GROUPADD_PARAM:${PN} = "-g 903 persistent-api ;" +USERADD_PARAM:${PN} = "--system -g 903 -u 903 -o -d / --shell /bin/nologin persistent-api ;" + +do_compile:prepend() { + export ROCKSDB_CXX_STD="--std=c99" + export ROCKSDB_INCLUDE_DIR="${RECIPE_SYSROOT}/usr/include" +} + +do_install:append () { + # copy systemd service file into destination folder + mv ${D}/usr/bin/server ${D}/usr/bin/agl-service-persistent-storage + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_system_unitdir} + fi +} + +FILES:${PN} += "${systemd_system_unitdir} ${datadir}" + diff --git a/recipes-demo/agl-persistent-storage-api/files/agl-persistent-storage-api.service b/recipes-demo/agl-persistent-storage-api/files/agl-persistent-storage-api.service new file mode 100644 index 000000000..9f1f72145 --- /dev/null +++ b/recipes-demo/agl-persistent-storage-api/files/agl-persistent-storage-api.service @@ -0,0 +1,11 @@ +[Unit] +After=network-online.target + +[Service] +Type=simple +ExecStart=/usr/bin/agl-service-persistent-storage +Restart=on-failure +#User=persistent-api + +[Install] +WantedBy=default.target -- cgit 1.2.3-korg