#1143 Add back Fedora < 32, EL7 and EL8 instructions
Closed by tibbs. Opened by ekohl.
ekohl/packaging-committee add-legacy-packaging-guidelines  into  master

Download 1143.patch

While Fedora < 32 is not relevant since it's unsupported, EL7 and EL8 are due to EPEL. Ideally speaking the macro would be available there as well, but this fills the gap for now.

I don't think Fedora < 32 should be mentioned here as well. I don't mind including EPEL notes, but the guidelines are not for EPEL.

It's quite common for packagers to use a single spec for both Fedora and EPEL. Should we recommend using macros to use the newer style if available? Something like:

%if !0%{rhel} || 0%{rhel} >= 9
BuildRequires:  systemd-rpm-macros
%endif
%if 0%{rhel} && 0%{rhel} < 9
Requires(pre): shadow-utils
%endif

I think installing the sysusers file can happen unconditionally. Then %pre would become

%pre
%if !0%{rhel} || 0%{rhel} >= 9
%sysusers_create_compat %{SOURCE3}
%endif
%if 0%{rhel} && 0%{rhel} < 9
getent group GROUPNAME >/dev/null || groupadd -r GROUPNAME
getent passwd USERNAME >/dev/null || \
    useradd -r -g GROUPNAME -d HOMEDIR -s /sbin/nologin \
    -c "Useful comment about the purpose of this account" USERNAME
exit 0
%endif

That said, it was pointed out that there's an EPEL guide. I'd be happy to send a PR there that describes this. Once that's merged, this guide can link to it with a warning for EPEL packagers.

https://docs.fedoraproject.org/en-US/epel/epel-packaging/

Pull-Request has been closed by tibbs

Metadata