unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 1/2] gnu: Add openvswitch.
@ 2017-01-27 13:56 宋文武
  2017-01-27 13:56 ` [PATCH 2/2] services: Add openvswitch-service-type 宋文武
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: 宋文武 @ 2017-01-27 13:56 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/networking.scm (openvswitch): New variable.
---
 gnu/packages/networking.scm | 54 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 87ee0a1d8..c6fb2cfda 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -1060,3 +1060,57 @@ suddenly a lot of network traffic, you can fire up NetHogs and immediately see
 which PID is causing this.  This makes it easy to identify programs that have
 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:
+       ;;    […]
+       ;;    test -e $OVS_RUNDIR/ovs-vswitchd.pid
+       ;;    ovs-appctl -t ovs-vswitchd exit
+       ;;    hard failure
+       #:tests? #f
+       #:configure-flags
+       '("--enable-shared"
+         "--localstatedir=/var"
+         "--with-dbdir=/var/lib/openvswitch")
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'install
+           (lambda _
+             (zero? (system* "make"
+                             "RUNDIR=/tmp"
+                             "PKIDIR=/tmp"
+                             "LOGDIR=/tmp"
+                             "DBDIR=/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 enable
+massive network automation through programmatic extension, while still
+supporting standard management interfaces and protocols (e.g. NetFlow, sFlow,
+IPFIX, RSPAN, CLI, LACP, 802.1ag).")
+    (license license:asl2.0)))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] services: Add openvswitch-service-type.
  2017-01-27 13:56 [PATCH 1/2] gnu: Add openvswitch 宋文武
@ 2017-01-27 13:56 ` 宋文武
  2017-01-29  0:02   ` Ludovic Courtès
  2017-01-27 14:53 ` [PATCH 1/2] gnu: Add openvswitch John Darrington
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: 宋文武 @ 2017-01-27 13:56 UTC (permalink / raw)
  To: guix-devel

* gnu/services/networking.scm (<openvswitch-configuration>): New record type.
(openvswitch-activation, openvswitch-shepherd-service): New procedures.
(openvswitch-service-type): New variable.
* doc/guix.texi (Networking Services): Document it.
---
 doc/guix.texi               | 15 +++++++++++
 gnu/services/networking.scm | 61 ++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 75 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 7093bf746..8f9973542 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -9093,6 +9093,21 @@ Boolean values @var{ipv4?} and @var{ipv6?} determine whether to use IPv4/IPv6
 sockets.
 @end deffn
 
+@deffn {Scheme Variable} openvswitch-service-type
+This is the type of the @uref{http://www.openvswitch.org, Open vSwitch}
+service, whose value should be an @code{openvswitch-configuration}
+object.
+@end deffn
+
+@deftp {Data Type} openvswitch-configuration
+Data type representing the configuration of openvswitch.
+
+@table @asis
+@item @code{package} (default: @var{openvswitch})
+Package object of the Open vSwitch.
+
+@end table
+@end deftp
 
 @node X Window
 @subsubsection X Window
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index f7412ff29..8cc92a31d 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -31,6 +31,7 @@
   #:use-module (gnu packages linux)
   #:use-module (gnu packages tor)
   #:use-module (gnu packages messaging)
+  #:use-module (gnu packages networking)
   #:use-module (gnu packages ntp)
   #:use-module (gnu packages wicd)
   #:use-module (gnu packages gnome)
@@ -72,7 +73,10 @@
             network-manager-service-type
 
             connman-service
-            wpa-supplicant-service-type))
+            wpa-supplicant-service-type
+
+            openvswitch-service-type
+            openvswitch-configuration))
 
 ;;; Commentary:
 ;;;
@@ -811,4 +815,59 @@ configure networking."
                        (service-extension dbus-root-service-type list)
                        (service-extension profile-service-type list)))))
 
