Skip to contentSkip to conversation

Library to aid multi-part form data parsing

PATCH Superseded Asmitha Karunanithi 3 participants 3 messages Feb 4, 2020 – Feb 5, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Library to aid multi-part form data parsing

From: asmitha <[email protected]>

Mimetic library helps parsing the multi-part form data. This library can be used for scenarios that includes multi-part form data file uploads to the BMC.

The patch file (config.patch) includes:
i) addition of a compilation flag - "no-narrowing" since this has been treated as warning in earlier versions of c++ and now with the higher versions, this is treated as errors.
ii) the test directory is removed as there were errors (relocation errors) since the shared object files of libc++ and libc were not taken from the sysroot path but from the system's library path where the required version of the .so is not present.

---
 .../libmimetic/libmimetic/config.patch        | 25 +++++++++++++++++++
 .../libmimetic/libmimetic_0.9.8.bb            | 19 ++++++++++++++
 2 files changed, 44 insertions(+)
 create mode 100644 meta-oe/recipes-support/libmimetic/libmimetic/config.patch
 create mode 100644 meta-oe/recipes-support/libmimetic/libmimetic_0.9.8.bb
meta-oe/recipes-support/libmimetic/libmimetic/config.patch new file +25 -0
new file mode 100644
index 000000000..52bf7b450
@@ -0,0 +1,25 @@
+diff --git a/Makefile.am b/Makefile.am
+index 634bd4c..c7cbae7 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,6 +1,6 @@
+ MAINTAINERCLEANFILES = Makefile Makefile.in config.cache
+ EXTRA_DIST=LICENSE m4
+-SUBDIRS = mimetic doc examples test win32
++SUBDIRS = mimetic doc examples win32
+ INCLUDES=-I$(top_srcdir)
+ ACLOCAL_AMFLAGS=-I m4
+
+diff --git a/configure.in b/configure.in
+index 5e8f3d4..af1018e 100644
+--- a/configure.in
++++ b/configure.in
+@@ -30,7 +30,7 @@ debug_enabled=false
+ dnl CFLAGS and CXXFLAGS default to -O2 -g
+
+ dnl CXXFLAGS="$CXXFLAGS -DNDEBUG -fno-exceptions"
+-CXXFLAGS="$CXXFLAGS -DNDEBUG"
++CXXFLAGS="$CXXFLAGS -DNDEBUG -Wno-narrowing"
+
+ AC_ARG_ENABLE(debug,
+   [  --enable-debug[=LEVEL]  enables debug symbols [default=2]],
meta-oe/recipes-support/libmimetic/libmimetic_0.9.8.bb new file +19 -0
new file mode 100644
index 000000000..a0a704188
@@ -0,0 +1,19 @@
+# Released under the MIT license.
+
+SUMMARY = "Mimetic Library for multi-part parsing"
+DESCRIPTION = "Email library (MIME) written in C++ designed to be easy to use and integrate but yet fast and efficient."
+AUTHOR = "Stefano Barbato <[email protected]>"
+HOMEPAGE = "http://www.codesink.org/mimetic_mime_library.html"
+BUGTRACKER = "https://github.com/LadislavSopko/mimetic/issues"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b49da7df0ca479ef01ff7f2d799eabee"
+
+SRCREV = "50486af99b4f9b35522d7b3de40b6ce107505279"
+SRC_URI += "git://github.com/LadislavSopko/mimetic/ \
+            file://config.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit autotools
Signature · 1 line
2.21.0
#1 lore raw
Quoted 6 lines

-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Asmitha Karunanithi
Sent: den 4 februari 2020 10:21
To: [email protected]
Subject: [oe] [meta-oe][PATCH] Library to aid multi-part form data parsing

The commit subject should be prefixed by the name of the recipe, i.e.:

libmimetic: Add library to aid multi-part form data parsing

Quoted 5 lines

From: asmitha <[email protected]>

Mimetic library helps parsing the multi-part form data. This library can be used for scenarios that includes multi-part form data file uploads to the BMC.

What is BMC?

meta-oe/recipes-support/libmimetic/libmimetic/config.patch

Quoted 18 lines

The patch file (config.patch) includes:
i) addition of a compilation flag - "no-narrowing" since this has been treated as warning in earlier versions of c++ and now with the higher versions, this is treated as errors.
ii) the test directory is removed as there were errors (relocation errors) since the shared object files of libc++ and libc were not taken from the sysroot path but from the system's library path where the required version of the .so is not present.

---
 .../libmimetic/libmimetic/config.patch        | 25 +++++++++++++++++++
 .../libmimetic/libmimetic_0.9.8.bb            | 19 ++++++++++++++
 2 files changed, 44 insertions(+)
 create mode 100644 meta-oe/recipes-support/libmimetic/libmimetic/config.patch
 create mode 100644 meta-oe/recipes-support/libmimetic/libmimetic_0.9.8.bb
meta-oe/recipes-support/libmimetic/libmimetic/config.patch +0 -0

There should be an Upstream-Status in the patch. You might as well regenerate the patch using git format-patch to keep a description with the patch why it is needed.

Quoted 17 lines

new file mode 100644
index 000000000..52bf7b450

meta-oe/recipes-support/libmimetic/libmimetic/config.patch new file +12 -0
@@ -0,0 +1,25 @@
+diff --git a/Makefile.am b/Makefile.am
+index 634bd4c..c7cbae7 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,6 +1,6 @@
+ MAINTAINERCLEANFILES = Makefile Makefile.in config.cache
+ EXTRA_DIST=LICENSE m4
+-SUBDIRS = mimetic doc examples test win32
++SUBDIRS = mimetic doc examples win32
+ INCLUDES=-I$(top_srcdir)
+ ACLOCAL_AMFLAGS=-I m4
+

