All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH v5] sudo: split into smaller tools package
@ 2020-12-16 16:56 Sinan Kaya
  2020-12-16 17:01 ` [OE-core] " Konrad Weihmann
  0 siblings, 1 reply; 3+ messages in thread
From: Sinan Kaya @ 2020-12-16 16:56 UTC (permalink / raw)
  To: openembedded-core; +Cc: Sinan Kaya

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 | 30 +++++++++++++++++++++-
 1 file changed, 29 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..2d185d88e4b 100644
--- a/meta/recipes-extended/sudo/sudo_1.9.3p1.bb
+++ b/meta/recipes-extended/sudo/sudo_1.9.3p1.bb
@@ -44,6 +44,34 @@ do_install_append () {
 	rmdir -p --ignore-fail-on-non-empty ${D}/run/sudo
 }
 
-FILES_${PN} += "${nonarch_libdir}/tmpfiles.d"
 FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la \
                     ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la"
+
+SUDO_PACKAGES = "${PN}-cvtsudoers"
+SUDO_PACKAGES += "${PN}-sudoreplay"
+SUDO_PACKAGES += "${PN}-logsrvd"
+SUDO_PACKAGES += "${PN}-sendlog"
+SUDO_PACKAGES += "${PN}-visudo"
+SUDO_PACKAGES += "${PN}-sudo"
+SUDO_PACKAGES += "${PN}-lib"
+PACKAGES += "${SUDO_PACKAGES}"
+
+RDEPENDS_${PN}-cvtsudoers = "${PN}-lib"
+RDEPENDS_${PN}-sudo = "${PN}-lib"
+RDEPENDS_${PN}-sudoreplay = "${PN}-lib"
+RDEPENDS_${PN}-logsrvd = "${PN}-lib"
+RDEPENDS_${PN}-sendlog = "${PN}-lib"
+RDEPENDS_${PN}-visudo = "${PN}-lib"
+
+RDEPENDS_${PN} += "${SUDO_PACKAGES}"
+
+ALLOW_EMPTY_${PN} = "1"
+
+FILES_${PN} = ""
+FILES_${PN}-cvtsudoers = "${bindir}/cvtsudoers"
+FILES_${PN}-sudoreplay = "${bindir}/sudoreplay"
+FILES_${PN}-logsrvd = "${sbindir}/sudo_logsrvd"
+FILES_${PN}-sendlog = "${sbindir}/sudo_sendlog"
+FILES_${PN}-sudo = "${bindir}/sudo ${bindir}/sudoedit"
+FILES_${PN}-visudo = "${sbindir}/visudo"
+FILES_${PN}-lib = "${localstatedir} ${libexecdir} ${sysconfdir} ${libdir} ${nonarch_libdir}"
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [OE-core] [meta-oe][PATCH v5] sudo: split into smaller tools package
  2020-12-16 16:56 [meta-oe][PATCH v5] sudo: split into smaller tools package Sinan Kaya
@ 2020-12-16 17:01 ` Konrad Weihmann
  2020-12-16 17:18   ` Sinan Kaya
  0 siblings, 1 reply; 3+ messages in thread
From: Konrad Weihmann @ 2020-12-16 17:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Sinan Kaya

On 16.12.20 17:56, Sinan Kaya wrote:
> Signed-off-by: Sinan Kaya <okaya@kernel.org>
> ---
>   meta/recipes-extended/sudo/sudo_1.9.3p1.bb | 30 +++++++++++++++++++++-
>   1 file changed, 29 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..2d185d88e4b 100644
> --- a/meta/recipes-extended/sudo/sudo_1.9.3p1.bb
> +++ b/meta/recipes-extended/sudo/sudo_1.9.3p1.bb
> @@ -44,6 +44,34 @@ do_install_append () {
>   	rmdir -p --ignore-fail-on-non-empty ${D}/run/sudo
>   }
>   
> -FILES_${PN} += "${nonarch_libdir}/tmpfiles.d"
>   FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la \
>                       ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la"
> +
> +SUDO_PACKAGES = "${PN}-cvtsudoers"
> +SUDO_PACKAGES += "${PN}-sudoreplay"
> +SUDO_PACKAGES += "${PN}-logsrvd"
> +SUDO_PACKAGES += "${PN}-sendlog"
> +SUDO_PACKAGES += "${PN}-visudo"
> +SUDO_PACKAGES += "${PN}-sudo"
> +SUDO_PACKAGES += "${PN}-lib"
> +PACKAGES += "${SUDO_PACKAGES}"

I think needs to be PACKAGE_BEFORE_PN = "${SUDO_PACKAGES}"
otherwise everything will end up in ${PN} as the list is appended here

> +
> +RDEPENDS_${PN}-cvtsudoers = "${PN}-lib"
> +RDEPENDS_${PN}-sudo = "${PN}-lib"
> +RDEPENDS_${PN}-sudoreplay = "${PN}-lib"
> +RDEPENDS_${PN}-logsrvd = "${PN}-lib"
> +RDEPENDS_${PN}-sendlog = "${PN}-lib"
> +RDEPENDS_${PN}-visudo = "${PN}-lib"
> +
> +RDEPENDS_${PN} += "${SUDO_PACKAGES}"
> +
> +ALLOW_EMPTY_${PN} = "1"
> +
> +FILES_${PN} = ""
> +FILES_${PN}-cvtsudoers = "${bindir}/cvtsudoers"
> +FILES_${PN}-sudoreplay = "${bindir}/sudoreplay"
> +FILES_${PN}-logsrvd = "${sbindir}/sudo_logsrvd"
> +FILES_${PN}-sendlog = "${sbindir}/sudo_sendlog"
> +FILES_${PN}-sudo = "${bindir}/sudo ${bindir}/sudoedit"
> +FILES_${PN}-visudo = "${sbindir}/visudo"
> +FILES_${PN}-lib = "${localstatedir} ${libexecdir} ${sysconfdir} ${libdir} ${nonarch_libdir}"
> 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OE-core] [meta-oe][PATCH v5] sudo: split into smaller tools package
  2020-12-16 17:01 ` [OE-core] " Konrad Weihmann
@ 2020-12-16 17:18   ` Sinan Kaya
  0 siblings, 0 replies; 3+ messages in thread
From: Sinan Kaya @ 2020-12-16 17:18 UTC (permalink / raw)
  To: Konrad Weihmann, openembedded-core

On 12/16/2020 12:01 PM, Konrad Weihmann wrote:
>> +PACKAGES += "${SUDO_PACKAGES}"
> 
> I think needs to be PACKAGE_BEFORE_PN = "${SUDO_PACKAGES}"
> otherwise everything will end up in ${PN} as the list is appended here

OK, I guess this is what I didn't know. This is unusual keyword that I
have never used/seen before.

All other examples I looked had FILES="" and split the package into
smaller subpackages.

I can rework the change to just have sudo as a small package with
PACKAGE_BEFORE_PN keyword.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-16 17:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 16:56 [meta-oe][PATCH v5] sudo: split into smaller tools package Sinan Kaya
2020-12-16 17:01 ` [OE-core] " Konrad Weihmann
2020-12-16 17:18   ` Sinan Kaya

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.