URL: https://linuxfr.org/users/sygne/journaux/linux-from-scratch-face-a-udev Title: Linux from scratch face à udev Authors: Sygne Date: 2012年09月05日T20:01:52+02:00 License: CC By-SA Tags: udev et linux_from_scratch Score: 61 Bonjour à tous, Puisqu'il est à nouveau question d'udev [ici](https://linuxfr.org/users/neil--2/journaux/udev-forke), il ne me semble pas inutile de résumer les échanges qui ont eu lieu sur la liste de discussion de _linux from scratch_ au mois de mai. Ces échanges me semblent intéressants car ils montrent en quoi le fork d'udev a pu paraître nécessaire. À moins qu'ils ne montrent au contraire que le fork d'udev n'était pas nécessaire. Je vous en laisse seuls juges. L'annonce ========= Tout a commencé un Vendredi, le 25 mai, par un mail d' [Armin K.](http://linuxfromscratch.org/pipermail/lfs-dev/2012-May/066416.html) :> Systemd announce mail arrived today and I'll just post some highlights from Change Log. Le changelog d'udev indique que désormais, les sources d'udev sont incorporées à systemd, et que systemd doit être compilé pour pouvoir compiler udev :> All udev sources are merged into the systemd source tree now. All future udev development will happen in the systemd tree. It is still fully supported to use the udev daemon and tools without systemd running, like in initramfs or other init systems. Building udev though, will require the *build* of the systemd tree, but udev can be properly *run* without systemd. Or, si udev a besoin de systemd, systemd a besoin quant à lui de dbus et de libcap pour compiler, et [Bruce Dubbs](http://linuxfromscratch.org/pipermail/lfs-dev/2012-May/066417.html) s'attriste de devoir introduire dbus à LFS :> We'll need to add dbus to LFS. :( I suppose we will need to do a minimal install in LFS and a more complete install with all the bells and whistles in BLFS. [Jeremy Huntwork](http://linuxfromscratch.org/pipermail/lfs-dev/2012-May/066419.html) propose d'utiliser des alternatives à udev, telle mdev, de busybox. Mais [Ken Moffat](http://linuxfromscratch.org/pipermail/lfs-dev/2012-May/066421.html) rappelle que xorg – comme nombre d'applications graphiques – ne peut fonctionner sans udev. [Bryan Kadzban](http://linuxfromscratch.org/pipermail/lfs-dev/2012-May/066422.html) propose alors de modifier l'archive de systemd/udev, pour pouvoir n'installer qu'udev :> Maybe we can hack up the systemd package to install just udev, if there's no option to do that today? It'd be annoying to have to maintain that diff though. [Markku Pesonen](http://linuxfromscratch.org/pipermail/lfs-dev/2012-May/066423.html) espère que ce problème de dépendance de compilation soit résolu upstream, et rappelle que, dans la liste de discussion d'udev, [Key Sievers](http://article.gmane.org/gmane.linux.hotplug.devel/17392) affirmait qu'udev continuerait à pouvoir être compilé comme avant, malgré son incorporation à systemd :> After udev is merged into the systemd tree you can still build it for usage outside of systemd systems, and we will support these builds officially. In fact, we will be supporting this for a long time since it is a necessity to make initrds (which lack systemd) work properly. Distributions not wishing to adopt systemd can build udev pretty much the same way as before, however should then use the systemd tarball instead of the udev tarball and package only what is necessary of the resulting build. [Bruce Dubbs](http://linuxfromscratch.org/pipermail/lfs-dev/2012-May/066426.html) rappelle alors les dépendances de compilation de systemd – dépendances qui n'ont aucune autre utilité sur LFS :> 1. It wants intltool> 2. It wants intltool's dependency XML::Parser> 3. It wants libpcap2 and implicitly it's dependency attr> 4. It wants pkgconfig but that can be worked around> 5. It wants usbutils and it's dependency libusb> 6. It wants pciutils> 7. It wants D-Bus>> And that's just to get through configure.> The problem is that none of these libraries are used for udev. Comme il le dira [plus tard](http://linuxfromscratch.org/pipermail/lfs-dev/2012-July/066764.html), il est opposé à installer toutes ces dépendances dans LFS rien que pour compiler un paquet qui ne sera pas utilisé :> I am opposed to adding extra libraries to LFS just to satisfy systemd configure requirements for code we are not going to use. [Jeremy Huntwork](http://linuxfromscratch.org/pipermail/lfs-dev/2012-May/066427.html) propose d'insister pour que upstream fasse quelque chose :> Perhaps the best solution is to complain loudly to upstream and hope that enough do so that they build into the package the ability to build and install only the udev components as they said would be possible. Mais [Bruce Dubbs](http://linuxfromscratch.org/pipermail/lfs-dev/2012-May/066428.html) doute que cela soit efficace, et préfère créer un nouveau makefile à udev, makefile qui évite la dépendance de compilation qu'est systemd.> I may do that, but they really haven't been too receptive. I'm going to look to see what is in the 'common' library that udev needs, but doesn't need all those extra libraries. I may be able to just create a custom Makefile that builds/installs just what we need without going through autotools or configure. Le patch ======== [Dan Nicholson](http://linuxfromscratch.org/pipermail/lfs-dev/2012-May/066475.html) propose alors un patch du système de compilation d'udev, qui pourra être envoyé upstream :> Have any of you guys considered actually making patches and sending them upstream? The autotools are not that scary. Having been both upstream and downstream, my guess is that those guys will accept patches that allow a udev-only build, but they just don't have any interest in doing that work themselves. I'm sure there are more than a few people around who are interested in that scenario (they're already showing up on the hotplug list) who would test and push for the patches. If it's that critical to keep systemd out of LFS, then you'd probably be best served by taking control of the situation. IMO. Here's an untested patch to get you started. L'équipe de LFS travaille alors sur le patch... Tout en regrettant que l'équipe d'udev ne s'en soit pas tenue à ses affirmations, ainsi [Andrew Benton](http://linuxfromscratch.org/pipermail/lfs-dev/2012-May/066501.html) rappelle la rude vérité :> When they merged udev and systemd they said that it'd be possible to install just udev without systemd but with the very first merged release it is impossible to install udev without all of systemd's dependencies... Néanmoins, le patch progresse, de sorte que, une semaine après l'incorporation de dbus à systemd, l'équipe de lfs parvient à passer l'étape de la configuration avec son patch, et c'est [Andrew Benton](http://linuxfromscratch.org/pipermail/lfs-dev/2012-May/066515.html) qui l'annonce :> It helps. I can get through configure Ok, but I can't see a way to get through make without dbus. Reste donc à gérer la dépendance à dbus... La résolution des dépendances ============================= Mais [Bruce Dubbs](http://linuxfromscratch.org/pipermail/lfs-dev/2012-May/066513.html) rappelle que, même avec ce patch, la compilation d'udev suppose néanmoins l'installation de pkg-config, qui dépend quant à lui de python :> To answer a question you may not be up to speed on, we don't install pkg-config in lfs because the pkg-config developers inconveniently made it depend on glib. The dependencies are : glib (required), libffi (required), Python (required), pkg-config (recursive, but can work around). We are in the position of needing to install four packages (one incomplete) just to satisfy the systemd build methodology that requires things we don't need for udev. Il propose de créer un nouveau makefile pour udev plutôt qu'un patch. Mais [Andrew Benton](http://linuxfromscratch.org/pipermail/lfs-dev/2012-May/066517.html) lui répond qu'il préfère un patch qui puisse être appliqué upstream. Se pose alors la question d'ajouter pkg-config à LFS. Le fait qu'il dépende de python est bloquant, et installer une version plus ancienne soulèverait trop de difficultés. _In fine_, l'équipe trouve un remplaçant à pkg-config – [pkg-config-lite](http://sourceforge.net/projects/pkgconfiglite/), qui a beaucoup moins de dépendances. Aujourd'hui il sembe néanmoins que ce soit pkg-config et non pas pkg-config-lite qui ait été incorporé à LFS. La solution =========== Finalement, la même journée, [Bruce Dubbs](http://linuxfromscratch.org/pipermail/lfs-dev/2012-May/066456.html) annonce que le patch fonctionne.> Try the attached patch. It ran with only one minor warning (easily fixed) in install.sh from the lfs chapter 6 environment. Après quelques modifications, et de nombreux tests, [Bruce Dubbs](http://linuxfromscratch.org/pipermail/lfs-dev/2012-May/066469.html) décide d'incorporer le patch à LFS :> I rebooted and udev from systemd seems to work with the patch. I think the patch is good. If someone (Matt?) can test and confirm that it works, I'll put it in the book. Dorénavant, LFS maintient donc un patch permettant à udev de compiler sans systemd, et fournit un paquet contenant une archive d'udev patchée. Je n'ai pas trouvé trace, dans la liste de discussion de LFS, de tentatives d'envoyer ce patch upstream. - [le patch](http://www.linuxfromscratch.org/~bdubbs/systemd-udev/) - [paquet udev-lfs](http://anduin.linuxfromscratch.org/sources/other/udev-lfs-189.tar.bz2) - [page de lfs consacrée à udev](http://www.linuxfromscratch.org/lfs/view/development/chapter06/udev.html)

AltStyle によって変換されたページ (->オリジナル) /