diff --git a/.gitignore b/.gitignore index 4bde57a..de1429a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,3 @@ libXres-1.0.4.tar.bz2 /libXres-20130524.tar.bz2 /libXres-1.0.7.tar.bz2 /libXres-1.2.0.tar.bz2 -/libXres-1.2.1.tar.bz2 -/libXres-1.2.2.tar.xz diff --git a/0001-XRes-Use-_XRead-instead-of-_XRead32-for-reading-pid.patch b/0001-XRes-Use-_XRead-instead-of-_XRead32-for-reading-pid.patch new file mode 100644 index 0000000..03b709c --- /dev/null +++ b/0001-XRes-Use-_XRead-instead-of-_XRead32-for-reading-pid.patch @@ -0,0 +1,33 @@ +From 3e6bdd90c604e061c71715865eb403ffdd0dd7f0 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Wed, 21 Oct 2020 10:03:23 -0400 +Subject: [PATCH] XRes: Use _XRead instead of _XRead32 for reading pid + +_XRead32 requires the output variable to be a long, but +`ReadClientValues` feeds it client->value which is a +32-bit allocation. + +This commit changes the code to use _XRead instead, which +properly handles 32-bit output variables. + +https://gitlab.freedesktop.org/xorg/lib/libxres/-/issues/3 +--- + src/XRes.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/XRes.c b/src/XRes.c +index 2bee277..90e72c9 100644 +--- a/src/XRes.c ++++ b/src/XRes.c +@@ -256,7 +256,7 @@ static Bool ReadClientValues( + _XRead32 (dpy, &value, 4); + client->length = value; + client->value = malloc(client->length); +- _XRead32 (dpy, client->value, client->length); ++ _XRead (dpy, client->value, client->length); + } + return True; + } +-- +2.28.0 + diff --git a/libXres.spec b/libXres.spec index 1fd4063..f10fdfb 100644 --- a/libXres.spec +++ b/libXres.spec @@ -4,22 +4,23 @@ Summary: X-Resource extension client library Name: libXres -Version: 1.2.2 -Release: 6%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} -License: X11 +Version: 1.2.0 +Release: 13%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +License: MIT URL: http://www.x.org %if 0%{?gitdate} -Source0: %{tarball}-%{gitdate}.tar.xz +Source0: %{tarball}-%{gitdate}.tar.bz2 Source1: make-git-snapshot.sh Source2: commitid %else -Source0: https://www.x.org/pub/individual/lib/%{name}-%{version}.tar.xz +Source0: https://www.x.org/pub/individual/lib/%{name}-%{version}.tar.bz2 %endif # Fixes a bug which causes metacity 3.38.0+ to crash on startup: # https://bugzilla.redhat.com/show_bug.cgi?id=1888993 # https://gitlab.freedesktop.org/xorg/lib/libxres/-/issues/3 # https://gitlab.freedesktop.org/xorg/lib/libxres/-/merge_requests/1 +Patch0: 0001-XRes-Use-_XRead-instead-of-_XRead32-for-reading-pid.patch Requires: libX11 >= 1.5.99.902 @@ -42,6 +43,7 @@ X.Org X11 libXres development package %prep %setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} +%patch0 -p1 %build autoreconf -v --install --force @@ -71,42 +73,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %{_mandir}/man3/*.3* %changelog -* Thu Jul 24 2025 Fedora Release Engineering - 1.2.2-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Fri Jan 17 2025 Fedora Release Engineering - 1.2.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Thu Jul 18 2024 Fedora Release Engineering - 1.2.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Thu Jan 25 2024 Fedora Release Engineering - 1.2.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Jan 21 2024 Fedora Release Engineering - 1.2.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Thu Oct 05 2023 José Expósito - 1.2.2-1 -- libXres 1.2.2 - -* Wed Sep 06 2023 Benjamin Tissoires - 1.2.1-6 -- SPDX Migration - -* Thu Jul 20 2023 Fedora Release Engineering - 1.2.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Thu Jan 19 2023 Fedora Release Engineering - 1.2.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Thu Jul 21 2022 Fedora Release Engineering - 1.2.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Thu Jan 20 2022 Fedora Release Engineering - 1.2.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Tue Sep 21 2021 Benjamin Tissoires 1.2.1-1 -- libXres 1.2.1 - * Thu Jul 22 2021 Fedora Release Engineering - 1.2.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index 78899a3..84f8629 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libXres-1.2.2.tar.xz) = 897f2d426ea6f41169a5a52c356d1a1cb2ffb9144ae41b9fedd06455c3d81042930fe55be269ce4b8545ee65fcfe168101192a599053d810e8810f627c94f810 +SHA512 (libXres-1.2.0.tar.bz2) = 8eb5a36b1f030eb4e27e676cc4befcc073da66a7bce2b39089314e1facb629d13b087bb53ca2c95fe5291857da7ff9f80c6ab28fb3e245eeb9e0344937900172