#1713 PR merged: Remove the os.conf creation in the rear.spec file

Labels: enhancement, cleanup, fixed / solved / done

gdha opened issue at 2018-01-26 17:02:

Remove the os.conf creation in the rear.spec file and fixed in function SetOSVendorAndVersion the proper detection of RedHatEnterpriseServer. Added new script usr/share/rear/init/default/005_verify_os_conf.sh to create the os.conf if it did not exist yet - issue #1639

jsmeix commented at 2018-01-29 11:50:

@gdha
I did not have a closer look how those things work
but I wonder why os.conf needs to be created at all
during "rear WORKFLOW" runtime?
I.e. I wonder why it is not sufficient to only rely
on the SetOSVendorAndVersion() function
during "rear WORKFLOW" runtime?

gdha commented at 2018-01-29 14:27:

@jsmeix os.conf is important during the recover phase as we cannot trust that the SetOSVendorAndVersion() function will work properly.

jsmeix commented at 2018-01-30 09:58:

Yes, but why is /etc/rear/os.conf autocreated in the original sytem?

Why not only autocreate a $ROOTFS_DIR/etc/rear/os.conf in the recovery system
e.g. in the same way as $ROOTFS_DIR/etc/rear-release gets autocreated by
build/default/970_add_rear_release.sh ?

In general I do not like it when any "rear WORKFOLW" automatically
changes the original system without an explicit user request.
I think in general the original system should be sacrosanct - except there is
really a very good reason to automatically change the original system.

gdha commented at 2018-01-30 10:20:

@jsmeix I prefer to have the discussion in #1639 if that is ok for you?

jsmeix commented at 2018-01-30 11:06:

@gdha
of course you are right.
This pull request is done and further things should
happen in https://github.com/rear/rear/issues/1639

schlomo commented at 2023-03-06 12:10:

@gdha this is old stuff, but I have a very important question: What needs the /etc/rear/os.conf file on the original system? Wouldn't it be enough to only write that to the rescue system instead?

The reason I'm asking are two problems I encounter:

  1. the file will never change, even if the OS is upgraded to a newer version
  2. the file is created in the source tree if I run ReaR from checkout, and it stays there forever even if I try ReaR on a different VM

So I'd like to find out if I can move it to the rescue system only. Or maybe we actually don't need it any more because /etc/os-release is now the de-facto standard in any case?

jsmeix commented at 2023-03-14 11:52:

See also
https://github.com/rear/rear/pull/2954#issuecomment-1467929248


[Export of Github issue for rear/rear.]