summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/quota
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/quota')
-rw-r--r--meta/recipes-extended/quota/quota/0001-Fix-building-on-musl.patch228
-rw-r--r--meta/recipes-extended/quota/quota/fcntl.patch70
-rw-r--r--meta/recipes-extended/quota/quota_4.09.bb2
3 files changed, 229 insertions, 71 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 @@
1From e73c5b48e12c3f02e532864a1107cdc8a4feafc3 Mon Sep 17 00:00:00 2001
2From: Brahmajit Das <brahmajit.xyz@gmail.com>
3Date: Sun, 14 Jul 2024 07:58:50 +0000
4Subject: [PATCH] Fix building on musl
5
6basename(3) is defined in libgen.h in MUSL. Include libgen.h where
7basename(3) is used.
8
9Upstream-Status: Backport [https://sourceforge.net/p/linuxquota/code/ci/e73c5b48e12c3f02e532864a1107cdc8a4feafc3/]
10Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
11Signed-off-by: Jan Kara <jack@suse.cz>
12---
13 convertquota.c | 1 +
14 edquota.c | 11 ++++++-----
15 quota.c | 1 +
16 quota_nld.c | 1 +
17 quotacheck.c | 1 +
18 quotaon.c | 1 +
19 quotastats.c | 1 +
20 quotasync.c | 1 +
21 repquota.c | 1 +
22 rquota_svc.c | 1 +
23 setquota.c | 1 +
24 warnquota.c | 1 +
25 xqmstats.c | 1 +
26 13 files changed, 18 insertions(+), 5 deletions(-)
27
28diff --git a/convertquota.c b/convertquota.c
29index 6c8a553..4eb05ed 100644
30--- a/convertquota.c
31+++ b/convertquota.c
32@@ -14,6 +14,7 @@
33 #include <fcntl.h>
34 #include <errno.h>
35 #include <getopt.h>
36+#include <libgen.h>
37
38 #include <endian.h>
39
40diff --git a/edquota.c b/edquota.c
41index 20ca306..c5b27cf 100644
42--- a/edquota.c
43+++ b/edquota.c
44@@ -20,6 +20,7 @@
45 #include <stdlib.h>
46 #include <fcntl.h>
47 #include <getopt.h>
48+#include <libgen.h>
49
50 #include "pot.h"
51 #include "quotaops.h"
52@@ -38,7 +39,7 @@ char *progname;
53 static int flags, quotatype;
54 static int fmt = -1;
55 static char *protoname;
56-static char *dirname;
57+static char *dir_name;
58
59 static void usage(void)
60 {
61@@ -138,7 +139,7 @@ static int parse_options(int argc, char **argv)
62 exit(1);
63 break;
64 case 'f':
65- dirname = optarg;
66+ dir_name = optarg;
67 break;
68 case 256:
69 flags |= FL_NUMNAMES;
70@@ -176,7 +177,7 @@ static void copy_prototype(int argc, char **argv, struct quota_handle **handles)
71 protoprivs = getprivs(protoid, handles, 0);
72 while (argc-- > 0) {
73 id = name2id(*argv, quotatype, !!(flags & FL_NUMNAMES), NULL);
74- curprivs = getprivs(id, handles, !dirname);
75+ curprivs = getprivs(id, handles, !dir_name);
76 if (!curprivs)
77 die(1, _("Cannot get quota information for user %s\n"), *argv);
78 argv++;
79@@ -223,7 +224,7 @@ int main(int argc, char **argv)
80 argv += ret;
81
82 init_kernel_interface();
83- handles = create_handle_list(dirname ? 1 : 0, dirname ? &dirname : NULL, quotatype, fmt,
84+ handles = create_handle_list(dir_name ? 1 : 0, dir_name ? &dir_name : NULL, quotatype, fmt,
85 (flags & FL_NO_MIXED_PATHS) ? 0 : IOI_NFS_MIXED_PATHS,
86 (flags & FL_REMOTE) ? 0 : MS_LOCALONLY);
87 if (!handles[0]) {
88@@ -296,7 +297,7 @@ int main(int argc, char **argv)
89 else {
90 for (; argc > 0; argc--, argv++) {
91 id = name2id(*argv, quotatype, !!(flags & FL_NUMNAMES), NULL);
92- curprivs = getprivs(id, handles, !dirname);
93+ curprivs = getprivs(id, handles, !dir_name);
94 if (!curprivs)
95 die(1, _("Cannot get quota information for user %s.\n"), *argv);
96 if (flags & FL_EDIT_TIMES) {
97diff --git a/quota.c b/quota.c
98index a60de12..66b0fa3 100644
99--- a/quota.c
100+++ b/quota.c
101@@ -20,6 +20,7 @@
102 #include <unistd.h>
103 #include <limits.h>
104 #include <ctype.h>
105+#include <libgen.h>
106 #ifdef RPC
107 #include <rpc/rpc.h>
108 #include "rquota.h"
109diff --git a/quota_nld.c b/quota_nld.c
110index 58a62af..710b556 100644
111--- a/quota_nld.c
112+++ b/quota_nld.c
113@@ -26,6 +26,7 @@
114 #include <fcntl.h>
115 #include <limits.h>
116 #include <signal.h>
117+#include <libgen.h>
118 #include <sys/stat.h>
119 #include <asm/types.h>
120
121diff --git a/quotacheck.c b/quotacheck.c
122index e2c3bbd..fa1d297 100644
123--- a/quotacheck.c
124+++ b/quotacheck.c
125@@ -19,6 +19,7 @@
126 #include <unistd.h>
127 #include <stdlib.h>
128 #include <errno.h>
129+#include <libgen.h>
130
131 #include <sys/stat.h>
132 #include <sys/types.h>
133diff --git a/quotaon.c b/quotaon.c
134index 351c851..17b6bcc 100644
135--- a/quotaon.c
136+++ b/quotaon.c
137@@ -13,6 +13,7 @@
138 #include <string.h>
139 #include <stdlib.h>
140 #include <stdarg.h>
141+#include <libgen.h>
142
143 #include "quotaon.h"
144 #include "quota.h"
145diff --git a/quotastats.c b/quotastats.c
146index a059812..4076a7d 100644
147--- a/quotastats.c
148+++ b/quotastats.c
149@@ -24,6 +24,7 @@
150 #include <errno.h>
151 #include <string.h>
152 #include <signal.h>
153+#include <libgen.h>
154
155 #include "pot.h"
156 #include "common.h"
157diff --git a/quotasync.c b/quotasync.c
158index cad2a20..e90b24a 100644
159--- a/quotasync.c
160+++ b/quotasync.c
161@@ -7,6 +7,7 @@
162 #include <string.h>
163 #include <errno.h>
164 #include <getopt.h>
165+#include <libgen.h>
166
167 #include "pot.h"
168 #include "common.h"
169diff --git a/repquota.c b/repquota.c
170index e79fc4d..8e509bd 100644
171--- a/repquota.c
172+++ b/repquota.c
173@@ -18,6 +18,7 @@
174 #include <pwd.h>
175 #include <grp.h>
176 #include <getopt.h>
177+#include <libgen.h>
178
179 #include "pot.h"
180 #include "common.h"
181diff --git a/rquota_svc.c b/rquota_svc.c
182index 6e856bb..c17df13 100644
183--- a/rquota_svc.c
184+++ b/rquota_svc.c
185@@ -34,6 +34,7 @@
186 #include <signal.h>
187 #include <errno.h>
188 #include <netconfig.h>
189+#include <libgen.h>
190 #ifdef HOSTS_ACCESS
191 #include <tcpd.h>
192 #include <netdb.h>
193diff --git a/setquota.c b/setquota.c
194index c517ab1..9e4b2fa 100644
195--- a/setquota.c
196+++ b/setquota.c
197@@ -18,6 +18,7 @@
198 #include <time.h>
199 #include <ctype.h>
200 #include <stdlib.h>
201+#include <libgen.h>
202
203 #if defined(RPC)
204 #include "rquota.h"
205diff --git a/warnquota.c b/warnquota.c
206index 2882fee..6f63ce7 100644
207--- a/warnquota.c
208+++ b/warnquota.c
209@@ -31,6 +31,7 @@
210 #include <time.h>
211 #include <getopt.h>
212 #include <locale.h>
213+#include <libgen.h>
214 #ifdef HAVE_NL_LANGINFO
215 #include <langinfo.h>
216 #endif
217diff --git a/xqmstats.c b/xqmstats.c
218index 59b1d66..345b060 100644
219--- a/xqmstats.c
220+++ b/xqmstats.c
221@@ -8,6 +8,7 @@
222 #include <stdio.h>
223 #include <unistd.h>
224 #include <string.h>
225+#include <libgen.h>
226 #include "common.h"
227 #include "pot.h"
228
diff --git a/meta/recipes-extended/quota/quota/fcntl.patch b/meta/recipes-extended/quota/quota/fcntl.patch
deleted file mode 100644
index 09a0c687b6..0000000000
--- a/meta/recipes-extended/quota/quota/fcntl.patch
+++ /dev/null
@@ -1,70 +0,0 @@
1From 00a456145531d194d3993c9f4cd404d5ca16c9df Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 6 Apr 2015 17:36:44 +0000
4Subject: [PATCH] quota: Fix build with musl
5
6Include fcntl.h to pacify compiler errors on musl
7like
8
9error: unknown type name 'loff_t'
10Cover rpc headers under proper conditional
11Dont use __P its undefined
12
13Upstream-Status: Pending
14
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16
17---
18 quotacheck.c | 1 +
19 quotaio.c | 1 +
20 rquota_client.c | 4 ++++
21 3 files changed, 6 insertions(+)
22
23diff --git a/quotacheck.c b/quotacheck.c
24index bd62d9a..772a27d 100644
25--- a/quotacheck.c
26+++ b/quotacheck.c
27@@ -19,6 +19,7 @@
28 #include <unistd.h>
29 #include <stdlib.h>
30 #include <errno.h>
31+#include <fcntl.h>
32
33 #include <sys/stat.h>
34 #include <sys/types.h>
35diff --git a/quotaio.c b/quotaio.c
36index 94ae458..d57fc1a 100644
37--- a/quotaio.c
38+++ b/quotaio.c
39@@ -12,6 +12,7 @@
40 #include <string.h>
41 #include <unistd.h>
42 #include <stdlib.h>
43+#include <fcntl.h>
44 #include <sys/types.h>
45 #include <sys/stat.h>
46 #include <sys/file.h>
47diff --git a/rquota_client.c b/rquota_client.c
48index 7f8e821..d48505a 100644
49--- a/rquota_client.c
50+++ b/rquota_client.c
51@@ -19,7 +19,9 @@
52
53 #include "config.h"
54
55+#if defined(RPC)
56 #include <rpc/rpc.h>
57+#endif
58 #include <sys/types.h>
59 #include <sys/param.h>
60 #include <sys/stat.h>
61@@ -35,7 +37,9 @@
62 #include <stdint.h>
63
64 #include "mntopt.h"
65+#if defined(RPC)
66 #include "rquota.h"
67+#endif
68 #include "common.h"
69 #include "quotaio.h"
70 #include "quotasys.h"
diff --git a/meta/recipes-extended/quota/quota_4.09.bb b/meta/recipes-extended/quota/quota_4.09.bb
index b779657dfc..8e4d4aed8b 100644
--- a/meta/recipes-extended/quota/quota_4.09.bb
+++ b/meta/recipes-extended/quota/quota_4.09.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11
8 file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb" 8 file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb"
9 9
10SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \ 10SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \
11 file://fcntl.patch \ 11 file://0001-Fix-building-on-musl.patch \
12 " 12 "
13SRC_URI[sha256sum] = "9cdaca154bc92afc3117f0e5f5b3208dd5f84583af1cf061c39baa0a2bb142f9" 13SRC_URI[sha256sum] = "9cdaca154bc92afc3117f0e5f5b3208dd5f84583af1cf061c39baa0a2bb142f9"
14 14