Re: [ovs-dev] [PATCH V2] rhel: bug fix upgrade path in kmod fedora spec file

2019-01-23 Thread Ben Pfaff
On Wed, Jan 23, 2019 at 07:45:56AM -0200, Flavio Leitner wrote:
> On Tue, Jan 22, 2019 at 03:02:30PM -0800, Greg Rose wrote:
> > From: Martin Xu 
> > 
> > This patch removes the "Conflicts" tag and adds "Obsoletes" tag.
> > 
> > With the conflicts tag, when a user attempts to install or upgrade with
> > the same version as already installed, the conflict kicks in. Otherwise,
> > such is allowed with --replacepkgs.
> > 
> > Obsoletes is needed for the upgrade path from kmod-openvswitch to
> > openvswitch-kmod.
> > 
> > Fixes: 22c33c3039 (rhel: support kmod build against mulitple kernel
> > versions, fedora)
> > 
> > VMware-BZ: #2249788
> > 
> > Signed-off-by: Martin Xu 
> > Signed-off-by: Greg Rose 
> > CC: Flavio Leitner 
> > CC: Yi-Hung Wei 
> > CC: Yifeng Sun 
> > CC: Zak Whittington 
> > CC: Ben Pfaff 
> > ---
> 
> LGTM
> Acked-by: Flavio Leitner 

Thanks Greg, Martin, Flavio.  I applied this to master and branch-2.11.
Let me know if it should be backported further.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH V2] rhel: bug fix upgrade path in kmod fedora spec file

2019-01-23 Thread Flavio Leitner
On Tue, Jan 22, 2019 at 03:02:30PM -0800, Greg Rose wrote:
> From: Martin Xu 
> 
> This patch removes the "Conflicts" tag and adds "Obsoletes" tag.
> 
> With the conflicts tag, when a user attempts to install or upgrade with
> the same version as already installed, the conflict kicks in. Otherwise,
> such is allowed with --replacepkgs.
> 
> Obsoletes is needed for the upgrade path from kmod-openvswitch to
> openvswitch-kmod.
> 
> Fixes: 22c33c3039 (rhel: support kmod build against mulitple kernel
> versions, fedora)
> 
> VMware-BZ: #2249788
> 
> Signed-off-by: Martin Xu 
> Signed-off-by: Greg Rose 
> CC: Flavio Leitner 
> CC: Yi-Hung Wei 
> CC: Yifeng Sun 
> CC: Zak Whittington 
> CC: Ben Pfaff 
> ---

LGTM
Acked-by: Flavio Leitner 


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


Re: [ovs-dev] [PATCH V2] rhel: bug fix upgrade path in kmod fedora spec file

2019-01-22 Thread Ben Pfaff
Flavio, can you give an opinion on this?

Thanks,

Ben.

On Tue, Jan 22, 2019 at 03:02:30PM -0800, Greg Rose wrote:
> From: Martin Xu 
> 
> This patch removes the "Conflicts" tag and adds "Obsoletes" tag.
> 
> With the conflicts tag, when a user attempts to install or upgrade with
> the same version as already installed, the conflict kicks in. Otherwise,
> such is allowed with --replacepkgs.
> 
> Obsoletes is needed for the upgrade path from kmod-openvswitch to
> openvswitch-kmod.
> 
> Fixes: 22c33c3039 (rhel: support kmod build against mulitple kernel
> versions, fedora)
> 
> VMware-BZ: #2249788
> 
> Signed-off-by: Martin Xu 
> Signed-off-by: Greg Rose 
> CC: Flavio Leitner 
> CC: Yi-Hung Wei 
> CC: Yifeng Sun 
> CC: Zak Whittington 
> CC: Ben Pfaff 
> ---
> v1->v2: adds "Obsoletes" tag needed for upgrade after renaming
> adds more reviewers
> v2-v3: Incorporate Flavio's recommendation to check version and
>release values.
> ---
>  rhel/openvswitch-kmod-fedora.spec.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rhel/openvswitch-kmod-fedora.spec.in 
> b/rhel/openvswitch-kmod-fedora.spec.in
> index 8d54fd7..9a4c489 100644
> --- a/rhel/openvswitch-kmod-fedora.spec.in
> +++ b/rhel/openvswitch-kmod-fedora.spec.in
> @@ -33,7 +33,7 @@ Source: openvswitch-%{version}.tar.gz
>  #Source1: openvswitch-init
>  Buildroot: /tmp/openvswitch-xen-rpm
>  Provides: kmod-openvswitch
> -Conflicts: kmod-openvswitch
> +Obsoletes: kmod-openvswitch < %{version}-%{release}
>  
>  %description
>  Open vSwitch provides standard network bridging functions augmented with
> -- 
> 1.8.3.1
> 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2] rhel: bug fix upgrade path in kmod fedora spec file

