diff mbox series

[meta-oe,PATCHv3] wavpack: upgrade 5.1.0 -> 5.6.0

Message ID 20240108181014.321844-1-alperyasinak1@gmail.com
State Accepted
Headers show
Series [meta-oe,PATCHv3] wavpack: upgrade 5.1.0 -> 5.6.0 | expand

Commit Message

Alper Ak Jan. 8, 2024, 6:10 p.m. UTC
* Added patches to fix -> unversioned.so was causing incorrect packaging and errors.

* Added openssl as a depends because trying to link with native libcrypto in some builds -> lib32-wavpack/5.6.0/recipe-sysroot-native/usr/lib/libcrypto.so: file not recognized: file format not recognized

* License-Update: Copyright year changes

Changelog:

* added: AIFF file import/export support
* added: WATCOM compiler and OS/2 support
* added: cmake support for mingw, builds Cooledit + Winamp plugins
* added: --force-even-byte-depth option for rounding up bit depths
* fixed: detect and report PCM files having non-zero padding bits
* fixed: possible crash when displaying long channel assignments
* fixed: big-endian-sourced "raw" files gave big-endian "wav"s
* fixed: numerous minor issues
* fixed: CVE-2021-44269 (encoding crafted DSD file triggers OOB read crash)
* fixed: very long filenames cause stack-overflow crash in all CLI programs
* fixed: the length stored in WAV headers not always corrected when using -i
* fixed: attempting to encode raw DSD audio from stdin sometimes causes crash
* fixed: DSD to PCM decimation: small clicks between tracks and tiny DC offset
* fixed: length update in library-generated WAV headers on big-endian machines
* fixed: sanitize custom extensions read from WavPack files to be alphanumeric
* added: accepting brace-delimited options in the wavpack executable filename
* added: "--drop" option to Windows executables for multi-file "drag-and-drop"
* added" "--raw-pcm" option to wvunpack executable (does DSD --> 24-bit PCM)
* added: "--no-overwrite" option to wavpack executable (to resume sessions)
* improved: build system clean-up including switch to non-recursive "make"
* fixed: potential security issue CVE-2020-35738
* fixed: disable A32 asm code when building for Apple silicon
* fixed: issues with Adobe-style floating-point WAV files
* added: -vv option to wvunpack to quickly verify using just
     block checksums (ideal for detecting corrupted files)
* added: --normalize-floats option to wvunpack for correctly
     exporting un-normalized floating-point files
* updated: Visual Studio 2019 for Windows builds
* dropped: WinXP support in official binaries
* fixed: OSS-Fuzz issues 19925, 19928, 20060, 20448
      (no CVEs or vulnerabilities)
* fixed: trailing garbage characters on imported ID3v2 TXXX tags
* fixed: various minor undefined behavior and memory access issues
* fixed: sanitize tag extraction names for length and path inclusion
* improved: reformat wvunpack "help" and split into long + short versions
* added: regression testing to Travis CI for OSS-Fuzz crashers
* fixed: potential security issues including the following CVEs:
     CVE-2018-19840 CVE-2018-19841 CVE-2018-10536
     CVE-2018-10537 CVE-2018-10538 CVE-2018-10539
     CVE-2018-10540 CVE-2018-7254  CVE-2018-7253
     CVE-2018-6767
* added: support for CMake, Travis CI, and Google's OSS-fuzz
* fixed: use correction file for encode verify (pipe input, Windows)
* fixed: correct WAV header with actual length (pipe input, -i option)
* fixed: thumb interworking and not needing v6 architecture (ARM asm)
* added: handle more ID3v2.3 tag items and from all file types
* fixed: coredump on Sparc64 (changed MD5 implementation)
* fixed: handle invalid ID3v2.3 tags from sacd-ripper
* fixed: several corner-case memory leaks

