fusioninventory / fusioninventory-agent

FusionInventory Agent
http://fusioninventory.org/
GNU General Public License v2.0
253 stars 125 forks source link

Add support for Flatpak #1002

Open NiklasWagner opened 2 years ago

NiklasWagner commented 2 years ago

Since flatpak is growing a lot in popularity and is even installed now by default by many distributions, it would be great to see support in fusion inventory.

Since snap and flatpak features are quite similar, it should be pretty straightforward to implement it. The commands are quite similar to snap, there is a list command to see all packages and info to inspect each package:

$ flatpak list 
Name                                              Application ID                                                 Version                         Branch                Installation
OBS Studio                                        com.obsproject.Studio                                          27.2.1                          stable                user
Spotify                                           com.spotify.Client                                             1.1.77.643.g3c4c6fc6            stable                user
DBeaver Community                                 io.dbeaver.DBeaverCommunity                                    21.3.5                          stable                user
MariaDB Client                                    io.dbeaver.DBeaverCommunity.Client.mariadb                                                     stable                user
PostgreSQL Client                                 io.dbeaver.DBeaverCommunity.Client.pgsql                                                       stable                user
$ flatpak info com.obsproject.Studio

OBS Studio - Live streaming and video recording software

          ID: com.obsproject.Studio
         Ref: app/com.obsproject.Studio/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 27.2.1
     License: GPL-2.0
      Origin: flathub
  Collection: org.flathub.Stable
Installation: user
   Installed: 479,7 MB
     Runtime: org.kde.Platform/x86_64/5.15-21.08
         Sdk: org.kde.Sdk/x86_64/5.15-21.08

      Commit: b513f30ed9aa07f238a831bf58fc2304d2bfdf8b5ab61dcbd36722a2bf5150d4
      Parent: 85c8f95813dcb4cbce71d88b8cfd50dfa7945beac88c616ed3aed66e707b0620
     Subject: Export com.obsproject.Studio
        Date: 2022-02-21 22:51:49 +0000
ddurieux commented 2 years ago

Nice, will check it ;)

g-bougard commented 2 years ago

Hi @ddurieux

feel free to backport GLPI-Agent implementation.