unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 1/4] gnu: Add ppp.
@ 2015-11-16  6:06 宋文武
  2015-11-16  6:06 ` [PATCH 2/4] gnu: Add network-manager 宋文武
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: 宋文武 @ 2015-11-16  6:06 UTC (permalink / raw)
  To: guix-devel; +Cc: 宋文武

* gnu/packages/samba.scm (ppp): New variable.
---
 gnu/packages/samba.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm
index d7223bc..8d86249 100644
--- a/gnu/packages/samba.scm
+++ b/gnu/packages/samba.scm
@@ -23,6 +23,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix licenses)
   #:use-module (gnu packages acl)
+  #:use-module (gnu packages admin)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages openldap)
   #:use-module (gnu packages readline)
@@ -196,3 +197,44 @@ Desktops into Active Directory environments using the winbind daemon.")
      "Talloc is a hierarchical, reference counted memory pool system with
 destructors.  It is the core memory allocator used in Samba.")
     (license gpl3+))) ;; The bundled "replace" library uses LGPL3.
+
+(define-public ppp
+  (package
+    (name "ppp")
+    (version "2.4.7")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.samba.org/ftp/ppp/ppp-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "0c7vrjxl52pdwi4ckrvfjr08b31lfpgwf3pp0cqy76a77vfs7q02"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f ; no check target
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda _
+             (setenv "CC" "gcc")
+             (substitute* "pppd/Makefile.linux"
+               (("/usr/include/crypt\\.h")
+                (string-append (assoc-ref %build-inputs "libc")
+                               "/include/crypt.h"))
+               (("/usr/include/pcap-bpf.h")
+                (string-append (assoc-ref %build-inputs "libpcap")
+                               "/include/pcap-bpf.h")))
+             (zero? (system* "./configure"
+                             (string-append "--prefix=" %output))))))))
+    (inputs
+     `(("libpcap" ,libpcap)))
+    (synopsis "Implementation of the Point-to-Point Protocol")
+    (home-page "https://ppp.samba.org/")
+    (description
+     "The Point-to-Point Protocol (PPP) provides a standard way to establish
+a network connection over a serial link.  At present, this package supports IP
+and IPV6 and the protocols layered above them, such as TCP and UDP.")
+    ;; pppd, pppstats and pppdump are under BSD-style notices.
+    ;; some of the pppd plugins are GPL'd.
+    ;; chat is public domain.
+    (license (list bsd-3 bsd-4 gpl2+ public-domain))))
-- 
2.6.2

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

* [PATCH 2/4] gnu: Add network-manager.
  2015-11-16  6:06 [PATCH 1/4] gnu: Add ppp 宋文武
