Re: [PATCH] squashfs-tools: always install prebuilt manpage


Changqing Li
 




From: richard.purdie@... <richard.purdie@...>
Sent: Tuesday, May 17, 2022 3:32 PM
To: Li, Changqing <Changqing.Li@...>; openembedded-core@... <openembedded-core@...>
Subject: Re: [OE-core] [PATCH] squashfs-tools: always install prebuilt manpage
 
[Please note: This e-mail is from an EXTERNAL e-mail address]

On Tue, 2022-05-17 at 02:27 +0000, Li, Changqing wrote:
>
>
> From: richard.purdie@...
> <richard.purdie@...>
> Sent: Monday, May 16, 2022 6:54 PM
> To: Li, Changqing <Changqing.Li@...>;
> openembedded-core@...
> <openembedded-core@...>
> Subject: Re: [OE-core] [PATCH] squashfs-tools: always install
> prebuilt manpage
> [Please note: This e-mail is from an EXTERNAL e-mail address]
>
> On Mon, 2022-05-16 at 18:42 +0800, Changqing Li wrote:
> > From: Changqing Li <changqing.li@...>
> >
> > When other feature enabled, and involve help2man into squashfs-
> > tools's
> > recipe-sysroot-native, install-manpages.sh will run target binary
> > on
> > build host, eg: mksquashfs --help, which will cause error.
> > Eg:
> >   ../squashfs-tools/mksquashfs: /lib/x86_64-linux-gnu/libc.so.6:
> > version `GLIBC_2.34' not found (required by ../squashfs-
> > tools/mksquashfs)
> > > help2man: can't get `--help' info from
> > > /tmp/tmp.pEG5R8COVb/mksquashfs.sh
> > > Try `--no-discard-stderr' if option outputs to stderr
> > > ./mksquashfs-manpage.sh: help2man returned error.  Aborting
> > > ../generate-manpages/install-manpages.sh: Failed to generate
> > > manpage.  Aborting
> >
> > Fixed by always install prebuilt manpage, avoid running target
> > binary on
> > build host
> >
> > Signed-off-by: Changqing Li <changqing.li@...>
>
> I'd much prefer not to carry a patch doing this. Which "other feature
> enabled" trigger this to happen?
>
> When  meta-secure-core  is involved,  and DISTRO_FEATURES efi-secure-
> boot and ima is enabled,
> in meta-signing-key/classes/user-key-store.bbclass,  it will add
> DEPENDS as following:
> DEPENDS:append:class-target = " \
>     ${@bb.utils.contains("DISTRO_FEATURES", "efi-secure-boot",
> "sbsigntool-native", "", d)} \
>     ${@bb.utils.contains("DISTRO_FEATURES", "efi-secure-boot",
> "libsign-native", "", d)} \
>     openssl-native \
>     ${@bb.utils.contains("DISTRO_FEATURES", "efi-secure-boot",
> "efitools-native gnupg-native", "", d)} \
> "
>
> and efitools-native  DEPENDS  on  help2man-native,  so all target
> depends on help2man-native.
> efitools's manpage also don't configurable.
>
> We might want to talk to upstream about making this configurable
> rather
> than carrying a patch, or we make sure help2man is never accessible
> to
> this recipe in some other way.
>
> I will talk to upstream about this first.

What would also probably help is adding help2man-native to
SSTATE_EXCLUDEDEPS_SYSROOT in layer.conf in OE-Core.

That runs the risk of triggering some build failures as it did when we
added pkgconfig-native there but is probably the right thing to do. It
would force recipes that want help2man-native to have an explicit
DEPENDS so we'd have to test and fix any recipes that needed that
adding.

Thanks,  I will send a V2 patch with this solution later.

Regrads,
Changqing

Cheers,

Richard

Join openembedded-core@lists.openembedded.org to automatically receive all group messages.