forked from mirrors/nixpkgs
Merge pull request #107218 from helsinki-systems/upd/glusterfs
glusterfs: 7.6 -> 8.3
This commit is contained in:
commit
7dc6f850b3
|
@ -1,25 +1,17 @@
|
|||
{stdenv, fetchurl, fuse, bison, flex_2_5_35, openssl, python3, ncurses, readline,
|
||||
{stdenv, fetchFromGitHub, fuse, bison, flex_2_5_35, openssl, python3, ncurses, readline,
|
||||
autoconf, automake, libtool, pkgconfig, zlib, libaio, libxml2, acl, sqlite,
|
||||
liburcu, attr, makeWrapper, coreutils, gnused, gnugrep, which,
|
||||
openssh, gawk, findutils, util-linux, lvm2, btrfs-progs, e2fsprogs, xfsprogs, systemd,
|
||||
rsync, glibc, rpcsvc-proto, libtirpc
|
||||
}:
|
||||
let
|
||||
s =
|
||||
rec {
|
||||
baseName="glusterfs";
|
||||
# NOTE: On each glusterfs release, it should be checked if gluster added
|
||||
# new, or changed, Python scripts whose PYTHONPATH has to be set in
|
||||
# `postFixup` below, and whose runtime deps need to go into
|
||||
# `nativeBuildInputs`.
|
||||
# The command
|
||||
# find /nix/store/...-glusterfs-.../ -name '*.py' -executable
|
||||
# can help with finding new Python scripts.
|
||||
version = "7.6";
|
||||
name="${baseName}-${version}";
|
||||
url="https://github.com/gluster/glusterfs/archive/v${version}.tar.gz";
|
||||
sha256 = "0zdcv2jk8dp67id8ic30mkn97ccp07jf20g7v09a5k31pw9aqyih";
|
||||
};
|
||||
# NOTE: On each glusterfs release, it should be checked if gluster added
|
||||
# new, or changed, Python scripts whose PYTHONPATH has to be set in
|
||||
# `postFixup` below, and whose runtime deps need to go into
|
||||
# `nativeBuildInputs`.
|
||||
# The command
|
||||
# find /nix/store/...-glusterfs-.../ -name '*.py' -executable
|
||||
# can help with finding new Python scripts.
|
||||
|
||||
buildInputs = [
|
||||
fuse bison flex_2_5_35 openssl ncurses readline
|
||||
|
@ -60,16 +52,17 @@ let
|
|||
which # which
|
||||
xfsprogs # xfs_info
|
||||
];
|
||||
in
|
||||
stdenv.mkDerivation
|
||||
{
|
||||
inherit (s) name version;
|
||||
inherit buildInputs propagatedBuildInputs;
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "glusterfs";
|
||||
version = "8.3";
|
||||
|
||||
patches = [
|
||||
# Remove when https://bugzilla.redhat.com/show_bug.cgi?id=1489610 is fixed
|
||||
./glusterfs-fix-bug-1489610-glusterfind-var-data-under-prefix.patch
|
||||
];
|
||||
src = fetchFromGitHub {
|
||||
owner = "gluster";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "09vvbymiacz2pzwnq6f2dd7g2zszzsivdncz45sh977v3z0n84az";
|
||||
};
|
||||
inherit buildInputs propagatedBuildInputs;
|
||||
|
||||
postPatch = ''
|
||||
sed -e '/chmod u+s/d' -i contrib/fuse-util/Makefile.am
|
||||
|
@ -91,7 +84,7 @@ stdenv.mkDerivation
|
|||
# but fails when the version is empty.
|
||||
# See upstream GlusterFS bug https://bugzilla.redhat.com/show_bug.cgi?id=1452705
|
||||
preConfigure = ''
|
||||
echo "v${s.version}" > VERSION
|
||||
echo "v${version}" > VERSION
|
||||
./autogen.sh
|
||||
export PYTHON=${python3}/bin/python
|
||||
'';
|
||||
|
@ -109,7 +102,7 @@ stdenv.mkDerivation
|
|||
postInstall = ''
|
||||
cp -r $out/$out/* $out
|
||||
rm -r $out/nix
|
||||
'';
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# glusterd invokes `gluster` and other utilities when telling other glusterd nodes to run commands.
|
||||
|
@ -153,7 +146,7 @@ stdenv.mkDerivation
|
|||
wrapProgram $out/share/glusterfs/scripts/eventsdash.py --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
|
||||
wrapProgram $out/libexec/glusterfs/glusterfind/brickfind.py --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
|
||||
wrapProgram $out/libexec/glusterfs/glusterfind/changelog.py --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
|
||||
'';
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
|
@ -187,12 +180,7 @@ stdenv.mkDerivation
|
|||
rm -r $out/bin/conf.py
|
||||
'';
|
||||
|
||||
src = fetchurl {
|
||||
inherit (s) url sha256;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
inherit (s) version;
|
||||
description = "Distributed storage system";
|
||||
homepage = "https://www.gluster.org";
|
||||
license = licenses.lgpl3Plus; # dual licese: choice of lgpl3Plus or gpl2
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
From f523afac49e24ecc0fa4ad85195135689cf445f0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= <mail@nh2.me>
|
||||
Date: Wed, 27 Sep 2017 21:36:41 +0200
|
||||
Subject: [PATCH] Fix "glusterfind saves var data under $prefix instead of
|
||||
localstatedir". Fixes #1489610
|
||||
|
||||
Change-Id: Id2362c20f34346c37acfb9eb1ad105d0b7b8b60f
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f87d8a454..b4d3f5d10 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1118,7 +1118,7 @@ if test "x$exec_prefix" = xNONE; then
|
||||
exec_prefix="$(eval echo $prefix)"
|
||||
fi
|
||||
GLUSTERFS_LIBEXECDIR="$(eval echo $libexecdir)/glusterfs"
|
||||
-GLUSTERFSD_MISCDIR="$(eval echo $prefix)/var/lib/misc/glusterfsd"
|
||||
+GLUSTERFSD_MISCDIR="$(eval echo $localstatedir)/lib/misc/glusterfsd"
|
||||
prefix=$old_prefix
|
||||
exec_prefix=$old_exec_prefix
|
||||
|
||||
--
|
||||
2.12.0
|
||||
|
Loading…
Reference in a new issue