From mboxrd@z Thu Jan 1 00:00:00 1970 From: iyzsong@member.fsf.org (=?utf-8?B?5a6L5paH5q2m?=) Subject: Re: [PATCH 1/2] gnu: Add openvswitch. Date: Thu, 09 Feb 2017 20:46:12 +0800 Message-ID: <87fujn5y7f.fsf@member.fsf.org> References: <20170127135616.15017-1-iyzsong@member.fsf.org> <87r33myc15.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cc9nO-0007fh-Ew for guix-devel@gnu.org; Fri, 10 Feb 2017 06:55:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cc9nK-0008JP-8e for guix-devel@gnu.org; Fri, 10 Feb 2017 06:55:22 -0500 In-Reply-To: <87r33myc15.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sun, 29 Jan 2017 00:56:06 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hi =E5=AE=8B=E6=96=87=E6=AD=A6! > > =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: > >> * gnu/packages/networking.scm (openvswitch): New variable. > > [...] > >> + '(;; FIXME: many tests fail with: >> + ;; [=E2=80=A6] >> + ;; test -e $OVS_RUNDIR/ovs-vswitchd.pid >> + ;; ovs-appctl -t ovs-vswitchd exit >> + ;; hard failure >> + #:tests? #f > > Can we assume that the failures are due to the lack of a proper > networking environment? Do they pass outside of the chroot? In `guix environment -C openvswitch` those tests did pass, but more tests fail due to unable to bind to network address. In the builder they can bind and listen successful. > > It would be good to have a rough idea of why they fail. I have no idea and luck for them now... > >> + (replace 'install >> + (lambda _ >> + (zero? (system* "make" >> + "RUNDIR=3D/tmp" >> + "PKIDIR=3D/tmp" >> + "LOGDIR=3D/tmp" >> + "DBDIR=3D/tmp" >> + "install"))))))) > > I suppose this is to prevent =E2=80=9Cmkdir /var/log=E2=80=9D or similar,= right? > Perhaps worth mentioning in a comment. > > The rest LGTM. Sure, thanks for review! Here is the updated patch: --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-openvswitch.patch Content-Transfer-Encoding: quoted-printable >From a70e24ea5fc5113d1a71ca1be8a087da380fbc76 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?=3DE5=3DAE=3D8B=3DE6=3D96=3D87=3DE6=3DAD=3DA6?=3D Date: Fri, 27 Jan 2017 21:35:12 +0800 Subject: [PATCH] gnu: Add openvswitch. * gnu/packages/networking.scm (openvswitch): New variable. --- gnu/packages/networking.scm | 59 +++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 59 insertions(+) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index c2df3013c..a10fbfed9 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -1060,3 +1060,62 @@ suddenly a lot of network traffic, you can fire up N= etHogs and immediately see which PID is causing this. This makes it easy to identify programs that h= ave gone wild and are suddenly taking up your bandwidth.") (license license:gpl2+))) + +(define-public openvswitch + (package + (name "openvswitch") + (version "2.6.1") + (source (origin + (method url-fetch) + (uri (string-append + "http://openvswitch.org/releases/openvswitch-" + version ".tar.gz")) + (sha256 + (base32 + "036gq741j9kqsjlp693nff838c9wjd1c56nswl9vyyd1lsmj0yrh")))) + (build-system gnu-build-system) + (arguments + '(;; FIXME: many tests fail with: + ;; [=E2=80=A6] + ;; test -e $OVS_RUNDIR/ovs-vswitchd.pid + ;; ovs-appctl -t ovs-vswitchd exit + ;; hard failure + #:tests? #f + #:configure-flags + '("--enable-shared" + "--localstatedir=3D/var" + "--with-dbdir=3D/var/lib/openvswitch") + #:phases + (modify-phases %standard-phases + (replace 'install + (lambda _ + (zero? (system* "make" + ;; Don't try to create directories under /var. + "RUNDIR=3D/tmp" + "PKIDIR=3D/tmp" + "LOGDIR=3D/tmp" + "DBDIR=3D/tmp" + "install"))))))) + (native-inputs + `(("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python" ,python-2) + ;; for testing + ("util-linux" ,util-linux))) + (propagated-inputs + `(("python-six" ,python2-six))) + (inputs + `(("libcap-ng" ,libcap-ng) + ("openssl" ,openssl))) + (synopsis "Virtual network switch") + (home-page "http://www.openvswitch.org/") + (description + "Open vSwitch is a multilayer virtual switch. It is designed to enab= le +massive network automation through programmatic extension, while still +supporting standard management interfaces and protocols (e.g. NetFlow, sFl= ow, +IPFIX, RSPAN, CLI, LACP, 802.1ag).") + (license ; see debian/copyright for detail + (list license:lgpl2.1 ; xenserver and utilities/bugtool + license:gpl2 ; datapath + license:bsd-2 license:bsd-3 + license:asl2.0)))) ; all other --=20 2.11.0 --=-=-=--