+\f
+;;;
+;;; Open vSwitch
+;;;
+
+(define-record-type* <openvswitch-configuration>
+  openvswitch-configuration make-openvswitch-configuration
+  openvswitch-configuration?
+  (package openvswitch-configuration-package
+           (default openvswitch)))
+
+(define openvswitch-activation
+  (match-lambda
+    (($ <openvswitch-configuration> package)
+     (let ((ovsdb-tool (file-append package "/bin/ovsdb-tool")))
+       #~(begin
+           (use-modules (guix build utils))
+           (mkdir-p "/var/run/openvswitch")
+           (mkdir-p "/var/lib/openvswitch")
+           (let ((conf.db "/var/lib/openvswitch/conf.db"))
+             (unless (file-exists? conf.db)
+               (system* #$ovsdb-tool "create" conf.db))))))))
+
+(define openvswitch-shepherd-service
+  (match-lambda
+    (($ <openvswitch-configuration> package)
+     (let ((ovsdb-server (file-append package "/sbin/ovsdb-server"))
+           (ovs-vswitchd (file-append package "/sbin/ovs-vswitchd")))
+       (list
+        (shepherd-service
+         (provision '(ovsdb))
+         (documentation "Run the Open vSwitch database server.")
+         (start #~(make-forkexec-constructor
+                   (list #$ovsdb-server
+                         "--remote=punix:/var/run/openvswitch/db.sock")))
+         (stop #~(make-kill-destructor)))
+        (shepherd-service
+         (provision '(vswitchd))
+         (requirement '(ovsdb))
+         (documentation "Run the Open vSwitch daemon.")
+         (start #~(make-forkexec-constructor
+                   (list #$ovs-vswitchd)))
+         (stop #~(make-kill-destructor))))))))
+
+(define openvswitch-service-type
+  (service-type
+   (name 'openvswitch)
+   (extensions
+    (list (service-extension activation-service-type
+                             openvswitch-activation)
+          (service-extension profile-service-type
+                             (compose list openvswitch-configuration-package))
+          (service-extension shepherd-root-service-type
+                             openvswitch-shepherd-service)))))
+
 ;;; networking.scm ends here
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] gnu: Add openvswitch.
  2017-01-27 13:56 [PATCH 1/2] gnu: Add openvswitch 宋文武
  2017-01-27 13:56 ` [PATCH 2/2] services: Add openvswitch-service-type 宋文武
@ 2017-01-27 14:53 ` John Darrington
  2017-02-09 12:24   ` 宋文武
  2017-01-27 18:23 ` Marius Bakke
  2017-01-28 23:56 ` Ludovic Courtès
  3 siblings, 1 reply; 10+ messages in thread
From: John Darrington @ 2017-01-27 14:53 UTC (permalink / raw)
  To: ?????????; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1876 bytes --]

On Fri, Jan 27, 2017 at 09:56:15PM +0800, ????????? wrote:
     * gnu/packages/networking.scm (openvswitch): New variable.
     ---
      gnu/packages/networking.scm | 54 +++++++++++++++++++++++++++++++++++++++++++++
      1 file changed, 54 insertions(+)
     
     diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
     index 87ee0a1d8..c6fb2cfda 100644
     --- a/gnu/packages/networking.scm
     +++ b/gnu/packages/networking.scm
     @@ -1060,3 +1060,57 @@ suddenly a lot of network traffic, you can fire up NetHogs and immediately see
      which PID is causing this.  This makes it easy to identify programs that have
      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:
     +       ;;    [???]
     +       ;;    test -e $OVS_RUNDIR/ovs-vswitchd.pid
     +       ;;    ovs-appctl -t ovs-vswitchd exit
     +       ;;    hard failure
     +       #:tests? #f

Have you tried asking upstream about this?  They are usually very helpfull.


J'
     
-- 
Avoid eavesdropping.  Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] gnu: Add openvswitch.
  2017-01-27 13:56 [PATCH 1/2] gnu: Add openvswitch 宋文武
  2017-01-27 13:56 ` [PATCH 2/2] services: Add openvswitch-service-type 宋文武
  2017-01-27 14:53 ` [PATCH 1/2] gnu: Add openvswitch John Darrington
@ 2017-01-27 18:23 ` Marius Bakke
  2017-02-09 12:26   ` 宋文武
  2017-01-28 23:56 ` Ludovic Courtès
  3 siblings, 1 reply; 10+ messages in thread
From: Marius Bakke @ 2017-01-27 18:23 UTC (permalink / raw)
  To: 宋文武, guix-devel

[-- Attachment #1: Type: text/plain, Size: 3280 bytes --]

宋文武 <iyzsong@member.fsf.org> writes:

> * gnu/packages/networking.scm (openvswitch): New variable.

Cool, thanks a lot for this! I will be using this for sure.

> diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
> index 87ee0a1d8..c6fb2cfda 100644
> --- a/gnu/packages/networking.scm
> +++ b/gnu/packages/networking.scm
> @@ -1060,3 +1060,57 @@ suddenly a lot of network traffic, you can fire up NetHogs and immediately see
>  which PID is causing this.  This makes it easy to identify programs that have
>  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:
> +       ;;    […]
> +       ;;    test -e $OVS_RUNDIR/ovs-vswitchd.pid
> +       ;;    ovs-appctl -t ovs-vswitchd exit
> +       ;;    hard failure
> +       #:tests? #f

Ah, this brings me back to
https://github.com/NixOS/nixpkgs/commit/4561a649f41554f9c47c0405079a909a1b51db2f

I managed to get everything but bash completion tests working back then,
but did not have the same luck now after about ten minutes of trying. I
will give it a go at a later opportunity unless someone beats me to it ;)

> +       #:configure-flags
> +       '("--enable-shared"
> +         "--localstatedir=/var"
> +         "--with-dbdir=/var/lib/openvswitch")
> +       #:phases
> +       (modify-phases %standard-phases
> +         (replace 'install
> +           (lambda _
> +             (zero? (system* "make"
> +                             "RUNDIR=/tmp"
> +                             "PKIDIR=/tmp"
> +                             "LOGDIR=/tmp"
> +                             "DBDIR=/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 enable
> +massive network automation through programmatic extension, while still
> +supporting standard management interfaces and protocols (e.g. NetFlow, sFlow,
> +IPFIX, RSPAN, CLI, LACP, 802.1ag).")
> +    (license license:asl2.0)))

The source ships a handy "debian/copyright" file outlining the various
licenses in use. They should be mentioned here. Could not find any
third-party bundled software at a glance. Otherwise LGTM!

Haven't tested the service, but the definition LGTM too.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] gnu: Add openvswitch.
  2017-01-27 13:56 [PATCH 1/2] gnu: Add openvswitch 宋文武
                   ` (2 preceding siblings ...)
  2017-01-27 18:23 ` Marius Bakke
@ 2017-01-28 23:56 ` Ludovic Courtès
  2017-02-09 12:46   ` 宋文武
  3 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2017-01-28 23:56 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

Hi 宋文武!

宋文武 <iyzsong@member.fsf.org> skribis:

> * gnu/packages/networking.scm (openvswitch): New variable.

[...]

> +     '(;; FIXME: many tests fail with:
> +       ;;    […]
> +       ;;    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?

It would be good to have a rough idea of why they fail.

> +         (replace 'install
> +           (lambda _
> +             (zero? (system* "make"
> +                             "RUNDIR=/tmp"
> +                             "PKIDIR=/tmp"
> +                             "LOGDIR=/tmp"
> +                             "DBDIR=/tmp"
> +                             "install")))))))

I suppose this is to prevent “mkdir /var/log” or similar, right?
Perhaps worth mentioning in a comment.

The rest LGTM.

Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] services: Add openvswitch-service-type.
  2017-01-27 13:56 ` [PATCH 2/2] services: Add openvswitch-service-type 宋文武
@ 2017-01-29  0:02   ` Ludovic Courtès
  0 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2017-01-29  0:02 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@member.fsf.org> skribis:

> * gnu/services/networking.scm (<openvswitch-configuration>): New record type.
> (openvswitch-activation, openvswitch-shepherd-service): New procedures.
> (openvswitch-service-type): New variable.
> * doc/guix.texi (Networking Services): Document it.

[...]

> +@deftp {Data Type} openvswitch-configuration
> +Data type representing the configuration of openvswitch.

s/openvswitch/Open vSwitch, the blah blah networking blah/

> +       #~(begin
> +           (use-modules (guix build utils))

Better with:

  (with-imported-modules '((guix build utils))
    #~(begin
        (use-modules (guix build utils))
        …))

> +         (start #~(make-forkexec-constructor
> +                   (list #$ovsdb-server
> +                         "--remote=punix:/var/run/openvswitch/db.sock")))

If it produces a PID file, use #:pid-file here.

OK with these changes, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] gnu: Add openvswitch.
  2017-01-27 14:53 ` [PATCH 1/2] gnu: Add openvswitch John Darrington
@ 2017-02-09 12:24   ` 宋文武
  0 siblings, 0 replies; 10+ messages in thread
From: 宋文武 @ 2017-02-09 12:24 UTC (permalink / raw)
  To: John Darrington; +Cc: guix-devel

John Darrington <john@darrington.wattle.id.au> writes:

> [...]
>      +
>      +(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:
>      +       ;;    [???]
>      +       ;;    test -e $OVS_RUNDIR/ovs-vswitchd.pid
>      +       ;;    ovs-appctl -t ovs-vswitchd exit
>      +       ;;    hard failure
>      +       #:tests? #f
>
> Have you tried asking upstream about this?  They are usually very helpfull.
>

No, I haven't figure the enough information for this, not sure what to
ask.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] gnu: Add openvswitch.
  2017-01-27 18:23 ` Marius Bakke
@ 2017-02-09 12:26   ` 宋文武
  0 siblings, 0 replies; 10+ messages in thread
From: 宋文武 @ 2017-02-09 12:26 UTC (permalink / raw)
  To: Marius Bakke; +Cc: guix-devel

Marius Bakke <mbakke@fastmail.com> writes:

> [...]
>> +               (base32
>> +                "036gq741j9kqsjlp693nff838c9wjd1c56nswl9vyyd1lsmj0yrh"))))
>> +    (build-system gnu-build-system)
>> +    (arguments
>> +     '(;; FIXME: many tests fail with:
>> +       ;;    […]
>> +       ;;    test -e $OVS_RUNDIR/ovs-vswitchd.pid
>> +       ;;    ovs-appctl -t ovs-vswitchd exit
>> +       ;;    hard failure
>> +       #:tests? #f
>
> Ah, this brings me back to
> https://github.com/NixOS/nixpkgs/commit/4561a649f41554f9c47c0405079a909a1b51db2f
>
> I managed to get everything but bash completion tests working back then,
> but did not have the same luck now after about ten minutes of trying. I
> will give it a go at a later opportunity unless someone beats me to it ;)

Oh, I don't have luck with it...  Any news?

> [...]
>> +     "Open vSwitch is a multilayer virtual switch.  It is designed to enable
>> +massive network automation through programmatic extension, while still
>> +supporting standard management interfaces and protocols (e.g. NetFlow, sFlow,
>> +IPFIX, RSPAN, CLI, LACP, 802.1ag).")
>> +    (license license:asl2.0)))
>
> The source ships a handy "debian/copyright" file outlining the various
> licenses in use. They should be mentioned here. Could not find any
> third-party bundled software at a glance. Otherwise LGTM!
>
> Haven't tested the service, but the definition LGTM too.

Sure, thank you!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] gnu: Add openvswitch.
  2017-01-28 23:56 ` Ludovic Courtès
@ 2017-02-09 12:46   ` 宋文武
  2017-02-10 12:30     ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: 宋文武 @ 2017-02-09 12:46 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1385 bytes --]

ludo@gnu.org (Ludovic Courtès) writes:

> Hi 宋文武!
>
> 宋文武 <iyzsong@member.fsf.org> skribis:
>
>> * gnu/packages/networking.scm (openvswitch): New variable.
>
> [...]
>
>> +     '(;; FIXME: many tests fail with:
>> +       ;;    […]
>> +       ;;    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=/tmp"
>> +                             "PKIDIR=/tmp"
>> +                             "LOGDIR=/tmp"
>> +                             "DBDIR=/tmp"
>> +                             "install")))))))
>
> I suppose this is to prevent “mkdir /var/log” or similar, right?
> Perhaps worth mentioning in a comment.
>
> The rest LGTM.

Sure, thanks for review!


Here is the updated patch:


[-- Attachment #2: 0001-gnu-Add-openvswitch.patch --]
[-- Type: text/x-patch, Size: 3152 bytes --]

From a70e24ea5fc5113d1a71ca1be8a087da380fbc76 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@member.fsf.org>
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 NetHogs and immediately see
 which PID is causing this.  This makes it easy to identify programs that have
 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:
+       ;;    […]
+       ;;    test -e $OVS_RUNDIR/ovs-vswitchd.pid
+       ;;    ovs-appctl -t ovs-vswitchd exit
+       ;;    hard failure
+       #:tests? #f
+       #:configure-flags
+       '("--enable-shared"
+         "--localstatedir=/var"
+         "--with-dbdir=/var/lib/openvswitch")
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'install
+           (lambda _
+             (zero? (system* "make"
+                             ;; Don't try to create directories under /var.
+                             "RUNDIR=/tmp"
+                             "PKIDIR=/tmp"
+                             "LOGDIR=/tmp"
+                             "DBDIR=/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 enable
+massive network automation through programmatic extension, while still
+supporting standard management interfaces and protocols (e.g. NetFlow, sFlow,
+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
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] gnu: Add openvswitch.
  2017-02-09 12:46   ` 宋文武
@ 2017-02-10 12:30     ` Ludovic Courtès
  0 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2017-02-10 12:30 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

iyzsong@member.fsf.org (宋文武) skribis:

> From a70e24ea5fc5113d1a71ca1be8a087da380fbc76 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@member.fsf.org>
> Date: Fri, 27 Jan 2017 21:35:12 +0800
> Subject: [PATCH] gnu: Add openvswitch.
>
> * gnu/packages/networking.scm (openvswitch): New variable.

Perfect, go ahead!

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-02-10 12:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-27 13:56 [PATCH 1/2] gnu: Add openvswitch 宋文武
2017-01-27 13:56 ` [PATCH 2/2] services: Add openvswitch-service-type 宋文武
2017-01-29  0:02   ` Ludovic Courtès
2017-01-27 14:53 ` [PATCH 1/2] gnu: Add openvswitch John Darrington
2017-02-09 12:24   ` 宋文武
2017-01-27 18:23 ` Marius Bakke
2017-02-09 12:26   ` 宋文武
2017-01-28 23:56 ` Ludovic Courtès
2017-02-09 12:46   ` 宋文武
2017-02-10 12:30     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).