meta-oe/recipes-support/libmimetic/libmimetic/config.patch line 22

Quoted 10 lines
meta-oe/recipes-support/libmimetic/libmimetic/config.patch new file +10 -0
+diff --git a/configure.in b/configure.in
+index 5e8f3d4..af1018e 100644
+--- a/configure.in
++++ b/configure.in
+@@ -30,7 +30,7 @@ debug_enabled=false
+ dnl CFLAGS and CXXFLAGS default to -O2 -g
+
+ dnl CXXFLAGS="$CXXFLAGS -DNDEBUG -fno-exceptions"
+-CXXFLAGS="$CXXFLAGS -DNDEBUG"
++CXXFLAGS="$CXXFLAGS -DNDEBUG -Wno-narrowing"

Do this in the recipe instead. Just add:

CXXFLAGS += "-Wno-narrowing"

at the end of the recipe.

Quoted 29 lines
meta-oe/recipes-support/libmimetic/libmimetic/config.patch new file +3 -0
+
+ AC_ARG_ENABLE(debug,
+   [  --enable-debug[=LEVEL]  enables debug symbols [default=2]],
meta-oe/recipes-support/libmimetic/libmimetic_0.9.8.bb new file +19 -1
new file mode 100644
index 000000000..a0a704188
@@ -0,0 +1,19 @@
+# Released under the MIT license.
+
+SUMMARY = "Mimetic Library for multi-part parsing"
+DESCRIPTION = "Email library (MIME) written in C++ designed to be easy to use and integrate but yet fast and efficient."
+AUTHOR = "Stefano Barbato <[email protected]>"
+HOMEPAGE = "http://www.codesink.org/mimetic_mime_library.html"
+BUGTRACKER = "https://github.com/LadislavSopko/mimetic/issues"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b49da7df0ca479ef01ff7f2d799eabee"
+
+SRCREV = "50486af99b4f9b35522d7b3de40b6ce107505279"
+SRC_URI += "git://github.com/LadislavSopko/mimetic/ \
+            file://config.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit autotools
--
Quoted 1 line

2.21.0

//Peter

#2 lore raw
In reply to Asmitha Karunanithi

it also fails on musl/aarch64

https://errors.yoctoproject.org/Errors/Details/385285/

Quoted 88 lines · Asmitha Karunanithi

From: asmitha <[email protected]>

Mimetic library helps parsing the multi-part form data. This library can be used for scenarios that includes multi-part form data file uploads to the BMC.

The patch file (config.patch) includes:
i) addition of a compilation flag - "no-narrowing" since this has been treated as warning in earlier versions of c++ and now with the higher versions, this is treated as errors.
ii) the test directory is removed as there were errors (relocation errors) since the shared object files of libc++ and libc were not taken from the sysroot path but from the system's library path where the required version of the .so is not present.

---
 .../libmimetic/libmimetic/config.patch        | 25 +++++++++++++++++++
 .../libmimetic/libmimetic_0.9.8.bb            | 19 ++++++++++++++
 2 files changed, 44 insertions(+)
 create mode 100644 meta-oe/recipes-support/libmimetic/libmimetic/config.patch
 create mode 100644 meta-oe/recipes-support/libmimetic/libmimetic_0.9.8.bb
meta-oe/recipes-support/libmimetic/libmimetic/config.patch new file +25 -0
new file mode 100644
index 000000000..52bf7b450
@@ -0,0 +1,25 @@
+diff --git a/Makefile.am b/Makefile.am
+index 634bd4c..c7cbae7 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,6 +1,6 @@
+ MAINTAINERCLEANFILES = Makefile Makefile.in config.cache
+ EXTRA_DIST=LICENSE m4
+-SUBDIRS = mimetic doc examples test win32
++SUBDIRS = mimetic doc examples win32
+ INCLUDES=-I$(top_srcdir)
+ ACLOCAL_AMFLAGS=-I m4
+
+diff --git a/configure.in b/configure.in
+index 5e8f3d4..af1018e 100644
+--- a/configure.in
++++ b/configure.in
+@@ -30,7 +30,7 @@ debug_enabled=false
+ dnl CFLAGS and CXXFLAGS default to -O2 -g
+
+ dnl CXXFLAGS="$CXXFLAGS -DNDEBUG -fno-exceptions"
+-CXXFLAGS="$CXXFLAGS -DNDEBUG"
++CXXFLAGS="$CXXFLAGS -DNDEBUG -Wno-narrowing"
+
+ AC_ARG_ENABLE(debug,
+   [  --enable-debug[=LEVEL]  enables debug symbols [default=2]],
meta-oe/recipes-support/libmimetic/libmimetic_0.9.8.bb new file +19 -1
new file mode 100644
index 000000000..a0a704188
@@ -0,0 +1,19 @@
+# Released under the MIT license.
+
+SUMMARY = "Mimetic Library for multi-part parsing"
+DESCRIPTION = "Email library (MIME) written in C++ designed to be easy to use and integrate but yet fast and efficient."
+AUTHOR = "Stefano Barbato <[email protected]>"
+HOMEPAGE = "http://www.codesink.org/mimetic_mime_library.html"
+BUGTRACKER = "https://github.com/LadislavSopko/mimetic/issues"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b49da7df0ca479ef01ff7f2d799eabee"
+
+SRCREV = "50486af99b4f9b35522d7b3de40b6ce107505279"
+SRC_URI += "git://github.com/LadislavSopko/mimetic/ \
+            file://config.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit autotools
--

2.21.0

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel