diff options
Diffstat (limited to 'user/exiv2')
-rw-r--r-- | user/exiv2/APKBUILD | 38 | ||||
-rw-r--r-- | user/exiv2/disable-icc-test.patch | 76 | ||||
-rw-r--r-- | user/exiv2/musl-strerror.patch | 20 |
3 files changed, 118 insertions, 16 deletions
diff --git a/user/exiv2/APKBUILD b/user/exiv2/APKBUILD index 791fcb610..7f8f5ea1e 100644 --- a/user/exiv2/APKBUILD +++ b/user/exiv2/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=exiv2 -pkgver=0.27.2 +pkgver=0.27.5 pkgrel=0 pkgdesc="Exif, IPTC and XMP metadata library and tools" url="https://www.exiv2.org/" @@ -8,10 +8,13 @@ arch="all" license="GPL-2.0+" depends="" depends_dev="expat-dev zlib-dev" -makedepends="$depends_dev bash cmake" checkdepends="python3 libxml2 cmd:which" +makedepends="$depends_dev bash cmake gtest gtest-dev" subpackages="$pkgname-dev $pkgname-doc" -source="http://www.exiv2.org/builds/exiv2-$pkgver-Source.tar.gz" +source="https://github.com/Exiv2/exiv2/releases/download/v$pkgver/exiv2-$pkgver-Source.tar.gz + disable-icc-test.patch + musl-strerror.patch + " builddir="$srcdir/$pkgname-$pkgver-Source" # secfixes: @@ -82,28 +85,31 @@ builddir="$srcdir/$pkgname-$pkgver-Source" # - CVE-2019-13112 # - CVE-2019-13113 # - CVE-2019-13114 - -prepare() { - default_prepare - mkdir build -} +# 0.27.2-r1: +# - CVE-2019-17402 +# 0.27.2-r2: +# - CVE-2019-20421 build() { - cd "$builddir/build" cmake -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=/usr/lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo .. - make + -DCMAKE_BUILD_TYPE=RelWithDebInfo -Bbuild \ + -DEXIV2_BUILD_UNIT_TESTS=On + make -C build } check() { - cd "$builddir/build" - make tests + # addition overflow doesn't occur on 64-bit platforms + rm -f tests/bugfixes/github/test_CVE_2018_12265.py + # endian-dependent JP2 stuff + rm -f tests/bugfixes/github/test_issue_1522.py + make -C build tests } package() { - cd "$builddir/build" - make DESTDIR="$pkgdir" install + make DESTDIR="$pkgdir" -C build install } -sha512sums="39eb7d920dce18b275ac66f4766c7c73f7c72ee10e3e1e43d84c611b24f48ce20a70eac6d53948914e93242a25b8b52cc4bc760ee611ddcd77481306c1f9e721 exiv2-0.27.2-Source.tar.gz" +sha512sums="0f2d2dfbc976052a428dfeb597225d3ea3c725f584d05b99316bd4aa9cbf0ba5e1e37bcde71f9041975cf003b4fdb578c559adb144268d784bfd64494f451491 exiv2-0.27.5-Source.tar.gz +2fffbcd214db0e917479b970937769b66eb52cd41c34b3c676a17fa7ca7e327b61014c160d56257981459040ce7ab4cf2516db09b4095473e002a75101de6631 disable-icc-test.patch +d148225d634dbdaeceb8fe57f4752a270c428bf0d05900322f7783f0c874a375198f96697c0aa3c4f972346aca44db3c08f15bba2eb40a2247f174dee8a1d150 musl-strerror.patch" diff --git a/user/exiv2/disable-icc-test.patch b/user/exiv2/disable-icc-test.patch new file mode 100644 index 000000000..3f2c39fd5 --- /dev/null +++ b/user/exiv2/disable-icc-test.patch @@ -0,0 +1,76 @@ +diff -ur a/tests/bash_tests/testcases.py b/tests/bash_tests/testcases.py +--- a/tests/bash_tests/testcases.py 2022-02-05 18:26:24.330000000 +0000 ++++ b/tests/bash_tests/testcases.py 2022-02-05 18:26:50.260000000 +0000 +@@ -440,72 +440,6 @@ + BT.reportTest('geotag-test', out) + + +- def icc_test(self): +- # Test driver for exiv2.exe ICC support (-pS, -pC, -eC, -iC) +- +- def test1120(img): +- # --comment and -dc clobbered by writing ICC/JPG +- out = BT.Output() +- if img == 'Reagan2.jp2': +- return +- if img == 'exiv2-bug1199.webp': +- out += BT.Executer('exiv2 --comment abcdefg {img}', vars(), assert_returncode=[0, 1]) +- out += BT.Executer('exiv2 -pS {img}', vars()) +- out += '' +- else: +- out += BT.Executer('exiv2 --comment abcdefg {img}', vars()) +- out += BT.Executer('exiv2 -pS {img}', vars()) +- out += BT.Executer('exiv2 -pc {img}', vars()) +- out += BT.Executer('exiv2 -dc {img}', vars()) +- out += BT.Executer('exiv2 -pS {img}', vars()) +- return str(out) or None +- +- # num = 1074 # ICC Profile Support +- out = BT.Output() +- for img in ['Reagan.jpg' +- ,'exiv2-bug1199.webp' +- ,'ReaganLargePng.png' +- ,'ReaganLargeJpg.jpg' +- ,'Reagan2.jp2' # 1272 ReaganLargeTiff.tiff +- ]: +- stub = img.split('.')[0] +- iccname = stub + '.icc' +- +- for i in ['large.icc', 'small.icc', img]: +- BT.copyTestFile(i) +- +- out += BT.Executer('exiv2 -pS {img}', vars()) +- e = BT.Executer('exiv2 -pC {img}', vars(), compatible_output=False, decode_output=False) +- BT.save(e.stdout, stub + '_1.icc') +- out += BT.Executer('exiv2 -eC --force {img}', vars()) +- BT.mv(iccname, stub + '_2.icc') +- out += test1120(img) +- +- BT.copyTestFile('large.icc', iccname) +- out += BT.Executer('exiv2 -iC {img}', vars()) +- e = BT.Executer('exiv2 -pC {img}', vars(), compatible_output=False, decode_output=False) +- BT.save(e.stdout, stub + '_large_1.icc') +- out += BT.Executer('exiv2 -pS {img}', vars()) +- out += BT.Executer('exiv2 -eC --force {img}', vars()) +- BT.mv(iccname, stub + '_large_2.icc') +- out += test1120(img) +- +- BT.copyTestFile('small.icc', iccname) +- out += BT.Executer('exiv2 -iC {img}', vars()) +- e = BT.Executer('exiv2 -pC {img}', vars(), compatible_output=False, decode_output=False) +- BT.save(e.stdout, stub + '_small_1.icc') +- out += BT.Executer('exiv2 -pS {img}', vars()) +- out += BT.Executer('exiv2 -eC --force {img}', vars()) +- BT.mv(iccname, stub + '_small_2.icc') +- out += test1120(img) +- +- for f in [stub, stub + '_small', stub + '_large']: +- for i in [1, 2]: +- out += BT.md5sum('{}_{}.icc'.format(f, i)) +- +- BT.reportTest('icc-test', out) +- +- + def image_test(self): + test_files = ['table.jpg', 'smiley1.jpg', 'smiley2.jpg'] + erase_test_files = [ diff --git a/user/exiv2/musl-strerror.patch b/user/exiv2/musl-strerror.patch new file mode 100644 index 000000000..c425eaf8d --- /dev/null +++ b/user/exiv2/musl-strerror.patch @@ -0,0 +1,20 @@ +--- exiv2-0.27.5-Source/unitTests/test_futils.cpp.old 2021-10-21 12:01:10.000000000 -0500 ++++ exiv2-0.27.5-Source/unitTests/test_futils.cpp 2022-06-10 01:07:12.090519526 -0500 +@@ -53,7 +53,7 @@ + #elif defined(__NetBSD__) + const char * expectedString = "Undefined error: 0 (errno = 0)"; + #else +- const char * expectedString = "Success (errno = 0)"; ++ const char * expectedString = "No error information (errno = 0)"; + #endif + std::remove(tmpFile.c_str()); + ASSERT_STREQ(expectedString, strError().c_str()); +@@ -81,7 +81,7 @@ + #elif defined(__NetBSD__) + const char * expectedString = "Unknown error: 9999 (errno = 9999)"; + #else +- const char * expectedString = "Unknown error 9999 (errno = 9999)"; ++ const char * expectedString = "No error information (errno = 9999)"; + #endif + ASSERT_STREQ(expectedString, strError().c_str()); + } |