diff options
| -rw-r--r-- | meta/recipes-connectivity/nfs-utils/nfs-utils/0001-reexport.h-Include-unistd.h-to-compile-with-musl.patch | 34 | ||||
| -rw-r--r-- | meta/recipes-connectivity/nfs-utils/nfs-utils/0001-support-include-junction.h-Define-macros-for-musl.patch | 46 | ||||
| -rw-r--r-- | meta/recipes-connectivity/nfs-utils/nfs-utils/0001-support-junction-path.c-Fix-build-for-musl.patch | 35 | ||||
| -rw-r--r-- | meta/recipes-connectivity/nfs-utils/nfs-utils/0001-tools-locktest-Use-intmax_t-to-print-off_t.patch | 53 | ||||
| -rw-r--r-- | meta/recipes-connectivity/nfs-utils/nfs-utils_2.7.1.bb (renamed from meta/recipes-connectivity/nfs-utils/nfs-utils_2.6.4.bb) | 8 |
5 files changed, 85 insertions, 91 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-reexport.h-Include-unistd.h-to-compile-with-musl.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-reexport.h-Include-unistd.h-to-compile-with-musl.patch deleted file mode 100644 index 57d4660571..0000000000 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-reexport.h-Include-unistd.h-to-compile-with-musl.patch +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | From 45597a58e98f351b18db8444292b1cf6dd0cd810 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
| 3 | Date: Sat, 9 Dec 2023 23:34:08 -0800 | ||
| 4 | Subject: [PATCH] reexport.h: Include unistd.h to compile with musl | ||
| 5 | |||
| 6 | Fixed error when compile with musl | ||
| 7 | reexport.c: In function 'reexpdb_init': | ||
| 8 | reexport.c:62:17: error: implicit declaration of function 'sleep' [-Werror=implicit-function-declaration] | ||
| 9 | 62 | sleep(1); | ||
| 10 | |||
| 11 | |||
| 12 | Upstream-Status: Submitted [https://marc.info/?l=linux-nfs&m=170254661824522&w=2] | ||
| 13 | |||
| 14 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
| 15 | --- | ||
| 16 | support/reexport/reexport.h | 1 + | ||
| 17 | 1 files changed, 1 insertions(+) | ||
| 18 | |||
| 19 | diff --git a/support/reexport/reexport.h b/support/reexport/reexport.h | ||
| 20 | index 85fd59c..02f8684 100644 | ||
| 21 | --- a/support/reexport/reexport.h | ||
| 22 | +++ b/support/reexport/reexport.h | ||
| 23 | @@ -1,6 +1,8 @@ | ||
| 24 | #ifndef REEXPORT_H | ||
| 25 | #define REEXPORT_H | ||
| 26 | |||
| 27 | +#include <unistd.h> | ||
| 28 | + | ||
| 29 | #include "nfslib.h" | ||
| 30 | |||
| 31 | enum { | ||
| 32 | -- | ||
| 33 | 2.42.0 | ||
| 34 | |||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-support-include-junction.h-Define-macros-for-musl.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-support-include-junction.h-Define-macros-for-musl.patch new file mode 100644 index 0000000000..c94990b969 --- /dev/null +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-support-include-junction.h-Define-macros-for-musl.patch | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | From 6f82ffa0e01e88e4e73972cb0125fcb6e78e27cf Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
| 3 | Date: Sun, 8 Sep 2024 09:45:41 +0000 | ||
| 4 | Subject: [PATCH] support/include/junction.h: Define macros for musl | ||
| 5 | |||
| 6 | Fixed 1: | ||
| 7 | In file included from cache.c:1217: | ||
| 8 | ../../support/include/junction.h:128:21: error: expected ';' before 'char' | ||
| 9 | 128 | __attribute_malloc__ | ||
| 10 | | ^ | ||
| 11 | | ; | ||
| 12 | 129 | char **nfs_dup_string_array(char **array); | ||
| 13 | |||
| 14 | Fixed 2: | ||
| 15 | junction.c: In function 'junction_set_sticky_bit': | ||
| 16 | junction.c:164:39: error: 'ALLPERMS' undeclared (first use in this function) | ||
| 17 | 164 | stb.st_mode &= (unsigned int)~ALLPERMS; | ||
| 18 | |||
| 19 | Upstream-Status: Submitted [https://marc.info/?l=linux-nfs&m=172579572428765&w=2] | ||
| 20 | |||
| 21 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
| 22 | --- | ||
| 23 | support/include/junction.h | 10 ++++++++++ | ||
| 24 | 1 file changed, 10 insertions(+) | ||
| 25 | |||
| 26 | diff --git a/support/include/junction.h b/support/include/junction.h | ||
| 27 | index 7257d80..d127dd5 100644 | ||
| 28 | --- a/support/include/junction.h | ||
| 29 | +++ b/support/include/junction.h | ||
| 30 | @@ -26,6 +26,16 @@ | ||
| 31 | #ifndef _NFS_JUNCTION_H_ | ||
| 32 | #define _NFS_JUNCTION_H_ | ||
| 33 | |||
| 34 | +/* For musl, refered to glibc's sys/cdefs.h */ | ||
| 35 | +#ifndef __attribute_malloc__ | ||
| 36 | +#define __attribute_malloc__ __attribute__((__malloc__)) | ||
| 37 | +#endif | ||
| 38 | + | ||
| 39 | +/* For musl, refered to glibc's sys/stat.h */ | ||
| 40 | +#ifndef ALLPERMS | ||
| 41 | +#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */ | ||
| 42 | +#endif | ||
| 43 | + | ||
| 44 | #include <stdint.h> | ||
| 45 | |||
| 46 | /* | ||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-support-junction-path.c-Fix-build-for-musl.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-support-junction-path.c-Fix-build-for-musl.patch new file mode 100644 index 0000000000..ae2b0c566c --- /dev/null +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-support-junction-path.c-Fix-build-for-musl.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From ad4ec0c40aaea37b8e7ec3e73d7b35cbda2d3841 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
| 3 | Date: Sun, 8 Sep 2024 08:34:28 +0000 | ||
| 4 | Subject: [PATCH] support/junction/path.c: Fix build for musl | ||
| 5 | |||
| 6 | Fixed: | ||
| 7 | path.c:164:24: error: implicit declaration of function 'strchrnul'; did you mean 'strchr'? [-Wimplicit-function-declaration] | ||
| 8 | [snip] | ||
| 9 | |||
| 10 | path.c:239:27: error: 'NAME_MAX' undeclared (first use in this function); did you mean 'AF_MAX'? | ||
| 11 | |||
| 12 | Upstream-Status: Submitted [https://marc.info/?l=linux-nfs&m=172579572228762&w=2] | ||
| 13 | |||
| 14 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
| 15 | --- | ||
| 16 | support/junction/path.c | 6 ++++++ | ||
| 17 | 1 file changed, 6 insertions(+) | ||
| 18 | |||
| 19 | diff --git a/support/junction/path.c b/support/junction/path.c | ||
| 20 | index c25cc52..6e28df3 100644 | ||
| 21 | --- a/support/junction/path.c | ||
| 22 | +++ b/support/junction/path.c | ||
| 23 | @@ -23,6 +23,12 @@ | ||
| 24 | * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt | ||
| 25 | */ | ||
| 26 | |||
| 27 | +/* For musl */ | ||
| 28 | +#ifndef _GNU_SOURCE | ||
| 29 | +#define _GNU_SOURCE | ||
| 30 | +#endif | ||
| 31 | +#include <limits.h> | ||
| 32 | + | ||
| 33 | #include <sys/types.h> | ||
| 34 | #include <sys/stat.h> | ||
| 35 | |||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-tools-locktest-Use-intmax_t-to-print-off_t.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-tools-locktest-Use-intmax_t-to-print-off_t.patch deleted file mode 100644 index 7d903e04bc..0000000000 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-tools-locktest-Use-intmax_t-to-print-off_t.patch +++ /dev/null | |||
| @@ -1,53 +0,0 @@ | |||
| 1 | From e2e9251dbeb452f5382179023d8ae18b511167a1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 25 Jul 2023 23:47:08 -0700 | ||
| 4 | Subject: [PATCH] tools/locktest: Use intmax_t to print off_t | ||
| 5 | |||
| 6 | off_t could be 64bit on 32bit architectures which means using %z printf | ||
| 7 | modifier is not enough to print it and compiler will complain about | ||
| 8 | format mismatch | ||
| 9 | |||
| 10 | Fixes | ||
| 11 | | testlk.c:84:66: error: format '%zd' expects argument of type 'signed size_t', but argument 4 has type '__off64_t' {aka 'long long int'} [-Werror=format=] | ||
| 12 | | 84 | printf("%s: conflicting lock by %d on (%zd;%zd)\n", | ||
| 13 | | | ~~^ | ||
| 14 | | | | | ||
| 15 | | | int | ||
| 16 | | | %lld | ||
| 17 | | 85 | fname, fl.l_pid, fl.l_start, fl.l_len); | ||
| 18 | | | ~~~~~~~~~~ | ||
| 19 | | | | | ||
| 20 | | | __off64_t {aka long long int} | ||
| 21 | |||
| 22 | Upstream-Status: Submitted [https://marc.info/?l=linux-nfs&m=169035457128067&w=2] | ||
| 23 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 24 | --- | ||
| 25 | tools/locktest/testlk.c | 5 +++-- | ||
| 26 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
| 27 | |||
| 28 | diff --git a/tools/locktest/testlk.c b/tools/locktest/testlk.c | ||
| 29 | index ea51f788..9d4c88c4 100644 | ||
| 30 | --- a/tools/locktest/testlk.c | ||
| 31 | +++ b/tools/locktest/testlk.c | ||
| 32 | @@ -2,6 +2,7 @@ | ||
| 33 | #include <config.h> | ||
| 34 | #endif | ||
| 35 | |||
| 36 | +#include <stdint.h> | ||
| 37 | #include <stdlib.h> | ||
| 38 | #include <stdio.h> | ||
| 39 | #include <unistd.h> | ||
| 40 | @@ -81,8 +82,8 @@ main(int argc, char **argv) | ||
| 41 | if (fl.l_type == F_UNLCK) { | ||
| 42 | printf("%s: no conflicting lock\n", fname); | ||
| 43 | } else { | ||
| 44 | - printf("%s: conflicting lock by %d on (%zd;%zd)\n", | ||
| 45 | - fname, fl.l_pid, fl.l_start, fl.l_len); | ||
| 46 | + printf("%s: conflicting lock by %d on (%jd;%jd)\n", | ||
| 47 | + fname, fl.l_pid, (intmax_t)fl.l_start, (intmax_t)fl.l_len); | ||
| 48 | } | ||
| 49 | return 0; | ||
| 50 | } | ||
| 51 | -- | ||
| 52 | 2.41.0 | ||
| 53 | |||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.6.4.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.7.1.bb index 9aa8bc4eab..849ea0e43b 100644 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.6.4.bb +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.7.1.bb | |||
| @@ -8,7 +8,7 @@ LICENSE = "MIT & GPL-2.0-or-later & BSD-3-Clause" | |||
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84" | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84" |
| 9 | 9 | ||
| 10 | # util-linux for libblkid | 10 | # util-linux for libblkid |
| 11 | DEPENDS = "libcap libevent util-linux sqlite3 libtirpc" | 11 | DEPENDS = "libcap libevent util-linux sqlite3 libtirpc libxml2" |
| 12 | RDEPENDS:${PN} = "${PN}-client" | 12 | RDEPENDS:${PN} = "${PN}-client" |
| 13 | RRECOMMENDS:${PN} = "kernel-module-nfsd" | 13 | RRECOMMENDS:${PN} = "kernel-module-nfsd" |
| 14 | 14 | ||
| @@ -31,10 +31,10 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x | |||
| 31 | file://0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch \ | 31 | file://0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch \ |
| 32 | file://clang-warnings.patch \ | 32 | file://clang-warnings.patch \ |
| 33 | file://0001-locktest-Makefile.am-Do-not-use-build-flags.patch \ | 33 | file://0001-locktest-Makefile.am-Do-not-use-build-flags.patch \ |
| 34 | file://0001-tools-locktest-Use-intmax_t-to-print-off_t.patch \ | 34 | file://0001-support-include-junction.h-Define-macros-for-musl.patch \ |
| 35 | file://0001-reexport.h-Include-unistd.h-to-compile-with-musl.patch \ | 35 | file://0001-support-junction-path.c-Fix-build-for-musl.patch \ |
| 36 | " | 36 | " |
| 37 | SRC_URI[sha256sum] = "01b3b0fb9c7d0bbabf5114c736542030748c788ec2fd9734744201e9b0a1119d" | 37 | SRC_URI[sha256sum] = "885c948a84a58bca4148f459588f9a7369dbb40dcc466f04e455c6b10fd0aa48" |
| 38 | 38 | ||
| 39 | # Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will | 39 | # Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will |
| 40 | # pull in the remainder of the dependencies. | 40 | # pull in the remainder of the dependencies. |
