1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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)
27 #:use-module (gnu packages admin)
28 #:use-module (gnu packages cups)
29 #:use-module (gnu packages databases)
30 #:use-module (gnu packages tls)
31 #:use-module (gnu packages popt)
32 #:use-module (gnu packages pkg-config)
33 #:use-module (gnu packages openldap)
34 #:use-module (gnu packages readline)
35 #:use-module (gnu packages linux)
36 #:use-module (gnu packages perl)
37 #:use-module (gnu packages python))
39 (define-public iniparser
45 (uri (string-append "http://ndevilla.free.fr/iniparser/iniparser-"
49 "1igmxzcy0s25zcy9vmcw0kd13lh60r0b4qg8lnp1jic33f427pxf"))))
50 (build-system gnu-build-system)
52 '(#:phases (alist-replace
54 (lambda* (#:key outputs #:allow-other-keys)
55 (substitute* "Makefile"
57 (string-append (assoc-ref outputs "out") "/lib"))))
61 (and (zero? (system* "make" "libiniparser.so"))
62 (symlink "libiniparser.so.0" "libiniparser.so")))
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")))
74 (string-append dir "/"
78 (find-files "." "^lib.*\\.(so\\.|a)"))
79 (with-directory-excursion lib
80 (symlink "libiniparser.so.0" "libiniparser.so"))
83 (find-files "src" "\\.h$"))
86 (find-files "html" ".*"))
88 '("AUTHORS" "INSTALL" "LICENSE"
91 (home-page "http://ndevilla.free.fr/iniparser")
92 (synopsis "Standalone ini file parsing library")
94 "iniparser is a free stand-alone `ini' file parsing library (Windows
95 configuration files). It is written in portable ANSI C and should compile
105 (uri (string-append "https://www.samba.org/samba/ftp/stable/samba-"
109 "0929fpk2pq4v389naai519xvsm9bzpar4jlgjxwlx1cnn6jyql9j"))))
110 (build-system gnu-build-system)
113 (modify-phases %standard-phases
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")))
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)))))))
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.
134 (inputs ; TODO: Add missing dependencies
139 ("iniparser" ,iniparser)
142 ("linux-pam" ,linux-pam)
143 ("openldap" ,openldap)
145 ("readline" ,readline)
151 ("pkg-config" ,pkg-config)
152 ("python" ,python-2))) ; incompatible with Python 3
153 (home-page "http://www.samba.org/")
155 "The standard Windows interoperability suite of programs for GNU and Unix")
157 "Since 1992, Samba has provided secure, stable and fast file and print
158 services for all clients using the SMB/CIFS protocol, such as all versions of
159 DOS and Windows, OS/2, GNU/Linux and many others.
161 Samba is an important component to seamlessly integrate Linux/Unix Servers and
162 Desktops into Active Directory environments using the winbind daemon.")
165 (define-public talloc
171 (uri (string-append "https://www.samba.org/ftp/talloc/talloc-"
175 "1pfx3kmj973hpacfw46fzfnjd7ms1j03ifkc30wk930brx8ffcrq"))))
176 (build-system gnu-build-system)
179 (modify-phases %standard-phases
181 (lambda* (#:key outputs #:allow-other-keys)
182 ;; test_magic_differs.sh has syntax error, and is not in the right
183 ;; place where wscript expected.
185 (substitute* "wscript"
186 (("magic_ret = .*") "magic_ret = 0\n"))
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)))))))))
194 `(("python" ,python-2)))
195 (home-page "http://talloc.samba.org")
196 (synopsis "Hierarchical, reference counted memory pool system")
198 "Talloc is a hierarchical, reference counted memory pool system with
199 destructors. It is the core memory allocator used in Samba.")
200 (license gpl3+))) ;; The bundled "replace" library uses LGPL3.
202 (define-public tevent
208 (uri (string-append "https://www.samba.org/ftp/tevent/tevent-"
212 "1gbh6d2m49j1v2hkaiyrh8bj02i5wxd4hqayzk2g44yyivbi8b16"))))
213 (build-system gnu-build-system)
216 (modify-phases %standard-phases
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"))))))))
225 `(("pkg-config" ,pkg-config)
226 ("python" ,python-2)))
228 `(("talloc" ,talloc))) ; required by tevent.pc
229 (synopsis "Event system library")
230 (home-page "https://tevent.samba.org/")
232 "Tevent is an event system based on the talloc memory management library.
233 It is the core event system used in Samba. The low level tevent has support for
234 many event types, including timers, signals, and the classic file descriptor events.")
243 (uri (string-append "https://www.samba.org/ftp/ldb/ldb-"
247 "08ab66qzigfsfxqdvp6lx1knwsl3sqsww309xbq17l7hfcjgbsa5"))))
248 (build-system gnu-build-system)
251 (modify-phases %standard-phases
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
260 "--bundled-libraries=NONE"))))))))
262 `(("pkg-config" ,pkg-config)
263 ("python" ,python-2)))
265 ;; ldb.pc refers to all these.
271 (synopsis "LDAP-like embedded database")
272 (home-page "https://ldb.samba.org/")
274 "Ldb is a LDAP-like embedded database built on top of TDB. What ldb does
275 is provide a fast database with an LDAP-like API designed to be used within an
276 application. In some ways it can be seen as a intermediate solution between
277 key-value pair databases and a real LDAP database.")
286 (uri (string-append "https://www.samba.org/ftp/ppp/ppp-"
290 "0c7vrjxl52pdwi4ckrvfjr08b31lfpgwf3pp0cqy76a77vfs7q02"))))
291 (build-system gnu-build-system)
293 '(#:tests? #f ; no check target
294 #:make-flags '("CC=gcc")
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")))))))))
307 `(("libpcap" ,libpcap)))
308 (synopsis "Implementation of the Point-to-Point Protocol")
309 (home-page "https://ppp.samba.org/")
311 "The Point-to-Point Protocol (PPP) provides a standard way to establish
312 a network connection over a serial link. At present, this package supports IP
313 and 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))))