Outils pour utilisateurs

Outils du site


issue181:c_c

For this issue, I would like us to look at software. Not just any software, but Ubuntu software. When I get software for Ubuntu, I prefer it to be packaged in the .deb format. Many years ago I had such a bad experience with Red Hat and .rpm and dependency hell, that has put me off rpm to this day. That was when a friend introduced me to Debian and the simplicity that was its package manager. I was so impressed that I would use alien to convert the packages to rpm, believing they were superior. You see, back in the day the propaganda had you believe Red Hat was the gold standard. (And we were all young and dumb.) For .deb files, my favourite tool is gdebi. The amount of information at your fingertips is amazing. If you never used gdebi to inspect a .deb file, what have you been doing with your life? Here I have an example, and you can see 4 tabs, Description, Details, Included files and Lintian output. This allows you to drill down and see “inside” the package, but I am getting ahead of myself. This is supposed to be a whistle wetter.

Pour ce numéro, j'aimerais que nous nous penchions sur les logiciels. Pas n'importe quels logiciels, mais les logiciels d'Ubuntu. Lorsque j'obtiens un logiciel pour Ubuntu, je préfère qu'il soit en format .deb. Il y a de nombreuses années, j'ai eu une mauvaise expérience avec Red Hat, les .rpm et l'enfer des dépendances, ce qui m'a détourné des rpm jusqu'à aujourd'hui. C'est alors qu'un ami m'a fait découvrir Debian et la simplicité de son gestionnaire de paquets. J'étais tellement impressionné que j'utilisais alien pour convertir les paquets en rpm, croyant qu'ils étaient supérieurs. Vous voyez, à l'époque, la propagande vous faisait croire que Red Hat était l'étalon-or. (Et nous étions tous jeunes et idiots.)

Pour les fichiers .deb, mon outil préféré est gdebi. La quantité d'informations disponibles au bout de vos doigts est incroyable. Si vous n'avez jamais utilisé gdebi pour inspecter un fichier .deb, qu'avez-vous fait de votre vie ?

Voici un exemple, et vous pouvez voir 4 onglets : Description, Détails, Fichiers inclus et Sortie Lintian. Cela vous permet d'explorer en profondeur et de voir « l'intérieur » du paquet, mais je vais trop vite. C'est censé vous mettre en appétit.

For now, I would like you to open a .deb file with file roller or your favourite archiver. This is where you will notice slight differences in the same .deb package for pure Debian and Ubuntu and other Debian derivatives. This is the reason why people tell you not to install Ubuntu packages in Debian. There is some homework for you - grab a pure Debian file and an Ubuntu file of the same package, something small, like sound converter or a terminal emulator and compare them by opening them with your archiver and we can talk bout them in the next issue? Most of you would have known only the software centre, as by default, that is what Ubuntu opens .deb files with. Now you can add another tool to your arsenal, namely Synaptic package manager. This will also gladly install your .deb files. Lastly I want to bring packagekit to your attention. As you can see, you have a lot of options when working with .deb files. From the command prompt, most of you would know apt (or apt-get) to install your software. I am here to tell you that dpkg is just as easy, with: dpkg -i <.deb file> and Bob's your uncle. It is intuitive with -i for install and -r for remove. Though the software centre is easy, it abstracts from installation messages. Since the .deb files are standardized (to an extent) you can write your own bash scripts to update your system. Examples of this are not hard to find. (https://www.addictivetips.com/ubuntu-linux-tips/make-updating-ubuntu-simpler/)

Pour l'instant, je voudrais que vous ouvriez un fichier .deb avec file roller ou votre archiveur préféré. C'est là que vous remarquerez de légères différences dans le même paquet .deb pour un fichier Debian pur et pour Ubuntu et d'autres dérivés de Debian. C'est la raison pour laquelle les gens vous disent de ne pas installer les paquets Ubuntu dans Debian. Voici ce qu'il faut faire à la maison : prenez un fichier Debian pur et un fichier Ubuntu du même paquet, quelque chose de petit, comme un convertisseur de son ou un émulateur de terminal et comparez-les en les ouvrant avec votre archiveur ; nous pourrions en parler dans le prochain numéro…

La plupart d'entre vous ne connaissent que le centre des logiciels, car par défaut, c'est avec lui qu'Ubuntu ouvre les fichiers .deb. Vous pouvez maintenant ajouter un autre outil à votre arsenal, à savoir le gestionnaire de paquets Synaptic. Il installera volontiers vos fichiers .deb aussi. Enfin, je voudrais attirer votre attention sur packagekit. Comme vous pouvez le constater, vous avez beaucoup d'options lorsque vous travaillez avec des fichiers .deb.