2019-01-03 Thread Flavio Leitner
Hi Martin,

Sorry the delay, coming back from PTO and holidays.

On Thu, Dec 13, 2018 at 02:50:22PM -0800, Martin Xu wrote:
> Hi Flavio,
> 
> I remember when we had a discussion about package "succession" when I had
> the "Obsoletes" tag added in one of the previous patches submitted for the
> fedora spec files.
> 
> We do need the capability for the system to know openvswitch-kmod is
> automatically upgrading kmod-openvswitch. For some reason, I thought I
> tested "Provides" alone would suffice. I just tried again and it seems not
> the case. "Provides" does not make the renamed package automatically
> upgrade the older one. Is there any other ways of doing this? I found one
> suggestion from the fedora site, that uses both "Provides" and "Obsoletes."
> I understand this means we will be declaring openvswitch-kmod is being
> replaced. We can't go either way anymore. Is there a better solution?
> Thanks.

Provides does not allow upgrades. It will satisfy dependencies on what
you are providing. A common example is smtp: sendmail and postfix. Both
could do: "Provides: smtp", then "mutt" could do "Requires: smtp" and
either sendmail or postfix would be fine.

You're right that you need Obsoletes to allow upgrades. The problem
with Obsoletes is that once you ship it, there is no turning back.
That's why I suggested to limit to a specific version.
For example:

   Obsoletes: kmod-openvswitch < %{version}-%{release}

That grants all previous packages are indeed obsoleted while it
would be possible to resurrect kmod-openvswitch if we change our minds
in the future. All we would need is to ship kmod-openvswitch newer
than the last %{version}-%{release} shipped.

HTH,
fbl

> 
> Martin
> 
> On Thu, Dec 13, 2018 at 2:44 PM Martin Xu  wrote:
> 
> > This patch removes the "Conflicts" tag and adds "Obsoletes" tag.
> >
> > With the conflicts tag, when a user attempts to install or upgrade with
> > the same version as already installed, the conflict kicks in. Otherwise,
> > such is allowed with --replacepkgs.
> >
> > Obsoletes is needed for the upgrade path from kmod-openvswitch to
> > openvswitch-kmod.
> >
> > Fixes: 22c33c3039 (rhel: support kmod build against mulitple kernel
> > versions, fedora)
> >
> > VMware-BZ: #2249788
> >
> > Signed-off-by: Martin Xu 
> > CC: Flavio Leitner 
> > CC: Yi-Hung Wei 
> > CC: Yifeng Sun 
> > CC: Zak Whittington 
> > CC: Ben Pfaff 
> > ---
> > v1->v2: adds "Obsoletes" tag needed for upgrade after renaming
> > adds more reviewers
> >
> >  rhel/openvswitch-kmod-fedora.spec.in | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/
> > openvswitch-kmod-fedora.spec.in
> > index 8d54fd734..7913dbdb4 100644
> > --- a/rhel/openvswitch-kmod-fedora.spec.in
> > +++ b/rhel/openvswitch-kmod-fedora.spec.in
> > @@ -33,7 +33,7 @@ Source: openvswitch-%{version}.tar.gz
> >  #Source1: openvswitch-init
> >  Buildroot: /tmp/openvswitch-xen-rpm
> >  Provides: kmod-openvswitch
> > -Conflicts: kmod-openvswitch
> > +Obsoletes: kmod-openvswitch
> >
> >  %description
> >  Open vSwitch provides standard network bridging functions augmented with
> > --
> > 2.12.3
> >
> >
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev

-- 
Flavio

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


Re: [ovs-dev] [PATCH v2] rhel: bug fix upgrade path in kmod fedora spec file

2018-12-19 Thread Gregory Rose

Flavio,

I was hoping you would have time to check this patch?

Thanks,

- Greg

On 12/13/2018 2:50 PM, Martin Xu wrote:

Hi Flavio,

I remember when we had a discussion about package "succession" when I had
the "Obsoletes" tag added in one of the previous patches submitted for the
fedora spec files.

