all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 1/3] gnu: Add jemalloc.
@ 2015-04-17  7:24 宋文武
  2015-04-17  7:24 ` [PATCH 2/3] gnu: Add libaio 宋文武
  2015-04-17  7:24 ` [PATCH 3/3] gnu: Add MariaDB 宋文武
  0 siblings, 2 replies; 10+ messages in thread
From: 宋文武 @ 2015-04-17  7:24 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/jemalloc.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
---
 gnu-system.am             |  1 +
 gnu/packages/jemalloc.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+)
 create mode 100644 gnu/packages/jemalloc.scm

diff --git a/gnu-system.am b/gnu-system.am
index c581d79..9ea68a1 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -158,6 +158,7 @@ GNU_SYSTEM_MODULES =				\
   gnu/packages/irssi.scm			\
   gnu/packages/iso-codes.scm			\
   gnu/packages/java.scm				\
+  gnu/packages/jemalloc.scm			\
   gnu/packages/jrnl.scm				\
   gnu/packages/julia.scm			\
   gnu/packages/kde.scm				\
diff --git a/gnu/packages/jemalloc.scm b/gnu/packages/jemalloc.scm
new file mode 100644
index 0000000..8a25cb0
--- /dev/null
+++ b/gnu/packages/jemalloc.scm
@@ -0,0 +1,43 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages jemalloc)
+  #:use-module ((guix licenses) #:select (bsd-2))
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu))
+
+(define-public jemalloc
+  (package
+    (name "jemalloc")
+    (version "3.6.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://www.canonware.com/download/jemalloc/"
+                    name "-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1zl4vxxjvhg72bdl53sl0idz9wp18c6yzjdmqcnwm09wvmcj2v71"))))
+    (build-system gnu-build-system)
+    (home-page "http://www.canonware.com/jemalloc/")
+    (synopsis "General-purpose scalable concurrent malloc implementation")
+    (description
+     "This library providing a malloc(3) implementation that emphasizes
+fragmentation avoidance and scalable concurrency support.")
+    (license bsd-2)))
-- 
2.2.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/3] gnu: Add libaio.
  2015-04-17  7:24 [PATCH 1/3] gnu: Add jemalloc 宋文武
@ 2015-04-17  7:24 ` 宋文武
  2015-04-17  7:24 ` [PATCH 3/3] gnu: Add MariaDB 宋文武
  1 sibling, 0 replies; 10+ messages in thread
From: 宋文武 @ 2015-04-17  7:24 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/linux.scm (libaio): New variable.
---
 gnu/packages/linux.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index dc05322..4b3575c 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2113,3 +2113,32 @@ MPEG-2 and audio over Linux IEEE 1394.")
 assemble, report on, and monitor arrays.  It can also move spares between raid
 arrays when needed.")
     (license gpl2+)))
+
+(define-public libaio
+  (package
+    (name "libaio")
+    (version "0.3.110")
+    (source (origin
+              (method url-fetch)
+             (uri (list
+                   (string-append "mirror://debian/pool/main/liba/libaio/"
+                                  name "_" version ".orig.tar.gz")
+                   (string-append "https://fedorahosted.org/releases/l/i/libaio/"
+                                  name "-" version ".tar.gz")))
+             (sha256
+              (base32
+               "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:make-flags
+       (list "CC=gcc" (string-append "prefix=" %output))
+       #:test-target "partcheck" ; need root for a full 'check'
+       #:phases
+       (alist-delete 'configure %standard-phases))) ; no configure script
+    (home-page "http://lse.sourceforge.net/io/aio.html")
+    (synopsis "Linux-native asynchronous I/O access library")
+    (description
+     "This library enables userspace to use Linux kernel asynchronous I/O
+system calls, important for the performance of databases and other advanced
+applications.")
+    (license lgpl2.1+)))
-- 
2.2.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/3] gnu: Add MariaDB.
  2015-04-17  7:24 [PATCH 1/3] gnu: Add jemalloc 宋文武
  2015-04-17  7:24 ` [PATCH 2/3] gnu: Add libaio 宋文武
@ 2015-04-17  7:24 ` 宋文武
  2015-04-17 11:33   ` David Thompson
  2015-04-17 12:07   ` Ludovic Courtès
  1 sibling, 2 replies; 10+ messages in thread
From: 宋文武 @ 2015-04-17  7:24 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/database.scm (mariadb): New variable.
---
 gnu/packages/databases.scm | 77 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 77 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index ee97977..5d64757 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2014 David Thompson <davet@gnu.org>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,6 +37,10 @@
   #:use-module (gnu packages curl)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages pcre)
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages bison)
+  #:use-module (gnu packages jemalloc)
   #:use-module ((guix licenses)
                 #:select (gpl2 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft
                           bsd-2 public-domain))
@@ -43,6 +48,7 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
+  #:use-module (guix build-system cmake)
   #:use-module (srfi srfi-26)
   #:use-module (ice-9 match))
 
@@ -149,6 +155,77 @@ management system that supports the standardized Structured Query
 Language.")
     (license gpl2)))
 
