commit 4b54a7f30c386912b1c124e05bbe264915c73254 Author: MSVSphere Packaging Team Date: Mon Oct 7 20:26:14 2024 +0300 import gnome-screenshot-40.0-5.el9 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e49c576 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/gnome-screenshot-40.0.tar.xz diff --git a/.gnome-screenshot.metadata b/.gnome-screenshot.metadata new file mode 100644 index 0000000..f6ad236 --- /dev/null +++ b/.gnome-screenshot.metadata @@ -0,0 +1 @@ +b71f77c1a10eac54d2e111d87c64ab523b21ffe4 SOURCES/gnome-screenshot-40.0.tar.xz diff --git a/SOURCES/0001-app-Specify-empty-filename-to-let-GNOME-Shell-store-.patch b/SOURCES/0001-app-Specify-empty-filename-to-let-GNOME-Shell-store-.patch new file mode 100644 index 0000000..9d2fed2 --- /dev/null +++ b/SOURCES/0001-app-Specify-empty-filename-to-let-GNOME-Shell-store-.patch @@ -0,0 +1,110 @@ +From ca1877d100e05ba1c04ae020c2543b6bd7c5e407 Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho +Date: Fri, 16 Feb 2024 17:55:21 +0100 +Subject: [PATCH] app: Specify empty filename to let GNOME Shell store in + clipboard + +--- + src/screenshot-application.c | 6 ++++++ + src/screenshot-backend-shell.c | 15 ++++++++++----- + src/screenshot-backend.c | 4 ++-- + src/screenshot-utils.c | 4 ++++ + 4 files changed, 22 insertions(+), 7 deletions(-) + +diff --git a/src/screenshot-application.c b/src/screenshot-application.c +index f7f5022..eb9cf59 100644 +--- a/src/screenshot-application.c ++++ b/src/screenshot-application.c +@@ -486,6 +486,12 @@ finish_take_screenshot (ScreenshotApplication *self) + screenshot = screenshot_get_pixbuf (self->rectangle); + g_clear_pointer (&self->rectangle, g_free); + ++ if (screenshot == NULL && screenshot_config->copy_to_clipboard) ++ { ++ g_application_release (G_APPLICATION (self)); ++ return; ++ } ++ + if (screenshot == NULL) + { + g_critical ("Unable to capture a screenshot of any window"); +diff --git a/src/screenshot-backend-shell.c b/src/screenshot-backend-shell.c +index 84c5ead..b651311 100644 +--- a/src/screenshot-backend-shell.c ++++ b/src/screenshot-backend-shell.c +@@ -38,8 +38,8 @@ G_DEFINE_TYPE_WITH_CODE (ScreenshotBackendShell, screenshot_backend_shell, G_TYP + G_IMPLEMENT_INTERFACE (SCREENSHOT_TYPE_BACKEND, screenshot_backend_shell_backend_init)) + + static GdkPixbuf * +-screenshot_backend_shell_get_pixbuf (ScreenshotBackend *backend, +- GdkRectangle *rectangle) ++screenshot_backend_shell_get_pixbuf (ScreenshotBackend *backend, ++ GdkRectangle *rectangle) + { + g_autoptr(GError) error = NULL; + g_autofree gchar *path = NULL, *filename = NULL, *tmpname = NULL; +@@ -51,8 +51,13 @@ screenshot_backend_shell_get_pixbuf (ScreenshotBackend *backend, + path = g_build_filename (g_get_user_cache_dir (), "gnome-screenshot", NULL); + g_mkdir_with_parents (path, 0700); + +- tmpname = g_strdup_printf ("scr-%d.png", g_random_int ()); +- filename = g_build_filename (path, tmpname, NULL); ++ if (!screenshot_config->copy_to_clipboard) ++ { ++ tmpname = g_strdup_printf ("scr-%d.png", g_random_int ()); ++ filename = g_build_filename (path, tmpname, NULL); ++ } ++ else ++ filename = g_strdup (""); + + if (screenshot_config->take_window_shot) + { +@@ -94,7 +99,7 @@ screenshot_backend_shell_get_pixbuf (ScreenshotBackend *backend, + NULL, + &error); + +- if (error == NULL) ++ if (error == NULL && *filename) + { + screenshot = gdk_pixbuf_new_from_file (filename, &error); + +diff --git a/src/screenshot-backend.c b/src/screenshot-backend.c +index 73b4e5d..026bdcf 100644 +--- a/src/screenshot-backend.c ++++ b/src/screenshot-backend.c +@@ -29,8 +29,8 @@ screenshot_backend_default_init (ScreenshotBackendInterface *iface) + } + + GdkPixbuf * +-screenshot_backend_get_pixbuf (ScreenshotBackend *self, +- GdkRectangle *rectangle) ++screenshot_backend_get_pixbuf (ScreenshotBackend *self, ++ GdkRectangle *rectangle) + { + ScreenshotBackendInterface *iface; + +diff --git a/src/screenshot-utils.c b/src/screenshot-utils.c +index df0b6e9..87929be 100644 +--- a/src/screenshot-utils.c ++++ b/src/screenshot-utils.c +@@ -27,6 +27,7 @@ + #include + + #include "screenshot-backend-shell.h" ++#include "screenshot-config.h" + + #ifdef HAVE_X11 + #include "screenshot-backend-x11.h" +@@ -47,6 +48,9 @@ screenshot_get_pixbuf (GdkRectangle *rectangle) + { + backend = screenshot_backend_shell_new (); + screenshot = screenshot_backend_get_pixbuf (backend, rectangle); ++ if (!screenshot && screenshot_config->copy_to_clipboard) ++ return NULL; ++ + if (!screenshot) + #ifdef HAVE_X11 + g_message ("Unable to use GNOME Shell's builtin screenshot interface, " +-- +2.44.0 + diff --git a/SOURCES/gnome-screenshot-40.0-headless-fix.patch b/SOURCES/gnome-screenshot-40.0-headless-fix.patch new file mode 100644 index 0000000..f01eb47 --- /dev/null +++ b/SOURCES/gnome-screenshot-40.0-headless-fix.patch @@ -0,0 +1,45 @@ +From 97316afbd1e9b0c25de5f87b52d47448ee667bdb Mon Sep 17 00:00:00 2001 +From: Sebastian Keller +Date: Fri, 12 Nov 2021 22:21:27 +0100 +Subject: [PATCH] application: Drop support for non-unique mode in headless + instance + +gnome-shell started allowing only applications that own certain names +on the session bus to interact with the screenshot interface. While the +name used by gnome-screenshot is on the allowed list, non-unique +instances that are used for the headless mode do not own that name. Fix +this by also making the headless instance unique so it will own the +name. This however also means that there can only ever be a single +instance of gnome-screenshot, regardless of headless or interactive. + +Fixes: https://gitlab.gnome.org/GNOME/gnome-screenshot/-/issues/179 +--- + src/screenshot-application.c | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/src/screenshot-application.c b/src/screenshot-application.c +index cc663d4..7acdc0e 100644 +--- a/src/screenshot-application.c ++++ b/src/screenshot-application.c +@@ -630,18 +630,6 @@ screenshot_application_handle_local_options (GApplication *app, + exit (EXIT_SUCCESS); + } + +- /* Start headless instances in non-unique mode */ +- if (!g_variant_dict_contains (options, "interactive")) +- { +- GApplicationFlags old_flags; +- +- old_flags = g_application_get_flags (app); +- if ((old_flags & G_APPLICATION_IS_SERVICE) == 0) +- { +- g_application_set_flags (app, old_flags | G_APPLICATION_NON_UNIQUE); +- } +- } +- + return -1; + } + +-- +GitLab + diff --git a/SPECS/gnome-screenshot.spec b/SPECS/gnome-screenshot.spec new file mode 100644 index 0000000..9505861 --- /dev/null +++ b/SPECS/gnome-screenshot.spec @@ -0,0 +1,308 @@ +%global tarball_version %%(echo %{version} | tr '~' '.') + +Name: gnome-screenshot +Version: 40.0 +Release: 5%{?dist} +Summary: A screenshot utility for GNOME + +License: GPLv2+ +URL: https://gitlab.gnome.org/GNOME/gnome-screenshot +Source0: https://download.gnome.org/sources/gnome-screenshot/40/gnome-screenshot-%{tarball_version}.tar.xz +# https://bugzilla.redhat.com/show_bug.cgi?id=2078976 +Patch0: gnome-screenshot-40.0-headless-fix.patch + +Patch1: 0001-app-Specify-empty-filename-to-let-GNOME-Shell-store-.patch + +BuildRequires: gcc +BuildRequires: gettext +BuildRequires: libappstream-glib-devel +BuildRequires: meson +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(libcanberra-gtk3) +BuildRequires: pkgconfig(libhandy-1) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xext) +BuildRequires: /usr/bin/desktop-file-validate + +%description +gnome-screenshot lets you take pictures of your screen. + + +%prep +%autosetup -p1 -n gnome-screenshot-%{tarball_version} + + +%build +%meson +%meson_build + + +%install +%meson_install + +%find_lang %{name} + + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Screenshot.desktop + + +%files -f %{name}.lang +%license COPYING +%{_bindir}/gnome-screenshot +%{_datadir}/metainfo/org.gnome.Screenshot.metainfo.xml +%{_datadir}/applications/org.gnome.Screenshot.desktop +%{_datadir}/dbus-1/services/org.gnome.Screenshot.service +%{_datadir}/glib-2.0/schemas/org.gnome.gnome-screenshot.gschema.xml +%{_datadir}/icons/hicolor/scalable/apps/org.gnome.Screenshot.svg +%{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Screenshot-symbolic.svg +%{_mandir}/man1/gnome-screenshot.1* + + +%changelog +* Thu Apr 18 2024 Carlos Garnacho - 40.0-5 +- Fix pasting into clipboard through CLI (RHEL-25179) + +* Wed Jul 13 2022 David King - 40.0-4 +- Fix headless mode (#2078976) + +* Mon Aug 09 2021 Mohan Boddu - 40.0-3 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Thu Apr 15 2021 Mohan Boddu - 40.0-2 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Mon Mar 22 2021 Kalev Lember - 40.0-1 +- Update to 40.0 +- Drop old obsoletes + +* Mon Mar 15 2021 Kalev Lember - 40~rc-1 +- Update to 40.rc + +* Thu Feb 18 2021 Kalev Lember - 40~beta-1 +- Update to 40.beta +- Update source URLs + +* Tue Jan 26 2021 Fedora Release Engineering - 3.38.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Sep 10 2020 Kalev Lember - 3.38.0-1 +- Update to 3.38.0 + +* Mon Aug 17 2020 Kalev Lember - 3.37.90-1 +- Update to 3.37.90 + +* Sat Aug 01 2020 Fedora Release Engineering - 3.37.1-3 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 3.37.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jun 05 2020 Kalev Lember - 3.37.1-1 +- Update to 3.37.1 + +* Tue Mar 10 2020 Kalev Lember - 3.36.0-1 +- Update to 3.36.0 + +* Tue Jan 28 2020 Fedora Release Engineering - 3.34.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Oct 14 2019 Kalev Lember - 3.34.0-1 +- Update to 3.34.0 + +* Mon Aug 12 2019 Kalev Lember - 3.33.90-1 +- Update to 3.33.90 + +* Thu Jul 25 2019 Fedora Release Engineering - 3.32.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Mar 15 2019 Kalev Lember - 3.32.0-1 +- Update to 3.32.0 + +* Thu Jan 31 2019 Fedora Release Engineering - 3.30.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Sep 06 2018 Kalev Lember - 3.30.0-1 +- Update to 3.30.0 + +* Mon Aug 13 2018 Kalev Lember - 3.26.0-6 +- Use BuildRequires: libappstream-glib-devel instead of appstream + +* Mon Aug 13 2018 Leigh Scott - 3.26.0-5 +- Add BuildRequires: appstream + +* Fri Jul 13 2018 Fedora Release Engineering - 3.26.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 3.26.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Jan 06 2018 Igor Gnatenko - 3.26.0-2 +- Remove obsolete scriptlets + +* Wed Nov 01 2017 Kalev Lember - 3.26.0-1 +- Update to 3.26.0 + +* Tue Aug 01 2017 Kalev Lember - 3.25.0-1 +- Update to 3.25.0 +- Switch to the meson build system + +* Wed Jul 26 2017 Fedora Release Engineering - 3.22.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 3.22.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Sep 22 2016 Kalev Lember - 3.22.0-1 +- Update to 3.22.0 +- Don't set group tags +- Use glob for man page extension + +* Mon Aug 15 2016 Rui Matos - 3.20.1-2 +- Add upstream patch to fix a 100% cpu usage bug + Resolves: #1353321 + +* Wed Jun 22 2016 Richard Hughes - 3.20.1-1 +- Update to 3.20.1 + +* Sat Jun 18 2016 Kalev Lember - 3.20.0-1 +- Update to 3.20.0 +- Use screenshots from upstream appdata + +* Wed Feb 03 2016 Fedora Release Engineering - 3.18.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Sep 22 2015 Kalev Lember - 3.18.0-1 +- Update to 3.18.0 +- Use make_install macro + +* Wed Jun 17 2015 Fedora Release Engineering - 3.16.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed May 13 2015 Kalev Lember - 3.16.2-1 +- Update to 3.16.2 +- Use license macro for the COPYING file + +* Mon Mar 30 2015 Richard Hughes - 3.16.0-2 +- Use better AppData screenshots + +* Tue Mar 24 2015 Kalev Lember - 3.16.0-1 +- Update to 3.16.0 + +* Sat Feb 21 2015 Kalev Lember - 3.15.90-1 +- Update to 3.15.90 + +* Tue Sep 23 2014 Kalev Lember - 3.14.0-1 +- Update to 3.14.0 + +* Tue Sep 16 2014 Kalev Lember - 3.13.92-1 +- Update to 3.13.92 + +* Fri Sep 05 2014 Kalev Lember - 3.13.90-2.gitcbdd3f5 +- Update to today's git snapshot (#1136959) + +* Thu Aug 21 2014 Kalev Lember - 3.13.90-1 +- Update to 3.13.90 +- Validate the desktop file + +* Sat Aug 16 2014 Fedora Release Engineering - 3.12.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 3.12.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Mar 25 2014 Kalev Lember - 3.12.0-1 +- Update to 3.12.0 + +* Tue Feb 18 2014 Richard Hughes - 3.11.90-1 +- Update to 3.11.90 + +* Tue Nov 19 2013 Richard Hughes - 3.10.1-1 +- Update to 3.10.1 + +* Wed Sep 25 2013 Kalev Lember - 3.10.0-1 +- Update to 3.10.0 + +* Thu Aug 22 2013 Kalev Lember - 3.9.90-1 +- Update to 3.9.90 + +* Sat Aug 03 2013 Fedora Release Engineering - 3.9.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 16 2013 Richard Hughes - 3.9.4-1 +- Update to 3.9.4 + +* Fri Jun 21 2013 Kalev Lember - 3.9.3-1 +- Update to 3.9.3 + +* Tue May 14 2013 Richard Hughes - 3.8.2-1 +- Update to 3.8.2 + +* Mon Apr 15 2013 Kalev Lember - 3.8.1-1 +- Update to 3.8.1 + +* Tue Mar 26 2013 Kalev Lember - 3.8.0-1 +- Update to 3.8.0 + +* Thu Feb 07 2013 Richard Hughes - 3.7.5-1 +- Update to 3.7.5 + +* Wed Jan 16 2013 Richard Hughes - 3.7.4-1 +- Update to 3.7.4 + +* Mon Nov 12 2012 Kalev Lember - 3.6.1-1 +- Update to 3.6.1 + +* Tue Sep 25 2012 Cosimo Cecchi - 3.6.0-1 +- Update to 3.6.0 + +* Wed Sep 19 2012 Richard Hughes - 3.5.92-1 +- Update to 3.5.92 + +* Wed Sep 05 2012 Cosimo Cecchi - 3.5.91-1 +- Update to 3.5.91 + +* Tue Aug 21 2012 Richard Hughes - 3.5.90-1 +- Update to 3.5.90 + +* Thu Jul 19 2012 Fedora Release Engineering - 3.5.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jul 17 2012 Richard Hughes - 3.5.4-1 +- Update to 3.5.4 + +* Thu Jun 07 2012 Richard Hughes - 3.5.2-1 +- Update to 3.5.2 + +* Tue Apr 24 2012 Kalev Lember - 3.4.1-2 +- Silence rpm scriptlet output + +* Tue Apr 17 2012 Kalev Lember - 3.4.1-1 +- Update to 3.4.1 + +* Mon Apr 2 2012 Matthias Clasen - 3.4.0-2 +- Add missing gsettings scriptlets (#808462) + +* Mon Mar 26 2012 Cosimo Cecchi - 3.4.0-1 +- Update to 3.4.0 + +* Tue Mar 20 2012 Cosimo Cecchi - 3.3.92-1 +- Update to 3.3.92 + +* Tue Mar 6 2012 Matthias Clasen - 3.3.91-1 +- Update to 3.3.91 + +* Tue Feb 7 2012 Matthias Clasen - 3.3.2-1 +- Update to 3.3.2 + +* Fri Jan 13 2012 Fedora Release Engineering - 3.3.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Dec 21 2011 Matthias Clasen 3.3.1-2 +- Fix the obsoletes to take epoch into account + +* Wed Nov 23 2011 Matthias Clasen 3.3.1-1 +- Initial packaging