sudo: split into smaller tools package
PATCH v3 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 | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)
meta/recipes-extended/sudo/sudo_1.9.3p1.bb +23 -1
@@ -44,6 +44,28 @@ 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" + +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}" + +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}"
Signature · 1 line
2.17.1
Quoted 14 lines · Sinan Kaya
Allow to include whether we want sudo, visudo, sudoreplay or cvtsudoers tools.
Signed-off-by Sinan Kaya <[email protected]>--- meta/recipes-extended/sudo/sudo_1.9.3p1.bb | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)meta/recipes-extended/sudo/sudo_1.9.3p1.bb +0
-0
meta/recipes-extended/sudo/sudo_1.9.3p1.bb do_install_append () { · line 47
Quoted 4 lines
meta/recipes-extended/sudo/sudo_1.9.3p1.bb +0
-1@@ -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 ?
Quoted 6 lines
meta/recipes-extended/sudo/sudo_1.9.3p1.bb +4
-0FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la \ ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la" + +PACKAGES += "${PN}-cvtsudoers" +PACKAGES += "${PN}-sudoreplay" +PACKAGES += "${PN}-visudo"
meta/recipes-extended/sudo/sudo_1.9.3p1.bb do_install_append () { · line 62
Quoted 10 lines
meta/recipes-extended/sudo/sudo_1.9.3p1.bb +10
-0+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
Quoted 15 lines
meta/recipes-extended/sudo/sudo_1.9.3p1.bb +9
-1+ +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
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
Quoted 3 lines · Bruce Ashfield
Quoted 1 line
-FILES_${PN} += "${nonarch_libdir}/tmpfiles.d"
I don't see this maintained in the split of changes below, why was it dropped ?
I'll fix that. I thought ${libdir} would cover it but apparently it does not.
Quoted 20 lines
Quoted 6 lines
FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la \ ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la"meta/recipes-extended/sudo/sudo_1.9.3p1.bb +4
-0+ +PACKAGES += "${PN}-cvtsudoers" +PACKAGES += "${PN}-sudoreplay" +PACKAGES += "${PN}-visudo"meta/recipes-extended/sudo/sudo_1.9.3p1.bb do_install_append () { · line 62
Quoted 10 lines
meta/recipes-extended/sudo/sudo_1.9.3p1.bb +10
-0+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.
Quoted 4 lines
Quoted 1 line
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.
Interesting, I didn't know that RRECOMMENDS can be turned off. I was hoping to do a non-invasive change for existing users.
Quoted 3 lines
If we do splits like this, something stronger than rrcommends is needed, or they simply belong in a layer besides core.
Would RDEPENDS work?
Sinan
Quoted 29 lines · Sinan Kaya
Quoted 3 lines · Bruce Ashfield
Quoted 1 line
-FILES_${PN} += "${nonarch_libdir}/tmpfiles.d"
I don't see this maintained in the split of changes below, why was it dropped ?
I'll fix that. I thought ${libdir} would cover it but apparently it does not.
Quoted 20 lines
Quoted 6 lines
FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la \ ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la"meta/recipes-extended/sudo/sudo_1.9.3p1.bb +4
-0+ +PACKAGES += "${PN}-cvtsudoers" +PACKAGES += "${PN}-sudoreplay" +PACKAGES += "${PN}-visudo"meta/recipes-extended/sudo/sudo_1.9.3p1.bb do_install_append () { · line 62
Quoted 10 lines
meta/recipes-extended/sudo/sudo_1.9.3p1.bb +10
-0+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.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
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.
Interesting, I didn't know that RRECOMMENDS can be turned off. I was hoping to do a non-invasive change for existing users.
A good goal!
It's this variable:
https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#var-NO_RECOMMENDATIONS
(but you probably already searched and found it).
Quoted 6 lines
Quoted 4 lines
If we do splits like this, something stronger than rrcommends is needed, or they simply belong in a layer besides core.
Would RDEPENDS work?
It would pull all the subpackages in yes, and can't be turned off like the recommends.
I can't think of where it would break, but maybe others can :D
Bruce
Quoted 2 lines
Sinan
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
Quoted 6 lines · Bruce Ashfield
Quoted 2 lines
Interesting, I didn't know that RRECOMMENDS can be turned off. I was hoping to do a non-invasive change for existing users.
A good goal!
It's this variable:
https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#var-NO_RECOMMENDATIONS
Would you be interested in setting it as default for the tiny distro with a patch?
Quoted 11 lines · Sinan Kaya
Quoted 6 lines · Bruce Ashfield
Quoted 2 lines
Interesting, I didn't know that RRECOMMENDS can be turned off. I was hoping to do a non-invasive change for existing users.
A good goal!
It's this variable:
https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#var-NO_RECOMMENDATIONSWould you be interested in setting it as default for the tiny distro with a patch?
I'm not the maintainer of that reference distro, but if something really wants to control what is install and not have optional things creep in, turning off the recommends is a good idea.
It would have to be run through some tests of course, because something may be relying on those packages.
Bruce
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II