Signed-off-by: alperak <alperyasinak1@gmail.com>
---
 ...act-libtool-and-convert-to-soversion.patch | 35 +++++++++++++++++++
 .../files/set-soversion-and-version.patch     | 26 ++++++++++++++
 .../wavpack/wavpack_5.1.0.bb                  |  9 -----
 .../wavpack/wavpack_5.6.0.bb                  | 18 ++++++++++
 4 files changed, 79 insertions(+), 9 deletions(-)
 create mode 100644 meta-oe/recipes-multimedia/wavpack/files/extract-libtool-and-convert-to-soversion.patch
 create mode 100644 meta-oe/recipes-multimedia/wavpack/files/set-soversion-and-version.patch
 delete mode 100644 meta-oe/recipes-multimedia/wavpack/wavpack_5.1.0.bb
 create mode 100644 meta-oe/recipes-multimedia/wavpack/wavpack_5.6.0.bb

Comments

Ross Burton Jan. 9, 2024, 11:31 a.m. UTC | #1
> On 8 Jan 2024, at 18:10, Alper Ak via lists.openembedded.org <alperyasinak1=gmail.com@lists.openembedded.org> wrote:
> 
> -inherit autotools lib_package

You removed lib_package, which will change the packaging.  Always remember to check the packaging only changes in ways you expect (buildhistory-diff is very useful for this):

packages/cortexa57-poky-linux/wavpack: PACKAGES: removed "wavpack-bin”

This is because you removed lib_package, which adds that package.  This class pulls ${bindir} into ${PN}-bin, so the main package is _just_ the library.  Of course there may be no binaries in bindir so it could have been a redundant inherit.

packages/cortexa57-poky-linux/wavpack/wavpack: PKG changed from libwavpack1 to wavpack [default] - may indicate debian renaming failure

This is what happens when the base package used to just contain a library (so it gets renamed to reflect the library name) and now doesn’t, so can’t be renamed. This suggests that it was not a redundant inherit after all.

packages/cortexa57-poky-linux/wavpack/wavpack: FILELIST: removed "/usr/lib/libwavpack.so.1.2.0", added "/usr/bin/wavpack /usr/bin/wvgain /usr/lib/libwavpack.so.1.2.5 /usr/bin/wvunpack /usr/bin/wvtag”

Here we can see .so.1.2.0 being replaced with .so.1.2.5 which is expected, but also ${bindir} being added as the -bin package no longer exists.  This is wrong and lib_package should be inherited.

packages/cortexa57-poky-linux/wavpack/wavpack-dev: RRECOMMENDS: added "openssl-dev”

This is expected as you depend on openssl now.

packages/cortexa57-poky-linux/wavpack/wavpack-doc: FILELIST: removed all items "/usr/share/man/man1/wavpack.1 /usr/share/man/man1/wvunpack.1 /usr/share/man/man1/wvtag.1 /usr/share/man/man1/wvgain.1”
packages/cortexa57-poky-linux/wavpack/wavpack-doc: PKGSIZE changed from 25522 to 0 (-100%)

Manpages disappeared too.  Do they need to be enabled, or were they removed?

Ross
Alper Ak Jan. 9, 2024, 1:07 p.m. UTC | #2
Thanks for the tips. I clearly understood when "lib_package" should and
should not be used with the examples you have shown.

> Manpages disappeared too.  Do they need to be enabled, or were they
removed?

I thought there should be no manpages in target so removed with cmake
option. I guess, I should have created packageconfigs for both "manpages"
and "shared lib" options and enable only shared lib in bb. If people don't
want to use shared lib or want to add manpages, it can be added from
bbappend.

Best Regards,
Alper Ak


Ross Burton <Ross.Burton@arm.com>, 9 Oca 2024 Sal, 14:32 tarihinde şunu
yazdı:

