summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/cargo.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* cargo: Move CARGO_MANIFEST_PATH/CARGO_SRC_DIR to cargo_commonAlex Kiernan2023-12-091-7/+0
| | | | | | | | | | cargo_common_do_configure uses CARGO_MANIFEST_PATH (which depends on CARGO_SRC_DIR), but their definition was in cargo.bbclass. (From OE-Core rev: 740374a13ad5359767b421666decf50c158ea0df) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo: Rename MANIFEST_PATH -> CARGO_MANIFEST_PATHAlex Kiernan2023-12-081-2/+2
| | | | | | | | | | | This variable is a piece of recipe configurable interface, scope it with the class name to make that clear. (From OE-Core rev: 0101de25832fbed3d08cd522512784133c628cad) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo.bbclass: Use --frozen flag for cargo operationsFrederic Martinsons2023-08-091-1/+6
| | | | | | | | | | It supersed the --offline flag and guarantee that Cargo.lock file will not be modified during the build. (From OE-Core rev: 9ff9e6523bd7eb6cdc854adcbd031085c536e0e6) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo.bbclass: set up cargo environment in common do_compileAlexander Kanavin2023-06-271-1/+0
| | | | | | | | | | | | | | | cargo_do_compile runs only if the recipe is built using cargo as the top level tool. Some recipes hide usage of cargo inside setuptools (or autoconf) and use do_compile definitions specific to those, and so the environment isn't properly set up. This was exposed by latest versions of python3-cryptography. (From OE-Core rev: 9f4ff643a028d7f5670d80861f2ce19ca2d90faa) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo.bbclass: use offline mode for buildingFrederic Martinsons2023-03-161-1/+1
| | | | | | | | | | | | | | | | | | | There should not be any network access during the build step so specify this explicitely to cargo. This will allow better error message, e.g: | Caused by: | can't checkout from 'ssh://git@.../fmartinsons/zbus-git-dep-test.git': you are in the offline mode (--offline) Instead of | Updating git repository `ssh://git@.../fmartinsons/zbus-git-dep-test.git` | warning: spurious network error (2 tries remaining): failed to resolve address for gitlab.com: Temporary failure in name resolution;class=Net (12) (From OE-Core rev: 8e9ec03c73e8c09e223d6f6cce297df363991350) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo.bbclass: avoid calling which ${RUSTC} with undefined ${RUSTC}Martin Jansa2022-11-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * RUSTC is normally defined in rust.bbclass, but rust-target-config doesn't inherit rust.bbclass and RUSTC is then undefined when calling 'which' in oe_cargo_build * causes which help text ending in log.do_compile, e.g.: | DEBUG: Executing shell function do_compile | NOTE: Using rust targets from /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/openssl-sys/0.9.77-r0/rust-targets/ | NOTE: cargo = /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/openssl-sys/0.9.77-r0/recipe-sysroot-native/usr/bin/cargo | Usage: which [options] [--] COMMAND [...] | Write the full path of COMMAND(s) to standard output. | | --version, -[vV] Print version and exit successfully. | --help, Print this help and exit successfully. | --skip-dot Skip directories in PATH that start with a dot. | --skip-tilde Skip directories in PATH that start with a tilde. | --show-dot Don't expand a dot to current directory in output. | --show-tilde Output a tilde for HOME directory for non-root. | --tty-only Stop processing options on the right if not on tty. | --all, -a Print all matches in PATH, not just the first | --read-alias, -i Read list of aliases from stdin. | --skip-alias Ignore option --read-alias; don't read stdin. | --read-functions Read shell functions from stdin. | --skip-functions Ignore option --read-functions; don't read stdin. | | Recommended use is to write the output of (alias; declare -f) to standard | input, so that which can show aliases and shell functions. See which(1) for | examples. | | If the options --read-alias and/or --read-functions are specified then the | output can be a full alias or function definition, optionally followed by | the full path of each command used inside of those. | | Report bugs to <which-bugs@gnu.org>. | NOTE: rustc = (From OE-Core rev: 0068e82f02354729b953e622889f96ca52468d6c) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Update classes to match new bitbake class scope functionalityRichard Purdie2022-08-121-0/+97
Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. (From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>