+(define-public mariadb
+  (package
+    (name "mariadb")
+    (version "10.0.17")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://downloads.mariadb.org/f/"
+                                  name "-" version "/source/"
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "04ckq67qgkghh7yzrbzwidk7wn7yjml15gzj2c5p1hs2k7lr9lww"))))
+    (build-system cmake-build-system)
+    (outputs '("out" "test"))
+    (arguments
+     '(#:configure-flags
+       '("-DBUILD_CONFIG=mysql_release"
+         "-DDEFAULT_CHARSET=utf8"
+         "-DDEFAULT_COLLATION=utf8_general_ci"
+         "-DMYSQL_DATADIR=/var/lib/mysql"
+         "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
+         "-DINSTALL_INFODIR=share/mysql/docs"
+         "-DINSTALL_MANDIR=share/man"
+         "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
+         "-DINSTALL_SCRIPTDIR=bin"
+         "-DINSTALL_INCLUDEDIR=include/mysql"
+         "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
+         "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files"
+         "-DINSTALL_MYSQLSHAREDIR=share/mysql"
+         "-DINSTALL_DOCDIR=share/mysql/docs"
+         "-DINSTALL_SHAREDIR=share/mysql")
+       #:phases
+       (alist-cons-before
+        'configure 'pre-configure
+        (lambda _
+          (setenv "CONFIG_SHELL" (which "sh"))
+          ;; XXX: libstdc++.so lacks RUNPATH for libgcc_s.so.
+          (setenv "LDFLAGS" "-lgcc_s")
+          #t)
+        (alist-cons-after
+         'install 'post-install
+         (lambda* (#:key outputs #:allow-other-keys)
+           (let* ((out     (assoc-ref outputs "out"))
+                  (test    (assoc-ref outputs "test")))
+             (substitute* (string-append out "/bin/mysql_install_db")
+               (("basedir=\"\"")
+                (string-append "basedir=\"" out "\"")))
+             ;; Install testing data to the 'test' output.
+             (mkdir-p test)
+             (system* "mv" (string-append out "/data")       test)
+             (system* "mv" (string-append out "/mysql-test") test)
+             (system* "mv" (string-append out "/sql-bench")  test)))
+         %standard-phases))))
+    (native-inputs
+     `(("bison" ,bison)
+       ("perl" ,perl)))
+    (inputs
+     `(("jemalloc" ,jemalloc)
+       ("libaio" ,libaio)
+       ("libxml2" ,libxml2)
+       ("ncurses" ,ncurses)
+       ("openssl" ,openssl)
+       ("pcre" ,pcre)
+       ("zlib" ,zlib)))
+    (home-page "https://mariadb.org/")
+    (synopsis "SQL database server")
+    (description
+     "MariaDB is a multi-user and multi-threaded SQL database server, designed
+as a drop-in replacement of MySQL.")
+    (license gpl2)))
+
 (define-public postgresql
   (package
     (name "postgresql")
-- 
2.2.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/3] gnu: Add MariaDB.
  2015-04-17  7:24 ` [PATCH 3/3] gnu: Add MariaDB 宋文武
@ 2015-04-17 11:33   ` David Thompson
  2015-04-17 11:43     ` Taylan Ulrich Bayırlı/Kammer
  2015-04-17 12:00     ` Ludovic Courtès
  2015-04-17 12:07   ` Ludovic Courtès
  1 sibling, 2 replies; 10+ messages in thread
From: David Thompson @ 2015-04-17 11:33 UTC (permalink / raw)
  To: 宋文武, guix-devel

宋文武 <iyzsong@gmail.com> writes:

> * gnu/packages/database.scm (mariadb): New variable.

MariaDB is a replacement for MySQL.  Last I read you can just replace
MySQL with MariaDB and everything just works.  So, should we keep our
mysql package?

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/3] gnu: Add MariaDB.
  2015-04-17 11:33   ` David Thompson
@ 2015-04-17 11:43     ` Taylan Ulrich Bayırlı/Kammer
  2015-04-17 13:37       ` Ludovic Courtès
  2015-04-17 12:00     ` Ludovic Courtès
  1 sibling, 1 reply; 10+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2015-04-17 11:43 UTC (permalink / raw)
  To: David Thompson; +Cc: guix-devel

David Thompson <dthompson2@worcester.edu> writes:

> 宋文武 <iyzsong@gmail.com> writes:
>
>> * gnu/packages/database.scm (mariadb): New variable.
>
> MariaDB is a replacement for MySQL.  Last I read you can just replace
> MySQL with MariaDB and everything just works.  So, should we keep our
> mysql package?

According to Wikipedia:

    After the 5.5 version, MariaDB developers decided to start a branch
    numbered 10, as an attempt to make it clear that MariaDB 10.0 will
    not import all features from MySQL 5.6; however, they might be
    imported in future versions.

So it might be best to keep it for users desiring MySQL 5.6+ features
that won't be present in MariaDB until possibly later.

Taylan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/3] gnu: Add MariaDB.
  2015-04-17 11:33   ` David Thompson
  2015-04-17 11:43     ` Taylan Ulrich Bayırlı/Kammer
@ 2015-04-17 12:00     ` Ludovic Courtès
  1 sibling, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2015-04-17 12:00 UTC (permalink / raw)
  To: David Thompson; +Cc: guix-devel

David Thompson <dthompson2@worcester.edu> skribis:

> 宋文武 <iyzsong@gmail.com> writes:
>
>> * gnu/packages/database.scm (mariadb): New variable.
>
> MariaDB is a replacement for MySQL.  Last I read you can just replace
> MySQL with MariaDB and everything just works.  So, should we keep our
> mysql package?

Maybe not, indeed, especially since MariaDB looks more future-proof
since it was forked specifically to guarantee that it would remain free,
AIUI.

Thoughts?

Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/3] gnu: Add MariaDB.
  2015-04-17  7:24 ` [PATCH 3/3] gnu: Add MariaDB 宋文武
  2015-04-17 11:33   ` David Thompson
