Bug 2283334

Summary: Retire immix
Product: [Fedora] Fedora Reporter: Robert-André Mauchin 🐧 <eclipseo>
Component: immixAssignee: Gwyn Ciesla <gwync>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: gwync
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-17 19:23:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1979565    

Description Robert-André Mauchin 🐧 2024-05-26 21:11:39 UTC
Hello Gwyn,

I am updating exiv2 to 0.28.2 and Immix is not compatible with it. As Immix has been abandoned upstream since February 04, 2008, so 16 years ago, I was wondering if you would consider retiring that package?

Thank you.

Comment 1 Gwyn Ciesla 2024-05-28 18:51:47 UTC
Possibly, yes. Can I see a build log? If it's not terrible, I can patch immix. If it is, I'll retire it.

Comment 2 Robert-André Mauchin 🐧 2024-06-01 13:11:21 UTC
@gwyn:

https://copr.fedorainfracloud.org/coprs/eclipseo/exiv2-0.28.2/build/7493107/

g++ -c -pipe -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtSvg -I/usr/include -I. -I. -I. -o aligndialog.o aligndialog.cpp
In file included from align.cpp:19:
align.h:137:19: error: ‘AutoPtr’ in ‘class Exiv2::Image’ does not name a type
  137 |     Exiv2::Image::AutoPtr imageExifRead ;
      |                   ^~~~~~~
align.h:138:19: error: ‘AutoPtr’ in ‘class Exiv2::Image’ does not name a type
  138 |     Exiv2::Image::AutoPtr imageExifWrite ;
      |                   ^~~~~~~
align.cpp: In member function ‘void AlignmentManager::finalProcessing()’:
align.cpp:175:19: error: ‘AutoPtr’ is not a member of ‘Exiv2::Image’
  175 |     Exiv2::Image::AutoPtr imageExifRead = Exiv2::ImageFactory::open(imw->displayList[0]->filePath[0].toStdString());
      |                   ^~~~~~~
align.cpp:176:5: error: ‘imageExifRead’ was not declared in this scope
  176 |     imageExifRead->readMetadata();
      |     ^~~~~~~~~~~~~
align.cpp:177:19: error: ‘AutoPtr’ is not a member of ‘Exiv2::Image’
  177 |     Exiv2::Image::AutoPtr imageExifWrite = Exiv2::ImageFactory::open(newPremsFileName.toStdString());
      |                   ^~~~~~~
align.cpp:178:5: error: ‘imageExifWrite’ was not declared in this scope
  178 |     imageExifWrite->setExifData(imageExifRead->exifData());
      |     ^~~~~~~~~~~~~~
align.cpp: In member function ‘void Aligner::align(int)’:
align.cpp:376:9: error: ‘imageExifRead’ was not declared in this scope
  376 |         imageExifRead = Exiv2::ImageFactory::open(imgDisp->filePath[1].toStdString());
      |         ^~~~~~~~~~~~~
align.cpp:378:9: error: ‘imageExifWrite’ was not declared in this scope
  378 |         imageExifWrite = Exiv2::ImageFactory::open(newFileName.toStdString());
      |         ^~~~~~~~~~~~~~
make: *** [Makefile:295: align.o] Error 1


Sample of a patch I did for another project:


From 27c6946da1df010fb61a65a8300a37f24ae2197c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m>
Date: Sat, 11 Nov 2023 19:00:13 +0100
Subject: [PATCH] Fix build with >=exiv2-0.28.0, raise minimum to 0.27.0

- enables use of EXIV2_TEST_VERSION macro
- add compatibility for exiv2-0.28
---
 configure.ac   |  2 +-
 ufraw_exiv2.cc | 30 ++++++++++++++++++------------
 2 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/configure.ac b/configure.ac
index b9c0d5a..1effdfc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -202,7 +202,7 @@ AS_IF([test "x$with_cfitsio" != xno],
     [ have_cfitsio=no
       AC_MSG_RESULT($CFITSIO_PKG_ERRORS) ] ) ] )
 