@ 2015-11-16  6:06 ` 宋文武
  2015-11-17 15:56   ` Ludovic Courtès
  2015-11-16  6:06 ` [PATCH 3/4] gnu: Add network-manager-applet 宋文武
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 15+ messages in thread
From: 宋文武 @ 2015-11-16  6:06 UTC (permalink / raw)
  To: guix-devel; +Cc: 宋文武

* gnu/packages/gnome.scm (%network-manager-glib-duplicate-test-patch)
(network-manager): New variables.
---
 gnu/packages/gnome.scm | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 95 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 4bd9d9c..440bb0d 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -35,6 +35,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (gnu packages)
+  #:use-module (gnu packages admin)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages avahi)
   #:use-module (gnu packages base)
@@ -44,6 +45,7 @@
   #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages djvu)
+  #:use-module (gnu packages dns)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages enchant)
@@ -67,6 +69,7 @@
   #:use-module (gnu packages lua)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages networking)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages photo)
   #:use-module (gnu packages pkg-config)
@@ -4072,3 +4075,95 @@ Evolution (hence the name), but is now used by other packages as well.")
      "Caribou is an input assistive technology intended for switch and pointer
 users.")
     (license license:lgpl2.1)))
+
+(define %network-manager-glib-duplicate-test-patch
+  (origin
+    (method url-fetch)
+    (uri (string-append
+          "http://cgit.freedesktop.org/NetworkManager/NetworkManager/"
+          "patch/libnm-core/tests/test-general.c"
+          "?id=874f455d6d47c5a34ed9861a6710f4b78202e0d6"))
+    (file-name "network-manager-glib-duplicate-test.patch")
+    (sha256
+     (base32
+      "1v0vpxzf0p0b1y5lmq8w7rjndp216gr60nbf2dpdz5rgxx3p3ml6"))))
+
+(define-public network-manager
+  (package
+    (name "network-manager")
+    (version "1.0.6")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/NetworkManager/"
+                                  (version-major+minor version) "/"
+                                  "NetworkManager-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1galh9j95yw33iv1jj8zz0h88ahx8gm5mqmam7zq9f730cj01siq"))
+              (patches (list %network-manager-glib-duplicate-test-patch))))
+    (build-system gnu-build-system)
+    (outputs '("out"
+               "doc")) ; 8 MiB of gtk-doc HTML
+    (arguments
+     '(#:configure-flags
+       (let ((out      (assoc-ref %outputs "out"))
+             (doc      (assoc-ref %outputs "doc"))
+             (dhclient (string-append (assoc-ref %build-inputs "isc-dhcp")
+                                      "/sbin/dhclient")))
+         (list "--with-crypto=gnutls"
+               "--disable-config-plugin-ibft"
+               "--sysconfdir=/etc"
+               "--localstatedir=/var"
+               (string-append "--with-udev-dir="
+                              out "/lib/udev")
+               (string-append "--with-dbus-sys-dir="
+                              out "/etc/dbus-1/system.d")
+               (string-append "--with-html-dir="
+                              doc "/share/gtk-doc/html")
+               (string-append "--with-dhclient=" dhclient)))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; For the missing /etc/machine-id.
+             (setenv "DBUS_FATAL_WARNINGS" "0")
+             #t))
+         (replace 'install
+           (lambda _
+             (zero? (system* "make"
+                             "sysconfdir=/tmp"
+                             "localstatedir=/tmp"
+                             "install")))))))
+    (native-inputs
+     `(("glib:bin" ,glib "bin") ; for gdbus-codegen
+       ("gobject-introspection" ,gobject-introspection)
+       ("intltool" ,intltool)
+       ("pkg-config" ,pkg-config)
+       ;; For testing.
+       ("python" ,python-wrapper)
+       ("python-dbus" ,python-dbus)
+       ("python-pygobject" ,python-pygobject)))
+    (inputs
+     `(("dbus-glib" ,dbus-glib)
+       ("dnsmasq" ,dnsmasq)
+       ("gnutls" ,gnutls)
+       ("iptables" ,iptables)
+       ("isc-dhcp" ,isc-dhcp)
+       ("libgcrypt" ,libgcrypt)
+       ("libgudev" ,libgudev)
+       ("libndp" ,libndp)
+       ("libnl" ,libnl)
+       ("libsoup" ,libsoup)
+       ("polkit" ,polkit)
+       ("ppp" ,ppp)
+       ("readline" ,readline)
+       ("util-linux" ,util-linux)))
+    (synopsis "Network connection manager")
+    (home-page "http://www.gnome.org/projects/NetworkManager/")
+    (description
+     "NetworkManager is a system network service that manages your network
+devices and connections, attempting to keep active network connectivity when
+available.  It manages ethernet, WiFi, mobile broadband (WWAN), and PPPoE
+devices, and provides VPN integration with a variety of different VPN
+services.")
+    (license license:gpl2+)))
-- 
2.6.2

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

* [PATCH 3/4] gnu: Add network-manager-applet.
  2015-11-16  6:06 [PATCH 1/4] gnu: Add ppp 宋文武
  2015-11-16  6:06 ` [PATCH 2/4] gnu: Add network-manager 宋文武
@ 2015-11-16  6:06 ` 宋文武
  2015-11-17 15:57   ` Ludovic Courtès
  2015-11-16  6:06 ` [PATCH 4/4] services: Add network-manager-service 宋文武
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 15+ messages in thread
From: 宋文武 @ 2015-11-16  6:06 UTC (permalink / raw)
  To: guix-devel; +Cc: 宋文武

* gnu/packages/gnome.scm (network-manager-applet): New variable.
---
 gnu/packages/gnome.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 440bb0d..da43fe2 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4167,3 +4167,38 @@ available.  It manages ethernet, WiFi, mobile broadband (WWAN), and PPPoE
 devices, and provides VPN integration with a variety of different VPN
 services.")
     (license license:gpl2+)))
+
+(define-public network-manager-applet
+  (package
+    (name "network-manager-applet")
+    (version "1.0.6")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/" name "/"
+                                  (version-major+minor version) "/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1yj0m6fb9v12d0di0rfmk3hx1vmygjkiff2c476rf792sbh56kax"))))
+    (build-system glib-or-gtk-build-system)
+    (arguments '(#:configure-flags '("--disable-migration")))
+    (native-inputs
+     `(("intltool" ,intltool)
+       ("gobject-introspection" ,gobject-introspection)
+       ("pkg-config" ,pkg-config)))
+    (propagated-inputs
+     ;; libnm-gtk.pc refers to all these.
+     `(("dbus-glib" ,dbus-glib)
+       ("gtk+" ,gtk+)
+       ("network-manager" ,network-manager)))
+    (inputs
+     `(("iso-codes" ,iso-codes)
+       ("libgudev" ,libgudev)
+       ("libnotify" ,libnotify)
+       ("libsecret" ,libsecret)))
+    (synopsis "Applet for managing network connections")
+    (home-page "http://www.gnome.org/projects/NetworkManager/")
+    (description
+     "This package contains a systray applet for NetworkManager.  It displays
+the available networks and allows users to easily switch between them.")
+    (license license:gpl2+)))
-- 
2.6.2

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

