sudo: split into smaller tools package
PATCH v5 1/1 sudo: split into smaller tools package
Allow to include whether we want sudo, visudo, sudoreplay or cvtsudoers tools.
--- meta/recipes-extended/sudo/sudo_1.9.3p1.bb | 30 +++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-)
meta/recipes-extended/sudo/sudo_1.9.3p1.bb +29 -1
@@ -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}"
Signature · 1 line
2.17.1
Quoted 15 lines · Sinan Kaya
Signed-off-by Sinan Kaya <[email protected]>--- meta/recipes-extended/sudo/sudo_1.9.3p1.bb | 30 +++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-)meta/recipes-extended/sudo/sudo_1.9.3p1.bb +0
-1@@ -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 \
meta/recipes-extended/sudo/sudo_1.9.3p1.bb do_install_append () { · line 57
Quoted 10 lines
meta/recipes-extended/sudo/sudo_1.9.3p1.bb +9
-0${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
Quoted 25 lines
meta/recipes-extended/sudo/sudo_1.9.3p1.bb +20
-0+ +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}"
Quoted 4 lines · Konrad Weihmann
Quoted 1 line
+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.