Re: [OE-core] [meta-oe][PATCH v3] sudo: split into smaller tools package

Bruce Ashfield
2020-12-15T19:45:10Z

On Tue, Dec 15, 2020 at 2:35 PM Sinan Kaya <okaya@kernel.org> wrote:
>
> Allow to include whether we want sudo, visudo, sudoreplay
> or cvtsudoers tools.
>
> Signed-off-by: Sinan Kaya <okaya@kernel.org>
> ---
> meta/recipes-extended/sudo/sudo_1.9.3p1.bb | 24 +++++++++++++++++++++-
> 1 file changed, 23 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-extended/sudo/sudo_1.9.3p1.bb b/meta/recipes-extended/sudo/sudo_1.9.3p1.bb
> index ba61a7f2472..0ea72caf790 100644
> --- a/meta/recipes-extended/sudo/sudo_1.9.3p1.bb
> +++ b/meta/recipes-extended/sudo/sudo_1.9.3p1.bb
> @@ -44,6 +44,28 @@ do_install_append () {
> rmdir -p --ignore-fail-on-non-empty ${D}/run/sudo
> }
>
> -FILES_${PN} += "${nonarch_libdir}/tmpfiles.d"

I don't see this maintained in the split of changes below, why was it dropped ?

> FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la \
> ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la"
> +
> +PACKAGES += "${PN}-cvtsudoers"
> +PACKAGES += "${PN}-sudoreplay"
> +PACKAGES += "${PN}-visudo"
> +PACKAGES += "${PN}-sudo"
> +PACKAGES += "${PN}-lib"
> +
> +RDEPENDS_${PN}-cvtsudoers = "${PN}-lib"
> +RDEPENDS_${PN}-sudo = "${PN}-lib"
> +RDEPENDS_${PN}-sudoreplay = "${PN}-lib"
> +RDEPENDS_${PN}-visudo = "${PN}-lib"
> +
> +PROVIDES += "${PACKAGES}"
> +RRECOMMENDS_${PN} += "${PACKAGES}"

This isn't a direct replacement of the existing packaging. If we are
going to get a series of patches that keep splitting on binaries, they
shouldn't be like this.

For an image or configuration that turns off rrecommends (which is the
policy for a distro that I have), this is not backwards compatible and
we are going to get all sorts of runtime issues .. and then be forced
to update packages lists with this explosion of new splits.

If we do splits like this, something stronger than rrcommends is
needed, or they simply belong in a layer besides core.

Bruce

> +
> +ALLOW_EMPTY_${PN} = "1"
> +
> +FILES_${PN} = ""
> +FILES_${PN}-cvtsudoers = "${bindir}/cvtsudoers"
> +FILES_${PN}-sudoreplay = "${bindir}/sudoreplay"
> +FILES_${PN}-sudo = "${bindir}/sudo ${bindir}/sudoedit"
> +FILES_${PN}-visudo = "${sbindir}/visudo"
> +FILES_${PN}-lib = "${localstatedir} ${libexecdir} ${sysconfdir} ${libdir}"
> --
> 2.17.1