From 6a1b4965f4d7704329fae0be147bbc74273786fa Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 26 Apr 2016 12:01:27 -0700 Subject: [PATCH] fix incorrect binary path in openvswitch service file (PR #487) --- ...ibexecdir-in-openvswitch-service-fil.patch | 108 ++++++++++++++++++ os-autoinst.spec | 8 +- 2 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 0001-don-t-hardcode-libexecdir-in-openvswitch-service-fil.patch diff --git a/0001-don-t-hardcode-libexecdir-in-openvswitch-service-fil.patch b/0001-don-t-hardcode-libexecdir-in-openvswitch-service-fil.patch new file mode 100644 index 0000000..7af62dc --- /dev/null +++ b/0001-don-t-hardcode-libexecdir-in-openvswitch-service-fil.patch @@ -0,0 +1,108 @@ +From 5f0ba3dafea7b6b15c080750b43f340490e2dbd1 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +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 + diff --git a/os-autoinst.spec b/os-autoinst.spec index 5780567..b247dbe 100644 --- a/os-autoinst.spec +++ b/os-autoinst.spec @@ -31,12 +31,15 @@ Name: os-autoinst Version: %{github_version} -Release: 8%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} +Release: 9%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} Summary: OS-level test automation License: GPLv2+ Group: Development/System URL: https://os-autoinst.github.io/openQA/ Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{github_name}-%{github_commit}.tar.gz +# Fix a hardcoding of libexecdir in the openvswitch service file +# https://github.com/os-autoinst/os-autoinst/pull/487 +Patch0: 0001-don-t-hardcode-libexecdir-in-openvswitch-service-fil.patch BuildRequires: autoconf BuildRequires: automake @@ -187,6 +190,9 @@ make check VERBOSE=1 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.opensuse.os_autoinst.switch.conf %changelog +* Tue Apr 26 2016 Adam Williamson - 4.3-9.20160408gitff760a3 +- fix incorrect binary path in openvswitch service file (PR #487) + * Sat Apr 23 2016 Adam Williamson - 4.3-8.20160408gitff760a3 - rebuild against updated opencv