Date   

Re: [PATCH yocto-autobuilder-helper v16] Add a banner on the old documentation docs.

Richard Purdie
 

On Thu, 2022-05-12 at 13:33 +0100, Abongwa Amahnui Bonalais wrote:
Script to add banners to the old docs and outdated dunfell docs

Signed-off-by: Abongwa Bonalais Amahnui <abongwabonalais@...>
---
scripts/docs_add_banner.py | 84 ++++++++++++++++++++++++++++++++++++++
scripts/run-docs-build | 2 +
2 files changed, 86 insertions(+)
create mode 100755 scripts/docs_add_banner.py

diff --git a/scripts/docs_add_banner.py b/scripts/docs_add_banner.py
new file mode 100755
index 0000000..0de70d0
--- /dev/null
+++ b/scripts/docs_add_banner.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python3
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+#Signed-off-by: Abongwa Bonalais Amahnui <abongwabonalais@...>
+#
+#
+# Script to add banners to the old docs and outdated dunfell docs
+#
+#
+
+
+import os
+
+
+
+
+
+html_content_dunfell = '''
+<div id="outdated-warning">This document is outdated, you should select the <a href="https://docs.yoctoproject.org/dunfell">latest release version</a> in this series.</div>
+<div xml:lang="en" class="body" lang="en">
+'''
+html_content = '''
+<div id="outdated-warning">This version of the project is now considered obsolete, please select and use a <a href="https://docs.yoctoproject.org">more recent version</a>.</div>
+<div xml:lang="en" class="body" lang="en">
+'''
+
+# the class body and the last_div are used to make sure any .body property existing in any css file is not overwritten
+last_div = '''
+</div>
+
+'''
+
+css_replacement_content = '''
+
+ font-family: Verdana, Sans, sans-serif;
+
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ color: #333;
+ overflow-x: hidden;
+ }
+
+.body{
+margin: 0 auto;
+min-width: 640px;
+padding: 0 5em 5em 5em;
+}
+#outdated-warning{
+text-align: center;
+background-color: rgb(255, 186, 186);
+color: rgb(106, 14, 14);
+padding: 0.5em 0;
+width: 100%;
+position: fixed;
+top: 0;
+
+
+'''
+
+
+def add_banner_old_docs(dir):
+ for root, dirs, filenames in os.walk(dir):
+
+ if root.startswith('./3.1'):
+ html_replacement = html_content_dunfell
+ else:
+ html_replacement = html_content
+
+ for filename in filenames:
+ if filename.endswith('.html'):
+ with open(os.path.join(root, filename), 'r', encoding="ISO-8859-1") as f:
+ current_content = f.read()
+ with open(os.path.join(root, filename), 'w', encoding="ISO-8859-1") as f:
+ f.write(current_content.replace('<body>', '<body>' + html_replacement))
+ f.write(current_content.replace('</body>', last_div + '</body>'))

This is really close but still not quite right. You're adding in two
copies of current_content here. It needs to be:

f.write(current_content.replace('<body>', '<body>' + html_replacement).replace('</body>', last_div + '</body>'))

so that only one copy of current_content is written.

Cheers,

Richard


Re: [kirkstone][meta-rockchip][PATCH] wic: add e2fsprogs dependency

Trevor Woerner
 

On Thu 2022-05-12 @ 11:48:56 AM, Martin Jansa wrote:
From: Trevor Woerner <twoerner@...>

Started seeing the following error in my builds:

ERROR: A native program mkfs.ext4 required to build the image was not found
Please make sure wic-tools have e2fsprogs-native in its DEPENDS

Signed-off-by: Trevor Woerner <twoerner@...>
Ah sorry, I saw your message yesterday but was in the middle of something
else... then I forgot. Thanks for the reminder.

Done.


Re: Problems with recipe for our Rust-Software

Chanho Park
 

Hi,

I'm also facing same issue behind proxy even though I personally reverted below patch :(

https://git.yoctoproject.org/poky/commit/meta/classes/cargo_common.bbclass?h=kirkstone&id=83651eda51d65bcf479a9a8940232b712583e61f

cargo_common: remove http_proxy
Fix the test_sstate_noop_samesigs oe-selftest that
produces an error like:

core2-64-poky-linux/libstd-rs/1.54.0-r0.do_configure.sigdata differs:
basehash changed from <hash-a> to <hash-b>
Variable http_proxy value changed from '' to 'http://example.com/'

by simply removing the proxy config option. This may be added back
after merge to oe-core if needed and if the diffsigs check passes.

Best Regards,
Chanho Park

-----Original Message-----
From: yocto@... <yocto@...> On
Behalf Of Felix Knorr
Sent: Thursday, May 12, 2022 10:10 PM
To: yocto@...
Subject: [yocto] Problems with recipe for our Rust-Software

Hey,

I'm struggling with a recipe to build our rust project.

I cannot use cargo-bitbake because we use the 2021 edition. Also the
project is quite complex. We have one repository with 4 different crates,
some of them are linking c code. I'm trying to create a recipe by hand.


When I run bitbake for the recipe, it will error out with the following
error message:

