Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] libextractor: update to 1.13.
@ 2024-02-25 20:31 yoshiyoshyosh
  2024-02-26 15:22 ` sgn
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: yoshiyoshyosh @ 2024-02-25 20:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 851 bytes --]

There is a new pull request by yoshiyoshyosh against master on the void-packages repository

https://github.com/yoshiyoshyosh/void-packages libextractor
https://github.com/void-linux/void-packages/pull/48941

libextractor: update to 1.13.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64-glibc`)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - `x86_64-musl`

merge before #43761

no longer needs ffmpeg libraries, replaced with gstreamer. `extract` throws an error with `exiv2` plugin when trying to extract stuff that's not an image, which is apparently intentional (line 605 of `exiv2_extractor.cc`)

A patch file from https://github.com/void-linux/void-packages/pull/48941.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libextractor-48941.patch --]
[-- Type: text/x-diff, Size: 10000 bytes --]

From c53250d9ae687d1d94bb3a0dc9b930e1133fd72e Mon Sep 17 00:00:00 2001
From: yosh <yosh-git@riseup.net>
Date: Sun, 25 Feb 2024 15:21:35 -0500
Subject: [PATCH] libextractor: update to 1.13.

---
 srcpkgs/libextractor/patches/exiv2-0.28.patch | 303 ------------------
 srcpkgs/libextractor/template                 |   9 +-
 2 files changed, 5 insertions(+), 307 deletions(-)
 delete mode 100644 srcpkgs/libextractor/patches/exiv2-0.28.patch

