Re: [PATCH 5/6] gnu: Add ceph.

2017-01-18 Thread Ludovic Courtès
Hi!

Marius Bakke  skribis:

> Ludovic Courtès  writes:

[...]

>>> +;; Ceph is licensed under LGPL2.1, but includes a number of components
>>> +;; covered by other licenses. Consult COPYING for full information.
>>> +(license (list license:lgpl2.1
>>> +   license:cc-by-sa3.0; documentation
>>> +   license:bsd-2  ; xxHash
>>> +   license:bsd-3
>>> +   license:gpl3
>>> +   license:gpl2
>>> +   license:public-domain
>>> +   license:boost1.0
>>> +   license:expat
>>
>> No “or any later version” clause for the GNU licenses here?
>
> Oops, yes, there are some gpl2+ files at least. But Ceph itself is
> LGPL2.1 only AFAICT; the COPYING file has a debian-style copyright
> format and adds "or later" on some components but not on '*'. No
> copyright headers in the source files I've checked.
>
> Unfortunately COPYING does not cover the bundled components, so I still
> have some digging to do.

OK.

>> other issues, that looks good.  Great work!
>
> Thanks! I'm sure there is a lot of work remaining to make *everything*
> work (e.g. 'ceph-deploy'), but will make sure it's possible to provision
> a cluster the "old school" way at least :-)

Cool.  :-)

I guess it can be fixed incrementally as you stumble upon problems.

Cheers,
Ludo’.



Re: [PATCH 5/6] gnu: Add ceph.

2017-01-17 Thread Marius Bakke
Ludovic Courtès  writes:

>> + (substitute* "src/Makefile.in"
>> +   ;; By default, the PYTHONPATH is set to "src/pybind".
>> +   ;; Make sure our libraries are found too.
>> +   (("export PYTHONPATH=") (string-append "export PYTHONPATH="
>> +  (getenv "PYTHONPATH")
>> +  ":"))
>
> I’d move (string-append …) on the next line (for the following
> substitutions as well.)

I tried that, but actually found this easier to read. :-)

Will double-check.

