2017-02-16 16:08:58 +01:00
|
|
|
# -*- Mode: makefile; indent-tabs-mode: t -*- */
|
|
|
|
# RPM macros for packages creating system accounts
|
|
|
|
#
|
|
|
|
###
|
|
|
|
#
|
|
|
|
# When a package creates a system account, it should use the following macros:
|
|
|
|
#
|
|
|
|
# add %sysusers_requires in the package section
|
|
|
|
#
|
2021-02-11 13:54:07 +01:00
|
|
|
# add "%sysusers_generate_pre <source file> <account> [<config>]" to build section
|
|
|
|
#
|
|
|
|
## <source file> is the source file as defined in the spec file header
|
2021-06-07 15:14:59 +02:00
|
|
|
## <account> is just a random name, the output file will be "<account>.pre"
|
2021-02-11 13:54:07 +01:00
|
|
|
## <config> is the name of the configuration file as stored in
|
|
|
|
## /usr/lib/sysusers.d/<config>
|
2017-02-16 16:08:58 +01:00
|
|
|
#
|
|
|
|
# add "%pre -f <account>.pre" to spec file
|
|
|
|
#
|
|
|
|
###
|
|
|
|
|
2021-06-21 12:02:40 +02:00
|
|
|
%sysusers_requires Requires(pre): sysuser-shadow >= 3.1
|
2017-02-16 16:08:58 +01:00
|
|
|
|
|
|
|
%sysusers_generate_pre() \
|
2022-09-19 08:55:41 +02:00
|
|
|
%{_prefix}/lib/rpm/sysusers-generate-pre "%1" "%3" >> "%2".pre
|