* [PATCH 4/4] services: Add network-manager-service.
  2015-11-16  6:06 [PATCH 1/4] gnu: Add ppp 宋文武
  2015-11-16  6:06 ` [PATCH 2/4] gnu: Add network-manager 宋文武
  2015-11-16  6:06 ` [PATCH 3/4] gnu: Add network-manager-applet 宋文武
@ 2015-11-16  6:06 ` 宋文武
  2015-11-17 16:01   ` Ludovic Courtès
  2015-11-16 21:56 ` [PATCH 1/4] gnu: Add ppp Mark H Weaver
  2015-11-16 21:59 ` Mark H Weaver
  4 siblings, 1 reply; 15+ messages in thread
From: 宋文武 @ 2015-11-16  6:06 UTC (permalink / raw)
  To: guix-devel; +Cc: 宋文武

* gnu/services/networking.scm (network-manager-service): New procedure.
(network-manager-service-type, %network-manager-activation): New variables.
(network-manager-dmd-service): New procedure.
---
 gnu/services/networking.scm | 44 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index a097144..a6efd89 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -29,6 +29,7 @@
   #:use-module (gnu packages messaging)
   #:use-module (gnu packages ntp)
   #:use-module (gnu packages wicd)
+  #:use-module (gnu packages gnome)
   #:use-module (guix gexp)
   #:use-module (guix records)
   #:use-module (srfi srfi-26)
@@ -40,7 +41,8 @@
             ntp-service
             tor-service
             bitlbee-service
-            wicd-service))
+            wicd-service
+            network-manager-service))
 
 ;;; Commentary:
 ;;;
@@ -498,4 +500,44 @@ several commands to interact with the daemon and configure networking:
 and @command{wicd-curses} user interfaces."
   (service wicd-service-type wicd))
 