À l'invite de commande, la plupart d'entre vous connaissent apt (ou apt-get) pour installer vos logiciels. Je suis ici pour vous dire que dpkg est tout aussi facile, avec : dpkg -i <fichier .deb> et le tour est joué. C'est intuitif avec -i pour installer et -r pour enlever. Bien que le centre des logiciels soit facile, il fait abstraction des messages d'installation. Comme les fichiers .deb sont standardisés (dans une certaine mesure), vous pouvez écrire vos propres scripts bash pour mettre à jour votre système. Des exemples de ce type ne sont pas difficiles à trouver. (https://www.addictivetips.com/ubuntu-linux-tips/make-updating-ubuntu-simpler/)

When I first started with Debian packages, you used the tool dpkg to install them. I still have nightmares about dpkg –reconfigure though… The difference in all of these package managers are the way they handle dependencies. Apt being the ‘top dog’ at the moment. To see the dependencies you would need to use the terminal instead, you see, software centre just goes ahead with -y install option. A GUI tool like gdebi allows you to see that your .deb file may need more. (Notice the Details-button) This is where “new” package formats like Snap and AppImage make worrying about these things obsolete. I like to see boot messages whizz by, I like to see what else my .deb file needs. I like to look at my Lintian output, before installing anything, as I do not install a file when I see things like this: W: jellyfin-server: executable-not-elf-or-script usr/lib/jellyfin/bin/Microsoft.Extensions.Configuration.Xml.dll -but I may just be ‘old skool’. To realise that all of this information comes from a simple .deb file is nothing short of amazing. When you start treating your .deb files as information carriers and not just installers, there is another world opening up to you.

Quand j'ai commencé à utiliser les paquets de Debian, on utilisait l'outil dpkg pour les installer. Cependant, je fais toujours des cauchemars à propos de dpkg –reconfigure … La différence entre tous ces gestionnaires de paquets est la façon dont ils gèrent les dépendances, apt étant le « meilleur » pour le moment.

Pour voir les dépendances, vous devriez utiliser le terminal à la place ; voyez-vous, le centre des logiciels prend de l'avance avec l'option -y install. Un outil GUI comme gdebi vous permet de voir que votre fichier .deb peut avoir besoin de plus. (Remarquez le bouton Détails.)

C'est là que les « nouveaux » formats de paquets comme Snap et AppImage rendent obsolète le fait de se soucier de ces choses. J'aime voir les messages de démarrage défiler, j'aime voir ce dont mon fichier .deb a besoin. J'aime regarder la sortie de mon Lintian, avant d'installer quoi que ce soit, car je n'installe pas un fichier quand je vois des choses comme ceci : W : jellyfin-server : executable-not-elf-or-script usr/lib/jellyfin/bin/Microsoft.Extensions.Configuration.Xml.dll - mais je suis peut-être simplement « de la vieille école ».

Réaliser que toutes ces informations proviennent d'un simple fichier .deb est tout simplement incroyable. Lorsque vous commencez à traiter vos fichiers .deb comme des porteurs d'information et pas seulement comme des installeurs, un nouveau monde s'ouvre à vous.

Now we could talk about all the command line options for these package managers to handle the humble .deb file, but I am sure you are familiar with the man command, besides I will link you at the end of the article as there is no point in reinventing the wheel. I suppose I cannot leave you with only this titbit of information. You have the power at your fingertips! You can build your own deb-files. You need to install some .deb files to build some .deb files. HEH! Type the following in a terminal: sudo apt install dpkg-dev and sudo apt install devscripts -to start. I won’t be walking through making a deb-file this issue as I have taken up enough space, but why don’t you? Hopefully I have set the ball rolling on multiple fronts and if you would like to take a side trip down this road, why not let us know: misc@fullcrclemagazine.org Further reading: https://www.digitalocean.com/community/tutorials/ubuntu-and-debian-package-management-essentials

Nous pourrions parler de toutes les options de ligne de commande permettant à ces gestionnaires de paquets de gérer l'humble fichier .deb, mais je suis sûr que vous êtes familier avec la commande man, vers laquelle je vous renverrai d'ailleurs à la fin de l'article car il est inutile de réinventer la roue.

Je suppose que je ne peux pas vous laisser avec cette seule information. Vous avez le pouvoir au bout de vos doigts ! Vous pouvez créer vos propres fichiers deb. Vous devez installer certains fichiers .deb pour construire certains fichiers .deb. HEH ! Tapez ce qui suit dans un terminal : sudo apt install dpkg-dev et sudo apt install devscripts - pour commencer. Je ne me promènerai pas à travers la création d'un fichier .deb dans ce numéro car j'ai pris assez de place, mais pourquoi pas vous ?

J'espère avoir ouvert la voie sur plusieurs fronts et si vous souhaitez faire un petit tour sur ce chemin, pourquoi ne pas nous le faire savoir : misc@fullcrclemagazine.org.

Pour en savoir plus :

https://www.digitalocean.com/community/tutorials/ubuntu-and-debian-package-management-essentials

issue181/c_c.txt · Dernière modification : 2022/06/02 18:16 de andre_domenech