;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (guix build-system gnu)
#:use-module (guix licenses)
#:use-module (gnu packages acl)
+ #:use-module (gnu packages admin)
+ #:use-module (gnu packages cups)
+ #:use-module (gnu packages databases)
+ #:use-module (gnu packages tls)
#:use-module (gnu packages popt)
+ #:use-module (gnu packages pkg-config)
#:use-module (gnu packages openldap)
#:use-module (gnu packages readline)
- #:use-module (gnu packages libunwind)
#:use-module (gnu packages linux)
- #:use-module (gnu packages elf)
#:use-module (gnu packages perl)
#:use-module (gnu packages python))
(define-public samba
(package
(name "samba")
- (version "3.6.8")
+ (version "4.3.3")
(source (origin
(method url-fetch)
- (uri (string-append "http://us3.samba.org/samba/ftp/stable/samba-"
+ (uri (string-append "https://www.samba.org/samba/ftp/stable/samba-"
version ".tar.gz"))
(sha256
(base32
- "1phl6mmrc72jyvbyrw6cv6b92cxq3v2pbn1fh97nnb4hild1fnjg"))))
+ "1pvh78d5magc7lriyx7v9k7crlgxccmsy2mqn0j9xcnb78qj2bg6"))))
(build-system gnu-build-system)
(arguments
- '(#:phases (alist-cons-before
- 'configure 'chdir
- (lambda _
- (chdir "source3"))
- (alist-cons-after
- 'strip 'add-lib-to-runpath
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (lib (string-append out "/lib")))
- ;; Add LIB to the RUNPATH of all the executables.
- (with-directory-excursion out
- (for-each (cut augment-rpath <> lib)
- (append (find-files "bin" ".*")
- (find-files "sbin" ".*"))))))
- %standard-phases))
-
- #:modules ((guix build gnu-build-system)
- (guix build utils)
- (guix build rpath)
- (srfi srfi-26))
- #:imported-modules ((guix build gnu-build-system)
- (guix build utils)
- (guix build rpath))
-
- ;; This flag is required to allow for "make test".
- #:configure-flags '("--enable-socket-wrapper")
-
- #:test-target "test"
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ ;; samba uses a custom configuration script that runs waf.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (libdir (string-append out "/lib")))
+ (zero? (system*
+ "./configure"
+ "--enable-fhs"
+ ;; XXX: heimdal not packaged.
+ "--bundled-libraries=com_err"
+ (string-append "--prefix=" out)
+ ;; Install public and private libraries into
+ ;; a single directory to avoid RPATH issues.
+ (string-append "--libdir=" libdir)
+ (string-append "--with-privatelibdir=" libdir)))))))
;; XXX: The test infrastructure attempts to set password with
;; smbpasswd, which fails with "smbpasswd -L can only be used by root."
;; So disable tests until there's a workaround.
#:tests? #f))
(inputs ; TODO: Add missing dependencies
- `(;; ("cups" ,cups)
- ("acl" ,acl)
+ `(("acl" ,acl)
+ ("cups" ,cups)
;; ("gamin" ,gamin)
- ("libunwind" ,libunwind)
+ ("gnutls" ,gnutls)
("iniparser" ,iniparser)
- ("popt" ,popt)
- ("openldap" ,openldap)
+ ("libaio" ,libaio)
+ ("ldb" ,ldb)
("linux-pam" ,linux-pam)
+ ("openldap" ,openldap)
+ ("popt" ,popt)
("readline" ,readline)
- ("patchelf" ,patchelf))) ; for (guix build rpath)
- (native-inputs ; for the test suite
+ ("talloc" ,talloc)
+ ("tevent" ,tevent)
+ ("tdb" ,tdb)))
+ (native-inputs
`(("perl" ,perl)
- ("python" ,python-wrapper)))
+ ("pkg-config" ,pkg-config)
+ ("python" ,python-2))) ; incompatible with Python 3
(home-page "http://www.samba.org/")
(synopsis
"The standard Windows interoperability suite of programs for GNU and Unix")
Samba is an important component to seamlessly integrate Linux/Unix Servers and
Desktops into Active Directory environments using the winbind daemon.")
(license gpl3+)))
+
+(define-public talloc
+ (package
+ (name "talloc")
+ (version "2.1.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://www.samba.org/ftp/talloc/talloc-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1pfx3kmj973hpacfw46fzfnjd7ms1j03ifkc30wk930brx8ffcrq"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; test_magic_differs.sh has syntax error, and is not in the right
+ ;; place where wscript expected.
+ ;; Skip the test.
+ (substitute* "wscript"
+ (("magic_ret = .*") "magic_ret = 0\n"))
+ ;; talloc uses a custom configuration script that runs a
+ ;; python script called 'waf'.
+ (setenv "CONFIG_SHELL" (which "sh"))
+ (let ((out (assoc-ref outputs "out")))
+ (zero? (system* "./configure"
+ (string-append "--prefix=" out)))))))))
+ (inputs
+ `(("python" ,python-2)))
+ (home-page "http://talloc.samba.org")
+ (synopsis "Hierarchical, reference counted memory pool system")
+ (description
+ "Talloc is a hierarchical, reference counted memory pool system with
+destructors. It is the core memory allocator used in Samba.")
+ (license gpl3+))) ;; The bundled "replace" library uses LGPL3.
+
+(define-public tevent
+ (package
+ (name "tevent")
+ (version "0.9.26")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://www.samba.org/ftp/tevent/tevent-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1gbh6d2m49j1v2hkaiyrh8bj02i5wxd4hqayzk2g44yyivbi8b16"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ ;; tevent uses a custom configuration script that runs waf.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (zero? (system* "./configure"
+ (string-append "--prefix=" out)
+ "--bundled-libraries=NONE"))))))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("python" ,python-2)))
+ (propagated-inputs
+ `(("talloc" ,talloc))) ; required by tevent.pc
+ (synopsis "Event system library")
+ (home-page "https://tevent.samba.org/")
+ (description
+ "Tevent is an event system based on the talloc memory management library.
+It is the core event system used in Samba. The low level tevent has support for
+many event types, including timers, signals, and the classic file descriptor events.")
+ (license lgpl3+)))
+
+(define-public ldb
+ (package
+ (name "ldb")
+ (version "1.1.24")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://www.samba.org/ftp/ldb/ldb-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "08ab66qzigfsfxqdvp6lx1knwsl3sqsww309xbq17l7hfcjgbsa5"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ ;; ldb use a custom configuration script that runs waf.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (zero? (system* "./configure"
+ (string-append "--prefix=" out)
+ (string-append "--with-modulesdir=" out
+ "/lib/ldb/modules")
+ "--bundled-libraries=NONE"))))))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("python" ,python-2)))
+ (propagated-inputs
+ ;; ldb.pc refers to all these.
+ `(("talloc" ,talloc)
+ ("tdb" ,tdb)))
+ (inputs
+ `(("popt" ,popt)
+ ("tevent" ,tevent)))
+ (synopsis "LDAP-like embedded database")
+ (home-page "https://ldb.samba.org/")
+ (description
+ "Ldb is a LDAP-like embedded database built on top of TDB. What ldb does
+is provide a fast database with an LDAP-like API designed to be used within an
+application. In some ways it can be seen as a intermediate solution between
+key-value pair databases and a real LDAP database.")
+ (license lgpl3+)))
+
+(define-public ppp
+ (package
+ (name "ppp")
+ (version "2.4.7")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://www.samba.org/ftp/ppp/ppp-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0c7vrjxl52pdwi4ckrvfjr08b31lfpgwf3pp0cqy76a77vfs7q02"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f ; no check target
+ #:make-flags '("CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'patch-Makefile
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((libc (assoc-ref inputs "libc"))
+ (libpcap (assoc-ref inputs "libpcap")))
+ (substitute* "pppd/Makefile.linux"
+ (("/usr/include/crypt\\.h")
+ (string-append libc "/include/crypt.h"))
+ (("/usr/include/pcap-bpf.h")
+ (string-append libpcap "/include/pcap-bpf.h")))))))))
+ (inputs
+ `(("libpcap" ,libpcap)))
+ (synopsis "Implementation of the Point-to-Point Protocol")
+ (home-page "https://ppp.samba.org/")
+ (description
+ "The Point-to-Point Protocol (PPP) provides a standard way to establish
+a network connection over a serial link. At present, this package supports IP
+and IPV6 and the protocols layered above them, such as TCP and UDP.")
+ ;; pppd, pppstats and pppdump are under BSD-style notices.
+ ;; some of the pppd plugins are GPL'd.
+ ;; chat is public domain.
+ (license (list bsd-3 bsd-4 gpl2+ public-domain))))