Re: [PATCH 1/2] gnu: Add openvswitch.

2017-02-10 Thread Ludovic Courtès
iyzs...@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?= 
> 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’.



Re: [PATCH 1/2] gnu: Add openvswitch.

2017-02-10 Thread 宋文武
l...@gnu.org (Ludovic Courtès) writes:

> Hi 宋文武!
>
> 宋文武  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:

>From a70e24ea5fc5113d1a71ca1be8a087da380fbc76 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 
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



Re: [PATCH 1/2] gnu: Add openvswitch.

2017-02-09 Thread 宋文武
Marius Bakke  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!



Re: [PATCH 1/2] gnu: Add openvswitch.

2017-02-09 Thread 宋文武
John Darrington  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.



Re: [PATCH 1/2] gnu: Add openvswitch.

2017-01-28 Thread Ludovic Courtès
Hi 宋文武!

宋文武  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’.



Re: [PATCH 1/2] gnu: Add openvswitch.

2017-01-27 Thread Marius Bakke
宋文武  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.


signature.asc
Description: PGP signature


Re: [PATCH 1/2] gnu: Add openvswitch.

2017-01-27 Thread John Darrington
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.



signature.asc
Description: Digital signature