diff --git a/srcpkgs/libextractor/patches/exiv2-0.28.patch b/srcpkgs/libextractor/patches/exiv2-0.28.patch
deleted file mode 100644
index de1b3cee5de50f..00000000000000
--- a/srcpkgs/libextractor/patches/exiv2-0.28.patch
+++ /dev/null
@@ -1,303 +0,0 @@
-Patch based on https://gitlab.archlinux.org/archlinux/packaging/packages/libextractor/-/blob/main/exiv2-0.28.patch,
-with an additional minor change to fix build on 32-bit platforms.
---- a/src/plugins/exiv2_extractor.cc	2023-11-18 14:03:36.454439185 +0000
-+++ b/src/plugins/exiv2_extractor.cc	2023-11-18 14:03:40.462453936 +0000
-@@ -90,7 +90,11 @@
-  * @param rcount number of bytes to read
-  * @return buffer with data read, empty buffer (!) on failure (!)
-  */
-+#if EXIV2_TEST_VERSION (0,28,0)
-+virtual Exiv2::DataBuf read (size_t rcount);
-+#else
- virtual Exiv2::DataBuf read (long rcount);
-+#endif
- 
- /**
-  * Read up to 'rcount' bytes into 'buf'.
-@@ -99,8 +103,17 @@
-  * @param rcount size of 'buf'
-  * @return number of bytes read successfully, 0 on failure (!)
-  */
-+#if EXIV2_TEST_VERSION (0,28,0)
-+virtual size_t read (Exiv2::byte *buf,
-+                   size_t rcount);
-+#else
- virtual long read (Exiv2::byte *buf,
-                    long rcount);
-+#endif
-+
-+#if EXIV2_TEST_VERSION (0,28,0)
-+virtual void populateFakeData();
-+#endif
- 
- /**
-  * Read a single character.
-@@ -117,8 +130,13 @@
-  * @param wcount how many bytes to write
-  * @return -1 (always fails)
-  */
-+#if EXIV2_TEST_VERSION(0,28,0)
-+virtual size_t write (const Exiv2::byte *data,
-+                    size_t wcount);
-+#else
- virtual long write (const Exiv2::byte *data,
-                     long wcount);
-+#endif
- 
- /**
-  * Write to stream.
-@@ -126,7 +144,11 @@
-  * @param src stream to copy
-  * @return -1 (always fails)
-  */
-+#if EXIV2_TEST_VERSION(0,28,0)
-+virtual size_t write (Exiv2::BasicIo &src);
-+#else
- virtual long write (Exiv2::BasicIo &src);
-+#endif
- 
- /**
-  * Write a single byte.
-@@ -150,7 +172,7 @@
-  * @parma pos offset is relative to where?
-  * @return -1 on failure, 0 on success
-  */
--virtual int seek (long offset,
-+virtual int seek (int64_t offset,
-                   Exiv2::BasicIo::Position pos);
- 
- /**
-@@ -172,7 +194,11 @@
-  *
-  * @return -1 on error
-  */
-+#if EXIV2_TEST_VERSION(0,28,0)
-+virtual size_t tell (void) const;
-+#else
- virtual long int tell (void) const;
-+#endif
- 
- /**
-  * Return overall size of the file.
-@@ -213,7 +239,11 @@
-  *
-  * @throws error
-  */
-+#if EXIV2_TEST_VERSION(0,28,0)
-+virtual const std::string& path () const noexcept;
-+#else
- virtual std::string path () const;
-+#endif
- 
- #ifdef EXV_UNICODE_PATH
- /**
-@@ -230,7 +260,11 @@
-  *
-  * @throws error
-  */
-+#if EXIV2_TEST_VERSION(0,28,0)
-+virtual Exiv2::BasicIo::UniquePtr temporary () const;
-+#else
- virtual Exiv2::BasicIo::AutoPtr temporary () const;
-+#endif
- 
- };
- 
-@@ -266,7 +300,11 @@
-  * @return buffer with data read, empty buffer (!) on failure (!)
-  */
- Exiv2::DataBuf
-+#if EXIV2_TEST_VERSION (0,28,0)
-+ExtractorIO::read (size_t rcount)
-+#else
- ExtractorIO::read (long rcount)
-+#endif
- {
-   void *data;
-   ssize_t ret;
-@@ -284,9 +322,15 @@
-  * @param rcount size of 'buf'
-  * @return number of bytes read successfully, 0 on failure (!)
-  */
-+#if EXIV2_TEST_VERSION (0,28,0)
-+size_t
-+ExtractorIO::read (Exiv2::byte *buf,
-+                   size_t rcount)
-+#else
- long
- ExtractorIO::read (Exiv2::byte *buf,
-                    long rcount)
-+#endif
- {
-   void *data;
-   ssize_t ret;
-@@ -305,6 +349,12 @@
-   return got;
- }
- 
-+#if EXIV2_TEST_VERSION (0,28,0)
-+void ExtractorIO::populateFakeData()
-+{
-+  return;
-+}
-+#endif
- 
- /**
-  * Read a single character.
-@@ -319,7 +369,9 @@
-   const unsigned char *r;
- 
-   if (1 != ec->read (ec->cls, &data, 1))
--#if EXIV2_TEST_VERSION (0,27,0)
-+#if EXIV2_TEST_VERSION(0,28,0)
-+    throw Exiv2::Error (Exiv2::ErrorCode::kerDecodeLangAltQualifierFailed);
-+#elif EXIV2_TEST_VERSION (0,27,0)
-     throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
- #else
-     throw Exiv2::BasicError<char> (42 /* error code */);
-@@ -336,9 +388,15 @@
-  * @param wcount how many bytes to write
-  * @return -1 (always fails)
-  */
-+#if EXIV2_TEST_VERSION(0,28,0)
-+size_t
-+ExtractorIO::write (const Exiv2::byte *data,
-+                    size_t wcount)
-+#else
- long
- ExtractorIO::write (const Exiv2::byte *data,
-                     long wcount)
-+#endif
- {
-   return -1;
- }
-@@ -350,7 +408,11 @@
-  * @param src stream to copy
-  * @return -1 (always fails)
-  */
-+#if EXIV2_TEST_VERSION(0,28,0)
-+size_t
-+#else
- long
-+#endif
- ExtractorIO::write (Exiv2::BasicIo &src)
- {
-   return -1;
-@@ -378,7 +440,9 @@
- void
- ExtractorIO::transfer (Exiv2::BasicIo& src)
- {
--#if EXIV2_TEST_VERSION (0,27,0)
-+#if EXIV2_TEST_VERSION(0,28,0)
-+  throw Exiv2::Error (Exiv2::ErrorCode::kerDecodeLangAltQualifierFailed);
-+#elif EXIV2_TEST_VERSION (0,27,0)
-   throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
- #else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-@@ -394,7 +458,7 @@
-  * @return -1 on failure, 0 on success
-  */
- int
--ExtractorIO::seek (long offset,
-+ExtractorIO::seek (int64_t offset,
-                    Exiv2::BasicIo::Position pos)
- {
-   int rel;
-@@ -427,7 +491,9 @@
- Exiv2::byte *
- ExtractorIO::mmap (bool isWritable)
- {
--#if EXIV2_TEST_VERSION (0,27,0)
-+#if EXIV2_TEST_VERSION (0,28,0)
-+  throw Exiv2::Error (Exiv2::ErrorCode::kerDecodeLangAltQualifierFailed);
-+#elif EXIV2_TEST_VERSION (0,27,0)
-   throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
- #else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-@@ -452,7 +518,11 @@
-  *
-  * @return -1 on error
-  */
-+#if EXIV2_TEST_VERSION(0,28,0)
-+size_t
-+#else
- long int
-+#endif
- ExtractorIO::tell (void) const
- {
-   return (long) ec->seek (ec->cls, 0, SEEK_CUR);
-@@ -516,10 +586,17 @@
-  *
-  * @throws error
-  */
-+#if EXIV2_TEST_VERSION (0,28,0)
-+const std::string&
-+ExtractorIO::path () const noexcept
-+#else
- std::string
- ExtractorIO::path () const
-+#endif
- {
--#if EXIV2_TEST_VERSION (0,27,0)
-+#if EXIV2_TEST_VERSION (0,28,0)
-+  throw Exiv2::Error (Exiv2::ErrorCode::kerDecodeLangAltQualifierFailed);
-+#elif EXIV2_TEST_VERSION (0,27,0)
-   throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
- #else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-@@ -536,7 +613,9 @@
- std::wstring
- ExtractorIO::wpath () const
- {
--#if EXIV2_TEST_VERSION (0,27,0)
-+#if EXIV2_TEST_VERSION (0,28,0)
-+  throw Exiv2::Error (Exiv2::ErrorCode::kerDecodeLangAltQualifierFailed);
-+#elif EXIV2_TEST_VERSION (0,27,0)
-   throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
- #else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-@@ -552,11 +631,17 @@
-  *
-  * @throws error
-  */
-+#if EXIV2_TEST_VERSION(0,28,0)
-+Exiv2::BasicIo::UniquePtr
-+#else
- Exiv2::BasicIo::AutoPtr
-+#endif
- ExtractorIO::temporary () const
- {
-   fprintf (stderr, "throwing temporary error\n");
--#if EXIV2_TEST_VERSION (0,27,0)
-+#if EXIV2_TEST_VERSION(0,28,0)
-+  throw Exiv2::Error (Exiv2::ErrorCode::kerDecodeLangAltQualifierFailed);
-+#elif EXIV2_TEST_VERSION (0,27,0)
-   throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
- #else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-@@ -737,8 +822,13 @@
- #if ! EXIV2_TEST_VERSION (0,24,0)
-     Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute);
- #endif
-+#if EXIV2_TEST_VERSION(0,28,0)
-+    std::unique_ptr<Exiv2::BasicIo> eio (new ExtractorIO (ec));
-+    Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open (std::move(eio));
-+#else
-     std::auto_ptr<Exiv2::BasicIo> eio (new ExtractorIO (ec));
-     Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open (eio);
-+#endif
-     if (0 == image.get ())
-       return;
-     image->readMetadata ();
-@@ -822,7 +912,11 @@
-       ADDXMP ("Xmp.lr.hierarchicalSubject", EXTRACTOR_METATYPE_SUBJECT);
-     }
-   }
-+#if EXIV2_TEST_VERSION (0,28,0)
-+  catch (const Exiv2::Error& e)
-+#else
-   catch (const Exiv2::AnyError& e)
-+#endif
-   {
- #if DEBUG
-     std::cerr << "Caught Exiv2 exception '" << e << "'\n";
diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index 044c663a3a0b92..59e26c09172881 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -1,19 +1,20 @@
 # Template file for 'libextractor'
 pkgname=libextractor
-version=1.11
-revision=4
+version=1.13
+revision=1
 build_style=gnu-configure
 configure_args="--disable-static"
 hostmakedepends="pkg-config"
 makedepends="zlib-devel bzip2-devel exiv2-devel tiff-devel libpng-devel
  libjpeg-turbo-devel libvorbis-devel libflac-devel giflib-devel libmpeg2-devel
- ffmpeg-devel gtk+3-devel libltdl-devel libarchive-devel file-devel libgsf-devel"
+ gtk+3-devel libltdl-devel libarchive-devel file-devel libgsf-devel
+ gstreamer1-devel gst-plugins-base1-devel"
 short_desc="Library used to extract meta data from files"
 maintainer="Martin Riese <grauehaare@gmx.de>"
 license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/libextractor/"
 distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=16f633ab8746a38547c4a1da3f4591192b0825ad83c4336f0575b85843d8bd8f
+checksum=bb8f312c51d202572243f113c6b62d8210301ab30cbaee604f9837d878cdf755
 
 post_install() {
 	sed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libextractor: update to 1.13.
  2024-02-25 20:31 [PR PATCH] libextractor: update to 1.13 yoshiyoshyosh
@ 2024-02-26 15:22 ` sgn
  2024-02-26 17:02 ` yoshiyoshyosh
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sgn @ 2024-02-26 15:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 192 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/48941#issuecomment-1964406872

Comment:
The exception exists in current version. But it's bad!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libextractor: update to 1.13.
  2024-02-25 20:31 [PR PATCH] libextractor: update to 1.13 yoshiyoshyosh
  2024-02-26 15:22 ` sgn
@ 2024-02-26 17:02 ` yoshiyoshyosh
  2024-02-26 17:02 ` yoshiyoshyosh
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: yoshiyoshyosh @ 2024-02-26 17:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

New comment by yoshiyoshyosh on void-packages repository

https://github.com/void-linux/void-packages/pull/48941#issuecomment-1964655945

Comment:
yeah, I think it's a little silly how they made the exiv2 plugin... throw an exception instead of simply not run when it runs on a file that can't be loaded by exiv2. it can be worked around by either not using `-i` and dealing with the error that pops up or using `-n -l <plugins_you_need>` for the specific plugins one needs for a file. in any case, it's an intentional design decision, and is it our responsibility to patch it out? I'm not sure

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libextractor: update to 1.13.
  2024-02-25 20:31 [PR PATCH] libextractor: update to 1.13 yoshiyoshyosh
  2024-02-26 15:22 ` sgn
  2024-02-26 17:02 ` yoshiyoshyosh
@ 2024-02-26 17:02 ` yoshiyoshyosh
  2024-02-26 17:04 ` yoshiyoshyosh
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: yoshiyoshyosh @ 2024-02-26 17:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

New comment by yoshiyoshyosh on void-packages repository

https://github.com/void-linux/void-packages/pull/48941#issuecomment-1964655945

Comment:
yeah, I think it's a little silly how they made the exiv2 plugin... throw an exception instead of simply not run when it runs on a file that can't be loaded by exiv2. it can be worked around by either not using `-i` and dealing with the error that pops up or using `-n -l <plugins_you_need>` for the specific plugins one needs for a file. in any case, it's an intentional design decision, but is it our responsibility to patch it out? I'm not sure

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libextractor: update to 1.13.
  2024-02-25 20:31 [PR PATCH] libextractor: update to 1.13 yoshiyoshyosh
                   ` (2 preceding siblings ...)
  2024-02-26 17:02 ` yoshiyoshyosh
@ 2024-02-26 17:04 ` yoshiyoshyosh
  2024-02-26 17:14 ` yoshiyoshyosh
  2024-03-02  2:28 ` [PR PATCH] [Closed]: " sgn
  5 siblings, 0 replies; 7+ messages in thread
From: yoshiyoshyosh @ 2024-02-26 17:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 605 bytes --]

New comment by yoshiyoshyosh on void-packages repository

https://github.com/void-linux/void-packages/pull/48941#issuecomment-1964655945

Comment:
yeah, I think it's a little silly how they made the exiv2 plugin... throw an exception instead of simply not run when it runs on a file that can't be loaded by exiv2. it can be worked around by either not using `-i` and ignoring the error that pops up on its thread or using `-n -l <plugins_you_need>` for the specific plugins one needs for a file. in any case, it's an intentional design decision, but is it our responsibility to patch it out? I'm not sure

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libextractor: update to 1.13.
  2024-02-25 20:31 [PR PATCH] libextractor: update to 1.13 yoshiyoshyosh
                   ` (3 preceding siblings ...)
  2024-02-26 17:04 ` yoshiyoshyosh
@ 2024-02-26 17:14 ` yoshiyoshyosh
  2024-03-02  2:28 ` [PR PATCH] [Closed]: " sgn
  5 siblings, 0 replies; 7+ messages in thread
From: yoshiyoshyosh @ 2024-02-26 17:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

New comment by yoshiyoshyosh on void-packages repository

https://github.com/void-linux/void-packages/pull/48941#issuecomment-1964655945

Comment:
yeah, I think it's a little silly how they made the exiv2 plugin... throw an exception instead of simply not run when it runs on a file that can't be loaded by exiv2. it can be worked around in `extract` by either not using `-i` and ignoring the error that pops up on its thread or using `-n -l <plugins_you_need>` for the specific plugins one needs for a file. in any case, it's an intentional design decision, but is it our responsibility to patch it out? I'm not sure

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Closed]: libextractor: update to 1.13.
  2024-02-25 20:31 [PR PATCH] libextractor: update to 1.13 yoshiyoshyosh
                   ` (4 preceding siblings ...)
  2024-02-26 17:14 ` yoshiyoshyosh
@ 2024-03-02  2:28 ` sgn
  5 siblings, 0 replies; 7+ messages in thread
From: sgn @ 2024-03-02  2:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

There's a closed pull request on the void-packages repository

libextractor: update to 1.13.
https://github.com/void-linux/void-packages/pull/48941

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64-glibc`)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - `x86_64-musl`

merge before #43761

no longer needs ffmpeg libraries, replaced with gstreamer. `extract` throws an error with `exiv2` plugin when trying to extract stuff that's not an image, which is apparently intentional (line 605 of `exiv2_extractor.cc`)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-03-02  2:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-25 20:31 [PR PATCH] libextractor: update to 1.13 yoshiyoshyosh
2024-02-26 15:22 ` sgn
2024-02-26 17:02 ` yoshiyoshyosh
2024-02-26 17:02 ` yoshiyoshyosh
2024-02-26 17:04 ` yoshiyoshyosh
2024-02-26 17:14 ` yoshiyoshyosh
2024-03-02  2:28 ` [PR PATCH] [Closed]: " sgn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).