Re: [ovs-dev] [PATCH ovn 2/2] rhel: Fix make rpm-fedora

2020-02-17 Thread Dumitru Ceara
On 2/14/20 7:49 PM, num...@ovn.org wrote:
> 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 

Thanks,
Dumitru

> ---
>  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
> 

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH ovn 2/2] rhel: Fix make rpm-fedora

2020-02-14 Thread numans
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 
---
 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
-- 
2.24.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev