diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | configure.ac | 21 | ||||
-rw-r--r-- | contrib/packages/guix/guix-env-gillmann.scm | 151 | ||||
-rw-r--r-- | contrib/packages/guix/guix-env-py2.scm | 158 |
4 files changed, 329 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore index 46dc14a98..0959a9597 100644 --- a/.gitignore +++ b/.gitignore | |||
@@ -41,7 +41,6 @@ INSTALL | |||
41 | confdefs.h | 41 | confdefs.h |
42 | confdefs.c | 42 | confdefs.c |
43 | confdefs.err | 43 | confdefs.err |
44 | guix-env-gillmann.scm | ||
45 | src/namestore/test_namestore_api_zone_to_name | 44 | src/namestore/test_namestore_api_zone_to_name |
46 | src/credential/gnunet-credential | 45 | src/credential/gnunet-credential |
47 | src/credential/gnunet-service-credential | 46 | src/credential/gnunet-service-credential |
diff --git a/configure.ac b/configure.ac index fc44dcf5a..c8e316416 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -213,10 +213,19 @@ else | |||
213 | AC_MSG_WARN([warning: 'iptables' not found.]) | 213 | AC_MSG_WARN([warning: 'iptables' not found.]) |
214 | fi | 214 | fi |
215 | 215 | ||
216 | |||
217 | AC_CHECK_PROG(VAR_IFCONFIG_BINARY, ifconfig, true, false) | 216 | AC_CHECK_PROG(VAR_IFCONFIG_BINARY, ifconfig, true, false) |
218 | AC_MSG_WARN([warning: 'ifconfig' not found.]) | 217 | AC_MSG_WARN([warning: 'ifconfig' not found.]) |
219 | 218 | ||
219 | # miniupnpc / upnpc binary is a soft runtime requirement | ||
220 | AC_PATH_TARGET_TOOL(VAR_UPNPC_BINARY, upnpc, false) | ||
221 | |||
222 | if test x"$VAR_UPNPC_BINARY" != x"false" | ||
223 | then | ||
224 | AC_DEFINE_UNQUOTED([UPNPC], "$VAR_UPNPC_BINARY", [Path to upnpc binary]) | ||
225 | else | ||
226 | AC_MSG_WARN([warning: 'upnpc' binary not found.]) | ||
227 | fi | ||
228 | |||
220 | AC_CHECK_MEMBER(struct tm.tm_gmtoff, | 229 | AC_CHECK_MEMBER(struct tm.tm_gmtoff, |
221 | [AC_DEFINE(HAVE_TM_GMTOFF, 1, | 230 | [AC_DEFINE(HAVE_TM_GMTOFF, 1, |
222 | [Define if struct tm has the tm_gmtoff member.])], | 231 | [Define if struct tm has the tm_gmtoff member.])], |
@@ -1811,6 +1820,10 @@ then | |||
1811 | AC_MSG_NOTICE([WARNING: jansson library not found. json support will not be compiled.]) | 1820 | AC_MSG_NOTICE([WARNING: jansson library not found. json support will not be compiled.]) |
1812 | fi | 1821 | fi |
1813 | 1822 | ||
1823 | # | ||
1824 | # FIXME: `some modules' -> be more specific which exact modules. | ||
1825 | # | ||
1826 | |||
1814 | # warn user if iptables is not found | 1827 | # warn user if iptables is not found |
1815 | if test "$VAR_IPTABLES_BINARY" = "false" | 1828 | if test "$VAR_IPTABLES_BINARY" = "false" |
1816 | then | 1829 | then |
@@ -1823,6 +1836,12 @@ then | |||
1823 | AC_MSG_NOTICE([WARNING: ifconfig not found. some modules may not have full functionality.]) | 1836 | AC_MSG_NOTICE([WARNING: ifconfig not found. some modules may not have full functionality.]) |
1824 | fi | 1837 | fi |
1825 | 1838 | ||
1839 | # warn user if upnpc binary is not found | ||
1840 | if test "$VAR_UPNPC_BINARY" = "false" | ||
1841 | then | ||
1842 | AC_MSG_NOTICE([WARNING: upnpc binary not found. some modules may not have full functionality.]) | ||
1843 | fi | ||
1844 | |||
1826 | #gnutls | 1845 | #gnutls |
1827 | if test x$gnutls != xtrue | 1846 | if test x$gnutls != xtrue |
1828 | then | 1847 | then |
diff --git a/contrib/packages/guix/guix-env-gillmann.scm b/contrib/packages/guix/guix-env-gillmann.scm new file mode 100644 index 000000000..4b977c1bb --- /dev/null +++ b/contrib/packages/guix/guix-env-gillmann.scm | |||
@@ -0,0 +1,151 @@ | |||
1 | ;;; This file is part of GNUnet. | ||
2 | ;;; Copyright (C) 2016, 2017, 2018 GNUnet e.V. | ||
3 | ;;; | ||
4 | ;;; GNUnet is free software; you can redistribute it and/or modify | ||
5 | ;;; it under the terms of the GNU General Public License as published | ||
6 | ;;; by the Free Software Foundation; either version 3, or (at your | ||
7 | ;;; option) any later version. | ||
8 | ;;; | ||
9 | ;;; GNUnet is distributed in the hope that it will be useful, but | ||
10 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | ;;; General Public License for more details. | ||
13 | ;;; | ||
14 | ;;; You should have received a copy of the GNU General Public License | ||
15 | ;;; along with GNUnet; see the file COPYING. If not, write to the | ||
16 | ;;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | ;;; Boston, MA 02110-1301, USA. | ||
18 | |||
19 | (use-modules | ||
20 | (ice-9 popen) | ||
21 | (ice-9 match) | ||
22 | (ice-9 rdelim) | ||
23 | (guix packages) | ||
24 | (guix build-system gnu) | ||
25 | (guix gexp) | ||
26 | ((guix build utils) #:select (with-directory-excursion)) | ||
27 | (guix git-download) | ||
28 | (guix utils) ; current-source-directory | ||
29 | (gnu packages) | ||
30 | (gnu packages aidc) | ||
31 | (gnu packages autotools) | ||
32 | (gnu packages backup) | ||
33 | (gnu packages base) | ||
34 | (gnu packages compression) | ||
35 | (gnu packages curl) | ||
36 | (gnu packages databases) | ||
37 | (gnu packages file) | ||
38 | (gnu packages gettext) | ||
39 | (gnu packages glib) | ||
40 | (gnu packages gnome) | ||
41 | (gnu packages gnunet) | ||
42 | (gnu packages gnupg) | ||
43 | (gnu packages gnuzilla) | ||
44 | (gnu packages groff) | ||
45 | (gnu packages gstreamer) | ||
46 | (gnu packages gtk) | ||
47 | (gnu packages guile) | ||
48 | (gnu packages image) | ||
49 | (gnu packages image-viewers) | ||
50 | (gnu packages libidn) | ||
51 | (gnu packages libunistring) | ||
52 | (gnu packages linux) | ||
53 | (gnu packages maths) | ||
54 | (gnu packages multiprecision) | ||
55 | (gnu packages perl) | ||
56 | (gnu packages pkg-config) | ||
57 | (gnu packages pulseaudio) | ||
58 | (gnu packages python) | ||
59 | (gnu packages tex) | ||
60 | (gnu packages texinfo) | ||
61 | (gnu packages tex) | ||
62 | (gnu packages tls) | ||
63 | (gnu packages upnp) | ||
64 | (gnu packages video) | ||
65 | (gnu packages web) | ||
66 | (gnu packages xiph) | ||
67 | ((guix licenses) #:prefix license:)) | ||
68 | |||
69 | (define %source-dir (current-source-directory)) | ||
70 | |||
71 | (define gnunet-dev-env | ||
72 | (let* ((revision "1") | ||
73 | (select? (delay (or (git-predicate | ||
74 | (current-source-directory)) | ||
75 | source-file?)))) | ||
76 | (package | ||
77 | (inherit gnunet) | ||
78 | (name "gnunet") | ||
79 | (version (string-append "git" revision)) | ||
80 | (source | ||
81 | (local-file | ||
82 | (string-append (getcwd)) | ||
83 | #:recursive? #t)) | ||
84 | (inputs | ||
85 | `(("glpk" ,glpk) | ||
86 | ("gnurl" ,gnurl) | ||
87 | ("gstreamer" ,gstreamer) | ||
88 | ("gst-plugins-base" ,gst-plugins-base) | ||
89 | ("gnutls/dane" ,gnutls/dane) | ||
90 | ("iptables" ,iptables) | ||
91 | ("libextractor" ,libextractor) | ||
92 | ("libgcrypt" ,libgcrypt) | ||
93 | ("libidn" ,libidn) | ||
94 | ("libmicrohttpd" ,libmicrohttpd) | ||
95 | ("libltdl" ,libltdl) | ||
96 | ("libunistring" ,libunistring) | ||
97 | ("openssl" ,openssl) | ||
98 | ("opus" ,opus) | ||
99 | ("pulseaudio" ,pulseaudio) | ||
100 | ("sqlite" ,sqlite) | ||
101 | ("postgresql" ,postgresql) | ||
102 | ("mariadb" ,mariadb) | ||
103 | ("zlib" ,zlib) | ||
104 | ("perl" ,perl) | ||
105 | ("python-2" ,python-2) ; tests and gnunet-qr | ||
106 | ("jansson" ,jansson) | ||
107 | ("nss" ,nss) | ||
108 | ("glib" ,glib "bin") | ||
109 | ("gmp" ,gmp) | ||
110 | ("bluez" ,bluez) ; for optional bluetooth feature | ||
111 | ("glib" ,glib) | ||
112 | ;; ("texlive" ,texlive) ;FIXME: minimize. | ||
113 | ("texlive-tiny" ,texlive-tiny) ;; Seems to be enough for _just_ info output. | ||
114 | ("miniupnpc" ,miniupnpc) | ||
115 | ("libogg" ,libogg))) | ||
116 | (native-inputs | ||
117 | `(("pkg-config" ,pkg-config) | ||
118 | ("autoconf" ,autoconf) | ||
119 | ("automake" ,automake) | ||
120 | ("gnu-gettext" ,gnu-gettext) | ||
121 | ("which" ,which) | ||
122 | ("texinfo" ,texinfo-5) ; Debian stable: 5.2 | ||
123 | ("libtool" ,libtool))) | ||
124 | (outputs '("out" "debug")) | ||
125 | (arguments | ||
126 | `(;#:configure-flags | ||
127 | ;;(list (string-append "--with-nssdir=" %output "/lib") | ||
128 | ;;"--enable-gcc-hardening" | ||
129 | ;;"--enable-linker-hardening" | ||
130 | ;;;;"--enable-documentation-only") | ||
131 | ;;;"--enable-logging=verbose" | ||
132 | ;;;"CFLAGS=-ggdb -O0") | ||
133 | #:phases | ||
134 | ;; swap check and install phases and set paths to installed bin | ||
135 | (modify-phases %standard-phases | ||
136 | (add-after 'unpack 'patch-bin-sh | ||
137 | (lambda _ | ||
138 | (for-each (lambda (f) (chmod f #o755)) | ||
139 | (find-files "po" "")) | ||
140 | #t)) | ||
141 | (add-after 'patch-bin-sh 'bootstrap | ||
142 | (lambda _ | ||
143 | (zero? (system* "sh" "bootstrap")))) | ||
144 | ;;(add-before 'build 'chdir | ||
145 | ;; (lambda _ | ||
146 | ;; (chdir "doc/documentation"))) | ||
147 | (delete 'check) | ||
148 | ;; XXX: https://gnunet.org/bugs/view.php?id=4619 | ||
149 | )))))) | ||
150 | |||
151 | gnunet-dev-env | ||
diff --git a/contrib/packages/guix/guix-env-py2.scm b/contrib/packages/guix/guix-env-py2.scm new file mode 100644 index 000000000..6085f96a9 --- /dev/null +++ b/contrib/packages/guix/guix-env-py2.scm | |||
@@ -0,0 +1,158 @@ | |||
1 | ;;; This file is part of GNUnet. | ||
2 | ;;; Copyright (C) 2016, 2017, 2018 GNUnet e.V. | ||
3 | ;;; | ||
4 | ;;; GNUnet is free software; you can redistribute it and/or modify | ||
5 | ;;; it under the terms of the GNU General Public License as published | ||
6 | ;;; by the Free Software Foundation; either version 3, or (at your | ||
7 | ;;; option) any later version. | ||
8 | ;;; | ||
9 | ;;; GNUnet is distributed in the hope that it will be useful, but | ||
10 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | ;;; General Public License for more details. | ||
13 | ;;; | ||
14 | ;;; You should have received a copy of the GNU General Public License | ||
15 | ;;; along with GNUnet; see the file COPYING. If not, write to the | ||
16 | ;;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | ;;; Boston, MA 02110-1301, USA. | ||
18 | |||
19 | (use-modules | ||
20 | (ice-9 popen) | ||
21 | (ice-9 match) | ||
22 | (ice-9 rdelim) | ||
23 | (guix packages) | ||
24 | (guix build-system gnu) | ||
25 | (guix gexp) | ||
26 | ((guix build utils) #:select (with-directory-excursion)) | ||
27 | (guix git-download) | ||
28 | (guix utils) ; current-source-directory | ||
29 | (gnu packages) | ||
30 | (gnu packages aidc) | ||
31 | (gnu packages autotools) | ||
32 | (gnu packages backup) | ||
33 | (gnu packages base) | ||
34 | (gnu packages compression) | ||
35 | (gnu packages curl) | ||
36 | (gnu packages databases) | ||
37 | (gnu packages file) | ||
38 | (gnu packages gettext) | ||
39 | (gnu packages glib) | ||
40 | (gnu packages gnome) | ||
41 | (gnu packages gnunet) | ||
42 | (gnu packages gnupg) | ||
43 | (gnu packages gnuzilla) | ||
44 | (gnu packages groff) | ||
45 | (gnu packages gstreamer) | ||
46 | (gnu packages gtk) | ||
47 | (gnu packages guile) | ||
48 | (gnu packages image) | ||
49 | (gnu packages image-viewers) | ||
50 | (gnu packages libidn) | ||
51 | (gnu packages libunistring) | ||
52 | (gnu packages linux) | ||
53 | (gnu packages maths) | ||
54 | (gnu packages multiprecision) | ||
55 | (gnu packages perl) | ||
56 | (gnu packages pkg-config) | ||
57 | (gnu packages pulseaudio) | ||
58 | (gnu packages python) | ||
59 | (gnu packages tex) | ||
60 | (gnu packages texinfo) | ||
61 | (gnu packages tex) | ||
62 | (gnu packages tls) | ||
63 | (gnu packages upnp) | ||
64 | (gnu packages video) | ||
65 | (gnu packages web) | ||
66 | (gnu packages xiph) | ||
67 | ((guix licenses) #:prefix license:)) | ||
68 | |||
69 | (define %source-dir (current-source-directory)) | ||
70 | |||
71 | (define gnunet-dev-env | ||
72 | (let* ((revision "1") | ||
73 | (select? (delay (or (git-predicate | ||
74 | (current-source-directory)) | ||
75 | source-file?)))) | ||
76 | (package | ||
77 | (inherit gnunet) | ||
78 | (name "gnunet") | ||
79 | (version (string-append "git" revision)) | ||
80 | (source | ||
81 | (local-file | ||
82 | (string-append (getcwd)) | ||
83 | #:recursive? #t)) | ||
84 | (inputs | ||
85 | `(("glpk" ,glpk) | ||
86 | ("gnurl" ,gnurl) | ||
87 | ("gstreamer" ,gstreamer) | ||
88 | ("gst-plugins-base" ,gst-plugins-base) | ||
89 | ("gnutls/dane" ,gnutls/dane) | ||
90 | ("libextractor" ,libextractor) | ||
91 | ("libgcrypt" ,libgcrypt) | ||
92 | ("libidn" ,libidn) | ||
93 | ("libmicrohttpd" ,libmicrohttpd) | ||
94 | ("libltdl" ,libltdl) | ||
95 | ("libunistring" ,libunistring) | ||
96 | ("openssl" ,openssl) | ||
97 | ("opus" ,opus) | ||
98 | ("pulseaudio" ,pulseaudio) | ||
99 | ("sqlite" ,sqlite) | ||
100 | ("postgresql" ,postgresql) | ||
101 | ("mysql" ,mysql) | ||
102 | ("zlib" ,zlib) | ||
103 | ("perl" ,perl) | ||
104 | ("python-2" ,python-2) ; tests and gnunet-qr | ||
105 | ("python2-future" ,python2-future) | ||
106 | ("jansson" ,jansson) | ||
107 | ("nss" ,nss) | ||
108 | ("glib" ,glib "bin") | ||
109 | ("gmp" ,gmp) | ||
110 | ("bluez" ,bluez) ; for optional bluetooth feature | ||
111 | ("glib" ,glib) | ||
112 | ;; ("texlive" ,texlive) ;FIXME: minimize. | ||
113 | ("texlive-tiny" ,texlive-tiny) ;; Seems to be enough for _just_ info output. | ||
114 | ("miniupnpc" ,miniupnpc) | ||
115 | ("libogg" ,libogg))) | ||
116 | (native-inputs | ||
117 | `(("pkg-config" ,pkg-config) | ||
118 | ("autoconf" ,autoconf) | ||
119 | ("automake" ,automake) | ||
120 | ("gnu-gettext" ,gnu-gettext) | ||
121 | ("which" ,which) | ||
122 | ("texinfo" ,texinfo-5) ; Debian stable: 5.2 | ||
123 | ("libtool" ,libtool))) | ||
124 | (outputs '("out" "debug")) | ||
125 | (arguments | ||
126 | `(;#:configure-flags | ||
127 | ;;(list (string-append "--with-nssdir=" %output "/lib") | ||
128 | ;;"--enable-gcc-hardening" | ||
129 | ;;"--enable-linker-hardening" | ||
130 | ;;;;"--enable-documentation-only") | ||
131 | ;;;"--enable-logging=verbose" | ||
132 | ;;;"CFLAGS=-ggdb -O0") | ||
133 | #:phases | ||
134 | ;; swap check and install phases and set paths to installed bin | ||
135 | (modify-phases %standard-phases | ||
136 | (add-after 'unpack 'patch-bin-sh | ||
137 | (lambda _ | ||
138 | (for-each (lambda (f) (chmod f #o755)) | ||
139 | (find-files "po" "")) | ||
140 | #t)) | ||
141 | (add-after 'patch-bin-sh 'bootstrap | ||
142 | (lambda _ | ||
143 | (zero? (system* "sh" "bootstrap")))) | ||
144 | ;;(add-before 'build 'chdir | ||
145 | ;; (lambda _ | ||
146 | ;; (chdir "doc/documentation"))) | ||
147 | (delete 'check) | ||
148 | ;; XXX: https://gnunet.org/bugs/view.php?id=4619 | ||
149 | (add-after 'install 'set-path-for-check | ||
150 | (lambda* (#:key outputs #:allow-other-keys) | ||
151 | (let* ((out (assoc-ref outputs "out")) | ||
152 | (bin (string-append out "/bin")) | ||
153 | (lib (string-append out "/lib"))) | ||
154 | (setenv "GNUNET_PREFIX" lib) | ||
155 | (setenv "PATH" (string-append (getenv "PATH") ":" bin)) | ||
156 | (zero? (system* "make" "check"))))))))))) | ||
157 | |||
158 | gnunet-dev-env | ||