[packages/libfuse] Rel 3; fix build with newer glibc

arekm arekm at pld-linux.org
Mon Dec 19 07:12:17 CET 2022


commit fa0f08e97a0764db0d03b0c5ede90b56bfb476d2
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Dec 19 07:11:55 2022 +0100

    Rel 3; fix build with newer glibc

 fuse-2.9.9-closefrom-glibc-2-34.patch | 60 +++++++++++++++++++++++++++++++++++
 libfuse.spec                          |  4 ++-
 2 files changed, 63 insertions(+), 1 deletion(-)
---
diff --git a/libfuse.spec b/libfuse.spec
index b56a152..cbbe50f 100644
--- a/libfuse.spec
+++ b/libfuse.spec
@@ -2,7 +2,7 @@ Summary:	Filesystem in Userspace
 Summary(pl.UTF-8):	System plików w przestrzeni użytkownika
 Name:		libfuse
 Version:	2.9.9
-Release:	2
+Release:	3
 License:	LGPL v2 (library), GPL v2 (tools)
 Group:		Applications/System
 #Source0Download: https://github.com/libfuse/libfuse/releases
@@ -10,6 +10,7 @@ Source0:	https://github.com/libfuse/libfuse/releases/download/fuse-%{version}/fu
 # Source0-md5:	8000410aadc9231fd48495f7642f3312
 Patch0:		kernel-misc-fuse-Makefile.am.patch
 Patch1:		%{name}-arm64.patch
+Patch2:         fuse-2.9.9-closefrom-glibc-2-34.patch
 URL:		https://github.com/libfuse/libfuse
 BuildRequires:	autoconf >= 2.60
 BuildRequires:	automake
@@ -94,6 +95,7 @@ Narzędzia do montowania systemów plików opartych na FUSE.
 %setup -q -n fuse-%{version}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 sed -i '/FUSERMOUNT_PROG/s,fusermount,%{_bindir}/fusermount,' lib/mount.c
 
diff --git a/fuse-2.9.9-closefrom-glibc-2-34.patch b/fuse-2.9.9-closefrom-glibc-2-34.patch
new file mode 100644
index 0000000..beb8d51
--- /dev/null
+++ b/fuse-2.9.9-closefrom-glibc-2-34.patch
@@ -0,0 +1,60 @@
+From ae2352bca9b4e607538412da0cc2a9625cd8b692 Mon Sep 17 00:00:00 2001
+From: Sam James <sam at gentoo.org>
+Date: Sat, 24 Jul 2021 22:02:45 +0100
+Subject: [PATCH] util/ulockmgr_server.c: conditionally define closefrom (fix
+ glibc-2.34+)
+
+closefrom(3) has joined us in glibc-land from *BSD and Solaris. Since
+it's available in glibc 2.34+, we want to detect it and only define our
+fallback if the libc doesn't provide it.
+
+Bug: https://bugs.gentoo.org/803923
+Signed-off-by: Sam James <sam at gentoo.org>
+---
+ configure.ac           | 1 +
+ util/ulockmgr_server.c | 6 ++++++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 9946a0efa..a2d481aa9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -55,6 +55,7 @@ fi
+ 
+ AC_CHECK_FUNCS([fork setxattr fdatasync splice vmsplice utimensat])
+ AC_CHECK_FUNCS([posix_fallocate])
++AC_CHECK_FUNCS([closefrom])
+ AC_CHECK_MEMBERS([struct stat.st_atim])
+ AC_CHECK_MEMBERS([struct stat.st_atimespec])
+ 
+diff --git a/util/ulockmgr_server.c b/util/ulockmgr_server.c
+index 273c7d923..a04dac5c6 100644
+--- a/util/ulockmgr_server.c
++++ b/util/ulockmgr_server.c
+@@ -22,6 +22,10 @@
+ #include <sys/socket.h>
+ #include <sys/wait.h>
+ 
++#ifdef HAVE_CONFIG_H
++	#include "config.h"
++#endif
++
+ struct message {
+ 	unsigned intr : 1;
+ 	unsigned nofd : 1;
+@@ -124,6 +128,7 @@ static int receive_message(int sock, void *buf, size_t buflen, int *fdp,
+ 	return res;
+ }
+ 
++#if !defined(HAVE_CLOSEFROM)
+ static int closefrom(int minfd)
+ {
+ 	DIR *dir = opendir("/proc/self/fd");
+@@ -141,6 +146,7 @@ static int closefrom(int minfd)
+ 	}
+ 	return 0;
+ }
++#endif
+ 
+ static void send_reply(int cfd, struct message *msg)
+ {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libfuse.git/commitdiff/fa0f08e97a0764db0d03b0c5ede90b56bfb476d2



More information about the pld-cvs-commit mailing list