-PKG_CHECK_MODULES(EXIV2, exiv2 >= 0.20,
+PKG_CHECK_MODULES(EXIV2, exiv2 >= 0.27,
   [ have_exiv2=yes
     AC_DEFINE(HAVE_EXIV2, 1, have the exiv2 library) ],
   [ have_exiv2=no
diff --git a/ufraw_exiv2.cc b/ufraw_exiv2.cc
index 873bacc..7996993 100644
--- a/ufraw_exiv2.cc
+++ b/ufraw_exiv2.cc
@@ -18,7 +18,17 @@
 #include <exiv2/exiv2.hpp>
 #include <sstream>
 #include <cassert>
+#include <cinttypes>
 #include <iostream>
+#include <memory>
+
+#if EXIV2_TEST_VERSION(0,28,0)
+    typedef Exiv2::Error Exiv2Error;
+    typedef Exiv2::Image::UniquePtr ImagePtr;
+#else
+    typedef Exiv2::AnyError Exiv2Error;
+    typedef Exiv2::Image::AutoPtr ImagePtr;
+#endif
 
 /*
  * Helper function to copy a string to a buffer, converting it from
@@ -50,7 +60,7 @@ extern "C" int ufraw_exif_read_input(ufraw_data *uf)
         uf->inputExifBuf = NULL;
         uf->inputExifBufLen = 0;
 
-        Exiv2::Image::AutoPtr image;
+        ImagePtr image;
         if (uf->unzippedBuf != NULL) {
             image = Exiv2::ImageFactory::open(
                         (const Exiv2::byte*)uf->unzippedBuf, uf->unzippedBufLen);
@@ -66,11 +76,7 @@ extern "C" int ufraw_exif_read_input(ufraw_data *uf)
         if (exifData.empty()) {
             std::string error(uf->filename);
             error += ": No Exif data found in the file";
-#if EXIV2_TEST_VERSION(0,27,0)
-            throw Exiv2::Error(Exiv2::kerErrorMessage, error);
-#else
-            throw Exiv2::Error(1, error);
-#endif
+            throw Exiv2Error(Exiv2::ErrorCode::kerErrorMessage, error);
         }
 
         /* List of tag names taken from exiv2's printSummary() in actions.cpp */
@@ -135,7 +141,7 @@ extern "C" int ufraw_exif_read_input(ufraw_data *uf)
         ufraw_message(UFRAW_SET_LOG, "%s\n", stderror.str().c_str());
 
         return UFRAW_SUCCESS;
-    } catch (Exiv2::AnyError& e) {
+    } catch (Exiv2Error& e) {
         std::cerr.rdbuf(savecerr);
         std::string s(e.what());
         ufraw_message(UFRAW_SET_WARNING, "%s\n", s.c_str());
@@ -155,8 +161,8 @@ static Exiv2::ExifData ufraw_prepare_exifdata(ufraw_data *uf)
         /* Reset orientation tag since UFRaw already rotates the image */
         if ((pos = exifData.findKey(Exiv2::ExifKey("Exif.Image.Orientation")))
                 != exifData.end()) {
-            ufraw_message(UFRAW_SET_LOG, "Resetting %s from '%d' to '1'\n",
-                          pos->key().c_str(), pos->value().toLong());
+            ufraw_message(UFRAW_SET_LOG, "Resetting %s from '%" PRId64 "' to '1'\n",
+                          pos->key().c_str(), pos->value().toInt64());
             pos->setValue("1"); /* 1 = Normal orientation */
         }
     }
@@ -327,7 +333,7 @@ extern "C" int ufraw_exif_prepare_output(ufraw_data *uf)
         ufraw_message(UFRAW_SET_LOG, "%s\n", stderror.str().c_str());
 
         return UFRAW_SUCCESS;
-    } catch (Exiv2::AnyError& e) {
+    } catch (Exiv2Error& e) {
         std::cerr.rdbuf(savecerr);
         std::string s(e.what());
         ufraw_message(UFRAW_SET_WARNING, "%s\n", s.c_str());
@@ -347,7 +353,7 @@ extern "C" int ufraw_exif_write(ufraw_data *uf)
 
         char *filename =
             uf_win32_locale_filename_from_utf8(uf->conf->outputFilename);
-        Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename);
+        ImagePtr image = Exiv2::ImageFactory::open(filename);
         uf_win32_locale_filename_free(filename);
         assert(image.get() != 0);
 
@@ -367,7 +373,7 @@ extern "C" int ufraw_exif_write(ufraw_data *uf)
         ufraw_message(UFRAW_SET_LOG, "%s\n", stderror.str().c_str());
 
         return UFRAW_SUCCESS;
-    } catch (Exiv2::AnyError& e) {
+    } catch (Exiv2Error& e) {
         std::cerr.rdbuf(savecerr);
         std::string s(e.what());
         ufraw_message(UFRAW_SET_WARNING, "%s\n", s.c_str());
-- 
2.41.0

Comment 3 Gwyn Ciesla 2024-06-12 21:29:01 UTC
Thank you, let me see.

Comment 4 Gwyn Ciesla 2024-06-12 21:35:03 UTC
Thank you, let me see.

Comment 5 Gwyn Ciesla 2024-06-12 21:59:37 UTC
Ok, successful PR. Not elegant, but it will work once exiv2 0.28.x is built.