Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glusterfs: 7.6 -> 8.3 #107218

Merged
merged 1 commit into from Dec 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
54 changes: 21 additions & 33 deletions pkgs/tools/filesystems/glusterfs/default.nix
@@ -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
Expand Down Expand Up @@ -60,17 +52,18 @@ let
which # which
xfsprogs # xfs_info
];
in
stdenv.mkDerivation
{
inherit (s) name version;
in stdenv.mkDerivation rec {
pname = "glusterfs";
version = "8.3";

src = fetchFromGitHub {
owner = "gluster";
repo = pname;
rev = "v${version}";
sha256 = "09vvbymiacz2pzwnq6f2dd7g2zszzsivdncz45sh977v3z0n84az";
};
inherit buildInputs propagatedBuildInputs;

patches = [
# Remove when https://bugzilla.redhat.com/show_bug.cgi?id=1489610 is fixed
./glusterfs-fix-bug-1489610-glusterfind-var-data-under-prefix.patch
];

postPatch = ''
sed -e '/chmod u+s/d' -i contrib/fuse-util/Makefile.am
substituteInPlace libglusterfs/src/glusterfs/lvm-defaults.h \
Expand All @@ -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
'';
Expand All @@ -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.
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down

This file was deleted.