[ovs-dev] [PATCH] rhel: define rundir for older distros

Flavio Leitner fbl at redhat.com
Thu Aug 13 18:39:33 UTC 2015


Some older distros might not define _rundir yet so in this
case the RPM build breaks.  This patch defines it to the
Fedora's default.

Signed-off-by: Flavio Leitner <fbl at redhat.com>
---
 rhel/openvswitch-fedora.spec.in | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
index 48c34de..68810e2 100644
--- a/rhel/openvswitch-fedora.spec.in
+++ b/rhel/openvswitch-fedora.spec.in
@@ -16,6 +16,12 @@
 # Enable PIE, bz#955181
 %global _hardened_build 1
 
+# some distros (e.g: RHEL-7) don't define _rundir macro yet
+# Fedora 15 onwards uses /run as _rundir
+%if 0%{!?_rundir:1}
+%define _rundir /run
+%endif
+
 Name: openvswitch
 Summary: Open vSwitch
 Group: System Environment/Daemons
-- 
2.1.0




More information about the dev mailing list