Message ID | 20250930091841.1693131-2-ankur.tyagi85@gmail.com |
---|---|
State | New |
Headers | show |
Series | cherry-picks from master branch (batch-3) | expand |
I am not able to accept relicensed updates in stable branches. If you could send that CVE patch separately, that would be nice though... (if you have time for that) On 9/30/25 11:18, Ankur Tyagi wrote: > From: Gyorgy Sarvari <skandigraun@gmail.com> > > Switched to cmake. Added a backported patch to be able to use > the latest version of cmake. > > Also, add a new patch to avoid overwritingg all the CFLAGS set by Yocto, > which helps with avoiding the inclusion of TMPDIR in the generated files. > > License-Update: License changed to Apache2: > https://github.com/HardySimpson/zlog/commit/1a7b1a6fb956b92a4079ccc91f30da21f34ca063 > > Changelog: > 1.2.18: > - patched severe vulnerability CVE-2024-22857 > - restructured build system > > 1.2.17: > - Change Lience to Apache 2.0, for more people > > Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> > Signed-off-by: Khem Raj <raj.khem@gmail.com> > (cherry picked from commit 8891ca87488384c0ab65b5d77c1278187080753d) > Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com> > --- > ...01-Don-t-overwrite-systemwide-cflags.patch | 31 +++++++++++++++++++ > .../files/upgrade_cmake_minimum_version.patch | 25 +++++++++++++++ > meta-oe/recipes-extended/zlog/zlog_1.2.16.bb | 17 ---------- > meta-oe/recipes-extended/zlog/zlog_1.2.18.bb | 14 +++++++++ > 4 files changed, 70 insertions(+), 17 deletions(-) > create mode 100644 meta-oe/recipes-extended/zlog/files/0001-Don-t-overwrite-systemwide-cflags.patch > create mode 100644 meta-oe/recipes-extended/zlog/files/upgrade_cmake_minimum_version.patch > delete mode 100644 meta-oe/recipes-extended/zlog/zlog_1.2.16.bb > create mode 100644 meta-oe/recipes-extended/zlog/zlog_1.2.18.bb > > diff --git a/meta-oe/recipes-extended/zlog/files/0001-Don-t-overwrite-systemwide-cflags.patch b/meta-oe/recipes-extended/zlog/files/0001-Don-t-overwrite-systemwide-cflags.patch > new file mode 100644 > index 0000000000..f09f517b98 > --- /dev/null > +++ b/meta-oe/recipes-extended/zlog/files/0001-Don-t-overwrite-systemwide-cflags.patch > @@ -0,0 +1,31 @@ > +From ee35b6507993e79fc594e3b7ad50174e33e68daa Mon Sep 17 00:00:00 2001 > +From: Gyorgy Sarvari <skandigraun@gmail.com> > +Date: Wed, 24 Sep 2025 11:22:29 +0200 > +Subject: [PATCH] Don't overwrite systemwide cflags > + > +Instead of overriding the cflags from the system, just append to them. > + > +Upstream-Status: Submitted [https://github.com/HardySimpson/zlog/pull/306] > + > +Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> > +--- > + CMakeLists.txt | 6 +++--- > + 1 file changed, 3 insertions(+), 3 deletions(-) > + > +diff --git a/CMakeLists.txt b/CMakeLists.txt > +index 8981934..f2bd574 100644 > +--- a/CMakeLists.txt > ++++ b/CMakeLists.txt > +@@ -33,9 +33,9 @@ SET(ZLOG_SO_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}) > + message(STATUS "platform : ${CMAKE_SYSTEM}") > + > + add_definitions("-g -Wall -Wstrict-prototypes") > +-set(CMAKE_C_FLAGS "-std=c99 -pedantic -D_DEFAULT_SOURCE") > +-set(CMAKE_C_FLAGS_DEBUG "-ggdb3 -DDEBUG") > +-set(CMAKE_C_FLAGS_RELEASE "-O2") > ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -pedantic -D_DEFAULT_SOURCE") > ++set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb3 -DDEBUG") > ++set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2") > + > + if (WIN32) > + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 ") > diff --git a/meta-oe/recipes-extended/zlog/files/upgrade_cmake_minimum_version.patch b/meta-oe/recipes-extended/zlog/files/upgrade_cmake_minimum_version.patch > new file mode 100644 > index 0000000000..9d02066d57 > --- /dev/null > +++ b/meta-oe/recipes-extended/zlog/files/upgrade_cmake_minimum_version.patch > @@ -0,0 +1,25 @@ > +From 3715879775f725260aeda14f94887bbc7a007e29 Mon Sep 17 00:00:00 2001 > +From: haydenZhou <mfkhao2009@outlook.com> > +Date: Sun, 8 Jun 2025 10:45:05 +0800 > +Subject: [PATCH] upgrade cmake minimum version > + > +Upstream-Status: Backport [https://github.com/HardySimpson/zlog/commit/3715879775f725260aeda14f94887bbc7a007e29] > + > +Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> > +--- > + CMakeLists.txt | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/CMakeLists.txt b/CMakeLists.txt > +index 5ddaf8d..31a1553 100644 > +--- a/CMakeLists.txt > ++++ b/CMakeLists.txt > +@@ -14,7 +14,7 @@ > + # limitations under the License. > + #/ > + > +-cmake_minimum_required(VERSION 2.8.5) > ++cmake_minimum_required(VERSION 3.12) > + > + message(STATUS "path : ${CMAKE_FIND_ROOT_PATH}") > + project(zlog) > diff --git a/meta-oe/recipes-extended/zlog/zlog_1.2.16.bb b/meta-oe/recipes-extended/zlog/zlog_1.2.16.bb > deleted file mode 100644 > index b75802f09f..0000000000 > --- a/meta-oe/recipes-extended/zlog/zlog_1.2.16.bb > +++ /dev/null > @@ -1,17 +0,0 @@ > -DESCRIPTION = "Zlog is a pure C logging library" > -HOMEPAGE = "https://github.com/HardySimpson/zlog" > -LICENSE = "LGPL-2.1-only" > -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" > - > -SRCREV = "dc2c284664757fce6ef8f96f8b3ab667a53ef489" > -SRC_URI = "git://github.com/HardySimpson/zlog;branch=master;protocol=https" > - > -S = "${WORKDIR}/git" > - > -inherit pkgconfig > - > -EXTRA_OEMAKE = "CC='${CC}' LD='${LD}' LIBRARY_PATH=${baselib}" > - > -do_install() { > - oe_runmake install PREFIX=${D}${exec_prefix} INSTALL=install > -} > diff --git a/meta-oe/recipes-extended/zlog/zlog_1.2.18.bb b/meta-oe/recipes-extended/zlog/zlog_1.2.18.bb > new file mode 100644 > index 0000000000..268f022b51 > --- /dev/null > +++ b/meta-oe/recipes-extended/zlog/zlog_1.2.18.bb > @@ -0,0 +1,14 @@ > +DESCRIPTION = "Zlog is a pure C logging library" > +HOMEPAGE = "https://github.com/HardySimpson/zlog" > +LICENSE = "Apache-2.0" > +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" > + > +SRC_URI = "git://github.com/HardySimpson/zlog;branch=master;protocol=https;tag=${PV} \ > + file://upgrade_cmake_minimum_version.patch \ > + file://0001-Don-t-overwrite-systemwide-cflags.patch" > +SRCREV = "7fe61ca6265516e9327a51fc394b2adb126c2ef3" > + > +S = "${WORKDIR}/git" > + > +inherit cmake > +
diff --git a/meta-oe/recipes-extended/zlog/files/0001-Don-t-overwrite-systemwide-cflags.patch b/meta-oe/recipes-extended/zlog/files/0001-Don-t-overwrite-systemwide-cflags.patch new file mode 100644 index 0000000000..f09f517b98 --- /dev/null +++ b/meta-oe/recipes-extended/zlog/files/0001-Don-t-overwrite-systemwide-cflags.patch @@ -0,0 +1,31 @@ +From ee35b6507993e79fc594e3b7ad50174e33e68daa Mon Sep 17 00:00:00 2001 +From: Gyorgy Sarvari <skandigraun@gmail.com> +Date: Wed, 24 Sep 2025 11:22:29 +0200 +Subject: [PATCH] Don't overwrite systemwide cflags + +Instead of overriding the cflags from the system, just append to them. + +Upstream-Status: Submitted [https://github.com/HardySimpson/zlog/pull/306] + +Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> +--- + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8981934..f2bd574 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -33,9 +33,9 @@ SET(ZLOG_SO_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}) + message(STATUS "platform : ${CMAKE_SYSTEM}") + + add_definitions("-g -Wall -Wstrict-prototypes") +-set(CMAKE_C_FLAGS "-std=c99 -pedantic -D_DEFAULT_SOURCE") +-set(CMAKE_C_FLAGS_DEBUG "-ggdb3 -DDEBUG") +-set(CMAKE_C_FLAGS_RELEASE "-O2") ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -pedantic -D_DEFAULT_SOURCE") ++set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb3 -DDEBUG") ++set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2") + + if (WIN32) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 ") diff --git a/meta-oe/recipes-extended/zlog/files/upgrade_cmake_minimum_version.patch b/meta-oe/recipes-extended/zlog/files/upgrade_cmake_minimum_version.patch new file mode 100644 index 0000000000..9d02066d57 --- /dev/null +++ b/meta-oe/recipes-extended/zlog/files/upgrade_cmake_minimum_version.patch @@ -0,0 +1,25 @@ +From 3715879775f725260aeda14f94887bbc7a007e29 Mon Sep 17 00:00:00 2001 +From: haydenZhou <mfkhao2009@outlook.com> +Date: Sun, 8 Jun 2025 10:45:05 +0800 +Subject: [PATCH] upgrade cmake minimum version + +Upstream-Status: Backport [https://github.com/HardySimpson/zlog/commit/3715879775f725260aeda14f94887bbc7a007e29] + +Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5ddaf8d..31a1553 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,7 +14,7 @@ + # limitations under the License. + #/ + +-cmake_minimum_required(VERSION 2.8.5) ++cmake_minimum_required(VERSION 3.12) + + message(STATUS "path : ${CMAKE_FIND_ROOT_PATH}") + project(zlog) diff --git a/meta-oe/recipes-extended/zlog/zlog_1.2.16.bb b/meta-oe/recipes-extended/zlog/zlog_1.2.16.bb deleted file mode 100644 index b75802f09f..0000000000 --- a/meta-oe/recipes-extended/zlog/zlog_1.2.16.bb +++ /dev/null @@ -1,17 +0,0 @@ -DESCRIPTION = "Zlog is a pure C logging library" -HOMEPAGE = "https://github.com/HardySimpson/zlog" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -SRCREV = "dc2c284664757fce6ef8f96f8b3ab667a53ef489" -SRC_URI = "git://github.com/HardySimpson/zlog;branch=master;protocol=https" - -S = "${WORKDIR}/git" - -inherit pkgconfig - -EXTRA_OEMAKE = "CC='${CC}' LD='${LD}' LIBRARY_PATH=${baselib}" - -do_install() { - oe_runmake install PREFIX=${D}${exec_prefix} INSTALL=install -} diff --git a/meta-oe/recipes-extended/zlog/zlog_1.2.18.bb b/meta-oe/recipes-extended/zlog/zlog_1.2.18.bb new file mode 100644 index 0000000000..268f022b51 --- /dev/null +++ b/meta-oe/recipes-extended/zlog/zlog_1.2.18.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "Zlog is a pure C logging library" +HOMEPAGE = "https://github.com/HardySimpson/zlog" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI = "git://github.com/HardySimpson/zlog;branch=master;protocol=https;tag=${PV} \ + file://upgrade_cmake_minimum_version.patch \ + file://0001-Don-t-overwrite-systemwide-cflags.patch" +SRCREV = "7fe61ca6265516e9327a51fc394b2adb126c2ef3" + +S = "${WORKDIR}/git" + +inherit cmake +