summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/libb64/libb64/0001-Makefile-fix-parallel-build-of-examples.patch46
-rw-r--r--meta-oe/recipes-support/libb64/libb64/0001-examples-Use-proper-function-prototype-for-main.patch27
-rw-r--r--meta-oe/recipes-support/libb64/libb64/0002-use-BUFSIZ-as-buffer-size.patch57
-rw-r--r--meta-oe/recipes-support/libb64/libb64/0003-fix-integer-overflows.patch77
-rw-r--r--meta-oe/recipes-support/libb64/libb64/0004-Fix-off-by-one-error.patch26
-rw-r--r--meta-oe/recipes-support/libb64/libb64/0005-make-overriding-CFLAGS-possible.patch40
-rw-r--r--meta-oe/recipes-support/libb64/libb64/0006-do-not-export-the-CHARS_PER_LINE-variable.patch27
-rw-r--r--meta-oe/recipes-support/libb64/libb64/0007-initialize-encoder-decoder-state-in-the-constructors.patch44
-rw-r--r--meta-oe/recipes-support/libb64/libb64_2.0.0.1.bb (renamed from meta-oe/recipes-support/libb64/libb64_1.2.1.bb)20
9 files changed, 82 insertions, 282 deletions
diff --git a/meta-oe/recipes-support/libb64/libb64/0001-Makefile-fix-parallel-build-of-examples.patch b/meta-oe/recipes-support/libb64/libb64/0001-Makefile-fix-parallel-build-of-examples.patch
new file mode 100644
index 0000000000..84dee415ad
--- /dev/null
+++ b/meta-oe/recipes-support/libb64/libb64/0001-Makefile-fix-parallel-build-of-examples.patch
@@ -0,0 +1,46 @@
1From cbe8bd2948f522062c6170f581e1e265692a9a55 Mon Sep 17 00:00:00 2001
2From: Sergei Trofimovich <slyich@gmail.com>
3Date: Sun, 24 Oct 2021 18:53:04 +0100
4Subject: [PATCH] Makefile: fix parallel build of examples
5
6Without the change examples fails to build as:
7
8 $ LANG=C make -j
9 make -C src
10 make -C examples
11 make[1]: Entering directory 'libb64/src'
12 cc -O3 -Werror -pedantic -I../include -c -o cencode.o cencode.c
13 make[1]: Entering directory 'libb64/examples'
14 make[1]: *** No rule to make target 'libb64.a', needed by 'c-example1'. Stop.
15 make[1]: Leaving directory 'libb64/examples'
16 make: *** [Makefile:8: all_examples] Error 2
17 make: *** Waiting for unfinished jobs....
18 cc -O3 -Werror -pedantic -I../include -c -o cdecode.o cdecode.c
19 ar rv libb64.a cencode.o cdecode.o
20 ar: creating libb64.a
21 a - cencode.o
22 a - cdecode.o
23 make[1]: Leaving directory 'libb64/src'
24
25Upstream-Status: Submitted [https://github.com/libb64/libb64/pull/9]
26Signed-off-by: Khem Raj <raj.khem@gmail.com>
27---
28 Makefile | 2 +-
29 1 file changed, 1 insertion(+), 1 deletion(-)
30
31diff --git a/Makefile b/Makefile
32index db40356..aa48c76 100644
33--- a/Makefile
34+++ b/Makefile
35@@ -4,7 +4,7 @@ all_src:
36 $(MAKE) -C src
37 all_base64: all_src
38 $(MAKE) -C base64
39-all_examples:
40+all_examples: all_src
41 $(MAKE) -C examples
42
43 clean: clean_src clean_base64 clean_include clean_examples
44--
452.37.2
46
diff --git a/meta-oe/recipes-support/libb64/libb64/0001-examples-Use-proper-function-prototype-for-main.patch b/meta-oe/recipes-support/libb64/libb64/0001-examples-Use-proper-function-prototype-for-main.patch
new file mode 100644
index 0000000000..42e889efc2
--- /dev/null
+++ b/meta-oe/recipes-support/libb64/libb64/0001-examples-Use-proper-function-prototype-for-main.patch
@@ -0,0 +1,27 @@
1From 98eaf510f40e384b32c01ad4bd5c3a697fdd8560 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 24 Aug 2022 14:34:38 -0700
4Subject: [PATCH] examples: Use proper function prototype for main
5
6Upstream-Status: Submitted [https://github.com/libb64/libb64/pull/10]
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 examples/c-example1.c | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/examples/c-example1.c b/examples/c-example1.c
13index a0001df..34585dd 100644
14--- a/examples/c-example1.c
15+++ b/examples/c-example1.c
16@@ -83,7 +83,7 @@ char* decode(const char* input)
17 }
18
19
20-int main()
21+int main(int argc, char** argv)
22 {
23 const char* input = "hello world";
24 char* encoded;
25--
262.37.2
27
diff --git a/meta-oe/recipes-support/libb64/libb64/0002-use-BUFSIZ-as-buffer-size.patch b/meta-oe/recipes-support/libb64/libb64/0002-use-BUFSIZ-as-buffer-size.patch
deleted file mode 100644
index 10ec8e14a8..0000000000
--- a/meta-oe/recipes-support/libb64/libb64/0002-use-BUFSIZ-as-buffer-size.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1From ee03e265804a07a0da5028b86960031bd7ab86b2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 27 Mar 2021 22:01:13 -0700
4Subject: [PATCH] use BUFSIZ as buffer size
5
6Author: Jakub Wilk <jwilk@debian.org>
7Bug: http://sourceforge.net/tracker/?func=detail&atid=785907&aid=3591336&group_id=152942
8
9Upstream-Status: Pending
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 include/b64/decode.h | 3 ++-
13 include/b64/encode.h | 3 ++-
14 2 files changed, 4 insertions(+), 2 deletions(-)
15
16diff --git a/include/b64/decode.h b/include/b64/decode.h
17index 12b16ea..e9019f3 100644
18--- a/include/b64/decode.h
19+++ b/include/b64/decode.h
20@@ -8,6 +8,7 @@ For details, see http://sourceforge.net/projects/libb64
21 #ifndef BASE64_DECODE_H
22 #define BASE64_DECODE_H
23
24+#include <cstdio>
25 #include <iostream>
26
27 namespace base64
28@@ -22,7 +23,7 @@ namespace base64
29 base64_decodestate _state;
30 int _buffersize;
31
32- decoder(int buffersize_in = BUFFERSIZE)
33+ decoder(int buffersize_in = BUFSIZ)
34 : _buffersize(buffersize_in)
35 {}
36
37diff --git a/include/b64/encode.h b/include/b64/encode.h
38index 5d807d9..e7a7035 100644
39--- a/include/b64/encode.h
40+++ b/include/b64/encode.h
41@@ -8,6 +8,7 @@ For details, see http://sourceforge.net/projects/libb64
42 #ifndef BASE64_ENCODE_H
43 #define BASE64_ENCODE_H
44
45+#include <cstdio>
46 #include <iostream>
47
48 namespace base64
49@@ -22,7 +23,7 @@ namespace base64
50 base64_encodestate _state;
51 int _buffersize;
52
53- encoder(int buffersize_in = BUFFERSIZE)
54+ encoder(int buffersize_in = BUFSIZ)
55 : _buffersize(buffersize_in)
56 {}
57
diff --git a/meta-oe/recipes-support/libb64/libb64/0003-fix-integer-overflows.patch b/meta-oe/recipes-support/libb64/libb64/0003-fix-integer-overflows.patch
deleted file mode 100644
index 8854bb6af4..0000000000
--- a/meta-oe/recipes-support/libb64/libb64/0003-fix-integer-overflows.patch
+++ /dev/null
@@ -1,77 +0,0 @@
1From 7b30fbc3d47dfaf38d8ce8b8949a69d2984dac76 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 27 Mar 2021 22:06:03 -0700
4Subject: [PATCH] fix integer overflows
5
6Author: Jakub Wilk <jwilk@debian.org>
7Bug: http://sourceforge.net/tracker/?func=detail&aid=3591129&group_id=152942&atid=785907
8
9Upstream-Status: Pending
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 src/cdecode.c | 15 ++++++++-------
13 1 file changed, 8 insertions(+), 7 deletions(-)
14
15diff --git a/src/cdecode.c b/src/cdecode.c
16index a6c0a42..4e47e9f 100644
17--- a/src/cdecode.c
18+++ b/src/cdecode.c
19@@ -9,10 +9,11 @@ For details, see http://sourceforge.net/projects/libb64
20
21 int base64_decode_value(char value_in)
22 {
23- static const char decoding[] = {62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-2,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51};
24+ static const signed char decoding[] = {62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-2,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51};
25 static const char decoding_size = sizeof(decoding);
26+ if (value_in < 43) return -1;
27 value_in -= 43;
28- if (value_in < 0 || value_in >= decoding_size) return -1;
29+ if (value_in > decoding_size) return -1;
30 return decoding[(int)value_in];
31 }
32
33@@ -26,7 +27,7 @@ int base64_decode_block(const char* code_in, const int length_in, char* plaintex
34 {
35 const char* codechar = code_in;
36 char* plainchar = plaintext_out;
37- char fragment;
38+ int fragment;
39
40 *plainchar = state_in->plainchar;
41
42@@ -42,7 +43,7 @@ int base64_decode_block(const char* code_in, const int length_in, char* plaintex
43 state_in->plainchar = *plainchar;
44 return plainchar - plaintext_out;
45 }
46- fragment = (char)base64_decode_value(*codechar++);
47+ fragment = base64_decode_value(*codechar++);
48 } while (fragment < 0);
49 *plainchar = (fragment & 0x03f) << 2;
50 case step_b:
51@@ -53,7 +54,7 @@ int base64_decode_block(const char* code_in, const int length_in, char* plaintex
52 state_in->plainchar = *plainchar;
53 return plainchar - plaintext_out;
54 }
55- fragment = (char)base64_decode_value(*codechar++);
56+ fragment = base64_decode_value(*codechar++);
57 } while (fragment < 0);
58 *plainchar++ |= (fragment & 0x030) >> 4;
59 *plainchar = (fragment & 0x00f) << 4;
60@@ -65,7 +66,7 @@ int base64_decode_block(const char* code_in, const int length_in, char* plaintex
61 state_in->plainchar = *plainchar;
62 return plainchar - plaintext_out;
63 }
64- fragment = (char)base64_decode_value(*codechar++);
65+ fragment = base64_decode_value(*codechar++);
66 } while (fragment < 0);
67 *plainchar++ |= (fragment & 0x03c) >> 2;
68 *plainchar = (fragment & 0x003) << 6;
69@@ -77,7 +78,7 @@ int base64_decode_block(const char* code_in, const int length_in, char* plaintex
70 state_in->plainchar = *plainchar;
71 return plainchar - plaintext_out;
72 }
73- fragment = (char)base64_decode_value(*codechar++);
74+ fragment = base64_decode_value(*codechar++);
75 } while (fragment < 0);
76 *plainchar++ |= (fragment & 0x03f);
77 }
diff --git a/meta-oe/recipes-support/libb64/libb64/0004-Fix-off-by-one-error.patch b/meta-oe/recipes-support/libb64/libb64/0004-Fix-off-by-one-error.patch
deleted file mode 100644
index e19dbad08d..0000000000
--- a/meta-oe/recipes-support/libb64/libb64/0004-Fix-off-by-one-error.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1From 8144fd9e02bd5ccd1e080297b19a1e9eb4d3ff96 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 27 Mar 2021 22:07:15 -0700
4Subject: [PATCH] Fix off by one error
5
6Launchpad bug #1501176 reported by William McCall on 2015-09-30
7
8Upstream-Status: Pending
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 src/cdecode.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/src/cdecode.c b/src/cdecode.c
15index 4e47e9f..45da4e1 100644
16--- a/src/cdecode.c
17+++ b/src/cdecode.c
18@@ -13,7 +13,7 @@ int base64_decode_value(char value_in)
19 static const char decoding_size = sizeof(decoding);
20 if (value_in < 43) return -1;
21 value_in -= 43;
22- if (value_in > decoding_size) return -1;
23+ if (value_in >= decoding_size) return -1;
24 return decoding[(int)value_in];
25 }
26
diff --git a/meta-oe/recipes-support/libb64/libb64/0005-make-overriding-CFLAGS-possible.patch b/meta-oe/recipes-support/libb64/libb64/0005-make-overriding-CFLAGS-possible.patch
deleted file mode 100644
index e93015ee48..0000000000
--- a/meta-oe/recipes-support/libb64/libb64/0005-make-overriding-CFLAGS-possible.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From a7914d5ffee6ffdfb3f2b8ebcc22c8367d078301 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 27 Mar 2021 22:08:43 -0700
4Subject: [PATCH] make overriding CFLAGS possible
5
6Author: Jakub Wilk <jwilk@debian.org>
7
8Upstream-Status: Pending
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 base64/Makefile | 2 +-
12 src/Makefile | 2 +-
13 2 files changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/base64/Makefile b/base64/Makefile
16index 30a2c5c..783a248 100644
17--- a/base64/Makefile
18+++ b/base64/Makefile
19@@ -3,7 +3,7 @@ BINARIES = base64
20 # Build flags (uncomment one)
21 #############################
22 # Release build flags
23-CFLAGS += -O3
24+CFLAGS ?= -O3
25 #############################
26 # Debug build flags
27 #CFLAGS += -g
28diff --git a/src/Makefile b/src/Makefile
29index 28b2382..48801fc 100644
30--- a/src/Makefile
31+++ b/src/Makefile
32@@ -3,7 +3,7 @@ LIBRARIES = libb64.a
33 # Build flags (uncomment one)
34 #############################
35 # Release build flags
36-CFLAGS += -O3
37+CFLAGS ?= -O3
38 #############################
39 # Debug build flags
40 #CFLAGS += -g
diff --git a/meta-oe/recipes-support/libb64/libb64/0006-do-not-export-the-CHARS_PER_LINE-variable.patch b/meta-oe/recipes-support/libb64/libb64/0006-do-not-export-the-CHARS_PER_LINE-variable.patch
deleted file mode 100644
index 9ba08c87ee..0000000000
--- a/meta-oe/recipes-support/libb64/libb64/0006-do-not-export-the-CHARS_PER_LINE-variable.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From a1b9bb4af819ed389675f16e4a521efeda4cc3f3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 27 Mar 2021 22:10:48 -0700
4Subject: [PATCH] do not export the CHARS_PER_LINE variable
5
6The library exports a variable named "CHARS_PER_LINE". This is a generic name that could conflict with a name in user's code.
7Please either rename the variable or make it static.
8
9Upstream-Status: Submitted [http://sourceforge.net/tracker/?func=detail&aid=3591420&group_id=152942&atid=785907]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 src/cencode.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/src/cencode.c b/src/cencode.c
16index 03ba5b6..3df62a8 100644
17--- a/src/cencode.c
18+++ b/src/cencode.c
19@@ -7,7 +7,7 @@ For details, see http://sourceforge.net/projects/libb64
20
21 #include <b64/cencode.h>
22
23-const int CHARS_PER_LINE = 72;
24+static const int CHARS_PER_LINE = 72;
25
26 void base64_init_encodestate(base64_encodestate* state_in)
27 {
diff --git a/meta-oe/recipes-support/libb64/libb64/0007-initialize-encoder-decoder-state-in-the-constructors.patch b/meta-oe/recipes-support/libb64/libb64/0007-initialize-encoder-decoder-state-in-the-constructors.patch
deleted file mode 100644
index fdf8339bed..0000000000
--- a/meta-oe/recipes-support/libb64/libb64/0007-initialize-encoder-decoder-state-in-the-constructors.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From c1ba44d83cc7d9d756cfb063717852eae9d03328 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 27 Mar 2021 22:12:41 -0700
4Subject: [PATCH] initialize encoder/decoder state in the constructors
5
6Author: Jakub Wilk <jwilk@debian.org>
7
8Upstream-Status: Pending
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 include/b64/decode.h | 4 +++-
12 include/b64/encode.h | 4 +++-
13 2 files changed, 6 insertions(+), 2 deletions(-)
14
15diff --git a/include/b64/decode.h b/include/b64/decode.h
16index e9019f3..aefb7bc 100644
17--- a/include/b64/decode.h
18+++ b/include/b64/decode.h
19@@ -25,7 +25,9 @@ namespace base64
20
21 decoder(int buffersize_in = BUFSIZ)
22 : _buffersize(buffersize_in)
23- {}
24+ {
25+ base64_init_decodestate(&_state);
26+ }
27
28 int decode(char value_in)
29 {
30diff --git a/include/b64/encode.h b/include/b64/encode.h
31index e7a7035..33848b3 100644
32--- a/include/b64/encode.h
33+++ b/include/b64/encode.h
34@@ -25,7 +25,9 @@ namespace base64
35
36 encoder(int buffersize_in = BUFSIZ)
37 : _buffersize(buffersize_in)
38- {}
39+ {
40+ base64_init_encodestate(&_state);
41+ }
42
43 int encode(char value_in)
44 {
diff --git a/meta-oe/recipes-support/libb64/libb64_1.2.1.bb b/meta-oe/recipes-support/libb64/libb64_2.0.0.1.bb
index 64a34fece7..8122419c5e 100644
--- a/meta-oe/recipes-support/libb64/libb64_1.2.1.bb
+++ b/meta-oe/recipes-support/libb64/libb64_2.0.0.1.bb
@@ -2,22 +2,20 @@ SUMMARY = "Base64 Encoding/Decoding Routines"
2DESCRIPTION = "base64 encoding/decoding library - runtime library \ 2DESCRIPTION = "base64 encoding/decoding library - runtime library \
3libb64 is a library of ANSI C routines for fast encoding/decoding data into \ 3libb64 is a library of ANSI C routines for fast encoding/decoding data into \
4and from a base64-encoded format" 4and from a base64-encoded format"
5HOMEPAGE = "http://libb64.sourceforge.net/" 5HOMEPAGE = "https://github.com/libb64"
6LICENSE = "PD" 6LICENSE = "PD"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=ce551aad762074c7ab618a0e07a8dca3" 7LIC_FILES_CHKSUM = "file://LICENSE.md;md5=81296a564fa0621472714aae7c763d96"
8 8
9SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}/${BP}.zip \ 9PV .= "+2.0.0.2+git${SRCPV}"
10SRCREV = "ce864b17ea0e24a91e77c7dd3eb2d1ac4175b3f0"
11
12SRC_URI = "git://github.com/libb64/libb64;protocol=https;branch=master \
10 file://0001-example-Do-not-run-the-tests.patch \ 13 file://0001-example-Do-not-run-the-tests.patch \
11 file://0002-use-BUFSIZ-as-buffer-size.patch \ 14 file://0001-Makefile-fix-parallel-build-of-examples.patch \
12 file://0003-fix-integer-overflows.patch \ 15 file://0001-examples-Use-proper-function-prototype-for-main.patch \
13 file://0004-Fix-off-by-one-error.patch \
14 file://0005-make-overriding-CFLAGS-possible.patch \
15 file://0006-do-not-export-the-CHARS_PER_LINE-variable.patch \
16 file://0007-initialize-encoder-decoder-state-in-the-constructors.patch \
17 " 16 "
18SRC_URI[sha256sum] = "20106f0ba95cfd9c35a13c71206643e3fb3e46512df3e2efb2fdbf87116314b2"
19 17
20PARALLEL_MAKE = "" 18S = "${WORKDIR}/git"
21 19
22CFLAGS += "-fPIC" 20CFLAGS += "-fPIC"
23 21