diff --git a/MAINTAINERS.md b/MAINTAINERS.md deleted file mode 100644 --- a/MAINTAINERS.md +++ /dev/null @@ -1,5 +0,0 @@ -This file is used to indicate responsibility for the maintenance of this package. Individuals on this list should be the sole modifiers of the package, excluding cases where the Solus Team may need to perform necessary rebuilds, upgrades, or security fixes. This list should not be used for any direct contact usage. If you believe this package requires a package update, follow documentation from https://getsol.us/articles/packaging/request-a-package-update/en/. In the event this package no longer becomes sufficiently maintained, Core Team reserves the right to request a new maintainer or remove this package from the repository. - -- Joshua Strobl - - IRC: JoshStrobl - - Email: joshua@getsol.us diff --git a/abi_used_symbols b/abi_used_symbols --- a/abi_used_symbols +++ b/abi_used_symbols @@ -36,6 +36,7 @@ libc.so.6:stderr libc.so.6:stdout libc.so.6:strchr +libc.so.6:strcmp libc.so.6:strftime libc.so.6:strlen libc.so.6:strstr @@ -494,6 +495,7 @@ libgio-2.0.so.0:g_dbus_message_new_method_call libgio-2.0.so.0:g_dbus_message_new_method_reply libgio-2.0.so.0:g_dbus_message_set_body +libgio-2.0.so.0:g_dbus_message_set_flags libgio-2.0.so.0:g_dbus_message_to_gerror libgio-2.0.so.0:g_dbus_method_invocation_get_connection libgio-2.0.so.0:g_dbus_method_invocation_get_message @@ -1042,8 +1044,6 @@ libgphoto2.so.6:gp_camera_file_delete libgphoto2.so.6:gp_camera_file_get libgphoto2.so.6:gp_camera_file_get_info -libgphoto2.so.6:gp_camera_folder_list_files -libgphoto2.so.6:gp_camera_folder_list_folders libgphoto2.so.6:gp_camera_get_abilities libgphoto2.so.6:gp_camera_get_port_info libgphoto2.so.6:gp_camera_get_storageinfo @@ -1070,7 +1070,6 @@ libgphoto2.so.6:gp_list_get_name libgphoto2.so.6:gp_list_get_value libgphoto2.so.6:gp_list_new -libgphoto2.so.6:gp_list_sort libgphoto2.so.6:gp_list_unref libgphoto2_port.so.12:gp_port_info_get_path libgphoto2_port.so.12:gp_port_info_list_free diff --git a/files/shotwell-0.31.3-vapi_fixes.patch b/files/shotwell-0.31.3-vapi_fixes.patch new file mode 100644 --- /dev/null +++ b/files/shotwell-0.31.3-vapi_fixes.patch @@ -0,0 +1,368 @@ +From 9a9876e27076f5939525023eb8c7f24d48c8ff25 Mon Sep 17 00:00:00 2001 +From: Jens Georg +Date: Sun, 14 Mar 2021 11:21:10 +0100 +Subject: [PATCH 1/6] vapis: Plug memory leak in GPhoto2 + +Caller was supposed to free the StorageInfo, which with the old binding +we never did +--- + src/camera/GPhoto.vala | 5 +++-- + src/camera/ImportPage.vala | 14 ++++++-------- + vapi/libgphoto2.vapi | 2 +- + 3 files changed, 10 insertions(+), 11 deletions(-) + +diff --git a/src/camera/GPhoto.vala b/src/camera/GPhoto.vala +index aa2fcf2b..64ff7ca0 100644 +--- a/src/camera/GPhoto.vala ++++ b/src/camera/GPhoto.vala +@@ -135,9 +135,10 @@ namespace GPhoto { + // filesystem. In these cases shotwell can access the file directly. See: + // https://bugzilla.gnome.org/show_bug.cgi?id=716915 + public PhotoMetadata? get_fallback_metadata(Camera camera, Context context, string folder, string filename) { +- GPhoto.CameraStorageInformation *sifs = null; ++ // Fixme: Why do we need to query get_storageinfo here first? ++ GPhoto.CameraStorageInformation[] sifs = null; + int count = 0; +- camera.get_storageinfo(&sifs, out count, context); ++ camera.get_storageinfo(out sifs, context); + + GPhoto.PortInfo port_info; + camera.get_port_info(out port_info); +diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala +index ab24df61..c424de88 100644 +--- a/src/camera/ImportPage.vala ++++ b/src/camera/ImportPage.vala +@@ -1179,9 +1179,9 @@ public class ImportPage : CheckerboardPage { + + Gee.ArrayList import_list = new Gee.ArrayList(); + +- GPhoto.CameraStorageInformation *sifs = null; ++ GPhoto.CameraStorageInformation[] sifs = null; + int count = 0; +- refresh_result = dcamera.gcamera.get_storageinfo(&sifs, out count, spin_idle_context.context); ++ refresh_result = dcamera.gcamera.get_storageinfo(out sifs, spin_idle_context.context); + if (refresh_result == GPhoto.Result.OK) { + for (int fsid = 0; fsid < count; fsid++) { + // Check well-known video and image paths first to prevent accidental +@@ -1324,18 +1324,16 @@ public class ImportPage : CheckerboardPage { + // Need to do this because some phones (iPhone, in particular) changes the name of their filesystem + // between each mount + public static string? get_fs_basedir(GPhoto.Camera camera, int fsid) { +- GPhoto.CameraStorageInformation *sifs = null; ++ GPhoto.CameraStorageInformation[] sifs = null; + int count = 0; +- GPhoto.Result res = camera.get_storageinfo(&sifs, out count, null_context.context); ++ GPhoto.Result res = camera.get_storageinfo(out sifs, null_context.context); + if (res != GPhoto.Result.OK) + return null; + +- if (fsid >= count) ++ if (fsid >= sifs.length) + return null; + +- GPhoto.CameraStorageInformation *ifs = sifs + fsid; +- +- return (ifs->fields & GPhoto.CameraStorageInfoFields.BASE) != 0 ? ifs->basedir : "/"; ++ return (sifs[fsid].fields & GPhoto.CameraStorageInfoFields.BASE) != 0 ? sifs[fsid].basedir : "/"; + } + + public static string? get_fulldir(GPhoto.Camera camera, string camera_name, int fsid, string folder) { +diff --git a/vapi/libgphoto2.vapi b/vapi/libgphoto2.vapi +index 22f70eed..7e569823 100644 +--- a/vapi/libgphoto2.vapi ++++ b/vapi/libgphoto2.vapi +@@ -64,7 +64,7 @@ namespace GPhoto { + public Result set_port_info(PortInfo info); + public Result get_abilities(out CameraAbilities abilities); + public Result set_abilities(CameraAbilities abilities); +- public Result get_storageinfo(CameraStorageInformation **sifs, out int count, Context context); ++ public Result get_storageinfo([CCode (array_length_pos=1)]out CameraStorageInformation[] sifs, Context context); + + // Folders + [CCode (cname="gp_camera_folder_list_folders")] +-- +2.31.1 + +From e1f53784dd7475388470a30683df34b5ca7784eb Mon Sep 17 00:00:00 2001 +From: Jens Georg +Date: Sat, 13 Mar 2021 23:22:50 +0100 +Subject: [PATCH 2/6] More GPhoto2 vapi fixes + +--- + vapi/libgphoto2.vapi | 25 ++++++++++++------------- + 1 file changed, 12 insertions(+), 13 deletions(-) + +diff --git a/vapi/libgphoto2.vapi b/vapi/libgphoto2.vapi +index 7e569823..607a644f 100644 +--- a/vapi/libgphoto2.vapi ++++ b/vapi/libgphoto2.vapi +@@ -53,7 +53,7 @@ namespace GPhoto { + ref_function="GPHOTO_REF_CAMERA", + unref_function="gp_camera_unref", + free_function="gp_camera_free", +- cheader_filename="gphoto2/gphoto2-camera.h,gphoto.h" ++ cheader_filename="gphoto2/gphoto2-camera.h,gphoto2.h" + )] + public class Camera { + [CCode (cname="gp_camera_new")] +@@ -74,7 +74,7 @@ namespace GPhoto { + [CCode (cname="gp_camera_folder_delete_all")] + public Result delete_all_files(string folder, Context context); + [CCode (cname="gp_camera_folder_put_file")] +- public Result put_file(string folder, CameraFile file, Context context); ++ public Result put_file(string folder, string filename, CameraFileType type, CameraFile file, Context context); + [CCode (cname="gp_camera_folder_make_dir")] + public Result make_dir(string folder, string name, Context context); + [CCode (cname="gp_camera_folder_remove_dir")] +@@ -99,7 +99,7 @@ namespace GPhoto { + ref_function="GPHOTO_REF_FILE", + unref_function="gp_file_unref", + free_function="gp_file_free", +- cheader_filename="gphoto2/gphoto2-file.h,gphoto.h" ++ cheader_filename="gphoto2/gphoto2-file.h,gphoto2.h" + )] + public class CameraFile { + [CCode (cname="gp_file_new")] +@@ -140,7 +140,6 @@ namespace GPhoto { + public enum CameraFileInfoFields { + NONE, + TYPE, +- NAME, + SIZE, + WIDTH, + HEIGHT, +@@ -159,7 +158,7 @@ namespace GPhoto { + public CameraFileInfoFields fields; + public CameraFileStatus status; + public ulong size; +- public string type; ++ public char type[64]; + public uint width; + public uint height; + public string name; +@@ -176,7 +175,7 @@ namespace GPhoto { + public CameraFileInfoFields fields; + public CameraFileStatus status; + public ulong size; +- public string type; ++ public char type[64]; + public uint width; + public uint height; + public string name; +@@ -257,7 +256,7 @@ namespace GPhoto { + ref_function="GPHOTO_REF_LIST", + unref_function="gp_list_unref", + free_function="gp_list_free", +- cheader_filename="gphoto2/gphoto2-list.h,gphoto.h" ++ cheader_filename="gphoto2/gphoto2-list.h,gphoto2.h" + )] + public class CameraList { + [CCode (cname="gp_list_new")] +@@ -266,7 +265,7 @@ namespace GPhoto { + public Result append(string name, string value); + public Result reset(); + public Result sort(); +- public Result find_by_name(out int? index, string name); ++ public Result find_by_name(out int index, string name); + public Result get_name(int index, out unowned string name); + public Result get_value(int index, out unowned string value); + public Result set_name(int index, string name); +@@ -314,9 +313,9 @@ namespace GPhoto { + )] + public struct CameraStorageInformation { + public CameraStorageInfoFields fields; +- public string basedir; +- public string label; +- public string description; ++ public char basedir[256]; ++ public char label[256]; ++ public char description[256]; + public int type; + public int fstype; + public int access; +@@ -329,7 +328,7 @@ namespace GPhoto { + [CCode ( + ref_function="GPHOTO_REF_CONTEXT", + unref_function="gp_context_unref", +- cheader_filename="gphoto2/gphoto2-context.h,gphoto.h" ++ cheader_filename="gphoto2/gphoto2-context.h,gphoto2.h" + )] + public class Context { + [CCode (cname="gp_context_new")] +@@ -485,7 +484,7 @@ namespace GPhoto { + + [CCode ( + cheader_filename="gphoto2/gphoto2-version.h", +- cprefix="GP_VERSION" ++ cprefix="GP_VERSION_" + )] + public enum VersionVerbosity { + SHORT, +-- +2.31.1 + +From 754520638beafa997d81fdbff58a9d07a48f7cfd Mon Sep 17 00:00:00 2001 +From: Jens Georg +Date: Sat, 13 Mar 2021 22:31:32 +0100 +Subject: [PATCH 3/6] vapis: Fix gphoto2 vapi + +There was some copy-paste going on there that didn't actually match the +C structs +--- + vapi/libgphoto2.vapi | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/vapi/libgphoto2.vapi b/vapi/libgphoto2.vapi +index 607a644f..adcef5c5 100644 +--- a/vapi/libgphoto2.vapi ++++ b/vapi/libgphoto2.vapi +@@ -161,7 +161,6 @@ namespace GPhoto { + public char type[64]; + public uint width; + public uint height; +- public string name; + public CameraFilePermissions permissions; + public time_t mtime; + } +@@ -178,9 +177,6 @@ namespace GPhoto { + public char type[64]; + public uint width; + public uint height; +- public string name; +- public CameraFilePermissions permissions; +- public time_t mtime; + } + + [CCode ( +-- +2.31.1 + +From f7d044e7a72b80a550fd1907a2d56053caab1ae3 Mon Sep 17 00:00:00 2001 +From: Jens Georg +Date: Sat, 13 Mar 2021 22:32:17 +0100 +Subject: [PATCH 4/6] Fix strings in [SimpleType] structs + +--- + src/camera/ImportPage.vala | 5 +++-- + vapi/libraw.vapi | 2 +- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala +index c424de88..f5e98955 100644 +--- a/src/camera/ImportPage.vala ++++ b/src/camera/ImportPage.vala +@@ -1408,12 +1408,13 @@ public class ImportPage : CheckerboardPage { + import_list.add(video_source); + } else { + // determine file format from type, and then from file extension +- PhotoFileFormat file_format = PhotoFileFormat.from_gphoto_type(info.file.type); ++ string file_type = (string)info.file.type; ++ PhotoFileFormat file_format = PhotoFileFormat.from_gphoto_type(file_type); + if (file_format == PhotoFileFormat.UNKNOWN) { + file_format = PhotoFileFormat.get_by_basename_extension(filename); + if (file_format == PhotoFileFormat.UNKNOWN) { + message("Skipping %s/%s: Not a supported file extension (%s)", fulldir, +- filename, info.file.type); ++ filename, file_type); + + continue; + } +diff --git a/vapi/libraw.vapi b/vapi/libraw.vapi +index b1b5875b..146f447e 100644 +--- a/vapi/libraw.vapi ++++ b/vapi/libraw.vapi +@@ -248,7 +248,7 @@ public struct Thumbnail { + public uint tlength; + public int tcolors; + [CCode (array_length_cname="tlength")] +- public uint8[] thumb; ++ public unowned uint8[] thumb; + } + + [CCode (cname="enum LibRaw_thumbnail_formats", cprefix="LIBRAW_THUMBNAIL_")] +-- +2.31.1 + +From a035ff6ee39dc47c6051f7b29c7da83d3ecde52e Mon Sep 17 00:00:00 2001 +From: Jens Georg +Date: Sun, 14 Mar 2021 11:21:10 +0100 +Subject: [PATCH 5/6] Fix compile error after GPhoto vapi change + +--- + src/camera/ImportPage.vala | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala +index f5e98955..7dbe9d42 100644 +--- a/src/camera/ImportPage.vala ++++ b/src/camera/ImportPage.vala +@@ -1333,7 +1333,7 @@ public class ImportPage : CheckerboardPage { + if (fsid >= sifs.length) + return null; + +- return (sifs[fsid].fields & GPhoto.CameraStorageInfoFields.BASE) != 0 ? sifs[fsid].basedir : "/"; ++ return (GPhoto.CameraStorageInfoFields.BASE in sifs[fsid].fields) ? (string) sifs[fsid].basedir : "/"; + } + + public static string? get_fulldir(GPhoto.Camera camera, string camera_name, int fsid, string folder) { +-- +2.31.1 + +From 44dae743da462742f1acdeb599f0a10afa43e629 Mon Sep 17 00:00:00 2001 +From: Jens Georg +Date: Sun, 14 Mar 2021 12:22:55 +0100 +Subject: [PATCH 6/6] Fix and clarify the helper header for GPhoto + +--- + vapi/libgphoto2.vapi | 8 ++++---- + vapi/{gphoto.h => shotwell-gphoto-helper.h} | 0 + 2 files changed, 4 insertions(+), 4 deletions(-) + rename vapi/{gphoto.h => shotwell-gphoto-helper.h} (100%) + +diff --git a/vapi/libgphoto2.vapi b/vapi/libgphoto2.vapi +index adcef5c5..aeab7255 100644 +--- a/vapi/libgphoto2.vapi ++++ b/vapi/libgphoto2.vapi +@@ -53,7 +53,7 @@ namespace GPhoto { + ref_function="GPHOTO_REF_CAMERA", + unref_function="gp_camera_unref", + free_function="gp_camera_free", +- cheader_filename="gphoto2/gphoto2-camera.h,gphoto2.h" ++ cheader_filename="gphoto2/gphoto2-camera.h,shotwell-gphoto-helper.h" + )] + public class Camera { + [CCode (cname="gp_camera_new")] +@@ -99,7 +99,7 @@ namespace GPhoto { + ref_function="GPHOTO_REF_FILE", + unref_function="gp_file_unref", + free_function="gp_file_free", +- cheader_filename="gphoto2/gphoto2-file.h,gphoto2.h" ++ cheader_filename="gphoto2/gphoto2-file.h,shotwell-gphoto-helper.h" + )] + public class CameraFile { + [CCode (cname="gp_file_new")] +@@ -252,7 +252,7 @@ namespace GPhoto { + ref_function="GPHOTO_REF_LIST", + unref_function="gp_list_unref", + free_function="gp_list_free", +- cheader_filename="gphoto2/gphoto2-list.h,gphoto2.h" ++ cheader_filename="gphoto2/gphoto2-list.h,shotwell-gphoto-helper.h" + )] + public class CameraList { + [CCode (cname="gp_list_new")] +@@ -324,7 +324,7 @@ namespace GPhoto { + [CCode ( + ref_function="GPHOTO_REF_CONTEXT", + unref_function="gp_context_unref", +- cheader_filename="gphoto2/gphoto2-context.h,gphoto2.h" ++ cheader_filename="gphoto2/gphoto2-context.h,shotwell-gphoto-helper.h" + )] + public class Context { + [CCode (cname="gp_context_new")] +diff --git a/vapi/gphoto.h b/vapi/shotwell-gphoto-helper.h +similarity index 100% +rename from vapi/gphoto.h +rename to vapi/shotwell-gphoto-helper.h +-- +2.31.1 + diff --git a/package.yml b/package.yml --- a/package.yml +++ b/package.yml @@ -1,7 +1,7 @@ name : shotwell homepage : https://wiki.gnome.org/Apps/Shotwell version : 0.31.3 -release : 38 +release : 39 source : - https://download.gnome.org/sources/shotwell/0.31/shotwell-0.31.3.tar.xz : 8de36f20488f4fb7d090194c8af46cd3661bcc81a3d65f980cb17667ed826af2 license : LGPL-2.1-or-later @@ -27,7 +27,8 @@ - vala - itstool setup : | - %meson_configure -Dinstall-apport-hook=false + %patch -p1 < $pkgfiles/shotwell-0.31.3-vapi_fixes.patch + %meson_configure -Dinstall_apport_hook=false build : | %ninja_build install : | diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml --- a/pspec_x86_64.xml +++ b/pspec_x86_64.xml @@ -3,8 +3,8 @@ shotwell https://wiki.gnome.org/Apps/Shotwell - Joey Riches - josephriches@gmail.com + Algent Albrahimi + algent@protonmail.com LGPL-2.1-or-later multimedia.graphics @@ -33,7 +33,6 @@ /usr/lib64/shotwell/shotwell/shotwell-video-thumbnailer /usr/share/applications/org.gnome.Shotwell-Viewer.desktop /usr/share/applications/org.gnome.Shotwell.desktop - /usr/share/apport/package-hooks/shotwell.py /usr/share/glib-2.0/schemas/org.gnome.shotwell-extras.gschema.xml /usr/share/glib-2.0/schemas/org.gnome.shotwell.gschema.xml /usr/share/help/C/shotwell/edit-adjustments.page @@ -680,7 +679,7 @@ programming.devel - shotwell + shotwell /usr/lib64/libshotwell-authenticator.so @@ -689,12 +688,12 @@ - - 2021-06-23 + + 2022-01-03 0.31.3 Packaging update - Joey Riches - josephriches@gmail.com + Algent Albrahimi + algent@protonmail.com \ No newline at end of file