Hi everybody,

I have a package (syncthing [0]) that provides both system and user
units, depending on how the user wants the service to start. The user
units are obviously specific to each user, but the system units are
templates that are instantiated for the user who wants to have the
service run at boot.

Now, this is the problem: I do not know how to adapt the systemd
scriptlets [1] for this. Wildcards are not supported, and systemd on
Fedora 34+ now warns when encountering such wildcards, so the way it's
done in the syncthing package right now is not correct (as reported on
BugZilla [2]).

    Glob pattern passed, but globs are not supported for this.
    Invalid unit name "syncthing@*.service" escaped as "syncthing@\x2a.service".

Does anybody know the correct way to handle this? Obviously those
system units can't (and shouldn't) be enabled for all users on update
or install, but I still want all service instances to be restarted on
update. The systemd scriptlet Guidelines do not cover this scenario at
all.

Thanks,
Fabio

[0]: 
https://src.fedoraproject.org/rpms/syncthing/blob/rawhide/f/syncthing.spec#_378
[1]: 
https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_systemd
[2]: https://bugzilla.redhat.com/show_bug.cgi?id=1986258
_______________________________________________
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