I maintain the packages 'mariadb' and 'community-mysql'. Sub-packages of each of them need the user 'mysql' to be present prior installation. Both manually create the user in the %pre section. I found out a different system should be used nowadays: https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/#_dynamic_allocation Introduced by this change: https://fedoraproject.org/wiki/Changes/Adopting_sysusers.d_format However while the change talks about the possibility of a setup of multiple packages requiring the same user, the packaging guidelines do not cover this topic. I'm not sure how to implement it properly, so I need help with my case, and I ask for the guidelines to be extended. -- The MariaDB upstream ships a simple 'sysusers.conf' file. I already pack it, so the resulting RPM already has - thanks to this: | Provides: | group(mysql) | user(mysql) Based on the documentation in the guidelines, I guess it's never actually applied though, since I always define the user manually, before the sysuser file could take effect. I'd like to move the 'sysusers.conf' file to a separate sub-package, and use it by both mariadb-server and community-mysql-server RPMs. I guess the following code would be for the sub-package shipping the 'sysusers.conf' file: | %package system-user-mysql | Summary: This package provides system user 'mysql' | %description system-user-mysql | This package provides system user 'mysql' | | %files system-user-mysql | %{_sysusersdir}/%{pkg_name}.conf And then for the 'mariadb-server', which needs the user, the code would be: | Requires(pre): user(mysql) | Requires(pre): group(mysql) but I'm not sure whether I'm not missing any of those, and/or where: | BuildRequires: systemd-rpm-macros | %{?sysusers_requires_compat} | | %pre | %sysusers_create_compat %{SOURCE3} Likely because I don't understand where/when the systemd picks up, recognizes the installed file and actually creates the user, if it does not exist already. Michal -- Michal Schorm Software Engineer Core Services - Databases Team Red Hat -- -- _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue