forked from mirrors/nixpkgs
fuse3: 3.1.1 -> 3.2.0
This commit is contained in:
parent
18ee806811
commit
1a9467edd5
|
@ -1,8 +1,10 @@
|
|||
{ version, sha256Hash, maintainers }:
|
||||
|
||||
{ stdenv, fetchFromGitHub, fetchpatch
|
||||
, utillinux, autoconf, automake, libtool, gettext
|
||||
, fusePackages }:
|
||||
, fusePackages, utillinux, gettext
|
||||
, autoconf, automake, libtool
|
||||
, meson, ninja, pkgconfig
|
||||
}:
|
||||
|
||||
let
|
||||
isFuse3 = stdenv.lib.hasPrefix "3" version;
|
||||
|
@ -16,15 +18,25 @@ in stdenv.mkDerivation rec {
|
|||
sha256 = sha256Hash;
|
||||
};
|
||||
|
||||
patches = stdenv.lib.optional
|
||||
(!isFuse3 && stdenv.isAarch64)
|
||||
(fetchpatch {
|
||||
url = "https://github.com/libfuse/libfuse/commit/914871b20a901e3e1e981c92bc42b1c93b7ab81b.patch";
|
||||
sha256 = "1w4j6f1awjrycycpvmlv0x5v9gprllh4dnbjxl4dyl2jgbkaw6pa";
|
||||
});
|
||||
patches =
|
||||
stdenv.lib.optional
|
||||
(!isFuse3 && stdenv.isAarch64)
|
||||
(fetchpatch {
|
||||
url = "https://github.com/libfuse/libfuse/commit/914871b20a901e3e1e981c92bc42b1c93b7ab81b.patch";
|
||||
sha256 = "1w4j6f1awjrycycpvmlv0x5v9gprllh4dnbjxl4dyl2jgbkaw6pa";
|
||||
})
|
||||
++ stdenv.lib.optionals isFuse3 [
|
||||
./fuse3-no-udev.patch # only required for udevrulesdir
|
||||
./fuse3-install.patch
|
||||
# install_man makes the build non-reproducible by encoding the date
|
||||
./fuse3-install_man.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ libtool autoconf automake ];
|
||||
buildInputs = [ gettext utillinux ];
|
||||
|
||||
nativeBuildInputs = if isFuse3
|
||||
then [ meson ninja pkgconfig ]
|
||||
else [ autoconf automake libtool ];
|
||||
buildInputs = stdenv.lib.optional (!isFuse3) gettext;
|
||||
|
||||
outputs = [ "out" ] ++ stdenv.lib.optional isFuse3 "common";
|
||||
|
||||
|
@ -39,27 +51,27 @@ in stdenv.mkDerivation rec {
|
|||
export NIX_CFLAGS_COMPILE="-DFUSERMOUNT_DIR=\"/run/wrappers/bin\""
|
||||
|
||||
sed -e 's@/bin/@${utillinux}/bin/@g' -i lib/mount_util.c
|
||||
sed -e 's@CONFIG_RPATH=/usr/share/gettext/config.rpath@CONFIG_RPATH=${gettext}/share/gettext/config.rpath@' -i makeconf.sh
|
||||
|
||||
./makeconf.sh
|
||||
'';
|
||||
|
||||
postFixup = if isFuse3 then ''
|
||||
cd $out
|
||||
'' + (if isFuse3 then ''
|
||||
# The configure phase will delete these files (temporary workaround for
|
||||
# ./fuse3-install_man.patch)
|
||||
install -D -m444 doc/fusermount3.1 $out/share/man/man1/fusermount3.1
|
||||
install -D -m444 doc/mount.fuse.8 $out/share/man/man8/mount.fuse.8
|
||||
'' else ''
|
||||
sed -e 's@CONFIG_RPATH=/usr/share/gettext/config.rpath@CONFIG_RPATH=${gettext}/share/gettext/config.rpath@' -i makeconf.sh
|
||||
./makeconf.sh
|
||||
'');
|
||||
|
||||
postFixup = "cd $out\n" + (if isFuse3 then ''
|
||||
mv bin/mount.fuse3 bin/mount.fuse
|
||||
mv etc/udev/rules.d/99-fuse3.rules etc/udev/rules.d/99-fuse.rules
|
||||
|
||||
install -D -m555 bin/mount.fuse $common/bin/mount.fuse
|
||||
install -D -m444 etc/udev/rules.d/99-fuse.rules $common/etc/udev/rules.d/99-fuse.rules
|
||||
install -D -m444 share/man/man8/mount.fuse.8.gz $common/share/man/man8/mount.fuse.8.gz
|
||||
'' else ''
|
||||
cd $out
|
||||
|
||||
cp ${fusePackages.fuse_3.common}/bin/mount.fuse bin/mount.fuse
|
||||
cp ${fusePackages.fuse_3.common}/etc/udev/rules.d/99-fuse.rules etc/udev/rules.d/99-fuse.rules
|
||||
cp ${fusePackages.fuse_3.common}/share/man/man8/mount.fuse.8.gz share/man/man8/mount.fuse.8.gz
|
||||
'';
|
||||
'');
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ in {
|
|||
};
|
||||
|
||||
fuse_3 = mkFuse {
|
||||
version = "3.1.1";
|
||||
sha256Hash = "14mazl2i55fp4vjphwgcmk3mp2x3mhqwh9nci0rd0jl5lhpdmpq6";
|
||||
version = "3.2.0";
|
||||
sha256Hash = "0bfpwkfamg4rcbq1s7v5rblpisqq73z6d5j3dxypgqll07hfg51x";
|
||||
maintainers = [ maintainers.primeos ];
|
||||
};
|
||||
}
|
||||
|
|
24
pkgs/os-specific/linux/fuse/fuse3-install.patch
Normal file
24
pkgs/os-specific/linux/fuse/fuse3-install.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
--- a/util/install_helper.sh 1970-01-01 01:00:01.000000000 +0100
|
||||
+++ b/util/install_helper.sh 2017-09-21 23:43:50.703942577 +0200
|
||||
@@ -11,19 +11,11 @@
|
||||
udevrulesdir="$3"
|
||||
prefix="${MESON_INSTALL_DESTDIR_PREFIX}"
|
||||
|
||||
-chown root:root "${prefix}/${bindir}/fusermount3"
|
||||
-chmod u+s "${prefix}/${bindir}/fusermount3"
|
||||
-
|
||||
-if test ! -e "${DESTDIR}/dev/fuse"; then
|
||||
- mkdir -p "${DESTDIR}/dev"
|
||||
- mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229
|
||||
-fi
|
||||
-
|
||||
install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \
|
||||
- "${DESTDIR}/${udevrulesdir}/99-fuse3.rules"
|
||||
+ "${prefix}/${udevrulesdir}/99-fuse.rules"
|
||||
|
||||
install -D -m 755 "${MESON_SOURCE_ROOT}/util/init_script" \
|
||||
- "${DESTDIR}/etc/init.d/fuse3"
|
||||
+ "${prefix}/etc/init.d/fuse3"
|
||||
|
||||
if test -x /usr/sbin/update-rc.d && test -z "${DESTDIR}"; then
|
||||
/usr/sbin/update-rc.d fuse3 start 34 S . start 41 0 6 . || /bin/true
|
8
pkgs/os-specific/linux/fuse/fuse3-install_man.patch
Normal file
8
pkgs/os-specific/linux/fuse/fuse3-install_man.patch
Normal file
|
@ -0,0 +1,8 @@
|
|||
--- a/doc/meson.build 1970-01-01 01:00:01.000000000 +0100
|
||||
+++ b/doc/meson.build 2017-09-22 01:53:01.859190506 +0200
|
||||
@@ -1,5 +1,4 @@
|
||||
# Attention, emacs, please use -*- mode: python -*-
|
||||
# (even though this isn't actually Python code)
|
||||
|
||||
-install_man('fusermount3.1', 'mount.fuse.8')
|
||||
|
12
pkgs/os-specific/linux/fuse/fuse3-no-udev.patch
Normal file
12
pkgs/os-specific/linux/fuse/fuse3-no-udev.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
+++ b/util/meson.build 2017-09-23 20:59:31.555392297 +0200
|
||||
--- a/util/meson.build 2017-09-23 20:59:58.333180437 +0200
|
||||
@@ -18,8 +18,7 @@
|
||||
install: true,
|
||||
install_dir: get_option('sbindir'))
|
||||
|
||||
-udev = dependency('udev')
|
||||
-udevrulesdir = join_paths(udev.get_pkgconfig_variable('udevdir'), 'rules.d')
|
||||
+udevrulesdir = 'etc/udev/rules.d'
|
||||
|
||||
meson.add_install_script('install_helper.sh', get_option('sysconfdir'),
|
||||
get_option('bindir'), udevrulesdir)
|
Loading…
Reference in a new issue