Patchwork udev: Remove deprecated binaries from packaging

login
register
mail settings
Submitter Marko Kati?
Date Dec. 13, 2012, 7:53 p.m.
Message ID <1355428397.4799.7.camel@dromedary>
Download mbox | patch
Permalink /patch/40931/
State New
Headers show

Comments

Marko Kati? - Dec. 13, 2012, 7:53 p.m.
On Tue, 2012-11-20 at 18:23 -0200, Otavio Salvador wrote:
> On Tue, Nov 20, 2012 at 5:59 PM, Marko Kati? <dromede@gmail.com> wrote:
> > On Sat, Nov 17, 2012 at 7:54 PM, Otavio Salvador
> > <otavio@ossystems.com.br> wrote:
> >>
> >>
> >> On Sat, Nov 17, 2012 at 4:38 PM, Chris Larson <clarson@kergoth.com> wrote:
> >>>
> >>> On Sat, Nov 17, 2012 at 11:02 AM, Marko Kati? <dromede@gmail.com> wrote:
> >>>>
> >>>> A proper solution might be to:
> >>>>
> >>>> a) Leave udevtest and udevinfo in udev-utils to properly support older
> >>>> versions of udev that have these packages.
> >>>> b) Move udevadm into the main udev package. This makes a lot of sense
> >>>> since udevadm is crucial for proper udev operation.
> >>>> c) Remove udev-utils from RRECOMMENDS.
> >>>
> >>>
> >>> This sounds like a clean, solid route to me. Hopefully someone else will
> >>> chime in with input on it as well.
> >>
> >>
> >> I see no value in having the others and deprecated tools available. Having
> >> udevadm available in udev-utils allows for it use with mdev for trigger the
> >> events in kernel, for example. I like to have this possibility.
> >>
> >> --
> >> Otavio Salvador                             O.S. Systems
> >> E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
> >> Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
> >>
> >
> > Ok, so udevadm should stay in udev-utils. In that case i propose we:
> >
> > a) Add ${bindir}/udevadm and ${base_sbindir}/udevadm to
> > FILES_udev-utils. This should
> > ensure that udevadm will always go in udev-utils regardless of the
> > udev version being built.
> > This should also ensure that udev-utils package will always be made.
> >
> > b) Make udevadm available in both ${bindir} and ${base_sbindir} via
> > symlinks installed in
> > do_install_append. This should ensure proper support for all versions of udev.
> 
> I like your plan.
> 
> +1
> 

Oh dear, i completely forgot about this patch. It's been sitting in my
local repo for weeks!

So here's my (hopefully) final solution:

${base_sbindir}/udevadm ${bindir}/udevadm"
 
 RDEPENDS_udev-consolekit += "udev-acl"
 FILES_udev-consolekit = "${libdir}/ConsoleKit"
@@ -97,4 +97,19 @@ do_install_append () {
        rm -f ${D}${base_libdir}/udev/hid2hci
 
        echo 'udev_run="/var/run/udev"' >>
${D}${sysconfdir}/udev/udev.conf
+       
+       #Starting with udev 176, udevadm is by default installed in
${bindir}.
+       #To properly support all versions of udev we make udevadm
available
+       #in ${bindir} and in ${base_sbindir}.
+               
+       if [ "${PV}" -gt "175" ]
+       then
+               install -d ${D}${base_sbindir}
+               ln -s ${bindir}/udevadm ${D}${base_sbindir}/udevadm
+
+       else
+               install -d ${D}${bindir}
+               ln -s ${base_sbindir}/udevadm ${D}${bindir}/udevadm
+
+       fi
 }
Otavio Salvador - Dec. 13, 2012, 11:30 p.m.
On Thu, Dec 13, 2012 at 5:53 PM, Marko Kati? <dromede@gmail.com> wrote:
> Oh dear, i completely forgot about this patch. It's been sitting in my
> local repo for weeks!
>
> So here's my (hopefully) final solution:

The patch seems broken for my e-mail reader (dunno if you pasted it here).

--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

Patch

diff --git a/meta/recipes-core/udev/udev.inc
b/meta/recipes-core/udev/udev.inc
index 4705b9b..677c33a 100644
--- a/meta/recipes-core/udev/udev.inc
+++ b/meta/recipes-core/udev/udev.inc
@@ -74,7 +74,7 @@  FILES_udev-cache = "${sysconfdir}/init.d/udev-cache
${sysconfdir}/default/udev-c
 
 FILES_udev-acl = "${base_libdir}/udev/udev-acl
${base_libdir}/udev/rules.d/70-acl.rules"
 
-FILES_udev-utils = "${bindir}/udevinfo ${bindir}/udevtest
${base_sbindir}/udevadm"
+FILES_udev-utils = "${bindir}/udevinfo ${bindir}/udevtest