Skip to content

Commit 1a9467e

Browse files
committedSep 23, 2017
fuse3: 3.1.1 -> 3.2.0
1 parent 18ee806 commit 1a9467e

File tree

5 files changed

+81
-25
lines changed

5 files changed

+81
-25
lines changed
 

Diff for: ‎pkgs/os-specific/linux/fuse/common.nix

+35-23
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{ version, sha256Hash, maintainers }:
22

33
{ stdenv, fetchFromGitHub, fetchpatch
4-
, utillinux, autoconf, automake, libtool, gettext
5-
, fusePackages }:
4+
, fusePackages, utillinux, gettext
5+
, autoconf, automake, libtool
6+
, meson, ninja, pkgconfig
7+
}:
68

79
let
810
isFuse3 = stdenv.lib.hasPrefix "3" version;
@@ -16,15 +18,25 @@ in stdenv.mkDerivation rec {
1618
sha256 = sha256Hash;
1719
};
1820

19-
patches = stdenv.lib.optional
20-
(!isFuse3 && stdenv.isAarch64)
21-
(fetchpatch {
22-
url = "https://github.com/libfuse/libfuse/commit/914871b20a901e3e1e981c92bc42b1c93b7ab81b.patch";
23-
sha256 = "1w4j6f1awjrycycpvmlv0x5v9gprllh4dnbjxl4dyl2jgbkaw6pa";
24-
});
25-
26-
nativeBuildInputs = [ libtool autoconf automake ];
27-
buildInputs = [ gettext utillinux ];
21+
patches =
22+
stdenv.lib.optional
23+
(!isFuse3 && stdenv.isAarch64)
24+
(fetchpatch {
25+
url = "https://github.com/libfuse/libfuse/commit/914871b20a901e3e1e981c92bc42b1c93b7ab81b.patch";
26+
sha256 = "1w4j6f1awjrycycpvmlv0x5v9gprllh4dnbjxl4dyl2jgbkaw6pa";
27+
})
28+
++ stdenv.lib.optionals isFuse3 [
29+
./fuse3-no-udev.patch # only required for udevrulesdir
30+
./fuse3-install.patch
31+
# install_man makes the build non-reproducible by encoding the date
32+
./fuse3-install_man.patch
33+
];
34+
35+
36+
nativeBuildInputs = if isFuse3
37+
then [ meson ninja pkgconfig ]
38+
else [ autoconf automake libtool ];
39+
buildInputs = stdenv.lib.optional (!isFuse3) gettext;
2840

2941
outputs = [ "out" ] ++ stdenv.lib.optional isFuse3 "common";
3042

@@ -39,27 +51,27 @@ in stdenv.mkDerivation rec {
3951
export NIX_CFLAGS_COMPILE="-DFUSERMOUNT_DIR=\"/run/wrappers/bin\""
4052
4153
sed -e 's@/bin/@${utillinux}/bin/@g' -i lib/mount_util.c
42-
sed -e 's@CONFIG_RPATH=/usr/share/gettext/config.rpath@CONFIG_RPATH=${gettext}/share/gettext/config.rpath@' -i makeconf.sh
43-
44-
./makeconf.sh
45-
'';
46-
47-
postFixup = if isFuse3 then ''
48-
cd $out
49-
54+
'' + (if isFuse3 then ''
55+
# The configure phase will delete these files (temporary workaround for
56+
# ./fuse3-install_man.patch)
57+
install -D -m444 doc/fusermount3.1 $out/share/man/man1/fusermount3.1
58+
install -D -m444 doc/mount.fuse.8 $out/share/man/man8/mount.fuse.8
59+
'' else ''
60+
sed -e 's@CONFIG_RPATH=/usr/share/gettext/config.rpath@CONFIG_RPATH=${gettext}/share/gettext/config.rpath@' -i makeconf.sh
61+
./makeconf.sh
62+
'');
63+
64+
postFixup = "cd $out\n" + (if isFuse3 then ''
5065
mv bin/mount.fuse3 bin/mount.fuse
51-
mv etc/udev/rules.d/99-fuse3.rules etc/udev/rules.d/99-fuse.rules
5266
5367
install -D -m555 bin/mount.fuse $common/bin/mount.fuse
5468
install -D -m444 etc/udev/rules.d/99-fuse.rules $common/etc/udev/rules.d/99-fuse.rules
5569
install -D -m444 share/man/man8/mount.fuse.8.gz $common/share/man/man8/mount.fuse.8.gz
5670
'' else ''
57-
cd $out
58-
5971
cp ${fusePackages.fuse_3.common}/bin/mount.fuse bin/mount.fuse
6072
cp ${fusePackages.fuse_3.common}/etc/udev/rules.d/99-fuse.rules etc/udev/rules.d/99-fuse.rules
6173
cp ${fusePackages.fuse_3.common}/share/man/man8/mount.fuse.8.gz share/man/man8/mount.fuse.8.gz
62-
'';
74+
'');
6375

6476
enableParallelBuilding = true;
6577

Diff for: ‎pkgs/os-specific/linux/fuse/default.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ in {
1313
};
1414

1515
fuse_3 = mkFuse {
16-
version = "3.1.1";
17-
sha256Hash = "14mazl2i55fp4vjphwgcmk3mp2x3mhqwh9nci0rd0jl5lhpdmpq6";
16+
version = "3.2.0";
17+
sha256Hash = "0bfpwkfamg4rcbq1s7v5rblpisqq73z6d5j3dxypgqll07hfg51x";
1818
maintainers = [ maintainers.primeos ];
1919
};
2020
}