@ 2015-04-17 12:07   ` Ludovic Courtès
  2015-04-17 13:02     ` 宋文武
  1 sibling, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2015-04-17 12:07 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> skribis:

> * gnu/packages/database.scm (mariadb): New variable.

+s: “databases.scm”

> +        'configure 'pre-configure
> +        (lambda _
> +          (setenv "CONFIG_SHELL" (which "sh"))
> +          ;; XXX: libstdc++.so lacks RUNPATH for libgcc_s.so.
> +          (setenv "LDFLAGS" "-lgcc_s")

Indeed, but this is normally compensated by the fact that our GCC
automatically passed -Wl,-rpath=$gcclibdir, no?  What error where you
getting without it?

> +             ;; Install testing data to the 'test' output.
> +             (mkdir-p test)
> +             (system* "mv" (string-append out "/data")       test)
> +             (system* "mv" (string-append out "/mysql-test") test)
> +             (system* "mv" (string-append out "/sql-bench")  test)))

Could you use ‘rename-file’?

Otherwise LGTM.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/3] gnu: Add MariaDB.
  2015-04-17 12:07   ` Ludovic Courtès
@ 2015-04-17 13:02     ` 宋文武
  2015-04-17 13:40       ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: 宋文武 @ 2015-04-17 13:02 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès <ludo@gnu.org> writes:

