this post was submitted on 19 Nov 2023
25 points (93.1% liked)

Linux

48077 readers
884 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I am working on creating deb/rpm packages for an OSS tool I use. So far, I have been manually testing each deb/rpm in a virtualbox live cd version of that OS but it's tedious to do that for every release. This is a GUI tool, I basically just need to confirm that the apt install goes correctly and the program can actually launch. There is a systemd service associated with it I'd also like to check the existence/status of. In the future, we may make a flatpak as well.

Are there any tools to automate this process? Or maybe if it can't test the GUI functionality it can at least install and take a screenshot and I can review the screenshot?

top 8 comments
sorted by: hot top controversial new old
[–] Atemu@lemmy.ml 29 points 11 months ago

This kind of integration testing is best left up to the individual distros. Same as the integration (as in: packaging) itself.

Distros don't want your binary package, they want your source code, build instructions and a build system that won't make them cry. Some distros even explicitly disallow re-packaging external binary distributions.

As a distro maintainer, I appreciate your wish to do QA on all the distros but that's just too much work. You focus on making your software better, we focus on making it work with the rest of the software ecosystem.

Providing a package for one or two distros (i.e. your favourite one) is good practice to ensure your software can be reasonably packaged but it's not the primary way your users should receive your package in the traditional Linux distro model.
Additionally, you might want to package your software for one of the cross-distro package managers such as Flatpak, AppImage, Snap, Nix, Guix, distri or homebrew. This can serve distro maintainers as a point of reference; showing how it is intended to work so they can compare their packaging effort. If there's some bug present in the distro package but not the cross-distro package, that's a good sign the issue lies in the distro packaging for example.
Again, don't put much time in this. Focus on your app.

[–] BCsven@lemmy.ca 13 points 11 months ago* (last edited 11 months ago) (1 children)

https://Open.qa it is an OpenSUSE tool but it can be used to auto test installs of any OS/software. Their open build service also automates and tests package building

[–] andruid@lemmy.ml 2 points 11 months ago

OpenQA is the best answer that I know of for this too! You can even trigger from Gitlabs CI jobs if you are already here.

[–] tmat256@lemmings.world 4 points 11 months ago

If it were me and I was intending to automate this I would probably do the following. Set up each test distro as a VirtualBox image and take a snapshot so I could easily roll back. Then I would write a script for each distro that downloaded the package, installed and launched the app. I would then probably query the window system to make sure the gui showed up, wait a period of time if I had to and take a screenshot.

This can probably all be done as a set of bash scripts.

[–] Pantherina@feddit.de 4 points 11 months ago* (last edited 11 months ago)

Not mentioned here so:

  • virt-manager is better than virtualbox.
sudo dnf install qemu qemu-kvm virt-manager
sudo groupadd libvirt
sudo usermod -aG libvirt $USER
systemctl enable --now libvirtd
virt-manager

Thats the way on Fedora, debian packages are called a bit differently, Ubuntu again, but that method works.

Also for packaging an app that just works, why not flatpak? Especially if its a GUI app, this would highly improve availability on many Distros not covered by RPMs and DEBs. Also RPMs can have dependency conflicts between Opensuse and Fedora because naming, probably similar with Ubuntu and Debian.

[–] GamesRevolution@programming.dev 3 points 11 months ago (1 children)

I think there would be a way to test it with docker, you could find a image that has systemd installed and use something like distrobox to test it with the GUI.

[–] infeeeee@lemm.ee 10 points 11 months ago (1 children)