fix incorrect binary path in openvswitch service file (PR #487)
parent
b278606286
commit
6a1b4965f4
@ -0,0 +1,108 @@
|
||||
From 5f0ba3dafea7b6b15c080750b43f340490e2dbd1 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Williamson <awilliam@redhat.com>
|
||||
Date: Tue, 26 Apr 2016 11:49:26 -0700
|
||||
Subject: [PATCH] don't hardcode libexecdir in openvswitch service file
|
||||
|
||||
once again, a hardcoding of libexecdir that breaks Fedora, so
|
||||
we need to have the Makefile handle it.
|
||||
---
|
||||
Makefile.am | 10 ++++++++--
|
||||
systemd/os-autoinst-openvswitch.service | 18 ------------------
|
||||
systemd/os-autoinst-openvswitch.service.in | 18 ++++++++++++++++++
|
||||
3 files changed, 26 insertions(+), 20 deletions(-)
|
||||
delete mode 100644 systemd/os-autoinst-openvswitch.service
|
||||
create mode 100644 systemd/os-autoinst-openvswitch.service.in
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 006cbb9..e1d5669 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -94,6 +94,7 @@ CLEANFILES = \
|
||||
doc/testapi.html
|
||||
|
||||
PERL_MODULE = ppmclibs/blib/arch/auto/tinycv/tinycv.so
|
||||
+OPENVSWITCH_SERVICE = systemd/os-autoinst-openvswitch.service
|
||||
|
||||
ppmclibs/Makefile: ppmclibs/Makefile.PL
|
||||
cd ppmclibs && \
|
||||
@@ -102,6 +103,11 @@ ppmclibs/Makefile: ppmclibs/Makefile.PL
|
||||
$(PERL_MODULE): ppmclibs/Makefile
|
||||
$(MAKE) -C ppmclibs
|
||||
|
||||
+$(OPENVSWITCH_SERVICE):
|
||||
+ rm -f $@ $@.tmp
|
||||
+ sed -e 's,@pkglibexecdir[@],$(pkglibexecdir),g' '$(top_srcdir)/$@.in' > '$(top_srcdir)/$@.tmp'
|
||||
+ mv '$(top_srcdir)/$@.tmp' '$(top_srcdir)/$@'
|
||||
+
|
||||
install-exec-local: $(PERL_MODULE)
|
||||
$(MAKE) -C ppmclibs pure_install DESTDIR="$(DESTDIR)" INSTALLDIRS="$(INSTALLDIRS)"
|
||||
|
||||
@@ -110,7 +116,7 @@ all-local: $(PERL_MODULE)
|
||||
doc/%.html: %.pm
|
||||
pod2html $< > $@
|
||||
|
||||
-install-data-local:
|
||||
+install-data-local: $(OPENVSWITCH_SERVICE)
|
||||
$(MKDIR_P) $(DESTDIR)/$(packagestatedir) ; \
|
||||
for i in $(packagestate_DATA_FOLDERS) ; do \
|
||||
cp -r $(top_srcdir)/$$i "$(DESTDIR)/$(packagestatedir)" ; \
|
||||
@@ -120,7 +126,7 @@ install-data-local:
|
||||
cp -r $(top_srcdir)/$$i "$(DESTDIR)/$(pkglibexecdir)" ; \
|
||||
done
|
||||
install -D -m 644 $(top_srcdir)/etc/dbus-1/system.d/org.opensuse.os_autoinst.switch.conf "$(DESTDIR)/etc/dbus-1/system.d/org.opensuse.os_autoinst.switch.conf"
|
||||
- install -D -m 644 $(top_srcdir)/systemd/os-autoinst-openvswitch.service "$(DESTDIR)/usr/lib/systemd/system/os-autoinst-openvswitch.service"
|
||||
+ install -D -m 644 "$(top_srcdir)/$(OPENVSWITCH_SERVICE)" "$(DESTDIR)/usr/lib/systemd/system/os-autoinst-openvswitch.service"
|
||||
|
||||
uninstall-local:
|
||||
for i in $(packagestate_DATA_FOLDERS) ; do \
|
||||
diff --git a/systemd/os-autoinst-openvswitch.service b/systemd/os-autoinst-openvswitch.service
|
||||
deleted file mode 100644
|
||||
index af1b7fa..0000000
|
||||
--- a/systemd/os-autoinst-openvswitch.service
|
||||
+++ /dev/null
|
||||
@@ -1,18 +0,0 @@
|
||||
-# unit description file for os-autoinst openvswitch helper
|
||||
-# start using e.g.
|
||||
-# systemctl start os-autoinst-openvswitch.service
|
||||
-[Unit]
|
||||
-Description=os-autoinst openvswitch helper
|
||||
-BindsTo=openvswitch.service
|
||||
-After=openvswitch.service network.target
|
||||
-Before=openqa-worker.target
|
||||
-
|
||||
-[Service]
|
||||
-Type=dbus
|
||||
-BusName=org.opensuse.os_autoinst.switch
|
||||
-Environment=OS_AUTOINST_USE_BRIDGE=br0
|
||||
-EnvironmentFile=-/etc/sysconfig/os-autoinst-openvswitch
|
||||
-ExecStart=/usr/lib/os-autoinst/os-autoinst-openvswitch
|
||||
-
|
||||
-[Install]
|
||||
-WantedBy=multi-user.target
|
||||
diff --git a/systemd/os-autoinst-openvswitch.service.in b/systemd/os-autoinst-openvswitch.service.in
|
||||
new file mode 100644
|
||||
index 0000000..527ed28
|
||||
--- /dev/null
|
||||
+++ b/systemd/os-autoinst-openvswitch.service.in
|
||||
@@ -0,0 +1,18 @@
|
||||
+# unit description file for os-autoinst openvswitch helper
|
||||
+# start using e.g.
|
||||
+# systemctl start os-autoinst-openvswitch.service
|
||||
+[Unit]
|
||||
+Description=os-autoinst openvswitch helper
|
||||
+BindsTo=openvswitch.service
|
||||
+After=openvswitch.service network.target
|
||||
+Before=openqa-worker.target
|
||||
+
|
||||
+[Service]
|
||||
+Type=dbus
|
||||
+BusName=org.opensuse.os_autoinst.switch
|
||||
+Environment=OS_AUTOINST_USE_BRIDGE=br0
|
||||
+EnvironmentFile=-/etc/sysconfig/os-autoinst-openvswitch
|
||||
+ExecStart=@pkglibexecdir@/os-autoinst-openvswitch
|
||||
+
|
||||
+[Install]
|
||||
+WantedBy=multi-user.target
|
||||
--
|
||||
2.7.3
|
||||
|
Loading…
Reference in new issue