diff options
author | Ross Burton <ross.burton@arm.com> | 2025-06-09 12:19:45 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-06-09 17:43:42 +0100 |
commit | bc9d4c7d6b6dda7c51b99365d186228297292e45 (patch) | |
tree | 2d85b9f7dc124c24006ac496a291a52f41142984 | |
parent | 872edf1865cb3677d7fd5ea52d2a972b7451d1e9 (diff) | |
download | poky-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.patch | 28 | ||||
-rw-r--r-- | meta/recipes-devtools/unfs3/unfs3/0001-attr-fix-utime-for-symlink.patch | 88 | ||||
-rw-r--r-- | meta/recipes-devtools/unfs3/unfs3/0001-daemon.c-Fix-race-window-for-writing-of-the-pid-file.patch | 68 | ||||
-rw-r--r-- | meta/recipes-devtools/unfs3/unfs3/0001-fix-building-on-macOS.patch | 27 | ||||
-rw-r--r-- | meta/recipes-devtools/unfs3/unfs3/0001-locate.c-Include-attr.h.patch | 28 | ||||
-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 @@ | |||
1 | From 949db882e487d728c44bb68139682b38396dd275 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 14 Dec 2022 14:50:10 -0800 | ||
4 | Subject: [PATCH] Alias off64_t to off_t on linux if not defined | ||
5 | |||
6 | Musl C library does not define off64_t and has 64-bit default off_t | ||
7 | therefore define off64_t as an alias on linux as well when configure | ||
8 | detects that off64_t is not provided by a linux system | ||
9 | |||
10 | Upstream-Status: Submitted [https://github.com/unfs3/unfs3/pull/29] | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | nfs.h | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/nfs.h b/nfs.h | ||
17 | index 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 @@ | |||
1 | From 7e789895919d57d573ebb8faa147d1286104cd01 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rui Wang <rui.wang@windriver.com> | ||
3 | Date: Mon, 24 Apr 2023 02:57:57 -0700 | ||
4 | Subject: [PATCH] attr: fix utime for symlink | ||
5 | |||
6 | unfs3 has an old defect that it can not change the timestamps of a | ||
7 | symlink file because it only uses utime(), which will follow the | ||
8 | symlink. This will not cause an error if the symlink points to an | ||
9 | existent file. But under some special situation, such as installing | ||
10 | a rpm package, rpm tool will create the symlink first and try to | ||
11 | modify the timestamps of it, when the target file is non-existent. | ||
12 | This will cause an ESTALE error. Making rpm tool ignore this error | ||
13 | is a solution, but not the best one. An acceptable approach is | ||
14 | Making unfs3 support lutimes(), which can modify the symlink file | ||
15 | itself. Considering not every system support this function, so a | ||
16 | function checking is necessary. | ||
17 | |||
18 | Upstream-Status: Submitted [https://github.com/unfs3/unfs3/pull/35] | ||
19 | |||
20 | Signed-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 | |||
27 | diff --git a/attr.c b/attr.c | ||
28 | index 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 | } | ||
61 | diff --git a/backend_unix.h b/backend_unix.h | ||
62 | index 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 | ||
74 | diff --git a/configure.ac b/configure.ac | ||
75 | index 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 | -- | ||
87 | 2.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 @@ | |||
1 | From 212a947e776e7a25c1f2259615f461179bcb3663 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Wed, 23 Nov 2022 21:38:38 +0100 | ||
4 | Subject: [PATCH] daemon.c: Fix race window for writing of the pid file | ||
5 | |||
6 | The parent process should write the pid file such that the pid file | ||
7 | will can be checked immediately following exit of the fork from the | ||
8 | parent. | ||
9 | |||
10 | This allows external monitoring applications to watch the daemon | ||
11 | without having to add sleep calls to wait for the pid file be written | ||
12 | on a busy system. | ||
13 | |||
14 | Upstream-Status: Submitted [https://github.com/unfs3/unfs3/pull/28] | ||
15 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | ||
16 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
17 | --- | ||
18 | daemon.c | 12 +++++++++--- | ||
19 | 1 file changed, 9 insertions(+), 3 deletions(-) | ||
20 | |||
21 | diff --git a/daemon.c b/daemon.c | ||
22 | index 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 | -- | ||
67 | 2.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 @@ | |||
1 | From 989b87ae46b3183a742031373fbb3e912ab9b666 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrey Filipenkov <decapitator@ukr.net> | ||
3 | Date: Wed, 2 Nov 2022 13:38:40 +0300 | ||
4 | Subject: [PATCH] fix building on macOS | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | Upstream-Status: Backport [https://github.com/unfs3/unfs3/commit/989b87ae46b3183a742031373fbb3e912ab9b666] | ||
8 | --- | ||
9 | attr.c | 2 ++ | ||
10 | 1 file changed, 2 insertions(+) | ||
11 | |||
12 | diff --git a/attr.c b/attr.c | ||
13 | index 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 | -- | ||
26 | 2.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 @@ | |||
1 | From 63e0785bb379a8f2c41f34f5cd938ca38555e605 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 13 Jan 2023 23:41:01 -0800 | ||
4 | Subject: [PATCH] locate.c: Include attr.h | ||
5 | |||
6 | Its needed for fix_dir_times() API declarations | ||
7 | |||
8 | Upstream-Status: Submitted [https://github.com/unfs3/unfs3/pull/32] | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | locate.c | 1 + | ||
12 | 1 file changed, 1 insertion(+) | ||
13 | |||
14 | diff --git a/locate.c b/locate.c | ||
15 | index 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 | -- | ||
27 | 2.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." | |||
5 | HOMEPAGE = "https://github.com/unfs3/unfs3" | 5 | HOMEPAGE = "https://github.com/unfs3/unfs3" |
6 | SECTION = "console/network" | 6 | SECTION = "console/network" |
7 | LICENSE = "BSD-3-Clause" | 7 | LICENSE = "BSD-3-Clause" |
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=9475885294e17c0cc0067820d042792e" | 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c1c621cd2786a3a1344a60a0d608c910" |
9 | 9 | ||
10 | DEPENDS = "flex-native bison-native flex libtirpc" | 10 | DEPENDS = "bison-native flex-native libtirpc" |
11 | 11 | ||
12 | S = "${WORKDIR}/git" | 12 | S = "${WORKDIR}/git" |
13 | SRC_URI = "git://github.com/unfs3/unfs3.git;protocol=https;branch=master \ | 13 | SRC_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 \ | 14 | SRCREV = "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 | " | ||
20 | SRCREV = "c8f2d2cd4529955419bad0e163f88d47ff176b8d" | ||
21 | UPSTREAM_CHECK_GITTAGREGEX = "unfs3\-(?P<pver>\d+(\.\d+)+)" | 15 | UPSTREAM_CHECK_GITTAGREGEX = "unfs3\-(?P<pver>\d+(\.\d+)+)" |
22 | 16 | ||
23 | BBCLASSEXTEND = "native nativesdk" | ||
24 | |||
25 | inherit autotools pkgconfig | 17 | inherit autotools pkgconfig |
18 | |||
26 | EXTRA_OECONF:append:class-native = " --sbindir=${bindir}" | 19 | EXTRA_OECONF:append:class-native = " --sbindir=${bindir}" |
20 | |||
21 | BBCLASSEXTEND = "native nativesdk" | ||