FS#66412 - [systemd]<=245.5-2: mkinitcpio function add_systemd_unit fails with Exec*= prefixes

Attached to Project: Arch Linux
Opened by Pascal Ernster (hardfalcon) - Saturday, 25 April 2020, 16:58 GMT
Last edited by Christian Hesse (eworm) - Tuesday, 07 July 2020, 08:58 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Christian Hesse (eworm)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

In systemd <= 245.5-2, the "add_systemd_unit" function in /usr/lib/initcpio/install/systemd fails if one of the Exec*= lines in the parsed systemd *.service unit contains a special executable prefixes specified in [1].

For example, this lets mkinitcpio fail [2] if the netconf hook from the mkinitcpio-netconf package is used in systemd mode [3]. (Forum thread [2] is *not* from me, but I'm having exactly the same problem).

The attached patch should fix the issue.


[1] https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart=

[2] https://bbs.archlinux.org/viewtopic.php?id=245928

[2] https://github.com/grazzolini/mkinitcpio-netconf/blob/v0.0.5/netconf_install#L13
This task depends upon

Closed by  Christian Hesse (eworm)
Tuesday, 07 July 2020, 08:58 GMT
Reason for closing:  Fixed
Additional comments about closing:  in SVN
Comment by chuba (chubakabra) - Thursday, 25 June 2020, 13:21 GMT
Thanks for the patch - @eworm this should be a quick fix :)
Comment by Christian Hesse (eworm) - Monday, 29 June 2020, 07:56 GMT
This is inside a condition with comment "don't add binaries unless they are required", excluding prefix "-".
So are you ok dropping the dash from you character class?
Comment by Christian Hesse (eworm) - Monday, 29 June 2020, 08:22 GMT
Does this work at all? Looks like it does not for me...

Loading...