>> +;; Ceph is licensed under LGPL2.1, but includes a number of components
>> +;; covered by other licenses. Consult COPYING for full information.
>> +(license (list license:lgpl2.1
>> +   license:cc-by-sa3.0; documentation
>> +   license:bsd-2  ; xxHash
>> +   license:bsd-3
>> +   license:gpl3
>> +   license:gpl2
>> +   license:public-domain
>> +   license:boost1.0
>> +   license:expat
>
> No “or any later version” clause for the GNU licenses here?

Oops, yes, there are some gpl2+ files at least. But Ceph itself is
LGPL2.1 only AFAICT; the COPYING file has a debian-style copyright
format and adds "or later" on some components but not on '*'. No
copyright headers in the source files I've checked.

Unfortunately COPYING does not cover the bundled components, so I still
have some digging to do.

> Then apart from the wrapping that you mentioned in the cover letter and
> other issues, that looks good.  Great work!

Thanks! I'm sure there is a lot of work remaining to make *everything*
work (e.g. 'ceph-deploy'), but will make sure it's possible to provision
a cluster the "old school" way at least :-)


signature.asc
Description: PGP signature


Re: [PATCH 5/6] gnu: Add ceph.

2017-01-17 Thread Ludovic Courtès
Marius Bakke  skribis:

> * gnu/packages/distributed-filesystems.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.

[...]

> + (substitute* "src/Makefile.in"
> +   ;; By default, the PYTHONPATH is set to "src/pybind".
> +   ;; Make sure our libraries are found too.
> +   (("export PYTHONPATH=") (string-append "export PYTHONPATH="
> +  (getenv "PYTHONPATH")
> +  ":"))

I’d move (string-append …) on the next line (for the following
substitutions as well.)

> +;; Ceph is licensed under LGPL2.1, but includes a number of components
> +;; covered by other licenses. Consult COPYING for full information.
> +(license (list license:lgpl2.1
> +   license:cc-by-sa3.0; documentation
> +   license:bsd-2  ; xxHash
> +   license:bsd-3
> +   license:gpl3
> +   license:gpl2
> +   license:public-domain
> +   license:boost1.0
> +   license:expat

No “or any later version” clause for the GNU licenses here?

Then apart from the wrapping that you mentioned in the cover letter and
other issues, that looks good.  Great work!

Ludo’.



[PATCH 5/6] gnu: Add ceph.

2017-01-15 Thread Marius Bakke
* gnu/packages/distributed-filesystems.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk |   1 +
 gnu/packages/distributed-filesystems.scm | 172 +++
 2 files changed, 173 insertions(+)
 create mode 100644 gnu/packages/distributed-filesystems.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 81d774eb6..417e7a0a5 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -102,6 +102,7 @@ GNU_SYSTEM_MODULES =\
   %D%/packages/dillo.scm   \
   %D%/packages/disk.scm\
   %D%/packages/display-managers.scm\
+  %D%/packages/distributed-filesystems.scm \
   %D%/packages/django.scm  \
   %D%/packages/djvu.scm\
   %D%/packages/dns.scm \
diff --git a/gnu/packages/distributed-filesystems.scm 
b/gnu/packages/distributed-filesystems.scm
new file mode 100644
index 0..f215a847e
--- /dev/null
+++ b/gnu/packages/distributed-filesystems.scm
@@ -0,0 +1,172 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 Marius Bakke 
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see .
+
+(define-module (gnu packages distributed-filesystems)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages bdw-gc)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages crypto)
+  #:use-module (gnu packages curl)
+  #:use-module (gnu packages databases)
+  #:use-module (gnu packages gnuzilla)
+  #:use-module (gnu packages jemalloc)
+  #:use-module (gnu packages linux)
+  #:use-module (gnu packages openldap)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages web)
+  #:use-module (gnu packages xml))
+
+(define-public ceph
+  (package
+(name "ceph")
+(version "10.2.5")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://download.ceph.com/tarballs/ceph-;
+  version ".tar.gz"))
+  (sha256
+   (base32
+"1x6m69il34x4rjhybk5cpw4yiad4a193l9vgy57vidwfy5ql5pc2"))
+  (modules '((guix build utils)))
+  (snippet
+   '(begin
+  ;; Delete bundled software.
+  (delete-file-recursively "src/test/downloads") ; python-cram
+  (delete-file-recursively "src/rocksdb")
+  ;; TODO: unbundle gtest, civetweb, DPDK, SPDK, xxHash.
+  #t
+(build-system gnu-build-system)
+(arguments
+ `(#:configure-flags
+   (list (string-append "--exec_prefix=" (assoc-ref %outputs "out"))
+ (string-append "--libdir=" (assoc-ref %outputs "lib") "/lib")
+ (string-append "--includedir=" (assoc-ref %outputs "lib") 
"/include")
+ "--localstatedir=/var"
+ "--sysconfdir=/etc"
+ "--enable-static=no" ; TODO: separate output
+ "--with-man-pages"
+ (string-append "--with-systemd-unit-dir="
+(assoc-ref %outputs "out") "/etc/systemd/system")
+ "--without-libxfs" ; TODO: enable when xfsprogs is added.
+ ;; Use jemalloc instead of tcmalloc.
+ "--with-jemalloc")
+   #:make-flags
+   ;; Pass sysconfdir here too so that the sample configuration files
+   ;; and directories are installed to the output instead of root level.
+   (list (string-append "sysconfdir=" (assoc-ref %outputs "out") "/etc")
+ (string-append "LDFLAGS=-Wl,-rpath="
+(assoc-ref %outputs "lib") "/lib")
+ ;; The python libraries depend on the ceph libraries,
+ ;; so make sure they are in RUNPATH.
+ (string-append "PYTHON_LDFLAGS=-Wl,-rpath="
+(assoc-ref %outputs "lib") "/lib"))
+   #:phases
+   (modify-phases %standard-phases
+ (add-after 'unpack 'patch-source
+   (lambda* (#:key inputs