mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
gnu: glusterfs: Update to 7.0
* gnu/packages/file-systems.scm (glusterfs): Update to 7.0. [source]: Update URL. [arguments]: Add "PYTHON=" and"--enable-cmocka" configure flags. Remove 'replace-config.sub and 'fix-lex phases. Add 'autogen. [native-inputs]: Add libtirpc, rpcsvc-proto, autoconf, automake, and libtool. [inputs]: Add fuse, libaio, and rdma-core. Remove lvm2 and sqlite. * gnu/packages/patches/glusterfs-use-PATH-instead-of-hardcodes.patch: Remove. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
a1d7920861
commit
327bfe8db9
3 changed files with 29 additions and 176 deletions
|
@ -924,7 +924,6 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/glibc-2.28-supported-locales.patch \
|
%D%/packages/patches/glibc-2.28-supported-locales.patch \
|
||||||
%D%/packages/patches/glibc-supported-locales.patch \
|
%D%/packages/patches/glibc-supported-locales.patch \
|
||||||
%D%/packages/patches/glm-restore-install-target.patch \
|
%D%/packages/patches/glm-restore-install-target.patch \
|
||||||
%D%/packages/patches/glusterfs-use-PATH-instead-of-hardcodes.patch \
|
|
||||||
%D%/packages/patches/gmp-arm-asm-nothumb.patch \
|
%D%/packages/patches/gmp-arm-asm-nothumb.patch \
|
||||||
%D%/packages/patches/gmp-faulty-test.patch \
|
%D%/packages/patches/gmp-faulty-test.patch \
|
||||||
%D%/packages/patches/gnome-shell-theme.patch \
|
%D%/packages/patches/gnome-shell-theme.patch \
|
||||||
|
|
|
@ -41,6 +41,7 @@ (define-module (gnu packages file-systems)
|
||||||
#:use-module (gnu packages flex)
|
#:use-module (gnu packages flex)
|
||||||
#:use-module (gnu packages glib)
|
#:use-module (gnu packages glib)
|
||||||
#:use-module (gnu packages linux)
|
#:use-module (gnu packages linux)
|
||||||
|
#:use-module (gnu packages onc-rpc)
|
||||||
#:use-module (gnu packages pkg-config)
|
#:use-module (gnu packages pkg-config)
|
||||||
#:use-module (gnu packages python)
|
#:use-module (gnu packages python)
|
||||||
#:use-module (gnu packages readline)
|
#:use-module (gnu packages readline)
|
||||||
|
@ -146,63 +147,56 @@ (define-public disorderfs
|
||||||
(define-public glusterfs
|
(define-public glusterfs
|
||||||
(package
|
(package
|
||||||
(name "glusterfs")
|
(name "glusterfs")
|
||||||
(version "3.10.12")
|
(version "7.0")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
|
(uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
|
||||||
(version-major+minor version) "/" version
|
(version-major version) "/"
|
||||||
"/glusterfs-" version ".tar.gz"))
|
(version-major+minor version) "/"
|
||||||
|
"glusterfs-" version ".tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"01ysvamvfv2l5pswa1rygpg8w0954h2wkh1ba97h3nx03m5n0prg"))
|
"0yzhx710ypj0j3m5dcgmmgvkp7p0rmmp2p7ld0axrm4vpwc2b1wa"))))
|
||||||
(patches
|
|
||||||
(search-patches "glusterfs-use-PATH-instead-of-hardcodes.patch"))))
|
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags
|
`(#:configure-flags
|
||||||
(let ((out (assoc-ref %outputs "out")))
|
(let ((out (assoc-ref %outputs "out"))
|
||||||
(list (string-append "--with-initdir=" out "/etc/init.d")
|
(p2 (assoc-ref %build-inputs "python-2")))
|
||||||
(string-append "--with-mountutildir=" out "/sbin")))
|
(list (string-append "PYTHON=" p2 "/bin/python")
|
||||||
|
(string-append "--with-initdir=" out "/etc/init.d")
|
||||||
|
(string-append "--with-mountutildir=" out "/sbin")
|
||||||
|
"--enable-cmocka" ; unit tests
|
||||||
|
;; "--enable-debug" ; debug build options
|
||||||
|
;; "--enable-asan" ; Address Sanitizer
|
||||||
|
;; "--enable-tsan" ; ThreadSanitizer
|
||||||
|
))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-before 'configure 'replace-config.sub
|
(add-before 'configure 'autogen
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda _ (invoke "./autogen.sh"))))))
|
||||||
;; The distributed config.sub is intentionally left empty and
|
|
||||||
;; must be replaced.
|
|
||||||
(install-file (string-append (assoc-ref inputs "automake")
|
|
||||||
"/share/automake-"
|
|
||||||
,(version-major+minor (package-version automake)) "/config.sub")
|
|
||||||
".")
|
|
||||||
#t))
|
|
||||||
;; Fix flex error. This has already been fixed with upstream commit
|
|
||||||
;; db3fe245a9e8812829eae7d143e49d0bfdfef9a7, but is not available in
|
|
||||||
;; current releases.
|
|
||||||
(add-before 'configure 'fix-lex
|
|
||||||
(lambda _
|
|
||||||
(substitute* "libglusterfs/src/Makefile.in"
|
|
||||||
(("libglusterfs_la_LIBADD = @LEXLIB@")
|
|
||||||
"libglusterfs_la_LIBADD ="))
|
|
||||||
#t)))))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("cmocka" ,cmocka)
|
`(("pkg-config" ,pkg-config)
|
||||||
("pkg-config" ,pkg-config)
|
("libtirpc", libtirpc)
|
||||||
|
("rpcsvc-proto", rpcsvc-proto)
|
||||||
("python-2" ,python-2) ; must be version 2
|
("python-2" ,python-2) ; must be version 2
|
||||||
("flex" ,flex)
|
("flex" ,flex)
|
||||||
("bison" ,bison)
|
("bison" ,bison)
|
||||||
("automake" ,automake)))
|
("libtool" ,libtool)
|
||||||
|
("autoconf" ,autoconf)
|
||||||
|
("automake" ,automake)
|
||||||
|
("cmocka" ,cmocka)))
|
||||||
(inputs
|
(inputs
|
||||||
`(("acl" ,acl)
|
`(("acl" ,acl)
|
||||||
;; GlusterFS fails to build with libressl because HMAC_CTX_new and
|
("fuse", fuse)
|
||||||
;; HMAC_CTX_free are undefined.
|
|
||||||
("openssl" ,openssl)
|
("openssl" ,openssl)
|
||||||
("liburcu" ,liburcu)
|
("liburcu" ,liburcu)
|
||||||
("libuuid" ,util-linux)
|
("libuuid" ,util-linux)
|
||||||
("libxml2" ,libxml2)
|
("libxml2" ,libxml2)
|
||||||
("lvm2" ,lvm2)
|
|
||||||
("readline" ,readline)
|
("readline" ,readline)
|
||||||
("sqlite" ,sqlite) ; for tiering
|
("zlib" ,zlib)
|
||||||
("zlib" ,zlib)))
|
("libaio", libaio)
|
||||||
|
("rdma-core", rdma-core)))
|
||||||
(home-page "https://www.gluster.org")
|
(home-page "https://www.gluster.org")
|
||||||
(synopsis "Distributed file system")
|
(synopsis "Distributed file system")
|
||||||
(description "GlusterFS is a distributed scalable network file system
|
(description "GlusterFS is a distributed scalable network file system
|
||||||
|
|
|
@ -1,140 +0,0 @@
|
||||||
This patch was taken from Nixpkgs.
|
|
||||||
|
|
||||||
From 616381bc25b0e90198683fb049f994e82d467d96 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= <mail@nh2.me>
|
|
||||||
Date: Sat, 13 May 2017 02:45:49 +0200
|
|
||||||
Subject: [PATCH] Don't use hardcoded /sbin, /usr/bin etc. paths. Fixes
|
|
||||||
#1450546.
|
|
||||||
|
|
||||||
Instead, rely on programs to be in PATH, as gluster already
|
|
||||||
does in many places across its code base.
|
|
||||||
|
|
||||||
Change-Id: Id21152fe42f5b67205d8f1571b0656c4d5f74246
|
|
||||||
---
|
|
||||||
contrib/fuse-lib/mount-common.c | 8 ++++----
|
|
||||||
xlators/mgmt/glusterd/src/glusterd-ganesha.c | 6 +++---
|
|
||||||
xlators/mgmt/glusterd/src/glusterd-quota.c | 6 +++---
|
|
||||||
xlators/mgmt/glusterd/src/glusterd-snapshot.c | 4 ++--
|
|
||||||
xlators/mgmt/glusterd/src/glusterd-utils.c | 14 +-------------
|
|
||||||
5 files changed, 13 insertions(+), 25 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/contrib/fuse-lib/mount-common.c b/contrib/fuse-lib/mount-common.c
|
|
||||||
index e9f80fe81..6380dd867 100644
|
|
||||||
--- a/contrib/fuse-lib/mount-common.c
|
|
||||||
+++ b/contrib/fuse-lib/mount-common.c
|
|
||||||
@@ -255,16 +255,16 @@ fuse_mnt_umount (const char *progname, const char *abs_mnt,
|
|
||||||
exit (1);
|
|
||||||
}
|
|
||||||
#ifdef GF_LINUX_HOST_OS
|
|
||||||
- execl ("/bin/umount", "/bin/umount", "-i", rel_mnt,
|
|
||||||
+ execl ("umount", "umount", "-i", rel_mnt,
|
|
||||||
lazy ? "-l" : NULL, NULL);
|
|
||||||
- GFFUSE_LOGERR ("%s: failed to execute /bin/umount: %s",
|
|
||||||
+ GFFUSE_LOGERR ("%s: failed to execute umount: %s",
|
|
||||||
progname, strerror (errno));
|
|
||||||
#elif __NetBSD__
|
|
||||||
/* exitting the filesystem causes the umount */
|
|
||||||
exit (0);
|
|
||||||
#else
|
|
||||||
- execl ("/sbin/umount", "/sbin/umount", "-f", rel_mnt, NULL);
|
|
||||||
- GFFUSE_LOGERR ("%s: failed to execute /sbin/umount: %s",
|
|
||||||
+ execl ("umount", "umount", "-f", rel_mnt, NULL);
|
|
||||||
+ GFFUSE_LOGERR ("%s: failed to execute umount: %s",
|
|
||||||
progname, strerror (errno));
|
|
||||||
#endif /* GF_LINUX_HOST_OS */
|
|
||||||
exit (1);
|
|
||||||
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c
|
|
||||||
index 0e6629cf0..fcb4738b7 100644
|
|
||||||
--- a/xlators/mgmt/glusterd/src/glusterd-quota.c
|
|
||||||
+++ b/xlators/mgmt/glusterd/src/glusterd-quota.c
|
|
||||||
@@ -30,7 +30,7 @@
|
|
||||||
|
|
||||||
#ifndef _PATH_SETFATTR
|
|
||||||
# ifdef GF_LINUX_HOST_OS
|
|
||||||
-# define _PATH_SETFATTR "/usr/bin/setfattr"
|
|
||||||
+# define _PATH_SETFATTR "setfattr"
|
|
||||||
# endif
|
|
||||||
# ifdef __NetBSD__
|
|
||||||
# define _PATH_SETFATTR "/usr/pkg/bin/setfattr"
|
|
||||||
@@ -335,7 +335,7 @@ _glusterd_quota_initiate_fs_crawl (glusterd_conf_t *priv,
|
|
||||||
|
|
||||||
if (type == GF_QUOTA_OPTION_TYPE_ENABLE ||
|
|
||||||
type == GF_QUOTA_OPTION_TYPE_ENABLE_OBJECTS)
|
|
||||||
- runner_add_args (&runner, "/usr/bin/find", ".", NULL);
|
|
||||||
+ runner_add_args (&runner, "find", ".", NULL);
|
|
||||||
|
|
||||||
else if (type == GF_QUOTA_OPTION_TYPE_DISABLE) {
|
|
||||||
|
|
||||||
@@ -351,7 +351,7 @@ _glusterd_quota_initiate_fs_crawl (glusterd_conf_t *priv,
|
|
||||||
VIRTUAL_QUOTA_XATTR_CLEANUP_KEY, "1",
|
|
||||||
"{}", "\\", ";", NULL);
|
|
||||||
#else
|
|
||||||
- runner_add_args (&runner, "/usr/bin/find", ".",
|
|
||||||
+ runner_add_args (&runner, "find", ".",
|
|
||||||
"-exec", _PATH_SETFATTR, "-n",
|
|
||||||
VIRTUAL_QUOTA_XATTR_CLEANUP_KEY, "-v",
|
|
||||||
"1", "{}", "\\", ";", NULL);
|
|
||||||
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
|
|
||||||
index da0152366..f0d135350 100644
|
|
||||||
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
|
|
||||||
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
|
|
||||||
@@ -121,7 +121,7 @@ glusterd_build_snap_device_path (char *device, char *snapname,
|
|
||||||
}
|
|
||||||
|
|
||||||
runinit (&runner);
|
|
||||||
- runner_add_args (&runner, "/sbin/lvs", "--noheadings", "-o", "vg_name",
|
|
||||||
+ runner_add_args (&runner, "lvs", "--noheadings", "-o", "vg_name",
|
|
||||||
device, NULL);
|
|
||||||
runner_redir (&runner, STDOUT_FILENO, RUN_PIPE);
|
|
||||||
snprintf (msg, sizeof (msg), "Get volume group for device %s", device);
|
|
||||||
@@ -1982,7 +1982,7 @@ glusterd_is_thinp_brick (char *device, uint32_t *op_errno)
|
|
||||||
|
|
||||||
runinit (&runner);
|
|
||||||
|
|
||||||
- runner_add_args (&runner, "/sbin/lvs", "--noheadings", "-o", "pool_lv",
|
|
||||||
+ runner_add_args (&runner, "lvs", "--noheadings", "-o", "pool_lv",
|
|
||||||
device, NULL);
|
|
||||||
runner_redir (&runner, STDOUT_FILENO, RUN_PIPE);
|
|
||||||
runner_log (&runner, this->name, GF_LOG_DEBUG, msg);
|
|
||||||
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
||||||
index 51db13df0..6fa7b92f9 100644
|
|
||||||
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
||||||
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
||||||
@@ -6027,7 +6027,6 @@ static struct fs_info {
|
|
||||||
char *fs_tool_pattern;
|
|
||||||
char *fs_tool_pkg;
|
|
||||||
} glusterd_fs[] = {
|
|
||||||
- /* some linux have these in /usr/sbin/and others in /sbin/? */
|
|
||||||
{ "xfs", "xfs_info", NULL, "isize=", "xfsprogs" },
|
|
||||||
{ "ext3", "tune2fs", "-l", "Inode size:", "e2fsprogs" },
|
|
||||||
{ "ext4", "tune2fs", "-l", "Inode size:", "e2fsprogs" },
|
|
||||||
@@ -6048,7 +6047,6 @@ glusterd_add_inode_size_to_dict (dict_t *dict, int count)
|
|
||||||
char *trail = NULL;
|
|
||||||
runner_t runner = {0, };
|
|
||||||
struct fs_info *fs = NULL;
|
|
||||||
- char fs_tool_name[256] = {0, };
|
|
||||||
static dict_t *cached_fs = NULL;
|
|
||||||
|
|
||||||
memset (key, 0, sizeof (key));
|
|
||||||
@@ -6085,17 +6083,7 @@ glusterd_add_inode_size_to_dict (dict_t *dict, int count)
|
|
||||||
cur_word = "N/A";
|
|
||||||
goto cached;
|
|
||||||
}
|
|
||||||
-
|
|
||||||
- snprintf (fs_tool_name, sizeof (fs_tool_name),
|
|
||||||
- "/usr/sbin/%s", fs->fs_tool_name);
|
|
||||||
- if (sys_access (fs_tool_name, R_OK|X_OK) == 0)
|
|
||||||
- runner_add_arg (&runner, fs_tool_name);
|
|
||||||
- else {
|
|
||||||
- snprintf (fs_tool_name, sizeof (fs_tool_name),
|
|
||||||
- "/sbin/%s", fs->fs_tool_name);
|
|
||||||
- if (sys_access (fs_tool_name, R_OK|X_OK) == 0)
|
|
||||||
- runner_add_arg (&runner, fs_tool_name);
|
|
||||||
- }
|
|
||||||
+ runner_add_arg (&runner, fs->fs_tool_name);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.12.0
|
|
||||||
|
|
Loading…
Reference in a new issue