We do need the capability for the system to know openvswitch-kmod is
automatically upgrading kmod-openvswitch. For some reason, I thought I
tested "Provides" alone would suffice. I just tried again and it seems not
the case. "Provides" does not make the renamed package automatically
upgrade the older one. Is there any other ways of doing this? I found one
suggestion from the fedora site, that uses both "Provides" and "Obsoletes."
I understand this means we will be declaring openvswitch-kmod is being
replaced. We can't go either way anymore. Is there a better solution?
Thanks.

Martin

On Thu, Dec 13, 2018 at 2:44 PM Martin Xu  wrote:


This patch removes the "Conflicts" tag and adds "Obsoletes" tag.

With the conflicts tag, when a user attempts to install or upgrade with
the same version as already installed, the conflict kicks in. Otherwise,
such is allowed with --replacepkgs.

Obsoletes is needed for the upgrade path from kmod-openvswitch to
openvswitch-kmod.

Fixes: 22c33c3039 (rhel: support kmod build against mulitple kernel
versions, fedora)

VMware-BZ: #2249788

Signed-off-by: Martin Xu 
CC: Flavio Leitner 
CC: Yi-Hung Wei 
CC: Yifeng Sun 
CC: Zak Whittington 
CC: Ben Pfaff 
---
v1->v2: adds "Obsoletes" tag needed for upgrade after renaming
 adds more reviewers

  rhel/openvswitch-kmod-fedora.spec.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/
openvswitch-kmod-fedora.spec.in
index 8d54fd734..7913dbdb4 100644
--- a/rhel/openvswitch-kmod-fedora.spec.in
+++ b/rhel/openvswitch-kmod-fedora.spec.in
@@ -33,7 +33,7 @@ Source: openvswitch-%{version}.tar.gz
  #Source1: openvswitch-init
  Buildroot: /tmp/openvswitch-xen-rpm
  Provides: kmod-openvswitch
-Conflicts: kmod-openvswitch
+Obsoletes: kmod-openvswitch

  %description
  Open vSwitch provides standard network bridging functions augmented with
--
2.12.3



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


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


Re: [ovs-dev] [PATCH v2] rhel: bug fix upgrade path in kmod fedora spec file

2018-12-13 Thread Martin Xu
Hi Flavio,

I remember when we had a discussion about package "succession" when I had
the "Obsoletes" tag added in one of the previous patches submitted for the
fedora spec files.

We do need the capability for the system to know openvswitch-kmod is
automatically upgrading kmod-openvswitch. For some reason, I thought I
tested "Provides" alone would suffice. I just tried again and it seems not
the case. "Provides" does not make the renamed package automatically
upgrade the older one. Is there any other ways of doing this? I found one
suggestion from the fedora site, that uses both "Provides" and "Obsoletes."
I understand this means we will be declaring openvswitch-kmod is being
replaced. We can't go either way anymore. Is there a better solution?
Thanks.

Martin

On Thu, Dec 13, 2018 at 2:44 PM Martin Xu  wrote:

> This patch removes the "Conflicts" tag and adds "Obsoletes" tag.
>
> With the conflicts tag, when a user attempts to install or upgrade with
> the same version as already installed, the conflict kicks in. Otherwise,
> such is allowed with --replacepkgs.
>
> Obsoletes is needed for the upgrade path from kmod-openvswitch to
> openvswitch-kmod.
>
> Fixes: 22c33c3039 (rhel: support kmod build against mulitple kernel
> versions, fedora)
>
> VMware-BZ: #2249788
>
> Signed-off-by: Martin Xu 
> CC: Flavio Leitner 
> CC: Yi-Hung Wei 
> CC: Yifeng Sun 
> CC: Zak Whittington 
> CC: Ben Pfaff 
> ---
> v1->v2: adds "Obsoletes" tag needed for upgrade after renaming
> adds more reviewers
>
>  rhel/openvswitch-kmod-fedora.spec.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/
> openvswitch-kmod-fedora.spec.in
> index 8d54fd734..7913dbdb4 100644
> --- a/rhel/openvswitch-kmod-fedora.spec.in
> +++ b/rhel/openvswitch-kmod-fedora.spec.in
> @@ -33,7 +33,7 @@ Source: openvswitch-%{version}.tar.gz
>  #Source1: openvswitch-init
>  Buildroot: /tmp/openvswitch-xen-rpm
>  Provides: kmod-openvswitch
> -Conflicts: kmod-openvswitch
> +Obsoletes: kmod-openvswitch
>
>  %description
>  Open vSwitch provides standard network bridging functions augmented with
> --
> 2.12.3
>
>
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev