[ovs-dev] [PATCH ovn v3] debian: fix debian packaging and remove ovs files

Numan Siddique numans at ovn.org
Wed Jan 27 14:32:36 UTC 2021


On Fri, Dec 18, 2020 at 3:10 PM Frode Nordahl
<frode.nordahl at canonical.com> wrote:
>
> man. 14. des. 2020, 14:48 skrev Numan Siddique <numans at ovn.org>:
>
> > On Sun, Dec 13, 2020 at 7:12 PM Wan Junjie <wanjunjie at bytedance.com>
> > wrote:
> > >
> > > Remove all openvswitch package files and rename the packages
> > > with prefix ovn-. Ovs debs would not be packed in ovn anymore.
> > >
> > > Add a build option DATAPATH_CONFIGURE_OPTS. Like openvswitch,
> > > use '-with-ovs-source=' to pass the ovs source directory.
> > >
> > > To get ovn deb packages, you should build ovs source first,
> > > Then use command like below to generate the packages:
> > > DATAPATH_CONFIGURE_OPTS='--with-ovs-source=path/to/ovs'
> > > DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary
> > >
> > > Signed-off-by: Wan Junjie <wanjunjie at bytedance.com>
> >
> > Thanks for the patch.
> >
> > @Frode Nordahl  Would you be fine reviewing this patch.
> >
>
> Sure I'll take a look, it may take some time due to the holiday season, but
> I'll pick it up after the break.
>
> In the mean time I can refer to how the packaging looks in Ubuntu [0].
>
> 0: https://github.com/ovn-org/ovn/pull/36
>
> --
> Frode Nordahl
>
> Thanks
> > Numan
> >


Hi  Wan Junjie,

Please note I'm not a debian user or developer. I spinned up an ubuntu
20.04 VM and tested this patch.

Below are few observations.

1. The deb packages are generated just outside the ovn directory. Is
that expected ?

2. I was successfully able to generate OVN deb packages using the
command you mentioned in
    the commit message.

   I ran - dpkg -i ovn-common_20.12.90-1_amd64.deb and it got installed.
  Then I ran - dpkg -i ovn-central_20.12.90-1_amd64.deb
ovn-host_20.12.90-1_amd64.deb

  I see the below errors.

******
Selecting previously unselected package ovn-central.
(Reading database ... 88684 files and directories currently installed.)
Preparing to unpack ovn-central_20.12.90-1_amd64.deb ...
Unpacking ovn-central (20.12.90-1) ...
Selecting previously unselected package ovn-host.
Preparing to unpack ovn-host_20.12.90-1_amd64.deb ...
Unpacking ovn-host (20.12.90-1) ...
dpkg: dependency problems prevent configuration of ovn-central:
 ovn-central depends on openvswitch-switch (= 20.12.90-1); however:
  Package openvswitch-switch is not installed.
 ovn-central depends on openvswitch-common (= 20.12.90-1); however:
  Package openvswitch-common is not installed.

