[ovs-dev] [PATCH ovn 2/2] rhel: Fix make rpm-fedora
Dumitru Ceara
dceara at redhat.com
Mon Feb 17 13:03:10 UTC 2020
On 2/14/20 7:49 PM, numans at ovn.org wrote:
> From: Numan Siddique <numans at ovn.org>
>
> 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 <numans at ovn.org>
Acked-by: Dumitru Ceara <dceara at redhat.com>
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
>
More information about the dev
mailing list