Commit | Line | Data |
---|---|---|
a40f1543 | 1 | ;;; GNU Guix --- Functional package management for GNU |
8ff3df5b | 2 | ;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org> |
baece08a | 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> |
9591e11a | 4 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
a40f1543 LC |
5 | ;;; |
6 | ;;; This file is part of GNU Guix. | |
7 | ;;; | |
8 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
9 | ;;; under the terms of the GNU General Public License as published by | |
10 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
11 | ;;; your option) any later version. | |
12 | ;;; | |
13 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
14 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ;;; GNU General Public License for more details. | |
17 | ;;; | |
18 | ;;; You should have received a copy of the GNU General Public License | |
19 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
20 | ||
21 | (define-module (gnu packages samba) | |
22 | #:use-module (guix packages) | |
23 | #:use-module (guix download) | |
24 | #:use-module (guix build-system gnu) | |
25 | #:use-module (guix licenses) | |
26 | #:use-module (gnu packages acl) | |
ae916e02 | 27 | #:use-module (gnu packages admin) |
710964d1 | 28 | #:use-module (gnu packages cups) |
52513595 | 29 | #:use-module (gnu packages databases) |
710964d1 | 30 | #:use-module (gnu packages tls) |
a40f1543 | 31 | #:use-module (gnu packages popt) |
0674b3c9 | 32 | #:use-module (gnu packages pkg-config) |
a40f1543 LC |
33 | #:use-module (gnu packages openldap) |
34 | #:use-module (gnu packages readline) | |
a40f1543 LC |
35 | #:use-module (gnu packages linux) |
36 | #:use-module (gnu packages perl) | |
37 | #:use-module (gnu packages python)) | |
38 | ||
39 | (define-public iniparser | |
40 | (package | |
41 | (name "iniparser") | |
def8f501 | 42 | (version "4.0") |
a40f1543 LC |
43 | (source (origin |
44 | (method url-fetch) | |
def8f501 | 45 | (uri (string-append "https://github.com/ndevilla/iniparser/archive/v" |
a40f1543 | 46 | version ".tar.gz")) |
def8f501 | 47 | (file-name (string-append name "-" version ".tar.gz")) |
a40f1543 LC |
48 | (sha256 |
49 | (base32 | |
def8f501 | 50 | "1flj7srvh2hp9ls96qz922bklyhw7f27mmn23b16839zpdjddfz0")))) |
a40f1543 LC |
51 | (build-system gnu-build-system) |
52 | (arguments | |
2af56bfa EF |
53 | '(#:phases |
54 | (modify-phases %standard-phases | |
55 | (replace 'configure | |
56 | (lambda* (#:key outputs #:allow-other-keys) | |
57 | (substitute* '("Makefile" "test/Makefile") | |
58 | (("/usr/lib") | |
59 | (string-append (assoc-ref outputs "out") "/lib")) | |
60 | (("\\?= gcc") "= gcc")))) | |
61 | (replace 'build | |
62 | (lambda _ | |
63 | (and (zero? (system* "make" "libiniparser.so")) | |
64 | (symlink "libiniparser.so.0" "libiniparser.so")))) | |
65 | (replace 'install | |
66 | (lambda* (#:key outputs #:allow-other-keys) | |
67 | (let* ((out (assoc-ref outputs "out")) | |
68 | (lib (string-append out "/lib")) | |
69 | (inc (string-append out "/include")) | |
70 | (doc (string-append out "/share/doc")) | |
71 | (html (string-append doc "/html"))) | |
72 | (define (copy dir) | |
73 | (lambda (file) | |
74 | (copy-file file | |
75 | (string-append dir "/" | |
76 | (basename file))))) | |
77 | (mkdir-p lib) | |
78 | (for-each (copy lib) | |
79 | (find-files "." "^lib.*\\.(so\\.|a)")) | |
80 | (with-directory-excursion lib | |
81 | (symlink "libiniparser.so.0" "libiniparser.so")) | |
82 | (mkdir-p inc) | |
83 | (for-each (copy inc) | |
84 | (find-files "src" "\\.h$")) | |
85 | (mkdir-p html) | |
86 | (for-each (copy html) | |
87 | (find-files "html" ".*")) | |
88 | (for-each (copy doc) | |
89 | '("AUTHORS" "INSTALL" "LICENSE" "README.md")))))))) | |
a40f1543 LC |
90 | (home-page "http://ndevilla.free.fr/iniparser") |
91 | (synopsis "Standalone ini file parsing library") | |
92 | (description | |
93 | "iniparser is a free stand-alone `ini' file parsing library (Windows | |
94 | configuration files). It is written in portable ANSI C and should compile | |
95 | anywhere.") | |
96 | (license x11))) | |
97 | ||
98 | (define-public samba | |
99 | (package | |
100 | (name "samba") | |
d073b58f | 101 | (version "4.5.0") |
a40f1543 LC |
102 | (source (origin |
103 | (method url-fetch) | |
d073b58f | 104 | (uri (string-append "https://download.samba.org/pub/samba/stable/samba-" |
a40f1543 LC |
105 | version ".tar.gz")) |
106 | (sha256 | |
107 | (base32 | |
d073b58f | 108 | "11mmyqag2i4yy6dikcggw776n0laxxr0rxhry72x5pa6nwws9afk")))) |
a40f1543 LC |
109 | (build-system gnu-build-system) |
110 | (arguments | |
710964d1 SB |
111 | '(#:phases |
112 | (modify-phases %standard-phases | |
113 | (replace 'configure | |
114 | ;; samba uses a custom configuration script that runs waf. | |
115 | (lambda* (#:key outputs #:allow-other-keys) | |
116 | (let* ((out (assoc-ref outputs "out")) | |
117 | (libdir (string-append out "/lib"))) | |
118 | (zero? (system* | |
119 | "./configure" | |
120 | "--enable-fhs" | |
121 | ;; XXX: heimdal not packaged. | |
122 | "--bundled-libraries=com_err" | |
123 | (string-append "--prefix=" out) | |
124 | ;; Install public and private libraries into | |
125 | ;; a single directory to avoid RPATH issues. | |
126 | (string-append "--libdir=" libdir) | |
127 | (string-append "--with-privatelibdir=" libdir))))))) | |
a40f1543 LC |
128 | |
129 | ;; XXX: The test infrastructure attempts to set password with | |
130 | ;; smbpasswd, which fails with "smbpasswd -L can only be used by root." | |
131 | ;; So disable tests until there's a workaround. | |
132 | #:tests? #f)) | |
133 | (inputs ; TODO: Add missing dependencies | |
710964d1 SB |
134 | `(("acl" ,acl) |
135 | ("cups" ,cups) | |
a40f1543 | 136 | ;; ("gamin" ,gamin) |
710964d1 | 137 | ("gnutls" ,gnutls) |
a40f1543 | 138 | ("iniparser" ,iniparser) |
710964d1 SB |
139 | ("libaio" ,libaio) |
140 | ("ldb" ,ldb) | |
a40f1543 | 141 | ("linux-pam" ,linux-pam) |
710964d1 SB |
142 | ("openldap" ,openldap) |
143 | ("popt" ,popt) | |
3665b4dc | 144 | ("readline" ,readline) |
710964d1 SB |
145 | ("talloc" ,talloc) |
146 | ("tevent" ,tevent) | |
147 | ("tdb" ,tdb))) | |
148 | (native-inputs | |
a40f1543 | 149 | `(("perl" ,perl) |
710964d1 SB |
150 | ("pkg-config" ,pkg-config) |
151 | ("python" ,python-2))) ; incompatible with Python 3 | |
8b21d22d | 152 | (home-page "https://www.samba.org/") |
a40f1543 LC |
153 | (synopsis |
154 | "The standard Windows interoperability suite of programs for GNU and Unix") | |
155 | (description | |
156 | "Since 1992, Samba has provided secure, stable and fast file and print | |
157 | services for all clients using the SMB/CIFS protocol, such as all versions of | |
158 | DOS and Windows, OS/2, GNU/Linux and many others. | |
159 | ||
160 | Samba is an important component to seamlessly integrate Linux/Unix Servers and | |
161 | Desktops into Active Directory environments using the winbind daemon.") | |
162 | (license gpl3+))) | |
1790739c DT |
163 | |
164 | (define-public talloc | |
165 | (package | |
166 | (name "talloc") | |
93151e41 | 167 | (version "2.1.8") |
1790739c DT |
168 | (source (origin |
169 | (method url-fetch) | |
01e64ef5 | 170 | (uri (string-append "https://www.samba.org/ftp/talloc/talloc-" |
1790739c DT |
171 | version ".tar.gz")) |
172 | (sha256 | |
173 | (base32 | |
93151e41 | 174 | "0c3ihyb0jd8mhvi7gg2mr5w1zl2habx6jlkbyxzyckad2q8lkl92")))) |
1790739c DT |
175 | (build-system gnu-build-system) |
176 | (arguments | |
960ae0cd SB |
177 | '(#:phases |
178 | (modify-phases %standard-phases | |
179 | (replace 'configure | |
180 | (lambda* (#:key outputs #:allow-other-keys) | |
095da023 SB |
181 | ;; test_magic_differs.sh has syntax error, and is not in the right |
182 | ;; place where wscript expected. | |
183 | ;; Skip the test. | |
184 | (substitute* "wscript" | |
185 | (("magic_ret = .*") "magic_ret = 0\n")) | |
960ae0cd SB |
186 | ;; talloc uses a custom configuration script that runs a |
187 | ;; python script called 'waf'. | |
188 | (setenv "CONFIG_SHELL" (which "sh")) | |
189 | (let ((out (assoc-ref outputs "out"))) | |
190 | (zero? (system* "./configure" | |
191 | (string-append "--prefix=" out))))))))) | |
1790739c DT |
192 | (inputs |
193 | `(("python" ,python-2))) | |
194 | (home-page "http://talloc.samba.org") | |
195 | (synopsis "Hierarchical, reference counted memory pool system") | |
196 | (description | |
197 | "Talloc is a hierarchical, reference counted memory pool system with | |
198 | destructors. It is the core memory allocator used in Samba.") | |
199 | (license gpl3+))) ;; The bundled "replace" library uses LGPL3. | |
ae916e02 | 200 | |
0674b3c9 SB |
201 | (define-public tevent |
202 | (package | |
203 | (name "tevent") | |
88179989 | 204 | (version "0.9.31") |
0674b3c9 SB |
205 | (source (origin |
206 | (method url-fetch) | |
207 | (uri (string-append "https://www.samba.org/ftp/tevent/tevent-" | |
208 | version ".tar.gz")) | |
209 | (sha256 | |
210 | (base32 | |
88179989 | 211 | "1z1bij9gccps34q8zakr1k7k3gpqs25jas20x1hch16qd8jz44sa")))) |
0674b3c9 SB |
212 | (build-system gnu-build-system) |
213 | (arguments | |
214 | '(#:phases | |
215 | (modify-phases %standard-phases | |
216 | (replace 'configure | |
217 | ;; tevent uses a custom configuration script that runs waf. | |
218 | (lambda* (#:key outputs #:allow-other-keys) | |
219 | (let ((out (assoc-ref outputs "out"))) | |
220 | (zero? (system* "./configure" | |
221 | (string-append "--prefix=" out) | |
222 | "--bundled-libraries=NONE")))))))) | |
223 | (native-inputs | |
224 | `(("pkg-config" ,pkg-config) | |
225 | ("python" ,python-2))) | |
226 | (propagated-inputs | |
227 | `(("talloc" ,talloc))) ; required by tevent.pc | |
228 | (synopsis "Event system library") | |
229 | (home-page "https://tevent.samba.org/") | |
230 | (description | |
231 | "Tevent is an event system based on the talloc memory management library. | |
232 | It is the core event system used in Samba. The low level tevent has support for | |
233 | many event types, including timers, signals, and the classic file descriptor events.") | |
234 | (license lgpl3+))) | |
235 | ||
52513595 SB |
236 | (define-public ldb |
237 | (package | |
238 | (name "ldb") | |
9917b5f0 | 239 | (version "1.1.27") |
52513595 SB |
240 | (source (origin |
241 | (method url-fetch) | |
242 | (uri (string-append "https://www.samba.org/ftp/ldb/ldb-" | |
243 | version ".tar.gz")) | |
244 | (sha256 | |
245 | (base32 | |
9917b5f0 | 246 | "1b1mkl5p8swb67s9aswavhzswlib34hpgsv66zgns009paf2df6d")))) |
52513595 SB |
247 | (build-system gnu-build-system) |
248 | (arguments | |
249 | '(#:phases | |
250 | (modify-phases %standard-phases | |
251 | (replace 'configure | |
252 | ;; ldb use a custom configuration script that runs waf. | |
253 | (lambda* (#:key outputs #:allow-other-keys) | |
254 | (let ((out (assoc-ref outputs "out"))) | |
255 | (zero? (system* "./configure" | |
256 | (string-append "--prefix=" out) | |
257 | (string-append "--with-modulesdir=" out | |
258 | "/lib/ldb/modules") | |
259 | "--bundled-libraries=NONE")))))))) | |
260 | (native-inputs | |
261 | `(("pkg-config" ,pkg-config) | |
262 | ("python" ,python-2))) | |
263 | (propagated-inputs | |
264 | ;; ldb.pc refers to all these. | |
265 | `(("talloc" ,talloc) | |
266 | ("tdb" ,tdb))) | |
267 | (inputs | |
268 | `(("popt" ,popt) | |
269 | ("tevent" ,tevent))) | |
270 | (synopsis "LDAP-like embedded database") | |
271 | (home-page "https://ldb.samba.org/") | |
272 | (description | |
273 | "Ldb is a LDAP-like embedded database built on top of TDB. What ldb does | |
274 | is provide a fast database with an LDAP-like API designed to be used within an | |
275 | application. In some ways it can be seen as a intermediate solution between | |
276 | key-value pair databases and a real LDAP database.") | |
277 | (license lgpl3+))) | |
278 | ||
ae916e02 SB |
279 | (define-public ppp |
280 | (package | |
281 | (name "ppp") | |
282 | (version "2.4.7") | |
283 | (source (origin | |
284 | (method url-fetch) | |
285 | (uri (string-append "https://www.samba.org/ftp/ppp/ppp-" | |
286 | version ".tar.gz")) | |
287 | (sha256 | |
288 | (base32 | |
289 | "0c7vrjxl52pdwi4ckrvfjr08b31lfpgwf3pp0cqy76a77vfs7q02")))) | |
290 | (build-system gnu-build-system) | |
291 | (arguments | |
292 | '(#:tests? #f ; no check target | |
293 | #:make-flags '("CC=gcc") | |
294 | #:phases | |
295 | (modify-phases %standard-phases | |
296 | (add-before 'configure 'patch-Makefile | |
297 | (lambda* (#:key inputs #:allow-other-keys) | |
298 | (let ((libc (assoc-ref inputs "libc")) | |
299 | (libpcap (assoc-ref inputs "libpcap"))) | |
300 | (substitute* "pppd/Makefile.linux" | |
301 | (("/usr/include/crypt\\.h") | |
302 | (string-append libc "/include/crypt.h")) | |
303 | (("/usr/include/pcap-bpf.h") | |
304 | (string-append libpcap "/include/pcap-bpf.h"))))))))) | |
305 | (inputs | |
306 | `(("libpcap" ,libpcap))) | |
307 | (synopsis "Implementation of the Point-to-Point Protocol") | |
308 | (home-page "https://ppp.samba.org/") | |
309 | (description | |
310 | "The Point-to-Point Protocol (PPP) provides a standard way to establish | |
311 | a network connection over a serial link. At present, this package supports IP | |
312 | and IPV6 and the protocols layered above them, such as TCP and UDP.") | |
313 | ;; pppd, pppstats and pppdump are under BSD-style notices. | |
314 | ;; some of the pppd plugins are GPL'd. | |
315 | ;; chat is public domain. | |
316 | (license (list bsd-3 bsd-4 gpl2+ public-domain)))) |