Skip to content

Conversation

PavolSloboda
Copy link

Adds the labeling rules needed to handle the symlinks and files used by the mariadb and oracle upstreams and redhat downstream regarding the /usr/bin and /usr/sbin directories. Also adds the handling of /usr/libexec/mysld as a file and as a symlink.
These changes were prompted by the fedora change:
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
Prompting us to migrate to /usr/bin but we also need to keep the /usr/sbin file locations for rhel, older fedoras (f41 and lower) and for the mariadb and oracle upstreams.

Since the introduction of this fedora change:
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin#Scope
which changes /usr/sbin to a symlink to /usr/bin some changes needed
to be done about the labeling of the mariadb/mysql files

This change handles the mysqld file:
* oracle upstream => has it in /usr/bin as a file
* mariadb upstream => has it in /usr/sbin as a symlink to
  /usr/sbin/mariadbd
* redhat f41 and lower + rhel => in /usr/sbin as a symlink to
  /usr/libexec/mysqld
* redhat f42 and higher => in /usr/bin as a symlink to
  /usr/libexec/mysqld
Since the introduction of this fedora change:
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin#Scope
which changes /usr/sbin to a symlink to /usr/bin some changes needed
to be done about the labeling of the mariadb/mysql files

This change handles the mariadbd file:
* mariadb upstream => has it in /usr/sbin as a file
* redhat f41 and lower + rhel => in /usr/sbin as a symlink to
  /usr/libexec/mariadbd
* redhat f42 and higher => in /usr/bin as a symlink to
  /usr/libexec/mariadbd
since there 2 different ways that the mysqld file can be located inside
/usr/libexec:
* downstream mysql packages => /usr/libexec/mysqld is a file
* downstream mariadb packages => /usr/libexec/mysqld is a symlink to
  /usr/libexec/mariadbd

We need to specify 2 different rules for said file, one for having it as
a file and one for the symlink.
@PavolSloboda PavolSloboda changed the title Update tp mariadb and mysql labels for bin sbin and libexec Update fc mariadb and mysql labels for bin sbin and libexec Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant