Switch to new download format, update dependencies and source.sh script
This commit is contained in:
@@ -1,9 +1,18 @@
|
|||||||
name: fuse2
|
name: fuse2
|
||||||
description: The reference implementation of the Linux FUSE (Filesystem in Userspace) interface
|
description: The reference implementation of the Linux FUSE (Filesystem in Userspace) interface
|
||||||
version: 2.9.9
|
version: 2.9.9
|
||||||
|
revision: 2
|
||||||
url: https://github.com/libfuse/libfuse
|
url: https://github.com/libfuse/libfuse
|
||||||
license: GPL2,LGPL2.1
|
license: GPL2,LGPL2.1
|
||||||
architecture: any
|
architecture: any
|
||||||
depends: ["glibc"]
|
|
||||||
make_depends: ["pkgconf"]
|
|
||||||
type: source
|
type: source
|
||||||
|
depends:
|
||||||
|
- fuse-common
|
||||||
|
- glibc
|
||||||
|
make_depends:
|
||||||
|
- pkgconf
|
||||||
|
downloads:
|
||||||
|
- url: https://github.com/libfuse/libfuse/releases/download/fuse-${BPM_PKG_VERSION}/fuse-${BPM_PKG_VERSION}.tar.gz
|
||||||
|
extract_to: ${BPM_SOURCE}
|
||||||
|
extract_strip_components: 1
|
||||||
|
checksum: d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7c1b4b5
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
From ae2352bca9b4e607538412da0cc2a9625cd8b692 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sam James <[email protected]>
|
||||||
|
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 <[email protected]>
|
||||||
|
---
|
||||||
|
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)
|
||||||
|
{
|
||||||
@@ -2,21 +2,14 @@
|
|||||||
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
||||||
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||||
|
|
||||||
DOWNLOAD="https://github.com/libfuse/libfuse/releases/download/fuse-${BPM_PKG_VERSION}/fuse-${BPM_PKG_VERSION}.tar.gz"
|
|
||||||
DOWNLOAD_PATCH="https://github.com/libfuse/libfuse/commit/ae2352bca9b4e607538412da0cc2a9625cd8b692.patch"
|
|
||||||
FILENAME="${DOWNLOAD##*/}"
|
|
||||||
FILENAME_PATCH="${DOWNLOAD_PATCH##*/}"
|
|
||||||
|
|
||||||
# The prepare function is executed in the root of the temp directory
|
# The prepare function is executed in the root of the temp directory
|
||||||
# This function is used for downloading files and putting them into the correct location
|
# This function is used for putting downloaded files to the correct location or applying patches
|
||||||
prepare() {
|
prepare() {
|
||||||
wget "$DOWNLOAD"
|
|
||||||
wget "$DOWNLOAD_PATCH"
|
|
||||||
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE"
|
|
||||||
|
|
||||||
cd "$BPM_SOURCE"
|
cd "$BPM_SOURCE"
|
||||||
patch -Np1 -i "$BPM_WORKDIR"/"$FILENAME_PATCH"
|
# Fix building with glibc 2.34+
|
||||||
autoreconf -i
|
patch -Np1 -i "$BPM_WORKDIR"/conditionally-define-closefrom.patch
|
||||||
|
|
||||||
|
autoreconf -fi -I /usr/share/gettext/m4
|
||||||
}
|
}
|
||||||
|
|
||||||
# The build function is executed in the source directory
|
# The build function is executed in the source directory
|
||||||
@@ -25,12 +18,18 @@ build() {
|
|||||||
UDEV_RULES_PATH=/usr/lib/udev/rules.d MOUNT_FUSE_PATH=/usr/bin ./configure --prefix=/usr --enable-lib --enable-util --disable-example
|
UDEV_RULES_PATH=/usr/lib/udev/rules.d MOUNT_FUSE_PATH=/usr/bin ./configure --prefix=/usr --enable-lib --enable-util --disable-example
|
||||||
make
|
make
|
||||||
}
|
}
|
||||||
|
|
||||||
# The package function is executed in the source directory
|
# The package function is executed in the source directory
|
||||||
# This function is used to move the compiled files into the output directory
|
# This function is used to move the compiled files into the output directory
|
||||||
package() {
|
package() {
|
||||||
make DESTDIR="$BPM_OUTPUT" install
|
make DESTDIR="$BPM_OUTPUT" install
|
||||||
|
|
||||||
|
# Remove bootscript
|
||||||
rm -r "$BPM_OUTPUT"/etc/init.d
|
rm -r "$BPM_OUTPUT"/etc/init.d
|
||||||
|
|
||||||
|
# Remove dev directory
|
||||||
rm -r "$BPM_OUTPUT"/dev
|
rm -r "$BPM_OUTPUT"/dev
|
||||||
|
|
||||||
|
# Install package licenses
|
||||||
install -Dm644 "$BPM_SOURCE"/COPYING{,.LIB} -t "$BPM_OUTPUT"/usr/share/licenses/fuse2/
|
install -Dm644 "$BPM_SOURCE"/COPYING{,.LIB} -t "$BPM_OUTPUT"/usr/share/licenses/fuse2/
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user