gnu: samba: Update to 4.3.2.

* gnu/packages/samba.scm (samba): Update to 4.3.2.  Add more inputs.
[arguments]: Remove #:modules and #:imported-modules.  Remove 'chdir'
and 'add-lib-to-runpath' from #:phases.  Use 'modify-phases' syntax.
This commit is contained in:
宋文武 2015-12-15 12:20:26 +08:00
parent 52513595ad
commit 710964d179

View file

@ -24,14 +24,14 @@ (define-module (gnu packages samba)
#:use-module (guix licenses) #:use-module (guix licenses)
#:use-module (gnu packages acl) #:use-module (gnu packages acl)
#:use-module (gnu packages admin) #:use-module (gnu packages admin)
#:use-module (gnu packages cups)
#:use-module (gnu packages databases) #:use-module (gnu packages databases)
#:use-module (gnu packages tls)
#:use-module (gnu packages popt) #:use-module (gnu packages popt)
#:use-module (gnu packages pkg-config) #:use-module (gnu packages pkg-config)
#:use-module (gnu packages openldap) #:use-module (gnu packages openldap)
#:use-module (gnu packages readline) #:use-module (gnu packages readline)
#:use-module (gnu packages libunwind)
#:use-module (gnu packages linux) #:use-module (gnu packages linux)
#:use-module (gnu packages elf)
#:use-module (gnu packages perl) #:use-module (gnu packages perl)
#:use-module (gnu packages python)) #:use-module (gnu packages python))
@ -98,64 +98,57 @@ (define (copy dir)
(define-public samba (define-public samba
(package (package
(name "samba") (name "samba")
(version "3.6.25") (version "4.3.2")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "https://www.samba.org/samba/ftp/stable/samba-" (uri (string-append "https://www.samba.org/samba/ftp/stable/samba-"
version ".tar.gz")) version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0l9pz2m67vf398q3c2dwn8jwdxsjb20igncf4byhv6yq5dzqlb4g")))) "0xcs2bcim421mlk6l9rcrkx4cq9y41gfssyfa7xzdw5draar3631"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:phases (alist-cons-before '(#:phases
'configure 'chdir (modify-phases %standard-phases
(lambda _ (replace 'configure
(chdir "source3")) ;; samba uses a custom configuration script that runs waf.
(alist-cons-after (lambda* (#:key outputs #:allow-other-keys)
'strip 'add-lib-to-runpath (let* ((out (assoc-ref outputs "out"))
(lambda* (#:key outputs #:allow-other-keys) (libdir (string-append out "/lib")))
(let* ((out (assoc-ref outputs "out")) (zero? (system*
(lib (string-append out "/lib"))) "./configure"
;; Add LIB to the RUNPATH of all the executables and "--enable-fhs"
;; dynamic libraries. ;; XXX: heimdal not packaged.
(with-directory-excursion out "--bundled-libraries=com_err"
(for-each (cut augment-rpath <> lib) (string-append "--prefix=" out)
(append (find-files "bin" ".*") ;; Install public and private libraries into
(find-files "sbin" ".*") ;; a single directory to avoid RPATH issues.
(find-files "lib" ".*")))))) (string-append "--libdir=" libdir)
%standard-phases)) (string-append "--with-privatelibdir=" libdir)))))))
#:modules ((guix build gnu-build-system)
(guix build utils)
(guix build rpath)
(srfi srfi-26))
#:imported-modules (,@%gnu-build-system-modules
(guix build rpath))
;; This flag is required to allow for "make test".
#:configure-flags '("--enable-socket-wrapper")
#:test-target "test"
;; XXX: The test infrastructure attempts to set password with ;; XXX: The test infrastructure attempts to set password with
;; smbpasswd, which fails with "smbpasswd -L can only be used by root." ;; smbpasswd, which fails with "smbpasswd -L can only be used by root."
;; So disable tests until there's a workaround. ;; So disable tests until there's a workaround.
#:tests? #f)) #:tests? #f))
(inputs ; TODO: Add missing dependencies (inputs ; TODO: Add missing dependencies
`(;; ("cups" ,cups) `(("acl" ,acl)
("acl" ,acl) ("cups" ,cups)
;; ("gamin" ,gamin) ;; ("gamin" ,gamin)
("libunwind" ,libunwind) ("gnutls" ,gnutls)
("iniparser" ,iniparser) ("iniparser" ,iniparser)
("popt" ,popt) ("libaio" ,libaio)
("openldap" ,openldap) ("ldb" ,ldb)
("linux-pam" ,linux-pam) ("linux-pam" ,linux-pam)
("openldap" ,openldap)
("popt" ,popt)
("readline" ,readline) ("readline" ,readline)
("patchelf" ,patchelf))) ; for (guix build rpath) ("talloc" ,talloc)
(native-inputs ; for the test suite ("tevent" ,tevent)
("tdb" ,tdb)))
(native-inputs
`(("perl" ,perl) `(("perl" ,perl)
("python" ,python-wrapper))) ("pkg-config" ,pkg-config)
("python" ,python-2))) ; incompatible with Python 3
(home-page "http://www.samba.org/") (home-page "http://www.samba.org/")
(synopsis (synopsis
"The standard Windows interoperability suite of programs for GNU and Unix") "The standard Windows interoperability suite of programs for GNU and Unix")