> 宋文武 <iyzsong@gmail.com> skribis:
>
>> * gnu/packages/database.scm (mariadb): New variable.
>
> +s: “databases.scm”
>
>> +        'configure 'pre-configure
>> +        (lambda _
>> +          (setenv "CONFIG_SHELL" (which "sh"))
>> +          ;; XXX: libstdc++.so lacks RUNPATH for libgcc_s.so.
>> +          (setenv "LDFLAGS" "-lgcc_s")
>
> Indeed, but this is normally compensated by the fact that our GCC
> automatically passed -Wl,-rpath=$gcclibdir, no?  What error where you
> getting without it?
Without this flag, all binaries are broken (they linked with
libstdc++.so but with libgcc_s.so not found).
>
>> +             ;; Install testing data to the 'test' output.
>> +             (mkdir-p test)
>> +             (system* "mv" (string-append out "/data")       test)
>> +             (system* "mv" (string-append out "/mysql-test") test)
>> +             (system* "mv" (string-append out "/sql-bench")  test)))
>
> Could you use ‘rename-file’?
It seem that those are assumed to be installed with the same
basedir as mariadb, and I failed to trick it to run.

I'd like to remove those test data (and the 'test' output).
>
> Otherwise LGTM.
>
> Thanks,
> Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/3] gnu: Add MariaDB.
  2015-04-17 11:43     ` Taylan Ulrich Bayırlı/Kammer
@ 2015-04-17 13:37       ` Ludovic Courtès
  0 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2015-04-17 13:37 UTC (permalink / raw)
  To: Taylan Ulrich "Bayırlı/Kammer"; +Cc: guix-devel

taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:

> David Thompson <dthompson2@worcester.edu> writes:
>
>> 宋文武 <iyzsong@gmail.com> writes:
>>
>>> * gnu/packages/database.scm (mariadb): New variable.
>>
>> MariaDB is a replacement for MySQL.  Last I read you can just replace
>> MySQL with MariaDB and everything just works.  So, should we keep our
>> mysql package?
>
> According to Wikipedia:
>
>     After the 5.5 version, MariaDB developers decided to start a branch
>     numbered 10, as an attempt to make it clear that MariaDB 10.0 will
>     not import all features from MySQL 5.6; however, they might be
>     imported in future versions.
>
> So it might be best to keep it for users desiring MySQL 5.6+ features
> that won't be present in MariaDB until possibly later.

I had overlooked that.  It makes sense to keep both then (and it
shouldn’t cost much anyway.)

Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/3] gnu: Add MariaDB.
  2015-04-17 13:02     ` 宋文武
@ 2015-04-17 13:40       ` Ludovic Courtès
  0 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2015-04-17 13:40 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> 宋文武 <iyzsong@gmail.com> skribis:
>>
>>> * gnu/packages/database.scm (mariadb): New variable.
>>
>> +s: “databases.scm”
>>
>>> +        'configure 'pre-configure
>>> +        (lambda _
>>> +          (setenv "CONFIG_SHELL" (which "sh"))
>>> +          ;; XXX: libstdc++.so lacks RUNPATH for libgcc_s.so.
>>> +          (setenv "LDFLAGS" "-lgcc_s")
>>
>> Indeed, but this is normally compensated by the fact that our GCC
>> automatically passed -Wl,-rpath=$gcclibdir, no?  What error where you
>> getting without it?
> Without this flag, all binaries are broken (they linked with
> libstdc++.so but with libgcc_s.so not found).

On master or core-updates?  How is that possible?  All binaries have
GCC’s lib output in their RUNPATH AFAIK.

>>> +             ;; Install testing data to the 'test' output.
>>> +             (mkdir-p test)
>>> +             (system* "mv" (string-append out "/data")       test)
>>> +             (system* "mv" (string-append out "/mysql-test") test)
>>> +             (system* "mv" (string-append out "/sql-bench")  test)))
>>
>> Could you use ‘rename-file’?
> It seem that those are assumed to be installed with the same
> basedir as mariadb, and I failed to trick it to run.
>
> I'd like to remove those test data (and the 'test' output).

Actually yes, why is this “test” output needed in the first place?

Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-04-17 13:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-17  7:24 [PATCH 1/3] gnu: Add jemalloc 宋文武
2015-04-17  7:24 ` [PATCH 2/3] gnu: Add libaio 宋文武
2015-04-17  7:24 ` [PATCH 3/3] gnu: Add MariaDB 宋文武
2015-04-17 11:33   ` David Thompson
2015-04-17 11:43     ` Taylan Ulrich Bayırlı/Kammer
2015-04-17 13:37       ` Ludovic Courtès
2015-04-17 12:00     ` Ludovic Courtès
2015-04-17 12:07   ` Ludovic Courtès
2015-04-17 13:02     ` 宋文武
2015-04-17 13:40       ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.