diff mbox series

[meta-security,kirkstone,3/5] sssd: fix issue if build machine is Debian

Message ID 20240626133913.790145-4-gael.portay@rtone.fr
State New
Headers show
Series sssd: fix python3 support | expand

Commit Message

Gaël PORTAY June 26, 2024, 1:39 p.m. UTC
The configure script guesses the target system from the host if no
--with-os= is set[1]. It is untrue if cross-compiling.

The guessed host operating system is used then to do specific things
fort target build.

The commit[2] passes the downstream debian option --install-layout=deb
to setup.py[3] if the host system is debian based, and thus, it raises
the error attached below as that debian-specific option[4] is not part
of the openembedded[5] world.

This sets the Fedora operating system thanks to the existing configure
option --with-os=fedora, that is relatively sain operating system for
the needs of openembedded.

Fixes:

	| (...)/build/tmp/work/aarch64-poky-linux/sssd/2.5.2-r0/build/src/config/setup.py:25: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
	|   from distutils.core import setup
	| usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
	|    or: setup.py --help [cmd1 cmd2 ...]
	|    or: setup.py --help-commands
	|    or: setup.py cmd --help
	|
	| error: option --install-layout not recognized

Note: Upstream has introduced the "unknown" operating systemd with the
upcoming version 2.10.0[6][7]. The change can be backported.

[1]: https://github.com/SSSD/sssd/blob/2.5.2/src/external/platform.m4#L1-L31
[2]: https://github.com/SSSD/sssd/commit/e6ae55d5423434d5dc6c236e8647b33610d30e2e
[3]: https://github.com/SSSD/sssd/blob/2.5.2/Makefile.am#L32-L35
[4]: https://sources.debian.org/patches/setuptools/68.1.2-2/install-layout.diff/#L7
[5]: https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/python/python3-setuptools_59.5.0.bb?h=kirkstone
[6]: https://github.com/SSSD/sssd/commit/7b32dc0ab877a9061b52868b8efe6866c3144b63
[7]: https://github.com/SSSD/sssd/pull/7398

Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr>
---
 recipes-security/sssd/sssd_2.5.2.bb | 1 +
 1 file changed, 1 insertion(+)

Comments

akuster808 July 1, 2024, 11:12 a.m. UTC | #1
On 6/26/24 9:39 AM, "Gaël PORTAY via lists.yoctoproject.org wrote:
> The configure script guesses the target system from the host if no
> --with-os= is set[1]. It is untrue if cross-compiling.
>
> The guessed host operating system is used then to do specific things
> fort target build.
>
> The commit[2] passes the downstream debian option --install-layout=deb
> to setup.py[3] if the host system is debian based, and thus, it raises
> the error attached below as that debian-specific option[4] is not part
> of the openembedded[5] world.
>
> This sets the Fedora operating system thanks to the existing configure
> option --with-os=fedora, that is relatively sain operating system for
> the needs of openembedded.

Won't this apply to master as well?

