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