diff --git a/.gitignore b/.gitignore index b1ed1b5..3758f19 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ xclip-0.12.tar.gz /xclip-20140209.tar.xz /0.13.tar.gz +/xclip-9344507.tar.gz +/xclip-11cba61.tar.gz diff --git a/sources b/sources index 7cf921d..fcb6d9c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -81e49f56288f299e3389a019f2550ad2 0.13.tar.gz +SHA512 (xclip-11cba61.tar.gz) = 0ddc77372023600e4abd8f834eef6706e24aa21cc1ad93a9ca0e73b23119ebed0747071a98069c868be6104b69a39eff839608fc6bd0ed9b30097e3a6613ea2d diff --git a/xclip-fix-segfault-bz1947285.patch b/xclip-fix-segfault-bz1947285.patch new file mode 100644 index 0000000..a8c9f90 --- /dev/null +++ b/xclip-fix-segfault-bz1947285.patch @@ -0,0 +1,39 @@ +diff -up xclip-11cba613840b0d0e76dc2ea6d4ec7cc5f23daf88/xclip.c.1947285 xclip-11cba613840b0d0e76dc2ea6d4ec7cc5f23daf88/xclip.c +--- xclip-11cba613840b0d0e76dc2ea6d4ec7cc5f23daf88/xclip.c.1947285 2020-11-08 09:01:39.000000000 -0500 ++++ xclip-11cba613840b0d0e76dc2ea6d4ec7cc5f23daf88/xclip.c 2022-02-22 18:04:44.598444273 -0500 +@@ -353,7 +353,7 @@ doOptTarget(void) + static int + doIn(Window win, const char *progname) + { +- unsigned char *sel_buf; /* buffer for selection data */ ++ unsigned char *sel_buf = NULL; /* buffer for selection data */ + unsigned long sel_len = 0; /* length of sel_buf */ + unsigned long sel_all = 0; /* allocated size of sel_buf */ + XEvent evt; /* X Event Structures */ +@@ -714,9 +714,9 @@ static int + doOut(Window win) + { + Atom sel_type = None; +- unsigned char *sel_buf; /* buffer for selection data */ +- unsigned long sel_len = 0; /* length of sel_buf */ +- XEvent evt; /* X Event Structures */ ++ unsigned char *sel_buf = NULL; /* buffer for selection data */ ++ unsigned long sel_len = 0; /* length of sel_buf */ ++ XEvent evt; /* X Event Structures */ + unsigned int context = XCLIB_XCOUT_NONE; + + if (sseln == XA_STRING) +@@ -743,9 +743,11 @@ doOut(Window win) + /* If user requested -sensitive, then prevent further pastes (even though we failed to paste) */ + XSetSelectionOwner(dpy, sseln, None, CurrentTime); + /* Clear memory buffer */ +- xcmemzero(sel_buf,sel_len); ++ if (sel_buf != NULL) ++ xcmemzero(sel_buf,sel_len); + } +- free(sel_buf); ++ if (sel_buf != NULL) ++ free(sel_buf); + errconvsel(dpy, target, sseln); + // errconvsel does not return but exits with EXIT_FAILURE + } diff --git a/xclip.spec b/xclip.spec index 1507a6c..1fcb973 100644 --- a/xclip.spec +++ b/xclip.spec @@ -1,10 +1,17 @@ +%global commit 11cba613840b0d0e76dc2ea6d4ec7cc5f23daf88 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + Name: xclip Version: 0.13 -Release: 8%{?dist} -License: GPLv2+ +Release: 27.git%{shortcommit}%{?dist} +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later Summary: Command line clipboard grabber URL: http://sourceforge.net/projects/xclip -Source0: https://github.com/astrand/xclip/archive/%{version}.tar.gz +# Source0: https://github.com/astrand/xclip/archive/%%{version}.tar.gz +Source0: https://github.com/astrand/xclip/archive/%{commit}/%{name}-%{shortcommit}.tar.gz +Patch0: xclip-fix-segfault-bz1947285.patch +BuildRequires: make BuildRequires: libXmu-devel, libICE-devel, libX11-devel, libXext-devel BuildRequires: autoconf, automake, libtool @@ -17,7 +24,8 @@ an X selection to standard out, which can then be redirected to a file or another program. %prep -%setup -q +%setup -q -n %{name}-%{commit} +%patch -P0 -p1 -b .1947285 autoreconf -ifv %build @@ -38,6 +46,63 @@ make DESTDIR=$RPM_BUILD_ROOT install.man %{_mandir}/man1/xclip*.1* %changelog +* Fri Jul 17 2026 Fedora Release Engineering - 0.13-27.git11cba61 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + +* Sat Jan 17 2026 Fedora Release Engineering - 0.13-26.git11cba61 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + +* Fri Jul 25 2025 Fedora Release Engineering - 0.13-25.git11cba61 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Sun Jan 19 2025 Fedora Release Engineering - 0.13-24.git11cba61 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Fri Jul 26 2024 Miroslav Suchý - 0.13-23.git11cba61 +- convert license to SPDX + +* Sat Jul 20 2024 Fedora Release Engineering - 0.13-22.git11cba61 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sat Jan 27 2024 Fedora Release Engineering - 0.13-21.git11cba61 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jul 22 2023 Fedora Release Engineering - 0.13-20.git11cba61 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Sat Jan 21 2023 Fedora Release Engineering - 0.13-19.git11cba61 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 0.13-18.git11cba61 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Tue Feb 22 2022 Tom Callaway - 0.13-17.git11cba61 +- always init sel_buf to NULL + +* Sat Jan 22 2022 Fedora Release Engineering - 0.13-16.git11cba61 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 0.13-15.git11cba61 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Jun 10 2021 Tom Callaway - 0.13-14.git11cba61 +- apply Jerry James's fix for the segfault in bz1947285 + +* Mon Apr 26 2021 Tom Callaway - 0.13-13.git11cba61 +- update to latest from git + +* Wed Jan 27 2021 Fedora Release Engineering - 0.13-12.git9344507 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Sep 21 2020 Tom Callaway - 0.13-11.git9344507 +- update to latest from git + +* Wed Jul 29 2020 Fedora Release Engineering - 0.13-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jan 31 2020 Fedora Release Engineering - 0.13-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Sat Jul 27 2019 Fedora Release Engineering - 0.13-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild