diff mbox series

[meta-oe] uutils-coreutils: remove LIBCLANG_PATH, SELINUX_LIB_DIR, SELINUX_INCLUDE_DIR variables

Message ID 20250305150306.2628246-1-martin.jansa@gmail.com
State Accepted
Headers show
Series [meta-oe] uutils-coreutils: remove LIBCLANG_PATH, SELINUX_LIB_DIR, SELINUX_INCLUDE_DIR variables | expand

Commit Message

Martin Jansa March 5, 2025, 3:03 p.m. UTC
* don't seem to be needed, I don't see any failures or changes after removing them

* they were needed before in older version as explained by Etienne in:
  https://lists.openembedded.org/g/openembedded-devel/message/115756

regarding SELINUX_INCLUDE_DIR, it was definitely needed as I implemented the recipe. During implementation I submitted this patch to selinux-sys ( https://github.com/koutheir/selinux-sys/commit/a6667c404ecc33266f66e9516bb8e30150c41ec2 ) to correctly use this variable, and was getting a build error without this fix because the rust crate selinux-sys was not finding the selinux header-file (specifically, the bindgen tool).

However, this was in 2022, and since then there has been this patch in selinux-sys: https://github.com/koutheir/selinux-sys/commit/d3ea4674e18c5240918348bea4ec6248e50516e5 , and it seems that the variable is not needed any more.
At least I'm not able to reproduce the build error which I was getting, even with commenting out SELINUX_LIB_DIR and SELINUX_INCLUDE_DIR.

The header-file is used for generating rust code from the C header-file using bindgen, so I don't think it makes a difference whether the native version or the target version is used.

This is the old build error I was getting:
  process didn't exit successfully: `/workdir/build/tmp-glibc/work/armv8a-linux/uutils-coreutils/0.0.14.AUTOINC+43a5b8c7d7-r0/build/target/release/build/selinux-sys-0849198bc1fef4a4/build-script-build` (exit status: 101)
  --- stdout
  cargo:root=/workdir/build/tmp-glibc/work/armv8a-linux/uutils-coreutils/0.0.14.AUTOINC+43a5b8c7d7-r0/build/target/aarch64-snap-linux/release/build/selinux-sys-d96748d49908959f/out
  cargo:rerun-if-env-changed=SELINUX_STATIC_aarch64-snap-linux
  cargo:rerun-if-env-changed=SELINUX_STATIC_aarch64_snap_linux
  cargo:rerun-if-env-changed=TARGET_SELINUX_STATIC

|   --- stderr
|   src/selinux-sys.h:1:10: fatal error: 'selinux/selinux.h' file not found
|   src/selinux-sys.h:1:10: fatal error: 'selinux/selinux.h' file not found, err: true

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
 .../recipes-core/uutils-coreutils/uutils-coreutils_0.0.29.bb  | 4 ----
 1 file changed, 4 deletions(-)

Comments

Etienne Cordonnier March 10, 2025, 2:15 p.m. UTC | #1
Hi Martin, thanks for the improvement, and I confirm it works fine in my
test setup. Sorry for the slow response; your email had landed in my spam
folder for some unknown reason.

On Wed, Mar 5, 2025 at 4:03 PM Martin Jansa <martin.jansa@gmail.com> wrote:

> * don't seem to be needed, I don't see any failures or changes after
> removing them
>
> * they were needed before in older version as explained by Etienne in:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Ddevel_message_115756&d=DwIDAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=h_7mE0M2CrrYkOS5XkpS056mteR6X9KpxapPeNOzb_68rXcL29oBpvqyRwJjck_9&s=-L3i0Tx53RQ8q5VIvPT8yACcg3RK71CZTGXOv0C0_Os&e=
>
> regarding SELINUX_INCLUDE_DIR, it was definitely needed as I implemented
> the recipe. During implementation I submitted this patch to selinux-sys (
> https://github.com/koutheir/selinux-sys/commit/a6667c404ecc33266f66e9516bb8e30150c41ec2
> ) to correctly use this variable, and was getting a build error without
> this fix because the rust crate selinux-sys was not finding the selinux
> header-file (specifically, the bindgen tool).
>
> However, this was in 2022, and since then there has been this patch in
> selinux-sys:
> https://github.com/koutheir/selinux-sys/commit/d3ea4674e18c5240918348bea4ec6248e50516e5
> , and it seems that the variable is not needed any more.
> At least I'm not able to reproduce the build error which I was getting,
> even with commenting out SELINUX_LIB_DIR and SELINUX_INCLUDE_DIR.
>
> The header-file is used for generating rust code from the C header-file
> using bindgen, so I don't think it makes a difference whether the native
> version or the target version is used.
>
> This is the old build error I was getting:
>   process didn't exit successfully:
> `/workdir/build/tmp-glibc/work/armv8a-linux/uutils-coreutils/0.0.14.AUTOINC+43a5b8c7d7-r0/build/target/release/build/selinux-sys-0849198bc1fef4a4/build-script-build`
> (exit status: 101)
>   --- stdout
>   cargo:root=/workdir/build/tmp-glibc/work/armv8a-linux/uutils-coreutils/
> 0.0.14.
> AUTOINC+43a5b8c7d7-r0/build/target/aarch64-snap-linux/release/build/selinux-sys-d96748d49908959f/out
>   cargo:rerun-if-env-changed=SELINUX_STATIC_aarch64-snap-linux
>   cargo:rerun-if-env-changed=SELINUX_STATIC_aarch64_snap_linux
>   cargo:rerun-if-env-changed=TARGET_SELINUX_STATIC
>
> |   --- stderr
> |   src/selinux-sys.h:1:10: fatal error: 'selinux/selinux.h' file not found
> |   src/selinux-sys.h:1:10: fatal error: 'selinux/selinux.h' file not
> found, err: true
>
> Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> ---
>  .../recipes-core/uutils-coreutils/uutils-coreutils_0.0.29.bb  | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/meta-oe/recipes-core/uutils-coreutils/
> uutils-coreutils_0.0.29.bb b/meta-oe/recipes-core/uutils-coreutils/
> uutils-coreutils_0.0.29.bb
> index d0a7532984..09f6071e71 100644
> --- a/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.29.bb
> +++ b/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.29.bb
> @@ -30,10 +30,6 @@ CARGO_BUILD_FLAGS +=
> "${@bb.utils.contains('PACKAGECONFIG', 'selinux', '--featur
>
>  DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'selinux',
> 'clang-native libselinux-native', '', d)}"
>
> -export LIBCLANG_PATH = "${STAGING_LIBDIR_NATIVE}"
> -export SELINUX_LIB_DIR = "${STAGING_LIBDIR_NATIVE}"
> -export SELINUX_INCLUDE_DIR = "${STAGING_INCDIR_NATIVE}"
> -
>  # The code which follows is strongly inspired from the GNU coreutils
> bitbake recipe:
>
>  # [ df mktemp nice printenv base64 gets a special treatment and is not
> included in this
> --
> 2.48.1
>
>
diff mbox series

Patch

diff --git a/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.29.bb b/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.29.bb
index d0a7532984..09f6071e71 100644
--- a/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.29.bb
+++ b/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.29.bb
@@ -30,10 +30,6 @@  CARGO_BUILD_FLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'selinux', '--featur
 
 DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'clang-native libselinux-native', '', d)}"
 
-export LIBCLANG_PATH = "${STAGING_LIBDIR_NATIVE}"
-export SELINUX_LIB_DIR = "${STAGING_LIBDIR_NATIVE}"
-export SELINUX_INCLUDE_DIR = "${STAGING_INCDIR_NATIVE}"
-
 # The code which follows is strongly inspired from the GNU coreutils bitbake recipe:
 
 # [ df mktemp nice printenv base64 gets a special treatment and is not included in this