From patchwork Fri Feb 14 18:49:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Numan Siddique X-Patchwork-Id: 1238325 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48K2VQ3d76z9sTR for ; Sat, 15 Feb 2020 05:49:34 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id D84AB869DD; Fri, 14 Feb 2020 18:49:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cpT09HOyabiG; Fri, 14 Feb 2020 18:49:32 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 17A6285FEF; Fri, 14 Feb 2020 18:49:32 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id F16B1C08A4; Fri, 14 Feb 2020 18:49:31 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 69A5BC08A4 for ; Fri, 14 Feb 2020 18:49:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 53F6388313 for ; Fri, 14 Feb 2020 18:49:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nKNGtlFKzcrd for ; Fri, 14 Feb 2020 18:49:29 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by hemlock.osuosl.org (Postfix) with ESMTPS id 37AA9882FD for ; Fri, 14 Feb 2020 18:49:29 +0000 (UTC) X-Originating-IP: 115.99.60.112 Received: from nummac.local (unknown [115.99.60.112]) (Authenticated sender: numans@ovn.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 75FA440005; Fri, 14 Feb 2020 18:49:26 +0000 (UTC) From: numans@ovn.org To: dev@openvswitch.org Date: Sat, 15 Feb 2020 00:19:18 +0530 Message-Id: <20200214184918.904899-1-numans@ovn.org> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn 2/2] rhel: Fix make rpm-fedora X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" From: Numan Siddique After the OVN version change to 20.03.90, make rpm-fedora is broken. This patch fixes it. It now detects the OVS version from the configured ovs build dir and uses it. Signed-off-by: Numan Siddique Acked-by: Dumitru Ceara --- Makefile.am | 1 + acinclude.m4 | 3 +++ rhel/automake.mk | 2 +- rhel/ovn-fedora.spec.in | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 490a27608..af3fa1ed3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -179,6 +179,7 @@ SUFFIXES += .in -e 's,[@]OVN_RUNDIR[@],$(OVN_RUNDIR),g' \ -e 's,[@]OVSBUILDDIR[@],$(OVSBUILDDIR),g' \ -e 's,[@]VERSION[@],$(VERSION),g' \ + -e 's,[@]OVSVERSION[@],$(OVSVERSION),g' \ -e 's,[@]localstatedir[@],$(localstatedir),g' \ -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \ -e 's,[@]sysconfdir[@],$(sysconfdir),g' \ diff --git a/acinclude.m4 b/acinclude.m4 index 414deccab..a797adc82 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -362,4 +362,7 @@ AC_DEFUN([OVN_CHECK_OVS], [ fi AC_MSG_RESULT([$OVSBUILDDIR]) AC_SUBST(OVSBUILDDIR) + OVSVERSION=`sed -n 's/^#define PACKAGE_VERSION//p' $OVSBUILDDIR/config.h | tr \\\n ' ' | sed 's/^[ \t]*//;s/[ \t]*$//' | sed 's/\"//g'` + AC_SUBST(OVSVERSION) + AC_MSG_RESULT([OVS version is $OVSVERSION]) ]) diff --git a/rhel/automake.mk b/rhel/automake.mk index a46e6579b..661975ea9 100644 --- a/rhel/automake.mk +++ b/rhel/automake.mk @@ -29,7 +29,7 @@ RPMBUILD_OPT ?= --without check rpm-fedora: dist $(srcdir)/rhel/ovn-fedora.spec ${MKDIR_P} ${RPMBUILD_TOP}/SOURCES cp ${DIST_ARCHIVES} ${RPMBUILD_TOP}/SOURCES - cp $(ovs_builddir)/openvswitch-$(VERSION).tar.gz ${RPMBUILD_TOP}/SOURCES + cp $(ovs_builddir)/openvswitch-$(OVSVERSION).tar.gz ${RPMBUILD_TOP}/SOURCES rpmbuild ${RPMBUILD_OPT} \ -D "_topdir ${RPMBUILD_TOP}" \ -ba $(srcdir)/rhel/ovn-fedora.spec diff --git a/rhel/ovn-fedora.spec.in b/rhel/ovn-fedora.spec.in index 59d05673c..6a59ccc40 100644 --- a/rhel/ovn-fedora.spec.in +++ b/rhel/ovn-fedora.spec.in @@ -33,7 +33,7 @@ Version: @VERSION@ Obsoletes: openvswitch-ovn-common < %{?epoch:%{epoch}:}%{version}-%{release} Provides: openvswitch-ovn-common = %{?epoch:%{epoch}:}%{version}-%{release} -%define ovsver %{version} +%define ovsver @OVSVERSION@ %define ovsdir openvswitch-%{ovsver} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the