From 5421d6eab768f8d7d8e5d7ab4983f0c37be9de1d36848fed84d29173a3bb0e3f Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 21 Apr 2023 17:45:36 +0000 Subject: [PATCH] Accepting request 1082111 from home:iznogood:branches:devel:libraries:c_c++ - Update to version 2.7.0: * Fix memory unsafe behavior when valstack size limit hit in call setup * Fix a realloc() memory leak triggered when (1) previous allocation exists, (2) new realloc size is 0, (3) GC is triggered before first realloc() attempt * Fix void pointer arithmetic in duk_alloc_pool.c, caused problems with MSVC * Fix broken bytecode dump on big endian architectures * Fix DUK_USE_GET_RANDOM_DOUBLE() argument handling * Use yaml.safe_load() instead of yaml.load() in Py2 tooling * Dist makefile and pkg-config improvements * Fix Makefile.jsoncbor build * Reformat source with clang-format-12 - Bump sover define following upstream changes. - Rebase duktape-link-m.patch with quilt. - Drop pc.in file, no longer needed. - Pass the needed prefixes etc to make_build and make_install. - Use ldconfig_scriptlets macro. OBS-URL: https://build.opensuse.org/request/show/1082111 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/duktape?expand=0&rev=21 --- duktape-2.6.0.tar.xz | 3 --- duktape-2.7.0.tar.xz | 3 +++ duktape-link-m.patch | 16 ++++++++-------- duktape.changes | 23 +++++++++++++++++++++++ duktape.pc.in | 10 ---------- duktape.spec | 30 +++++++----------------------- 6 files changed, 41 insertions(+), 44 deletions(-) delete mode 100644 duktape-2.6.0.tar.xz create mode 100644 duktape-2.7.0.tar.xz delete mode 100644 duktape.pc.in diff --git a/duktape-2.6.0.tar.xz b/duktape-2.6.0.tar.xz deleted file mode 100644 index f704956..0000000 --- a/duktape-2.6.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:96f4a05a6c84590e53b18c59bb776aaba80a205afbbd92b82be609ba7fe75fa7 -size 1035160 diff --git a/duktape-2.7.0.tar.xz b/duktape-2.7.0.tar.xz new file mode 100644 index 0000000..3e8f26b --- /dev/null +++ b/duktape-2.7.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90f8d2fa8b5567c6899830ddef2c03f3c27960b11aca222fa17aa7ac613c2890 +size 1026524 diff --git a/duktape-link-m.patch b/duktape-link-m.patch index dd0a040..fec7bc1 100644 --- a/duktape-link-m.patch +++ b/duktape-link-m.patch @@ -1,18 +1,18 @@ -Index: duktape-2.6.0/Makefile.sharedlibrary +Index: duktape-2.7.0/Makefile.sharedlibrary =================================================================== ---- duktape-2.6.0.orig/Makefile.sharedlibrary -+++ duktape-2.6.0/Makefile.sharedlibrary -@@ -63,11 +63,11 @@ all: libduktape.$(SO_REALNAME_SUFFIX) li +--- duktape-2.7.0.orig/Makefile.sharedlibrary ++++ duktape-2.7.0/Makefile.sharedlibrary +@@ -71,11 +71,11 @@ all: libduktape.$(SO_REALNAME_SUFFIX) li libduktape.$(SO_REALNAME_SUFFIX): - $(CC) -shared -fPIC -Wall -Wextra -Os -Wl,$(LD_SONAME_ARG),libduktape.$(SO_SONAME_SUFFIX) \ + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fPIC -Wall -Wextra -Os -Wl,$(LD_SONAME_ARG),libduktape.$(SO_SONAME_SUFFIX) \ - -o $@ $(DUKTAPE_SRCDIR)/duktape.c + -o $@ $(DUKTAPE_SRCDIR)/duktape.c -lm libduktaped.$(SO_REALNAME_SUFFIX): - $(CC) -shared -fPIC -g -Wall -Wextra -Os -Wl,$(LD_SONAME_ARG),libduktaped.$(SO_SONAME_SUFFIX) \ + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fPIC -g -Wall -Wextra -Os -Wl,$(LD_SONAME_ARG),libduktaped.$(SO_SONAME_SUFFIX) \ - -o $@ $(DUKTAPE_SRCDIR)/duktape.c + -o $@ $(DUKTAPE_SRCDIR)/duktape.c -lm - # Symlinks depend on platform conventions. - .PHONY: install + duktape.pc: + sed -e "s|@PREFIX@|$(INSTALL_PREFIX)|" \ diff --git a/duktape.changes b/duktape.changes index c92bb7b..9e20dd3 100644 --- a/duktape.changes +++ b/duktape.changes @@ -1,3 +1,26 @@ +------------------------------------------------------------------- +Wed Apr 12 03:45:45 UTC 2023 - Bjørn Lie + +- Update to version 2.7.0: + * Fix memory unsafe behavior when valstack size limit hit in + call setup + * Fix a realloc() memory leak triggered when (1) previous + allocation exists, (2) new realloc size is 0, (3) GC is + triggered before first realloc() attempt + * Fix void pointer arithmetic in duk_alloc_pool.c, caused + problems with MSVC + * Fix broken bytecode dump on big endian architectures + * Fix DUK_USE_GET_RANDOM_DOUBLE() argument handling + * Use yaml.safe_load() instead of yaml.load() in Py2 tooling + * Dist makefile and pkg-config improvements + * Fix Makefile.jsoncbor build + * Reformat source with clang-format-12 +- Bump sover define following upstream changes. +- Rebase duktape-link-m.patch with quilt. +- Drop pc.in file, no longer needed. +- Pass the needed prefixes etc to make_build and make_install. +- Use ldconfig_scriptlets macro. + ------------------------------------------------------------------- Mon Nov 28 10:47:19 UTC 2022 - Marcus Meissner diff --git a/duktape.pc.in b/duktape.pc.in deleted file mode 100644 index 085a6e7..0000000 --- a/duktape.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=${prefix} -libdir=${exec_prefix}/@libdir@ -includedir=${prefix}/include - -Name: duktape -Description: Embeddable Javascript engine -Version: @PACKAGE_VERSION@ -Libs: -L${libdir} -lduktape -Cflags: -I${includedir}/ diff --git a/duktape.spec b/duktape.spec index 93c7fa7..83dab86 100644 --- a/duktape.spec +++ b/duktape.spec @@ -1,7 +1,7 @@ # # spec file for package duktape # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,16 +16,15 @@ # -%define sover 206 +%define sover 207 Name: duktape -Version: 2.6.0 +Version: 2.7.0 Release: 0 Summary: Embeddable Javascript engine License: MIT Group: Development/Libraries/C and C++ URL: https://duktape.org/ Source0: https://duktape.org/%{name}-%{version}.tar.xz -Source1: duktape.pc.in Patch0: duktape-link-m.patch BuildRequires: gcc BuildRequires: pkgconfig @@ -55,30 +54,15 @@ This package contains header files and libraries needed to develop application that use %{name}. %prep -%setup -q -%patch0 -p1 - -sed -e's|@prefix@|%{_prefix}|' \ - -e's|@libdir@|%{_lib}|' \ - -e's|@PACKAGE_VERSION@|%{version}|' \ - < %{SOURCE1} > %{name}.pc.in +%autosetup -p1 %build -sed -e '/^INSTALL_PREFIX/s|[^=]*$|%{_prefix}|' \ - -e 's/\(-o.*\)/%{optflags} \1/' \ - -e '/install\:/a\\tinstall -d $(DESTDIR)$(INSTALL_PREFIX)/%{_lib}\n\tinstall -d $(DESTDIR)$(INSTALL_PREFIX)/include' \ - -e 's/\(\$.INSTALL_PREFIX.\)/$(DESTDIR)\1/' \ - -e 's/\/lib\b/\/%{_lib}/g' \ - < Makefile.sharedlibrary > Makefile -%make_build +%make_build -f Makefile.sharedlibrary INSTALL_PREFIX=%{_prefix} LIBDIR=/%{_lib} %install -%make_install +%make_install -f Makefile.sharedlibrary INSTALL_PREFIX=%{_prefix} LIBDIR=/%{_lib} -install -Dm0644 %{name}.pc.in %{buildroot}%{_libdir}/pkgconfig/%{name}.pc - -%post -n lib%{name}%{sover} -p /sbin/ldconfig -%postun -n lib%{name}%{sover} -p /sbin/ldconfig +%ldconfig_scriptlets -n lib%{name}%{sover} %files -n lib%{name}%{sover} %doc AUTHORS.rst