summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2025-06-09 12:19:45 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-06-09 17:43:42 +0100
commitbc9d4c7d6b6dda7c51b99365d186228297292e45 (patch)
tree2d85b9f7dc124c24006ac496a291a52f41142984
parent872edf1865cb3677d7fd5ea52d2a972b7451d1e9 (diff)
downloadpoky-bc9d4c7d6b6dda7c51b99365d186228297292e45.tar.gz
unfs3: upgrade to 0.11
Drop all of the patches that have been merged upstream. The build no longer needs the flex runtime library so remove flex from DEPENDS. License-Update: contributor list updated. (From OE-Core rev: 3370ef98b6fe74b56b9e6b42b915a536195094cd) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/unfs3/unfs3/0001-Alias-off64_t-to-off_t-on-linux-if-not-defined.patch28
-rw-r--r--meta/recipes-devtools/unfs3/unfs3/0001-attr-fix-utime-for-symlink.patch88
-rw-r--r--meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Fix-race-window-for-writing-of-the-pid-file.patch68
-rw-r--r--meta/recipes-devtools/unfs3/unfs3/0001-fix-building-on-macOS.patch27
-rw-r--r--meta/recipes-devtools/unfs3/unfs3/0001-locate.c-Include-attr.h.patch28
-rw-r--r--meta/recipes-devtools/unfs3/unfs3_0.11.0.bb (renamed from meta/recipes-devtools/unfs3/unfs3_0.10.0.bb)19
6 files changed, 7 insertions, 251 deletions
diff --git a/meta/recipes-devtools/unfs3/unfs3/0001-Alias-off64_t-to-off_t-on-linux-if-not-defined.patch b/meta/recipes-devtools/unfs3/unfs3/0001-Alias-off64_t-to-off_t-on-linux-if-not-defined.patch
deleted file mode 100644
index 91909fa236..0000000000
--- a/meta/recipes-devtools/unfs3/unfs3/0001-Alias-off64_t-to-off_t-on-linux-if-not-defined.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From 949db882e487d728c44bb68139682b38396dd275 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 14 Dec 2022 14:50:10 -0800
4Subject: [PATCH] Alias off64_t to off_t on linux if not defined
5
6Musl C library does not define off64_t and has 64-bit default off_t
7therefore define off64_t as an alias on linux as well when configure
8detects that off64_t is not provided by a linux system
9
10Upstream-Status: Submitted [https://github.com/unfs3/unfs3/pull/29]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 nfs.h | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/nfs.h b/nfs.h
17index aded011..7996c67 100644
18--- a/nfs.h
19+++ b/nfs.h
20@@ -62,7 +62,7 @@ typedef int32_t int32;
21 #endif
22
23 #ifndef HAVE_OFF64_T
24-#ifdef __APPLE__
25+#if defined(__APPLE__) || defined(__linux__)
26 typedef off_t off64_t;
27 #endif
28 #endif
diff --git a/meta/recipes-devtools/unfs3/unfs3/0001-attr-fix-utime-for-symlink.patch b/meta/recipes-devtools/unfs3/unfs3/0001-attr-fix-utime-for-symlink.patch
deleted file mode 100644
index a0f3740d6a..0000000000
--- a/meta/recipes-devtools/unfs3/unfs3/0001-attr-fix-utime-for-symlink.patch
+++ /dev/null
@@ -1,88 +0,0 @@
1From 7e789895919d57d573ebb8faa147d1286104cd01 Mon Sep 17 00:00:00 2001
2From: Rui Wang <rui.wang@windriver.com>
3Date: Mon, 24 Apr 2023 02:57:57 -0700
4Subject: [PATCH] attr: fix utime for symlink
5
6unfs3 has an old defect that it can not change the timestamps of a
7symlink file because it only uses utime(), which will follow the
8symlink. This will not cause an error if the symlink points to an
9existent file. But under some special situation, such as installing
10a rpm package, rpm tool will create the symlink first and try to
11modify the timestamps of it, when the target file is non-existent.
12This will cause an ESTALE error. Making rpm tool ignore this error
13is a solution, but not the best one. An acceptable approach is
14Making unfs3 support lutimes(), which can modify the symlink file
15itself. Considering not every system support this function, so a
16function checking is necessary.
17
18Upstream-Status: Submitted [https://github.com/unfs3/unfs3/pull/35]
19
20Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
21---
22 attr.c | 15 +++++++++++----
23 backend_unix.h | 2 ++
24 configure.ac | 1 +
25 3 files changed, 14 insertions(+), 4 deletions(-)
26
27diff --git a/attr.c b/attr.c
28index 0ce9375..930ce6e 100644
29--- a/attr.c
30+++ b/attr.c
31@@ -285,7 +285,7 @@ post_op_attr get_post_cached(struct svc_req * req)
32 static nfsstat3 set_time(const char *path, backend_statstruct buf, sattr3 new)
33 {
34 time_t new_atime, new_mtime;
35- struct utimbuf utim;
36+ struct timeval stamps[2];
37 int res;
38
39 /* set atime and mtime */
40@@ -307,10 +307,17 @@ static nfsstat3 set_time(const char *path, backend_statstruct buf, sattr3 new)
41 else /* DONT_CHANGE */
42 new_mtime = buf.st_mtime;
43
44- utim.actime = new_atime;
45- utim.modtime = new_mtime;
46+ stamps[0].tv_sec = new_atime;
47+ stamps[0].tv_usec = 0;
48+ stamps[1].tv_sec = new_mtime;
49+ stamps[1].tv_usec = 0;
50+
51+#if HAVE_LUTIMES
52+ res = backend_lutimes(path, stamps);
53+#else
54+ res = backend_utimes(path, stamps);
55+#endif
56
57- res = backend_utime(path, &utim);
58 if (res == -1)
59 return setattr_err();
60 }
61diff --git a/backend_unix.h b/backend_unix.h
62index 4db72ae..9cce9ab 100644
63--- a/backend_unix.h
64+++ b/backend_unix.h
65@@ -61,6 +61,8 @@
66 #define backend_symlink symlink
67 #define backend_truncate truncate
68 #define backend_utime utime
69+#define backend_utimes utimes
70+#define backend_lutimes lutimes
71 #define backend_statstruct struct stat
72 #define backend_dirstream DIR
73 #define backend_statvfsstruct struct statvfs
74diff --git a/configure.ac b/configure.ac
75index d46c905..c21afe3 100644
76--- a/configure.ac
77+++ b/configure.ac
78@@ -32,6 +32,7 @@ AC_CHECK_FUNCS(setresuid setresgid)
79 AC_CHECK_FUNCS(vsyslog)
80 AC_CHECK_FUNCS(lchown)
81 AC_CHECK_FUNCS(setgroups)
82+AC_CHECK_FUNCS(lutimes)
83 UNFS3_COMPILE_WARNINGS
84
85 PKG_CHECK_MODULES([TIRPC], [libtirpc])
86--
872.40.0
88
diff --git a/meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Fix-race-window-for-writing-of-the-pid-file.patch b/meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Fix-race-window-for-writing-of-the-pid-file.patch
deleted file mode 100644
index 20bbee90a0..0000000000
--- a/meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Fix-race-window-for-writing-of-the-pid-file.patch
+++ /dev/null
@@ -1,68 +0,0 @@
1From 212a947e776e7a25c1f2259615f461179bcb3663 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Wed, 23 Nov 2022 21:38:38 +0100
4Subject: [PATCH] daemon.c: Fix race window for writing of the pid file
5
6The parent process should write the pid file such that the pid file
7will can be checked immediately following exit of the fork from the
8parent.
9
10This allows external monitoring applications to watch the daemon
11without having to add sleep calls to wait for the pid file be written
12on a busy system.
13
14Upstream-Status: Submitted [https://github.com/unfs3/unfs3/pull/28]
15Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
16Signed-off-by: Alexander Kanavin <alex@linutronix.de>
17---
18 daemon.c | 12 +++++++++---
19 1 file changed, 9 insertions(+), 3 deletions(-)
20
21diff --git a/daemon.c b/daemon.c
22index ff53b7a..13b06a4 100644
23--- a/daemon.c
24+++ b/daemon.c
25@@ -166,7 +166,7 @@ int get_socket_type(struct svc_req *rqstp)
26 /*
27 * write current pid to a file
28 */
29-static void create_pid_file(void)
30+static void create_pid_file(int pid)
31 {
32 char buf[16];
33 int fd, res, len;
34@@ -188,7 +188,7 @@ static void create_pid_file(void)
35 }
36 #endif
37
38- sprintf(buf, "%i\n", backend_getpid());
39+ sprintf(buf, "%i\n", pid);
40 len = strlen(buf);
41
42 res = backend_pwrite(fd, buf, len, 0);
43@@ -1122,6 +1122,10 @@ int main(int argc, char **argv)
44 fprintf(stderr, "could not fork into background\n");
45 daemon_exit(0);
46 }
47+ if (pid)
48+ create_pid_file(pid);
49+ } else {
50+ create_pid_file(backend_getpid());
51 }
52 #endif /* WIN32 */
53
54@@ -1161,8 +1165,10 @@ int main(int argc, char **argv)
55 /* no umask to not screw up create modes */
56 umask(0);
57
58+#ifdef WIN32
59 /* create pid file if wanted */
60- create_pid_file();
61+ create_pid_file(backend_getpid());
62+#endif
63
64 /* initialize internal stuff */
65 fh_cache_init();
66--
672.30.2
68
diff --git a/meta/recipes-devtools/unfs3/unfs3/0001-fix-building-on-macOS.patch b/meta/recipes-devtools/unfs3/unfs3/0001-fix-building-on-macOS.patch
deleted file mode 100644
index f18ffd3711..0000000000
--- a/meta/recipes-devtools/unfs3/unfs3/0001-fix-building-on-macOS.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From 989b87ae46b3183a742031373fbb3e912ab9b666 Mon Sep 17 00:00:00 2001
2From: Andrey Filipenkov <decapitator@ukr.net>
3Date: Wed, 2 Nov 2022 13:38:40 +0300
4Subject: [PATCH] fix building on macOS
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7Upstream-Status: Backport [https://github.com/unfs3/unfs3/commit/989b87ae46b3183a742031373fbb3e912ab9b666]
8---
9 attr.c | 2 ++
10 1 file changed, 2 insertions(+)
11
12diff --git a/attr.c b/attr.c
13index 6253e84..0ce9375 100644
14--- a/attr.c
15+++ b/attr.c
16@@ -18,6 +18,8 @@
17 #include <utime.h>
18 #include <errno.h>
19 #include <dirent.h>
20+#include <stdlib.h>
21+#include <string.h>
22
23 #include "backend.h"
24 #include "nfs.h"
25--
262.39.1
27
diff --git a/meta/recipes-devtools/unfs3/unfs3/0001-locate.c-Include-attr.h.patch b/meta/recipes-devtools/unfs3/unfs3/0001-locate.c-Include-attr.h.patch
deleted file mode 100644
index 076e08fadc..0000000000
--- a/meta/recipes-devtools/unfs3/unfs3/0001-locate.c-Include-attr.h.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From 63e0785bb379a8f2c41f34f5cd938ca38555e605 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 13 Jan 2023 23:41:01 -0800
4Subject: [PATCH] locate.c: Include attr.h
5
6Its needed for fix_dir_times() API declarations
7
8Upstream-Status: Submitted [https://github.com/unfs3/unfs3/pull/32]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 locate.c | 1 +
12 1 file changed, 1 insertion(+)
13
14diff --git a/locate.c b/locate.c
15index 6bbe71f..84e0fe5 100644
16--- a/locate.c
17+++ b/locate.c
18@@ -27,6 +27,7 @@
19 #include "nfs.h"
20 #include "fh.h"
21 #include "daemon.h"
22+#include "attr.h"
23
24 /*
25 * these are the brute-force file searching routines that are used
26--
272.39.0
28
diff --git a/meta/recipes-devtools/unfs3/unfs3_0.10.0.bb b/meta/recipes-devtools/unfs3/unfs3_0.11.0.bb
index d5c2a03371..da5ca45277 100644
--- a/meta/recipes-devtools/unfs3/unfs3_0.10.0.bb
+++ b/meta/recipes-devtools/unfs3/unfs3_0.11.0.bb
@@ -5,22 +5,17 @@ are used by NFS clients for accessing files on the server."
5HOMEPAGE = "https://github.com/unfs3/unfs3" 5HOMEPAGE = "https://github.com/unfs3/unfs3"
6SECTION = "console/network" 6SECTION = "console/network"
7LICENSE = "BSD-3-Clause" 7LICENSE = "BSD-3-Clause"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=9475885294e17c0cc0067820d042792e" 8LIC_FILES_CHKSUM = "file://LICENSE;md5=c1c621cd2786a3a1344a60a0d608c910"
9 9
10DEPENDS = "flex-native bison-native flex libtirpc" 10DEPENDS = "bison-native flex-native libtirpc"
11 11
12S = "${WORKDIR}/git" 12S = "${WORKDIR}/git"
13SRC_URI = "git://github.com/unfs3/unfs3.git;protocol=https;branch=master \ 13SRC_URI = "git://github.com/unfs3/unfs3.git;protocol=https;branch=master;tag=${BP}"
14 file://0001-daemon.c-Fix-race-window-for-writing-of-the-pid-file.patch \ 14SRCREV = "ec1660ba33c80d5c67131e163e68834c1a10e243"
15 file://0001-Alias-off64_t-to-off_t-on-linux-if-not-defined.patch \
16 file://0001-locate.c-Include-attr.h.patch \
17 file://0001-fix-building-on-macOS.patch \
18 file://0001-attr-fix-utime-for-symlink.patch \
19 "
20SRCREV = "c8f2d2cd4529955419bad0e163f88d47ff176b8d"
21UPSTREAM_CHECK_GITTAGREGEX = "unfs3\-(?P<pver>\d+(\.\d+)+)" 15UPSTREAM_CHECK_GITTAGREGEX = "unfs3\-(?P<pver>\d+(\.\d+)+)"
22 16
23BBCLASSEXTEND = "native nativesdk"
24
25inherit autotools pkgconfig 17inherit autotools pkgconfig
18
26EXTRA_OECONF:append:class-native = " --sbindir=${bindir}" 19EXTRA_OECONF:append:class-native = " --sbindir=${bindir}"
20
21BBCLASSEXTEND = "native nativesdk"