diff options
Diffstat (limited to 'meta/recipes-extended/quota')
-rw-r--r-- | meta/recipes-extended/quota/quota/0001-Fix-building-on-musl.patch | 228 | ||||
-rw-r--r-- | meta/recipes-extended/quota/quota/0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch | 34 | ||||
-rw-r--r-- | meta/recipes-extended/quota/quota/fcntl.patch | 71 | ||||
-rw-r--r-- | meta/recipes-extended/quota/quota_4.09.bb (renamed from meta/recipes-extended/quota/quota_4.06.bb) | 9 |
4 files changed, 232 insertions, 110 deletions
diff --git a/meta/recipes-extended/quota/quota/0001-Fix-building-on-musl.patch b/meta/recipes-extended/quota/quota/0001-Fix-building-on-musl.patch new file mode 100644 index 0000000000..ce20f672cc --- /dev/null +++ b/meta/recipes-extended/quota/quota/0001-Fix-building-on-musl.patch @@ -0,0 +1,228 @@ +From e73c5b48e12c3f02e532864a1107cdc8a4feafc3 Mon Sep 17 00:00:00 2001 +From: Brahmajit Das <brahmajit.xyz@gmail.com> +Date: Sun, 14 Jul 2024 07:58:50 +0000 +Subject: [PATCH] Fix building on musl + +basename(3) is defined in libgen.h in MUSL. Include libgen.h where +basename(3) is used. + +Upstream-Status: Backport [https://sourceforge.net/p/linuxquota/code/ci/e73c5b48e12c3f02e532864a1107cdc8a4feafc3/] +Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> +Signed-off-by: Jan Kara <jack@suse.cz> +--- + convertquota.c | 1 + + edquota.c | 11 ++++++----- + quota.c | 1 + + quota_nld.c | 1 + + quotacheck.c | 1 + + quotaon.c | 1 + + quotastats.c | 1 + + quotasync.c | 1 + + repquota.c | 1 + + rquota_svc.c | 1 + + setquota.c | 1 + + warnquota.c | 1 + + xqmstats.c | 1 + + 13 files changed, 18 insertions(+), 5 deletions(-) + +diff --git a/convertquota.c b/convertquota.c +index 6c8a553..4eb05ed 100644 +--- a/convertquota.c ++++ b/convertquota.c +@@ -14,6 +14,7 @@ + #include <fcntl.h> + #include <errno.h> + #include <getopt.h> ++#include <libgen.h> + + #include <endian.h> + +diff --git a/edquota.c b/edquota.c +index 20ca306..c5b27cf 100644 +--- a/edquota.c ++++ b/edquota.c +@@ -20,6 +20,7 @@ + #include <stdlib.h> + #include <fcntl.h> + #include <getopt.h> ++#include <libgen.h> + + #include "pot.h" + #include "quotaops.h" +@@ -38,7 +39,7 @@ char *progname; + static int flags, quotatype; + static int fmt = -1; + static char *protoname; +-static char *dirname; ++static char *dir_name; + + static void usage(void) + { +@@ -138,7 +139,7 @@ static int parse_options(int argc, char **argv) + exit(1); + break; + case 'f': +- dirname = optarg; ++ dir_name = optarg; + break; + case 256: + flags |= FL_NUMNAMES; +@@ -176,7 +177,7 @@ static void copy_prototype(int argc, char **argv, struct quota_handle **handles) + protoprivs = getprivs(protoid, handles, 0); + while (argc-- > 0) { + id = name2id(*argv, quotatype, !!(flags & FL_NUMNAMES), NULL); +- curprivs = getprivs(id, handles, !dirname); ++ curprivs = getprivs(id, handles, !dir_name); + if (!curprivs) + die(1, _("Cannot get quota information for user %s\n"), *argv); + argv++; +@@ -223,7 +224,7 @@ int main(int argc, char **argv) + argv += ret; + + init_kernel_interface(); +- handles = create_handle_list(dirname ? 1 : 0, dirname ? &dirname : NULL, quotatype, fmt, ++ handles = create_handle_list(dir_name ? 1 : 0, dir_name ? &dir_name : NULL, quotatype, fmt, + (flags & FL_NO_MIXED_PATHS) ? 0 : IOI_NFS_MIXED_PATHS, + (flags & FL_REMOTE) ? 0 : MS_LOCALONLY); + if (!handles[0]) { +@@ -296,7 +297,7 @@ int main(int argc, char **argv) + else { + for (; argc > 0; argc--, argv++) { + id = name2id(*argv, quotatype, !!(flags & FL_NUMNAMES), NULL); +- curprivs = getprivs(id, handles, !dirname); ++ curprivs = getprivs(id, handles, !dir_name); + if (!curprivs) + die(1, _("Cannot get quota information for user %s.\n"), *argv); + if (flags & FL_EDIT_TIMES) { +diff --git a/quota.c b/quota.c +index a60de12..66b0fa3 100644 +--- a/quota.c ++++ b/quota.c +@@ -20,6 +20,7 @@ + #include <unistd.h> + #include <limits.h> + #include <ctype.h> ++#include <libgen.h> + #ifdef RPC + #include <rpc/rpc.h> + #include "rquota.h" +diff --git a/quota_nld.c b/quota_nld.c +index 58a62af..710b556 100644 +--- a/quota_nld.c ++++ b/quota_nld.c +@@ -26,6 +26,7 @@ + #include <fcntl.h> + #include <limits.h> + #include <signal.h> ++#include <libgen.h> + #include <sys/stat.h> + #include <asm/types.h> + +diff --git a/quotacheck.c b/quotacheck.c +index e2c3bbd..fa1d297 100644 +--- a/quotacheck.c ++++ b/quotacheck.c +@@ -19,6 +19,7 @@ + #include <unistd.h> + #include <stdlib.h> + #include <errno.h> ++#include <libgen.h> + + #include <sys/stat.h> + #include <sys/types.h> +diff --git a/quotaon.c b/quotaon.c +index 351c851..17b6bcc 100644 +--- a/quotaon.c ++++ b/quotaon.c +@@ -13,6 +13,7 @@ + #include <string.h> + #include <stdlib.h> + #include <stdarg.h> ++#include <libgen.h> + + #include "quotaon.h" + #include "quota.h" +diff --git a/quotastats.c b/quotastats.c +index a059812..4076a7d 100644 +--- a/quotastats.c ++++ b/quotastats.c +@@ -24,6 +24,7 @@ + #include <errno.h> + #include <string.h> + #include <signal.h> ++#include <libgen.h> + + #include "pot.h" + #include "common.h" +diff --git a/quotasync.c b/quotasync.c +index cad2a20..e90b24a 100644 +--- a/quotasync.c ++++ b/quotasync.c +@@ -7,6 +7,7 @@ + #include <string.h> + #include <errno.h> + #include <getopt.h> ++#include <libgen.h> + + #include "pot.h" + #include "common.h" +diff --git a/repquota.c b/repquota.c +index e79fc4d..8e509bd 100644 +--- a/repquota.c ++++ b/repquota.c +@@ -18,6 +18,7 @@ + #include <pwd.h> + #include <grp.h> + #include <getopt.h> ++#include <libgen.h> + + #include "pot.h" + #include "common.h" +diff --git a/rquota_svc.c b/rquota_svc.c +index 6e856bb..c17df13 100644 +--- a/rquota_svc.c ++++ b/rquota_svc.c +@@ -34,6 +34,7 @@ + #include <signal.h> + #include <errno.h> + #include <netconfig.h> ++#include <libgen.h> + #ifdef HOSTS_ACCESS + #include <tcpd.h> + #include <netdb.h> +diff --git a/setquota.c b/setquota.c +index c517ab1..9e4b2fa 100644 +--- a/setquota.c ++++ b/setquota.c +@@ -18,6 +18,7 @@ + #include <time.h> + #include <ctype.h> + #include <stdlib.h> ++#include <libgen.h> + + #if defined(RPC) + #include "rquota.h" +diff --git a/warnquota.c b/warnquota.c +index 2882fee..6f63ce7 100644 +--- a/warnquota.c ++++ b/warnquota.c +@@ -31,6 +31,7 @@ + #include <time.h> + #include <getopt.h> + #include <locale.h> ++#include <libgen.h> + #ifdef HAVE_NL_LANGINFO + #include <langinfo.h> + #endif +diff --git a/xqmstats.c b/xqmstats.c +index 59b1d66..345b060 100644 +--- a/xqmstats.c ++++ b/xqmstats.c +@@ -8,6 +8,7 @@ + #include <stdio.h> + #include <unistd.h> + #include <string.h> ++#include <libgen.h> + #include "common.h" + #include "pot.h" + diff --git a/meta/recipes-extended/quota/quota/0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch b/meta/recipes-extended/quota/quota/0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch deleted file mode 100644 index 34ded2d857..0000000000 --- a/meta/recipes-extended/quota/quota/0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 02b222a335527f1031cc9495d8c5ebc1bc5b1d4e Mon Sep 17 00:00:00 2001 -From: Fabrice Fontaine <fontaine.fabrice@gmail.com> -Date: Wed, 11 Nov 2020 15:00:47 +0100 -Subject: [PATCH] quota: Use realloc(3) instead of reallocarray(3) - -reallocarray(3) has been added to glibc relatively recently (version -2.26, from 2017) and apparently not all users run new enough glibc. Just -use realloc(3) for now since in this case there's no real risk of -overflow. - -Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> -Signed-off-by: Jan Kara <jack@suse.cz> -Upstream-Status: Backport -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - quota.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/quota.c b/quota.c -index a6ed61f..a60de12 100644 ---- a/quota.c -+++ b/quota.c -@@ -385,7 +385,7 @@ int main(int argc, char **argv) - break; - case 259: - fscount++; -- fsnames = reallocarray(fsnames, fscount, sizeof(char *)); -+ fsnames = realloc(fsnames, fscount * sizeof(char *)); - if (!fsnames) - die(1, _("Not enough memory for filesystem names")); - fsnames[fscount - 1] = optarg; --- -2.17.1 - diff --git a/meta/recipes-extended/quota/quota/fcntl.patch b/meta/recipes-extended/quota/quota/fcntl.patch deleted file mode 100644 index 51a770ce6e..0000000000 --- a/meta/recipes-extended/quota/quota/fcntl.patch +++ /dev/null @@ -1,71 +0,0 @@ -Include fcntl.h to pacify compiler errors on musl -like - -error: unknown type name 'loff_t' -Cover rpc headers under proper conditional -Dont use __P its undefined - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -diff --git a/quota.h b/quota.h -index 4c21411..d20c217 100644 ---- a/quota.h -+++ b/quota.h -@@ -182,6 +182,6 @@ enum { - #endif - #endif - --long quotactl __P((int, const char *, qid_t, caddr_t)); -+long quotactl (int, const char *, qid_t, caddr_t); - - #endif /* _QUOTA_ */ -diff --git a/quotacheck.c b/quotacheck.c -index 2cdf475..07c18a7 100644 ---- a/quotacheck.c -+++ b/quotacheck.c -@@ -19,6 +19,7 @@ - #include <unistd.h> - #include <stdlib.h> - #include <errno.h> -+#include <fcntl.h> - - #include <sys/stat.h> - #include <sys/types.h> -diff --git a/quotaio.c b/quotaio.c -index 94ae458..d57fc1a 100644 ---- a/quotaio.c -+++ b/quotaio.c -@@ -12,6 +12,7 @@ - #include <string.h> - #include <unistd.h> - #include <stdlib.h> -+#include <fcntl.h> - #include <sys/types.h> - #include <sys/stat.h> - #include <sys/file.h> -diff --git a/rquota_client.c b/rquota_client.c -index a3a4ae3..0ffe7a9 100644 ---- a/rquota_client.c -+++ b/rquota_client.c -@@ -19,7 +19,9 @@ - - #include "config.h" - -+#if defined(RPC) - #include <rpc/rpc.h> -+#endif - #include <sys/types.h> - #include <sys/param.h> - #include <sys/stat.h> -@@ -35,7 +37,9 @@ - #include <stdint.h> - - #include "mntopt.h" -+#if defined(RPC) - #include "rquota.h" -+#endif - #include "common.h" - #include "quotaio.h" - #include "quotasys.h" diff --git a/meta/recipes-extended/quota/quota_4.06.bb b/meta/recipes-extended/quota/quota_4.09.bb index e32bdd4c32..8e4d4aed8b 100644 --- a/meta/recipes-extended/quota/quota_4.06.bb +++ b/meta/recipes-extended/quota/quota_4.09.bb @@ -3,15 +3,14 @@ SECTION = "base" HOMEPAGE = "http://sourceforge.net/projects/linuxquota/" DESCRIPTION = "Tools and patches for the Linux Diskquota system as part of the Linux kernel" BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136" -LICENSE = "GPLv2+ & LGPLv2.1+" +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" LIC_FILES_CHKSUM = "file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \ file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb" SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \ - file://fcntl.patch \ - file://0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch \ - " -SRC_URI[sha256sum] = "2f3e03039f378d4f0d97acdb49daf581dcaad64d2e1ddf129495fd579fbd268d" + file://0001-Fix-building-on-musl.patch \ + " +SRC_URI[sha256sum] = "9cdaca154bc92afc3117f0e5f5b3208dd5f84583af1cf061c39baa0a2bb142f9" CVE_PRODUCT = "linux_diskquota" |