public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/darktable] f44: fix FTBFS caused by missing includes added separately by upstream, fix all lua scripts to be compatible with Lua 5.5
@ 2026-09-01 8:49 Tom spot Callaway
0 siblings, 0 replies; only message in thread
From: Tom spot Callaway @ 2026-09-01 8:49 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/darktable
Branch : f44
Commit : 4f5d817af6e0fb5a360064e797247ddce8d9bf41
Author : Tom spot Callaway <spotaws@amazon.com>
Date : 2026-05-18T12:44:24-04:00
Stats : +194/-0 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/darktable/c/4f5d817af6e0fb5a360064e797247ddce8d9bf41?branch=f44
Log:
fix FTBFS caused by missing includes added separately by upstream, fix all lua scripts to be compatible with Lua 5.5
---
diff --git a/8dc68e2a4551f03838b7f2da9276e5d1eb20bca0.patch b/8dc68e2a4551f03838b7f2da9276e5d1eb20bca0.patch
new file mode 100644
index 0000000..90e1ce7
--- /dev/null
+++ b/8dc68e2a4551f03838b7f2da9276e5d1eb20bca0.patch
@@ -0,0 +1,53 @@
+From 8dc68e2a4551f03838b7f2da9276e5d1eb20bca0 Mon Sep 17 00:00:00 2001
+From: Alex Tutubalin <lexa@lexa.ru>
+Date: Sun, 25 Jan 2026 19:56:24 +0300
+Subject: [PATCH] Use LIBRAW_EXCEPTION instead of own internal in
+ losslessjpeg.h
+
+---
+ internal/losslessjpeg.h | 11 +++--------
+ 1 file changed, 3 insertions(+), 8 deletions(-)
+
+diff --git a/internal/losslessjpeg.h b/internal/losslessjpeg.h
+index 7964822d..eced82b3 100644
+--- a/src/external/LibRaw/internal/losslessjpeg.h
++++ b/src/external/LibRaw/internal/losslessjpeg.h
+@@ -20,6 +20,7 @@ it under the terms of the one of two licenses as you choose:
+ #pragma once
+ #include <stdint.h>
+ #include <vector>
++#include "libraw_cxx_defs.h"
+
+ struct BitPump // generic bit source
+ {
+@@ -37,12 +38,6 @@ struct BitPump // generic bit source
+
+ struct ByteStreamBE // Jpeg is always big endian
+ {
+- enum Exceptions
+- {
+- OK = 0,
+- EndOfBuffer = 1
+- };
+-
+ uint8_t *buffer;
+ unsigned size, pos;
+ ByteStreamBE(uint8_t *b, unsigned s) : buffer(b), size(s), pos(0) {}
+@@ -52,7 +47,7 @@ struct ByteStreamBE // Jpeg is always big endian
+ uint8_t get_u8()
+ {
+ if (pos >= size)
+- throw EndOfBuffer;
++ throw LIBRAW_EXCEPTION_IO_CORRUPT;
+ uint8_t ret = buffer[pos];
+ pos++;
+ return ret;
+@@ -60,7 +55,7 @@ struct ByteStreamBE // Jpeg is always big endian
+ uint16_t get_u16()
+ {
+ if (pos + 2 > size)
+- throw EndOfBuffer;
++ throw LIBRAW_EXCEPTION_IO_CORRUPT;
+ uint8_t r1 = buffer[pos];
+ uint8_t r2 = buffer[pos + 1];
+ pos += 2;
diff --git a/darktable-5.4.1-lua-5.5-scripts.patch b/darktable-5.4.1-lua-5.5-scripts.patch
new file mode 100644
index 0000000..752b6a2
--- /dev/null
+++ b/darktable-5.4.1-lua-5.5-scripts.patch
@@ -0,0 +1,136 @@
+--- darktable-5.4.1/src/external/lua-scripts/contrib/HDRMerge.lua 2025-11-14 20:04:29.000000000 -0500
++++ darktable-5.4.1/src/external/lua-scripts/contrib/HDRMerge.lua 2026-05-18 11:41:31.804560353 -0400
+@@ -277,9 +277,9 @@ local function main()
+ local set_tag = GUI.Target.add_tags.text
+ if set_tag ~= nil then -- add additional user-specified tags
+ for tag in string.gmatch(set_tag, '[^,]+') do
+- tag = CleanSpaces(tag)
+- tag = dt.tags.create(tag)
+- dt.tags.attach(tag, imported)
++ local cleaned_tag = CleanSpaces(tag)
++ cleaned_tag = dt.tags.create(cleaned_tag)
++ dt.tags.attach(cleaned_tag, imported)
+ end
+ end
+ dt.print(_('HDRMerge completed successfully'))
+--- darktable-5.4.1/src/external/lua-scripts/contrib/enfuseAdvanced.lua 2025-11-14 20:04:29.000000000 -0500
++++ darktable-5.4.1/src/external/lua-scripts/contrib/enfuseAdvanced.lua 2026-05-18 11:41:31.805560362 -0400
+@@ -520,9 +520,9 @@ local function main(storage, image_table
+ local set_tag = GUI.Target.add_tags.text
+ if set_tag ~= nil then --add additional user-specified tags
+ for tag in string.gmatch(set_tag, '[^,]+') do
+- tag = CleanSpaces(tag)
+- tag = dt.tags.create(tag)
+- dt.tags.attach(tag, imported)
++ local cleaned_tag = CleanSpaces(tag)
++ cleaned_tag = dt.tags.create(cleaned_tag)
++ dt.tags.attach(cleaned_tag, imported)
+ end
+ end
+ end
+--- darktable-5.4.1/src/external/lua-scripts/contrib/face_recognition.lua 2025-11-14 20:04:29.000000000 -0500
++++ darktable-5.4.1/src/external/lua-scripts/contrib/face_recognition.lua 2026-05-18 11:41:31.800560315 -0400
+@@ -311,25 +311,26 @@ local function face_recognition ()
+ if ignoreByTag (img, ignoreTags) then
+ dt.print_log("Face recognition: Ignoring image with ID " .. img.id)
+ else
++ local tag_name = t
+ -- Check of unrecognized unknown_person
+- if t == "unknown_person" then
+- t = unknownTag
++ if tag_name == "unknown_person" then
++ tag_name = unknownTag
+ end
+ -- Check of unrecognized no_persons_found
+- if t == "no_persons_found" then
+- t = nonpersonsfoundTag
++ if tag_name == "no_persons_found" then
++ tag_name = nonpersonsfoundTag
+ end
+- if t ~= "" and t ~= nil then
+- if categoryTagString ~= "" and t ~= nonpersonsfoundTag then
+- t = categoryTagString .. "|" .. t
++ if tag_name ~= "" and tag_name ~= nil then
++ if categoryTagString ~= "" and tag_name ~= nonpersonsfoundTag then
++ tag_name = categoryTagString .. "|" .. tag_name
+ end
+- dt.print_log ("ImgId:" .. img.id .. " Tag:".. t)
++ dt.print_log ("ImgId:" .. img.id .. " Tag:".. tag_name)
+ -- Create tag if it does not exist
+- if tags_list[t] == nil then
+- tag = dt.tags.create (t)
+- tags_list[t] = tag
++ if tags_list[tag_name] == nil then
++ tag = dt.tags.create (tag_name)
++ tags_list[tag_name] = tag
+ else
+- tag = tags_list[t]
++ tag = tags_list[tag_name]
+ end
+ img:attach_tag (tag)
+ end
+--- darktable-5.4.1/src/external/lua-scripts/contrib/gimp.lua 2025-11-14 20:04:29.000000000 -0500
++++ darktable-5.4.1/src/external/lua-scripts/contrib/gimp.lua 2026-05-18 11:41:31.801560324 -0400
+@@ -142,8 +142,8 @@ local function gimp_edit(storage, image_
+ img_list = ""
+
+ for _,exp_img in pairs(image_table) do
+- exp_img = df.sanitize_filename(exp_img)
+- img_list = img_list ..exp_img.. " "
++ local sanitized = df.sanitize_filename(exp_img)
++ img_list = img_list ..sanitized.. " "
+ end
+
+ dt.print(_("launching GIMP..."))
+--- darktable-5.4.1/src/external/lua-scripts/contrib/image_stack.lua 2025-11-14 20:04:29.000000000 -0500
++++ darktable-5.4.1/src/external/lua-scripts/contrib/image_stack.lua 2026-05-18 11:41:31.803560343 -0400
+@@ -323,8 +323,8 @@ local function cleanup(img_list)
+ dt.print_log("image list is " .. img_list)
+ files = du.split(img_list, " ")
+ for _,f in ipairs(files) do
+- f = string.gsub(f, '[\'\"]', "")
+- os.remove(f)
++ local cleaned = string.gsub(f, '[\'\"]', "")
++ os.remove(cleaned)
+ end
+ end
+
+--- darktable-5.4.1/src/external/lua-scripts/tools/get_lib_manpages.lua 2025-11-14 20:04:29.000000000 -0500
++++ darktable-5.4.1/src/external/lua-scripts/tools/get_lib_manpages.lua 2026-05-18 11:41:31.801560324 -0400
+@@ -63,8 +63,8 @@ local output = io.popen("cd "..dt.config
+ -- loop through the libraries
+
+ for line in output:lines() do
+- line = string.gsub(line, "/", ".")
+- local lib_name = line:sub(3,-5)
++ local cleaned_line = string.gsub(line, "/", ".")
++ local lib_name = cleaned_line:sub(3,-5)
+ if lib_name:len() > 2 then
+ lib_name = "lib/" .. lib_name
+ local lib = require(lib_name)
+--- darktable-5.4.1/src/external/lua-scripts/tools/get_libdoc.lua 2025-11-14 20:04:29.000000000 -0500
++++ darktable-5.4.1/src/external/lua-scripts/tools/get_libdoc.lua 2026-05-18 11:41:31.803560343 -0400
+@@ -40,8 +40,8 @@ local output = io.popen("cd "..dt.config
+ -- loop through the libraries
+
+ for line in output:lines() do
+- line = string.gsub(line, "/", ".")
+- local lib_name = line:sub(3,-5)
++ local cleaned_line = string.gsub(line, "/", ".")
++ local lib_name = cleaned_line:sub(3,-5)
+ if lib_name:len() > 2 then
+ lib_name = "lib/" .. lib_name
+ local lib = require(lib_name)
+--- darktable-5.4.1/src/external/lua-scripts/tools/script_manager.lua 2025-11-14 20:04:29.000000000 -0500
++++ darktable-5.4.1/src/external/lua-scripts/tools/script_manager.lua 2026-05-18 11:41:31.799560306 -0400
+@@ -894,7 +894,9 @@ local function install_scripts()
+ sm.widgets.folder_selector.selected = i
+ break
+ end
+- i = i + 1
++ -- Lua 5.5: for loop control variables are read-only. This increment
++ -- was always a no-op since numeric for loops use an internal counter.
++ -- i = i + 1
+ end
+
+ log.msg(log.debug, "clearing text fields")
diff --git a/darktable.spec b/darktable.spec
index 8d9d024..3d142a3 100644
--- a/darktable.spec
+++ b/darktable.spec
@@ -23,6 +23,11 @@ Patch0: 0001-Add-5.4.1-in-appdata.patch
Patch1: darktable-5.4.1-lua-5.5.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2454222
Patch2: cve-2026-5318.patch
+# This upstream change is necessary for the CVE-2026-5318 patch above to actually find the enum values
+# https://github.com/LibRaw/LibRaw/commit/8dc68e2a4551f03838b7f2da9276e5d1eb20bca0
+Patch3: 8dc68e2a4551f03838b7f2da9276e5d1eb20bca0.patch
+# https://github.com/darktable-org/lua-scripts/pull/678
+Patch4: darktable-5.4.1-lua-5.5-scripts.patch
BuildRequires: cairo-devel
# clang is optional (OpenCL kernel build test)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-01 8:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-01 8:49 [rpms/darktable] f44: fix FTBFS caused by missing includes added separately by upstream, fix all lua scripts to be compatible with Lua 5.5 Tom spot Callaway
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox