gnunet-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Building gnunet and gnunet-gtk from git on GUIX


From: Marcin Skrzypek
Subject: Building gnunet and gnunet-gtk from git on GUIX
Date: Sun, 03 Apr 2022 17:25:23 +0000

Hi ya.

To install GNUnet from git on GUIX I use modified (removed check phase) package definition as tests fail:

(define-public gnunet-git
  (package
   (name "gnunet")
   (version "0.16.3")
   (source (local-file "/home/gnunet" #:recursive? #t))
   (build-system gnu-build-system)
   (inputs
    `(("bluez" ,bluez)
      ("glpk" ,glpk)
      ("gnurl" ,gnurl)
      ("gnutls" ,gnutls/dane)
      ("gstreamer" ,gstreamer)
      ("jansson" ,jansson)
      ("libextractor" ,libextractor)
      ("libidn" ,libidn2)
      ("libgcrypt" ,libgcrypt)
      ("libjpeg" ,libjpeg-turbo)
      ("libltdl" ,libltdl)
      ("libmicrohttpd" ,libmicrohttpd)
      ("libogg" ,libogg)
      ("libsodium" ,libsodium)
      ("libunistring" ,libunistring)
      ("miniupnpc" ,miniupnpc)
      ("opus" ,opus)
      ("pulseaudio" ,pulseaudio)
      ("sqlite" ,sqlite)
      ("zbar" ,zbar)
      ("zlib" ,zlib)))
   (native-inputs
    (list curl
 pkg-config python xxd
          (@ (gnu packages base) which)))
   (arguments
    '(#:parallel-tests? #f ; Parallel tests aren't supported.
      #:phases
      (modify-phases %standard-phases

;;;;;; Do not make tests 
    (delete 'check)

;;     (add-after 'configure 'remove-failing-tests
        ;;   ;; These tests fail in Guix's building environment.
        ;;   (lambda _
        ;;     (substitute* "src/transport/Makefile"
        ;;       (("\\$\\(am__EXEEXT_15\\)") "") ; test_transport_api_https
        ;;       (("test_transport_api_manipulation_cfg\\$\\(EXEEXT\\) \\\\\n") "")
        ;;       (("test_transport_api_udp_nat\\$\\(EXEEXT\\) \\\\\n") "")
        ;;       (("test_transport_blacklisting_multiple_plugins\\$\\(EXEEXT\\) \\\\\n") ""))
        ;;     (substitute* "src/testbed/Makefile"
        ;;       (("test_testbed_api_2peers_1controller\\$\\(EXEEXT\\) \\\\\n") "")
        ;;       (("test_testbed_api_statistics\\$\\(EXEEXT\\) \\\\\n") "")
        ;;       (("test_testbed_api_test\\$\\(EXEEXT\\) \\\\\n") "")
        ;;       (("test_testbed_api_test_timeout\\$\\(EXEEXT\\) \\\\\n") "")
        ;;       (("test_testbed_api_topology\\$\\(EXEEXT\\) \\\\\n") "")
        ;;       (("test_testbed_api_topology_clique\\$\\(EXEEXT\\) \\\\\n") ""))
        ;;     (substitute* "src/topology/Makefile"
        ;;       (("^check_PROGRAMS.*") "\n")
        ;;       (("test_gnunet_daemon_topology\\$\\(EXEEXT\\)\n") ""))
        ;;     (substitute* "src/namestore/Makefile"
        ;;       (("\\$\\(am__append_2\\)") ""))
        ;;     (substitute* "src/gns/Makefile"
        ;;       (("\\$\\(am__append_4\\)") ""))
        ;;     (substitute* "contrib/Makefile"
        ;;       (("^check_PROGRAMS.*") "\n"))
        ;;     ;; 'test' from coreutils doesn't behave as the test expects.
        ;;     (substitute* '("src/gns/gnunet-gns-proxy-setup-ca.in"
        ;;                    "src/transport/gnunet-transport-certificate-creation.in")
        ;;       (("gnutls-certtool") "certtool"))
        ;;     #t))
        ;; (add-before 'check 'set-env-var-for-tests
        ;;   (lambda _
        ;;     (setenv "LANG" "en_US.UTF-8")))
        ;; ;; Swap 'check and 'install phases and add installed binaries to $PATH.
        ;; (add-before 'check 'set-path-for-check
        ;;   (lambda* (#:key outputs #:allow-other-keys)
        ;;    (let ((out (assoc-ref outputs "out")))
        ;;      (setenv "GNUNET_PREFIX" (string-append out "/lib"))
        ;;      (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin")))
        ;;    #t))
        ;; (add-after 'install 'check
        ;;   (assoc-ref %standard-phases 'check))
)))
   (synopsis "Secure, decentralized, peer-to-peer networking framework")
   (description
     "GNUnet is a framework for secure peer-to-peer networking.  The
high-level goal is to provide a strong foundation of free software for a
global, distributed network that provides security and privacy.  GNUnet in
that sense aims to replace the current internet protocol stack.  Along with
an application for secure publication of files, it has grown to include all
kinds of basic applications for the foundation of a GNU internet.")
   (license license:agpl3+)
   (home-page "https://gnunet.org/")))


To define:

groups:

(groups (cons*
              (user-group (system? #t) (name "gnunet"))
              (user-group (system? #t) (name "gnunetdns"))
             %base-groups))

user:

(users (cons* 
            (user-account
             (name "gnunet")
             (group "gnunet")
             (supplementary-groups '("gnunetdns"))
             (home-directory "/var/lib/gnunet")
             (system? #t))


suid/guid:

  (simple-service 'gnunet-setuid setuid-program-service-type
    (list (setuid-program
            (program (file-append gnunet "/lib/gnunet/libexec/gnunet-helper-vpn"))
            (setuid? #t)
            (setgid? #f))
           (setuid-program
            (program (file-append gnunet "/lib/gnunet/libexec/gnunet-helper-transport-wlan"))
            (setuid? #t)
            (setgid? #f))
           (setuid-program
            (program (file-append gnunet "/lib/gnunet/libexec/gnunet-helper-transport-bluetooth"))
            (setuid? #t)
            (setgid? #f))
           (setuid-program
            (program (file-append gnunet "/lib/gnunet/libexec/gnunet-helper-dns"))
            (setuid? #t)
            (setgid? #f)
            (group "gnunetdns"))
           (setuid-program
            (program (file-append gnunet "/lib/gnunet/libexec/gnunet-service-dns"))
            (setuid? #f)
            (setgid? #t)
            (user "gnunet")
            (group "gnunetdns"))
           (setuid-program
            (program (file-append gnunet "/lib/gnunet/libexec/gnunet-helper-exit")))
           (setuid-program
            (program (file-append gnunet "/lib/gnunet/libexec/gnunet-helper-nat-server")))
           (setuid-program
            (program (file-append gnunet "/lib/gnunet/libexec/gnunet-helper-nat-client")))))


Gnunet builds but gnunet-gtk fails on:

...
checking for GNUnet util library in /gnu/store/7hbk1a4f59zzp9rfav8xmxcfczb995s1-gnunet-0.16.3/... checking for gnunet/gnunet_util_lib.h... no
...

Here's my definition of gnunet-gtk in the config.scm:

(define-public gnunet-gtk-git
  (package (inherit gnunet)
    (name "gnunet-gtk")
    (version "0.0")
    (source (local-file "/home/gnunet-gtk" #:recursive? #t))
    (arguments
     `(#:configure-flags
       (list
        "--with-libunique"
        "--with-qrencode"
        "--with-gnu-ld"
        ;;"--with-gnunet=/gnu/store/7hbk1a4f59zzp9rfav8xmxcfczb995s1-gnunet-0.16.3/"
        ;;"--with-gnunet=/gnu/store/7hbk1a4f59zzp9rfav8xmxcfczb995s1-gnunet-0.16.3/include"
        (string-append "--with-gnunet="
         (assoc-ref %build-inputs "gnunet-git"))
    )))
    (inputs
     `(("glade3" ,glade3)
       ("gnunet-git" ,gnunet)
       ("gnutls" ,gnutls/dane)
       ("gtk+" ,gtk+)
       ("libextractor" ,libextractor)
       ("libgcrypt" ,libgcrypt)
       ("libunique" ,libunique)
       ("qrencode" ,qrencode)))
    (native-inputs
     (list pkg-config libglade))
    (synopsis "Graphical front-end tools for GNUnet")
    (properties '((ftp-server . "ftp.gnu.org")
                  (ftp-directory . "/gnunet")))))


Adding "--with-gnunet=" does not help. With ".../include/" in the path it still do not find headers (these are there). 
Anyone has got an idea how to get it done? 

Cheers, Marcin

Sent with ProtonMail secure email.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]