[libvirt] [PATCH] Fix substitution of sbindir in virtlockd.service

The makefile rule substitutes variables delimited by '::', but the virtlockd service files uses '@'. Change the service file to match the makefile rule. --- src/locking/virtlockd.service.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in index a9f9f93..dad7c19 100644 --- a/src/locking/virtlockd.service.in +++ b/src/locking/virtlockd.service.in @@ -5,7 +5,7 @@ After=syslog.target [Service] EnvironmentFile=-/etc/sysconfig/virtlockd -ExecStart=@sbindir@/virtlockd +ExecStart=::sbindir::/virtlockd ExecReload=/bin/kill -HUP $MAINPID # Loosing the locks is a really bad thing that will # cause the machine to be fenced (rebooted), so make -- 1.8.0.1

On 01/04/2013 11:14 AM, Jim Fehlig wrote:
The makefile rule substitutes variables delimited by '::', but the virtlockd service files uses '@'. Change the service file to match the makefile rule.
I'd much rather see us unify the different makefile .in conversions to use the same syntax - I see: libvirtd.8.in: s!SYSCONFDIR!$(sysconfdir)!g libvirtd.policy.in, libvirtd.logrotate.in, libvirtd.qemu.logrotate.in, ...: s![@]authaction[@]!$(policyauth)!g libvirtd.init.in, libvirtd.service.in: s!\@localstatedir\@!$(localstatedir)!g (hmm, \@ is not a portable regex, and may die on some platforms) virtlockd.init.in: s!::localstatedir::!$(localstatedir)!g That is, I think the most common style is using @var@ in the file being replaces, and using [@]var[@] in the makefile, and the outliers (libvirtd.8 with ALLCAPS instead of @var@, and virtlockd with ::var:: instead of @var@) are best converted over to the common format. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 01/04/2013 11:43 AM, Eric Blake wrote:
On 01/04/2013 11:14 AM, Jim Fehlig wrote:
The makefile rule substitutes variables delimited by '::', but the virtlockd service files uses '@'. Change the service file to match the makefile rule.
I'd much rather see us unify the different makefile .in conversions to use the same syntax - I see:
libvirtd.8.in: s!SYSCONFDIR!$(sysconfdir)!g
libvirtd.policy.in, libvirtd.logrotate.in, libvirtd.qemu.logrotate.in, ...: s![@]authaction[@]!$(policyauth)!g
libvirtd.init.in, libvirtd.service.in: s!\@localstatedir\@!$(localstatedir)!g (hmm, \@ is not a portable regex, and may die on some platforms)
Another non-portability - ! can be used in filenames without quoting, and thus might appear in (an admittedly unusual) $(localstatedir), which then messes up sed. So autoconf advices using '|', rather than ',' or '!', when setting up a substitution of a filename. I'm preparing a patch to fix all of these concerns. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

Eric Blake wrote:
On 01/04/2013 11:43 AM, Eric Blake wrote:
On 01/04/2013 11:14 AM, Jim Fehlig wrote:
The makefile rule substitutes variables delimited by '::', but the virtlockd service files uses '@'. Change the service file to match the makefile rule.
I'd much rather see us unify the different makefile .in conversions to use the same syntax - I see:
libvirtd.8.in: s!SYSCONFDIR!$(sysconfdir)!g
libvirtd.policy.in, libvirtd.logrotate.in, libvirtd.qemu.logrotate.in, ...: s![@]authaction[@]!$(policyauth)!g
libvirtd.init.in, libvirtd.service.in: s!\@localstatedir\@!$(localstatedir)!g (hmm, \@ is not a portable regex, and may die on some platforms)
Another non-portability - ! can be used in filenames without quoting, and thus might appear in (an admittedly unusual) $(localstatedir), which then messes up sed. So autoconf advices using '|', rather than ',' or '!', when setting up a substitution of a filename.
I'm preparing a patch to fix all of these concerns.
Ah, ok. I finished your first suggestion but will drop it since you're working on a patch to fix all the issues. Regards, Jim
participants (2)
-
Eric Blake
-
Jim Fehlig