#142 Issue closed: /etc/rear/os.conf installed with rpm (of snapshot)

Labels: bug

gdha opened issue at 2012-08-02 09:38:

On OpenSUSE build a rpm (from the latest git snapshot) and installed it:

# rpm -ivh ./rear-1.13.0-1.git201208021044.noarch.rpm
linux-1il4:/etc/rear # cat os.conf
OS_VENDOR=SUSE_LINUX
OS_VERSION=0

As, you see the OS_VERSION=0 is wrong, and, it shouldn't be installed during a rpm installtion as it is created for the rescue environment. We must get rid of it in our rpm build.
You better just delete the /etc/rear/os.conf after the rpm installation.

dagwieers commented at 2012-08-02 11:13:

Rather than removing the /etc/rear/os.conf from the RPM, can't we first look why the value is 0 ?

I don't mind requiring LSB for the SuSE packages (I don't use SuSE myself) but I can imagine that for the same reason we don't want these dependencies on RHEL, the SuSE users may not want them on SuSE...

dagwieers commented at 2012-08-02 11:19:

BTW Is this an OBS build, or a manual build on an OpenSUSE system ?

gdha commented at 2012-08-02 12:11:

The RPM package was build manually on an OpenSUSE 12.1 system . However, once the file has been removed the recreated os.conf file contains correct values. Very bizarre phenomenon.

dagwieers commented at 2012-08-02 20:37:

I can confirm there's a bug in the OBS OpenSUSE packaging, but not in the SLES packaging. So there must be something wrong with the suse_version macro. The sles_version macro does work correctly. See: http://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto for the details...

dagwieers commented at 2012-08-02 20:41:

I think I understand the problem. OpenSUSE ships with %suse_version set to the correct number, and %sles_version set to 0 (instead of undefined) and because of the order of the entries the %sles_version overwrites the %suse_version.

I think it was a very unwise decision from SuSE to implement it like this because now you have to use the harder %ifdef constructs...I'll implement a work-around :-(

dagwieers commented at 2012-08-02 20:45:

Fixed by 3564a38661ebd8246ea3543bd09feae5432f6ddd


[Export of Github issue for rear/rear.]