dpkg: error processing package ovn-central (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ovn-host:
 ovn-host depends on openvswitch-switch (= 20.12.90-1); however:
  Package openvswitch-switch is not installed.
 ovn-host depends on openvswitch-common (= 20.12.90-1); however:
  Package openvswitch-common is not installed.

dpkg: error processing package ovn-host (--install):
 dependency problems - leaving unconfigured
Processing triggers for systemd (245.4-4ubuntu3.3) ...
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
 ovn-central
 ovn-host
*************************

It is strange that ovn packages depend on openvswitch packages -
20.12.90-1 given that
I used OVS 2.15.90 (latest master) while compiling.

I think this needs to be fixed.

Thanks
Numan

Pleas
> > > -        rm -f /etc/openvswitch/conf.db
> > > -        rm -f /etc/openvswitch/.conf.db.~lock~
> > > -        rm -f /etc/default/openvswitch-switch
> > > -        rm -f /var/log/openvswitch/ovs-vswitchd.log* || true
> > > -        rm -f /var/log/openvswitch/ovsdb-server.log* || true
> > > -        rm -f /etc/openvswitch/system-id.conf
> > > -        ;;
> > > -
> > > -    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
> > > -        ;;
> > > -
> > > -    *)
> > > -        echo "postrm called with unknown argument \`$1'" >&2
> > > -        exit 1
> > > -        ;;
> > > -esac
> > > -
> > > -# dh_installdeb will replace this with shell code automatically
> > > -# generated by other debhelper scripts.
> > > -
> > > -#DEBHELPER#
> > > -
> > > -exit 0
> > > -
> > > -
> > > diff --git a/debian/openvswitch-switch.template
> > b/debian/openvswitch-switch.template
> > > deleted file mode 100644
> > > index d7c779689..000000000
> > > --- a/debian/openvswitch-switch.template
> > > +++ /dev/null
> > > @@ -1,8 +0,0 @@
> > > -# This is a POSIX shell fragment                -*- sh -*-
> > > -
> > > -# FORCE_COREFILES: If 'yes' then core files will be enabled.
> > > -# FORCE_COREFILES=yes
> > > -
> > > -# OVS_CTL_OPTS: Extra options to pass to ovs-ctl.  This is, for example,
> > > -# a suitable place to specify --ovs-vswitchd-wrapper=valgrind.
> > > -# OVS_CTL_OPTS=
> > > diff --git a/debian/openvswitch-test.dirs b/debian/openvswitch-test.dirs
> > > deleted file mode 100644
> > > index daaae31af..000000000
> > > --- a/debian/openvswitch-test.dirs
> > > +++ /dev/null
> > > @@ -1 +0,0 @@
> > > -usr/share/pyshared/ovstest/
> > > diff --git a/debian/openvswitch-test.install
> > b/debian/openvswitch-test.install
> > > deleted file mode 100644
> > > index 8a01a5125..000000000
> > > --- a/debian/openvswitch-test.install
> > > +++ /dev/null
> > > @@ -1,3 +0,0 @@
> > > -usr/bin/ovs-l3ping
> > > -usr/bin/ovs-test
> > > -usr/share/openvswitch/python/ovstest usr/lib/python2.7/dist-packages/
> > > diff --git a/debian/openvswitch-test.manpages
> > b/debian/openvswitch-test.manpages
> > > deleted file mode 100644
> > > index 3f7185869..000000000
> > > --- a/debian/openvswitch-test.manpages
> > > +++ /dev/null
> > > @@ -1 +0,0 @@
> > > -utilities/ovs-l3ping.8
> > > diff --git a/debian/openvswitch-testcontroller.README.Debian
> > b/debian/openvswitch-testcontroller.README.Debian
> > > deleted file mode 100644
> > > index 0548826ef..000000000
> > > --- a/debian/openvswitch-testcontroller.README.Debian
> > > +++ /dev/null
> > > @@ -1,12 +0,0 @@
> > > -README.Debian for openvswitch-testcontroller
> > > ---------------------------------------------
> > > -
> > > -The controller in this package enables OpenFlow switches that connect
> > > -to it to act as MAC-learning Ethernet switches.  It can be used for
> > > -initial testing of OpenFlow networks.  It is not a necessary or
> > > -desirable part of a production OpenFlow deployment.
> > > -
> > > -To (re)configure the controller, edit
> > /etc/default/openvswitch-testcontroller
> > > -and run "/etc/init.d/openvswitch-testcontroller restart".
> > > -
> > > - -- Ben Pfaff <pfaffben at debian.org>, Thu, 14 Aug 2014 10:49:34 -0700
> > > diff --git a/debian/openvswitch-testcontroller.default
> > b/debian/openvswitch-testcontroller.default
> > > deleted file mode 100644
> > > index c6db59570..000000000
> > > --- a/debian/openvswitch-testcontroller.default
> > > +++ /dev/null
> > > @@ -1,29 +0,0 @@
> > > -# This is a POSIX shell fragment                -*- sh -*-
> > > -
> > > -# LISTEN: What OpenFlow connection methods should the controller listen
> > on?
> > > -#
> > > -# This is a space-delimited list of connection methods:
> > > -#
> > > -# * "pssl:[PORT]": Listen for SSL connections on the specified PORT
> > > -#   (default: 6653).  The private key, certificate, and CA certificate
> > > -#   must be specified below.
> > > -#
> > > -# * "ptcp:[PORT]": Listen for TCP connections on the specified PORT
> > > -#   (default: 6653).  Not recommended for security reasons.
> > > -#
> > > -LISTEN="pssl:"
> > > -
> > > -# PRIVKEY: Name of file containing controller's private key.
> > > -# Required if SSL enabled.
> > > -PRIVKEY=/etc/openvswitch-testcontroller/privkey.pem
> > > -
> > > -# CERT: Name of file containing certificate for private key.
> > > -# Required if SSL enabled.
> > > -CERT=/etc/openvswitch-testcontroller/cert.pem
> > > -
> > > -# CACERT: Name of file containing switch CA certificate.
> > > -# Required if SSL enabled.
> > > -CACERT=/etc/openvswitch-testcontroller/cacert.pem
> > > -
> > > -# Additional options to pass to ovs-testcontroller, e.g. "--hub"
> > > -DAEMON_OPTS=""
> > > diff --git a/debian/openvswitch-testcontroller.dirs
> > b/debian/openvswitch-testcontroller.dirs
> > > deleted file mode 100644
> > > index d8d4f775f..000000000
> > > --- a/debian/openvswitch-testcontroller.dirs
> > > +++ /dev/null
> > > @@ -1 +0,0 @@
> > > -etc/openvswitch-testcontroller
> > > diff --git a/debian/openvswitch-testcontroller.init
> > b/debian/openvswitch-testcontroller.init
> > > deleted file mode 100755
> > > index 67b7a994f..000000000
> > > --- a/debian/openvswitch-testcontroller.init
> > > +++ /dev/null
> > > @@ -1,278 +0,0 @@
> > > -#!/bin/sh
> > > -#
> > > -# Copyright (c) 2011, 2014 Nicira, Inc.
> > > -# Copyright (c) 2007, 2009 Javier Fernandez-Sanguino <jfs at debian.org>
> > > -#
> > > -# This is free software; you may redistribute it and/or modify
> > > -# it under the terms of the GNU General Public License as
> > > -# published by the Free Software Foundation; either version 2,
> > > -# or (at your option) any later version.
> > > -#
> > > -# This is distributed in the hope that it will be useful, but
> > > -# WITHOUT ANY WARRANTY; without even the implied warranty of
> > > -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > > -# GNU General Public License for more details.
> > > -#<
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list