>
>
> > On 8 Jan 2024, at 18:10, Alper Ak via lists.openembedded.org
> <alperyasinak1=gmail.com@lists.openembedded.org> wrote:
> >
> > -inherit autotools lib_package
>
> You removed lib_package, which will change the packaging.  Always remember
> to check the packaging only changes in ways you expect (buildhistory-diff
> is very useful for this):
>
> packages/cortexa57-poky-linux/wavpack: PACKAGES: removed "wavpack-bin”
>
> This is because you removed lib_package, which adds that package.  This
> class pulls ${bindir} into ${PN}-bin, so the main package is _just_ the
> library.  Of course there may be no binaries in bindir so it could have
> been a redundant inherit.
>
> packages/cortexa57-poky-linux/wavpack/wavpack: PKG changed from
> libwavpack1 to wavpack [default] - may indicate debian renaming failure
>
> This is what happens when the base package used to just contain a library
> (so it gets renamed to reflect the library name) and now doesn’t, so can’t
> be renamed. This suggests that it was not a redundant inherit after all.
>
> packages/cortexa57-poky-linux/wavpack/wavpack: FILELIST: removed
> "/usr/lib/libwavpack.so.1.2.0", added "/usr/bin/wavpack /usr/bin/wvgain
> /usr/lib/libwavpack.so.1.2.5 /usr/bin/wvunpack /usr/bin/wvtag”
>
> Here we can see .so.1.2.0 being replaced with .so.1.2.5 which is expected,
> but also ${bindir} being added as the -bin package no longer exists.  This
> is wrong and lib_package should be inherited.
>
> packages/cortexa57-poky-linux/wavpack/wavpack-dev: RRECOMMENDS: added
> "openssl-dev”
>
> This is expected as you depend on openssl now.
>
> packages/cortexa57-poky-linux/wavpack/wavpack-doc: FILELIST: removed all
> items "/usr/share/man/man1/wavpack.1 /usr/share/man/man1/wvunpack.1
> /usr/share/man/man1/wvtag.1 /usr/share/man/man1/wvgain.1”
> packages/cortexa57-poky-linux/wavpack/wavpack-doc: PKGSIZE changed from
> 25522 to 0 (-100%)
>
> Manpages disappeared too.  Do they need to be enabled, or were they
> removed?
>
> Ross
Ross Burton Jan. 9, 2024, 1:12 p.m. UTC | #3
On 9 Jan 2024, at 13:07, Alper Ak <alperyasinak1@gmail.com> wrote:
> I thought there should be no manpages in target so removed with cmake option. I guess, I should have created packageconfigs for both "manpages" and "shared lib" options and enable only shared lib in bb. If people don't want to use shared lib or want to add manpages, it can be added from bbappend.

If the manpages are trivial to build or pregenerated, then just always install them and let the packaging do its thing (put them into -doc so they’re not installed by default, but there if needed).

We only need PACKAGECONFIGs for things like full API documentation that takes five minutes to build and more build dependencies.

Ross
diff mbox series

Patch