- armin
> Fixes:
>
> 	| (...)/build/tmp/work/aarch64-poky-linux/sssd/2.5.2-r0/build/src/config/setup.py:25: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
> 	|   from distutils.core import setup
> 	| usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
> 	|    or: setup.py --help [cmd1 cmd2 ...]
> 	|    or: setup.py --help-commands
> 	|    or: setup.py cmd --help
> 	|
> 	| error: option --install-layout not recognized
>
> Note: Upstream has introduced the "unknown" operating systemd with the
> upcoming version 2.10.0[6][7]. The change can be backported.
>
> [1]: https://github.com/SSSD/sssd/blob/2.5.2/src/external/platform.m4#L1-L31
> [2]: https://github.com/SSSD/sssd/commit/e6ae55d5423434d5dc6c236e8647b33610d30e2e
> [3]: https://github.com/SSSD/sssd/blob/2.5.2/Makefile.am#L32-L35
> [4]: https://sources.debian.org/patches/setuptools/68.1.2-2/install-layout.diff/#L7
> [5]: https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/python/python3-setuptools_59.5.0.bb?h=kirkstone
> [6]: https://github.com/SSSD/sssd/commit/7b32dc0ab877a9061b52868b8efe6866c3144b63
> [7]: https://github.com/SSSD/sssd/pull/7398
>
> Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr>
> ---
>   recipes-security/sssd/sssd_2.5.2.bb | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/recipes-security/sssd/sssd_2.5.2.bb b/recipes-security/sssd/sssd_2.5.2.bb
> index 98a4b5e..9991667 100644
> --- a/recipes-security/sssd/sssd_2.5.2.bb
> +++ b/recipes-security/sssd/sssd_2.5.2.bb
> @@ -73,6 +73,7 @@ EXTRA_OECONF += " \
>       --without-secrets \
>       --with-xml-catalog-path=${STAGING_ETCDIR_NATIVE}/xml/catalog \
>       --with-pid-path=/run \
> +    --with-os=fedora \
>   "
>   
>   do_configure:prepend() {
Gaël PORTAY July 1, 2024, 12:36 p.m. UTC | #2
Hello,

On Mon Jul 1, 2024 at 1:12 PM CEST, akuster808 wrote:
>
>
> On 6/26/24 9:39 AM, "Gaël PORTAY via lists.yoctoproject.org wrote:
> > The configure script guesses the target system from the host if no
> > --with-os= is set[1]. It is untrue if cross-compiling.
> >
> > The guessed host operating system is used then to do specific things
> > fort target build.
> >
> > The commit[2] passes the downstream debian option --install-layout=deb
> > to setup.py[3] if the host system is debian based, and thus, it raises
> > the error attached below as that debian-specific option[4] is not part
> > of the openembedded[5] world.
> >
> > This sets the Fedora operating system thanks to the existing configure
> > option --with-os=fedora, that is relatively sain operating system for
> > the needs of openembedded.
>
> Won't this apply to master as well?
>

The change does not apply as is because of the context has changed a
bit: the line aove has been modified since kirkstone.

> - armin
> > Fixes:
> >
> > 	| (...)/build/tmp/work/aarch64-poky-linux/sssd/2.5.2-r0/build/src/config/setup.py:25: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
> > 	|   from distutils.core import setup
> > 	| usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
> > 	|    or: setup.py --help [cmd1 cmd2 ...]
> > 	|    or: setup.py --help-commands
> > 	|    or: setup.py cmd --help
> > 	|
> > 	| error: option --install-layout not recognized
> >
> > Note: Upstream has introduced the "unknown" operating systemd with the
> > upcoming version 2.10.0[6][7]. The change can be backported.
> >
> > [1]: https://github.com/SSSD/sssd/blob/2.5.2/src/external/platform.m4#L1-L31
> > [2]: https://github.com/SSSD/sssd/commit/e6ae55d5423434d5dc6c236e8647b33610d30e2e
> > [3]: https://github.com/SSSD/sssd/blob/2.5.2/Makefile.am#L32-L35
> > [4]: https://sources.debian.org/patches/setuptools/68.1.2-2/install-layout.diff/#L7
> > [5]: https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/python/python3-setuptools_59.5.0.bb?h=kirkstone
> > [6]: https://github.com/SSSD/sssd/commit/7b32dc0ab877a9061b52868b8efe6866c3144b63
> > [7]: https://github.com/SSSD/sssd/pull/7398
> >
> > Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr>
> > ---
> >   recipes-security/sssd/sssd_2.5.2.bb | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/recipes-security/sssd/sssd_2.5.2.bb b/recipes-security/sssd/sssd_2.5.2.bb
> > index 98a4b5e..9991667 100644
> > --- a/recipes-security/sssd/sssd_2.5.2.bb
> > +++ b/recipes-security/sssd/sssd_2.5.2.bb
> > @@ -73,6 +73,7 @@ EXTRA_OECONF += " \
> >       --without-secrets \

The line is now:

     --enable-pammoddir=${base_libdir}/security \

> >       --with-xml-catalog-path=${STAGING_ETCDIR_NATIVE}/xml/catalog \
> >       --with-pid-path=/run \
> > +    --with-os=fedora \
> >   "
> >   
> >   do_configure:prepend() {

Regards,
Gaël

Here is the change (untested):

----- >8 ---------------------------------------------------------------

 .../networking-layer/recipes-security/sssd/sssd_2.9.2.bb         | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dynamic-layers/networking-layer/recipes-security/sssd/sssd_2.9.2.bb b/dynamic-layers/networking-layer/recipes-security/sssd/sssd_2.9.2.bb
index 2ab72ae..cce6786 100644
--- a/dynamic-layers/networking-layer/recipes-security/sssd/sssd_2.9.2.bb
+++ b/dynamic-layers/networking-layer/recipes-security/sssd/sssd_2.9.2.bb
@@ -68,6 +68,7 @@ EXTRA_OECONF += " \
     --enable-pammoddir=${base_libdir}/security \
     --with-xml-catalog-path=${STAGING_ETCDIR_NATIVE}/xml/catalog \
     --with-pid-path=/run \
+    --with-os=fedora \
 "

 do_configure:prepend() {
Gaël PORTAY Oct. 24, 2024, 6:43 p.m. UTC | #3
Armin,

On Mon Jul 1, 2024 at 1:12 PM CEST, akuster808 wrote:
>
>
> On 6/26/24 9:39 AM, "Gaël PORTAY via lists.yoctoproject.org wrote:
> > The configure script guesses the target system from the host if no
> > --with-os= is set[1]. It is untrue if cross-compiling.
> >
> > The guessed host operating system is used then to do specific things
> > fort target build.
> >
> > The commit[2] passes the downstream debian option --install-layout=deb
> > to setup.py[3] if the host system is debian based, and thus, it raises
> > the error attached below as that debian-specific option[4] is not part
> > of the openembedded[5] world.
> >
> > This sets the Fedora operating system thanks to the existing configure
> > option --with-os=fedora, that is relatively sain operating system for
> > the needs of openembedded.
>
> Won't this apply to master as well?
>

The patch serie does not apply cleanly to master; I have fixed it.

But, there are additionnal fixes to add on master (not needed in
kirkstone).

I will send the patch (shortly?) once I have retested the whole thing.

> - armin

Regards,
Gaël
diff mbox series

Patch

diff --git a/recipes-security/sssd/sssd_2.5.2.bb b/recipes-security/sssd/sssd_2.5.2.bb
index 98a4b5e..9991667 100644
--- a/recipes-security/sssd/sssd_2.5.2.bb
+++ b/recipes-security/sssd/sssd_2.5.2.bb
@@ -73,6 +73,7 @@  EXTRA_OECONF += " \
     --without-secrets \
     --with-xml-catalog-path=${STAGING_ETCDIR_NATIVE}/xml/catalog \
     --with-pid-path=/run \
+    --with-os=fedora \
 "
 
 do_configure:prepend() {