Outils pour utilisateurs

Outils du site


issue181:c_c

Ceci est une ancienne révision du document !


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.

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

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.

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

issue181/c_c.1653718475.txt.gz · Dernière modification : 2022/05/28 08:14 de d52fr