diff --git a/meta-oe/recipes-multimedia/wavpack/files/extract-libtool-and-convert-to-soversion.patch b/meta-oe/recipes-multimedia/wavpack/files/extract-libtool-and-convert-to-soversion.patch
new file mode 100644
index 000000000..11e45938d
--- /dev/null
+++ b/meta-oe/recipes-multimedia/wavpack/files/extract-libtool-and-convert-to-soversion.patch
@@ -0,0 +1,35 @@ 
+From 25e12cf5918884f232cebc34c92bd548fe40c2b3 Mon Sep 17 00:00:00 2001
+From: Anonymous Maarten <anonymous.maarten@gmail.com>
+Date: Fri, 9 Dec 2022 19:13:09 +0100
+Subject: [PATCH] cmake: extract libtool from configure.ac and convert to
+ SOVERSION
+
+Upstream-Status: Backport [https://github.com/dbry/WavPack/commit/25e12cf5918884f232cebc34c92bd548fe40c2b3]
+Signed-off-by: alperak <alperyasinak1@gmail.com>
+---
+ CMakeLists.txt | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index adc73b09..7ae5043f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -2,6 +2,18 @@ cmake_minimum_required(VERSION 3.2)
+ 
+ project(WavPack VERSION 5.6.0)
+ 
++file(READ "${CMAKE_CURRENT_SOURCE_DIR}/configure.ac" CONFIGURE_AC)
++string(REGEX MATCH "LT_CURRENT=([0-9]+)" LT_CURRENT "${CONFIGURE_AC}")
++set(LT_CURRENT "${CMAKE_MATCH_1}")
++string(REGEX MATCH "LT_REVISION=([0-9]+)" LT_REVISION "${CONFIGURE_AC}")
++set(LT_REVISION "${CMAKE_MATCH_1}")
++string(REGEX MATCH "LT_AGE=([0-9]+)" LT_AGE "${CONFIGURE_AC}")
++set(LT_AGE "${CMAKE_MATCH_1}")
++
++math(EXPR SOVERSION_MAJOR "${LT_CURRENT}-${LT_AGE}")
++math(EXPR SOVERSION_MINOR "${LT_AGE}")
++math(EXPR SOVERSION_MICRO "${LT_REVISION}")
++
+ # Languages
+ 
+ include(CheckLanguage)
diff --git a/meta-oe/recipes-multimedia/wavpack/files/set-soversion-and-version.patch b/meta-oe/recipes-multimedia/wavpack/files/set-soversion-and-version.patch
new file mode 100644
index 000000000..faddb7b75
--- /dev/null
+++ b/meta-oe/recipes-multimedia/wavpack/files/set-soversion-and-version.patch
@@ -0,0 +1,26 @@ 
+From 7c1dd729302b7f77f65884df4e79301df1490423 Mon Sep 17 00:00:00 2001
+From: Anonymous Maarten <anonymous.maarten@gmail.com>
+Date: Fri, 9 Dec 2022 19:23:51 +0100
+Subject: [PATCH] cmake: set SOVERSION and VERSION property of wavpack
+
+This is used to version .so libraries on Linux
+
+Upstream-Status: Backport [https://github.com/dbry/WavPack/commit/7c1dd729302b7f77f65884df4e79301df1490423]
+Signed-off-by: alperak <alperyasinak1@gmail.com>
+---
+ CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7ae5043f..285b295b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -361,6 +361,8 @@ if(BUILD_SHARED_LIBS)
+         target_link_directories(wavpack PRIVATE "-Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/libwavpack.sym")
+     endif()
+   else()
++    set_target_properties(wavpack PROPERTIES SOVERSION "${SOVERSION_MAJOR}")
++    set_target_properties(wavpack PROPERTIES VERSION "${SOVERSION_MAJOR}.${SOVERSION_MINOR}.${SOVERSION_MICRO}")
+     set(CONFTTEST_CONTENTS "VERS_1 {\n    global: sym;\n};\n\nVERS_2 {\n    global: sym;\n} VERS_1;\n")
+     file(WRITE ${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/conftest.map "${CONFTTEST_CONTENTS}")
+     check_c_linker_flag("-Wl,--version-script=${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/conftest.map" COMPILER_SUPPORTS_SYMBOL_MAPS)
diff --git a/meta-oe/recipes-multimedia/wavpack/wavpack_5.1.0.bb b/meta-oe/recipes-multimedia/wavpack/wavpack_5.1.0.bb
deleted file mode 100644
index 909612393..000000000
--- a/meta-oe/recipes-multimedia/wavpack/wavpack_5.1.0.bb
+++ /dev/null
@@ -1,9 +0,0 @@ 
-DESCRIPTION = "WavPack is a completely open audio compression format providing lossless, high-quality lossy, and a unique hybrid compression mode."
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://license.txt;md5=8c1a910e5c2a8b30ec8ffb2ffa63d9b2"
-
-SRC_URI = "git://github.com/dbry/WavPack.git;branch=master;protocol=https"
-SRCREV = "9ccc3fe4a37d069137ceabe513a4dd9b0a09c1c2"
-S = "${WORKDIR}/git"
-
-inherit autotools lib_package
diff --git a/meta-oe/recipes-multimedia/wavpack/wavpack_5.6.0.bb b/meta-oe/recipes-multimedia/wavpack/wavpack_5.6.0.bb
new file mode 100644
index 000000000..6773c1d97
--- /dev/null
+++ b/meta-oe/recipes-multimedia/wavpack/wavpack_5.6.0.bb
@@ -0,0 +1,18 @@ 
+DESCRIPTION = "WavPack is a completely open audio compression format providing lossless, high-quality lossy, and a unique hybrid compression mode."
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://license.txt;md5=bb5d037e3ad41a3c84c9f2d8bb65a7b4"
+
+DEPENDS = "openssl"
+
+SRC_URI = "git://github.com/dbry/WavPack.git;branch=master;protocol=https \
+	    file://set-soversion-and-version.patch \
+	    file://extract-libtool-and-convert-to-soversion.patch \
+	   "
+
+SRCREV = "e03e8e29dc618e08e7baba9636e57ba1254874ce"
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig
+
+EXTRA_OECMAKE += "-DWAVPACK_INSTALL_DOCS=OFF -DBUILD_SHARED_LIBS=ON"