diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2023-03-29 12:30:00 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-30 23:26:04 +0100 |
commit | 1e752c3a315a9ee51eecd763e01f95abb81e9e30 (patch) | |
tree | 24a3aac384d87f8ac414ef6fa1e82da854dc3414 | |
parent | 46fda7a1a8e71702264ae478f9add1d06b4a81b2 (diff) | |
download | poky-1e752c3a315a9ee51eecd763e01f95abb81e9e30.tar.gz |
cracklib: upgrade to v2.9.10
Remove a patch which has been applied upstream and rebase
another patch on top of v2.9.10
(From OE-Core rev: d9e8baaca5a6dfd1517f9f328d6644c72404f19e)
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch | 28 | ||||
-rw-r--r-- | meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch | 53 | ||||
-rw-r--r-- | meta/recipes-extended/cracklib/cracklib_2.9.10.bb (renamed from meta/recipes-extended/cracklib/cracklib_2.9.8.bb) | 3 |
3 files changed, 15 insertions, 69 deletions
diff --git a/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch b/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch index 8fb512a224..20572b55c4 100644 --- a/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch +++ b/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch | |||
@@ -26,7 +26,7 @@ Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> | |||
26 | 1 file changed, 210 insertions(+), 4 deletions(-) | 26 | 1 file changed, 210 insertions(+), 4 deletions(-) |
27 | 27 | ||
28 | diff --git a/lib/packlib.c b/lib/packlib.c | 28 | diff --git a/lib/packlib.c b/lib/packlib.c |
29 | index 8acb7be..a9d8750 100644 | 29 | index 9396e1d..d0bb181 100644 |
30 | --- a/lib/packlib.c | 30 | --- a/lib/packlib.c |
31 | +++ b/lib/packlib.c | 31 | +++ b/lib/packlib.c |
32 | @@ -16,6 +16,12 @@ | 32 | @@ -16,6 +16,12 @@ |
@@ -41,8 +41,8 @@ index 8acb7be..a9d8750 100644 | |||
41 | +#include <byteswap.h> | 41 | +#include <byteswap.h> |
42 | #include "packer.h" | 42 | #include "packer.h" |
43 | 43 | ||
44 | static const char vers_id[] = "packlib.c : v2.3p2 Alec Muffett 18 May 1993"; | 44 | #define DEBUG 0 |
45 | @@ -45,6 +51,185 @@ typedef struct | 45 | @@ -43,6 +49,185 @@ typedef struct |
46 | char data_get[NUMWORDS][MAXWORDLEN]; | 46 | char data_get[NUMWORDS][MAXWORDLEN]; |
47 | } PWDICT64; | 47 | } PWDICT64; |
48 | 48 | ||
@@ -228,7 +228,7 @@ index 8acb7be..a9d8750 100644 | |||
228 | 228 | ||
229 | static int | 229 | static int |
230 | _PWIsBroken64(FILE *ifp) | 230 | _PWIsBroken64(FILE *ifp) |
231 | @@ -57,6 +242,7 @@ _PWIsBroken64(FILE *ifp) | 231 | @@ -55,6 +240,7 @@ _PWIsBroken64(FILE *ifp) |
232 | return 0; | 232 | return 0; |
233 | } | 233 | } |
234 | 234 | ||
@@ -236,7 +236,7 @@ index 8acb7be..a9d8750 100644 | |||
236 | return (pdesc64.header.pih_magic == PIH_MAGIC); | 236 | return (pdesc64.header.pih_magic == PIH_MAGIC); |
237 | } | 237 | } |
238 | 238 | ||
239 | @@ -149,7 +335,11 @@ PWOpen(prefix, mode) | 239 | @@ -147,7 +333,11 @@ PWOpen(prefix, mode) |
240 | pdesc.header.pih_blocklen = NUMWORDS; | 240 | pdesc.header.pih_blocklen = NUMWORDS; |
241 | pdesc.header.pih_numwords = 0; | 241 | pdesc.header.pih_numwords = 0; |
242 | 242 | ||
@@ -249,7 +249,7 @@ index 8acb7be..a9d8750 100644 | |||
249 | } else | 249 | } else |
250 | { | 250 | { |
251 | pdesc.flags &= ~PFOR_WRITE; | 251 | pdesc.flags &= ~PFOR_WRITE; |
252 | @@ -173,6 +363,7 @@ PWOpen(prefix, mode) | 252 | @@ -171,6 +361,7 @@ PWOpen(prefix, mode) |
253 | return NULL; | 253 | return NULL; |
254 | } | 254 | } |
255 | 255 | ||
@@ -257,7 +257,7 @@ index 8acb7be..a9d8750 100644 | |||
257 | if ((pdesc.header.pih_magic == 0) || (pdesc.header.pih_numwords == 0)) | 257 | if ((pdesc.header.pih_magic == 0) || (pdesc.header.pih_numwords == 0)) |
258 | { | 258 | { |
259 | /* uh-oh. either a broken "64-bit" file or a garbage file. */ | 259 | /* uh-oh. either a broken "64-bit" file or a garbage file. */ |
260 | @@ -195,6 +386,7 @@ PWOpen(prefix, mode) | 260 | @@ -193,6 +384,7 @@ PWOpen(prefix, mode) |
261 | } | 261 | } |
262 | return NULL; | 262 | return NULL; |
263 | } | 263 | } |
@@ -265,7 +265,7 @@ index 8acb7be..a9d8750 100644 | |||
265 | if (pdesc64.header.pih_magic != PIH_MAGIC) | 265 | if (pdesc64.header.pih_magic != PIH_MAGIC) |
266 | { | 266 | { |
267 | /* nope, not "64-bit" after all */ | 267 | /* nope, not "64-bit" after all */ |
268 | @@ -290,6 +482,7 @@ PWOpen(prefix, mode) | 268 | @@ -288,6 +480,7 @@ PWOpen(prefix, mode) |
269 | { | 269 | { |
270 | pdesc.flags &= ~PFOR_USEHWMS; | 270 | pdesc.flags &= ~PFOR_USEHWMS; |
271 | } | 271 | } |
@@ -273,7 +273,7 @@ index 8acb7be..a9d8750 100644 | |||
273 | for (i = 0; i < sizeof(pdesc.hwms) / sizeof(pdesc.hwms[0]); i++) | 273 | for (i = 0; i < sizeof(pdesc.hwms) / sizeof(pdesc.hwms[0]); i++) |
274 | { | 274 | { |
275 | pdesc.hwms[i] = pdesc64.hwms[i]; | 275 | pdesc.hwms[i] = pdesc64.hwms[i]; |
276 | @@ -299,6 +492,7 @@ PWOpen(prefix, mode) | 276 | @@ -297,6 +490,7 @@ PWOpen(prefix, mode) |
277 | { | 277 | { |
278 | pdesc.flags &= ~PFOR_USEHWMS; | 278 | pdesc.flags &= ~PFOR_USEHWMS; |
279 | } | 279 | } |
@@ -281,7 +281,7 @@ index 8acb7be..a9d8750 100644 | |||
281 | #if DEBUG | 281 | #if DEBUG |
282 | for (i=1; i<=0xff; i++) | 282 | for (i=1; i<=0xff; i++) |
283 | { | 283 | { |
284 | @@ -332,7 +526,11 @@ PWClose(pwp) | 284 | @@ -330,7 +524,11 @@ PWClose(pwp) |
285 | return (-1); | 285 | return (-1); |
286 | } | 286 | } |
287 | 287 | ||
@@ -294,7 +294,7 @@ index 8acb7be..a9d8750 100644 | |||
294 | { | 294 | { |
295 | fprintf(stderr, "index magic fwrite failed\n"); | 295 | fprintf(stderr, "index magic fwrite failed\n"); |
296 | return (-1); | 296 | return (-1); |
297 | @@ -351,7 +549,12 @@ PWClose(pwp) | 297 | @@ -349,7 +547,12 @@ PWClose(pwp) |
298 | printf("hwm[%02x] = %d\n", i, pwp->hwms[i]); | 298 | printf("hwm[%02x] = %d\n", i, pwp->hwms[i]); |
299 | #endif | 299 | #endif |
300 | } | 300 | } |
@@ -308,7 +308,7 @@ index 8acb7be..a9d8750 100644 | |||
308 | } | 308 | } |
309 | } | 309 | } |
310 | 310 | ||
311 | @@ -405,7 +608,8 @@ PutPW(pwp, string) | 311 | @@ -403,7 +606,8 @@ PutPW(pwp, string) |
312 | 312 | ||
313 | datum = (uint32_t) ftell(pwp->dfp); | 313 | datum = (uint32_t) ftell(pwp->dfp); |
314 | 314 | ||
@@ -318,7 +318,7 @@ index 8acb7be..a9d8750 100644 | |||
318 | 318 | ||
319 | fputs(pwp->data_put[0], pwp->dfp); | 319 | fputs(pwp->data_put[0], pwp->dfp); |
320 | putc(0, (FILE*) pwp->dfp); | 320 | putc(0, (FILE*) pwp->dfp); |
321 | @@ -464,6 +668,7 @@ GetPW(pwp, number) | 321 | @@ -462,6 +666,7 @@ GetPW(pwp, number) |
322 | perror("(index fread failed)"); | 322 | perror("(index fread failed)"); |
323 | return NULL; | 323 | return NULL; |
324 | } | 324 | } |
@@ -326,7 +326,7 @@ index 8acb7be..a9d8750 100644 | |||
326 | datum = datum64; | 326 | datum = datum64; |
327 | } else { | 327 | } else { |
328 | if (fseek(pwp->ifp, sizeof(struct pi_header) + (thisblock * sizeof(uint32_t)), 0)) | 328 | if (fseek(pwp->ifp, sizeof(struct pi_header) + (thisblock * sizeof(uint32_t)), 0)) |
329 | @@ -477,6 +682,7 @@ GetPW(pwp, number) | 329 | @@ -475,6 +680,7 @@ GetPW(pwp, number) |
330 | perror("(index fread failed)"); | 330 | perror("(index fread failed)"); |
331 | return NULL; | 331 | return NULL; |
332 | } | 332 | } |
diff --git a/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch b/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch deleted file mode 100644 index 1ee97357d0..0000000000 --- a/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | From 7250328d7f77069726603ef7132826c9260d3c92 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Sat, 27 Apr 2013 16:02:30 +0800 | ||
4 | Subject: [PATCH 2/2] craklib:fix testnum and teststr failed | ||
5 | |||
6 | Error log: | ||
7 | ... | ||
8 | $ ./testnum | ||
9 | (null).pwd.gz: No such file or directory | ||
10 | PWOpen: No such file or directory | ||
11 | |||
12 | $ ./util/teststr | ||
13 | (null).pwd.gz: No such file or directory | ||
14 | PWOpen: No such file or directory | ||
15 | ... | ||
16 | Set DEFAULT_CRACKLIB_DICT as the path of PWOpen | ||
17 | |||
18 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
19 | Upstream-Status: Submitted [https://github.com/cracklib/cracklib/pull/42] | ||
20 | --- | ||
21 | util/testnum.c | 2 +- | ||
22 | util/teststr.c | 2 +- | ||
23 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
24 | |||
25 | diff --git a/util/testnum.c b/util/testnum.c | ||
26 | index ae2246d..ca210ff 100644 | ||
27 | --- a/util/testnum.c | ||
28 | +++ b/util/testnum.c | ||
29 | @@ -20,7 +20,7 @@ main () | ||
30 | PWDICT *pwp; | ||
31 | char buffer[STRINGSIZE]; | ||
32 | |||
33 | - if (!(pwp = PWOpen (NULL, "r"))) | ||
34 | + if (!(pwp = PWOpen (DEFAULT_CRACKLIB_DICT, "r"))) | ||
35 | { | ||
36 | perror ("PWOpen"); | ||
37 | return (-1); | ||
38 | diff --git a/util/teststr.c b/util/teststr.c | ||
39 | index 2a31fa4..9fb9cda 100644 | ||
40 | --- a/util/teststr.c | ||
41 | +++ b/util/teststr.c | ||
42 | @@ -15,7 +15,7 @@ main () | ||
43 | PWDICT *pwp; | ||
44 | char buffer[STRINGSIZE]; | ||
45 | |||
46 | - if (!(pwp = PWOpen (NULL, "r"))) | ||
47 | + if (!(pwp = PWOpen (DEFAULT_CRACKLIB_DICT, "r"))) | ||
48 | { | ||
49 | perror ("PWOpen"); | ||
50 | return (-1); | ||
51 | -- | ||
52 | 2.20.1 | ||
53 | |||
diff --git a/meta/recipes-extended/cracklib/cracklib_2.9.8.bb b/meta/recipes-extended/cracklib/cracklib_2.9.10.bb index a3db6eb394..8197cdad9e 100644 --- a/meta/recipes-extended/cracklib/cracklib_2.9.8.bb +++ b/meta/recipes-extended/cracklib/cracklib_2.9.10.bb | |||
@@ -11,10 +11,9 @@ EXTRA_OECONF = "--without-python --libdir=${base_libdir}" | |||
11 | 11 | ||
12 | SRC_URI = "git://github.com/cracklib/cracklib;protocol=https;branch=main \ | 12 | SRC_URI = "git://github.com/cracklib/cracklib;protocol=https;branch=main \ |
13 | file://0001-packlib.c-support-dictionary-byte-order-dependent.patch \ | 13 | file://0001-packlib.c-support-dictionary-byte-order-dependent.patch \ |
14 | file://0002-craklib-fix-testnum-and-teststr-failed.patch \ | ||
15 | " | 14 | " |
16 | 15 | ||
17 | SRCREV = "d9e8f9f47718539aeba80f90f4e072549926dc9c" | 16 | SRCREV = "e74c539344d024709ee76e2920b0af7f9a5c5556" |
18 | S = "${WORKDIR}/git/src" | 17 | S = "${WORKDIR}/git/src" |
19 | 18 | ||
20 | inherit autotools gettext | 19 | inherit autotools gettext |