fusioninventory-agent icon indicating copy to clipboard operation
fusioninventory-agent copied to clipboard

Official Support for OpenSUSE / SLES

Open DJViking opened this issue 5 years ago • 10 comments

Could we get official support for OpenSUSE Leap and SLES? http://fusioninventory.org/documentation/agent/installation/linux/ You could maintain RPM packages in an openSUSE Build Service repository?

There are a few Community repositories that have built fusioninventory for OpenSUSE, but we are not comfortable with using such repositories.

DJViking avatar Jan 03 '19 12:01 DJViking

Hi @DJViking this is not a priority for us but should be done at some time in the future as @guillomovitch maintained such service in the past and this should be easy. If you really need a quick full and official support, you may think to purchase a GLPI Networks subscription and escalate this need to us.

g-bougard avatar Jan 03 '19 13:01 g-bougard

Hi.

It's trivial to produce those packages on openSUSE Build Service repository, but without any knowledge of this distribution ecosystem, and no actual host to at least test installation, you have no idea about the availability of your dependencies, such as the multiple additional perl modules needed by the agent. That's one of my main concern against OBS, actually: if you can't run a package, it's quite useless to be able to produce it.

So, I preferred to drop those packages instead of giving the false impression they were ready to use. May be you can retrieve the old spec files if they are versionned.

guillomovitch avatar Jan 03 '19 17:01 guillomovitch

There is a community repository on OBS which has fusioninventory. https://build.opensuse.org/package/show/home%3Aciriarte%3Afusioninventory/fusioninventory The OpenSUSE Leap 15.0 repository: https://download.opensuse.org/repositories/home:/ciriarte:/fusioninventory/openSUSE_Leap_15.0/ It has a handfull of Perl modules and dependencies which is needed by fusioninventory.

I have built those source RPMs and installed fusioninventory-agent, but we do have reservation about using a community/user repository.

If you really need a quick full and official support, you may think to purchase a GLPI Networks subscription and escalate this need to us.

I do belive we have GLPI subscription. Got to look into it.

DJViking avatar Jan 03 '19 18:01 DJViking

I installed the RPM packages from the OBS ciriarte repository. Running fusioninventory-agent fails, not sure why. It is the 2.4.2 version of fusioninventory-agent.

Global symbol "%setup" requires explicit package name (did you forget to declare "my %setup"?) at /usr/bin/fusioninventory-agent line 79.
Global symbol "%setup" requires explicit package name (did you forget to declare "my %setup"?) at /usr/bin/fusioninventory-agent line 80.
Global symbol "%setup" requires explicit package name (did you forget to declare "my %setup"?) at /usr/bin/fusioninventory-agent line 107.
Global symbol "%setup" requires explicit package name (did you forget to declare "my %setup"?) at /usr/bin/fusioninventory-agent line 109.
Execution of /usr/bin/fusioninventory-agent aborted due to compilation errors.

DJViking avatar Jan 07 '19 08:01 DJViking

I think this means the packager did something wrong with the setup.pm in its spec file. You should alert him.

g-bougard avatar Jan 07 '19 09:01 g-bougard

The packager fusioninventory-agent.spec

Does this vary in any way from the Fedora RPM that is official? Do you maintain the Fedora RPM packages, or is it a third party packager?

# Preparation step (unpackung and patching if necessary)
%prep
#%setup -q -n %{name}-%{version}
%setup -q -n FusionInventory-Agent-%{version}
%{__sed} -ri \
 -e '/setup\.pm/ s|(/lib/)$|\1FusionInventory/|' \
 -e 's|\$\(DATADIR\)/lib|%{perl_vendorlib}/|' \
 -e '/^authors/ d' \
 Makefile.PL
%{__sed} -ri 's/use setup/use FusionInventory::setup/' bin/fusioninventory-*
%{__sed} -ri \
 -e 's/package setup/package FusionInventory::setup/' \
 -e '/^#/,$ d' \
 lib/setup.pm
# Set the same values as below using ugly hack to not expand %setup macro
echo -n '%' >> lib/setup.pm
cat         >> lib/setup.pm <<EOsetup
setup = (
    confdir => '%{_sysconfdir}/fusioninventory',
    datadir => '%{_datadir}/fusioninventory',
    libdir  => '%{perl_vendorlib}',
    vardir  => '%{_localstatedir}/lib/fusioninventory',
);

The OBS has also RPMs built for RHEL-7. I have taken a look at this RPM spec file and it differs a lot. https://build.opensuse.org/package/show/home%3Awengo%3Afusioninventory-agent/fusioninventory-agent It has a much smaller prep setup step than the spec file from OpenSUSE. It seems the RHEL is also making additional packages for optional tasks.

DJViking avatar Jan 07 '19 10:01 DJViking

I took the files from the RHEL-7 OBS repository and built on OpenSUSE Leap 15, perl-FusionInventory-Agent-2.4.2-2.noarch fusioninventory-agent-2.4.2-2.x86_64

It seems to work.

# /usr/bin/fusioninventory-agent
[error] No target defined, aborting

Tried again:

# /usr/bin/fusioninventory-agent
[info] sending prolog request to server server0
[info] running task Inventory
No such file or directory at 
/usr/share/fusioninventory/lib/FusionInventory/Agent/Task/Inventory/Generic/Dmidecode/Bios.pm line 75.

Killed the process and tried again:

# /usr/bin/fusioninventory-agent
[info] sending prolog request to server server0
[info] running task ESX
[info] Got 0 VMware host(s) to inventory.
[info] running task Collect
[info] running task Deploy
[info] No Deploy job found in server jobs list.
[info] running task Inventory
No such file or directory at 
/usr/share/fusioninventory/lib/FusionInventory/Agent/Task/Inventory/Generic/Dmidecode/Bios.pm line 75.

DJViking avatar Jan 07 '19 10:01 DJViking

It seems like the RHEL-7 package had a Bios.pm.diff that is the cause of the warning

+    if ( open UUIDFILE, "<", "/etc/abs-uuid" ) {
+        $system_info->{'UUID'} =<UUIDFILE>;
+        close UUIDFILE;
+    } else { warn $! };

DJViking avatar Jan 07 '19 12:01 DJViking

I decided to remove all the patches from the RHEL-7 and rebuild on SLES 15.

I contacted the OBS packager for the setup error I got. Still I wonder if I am better off building from the RHEL-7 OBS.

DJViking avatar Jan 07 '19 13:01 DJViking

hi there, Unofficial support for opensuse LEAP / SLES is available here. #821

StefanSa avatar Dec 23 '20 07:12 StefanSa