Red Hat: use CODENAME_MAJOR in all conditions

The condition was never respected because $CODENAME is not6 but 6.5.
We have to use CODENAME_MAJOR instead.