Hello,
I seek a clarification on the "Users and Groups Guidelines" [1]
chapter of the "Fedora Packaging Guidelines" [2]

Please note I want such case to be clear to newcomers too.
While I am an experienced packager who has a fair idea how to navigate
in Fedora documentation, the same issue might be very confusing to the
packaging beginners among us.

--

During an attempt to update packages I maintain to match the Fedora
Packaging Guidelines, I encountered two different documents, from
which I cannot decide the correct one.
One is the (for me obviously) old [3] Guidelines page on the Wiki, but
it is NOT marked as obsolete, with the new guidelines ( I assume [1] )
linked, at the beginning of the document.

It is not easy to tell which of the documents is newer.
The "last edited" timestamp which is natural for Wiki is missing
entirely in the Docs.
The Docs has a value "Last build" in the footer, but that does not
provide information on the time the specific page was edited last.
My personal opinion is that Fedora has a fairly long ugly history of
documentation mess, so I'd deem it highly useful to NOT remove
lifebuoys (such as timestamps) from the pages, to allow Fedora
contributors to survive in the jungle of obsolete documentation. Git
blame on the page source is a lot of steps to be done to get such
information.

At first, it seems like part of the chapter "Soft static allocation"
with the code example from [4] is missing from the [5].
After careful investigation, it looks like a new system has been
adopted ("<package-name>.sysusers file" instead of "%pre scriptlet").
If that's true, the section "Values given to useradd and groupadd" [6]
feels more like a copy-paste error.
By examining the '%sysusers_create_compat' macro, I found out it does
the same thing as the code snippets in the other document [3].
The macro is brought in by 'systemd-rpm-macros' RPM. The name feels
deceiving - when talking about this very use case - as this very macro
itself is not related to systemd, but that's just one of the things
the package consists of. (so the name fits)

Then there is the package 'setup' [7], referenced by these Guidelines
documents. The package upstream is on Fedora Pagure [8].
And frankly, I have no idea what the package is supposed to do
regarding users, groups and ports listed in files 'uidgid' [9] and
'services' [10].
I am a maintainer of the packages 'community-mysql', 'mariadb' and more.
And I see that the 'mysql' name has a defined entry in both files and
neither is correct (up-to-date).
However I can't say I've ever encountered an issue with that, since I
create the 'mysql' user manually in the packages, as well as allowing
needed ports in the SELinux configuration.
So I would be grateful for an explanation of what those entries in the
'setup' package are used for.

Looking at the 'sysusers.generate-pre.sh' script [11], I can't tell
what the option "('m')" on line 67 is supposed to be for.
Actually, I'd use some documentation, since the code e.g. allows you
to set the shell only when you do not force a specific {UG}ID. I don't
understand this limitation and looking at [10] it is clear that a
_lot_ of system accounts use a different login shell than
"/sbin/nologin".



Summary:

Issues:
#1: Two Guideline documents with different content; neither marked as obsolete.
#2: Docs pages do not have a timestamp. Hard to tell which document is newer.
#3: The Guidelines differ and there seems to be a copy-paste error.

Questions:
#4: What is the purpose and usage of the 'setup' package?
#5: What are the guidelines around the 'setup' package? Does
everything that goes inside need FPC approval? Are the maintainers of
the referenced package responsible to keeping it up-to-date?
#6: Is there some documentation for the 'sysusers.generate-pre.sh' script?



[1] https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/
[2] https://docs.fedoraproject.org/en-US/packaging-guidelines/
[3] https://fedoraproject.org/wiki/Packaging:UsersAndGroups
[4] 
https://fedoraproject.org/wiki/Packaging:UsersAndGroups#Soft_static_allocation
[5] 
https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/#_soft_static_allocation
[6] 
https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/#_values_given_to_useradd_and_groupadd
[7] https://src.fedoraproject.org/rpms/setup
[8] https://pagure.io/setup/tree/master
[9] https://pagure.io/setup/blob/master/f/services
[10] https://pagure.io/setup/blob/master/f/uidgid
[11] 
https://src.fedoraproject.org/rpms/systemd/blob/rawhide/f/sysusers.generate-pre.sh
[12] 
https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/#_dynamic_allocation

--

Michal Schorm
Software Engineer
Core Services - Databases Team
Red Hat

--
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to