ERROR: serve-1.0.0-r0 do_compile:
ExecutionError('/home/felix/git/poky/build/tmp/work/core2-64-poky-
linux/serve/1.0.0-r0/temp/run.do_compile.400923', 101, None, None)
ERROR: Logfile of failure stored in:
/home/felix/git/poky/build/tmp/work/core2-64-poky-linux/serve/1.0.0-
r0/temp/log.do_compile.400923
Log data follows:
| DEBUG: Executing shell function do_compile
| Updating crates.io index
| warning: spurious network error (2 tries remaining): failed to resolve
address for github.com: Name or service not known; class=Net (12)
| warning: spurious network error (1 tries remaining): failed to resolve
address for github.com: Name or service not known; class=Net (12)
| error: failed to get `anyhow` as a dependency of package `nlprog v0.1.0
(/home/felix/git/poky/build/tmp/work/core2-64-poky-linux/serve/1.0.0-
r0/tmp/baroloop/programmer-rust/nlprog)`
|
| Caused by:
| failed to fetch `https://github.com/rust-lang/crates.io-index
<https://protect2.fireeye.com/v1/url?k=68eaf684-3771ce79-68eb7dcb-
000babff317b-44b4b436f9e0edc0&q=1&e=3342104f-017d-4ac5-9d70-
f1208c419a68&u=https%3A%2F%2Fgithub.com%2Frust-lang%2Fcrates.io-index> `
|
| Caused by:
| network failure seems to have happened
| if a proxy or similar is necessary `net.git-fetch-with-cli` may help
here
| https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-
with-cli
|
| Caused by:
| failed to resolve address for github.com: Name or service not known;
class=Net (12)
| WARNING: exit code 101 from a shell command.
ERROR: Task (/home/felix/git/baroloop/programmer-tablet/layers/meta-
main/recipes-core/programmer/serve_1.0.0.bb:do_compile) failed with exit
code '1'


However, if I run the devshell for the recipe and run cargo, it will at
least be able to do the fetching. (It will currently fail in the linker
step, but I assume thats because I haven't executed oe_cargo_fix_env)

if I don't remove the http.multiplexing=false from the cargo config, it
will just hang forever in the devshell (but not error out).


If I set export CARGO_NET_GIT_FETCH_WITH_CLI=true the error is slightly
different, but the git call that is then displayed also works in the
devshell. Also using a crate://-fetcher doesn't work, which is why I added
the CARGO_DISABLE_BITBAKE_VENDORING = "1" I've been fighting this for
hours and can't come up with anything. I hope you can help me.

PS: I'm using kirkstone, and I'm not having any url sections in
my .gitconfig


This is the recipe:

cargo

SUMMARY = "Copy prebuild programmer serve into the image"
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""

SRC_URI="\
file://${bl_path}/programmer-ui/dist \
file://${config_path}/files/session \
file:///tmp/baroloop \
"
# crate://crates.io/tokio/1 \
# crate://crates.io/war/0.3 \
# crate://crates.io/byte/1 \
# crate://crates.io/log/0.4.8 \
# crate://crates.io/serde_json/1.0.75 \
# crate://crates.io/serde/1.0.133 \
# crate://crates.io/docopt/1.1.0 \
# crate://crates.io/colored/1.9.3 \
# crate://crates.io/chrono/0.4.11 \
# crate://crates.io/battery/0.7.7 \
# crate://crates.io/uuid/0.8.2 \
# crate://crates.io/thiserror/1.0 \
# crate://crates.io/anyhow/1 \
# crate://crates.io/clap/3.0 \
# crate://crates.io/futures/0.3 \
# crate://crates.io/wry/0.6.1
S = "${WORKDIR}"

RDEPENDS:${PN} = "\
eudev \
dbus \
"

DEPENDS = "\
eudev \
dbus \
"

# INSANE_SKIP:${PN} += "file-rdeps"

FILES:${PN} = "\
/home/neuro/serve \
/home/neuro/dist/** \
${sysconfdir}/mini_x/session \
"

CARGO_DISABLE_BITBAKE_VENDORING = "1"

do_compile() {
oe_cargo_fix_env

sed -i '/multiplexing = false/d' $CARGO_HOME/config
sed -i '/\[http\]/d' $CARGO_HOME/config
sed -i '/cainfo/d' $CARGO_HOME/config

export RUSTFLAGS="${RUSTFLAGS}"
export RUST_TARGET_PATH="${RUST_TARGET_PATH}"

export CARGO_NET_GIT_FETCH_WITH_CLI=true
cd ${S}/tmp/baroloop/programmer-rust/
cargo build --release --bin serve
}

do_install() {
# this isn_t reached anyway
# ...
}

--
Mit freundlichen Grüßen neuroloop GmbH
i.A. Felix Knorr
Senior Software Developer
--------------------------------------
neuroloop GmbH
Engesserstr. 4, 79108 Freiburg, Germany

Amtsgericht Freiburg HRB 713935

Geschäftsführer: Dr. Michael Lauk, Dr. Dennis Plachta



The information contained in this communication is confidential, may be
attorney-client privileged, may constitute inside information, and is
intended only for the use of the addressee. It is the property of the
company of the sender of this e-mail. Unauthorized use, disclosure, or
copying of this communication or any part thereof is strictly prohibited
and may be unlawful. If you have received this communication in error,
please notify us immediately by return e-mail and destroy this
communication and all copies thereof, including all attachments.


Re: Problems with recipe for our Rust-Software

Alex Kiernan
 

On Thu, May 12, 2022 at 2:09 PM Felix Knorr <fknorr@...> wrote:

Hey,

I'm struggling with a recipe to build our rust project.

I cannot use cargo-bitbake because we use the 2021 edition. Also the project is quite complex. We have one repository with 4 different crates, some of them are linking c code. I'm trying to create a recipe by hand.
The HEAD of cargo-bitbake works fine for 2021 for us.

When I run bitbake for the recipe, it will error out with the following error message:

ERROR: serve-1.0.0-r0 do_compile: ExecutionError('/home/felix/git/poky/build/tmp/work/core2-64-poky-linux/serve/1.0.0-r0/temp/run.do_compile.400923', 101, None, None)
ERROR: Logfile of failure stored in: /home/felix/git/poky/build/tmp/work/core2-64-poky-linux/serve/1.0.0-r0/temp/log.do_compile.400923
Log data follows:
| DEBUG: Executing shell function do_compile
| Updating crates.io index
| warning: spurious network error (2 tries remaining): failed to resolve address for github.com: Name or service not known; class=Net (12)
| warning: spurious network error (1 tries remaining): failed to resolve address for github.com: Name or service not known; class=Net (12)
| error: failed to get `anyhow` as a dependency of package `nlprog v0.1.0 (/home/felix/git/poky/build/tmp/work/core2-64-poky-linux/serve/1.0.0-r0/tmp/baroloop/programmer-rust/nlprog)`
|
| Caused by:
| failed to fetch `https://github.com/rust-lang/crates.io-index`
|
| Caused by:
| network failure seems to have happened
| if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
| https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
|
| Caused by:
| failed to resolve address for github.com: Name or service not known; class=Net (12)
| WARNING: exit code 101 from a shell command.
ERROR: Task (/home/felix/git/baroloop/programmer-tablet/layers/meta-main/recipes-core/programmer/serve_1.0.0.bb:do_compile) failed with exit code '1'

However, if I run the devshell for the recipe and run cargo, it will at least be able to do the fetching. (It will currently fail in the linker step, but I assume thats because I haven't executed oe_cargo_fix_env)

if I don't remove the http.multiplexing=false from the cargo config, it will just hang forever in the devshell (but not error out).

If I set export CARGO_NET_GIT_FETCH_WITH_CLI=true the error is slightly different, but the git call that is then displayed also works in the devshell. Also using a crate://-fetcher doesn't work, which is why I added the CARGO_DISABLE_BITBAKE_VENDORING = "1" I've been fighting this for hours and can't come up with anything. I hope you can help me.

PS: I'm using kirkstone, and I'm not having any url sections in my .gitconfig

This is the recipe:

cargo

SUMMARY = "Copy prebuild programmer serve into the image"
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""

SRC_URI="\
file://${bl_path}/programmer-ui/dist \
file://${config_path}/files/session \
file:///tmp/baroloop \
"
# crate://crates.io/tokio/1 \
# crate://crates.io/war/0.3 \
# crate://crates.io/byte/1 \
# crate://crates.io/log/0.4.8 \
# crate://crates.io/serde_json/1.0.75 \
# crate://crates.io/serde/1.0.133 \
# crate://crates.io/docopt/1.1.0 \
# crate://crates.io/colored/1.9.3 \
# crate://crates.io/chrono/0.4.11 \
# crate://crates.io/battery/0.7.7 \
# crate://crates.io/uuid/0.8.2 \
# crate://crates.io/thiserror/1.0 \
# crate://crates.io/anyhow/1 \
# crate://crates.io/clap/3.0 \
# crate://crates.io/futures/0.3 \
# crate://crates.io/wry/0.6.1
S = "${WORKDIR}"

RDEPENDS:${PN} = "\
eudev \
dbus \
"

DEPENDS = "\
eudev \
dbus \
"

# INSANE_SKIP:${PN} += "file-rdeps"

FILES:${PN} = "\
/home/neuro/serve \
/home/neuro/dist/** \
${sysconfdir}/mini_x/session \
"

CARGO_DISABLE_BITBAKE_VENDORING = "1"

do_compile() {
oe_cargo_fix_env

sed -i '/multiplexing = false/d' $CARGO_HOME/config
sed -i '/\[http\]/d' $CARGO_HOME/config
sed -i '/cainfo/d' $CARGO_HOME/config

export RUSTFLAGS="${RUSTFLAGS}"
export RUST_TARGET_PATH="${RUST_TARGET_PATH}"

export CARGO_NET_GIT_FETCH_WITH_CLI=true
cd ${S}/tmp/baroloop/programmer-rust/
cargo build --release --bin serve
}

do_install() {
# this isn_t reached anyway
# ...
}

--
Mit freundlichen Grüßen neuroloop GmbH
i.A. Felix Knorr
Senior Software Developer
--------------------------------------
neuroloop GmbH
Engesserstr. 4, 79108 Freiburg, Germany

Amtsgericht Freiburg HRB 713935

Geschäftsführer: Dr. Michael Lauk, Dr. Dennis Plachta



The information contained in this communication is confidential, may be attorney-client privileged, may constitute inside information, and is intended only for the use of the addressee. It is the property of the company of the sender of this e-mail. Unauthorized use, disclosure, or copying of this communication or any part thereof is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by return e-mail and destroy this communication and all copies thereof, including all attachments.




--
Alex Kiernan


Re: Problems with recipe for our Rust-Software

Felix Knorr
 

Oh I see, thanks for the info.

On 12.05.22 15:15, Alexander Kanavin wrote:
Accessing the network is not allowed from do_compile, or any other
task for that matter. You need to provide every needed item in SRC_URI
and rely on standard fetchers to form a complete source tree.

Alex

On Thu, 12 May 2022 at 15:09, Felix Knorr <fknorr@...> wrote:
Hey,

I'm struggling with a recipe to build our rust project.

I cannot use cargo-bitbake because we use the 2021 edition. Also the project is quite complex. We have one repository with 4 different crates, some of them are linking c code. I'm trying to create a recipe by hand.

When I run bitbake for the recipe, it will error out with the following error message:

ERROR: serve-1.0.0-r0 do_compile: ExecutionError('/home/felix/git/poky/build/tmp/work/core2-64-poky-linux/serve/1.0.0-r0/temp/run.do_compile.400923', 101, None, None)
ERROR: Logfile of failure stored in: /home/felix/git/poky/build/tmp/work/core2-64-poky-linux/serve/1.0.0-r0/temp/log.do_compile.400923
Log data follows:
| DEBUG: Executing shell function do_compile
| Updating crates.io index
| warning: spurious network error (2 tries remaining): failed to resolve address for github.com: Name or service not known; class=Net (12)
| warning: spurious network error (1 tries remaining): failed to resolve address for github.com: Name or service not known; class=Net (12)
| error: failed to get `anyhow` as a dependency of package `nlprog v0.1.0 (/home/felix/git/poky/build/tmp/work/core2-64-poky-linux/serve/1.0.0-r0/tmp/baroloop/programmer-rust/nlprog)`
|
| Caused by:
| failed to fetch `https://github.com/rust-lang/crates.io-index`
|
| Caused by:
| network failure seems to have happened
| if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
| https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
|
| Caused by:
| failed to resolve address for github.com: Name or service not known; class=Net (12)
| WARNING: exit code 101 from a shell command.
ERROR: Task (/home/felix/git/baroloop/programmer-tablet/layers/meta-main/recipes-core/programmer/serve_1.0.0.bb:do_compile) failed with exit code '1'

However, if I run the devshell for the recipe and run cargo, it will at least be able to do the fetching. (It will currently fail in the linker step, but I assume thats because I haven't executed oe_cargo_fix_env)

if I don't remove the http.multiplexing=false from the cargo config, it will just hang forever in the devshell (but not error out).

If I set export CARGO_NET_GIT_FETCH_WITH_CLI=true the error is slightly different, but the git call that is then displayed also works in the devshell. Also using a crate://-fetcher doesn't work, which is why I added the CARGO_DISABLE_BITBAKE_VENDORING = "1" I've been fighting this for hours and can't come up with anything. I hope you can help me.

PS: I'm using kirkstone, and I'm not having any url sections in my .gitconfig

This is the recipe:

cargo

SUMMARY = "Copy prebuild programmer serve into the image"
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""

SRC_URI="\
file://${bl_path}/programmer-ui/dist \
file://${config_path}/files/session \
file:///tmp/baroloop \
"
# crate://crates.io/tokio/1 \
# crate://crates.io/war/0.3 \
# crate://crates.io/byte/1 \
# crate://crates.io/log/0.4.8 \
# crate://crates.io/serde_json/1.0.75 \
# crate://crates.io/serde/1.0.133 \
# crate://crates.io/docopt/1.1.0 \
# crate://crates.io/colored/1.9.3 \
# crate://crates.io/chrono/0.4.11 \
# crate://crates.io/battery/0.7.7 \
# crate://crates.io/uuid/0.8.2 \
# crate://crates.io/thiserror/1.0 \
# crate://crates.io/anyhow/1 \
# crate://crates.io/clap/3.0 \
# crate://crates.io/futures/0.3 \
# crate://crates.io/wry/0.6.1
S = "${WORKDIR}"

RDEPENDS:${PN} = "\
eudev \
dbus \
"

DEPENDS = "\
eudev \
dbus \
"

# INSANE_SKIP:${PN} += "file-rdeps"

FILES:${PN} = "\
/home/neuro/serve \
/home/neuro/dist/** \
${sysconfdir}/mini_x/session \
"

CARGO_DISABLE_BITBAKE_VENDORING = "1"

do_compile() {
oe_cargo_fix_env

sed -i '/multiplexing = false/d' $CARGO_HOME/config
sed -i '/\[http\]/d' $CARGO_HOME/config
sed -i '/cainfo/d' $CARGO_HOME/config

export RUSTFLAGS="${RUSTFLAGS}"
export RUST_TARGET_PATH="${RUST_TARGET_PATH}"

export CARGO_NET_GIT_FETCH_WITH_CLI=true
cd ${S}/tmp/baroloop/programmer-rust/
cargo build --release --bin serve
}

do_install() {
# this isn_t reached anyway
# ...
}

--
Mit freundlichen Grüßen neuroloop GmbH
i.A. Felix Knorr
Senior Software Developer
--------------------------------------
neuroloop GmbH
Engesserstr. 4, 79108 Freiburg, Germany

Amtsgericht Freiburg HRB 713935

Geschäftsführer: Dr. Michael Lauk, Dr. Dennis Plachta



The information contained in this communication is confidential, may be attorney-client privileged, may constitute inside information, and is intended only for the use of the addressee. It is the property of the company of the sender of this e-mail. Unauthorized use, disclosure, or copying of this communication or any part thereof is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by return e-mail and destroy this communication and all copies thereof, including all attachments.



--
Mit freundlichen Grüßen neuroloop GmbH
i.A. Felix Knorr
Senior Software Developer
--------------------------------------
neuroloop GmbH
Engesserstr. 4, 79108 Freiburg, Germany

Amtsgericht Freiburg HRB 713935

Geschäftsführer: Dr. Michael Lauk, Dr. Dennis Plachta



The information contained in this communication is confidential, may be attorney-client privileged, may constitute inside information, and is intended only for the use of the addressee. It is the property of the company of the sender of this e-mail. Unauthorized use, disclosure, or copying of this communication or any part thereof is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by return e-mail and destroy this communication and all copies thereof, including all attachments.


Re: Problems with recipe for our Rust-Software

Alexander Kanavin
 

Accessing the network is not allowed from do_compile, or any other
task for that matter. You need to provide every needed item in SRC_URI
and rely on standard fetchers to form a complete source tree.

Alex

On Thu, 12 May 2022 at 15:09, Felix Knorr <fknorr@...> wrote:

Hey,

I'm struggling with a recipe to build our rust project.

I cannot use cargo-bitbake because we use the 2021 edition. Also the project is quite complex. We have one repository with 4 different crates, some of them are linking c code. I'm trying to create a recipe by hand.

When I run bitbake for the recipe, it will error out with the following error message:

ERROR: serve-1.0.0-r0 do_compile: ExecutionError('/home/felix/git/poky/build/tmp/work/core2-64-poky-linux/serve/1.0.0-r0/temp/run.do_compile.400923', 101, None, None)
ERROR: Logfile of failure stored in: /home/felix/git/poky/build/tmp/work/core2-64-poky-linux/serve/1.0.0-r0/temp/log.do_compile.400923
Log data follows:
| DEBUG: Executing shell function do_compile
| Updating crates.io index
| warning: spurious network error (2 tries remaining): failed to resolve address for github.com: Name or service not known; class=Net (12)
| warning: spurious network error (1 tries remaining): failed to resolve address for github.com: Name or service not known; class=Net (12)
| error: failed to get `anyhow` as a dependency of package `nlprog v0.1.0 (/home/felix/git/poky/build/tmp/work/core2-64-poky-linux/serve/1.0.0-r0/tmp/baroloop/programmer-rust/nlprog)`
|
| Caused by:
| failed to fetch `https://github.com/rust-lang/crates.io-index`
|
| Caused by:
| network failure seems to have happened
| if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
| https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
|
| Caused by:
| failed to resolve address for github.com: Name or service not known; class=Net (12)
| WARNING: exit code 101 from a shell command.
ERROR: Task (/home/felix/git/baroloop/programmer-tablet/layers/meta-main/recipes-core/programmer/serve_1.0.0.bb:do_compile) failed with exit code '1'

However, if I run the devshell for the recipe and run cargo, it will at least be able to do the fetching. (It will currently fail in the linker step, but I assume thats because I haven't executed oe_cargo_fix_env)

if I don't remove the http.multiplexing=false from the cargo config, it will just hang forever in the devshell (but not error out).

If I set export CARGO_NET_GIT_FETCH_WITH_CLI=true the error is slightly different, but the git call that is then displayed also works in the devshell. Also using a crate://-fetcher doesn't work, which is why I added the CARGO_DISABLE_BITBAKE_VENDORING = "1" I've been fighting this for hours and can't come up with anything. I hope you can help me.

PS: I'm using kirkstone, and I'm not having any url sections in my .gitconfig

This is the recipe:

cargo

SUMMARY = "Copy prebuild programmer serve into the image"
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""

SRC_URI="\
file://${bl_path}/programmer-ui/dist \
file://${config_path}/files/session \
file:///tmp/baroloop \
"
# crate://crates.io/tokio/1 \
# crate://crates.io/war/0.3 \
# crate://crates.io/byte/1 \
# crate://crates.io/log/0.4.8 \
# crate://crates.io/serde_json/1.0.75 \
# crate://crates.io/serde/1.0.133 \
# crate://crates.io/docopt/1.1.0 \
# crate://crates.io/colored/1.9.3 \
# crate://crates.io/chrono/0.4.11 \
# crate://crates.io/battery/0.7.7 \
# crate://crates.io/uuid/0.8.2 \
# crate://crates.io/thiserror/1.0 \
# crate://crates.io/anyhow/1 \
# crate://crates.io/clap/3.0 \
# crate://crates.io/futures/0.3 \
# crate://crates.io/wry/0.6.1
S = "${WORKDIR}"

RDEPENDS:${PN} = "\
eudev \
dbus \
"

DEPENDS = "\
eudev \
dbus \
"

# INSANE_SKIP:${PN} += "file-rdeps"

FILES:${PN} = "\
/home/neuro/serve \
/home/neuro/dist/** \
${sysconfdir}/mini_x/session \
"

CARGO_DISABLE_BITBAKE_VENDORING = "1"

do_compile() {
oe_cargo_fix_env

sed -i '/multiplexing = false/d' $CARGO_HOME/config
sed -i '/\[http\]/d' $CARGO_HOME/config
sed -i '/cainfo/d' $CARGO_HOME/config

export RUSTFLAGS="${RUSTFLAGS}"
export RUST_TARGET_PATH="${RUST_TARGET_PATH}"

export CARGO_NET_GIT_FETCH_WITH_CLI=true
cd ${S}/tmp/baroloop/programmer-rust/
cargo build --release --bin serve
}

do_install() {
# this isn_t reached anyway
# ...
}

--
Mit freundlichen Grüßen neuroloop GmbH
i.A. Felix Knorr
Senior Software Developer
--------------------------------------
neuroloop GmbH
Engesserstr. 4, 79108 Freiburg, Germany

Amtsgericht Freiburg HRB 713935

Geschäftsführer: Dr. Michael Lauk, Dr. Dennis Plachta



The information contained in this communication is confidential, may be attorney-client privileged, may constitute inside information, and is intended only for the use of the addressee. It is the property of the company of the sender of this e-mail. Unauthorized use, disclosure, or copying of this communication or any part thereof is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by return e-mail and destroy this communication and all copies thereof, including all attachments.




Re: [PATCH yocto-autobuilder-helper v16] Add a banner on the old documentation docs.

Abongwa Amahnui Bonalais
 

On Thu, May 12, 2022 at 01:42 PM, Quentin Schulz wrote:

On 5/12/22 14:33, Abongwa Amahnui Bonalais wrote:
Script to add banners to the old docs and outdated dunfell docs
Signed-off-by: Abongwa Bonalais Amahnui <abongwabonalais@...>
Reviewed-by: Quentin Schulz <foss+yocto@...>

Thanks for the patch and your patience, this is an important piece that was missing, so thank you for taking the time to do it.

Now, other reviewers can still say that there are other changes to do.

If after a few weeks you still don't see your patch being merged in https://git.yoctoproject.org/yocto-autobuilder-helper, you can send a mail here telling us to have a look at it again, but that is usually unnecessary since merging is happening rather fast in this open-source project.

Cheers,
Quentin
Hi Quentin,
Thank you very much too, I really appreciate your help through out this proccess, I will do as you've said.


Problems with recipe for our Rust-Software

Felix Knorr
 

Hey,

I'm struggling with a recipe to build our rust project.

I cannot use cargo-bitbake because we use the 2021 edition. Also the project is quite complex. We have one repository with 4 different crates, some of them are linking c code. I'm trying to create a recipe by hand.

When I run bitbake for the recipe, it will error out with the following error message:

ERROR: serve-1.0.0-r0 do_compile: ExecutionError('/home/felix/git/poky/build/tmp/work/core2-64-poky-linux/serve/1.0.0-r0/temp/run.do_compile.400923', 101, None, None)
ERROR: Logfile of failure stored in: /home/felix/git/poky/build/tmp/work/core2-64-poky-linux/serve/1.0.0-r0/temp/log.do_compile.400923
Log data follows:
| DEBUG: Executing shell function do_compile
|     Updating crates.io index
| warning: spurious network error (2 tries remaining): failed to resolve address for github.com: Name or service not known; class=Net (12)
| warning: spurious network error (1 tries remaining): failed to resolve address for github.com: Name or service not known; class=Net (12)
| error: failed to get `anyhow` as a dependency of package `nlprog v0.1.0 (/home/felix/git/poky/build/tmp/work/core2-64-poky-linux/serve/1.0.0-r0/tmp/baroloop/programmer-rust/nlprog)`
| 
| Caused by:
|   failed to fetch `https://github.com/rust-lang/crates.io-index`
| 
| Caused by:
|   network failure seems to have happened
|   if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
|   https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
| 
| Caused by:
|   failed to resolve address for github.com: Name or service not known; class=Net (12)
| WARNING: exit code 101 from a shell command.
ERROR: Task (/home/felix/git/baroloop/programmer-tablet/layers/meta-main/recipes-core/programmer/serve_1.0.0.bb:do_compile) failed with exit code '1'

However, if I run the devshell for the recipe and run cargo, it will at least be able to do the fetching. (It will currently fail in the linker step, but I assume thats because I haven't executed oe_cargo_fix_env)

if I don't remove the http.multiplexing=false from the cargo config, it will just hang forever in the devshell (but not error out).

If I set export CARGO_NET_GIT_FETCH_WITH_CLI=true the error is slightly different, but the git call that is then displayed also works in the devshell. Also using a crate://-fetcher doesn't work, which is why I added the CARGO_DISABLE_BITBAKE_VENDORING = "1" I've been fighting this for hours and can't come up with anything. I hope you can help me.

PS: I'm using kirkstone, and I'm not having any url sections in my .gitconfig

This is the recipe:

cargo

SUMMARY = "Copy prebuild programmer serve into the image"
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""

SRC_URI="\
    file://${bl_path}/programmer-ui/dist \
    file://${config_path}/files/session \
    file:///tmp/baroloop \
"
#   crate://crates.io/tokio/1 \
#   crate://crates.io/war/0.3 \
#   crate://crates.io/byte/1 \
#   crate://crates.io/log/0.4.8 \
#   crate://crates.io/serde_json/1.0.75 \
#   crate://crates.io/serde/1.0.133 \
#   crate://crates.io/docopt/1.1.0 \
#   crate://crates.io/colored/1.9.3 \
#   crate://crates.io/chrono/0.4.11 \
#   crate://crates.io/battery/0.7.7 \
#   crate://crates.io/uuid/0.8.2 \
#   crate://crates.io/thiserror/1.0 \
#   crate://crates.io/anyhow/1 \
#   crate://crates.io/clap/3.0 \
#   crate://crates.io/futures/0.3 \
#   crate://crates.io/wry/0.6.1 
S = "${WORKDIR}"

RDEPENDS:${PN} = "\
    eudev \
    dbus \
"

DEPENDS = "\
    eudev \
    dbus \
"

# INSANE_SKIP:${PN} += "file-rdeps"

FILES:${PN} = "\
    /home/neuro/serve \
    /home/neuro/dist/** \
    ${sysconfdir}/mini_x/session \
"

CARGO_DISABLE_BITBAKE_VENDORING = "1"

do_compile() {
    oe_cargo_fix_env

    sed -i '/multiplexing = false/d' $CARGO_HOME/config
    sed -i '/\[http\]/d' $CARGO_HOME/config
    sed -i '/cainfo/d' $CARGO_HOME/config
	
    export RUSTFLAGS="${RUSTFLAGS}"
    export RUST_TARGET_PATH="${RUST_TARGET_PATH}"

    export CARGO_NET_GIT_FETCH_WITH_CLI=true
    cd ${S}/tmp/baroloop/programmer-rust/
    cargo build --release --bin serve
}

do_install() {
    # this isn_t reached anyway
	# ...
}

-- 
Mit freundlichen Grüßen neuroloop GmbH
i.A. Felix Knorr
Senior Software Developer
--------------------------------------
neuroloop GmbH
Engesserstr. 4, 79108 Freiburg, Germany

Amtsgericht Freiburg HRB 713935

Geschäftsführer: Dr. Michael Lauk, Dr. Dennis Plachta

 

The information contained in this communication is confidential, may be attorney-client privileged, may constitute inside information, and is intended only for the use of the addressee. It is the property of the company of the sender of this e-mail. Unauthorized use, disclosure, or copying of this communication or any part thereof is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by return e-mail and destroy this communication and all copies thereof, including all attachments.	


[PATCH yocto-autobuilder-helper] scripts: run-docs-build: do not extract eclipse directories from old docs

Quentin Schulz
 

From: Quentin Schulz <quentin.schulz@...>

For some reason, the old docs tarball includes many eclipse
subdirectories which are just cluttering the docs website up.

Therefore, let's just not extract eclipse directories from the tarball.

Cc: Quentin Schulz <foss+yocto@...>
Signed-off-by: Quentin Schulz <quentin.schulz@...>
---
scripts/run-docs-build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index f6b8ac4..b912ee9 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -35,7 +35,7 @@ docbookarchive=${docbookarchive:-/srv/autobuilder/autobuilder.yocto.io/pub/docbo
mkdir $outputdir
cd $outputdir
echo Extracing old content from archive
-tar -xJf $docbookarchive
+tar --exclude=eclipse -xJf $docbookarchive

cd $bbdocs
mkdir $outputdir/bitbake
--
2.35.3


Re: [PATCH yocto-autobuilder-helper v16] Add a banner on the old documentation docs.

Quentin Schulz
 

Hi Amahnui,

On 5/12/22 14:33, Abongwa Amahnui Bonalais wrote:
Script to add banners to the old docs and outdated dunfell docs
Signed-off-by: Abongwa Bonalais Amahnui <abongwabonalais@...>
Reviewed-by: Quentin Schulz <foss+yocto@...>

Thanks for the patch and your patience, this is an important piece that was missing, so thank you for taking the time to do it.

Now, other reviewers can still say that there are other changes to do.

If after a few weeks you still don't see your patch being merged in https://git.yoctoproject.org/yocto-autobuilder-helper, you can send a mail here telling us to have a look at it again, but that is usually unnecessary since merging is happening rather fast in this open-source project.

Cheers,
Quentin


[PATCH yocto-autobuilder-helper v16] Add a banner on the old documentation docs.

Abongwa Amahnui Bonalais
 

Script to add banners to the old docs and outdated dunfell docs

Signed-off-by: Abongwa Bonalais Amahnui <abongwabonalais@...>
---
scripts/docs_add_banner.py | 84 ++++++++++++++++++++++++++++++++++++++
scripts/run-docs-build | 2 +
2 files changed, 86 insertions(+)
create mode 100755 scripts/docs_add_banner.py

diff --git a/scripts/docs_add_banner.py b/scripts/docs_add_banner.py
new file mode 100755
index 0000000..0de70d0
--- /dev/null
+++ b/scripts/docs_add_banner.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python3
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+#Signed-off-by: Abongwa Bonalais Amahnui <abongwabonalais@...>
+#
+#
+# Script to add banners to the old docs and outdated dunfell docs
+#
+#
+
+
+import os
+
+
+
+
+
+html_content_dunfell = '''
+<div id="outdated-warning">This document is outdated, you should select the <a href="https://docs.yoctoproject.org/dunfell">latest release version</a> in this series.</div>
+<div xml:lang="en" class="body" lang="en">
+'''
+html_content = '''
+<div id="outdated-warning">This version of the project is now considered obsolete, please select and use a <a href="https://docs.yoctoproject.org">more recent version</a>.</div>
+<div xml:lang="en" class="body" lang="en">
+'''
+
+# the class body and the last_div are used to make sure any .body property existing in any css file is not overwritten
+last_div = '''
+</div>
+
+'''
+
+css_replacement_content = '''
+
+ font-family: Verdana, Sans, sans-serif;
+
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ color: #333;
+ overflow-x: hidden;
+ }
+
+.body{
+margin: 0 auto;
+min-width: 640px;
+padding: 0 5em 5em 5em;
+}
+#outdated-warning{
+text-align: center;
+background-color: rgb(255, 186, 186);
+color: rgb(106, 14, 14);
+padding: 0.5em 0;
+width: 100%;
+position: fixed;
+top: 0;
+
+
+'''
+
+
+def add_banner_old_docs(dir):
+ for root, dirs, filenames in os.walk(dir):
+
+ if root.startswith('./3.1'):
+ html_replacement = html_content_dunfell
+ else:
+ html_replacement = html_content
+
+ for filename in filenames:
+ if filename.endswith('.html'):
+ with open(os.path.join(root, filename), 'r', encoding="ISO-8859-1") as f:
+ current_content = f.read()
+ with open(os.path.join(root, filename), 'w', encoding="ISO-8859-1") as f:
+ f.write(current_content.replace('<body>', '<body>' + html_replacement))
+ f.write(current_content.replace('</body>', last_div + '</body>'))
+ if filename.endswith('.css'):
+ with open(os.path.join(root, filename), 'r', encoding="ISO-8859-1") as f:
+ css_content = f.read()
+ with open(os.path.join(root, filename), 'w', encoding="ISO-8859-1") as f:
+ f.write(css_content.replace(css_content[css_content.find('body {'):css_content.find('}'[0])], 'body {' + css_replacement_content ))
+
+add_banner_old_docs('.')
diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index ecc5332..dce8f1f 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -37,6 +37,8 @@ cd $outputdir
echo Extracing old content from archive
tar -xJf $docbookarchive

+$scriptdir/docs_add_banner.py
+
cd $bbdocs
mkdir $outputdir/bitbake

--
2.25.1


Re: [PATCH yocto-autobuilder-helper v15] Add a banner on the old documentation docs.

Quentin Schulz
 

Hi Amahnui,

On 5/12/22 13:45, Abongwa Amahnui Bonalais wrote:
Script to add banners to the old docs and outdated dunfell docs
Signed-off-by: Abongwa Bonalais Amahnui <abongwabonalais@...>
---
scripts/docs_add_banner.py | 84 ++++++++++++++++++++++++++++++++++++++
scripts/run-docs-build | 6 ++-
2 files changed, 88 insertions(+), 2 deletions(-)
create mode 100755 scripts/docs_add_banner.py
diff --git a/scripts/docs_add_banner.py b/scripts/docs_add_banner.py
new file mode 100755
index 0000000..0de70d0
--- /dev/null
+++ b/scripts/docs_add_banner.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python3
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+#Signed-off-by: Abongwa Bonalais Amahnui <abongwabonalais@...>
+#
+#
+# Script to add banners to the old docs and outdated dunfell docs
+#
+#
+
+
+import os
+
+
+
+
+
+html_content_dunfell = '''
+<div id="outdated-warning">This document is outdated, you should select the <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.yoctoproject.org_dunfell&;d=DwMDAg&amp;c=_sEr5x9kUWhuk4_nFwjJtA&amp;r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&amp;m=ECrUveRFbGF5T0Oqpl6f2-OWDNw3UBPMihRbRBPAEgKjNmvQtQBNtL5WF4JzoA3Z&amp;s=mqGqi5kMdquK3v6sCE3zHkCmW172k8NU3sMlC8mnRyQ&amp;e=">latest release version</a> in this series.</div>
+<div xml:lang="en" class="body" lang="en">
+'''
+html_content = '''
+<div id="outdated-warning">This version of the project is now considered obsolete, please select and use a <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.yoctoproject.org&;d=DwMDAg&amp;c=_sEr5x9kUWhuk4_nFwjJtA&amp;r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&amp;m=ECrUveRFbGF5T0Oqpl6f2-OWDNw3UBPMihRbRBPAEgKjNmvQtQBNtL5WF4JzoA3Z&amp;s=7aPHgsTb1x0FA1MPDujXji0P-X6YAQjBTIqsLrDhy38&amp;e=">more recent version</a>.</div>
+<div xml:lang="en" class="body" lang="en">
+'''
+
+# the class body and the last_div are used to make sure any .body property existing in any css file is not overwritten
+last_div = '''
+</div>
+
+'''
+
+css_replacement_content = '''
+
+ font-family: Verdana, Sans, sans-serif;
+
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ color: #333;
+ overflow-x: hidden;
+ }
+
+.body{
+margin: 0 auto;
+min-width: 640px;
+padding: 0 5em 5em 5em;
+}
+#outdated-warning{
+text-align: center;
+background-color: rgb(255, 186, 186);
+color: rgb(106, 14, 14);
+padding: 0.5em 0;
+width: 100%;
+position: fixed;
+top: 0;
+
+
+'''
+
+
+def add_banner_old_docs(dir):
+ for root, dirs, filenames in os.walk(dir):
+
+ if root.startswith('./3.1'):
+ html_replacement = html_content_dunfell
+ else:
+ html_replacement = html_content
+
+ for filename in filenames:
+ if filename.endswith('.html'):
+ with open(os.path.join(root, filename), 'r', encoding="ISO-8859-1") as f:
+ current_content = f.read()
+ with open(os.path.join(root, filename), 'w', encoding="ISO-8859-1") as f:
+ f.write(current_content.replace('<body>', '<body>' + html_replacement))
+ f.write(current_content.replace('</body>', last_div + '</body>'))
+ if filename.endswith('.css'):
+ with open(os.path.join(root, filename), 'r', encoding="ISO-8859-1") as f:
+ css_content = f.read()
+ with open(os.path.join(root, filename), 'w', encoding="ISO-8859-1") as f:
+ f.write(css_content.replace(css_content[css_content.find('body {'):css_content.find('}'[0])], 'body {' + css_replacement_content ))
+
+add_banner_old_docs('.')
diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index ecc5332..afff62f 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -18,7 +18,7 @@ set -x
builddir=$(realpath "$1")
ypdocs=$(realpath "$2/documentation/")
bbdocs=$(realpath "$3/doc/")
-docs_buildtools=${docs_buildtools:-/srv/autobuilder/autobuilder.yocto.io/pub/buildtools/x86_64-buildtools-docs-nativesdk-standalone-3.2+snapshot-20201105.sh}
+docs_buildtools=${docs_buildtools:-'/home/abongwa/Downloads/x86_64-buildtools-docs-nativesdk-standalone-4.0.sh'}
This line exists so you don't have to change the path in there.

outputdir=$builddir/output
scriptdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
PUBLISH=${PUBLISH:-1}
@@ -31,12 +31,14 @@ $docs_buildtools -y -d $builddir/buildtools
# Getting the old docbook built docs from an archive. Not rebuilding them.
#wget https://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-archives-20201105.tar.xz
-docbookarchive=${docbookarchive:-/srv/autobuilder/autobuilder.yocto.io/pub/docbook-mirror/docbook-archives-20201105.tar.xz}
+docbookarchive=${docbookarchive:-'/home/abongwa/Downloads/docbook-archives-20201105.tar.xz'}
This line exists so you don't have to change the path in there.

You should be able to start the run-docs-build script as follows:

docs_buildtools=/home/abongwa/Downloads/x86_64-buildtools-docs-nativesdk-standalone-4.0.sh docbookarchive=/home/abongwa/Downloads/docbook-archives-20201105.tar.xz ./run-docs-build

without the need to modify the two lines above like you did.

Otherwise, tested and looks good. So please send a v16 with this fixed.

Thanks!

Quentin


[PATCH yocto-autobuilder-helper v15] Add a banner on the old documentation docs.

Abongwa Amahnui Bonalais
 

Script to add banners to the old docs and outdated dunfell docs

Signed-off-by: Abongwa Bonalais Amahnui <abongwabonalais@...>
---
scripts/docs_add_banner.py | 84 ++++++++++++++++++++++++++++++++++++++
scripts/run-docs-build | 6 ++-
2 files changed, 88 insertions(+), 2 deletions(-)
create mode 100755 scripts/docs_add_banner.py

diff --git a/scripts/docs_add_banner.py b/scripts/docs_add_banner.py
new file mode 100755
index 0000000..0de70d0
--- /dev/null
+++ b/scripts/docs_add_banner.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python3
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+#Signed-off-by: Abongwa Bonalais Amahnui <abongwabonalais@...>
+#
+#
+# Script to add banners to the old docs and outdated dunfell docs
+#
+#
+
+
+import os
+
+
+
+
+
+html_content_dunfell = '''
+<div id="outdated-warning">This document is outdated, you should select the <a href="https://docs.yoctoproject.org/dunfell">latest release version</a> in this series.</div>
+<div xml:lang="en" class="body" lang="en">
+'''
+html_content = '''
+<div id="outdated-warning">This version of the project is now considered obsolete, please select and use a <a href="https://docs.yoctoproject.org">more recent version</a>.</div>
+<div xml:lang="en" class="body" lang="en">
+'''
+
+# the class body and the last_div are used to make sure any .body property existing in any css file is not overwritten
+last_div = '''
+</div>
+
+'''
+
+css_replacement_content = '''
+
+ font-family: Verdana, Sans, sans-serif;
+
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ color: #333;
+ overflow-x: hidden;
+ }
+
+.body{
+margin: 0 auto;
+min-width: 640px;
+padding: 0 5em 5em 5em;
+}
+#outdated-warning{
+text-align: center;
+background-color: rgb(255, 186, 186);
+color: rgb(106, 14, 14);
+padding: 0.5em 0;
+width: 100%;
+position: fixed;
+top: 0;
+
+
+'''
+
+
+def add_banner_old_docs(dir):
+ for root, dirs, filenames in os.walk(dir):
+
+ if root.startswith('./3.1'):
+ html_replacement = html_content_dunfell
+ else:
+ html_replacement = html_content
+
+ for filename in filenames:
+ if filename.endswith('.html'):
+ with open(os.path.join(root, filename), 'r', encoding="ISO-8859-1") as f:
+ current_content = f.read()
+ with open(os.path.join(root, filename), 'w', encoding="ISO-8859-1") as f:
+ f.write(current_content.replace('<body>', '<body>' + html_replacement))
+ f.write(current_content.replace('</body>', last_div + '</body>'))
+ if filename.endswith('.css'):
+ with open(os.path.join(root, filename), 'r', encoding="ISO-8859-1") as f:
+ css_content = f.read()
+ with open(os.path.join(root, filename), 'w', encoding="ISO-8859-1") as f:
+ f.write(css_content.replace(css_content[css_content.find('body {'):css_content.find('}'[0])], 'body {' + css_replacement_content ))
+
+add_banner_old_docs('.')
diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index ecc5332..afff62f 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -18,7 +18,7 @@ set -x
builddir=$(realpath "$1")
ypdocs=$(realpath "$2/documentation/")
bbdocs=$(realpath "$3/doc/")
-docs_buildtools=${docs_buildtools:-/srv/autobuilder/autobuilder.yocto.io/pub/buildtools/x86_64-buildtools-docs-nativesdk-standalone-3.2+snapshot-20201105.sh}
+docs_buildtools=${docs_buildtools:-'/home/abongwa/Downloads/x86_64-buildtools-docs-nativesdk-standalone-4.0.sh'}
outputdir=$builddir/output
scriptdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
PUBLISH=${PUBLISH:-1}
@@ -31,12 +31,14 @@ $docs_buildtools -y -d $builddir/buildtools

# Getting the old docbook built docs from an archive. Not rebuilding them.
#wget https://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-archives-20201105.tar.xz
-docbookarchive=${docbookarchive:-/srv/autobuilder/autobuilder.yocto.io/pub/docbook-mirror/docbook-archives-20201105.tar.xz}
+docbookarchive=${docbookarchive:-'/home/abongwa/Downloads/docbook-archives-20201105.tar.xz'}
mkdir $outputdir
cd $outputdir
echo Extracing old content from archive
tar -xJf $docbookarchive

+$scriptdir/docs_add_banner.py
+
cd $bbdocs
mkdir $outputdir/bitbake

--
2.25.1


Re: [PATCH yocto-autobuilder-helper v14] Add a banner on the old documentation docs.

Abongwa Amahnui Bonalais
 

On Thu, May 12, 2022 at 09:23 AM, Quentin Schulz wrote:
Not quite happy with this comment as I still don't understand why this was needed.

What is the issue with "any .body property existing in any css file [being] overwritten"?

I am not going to fight it too much as we really need this banner and the files it applies to won't change over time, so it shouldn't actually be a maintenance burden. This obviously is a maintainer choice so I'll let people with veto power decide on this :)

Hi Quentin,

Thanks for reviewing, 
There are some html files whose main div wrapping all it's content are having different class names, So I created my own class name wrapping everything to overide the current class so it's properties can be accurately called from the css files.
The reason I decided to do this is because I think in order for the banner to remain at the top, everything below it has to be given a property that shifts it downwards so as to prevent overlapping of the body content with the banner, including the logo.
That is my line of thinking here.
Thank You


[kirkstone][meta-rockchip][PATCH] wic: add e2fsprogs dependency

Martin Jansa
 

From: Trevor Woerner <twoerner@...>

Started seeing the following error in my builds:

ERROR: A native program mkfs.ext4 required to build the image was not found
Please make sure wic-tools have e2fsprogs-native in its DEPENDS

Signed-off-by: Trevor Woerner <twoerner@...>
---
conf/machine/include/rockchip-wic.inc | 1 +
1 file changed, 1 insertion(+)

diff --git a/conf/machine/include/rockchip-wic.inc b/conf/machine/include/rockchip-wic.inc
index 30b0d57..6fa5367 100644
--- a/conf/machine/include/rockchip-wic.inc
+++ b/conf/machine/include/rockchip-wic.inc
@@ -7,6 +7,7 @@ WKS_FILE = "rockchip.wks"
WKS_FILE_DEPENDS ?= " \
mtools-native \
dosfstools-native \
+ e2fsprogs-native \
virtual/bootloader \
virtual/kernel \
"
--
2.35.1


kernel bbappend files failed to triggler build updated in kirkstone branch, could be bugs?

JH
 

Hi,

I have a kernel bbappend file which can update patch files but cannot
not update a defconfig file when the files are changed.

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI:append = "file://0001_wifi.patch \
file://0001-kernel-mtd.patch \
file://defconfig \
"

All files are in files directory, if I change a patch file, it can
trigger the build, but if I change the defconfig file, it could not
trigger the new build. Is it a bug in the kirkstone branch?

Thank you.

Kind regards,

jupiter


are there any plans for meta-riscv support for StarFive VisionFive?

Robert P. J. Day
 


Re: [PATCH yocto-autobuilder-helper v14] Add a banner on the old documentation docs.

Quentin Schulz
 

Hi Amahnui,

On 5/11/22 18:20, Abongwa Amahnui Bonalais wrote:
Signed-off-by: Abongwa Bonalais Amahnui <abongwabonalais@...>
---
scripts/docs_add_banner.py | 84 ++++++++++++++++++++++++++++++++++++++
scripts/run-docs-build | 2 +
2 files changed, 86 insertions(+)
create mode 100644 scripts/docs_add_banner.py
diff --git a/scripts/docs_add_banner.py b/scripts/docs_add_banner.py
new file mode 100644
index 0000000..0de70d0
--- /dev/null
+++ b/scripts/docs_add_banner.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python3
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+#Signed-off-by: Abongwa Bonalais Amahnui <abongwabonalais@...>
+#
+#
+# Script to add banners to the old docs and outdated dunfell docs
+#
+#
+
+
+import os
+
+
+
+
+
+html_content_dunfell = '''
+<div id="outdated-warning">This document is outdated, you should select the <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.yoctoproject.org_dunfell&;d=DwMDAg&amp;c=_sEr5x9kUWhuk4_nFwjJtA&amp;r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&amp;m=xspfpkyH63qFQQQp96oYOYMRmeCb2qN8EPL-Mg_2xWO8ezjLW-hM6CpF7qLR7kG_&amp;s=UBdsIAcJa2McGNBMMmKe6MhoYlnfQZ1-jHZeTYFTK3E&amp;e=">latest release version</a> in this series.</div>
+<div xml:lang="en" class="body" lang="en">
+'''
+html_content = '''
+<div id="outdated-warning">This version of the project is now considered obsolete, please select and use a <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.yoctoproject.org&;d=DwMDAg&amp;c=_sEr5x9kUWhuk4_nFwjJtA&amp;r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&amp;m=xspfpkyH63qFQQQp96oYOYMRmeCb2qN8EPL-Mg_2xWO8ezjLW-hM6CpF7qLR7kG_&amp;s=beF_7R_KmlzLYmX333Fp0Gh2TY6lEFqk2Pg08I9XwOY&amp;e=">more recent version</a>.</div>
+<div xml:lang="en" class="body" lang="en">
+'''
+
+# the class body and the last_div are used to make sure any .body property existing in any css file is not overwritten
Not quite happy with this comment as I still don't understand why this was needed.

What is the issue with "any .body property existing in any css file [being] overwritten"?

I am not going to fight it too much as we really need this banner and the files it applies to won't change over time, so it shouldn't actually be a maintenance burden. This obviously is a maintainer choice so I'll let people with veto power decide on this :)

+last_div = '''
+</div>
+
+'''
+
+css_replacement_content = '''
+
+ font-family: Verdana, Sans, sans-serif;
+
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ color: #333;
+ overflow-x: hidden;
+ }
+
+.body{
+margin: 0 auto;
+min-width: 640px;
+padding: 0 5em 5em 5em;
+}
+#outdated-warning{
+text-align: center;
+background-color: rgb(255, 186, 186);
+color: rgb(106, 14, 14);
+padding: 0.5em 0;
+width: 100%;
+position: fixed;
+top: 0;
+
+
+'''
+
+
+def add_banner_old_docs(dir):
+ for root, dirs, filenames in os.walk(dir):
+
+ if root.startswith('./3.1'):
+ html_replacement = html_content_dunfell
+ else:
+ html_replacement = html_content
+
+ for filename in filenames:
+ if filename.endswith('.html'):
+ with open(os.path.join(root, filename), 'r', encoding="ISO-8859-1") as f:
+ current_content = f.read()
+ with open(os.path.join(root, filename), 'w', encoding="ISO-8859-1") as f:
+ f.write(current_content.replace('<body>', '<body>' + html_replacement))
+ f.write(current_content.replace('</body>', last_div + '</body>'))
+ if filename.endswith('.css'):
+ with open(os.path.join(root, filename), 'r', encoding="ISO-8859-1") as f:
+ css_content = f.read()
+ with open(os.path.join(root, filename), 'w', encoding="ISO-8859-1") as f:
+ f.write(css_content.replace(css_content[css_content.find('body {'):css_content.find('}'[0])], 'body {' + css_replacement_content ))
+
+add_banner_old_docs('.')
diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index ecc5332..307ac19 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -37,6 +37,8 @@ cd $outputdir
echo Extracing old content from archive
tar -xJf $docbookarchive
+$scriptdir/docs_fix_all_html_css.py
This is not the name of the script you just added above. Please run the code with the patches before you send them :)

Once this gets a v15, I think it's in a good enough shape to validate it actually works as expected and then merge this.

Almost there Amahnui :)

Cheers,
Quentin


[meta-selinux][PATCH] selinux-python: add RDEPENDES on python3-multiprocessing

Yi Zhao
 

Add RDEPENDS on python3-multiprocessing for selinux-python-sepolicy to
fix runtime error:

$ sepolicy
Traceback (most recent call last):
File "/usr/bin/sepolicy", line 28, in <module>
from multiprocessing import Pool
ModuleNotFoundError: No module named 'multiprocessing'

Signed-off-by: Yi Zhao <yi.zhao@...>
---
recipes-security/selinux/selinux-python_3.3.bb | 1 +
1 file changed, 1 insertion(+)

diff --git a/recipes-security/selinux/selinux-python_3.3.bb b/recipes-security/selinux/selinux-python_3.3.bb
index 1bf1f63..8f76718 100644
--- a/recipes-security/selinux/selinux-python_3.3.bb
+++ b/recipes-security/selinux/selinux-python_3.3.bb
@@ -57,6 +57,7 @@ RDEPENDS:${BPN}-sepolicy += "\
python3-core \
python3-codecs \
python3-syslog \
+ python3-multiprocessing \
${BPN} \
"
RDEPENDS:${BPN}-sepolgen-ifgen += "\
--
2.25.1


[PATCH yocto-autobuilder-helper v14] Add a banner on the old documentation docs.

Abongwa Amahnui Bonalais
 

Signed-off-by: Abongwa Bonalais Amahnui <abongwabonalais@...>
---
scripts/docs_add_banner.py | 84 ++++++++++++++++++++++++++++++++++++++
scripts/run-docs-build | 2 +
2 files changed, 86 insertions(+)
create mode 100644 scripts/docs_add_banner.py

diff --git a/scripts/docs_add_banner.py b/scripts/docs_add_banner.py
new file mode 100644
index 0000000..0de70d0
--- /dev/null
+++ b/scripts/docs_add_banner.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python3
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+#Signed-off-by: Abongwa Bonalais Amahnui <abongwabonalais@...>
+#
+#
+# Script to add banners to the old docs and outdated dunfell docs
+#
+#
+
+
+import os
+
+
+
+
+
+html_content_dunfell = '''
+<div id="outdated-warning">This document is outdated, you should select the <a href="https://docs.yoctoproject.org/dunfell">latest release version</a> in this series.</div>
+<div xml:lang="en" class="body" lang="en">
+'''
+html_content = '''
+<div id="outdated-warning">This version of the project is now considered obsolete, please select and use a <a href="https://docs.yoctoproject.org">more recent version</a>.</div>
+<div xml:lang="en" class="body" lang="en">
+'''
+
+# the class body and the last_div are used to make sure any .body property existing in any css file is not overwritten
+last_div = '''
+</div>
+
+'''
+
+css_replacement_content = '''
+
+ font-family: Verdana, Sans, sans-serif;
+
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ color: #333;
+ overflow-x: hidden;
+ }
+
+.body{
+margin: 0 auto;
+min-width: 640px;
+padding: 0 5em 5em 5em;
+}
+#outdated-warning{
+text-align: center;
+background-color: rgb(255, 186, 186);
+color: rgb(106, 14, 14);
+padding: 0.5em 0;
+width: 100%;
+position: fixed;
+top: 0;
+
+
+'''
+
+
+def add_banner_old_docs(dir):
+ for root, dirs, filenames in os.walk(dir):
+
+ if root.startswith('./3.1'):
+ html_replacement = html_content_dunfell
+ else:
+ html_replacement = html_content
+
+ for filename in filenames:
+ if filename.endswith('.html'):
+ with open(os.path.join(root, filename), 'r', encoding="ISO-8859-1") as f:
+ current_content = f.read()
+ with open(os.path.join(root, filename), 'w', encoding="ISO-8859-1") as f:
+ f.write(current_content.replace('<body>', '<body>' + html_replacement))
+ f.write(current_content.replace('</body>', last_div + '</body>'))
+ if filename.endswith('.css'):
+ with open(os.path.join(root, filename), 'r', encoding="ISO-8859-1") as f:
+ css_content = f.read()
+ with open(os.path.join(root, filename), 'w', encoding="ISO-8859-1") as f:
+ f.write(css_content.replace(css_content[css_content.find('body {'):css_content.find('}'[0])], 'body {' + css_replacement_content ))
+
+add_banner_old_docs('.')
diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index ecc5332..307ac19 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -37,6 +37,8 @@ cd $outputdir
echo Extracing old content from archive
tar -xJf $docbookarchive

+$scriptdir/docs_fix_all_html_css.py
+
cd $bbdocs
mkdir $outputdir/bitbake

--
2.25.1

1641 - 1660 of 58671