[meta-oe,v3] sudo: split into smaller tools package

Submitted by Sinan Kaya on Dec. 15, 2020, 7:35 p.m. | Patch ID: 178978

Details

Message ID 20201215193506.13053-1-okaya@kernel.org
State Superseded
Headers show

Commit Message

Sinan Kaya Dec. 15, 2020, 7:35 p.m.
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(-)

-- 
2.17.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145750): https://lists.openembedded.org/g/openembedded-core/message/145750
Mute This Topic: https://lists.openembedded.org/mt/78984466/1003190
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-

Patch hide | download patch | download mbox

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"
 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}"

Comments

Bruce Ashfield Dec. 15, 2020, 7:57 p.m.
On Tue, Dec 15, 2020 at 2:54 PM Sinan Kaya <okaya@kernel.org> wrote:
>

> On 12/15/2020 2:44 PM, Bruce Ashfield wrote:

> >> -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.

>

> >>  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.

>

> 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).

>

> >

> > 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

>

> Sinan




-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145753): https://lists.openembedded.org/g/openembedded-core/message/145753
Mute This Topic: https://lists.openembedded.org/mt/78984466/1003190
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-
Sinan Kaya Dec. 15, 2020, 8:09 p.m.
On 12/15/2020 2:57 PM, Bruce Ashfield wrote:
>> 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?
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145754): https://lists.openembedded.org/g/openembedded-core/message/145754
Mute This Topic: https://lists.openembedded.org/mt/78984466/1003190
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-
Bruce Ashfield Dec. 15, 2020, 9:07 p.m.
On Tue, Dec 15, 2020 at 3:09 PM Sinan Kaya <okaya@kernel.org> wrote:
>

> On 12/15/2020 2:57 PM, Bruce Ashfield wrote:

> >> 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?


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



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145756): https://lists.openembedded.org/g/openembedded-core/message/145756
Mute This Topic: https://lists.openembedded.org/mt/78984466/1003190
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-
Sinan Kaya Dec. 18, 2020, 4:59 a.m.
This is a system generated Comment: Patch 178978 was automatically marked as superseded by patch 179023.