#1611 PR merged: config-functions.sh - partial rewrite of SetOSVendorAndVersion

Labels: enhancement, fixed / solved / done

gdha opened issue at 2017-11-30 14:19:

For issue #731 we tried to avoid the usage of lsb_release, therefore, we try to extract all required info from /etc/os-release, or /etc/system-release, or /etc/issue before falling back to lsb_release.
In later stadium we will also write the /etc/rear/os.conf file instead of being auto-created by installing the rpm. For Debian or Ubuntu that did not happen. So, that is one of the reasons to harmonize the creation of /etc/os.conf.

This PR is not complete, but I wanted to push it forward for your comments etc...

jsmeix commented at 2017-12-04 09:12:

Because all reviewers approved it
I would merge it soon today
to get it into ReaR 2.3.

gdha commented at 2017-12-04 10:05:

Would like to make some more updates before I push into rear-2.3. Will do this today

gdha commented at 2017-12-04 11:03:

@rear/contributors May I clean up the rear.spec file which auto creates the os.conf file, or shall we wait to do this after the release of 2.3?

jsmeix commented at 2017-12-04 12:03:

because rear.spec for the "official" rear RPMs for SLES
and openSUSE is independent of rear.spec in OBS
I don't mind what you prefer for rear.spec in OBS.

I assume when os.conf is created by rear.spec (during build time)
it ensures that the right build-tim values are hardcoded/predefined
which could be more fail-safe provided users install a matching
rear RPM package but on the other hand this way most users
won't test if the run-time automatism via SetOSVendorAndVersion()
actually works.

[Export of Github issue for rear/rear.]