+\f
+;;;
+;;; NetworkManager
+;;;
+
+(define %network-manager-activation
+  ;; Activation gexp for NetworkManager.
+  #~(begin
+      (use-modules (guix build utils))
+      (mkdir-p "/etc/NetworkManager/system-connections")))
+
+(define (network-manager-dmd-service network-manager)
+  "Return a dmd service for NETWORK-MANAGER."
+  (list (dmd-service
+         (documentation "Run the NetworkManager.")
+         (provision '(networking))
+         (requirement '(user-processes dbus-system loopback))
+         (start #~(make-forkexec-constructor
+                   (list (string-append #$network-manager
+                                        "/sbin/NetworkManager")
+                         "--no-daemon")))
+         (stop #~(make-kill-destructor)))))
+
+(define network-manager-service-type
+  (service-type (name 'network-manager)
+                (extensions
+                 (list (service-extension dmd-root-service-type
+                                          network-manager-dmd-service)
+                       (service-extension dbus-root-service-type list)
+                       (service-extension activation-service-type
+                                          (const %network-manager-activation))
+                       ;; Add network-manager to the system profile.
+                       ;; XXX: Should we add network-manager-applet?
+                       (service-extension profile-service-type list)))))
+
+(define* (network-manager-service #:key (network-manager network-manager))
+  "Return a service that runs NetworkManager, a network connection manager
+that attempting to keep active network connectivity when available."
+  (service network-manager-service-type network-manager))
+
 ;;; networking.scm ends here
-- 
2.6.2

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

* Re: [PATCH 1/4] gnu: Add ppp.
  2015-11-16  6:06 [PATCH 1/4] gnu: Add ppp 宋文武
                   ` (2 preceding siblings ...)
  2015-11-16  6:06 ` [PATCH 4/4] services: Add network-manager-service 宋文武
@ 2015-11-16 21:56 ` Mark H Weaver
  2015-11-17  2:01   ` 宋文武
  2015-11-16 21:59 ` Mark H Weaver
  4 siblings, 1 reply; 15+ messages in thread
From: Mark H Weaver @ 2015-11-16 21:56 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> writes:

> * gnu/packages/samba.scm (ppp): New variable.
> ---
>  gnu/packages/samba.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
>
> diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm
> index d7223bc..8d86249 100644
> --- a/gnu/packages/samba.scm
> +++ b/gnu/packages/samba.scm
> @@ -23,6 +23,7 @@
>    #:use-module (guix build-system gnu)
>    #:use-module (guix licenses)
>    #:use-module (gnu packages acl)
> +  #:use-module (gnu packages admin)
>    #:use-module (gnu packages popt)
>    #:use-module (gnu packages openldap)
>    #:use-module (gnu packages readline)
> @@ -196,3 +197,44 @@ Desktops into Active Directory environments using the winbind daemon.")
>       "Talloc is a hierarchical, reference counted memory pool system with
>  destructors.  It is the core memory allocator used in Samba.")
>      (license gpl3+))) ;; The bundled "replace" library uses LGPL3.
> +
> +(define-public ppp
> +  (package
> +    (name "ppp")
> +    (version "2.4.7")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://www.samba.org/ftp/ppp/ppp-"
> +                                  version ".tar.gz"))
> +              (sha256
> +               (base32
> +                "0c7vrjxl52pdwi4ckrvfjr08b31lfpgwf3pp0cqy76a77vfs7q02"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     '(#:tests? #f ; no check target
> +       #:phases
> +       (modify-phases %standard-phases
> +         (replace 'configure
> +           (lambda _
> +             (setenv "CC" "gcc")

How about #:make-flags '("CC=gcc") instead?  That's what I did in:

http://git.savannah.gnu.org/cgit/guix.git/commit/?h=wip-network-manager&id=d83bc88067404d4005d6e84724901e34e3d218c9

> +             (substitute* "pppd/Makefile.linux"
> +               (("/usr/include/crypt\\.h")
> +                (string-append (assoc-ref %build-inputs "libc")
> +                               "/include/crypt.h"))
> +               (("/usr/include/pcap-bpf.h")
> +                (string-append (assoc-ref %build-inputs "libpcap")
> +                               "/include/pcap-bpf.h")))
> +             (zero? (system* "./configure"
> +                             (string-append "--prefix=" %output))))))))

Also, instead of replacing the 'configure' phase, how about patching
Makefile.linux in a new phase?  Our default 'configure' phase now does
things like passing --build to ensure a deterministic build triplet,
whereas on systems like ARM the guessed triplet depends on the build
machine.  So, it would be good to use the default 'configure' phase when
possible.

> +    (inputs
> +     `(("libpcap" ,libpcap)))
> +    (synopsis "Implementation of the Point-to-Point Protocol")
> +    (home-page "https://ppp.samba.org/")
> +    (description
> +     "The Point-to-Point Protocol (PPP) provides a standard way to establish
> +a network connection over a serial link.  At present, this package supports IP
> +and IPV6 and the protocols layered above them, such as TCP and UDP.")
> +    ;; pppd, pppstats and pppdump are under BSD-style notices.
> +    ;; some of the pppd plugins are GPL'd.
> +    ;; chat is public domain.
> +    (license (list bsd-3 bsd-4 gpl2+ public-domain))))

Otherwise looks good to me!

     Thanks,
       Mark

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

* Re: [PATCH 1/4] gnu: Add ppp.
  2015-11-16  6:06 [PATCH 1/4] gnu: Add ppp 宋文武
                   ` (3 preceding siblings ...)
  2015-11-16 21:56 ` [PATCH 1/4] gnu: Add ppp Mark H Weaver
@ 2015-11-16 21:59 ` Mark H Weaver
  4 siblings, 0 replies; 15+ messages in thread
From: Mark H Weaver @ 2015-11-16 21:59 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> writes:

> * gnu/packages/samba.scm (ppp): New variable.
> ---
>  gnu/packages/samba.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
>
> diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm
> index d7223bc..8d86249 100644
> --- a/gnu/packages/samba.scm
> +++ b/gnu/packages/samba.scm
> @@ -23,6 +23,7 @@
>    #:use-module (guix build-system gnu)
>    #:use-module (guix licenses)
>    #:use-module (gnu packages acl)
> +  #:use-module (gnu packages admin)
>    #:use-module (gnu packages popt)
>    #:use-module (gnu packages openldap)
>    #:use-module (gnu packages readline)
> @@ -196,3 +197,44 @@ Desktops into Active Directory environments using the winbind daemon.")
>       "Talloc is a hierarchical, reference counted memory pool system with
>  destructors.  It is the core memory allocator used in Samba.")
>      (license gpl3+))) ;; The bundled "replace" library uses LGPL3.
> +
> +(define-public ppp
> +  (package
> +    (name "ppp")
> +    (version "2.4.7")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://www.samba.org/ftp/ppp/ppp-"
> +                                  version ".tar.gz"))
> +              (sha256
> +               (base32
> +                "0c7vrjxl52pdwi4ckrvfjr08b31lfpgwf3pp0cqy76a77vfs7q02"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     '(#:tests? #f ; no check target
> +       #:phases
> +       (modify-phases %standard-phases
> +         (replace 'configure
> +           (lambda _
> +             (setenv "CC" "gcc")
> +             (substitute* "pppd/Makefile.linux"
> +               (("/usr/include/crypt\\.h")
> +                (string-append (assoc-ref %build-inputs "libc")

Sorry, one more thing: instead of using %build-inputs, please add
'inputs' as a keyword argument to this phase procedure and use that.

> +                               "/include/crypt.h"))
> +               (("/usr/include/pcap-bpf.h")
> +                (string-append (assoc-ref %build-inputs "libpcap")

Ditto.

> +                               "/include/pcap-bpf.h")))
> +             (zero? (system* "./configure"
> +                             (string-append "--prefix=" %output))))))))

I would say ditto for %output, but ideally this should be left to the
default 'configure' phase, as I suggested in my earlier message.

      Thanks,
        Mark

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

* Re: [PATCH 1/4] gnu: Add ppp.
  2015-11-16 21:56 ` [PATCH 1/4] gnu: Add ppp Mark H Weaver
@ 2015-11-17  2:01   ` 宋文武
  0 siblings, 0 replies; 15+ messages in thread
From: 宋文武 @ 2015-11-17  2:01 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

On 2015-11-17 05:56, Mark H Weaver wrote:
> 宋文武 <iyzsong@gmail.com> writes:
> 
>> * gnu/packages/samba.scm (ppp): New variable.
>> ---
>>  gnu/packages/samba.scm | 42 
>> ++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 42 insertions(+)
>> 
>> diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm
>> index d7223bc..8d86249 100644
>> --- a/gnu/packages/samba.scm
>> +++ b/gnu/packages/samba.scm
>> @@ -23,6 +23,7 @@
>>    #:use-module (guix build-system gnu)
>>    #:use-module (guix licenses)
>>    #:use-module (gnu packages acl)
>> +  #:use-module (gnu packages admin)
>>    #:use-module (gnu packages popt)
>>    #:use-module (gnu packages openldap)
>>    #:use-module (gnu packages readline)
>> @@ -196,3 +197,44 @@ Desktops into Active Directory environments using 
>> the winbind daemon.")
>>       "Talloc is a hierarchical, reference counted memory pool system 
>> with
>>  destructors.  It is the core memory allocator used in Samba.")
>>      (license gpl3+))) ;; The bundled "replace" library uses LGPL3.
>> +
>> +(define-public ppp
>> +  (package
>> +    (name "ppp")
>> +    (version "2.4.7")
>> +    (source (origin
>> +              (method url-fetch)
>> +              (uri (string-append 
>> "https://www.samba.org/ftp/ppp/ppp-"
>> +                                  version ".tar.gz"))
>> +              (sha256
>> +               (base32
>> +                
>> "0c7vrjxl52pdwi4ckrvfjr08b31lfpgwf3pp0cqy76a77vfs7q02"))))
>> +    (build-system gnu-build-system)
>> +    (arguments
>> +     '(#:tests? #f ; no check target
>> +       #:phases
>> +       (modify-phases %standard-phases
>> +         (replace 'configure
>> +           (lambda _
>> +             (setenv "CC" "gcc")
> 
> How about #:make-flags '("CC=gcc") instead?  That's what I did in:
> 
> http://git.savannah.gnu.org/cgit/guix.git/commit/?h=wip-network-manager&id=d83bc88067404d4005d6e84724901e34e3d218c9
> 
Sure.
>> +             (substitute* "pppd/Makefile.linux"
>> +               (("/usr/include/crypt\\.h")
>> +                (string-append (assoc-ref %build-inputs "libc")
>> +                               "/include/crypt.h"))
>> +               (("/usr/include/pcap-bpf.h")
>> +                (string-append (assoc-ref %build-inputs "libpcap")
>> +                               "/include/pcap-bpf.h")))
>> +             (zero? (system* "./configure"
>> +                             (string-append "--prefix=" 
>> %output))))))))
> 
> Also, instead of replacing the 'configure' phase, how about patching
> Makefile.linux in a new phase?  Our default 'configure' phase now does
> things like passing --build to ensure a deterministic build triplet,
> whereas on systems like ARM the guessed triplet depends on the build
> machine.  So, it would be good to use the default 'configure' phase 
> when
> possible.
OK.
> 
>> +    (inputs
>> +     `(("libpcap" ,libpcap)))
>> +    (synopsis "Implementation of the Point-to-Point Protocol")
>> +    (home-page "https://ppp.samba.org/")
>> +    (description
>> +     "The Point-to-Point Protocol (PPP) provides a standard way to 
>> establish
>> +a network connection over a serial link.  At present, this package 
>> supports IP
>> +and IPV6 and the protocols layered above them, such as TCP and UDP.")
>> +    ;; pppd, pppstats and pppdump are under BSD-style notices.
>> +    ;; some of the pppd plugins are GPL'd.
>> +    ;; chat is public domain.
>> +    (license (list bsd-3 bsd-4 gpl2+ public-domain))))
> 
> Otherwise looks good to me!
Done, thanks for the review!

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

* Re: [PATCH 2/4] gnu: Add network-manager.
  2015-11-16  6:06 ` [PATCH 2/4] gnu: Add network-manager 宋文武
@ 2015-11-17 15:56   ` Ludovic Courtès
  2015-11-17 16:14     ` Mark H Weaver
  0 siblings, 1 reply; 15+ messages in thread
From: Ludovic Courtès @ 2015-11-17 15:56 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> skribis:

> * gnu/packages/gnome.scm (%network-manager-glib-duplicate-test-patch)
> (network-manager): New variables.

This looks perfect to me.  It would be nice to check it against the
wip-network-manager branch to see if anything’s missing.  Mark, WDYT?

Thank you!

Ludo’.

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

* Re: [PATCH 3/4] gnu: Add network-manager-applet.
  2015-11-16  6:06 ` [PATCH 3/4] gnu: Add network-manager-applet 宋文武
@ 2015-11-17 15:57   ` Ludovic Courtès
  2015-11-17 16:14     ` Mark H Weaver
  0 siblings, 1 reply; 15+ messages in thread
From: Ludovic Courtès @ 2015-11-17 15:57 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> skribis:

> * gnu/packages/gnome.scm (network-manager-applet): New variable.

LGTM!  Again may be worth checking what wip-network-manager does.

Ludo’.

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

* Re: [PATCH 4/4] services: Add network-manager-service.
  2015-11-16  6:06 ` [PATCH 4/4] services: Add network-manager-service 宋文武
@ 2015-11-17 16:01   ` Ludovic Courtès
  2015-11-26  6:01     ` 宋文武
  0 siblings, 1 reply; 15+ messages in thread
From: Ludovic Courtès @ 2015-11-17 16:01 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> skribis:

> * gnu/services/networking.scm (network-manager-service): New procedure.
> (network-manager-service-type, %network-manager-activation): New variables.
> (network-manager-dmd-service): New procedure.

[...]

> +(define (network-manager-dmd-service network-manager)
> +  "Return a dmd service for NETWORK-MANAGER."
> +  (list (dmd-service
> +         (documentation "Run the NetworkManager.")
> +         (provision '(networking))
> +         (requirement '(user-processes dbus-system loopback))
> +         (start #~(make-forkexec-constructor
> +                   (list (string-append #$network-manager
> +                                        "/sbin/NetworkManager")
> +                         "--no-daemon")))
> +         (stop #~(make-kill-destructor)))))

I guess that even if NM can be activated by dbus-daemon, we prefer to
start it explicitly like this, right?

I suppose relying on dbus activation means that you could end up with no
networking until you actually start network-manager-applet or one of
these clients.

> +                       ;; Add network-manager to the system profile.
> +                       ;; XXX: Should we add network-manager-applet?
> +                       (service-extension profile-service-type list)))))

I think network-manager-applet could be added to profile-service-type,
but only as part of %desktop-services.  WDYT?

Otherwise LGTM!

In a subsequent patch, you can add network-manager-service to
%desktop-services I guess.  :-)

Thank you!

Ludo’.

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

* Re: [PATCH 2/4] gnu: Add network-manager.
  2015-11-17 15:56   ` Ludovic Courtès
@ 2015-11-17 16:14     ` Mark H Weaver
  0 siblings, 0 replies; 15+ messages in thread
From: Mark H Weaver @ 2015-11-17 16:14 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, 宋文武

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

> 宋文武 <iyzsong@gmail.com> skribis:
>
>> * gnu/packages/gnome.scm (%network-manager-glib-duplicate-test-patch)
>> (network-manager): New variables.
>
> This looks perfect to me.  It would be nice to check it against the
> wip-network-manager branch to see if anything’s missing.  Mark, WDYT?

I tried, but never got it working.  If this works, I think we should
probably just push it :)

    Thanks,
      Mark

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

* Re: [PATCH 3/4] gnu: Add network-manager-applet.
  2015-11-17 15:57   ` Ludovic Courtès
@ 2015-11-17 16:14     ` Mark H Weaver
  0 siblings, 0 replies; 15+ messages in thread
From: Mark H Weaver @ 2015-11-17 16:14 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, 宋文武

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

> 宋文武 <iyzsong@gmail.com> skribis:
>
>> * gnu/packages/gnome.scm (network-manager-applet): New variable.
>
> LGTM!  Again may be worth checking what wip-network-manager does.

I didn't get to the point of adding the applet, so there's nothing
analogous to look at here.

      Mark

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

* Re: [PATCH 4/4] services: Add network-manager-service.
  2015-11-17 16:01   ` Ludovic Courtès
@ 2015-11-26  6:01     ` 宋文武
  2015-11-26  8:49       ` Ludovic Courtès
  0 siblings, 1 reply; 15+ messages in thread
From: 宋文武 @ 2015-11-26  6:01 UTC (permalink / raw)
  To: ludo; +Cc: guix-devel, 宋文武

On 2015-11-18 00:01, ludo@gnu.org wrote:
> 宋文武 <iyzsong@gmail.com> skribis:
> 
>> * gnu/services/networking.scm (network-manager-service): New 
>> procedure.
>> (network-manager-service-type, %network-manager-activation): New 
>> variables.
>> (network-manager-dmd-service): New procedure.
> 
> [...]
> 
>> +(define (network-manager-dmd-service network-manager)
>> +  "Return a dmd service for NETWORK-MANAGER."
>> +  (list (dmd-service
>> +         (documentation "Run the NetworkManager.")
>> +         (provision '(networking))
>> +         (requirement '(user-processes dbus-system loopback))
>> +         (start #~(make-forkexec-constructor
>> +                   (list (string-append #$network-manager
>> +                                        "/sbin/NetworkManager")
>> +                         "--no-daemon")))
>> +         (stop #~(make-kill-destructor)))))
> 
> I guess that even if NM can be activated by dbus-daemon, we prefer to
> start it explicitly like this, right?
> 
> I suppose relying on dbus activation means that you could end up with 
> no
> networking until you actually start network-manager-applet or one of
> these clients.
I haven't test the dbus activatation, at lease nmcli won't do that.
Yes, and having a dmd service is convenient.

> 
>> +                       ;; Add network-manager to the system profile.
>> +                       ;; XXX: Should we add network-manager-applet?
>> +                       (service-extension profile-service-type 
>> list)))))
> 
> I think network-manager-applet could be added to profile-service-type,
> but only as part of %desktop-services.  WDYT?
OK, that make sence.
> 
> Otherwise LGTM!
> 
> In a subsequent patch, you can add network-manager-service to
> %desktop-services I guess.  :-)
I only push this, because %desktop-services aleadly contains 
wicd-service.
And more important, I haven't test wireless network (my card don't work 
with linux-libre).

Thanks for the review!

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

* Re: [PATCH 4/4] services: Add network-manager-service.
  2015-11-26  6:01     ` 宋文武
@ 2015-11-26  8:49       ` Ludovic Courtès
  2015-11-27 21:26         ` Ludovic Courtès
  0 siblings, 1 reply; 15+ messages in thread
From: Ludovic Courtès @ 2015-11-26  8:49 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel, 宋文武

宋文武 <iyzsong@openmailbox.org> skribis:

> On 2015-11-18 00:01, ludo@gnu.org wrote:
>> 宋文武 <iyzsong@gmail.com> skribis:
>>
>>> * gnu/services/networking.scm (network-manager-service): New
>>> procedure.
>>> (network-manager-service-type, %network-manager-activation): New
>>> variables.
>>> (network-manager-dmd-service): New procedure.

[...]

>> In a subsequent patch, you can add network-manager-service to
>> %desktop-services I guess.  :-)
> I only push this, because %desktop-services aleadly contains
> wicd-service.
> And more important, I haven't test wireless network (my card don't
> work with linux-libre).

OK, I’ll test this on my laptop and report back.

BTW, could you document ‘network-manager-service’ under “Networking” in
guix.texi?  That would great.

Thanks again!

Ludo’.

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

* Re: [PATCH 4/4] services: Add network-manager-service.
  2015-11-26  8:49       ` Ludovic Courtès
@ 2015-11-27 21:26         ` Ludovic Courtès
  0 siblings, 0 replies; 15+ messages in thread
From: Ludovic Courtès @ 2015-11-27 21:26 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel, 宋文武

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

> OK, I’ll test this on my laptop and report back.

I tested, but then I’m unable to run nm-applet (I run ratpoison but it
wants a status bar or something) and I couldn’t get anything out of
nmcli.  So wired networking worked directly, but I couldn’t get wireless
to work.

Could someone try it in Xfce or something?

I used this to remove Wicd, after exporting ‘wicd-service-type’:

  (define %desktop-services-sans-wicd
    (remove (lambda (service)
              (eq? wicd-service-type (service-kind service)))
            %desktop-services))

and then simply added a call to ‘network-manager-service’ to my service
list.

Thanks,
Ludo’.

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

end of thread, other threads:[~2015-11-27 21:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-16  6:06 [PATCH 1/4] gnu: Add ppp 宋文武
2015-11-16  6:06 ` [PATCH 2/4] gnu: Add network-manager 宋文武
2015-11-17 15:56   ` Ludovic Courtès
2015-11-17 16:14     ` Mark H Weaver
2015-11-16  6:06 ` [PATCH 3/4] gnu: Add network-manager-applet 宋文武
2015-11-17 15:57   ` Ludovic Courtès
2015-11-17 16:14     ` Mark H Weaver
2015-11-16  6:06 ` [PATCH 4/4] services: Add network-manager-service 宋文武
2015-11-17 16:01   ` Ludovic Courtès
2015-11-26  6:01     ` 宋文武
2015-11-26  8:49       ` Ludovic Courtès
2015-11-27 21:26         ` Ludovic Courtès
2015-11-16 21:56 ` [PATCH 1/4] gnu: Add ppp Mark H Weaver
2015-11-17  2:01   ` 宋文武
2015-11-16 21:59 ` Mark H Weaver

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).