Diff for: ‎pkgs/os-specific/linux/fuse/fuse3-install.patch

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--- a/util/install_helper.sh 1970-01-01 01:00:01.000000000 +0100
2+
+++ b/util/install_helper.sh 2017-09-21 23:43:50.703942577 +0200
3+
@@ -11,19 +11,11 @@
4+
udevrulesdir="$3"
5+
prefix="${MESON_INSTALL_DESTDIR_PREFIX}"
6+
7+
-chown root:root "${prefix}/${bindir}/fusermount3"
8+
-chmod u+s "${prefix}/${bindir}/fusermount3"
9+
-
10+
-if test ! -e "${DESTDIR}/dev/fuse"; then
11+
- mkdir -p "${DESTDIR}/dev"
12+
- mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229
13+
-fi
14+
-
15+
install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \
16+
- "${DESTDIR}/${udevrulesdir}/99-fuse3.rules"
17+
+ "${prefix}/${udevrulesdir}/99-fuse.rules"
18+
19+
install -D -m 755 "${MESON_SOURCE_ROOT}/util/init_script" \
20+
- "${DESTDIR}/etc/init.d/fuse3"
21+
+ "${prefix}/etc/init.d/fuse3"
22+
23+
if test -x /usr/sbin/update-rc.d && test -z "${DESTDIR}"; then
24+
/usr/sbin/update-rc.d fuse3 start 34 S . start 41 0 6 . || /bin/true

Diff for: ‎pkgs/os-specific/linux/fuse/fuse3-install_man.patch

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
--- a/doc/meson.build 1970-01-01 01:00:01.000000000 +0100
2+
+++ b/doc/meson.build 2017-09-22 01:53:01.859190506 +0200
3+
@@ -1,5 +1,4 @@
4+
# Attention, emacs, please use -*- mode: python -*-
5+
# (even though this isn't actually Python code)
6+
7+
-install_man('fusermount3.1', 'mount.fuse.8')
8+

Diff for: ‎pkgs/os-specific/linux/fuse/fuse3-no-udev.patch

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
+++ b/util/meson.build 2017-09-23 20:59:31.555392297 +0200
2+
--- a/util/meson.build 2017-09-23 20:59:58.333180437 +0200
3+
@@ -18,8 +18,7 @@
4+
install: true,
5+
install_dir: get_option('sbindir'))
6+
7+
-udev = dependency('udev')
8+
-udevrulesdir = join_paths(udev.get_pkgconfig_variable('udevdir'), 'rules.d')
9+
+udevrulesdir = 'etc/udev/rules.d'
10+
11+
meson.add_install_script('install_helper.sh', get_option('sysconfdir'),
12+
get_option('bindir'), udevrulesdir)

0 commit comments

Comments
 (0)
Please sign in to comment.