%__sysusers_path	^%{_sysusersdir}/.*\\.conf$

# Create user(name) and group(name) provides for sysusers.
# For the primary item, encode the whole sysusers entry in base64, to be
# fed into systemd-sysusers or something else that can handle it.
# For groups created as a side-effect, only provide the group.
%__sysusers_provides() %{lua:
    for line in io.lines(macros["1"]) do
        if line:sub(1, 1) == '#' then
            goto continue
        end
        fields = {}
        for w in line:gmatch("%S+") do
            table.insert(fields, w)
        end
        if #fields >= 2 then
            table.insert(fields, 1, '-b')
            print(macros.add_sysuser(fields))
        end
        ::continue::
    end
}
