From d93d19e6d4bfa5f57b8a8990a6bfdddffed87dfa Mon Sep 17 00:00:00 2001 From: David Fan Date: Thu, 27 Jun 2024 13:12:57 +0000 Subject: [PATCH] libxklavier package is retired on branch c10s for CS-2305 --- .gitignore | 2 - ...x-lengths-for-set_name-description-s.patch | 47 --- ...ur-name-description-setter-functions.patch | 50 --- ...ame-and-descriptions-for-valid-UTF-8.patch | 96 ----- dead.package | 1 + gating.yaml | 6 - libxklavier.spec | 342 ------------------ sources | 1 - 8 files changed, 1 insertion(+), 544 deletions(-) delete mode 100644 .gitignore delete mode 100644 0001-props-fix-the-max-lengths-for-set_name-description-s.patch delete mode 100644 0002-config-use-our-name-description-setter-functions.patch delete mode 100644 0003-props-validate-name-and-descriptions-for-valid-UTF-8.patch create mode 100644 dead.package delete mode 100644 gating.yaml delete mode 100644 libxklavier.spec delete mode 100644 sources diff --git a/.gitignore b/.gitignore deleted file mode 100644 index c610c7e..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/libxklavier-5.*.tar.bz2 -/libxklavier-5.*.tar.xz diff --git a/0001-props-fix-the-max-lengths-for-set_name-description-s.patch b/0001-props-fix-the-max-lengths-for-set_name-description-s.patch deleted file mode 100644 index 79b747a..0000000 --- a/0001-props-fix-the-max-lengths-for-set_name-description-s.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 0610dc493702929f8376687249b5ba98180198f3 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 22 Jan 2024 10:40:42 +1000 -Subject: [PATCH 1/3] props: fix the max lengths for - set_name/description/short_description - -All three had the wrong copy/pasta applied to them, so if this function -was ever called, our description was limited to e.g. 32 bytes. -I'm assuming this function has never been used before. ---- - libxklavier/xklavier_props.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/libxklavier/xklavier_props.c b/libxklavier/xklavier_props.c -index 95f38e2..73996d6 100644 ---- a/libxklavier/xklavier_props.c -+++ b/libxklavier/xklavier_props.c -@@ -65,7 +65,7 @@ xkl_config_item_set_name(XklConfigItem * item, - const gchar * name) - { - if (name != NULL) -- strncpy (item->name, name, XKL_MAX_CI_SHORT_DESC_LENGTH-1); -+ strncpy (item->name, name, XKL_MAX_CI_NAME_LENGTH-1); - else - item->name[0] = '\0'; - } -@@ -81,7 +81,7 @@ xkl_config_item_set_short_description(XklConfigItem * item, - const gchar * short_description) - { - if (short_description != NULL) -- strncpy (item->short_description, short_description, XKL_MAX_CI_DESC_LENGTH-1); -+ strncpy (item->short_description, short_description, XKL_MAX_CI_SHORT_DESC_LENGTH-1); - else - item->short_description[0] = '\0'; - } -@@ -97,7 +97,7 @@ xkl_config_item_set_description(XklConfigItem * item, - const gchar * description) - { - if (description != NULL) -- strncpy (item->description, description, XKL_MAX_CI_NAME_LENGTH-1); -+ strncpy (item->description, description, XKL_MAX_CI_DESC_LENGTH-1); - else - item->description[0] = '\0'; - } --- -2.43.0 - diff --git a/0002-config-use-our-name-description-setter-functions.patch b/0002-config-use-our-name-description-setter-functions.patch deleted file mode 100644 index 0de23c6..0000000 --- a/0002-config-use-our-name-description-setter-functions.patch +++ /dev/null @@ -1,50 +0,0 @@ -From be4a42c9638768777f9db6746676519e06e12425 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 22 Jan 2024 10:53:49 +1000 -Subject: [PATCH 2/3] config: use our name/description setter functions - -The direct strncat into the struct is probably the reason no-one noticed -the wrong #defines being used in those setters (see previous commit). -We have the setters, let's use them. ---- - libxklavier/xklavier_config.c | 14 +++++--------- - 1 file changed, 5 insertions(+), 9 deletions(-) - -diff --git a/libxklavier/xklavier_config.c b/libxklavier/xklavier_config.c -index ac34a20..c6c9bc1 100644 ---- a/libxklavier/xklavier_config.c -+++ b/libxklavier/xklavier_config.c -@@ -191,16 +191,13 @@ xkl_read_config_item(XklConfigRegistry * config, gint doc_index, - vendor_element = xkl_find_element(ptr, XML_TAG_VENDOR); - - if (name_element != NULL && name_element->children != NULL) -- strncat(item->name, -- (char *) name_element->children->content, -- XKL_MAX_CI_NAME_LENGTH - 1); -+ xkl_config_item_set_name(item, (char *) name_element->children->content); - - if (short_desc_element != NULL - && short_desc_element->children != NULL) { -- strncat(item->short_description, -- dgettext(XKB_DOMAIN, (const char *) -- short_desc_element->children->content), -- XKL_MAX_CI_SHORT_DESC_LENGTH - 1); -+ xkl_config_item_set_short_description(item, -+ dgettext(XKB_DOMAIN, (const char *) -+ short_desc_element->children->content)); - } - - if (desc_element != NULL && desc_element->children != NULL) { -@@ -238,8 +235,7 @@ xkl_read_config_item(XklConfigRegistry * config, gint doc_index, - g_free(translated); - translated = unescaped; - } -- strncat(item->description, -- translated, XKL_MAX_CI_DESC_LENGTH - 1); -+ xkl_config_item_set_description(item, translated); - g_free(translated); - } - --- -2.43.0 - diff --git a/0003-props-validate-name-and-descriptions-for-valid-UTF-8.patch b/0003-props-validate-name-and-descriptions-for-valid-UTF-8.patch deleted file mode 100644 index cd34d4b..0000000 --- a/0003-props-validate-name-and-descriptions-for-valid-UTF-8.patch +++ /dev/null @@ -1,96 +0,0 @@ -From c95e5dd9c041bc7e41fb40df96076200458fc19e Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Mon, 22 Jan 2024 09:39:41 +1000 -Subject: [PATCH 3/3] props: validate name and descriptions for valid UTF-8 - -All three are truncated to a fixed max length, potentially leading to -invalid UTF-8 sequences. Ensure that can't happen by chopping off any -invalid sequences. - -See -https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/issues/435 ---- - libxklavier/xklavier_props.c | 33 +++++++++++++++++++++++++++------ - 1 file changed, 27 insertions(+), 6 deletions(-) - -diff --git a/libxklavier/xklavier_props.c b/libxklavier/xklavier_props.c -index 73996d6..8929de7 100644 ---- a/libxklavier/xklavier_props.c -+++ b/libxklavier/xklavier_props.c -@@ -21,6 +21,8 @@ - #include - #include - -+#include -+ - #include - #include - -@@ -30,6 +32,19 @@ - - #include "xklavier_private.h" - -+/* Truncate the given null-terminated string (within an allocation -+ * of sz bytes) to the longest continuously valid UTF-8 sequence */ -+static void -+utf8_truncate(gchar string[], size_t sz) -+{ -+ const char *end; -+ -+ if (!g_utf8_validate (string, -1, &end)) { -+ ptrdiff_t valid = end - (const gchar *)string; -+ memset (&string[valid], 0, sz - valid); -+ } -+} -+ - static GObjectClass *parent_class = NULL; - - static void xkl_config_rec_destroy(XklConfigRec * data); -@@ -64,10 +79,12 @@ void - xkl_config_item_set_name(XklConfigItem * item, - const gchar * name) - { -- if (name != NULL) -+ if (name != NULL) { - strncpy (item->name, name, XKL_MAX_CI_NAME_LENGTH-1); -- else -+ utf8_truncate (item->name, sizeof (item->name)); -+ } else { - item->name[0] = '\0'; -+ } - } - - const gchar * -@@ -80,10 +97,12 @@ void - xkl_config_item_set_short_description(XklConfigItem * item, - const gchar * short_description) - { -- if (short_description != NULL) -+ if (short_description != NULL) { - strncpy (item->short_description, short_description, XKL_MAX_CI_SHORT_DESC_LENGTH-1); -- else -+ utf8_truncate (item->short_description, sizeof (item->short_description)); -+ } else { - item->short_description[0] = '\0'; -+ } - } - - const gchar * -@@ -96,10 +115,12 @@ void - xkl_config_item_set_description(XklConfigItem * item, - const gchar * description) - { -- if (description != NULL) -+ if (description != NULL) { - strncpy (item->description, description, XKL_MAX_CI_DESC_LENGTH-1); -- else -+ utf8_truncate (item->description, sizeof (item->description)); -+ } else { - item->description[0] = '\0'; -+ } - } - - G_DEFINE_TYPE(XklConfigRec, xkl_config_rec, G_TYPE_OBJECT) --- -2.43.0 - diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..aa2c209 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +libxklavier package is retired on branch c10s for CS-2305 \ No newline at end of file diff --git a/gating.yaml b/gating.yaml deleted file mode 100644 index d353613..0000000 --- a/gating.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- !Policy -product_versions: - - rhel-10 -decision_context: osci_compose_gate -rules: - - !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional} diff --git a/libxklavier.spec b/libxklavier.spec deleted file mode 100644 index e3f1244..0000000 --- a/libxklavier.spec +++ /dev/null @@ -1,342 +0,0 @@ -Summary: High-level API for X Keyboard Extension -Name: libxklavier -Version: 5.4 -Release: 26%{?dist} -License: LGPL-2.0-or-later -URL: http://www.freedesktop.org/wiki/Software/LibXklavier -BuildRequires: make -BuildRequires: libxml2-devel -BuildRequires: libxkbfile-devel -BuildRequires: libX11-devel -BuildRequires: libXi-devel -BuildRequires: libxml2-devel -BuildRequires: glib2-devel >= 2.6.0 -BuildRequires: iso-codes-devel -BuildRequires: gobject-introspection-devel -Requires: iso-codes -#Source: http://download.gnome.org/sources/libxklavier/5.3/%{name}-%{version}.tar.xz -Source: http://people.freedesktop.org/~svu/libxklavier-5.4.tar.bz2 - -Patch01: 0001-props-fix-the-max-lengths-for-set_name-description-s.patch -Patch02: 0002-config-use-our-name-description-setter-functions.patch -Patch03: 0003-props-validate-name-and-descriptions-for-valid-UTF-8.patch - -%description -libxklavier is a library providing a high-level API for the X Keyboard -Extension (XKB). This library is intended to support XFree86 and other -commercial X servers. It is useful for creating XKB-related software -(layout indicators etc). - -%package devel -Summary: Development files for libxklavier -Requires: %{name} = %{version}-%{release} -Requires: libxml2-devel - -%description devel -This package contains libraries, header files and developer documentation -needed to develop libxklavier applications. - -%prep -%autosetup -p1 - -%build -%configure \ - --disable-static \ - --with-xkb-base='%{_datadir}/X11/xkb' \ - --with-xkb-bin-base='%{_bindir}' - -make V=1 %{?_smp_mflags} - - -%install -make install DESTDIR=$RPM_BUILD_ROOT - -rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la} - -%ldconfig_post - -%ldconfig_postun - -%files -%doc AUTHORS NEWS README COPYING.LIB -%{_libdir}/libxklavier.so.16* -%dir %{_libdir}/girepository-1.0 -%{_libdir}/girepository-1.0/Xkl-1.0.typelib - -%files devel -%{_libdir}/pkgconfig/libxklavier.pc -%{_libdir}/libxklavier.so -%{_includedir}/libxklavier/ -%{_datadir}/gtk-doc -%dir %{_datadir}/gir-1.0 -%{_datadir}/gir-1.0/Xkl-1.0.gir - -%changelog -* Mon Jun 24 2024 Troy Dawson - 5.4-26 -- Bump release for June 2024 mass rebuild - -* Mon Jan 22 2024 Peter Hutterer - 5.4-25 -- Fix invalid UTF-8 truncations in XKB descriptions and names - -* Sun Jan 21 2024 Fedora Release Engineering - 5.4-24 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Thu Jul 20 2023 Fedora Release Engineering - 5.4-23 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Thu Jan 19 2023 Fedora Release Engineering - 5.4-22 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Thu Jul 21 2022 Fedora Release Engineering - 5.4-21 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Thu Jan 20 2022 Fedora Release Engineering - 5.4-20 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Thu Jul 22 2021 Fedora Release Engineering - 5.4-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue Jan 26 2021 Fedora Release Engineering - 5.4-18 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Thu Nov 5 12:21:14 AEST 2020 Peter Hutterer - 5.4-17 -- Add BuildRequires for make - -* Tue Jul 28 2020 Fedora Release Engineering - 5.4-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Wed Jan 29 2020 Fedora Release Engineering - 5.4-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Jul 25 2019 Fedora Release Engineering - 5.4-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Feb 01 2019 Fedora Release Engineering - 5.4-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Jul 13 2018 Fedora Release Engineering - 5.4-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Fri Jun 29 2018 Adam Jackson - 5.4-11 -- Use ldconfig scriptlet macros - -* Wed Feb 07 2018 Fedora Release Engineering - 5.4-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Aug 03 2017 Fedora Release Engineering - 5.4-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 5.4-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 5.4-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Thu Feb 04 2016 Fedora Release Engineering - 5.4-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Jun 17 2015 Fedora Release Engineering - 5.4-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sun Aug 17 2014 Fedora Release Engineering - 5.4-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Tue Jul 22 2014 Kalev Lember - 5.4-3 -- Rebuilt for gobject-introspection 1.41.4 - -* Sat Jun 07 2014 Fedora Release Engineering - 5.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Tue Oct 8 2013 Peter Robinson 5.4-1 -- Update to 5.4 - -* Sat Aug 03 2013 Fedora Release Engineering - 5.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Thu Feb 14 2013 Fedora Release Engineering - 5.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Sun Sep 23 2012 Kalev Lember - 5.3-1 -- Update to 5.3 -- Drop flags.patch and catch-more-xerrors.patch: applied upstream - -* Thu Jul 19 2012 Fedora Release Engineering - 5.2.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Thu Apr 19 2012 Matthias Clasen - 5.2.1-2 -- Add a runtime dependency on iso-codes (#813833) - -* Thu Feb 16 2012 Ray Strode 5.2-2 -- Enable gobject-introspection - -* Tue Jan 17 2012 Matthias Clasen - 5.2-1 -- Update to 5.2 - -* Fri Jan 13 2012 Fedora Release Engineering - 5.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Sun Feb 13 2011 Christopher Aillon - 5.1-1 -- Update to 5.1 - -* Tue Feb 08 2011 Fedora Release Engineering - 5.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Mon Aug 23 2010 Matthias Clasen 5.0-2 -- Co-own /usr/share/gtk-doc (#604402) - -* Sat Jan 16 2010 Matthias Clasen - 5.0-1 -- Update to 5.0 - -* Thu Dec 10 2009 Matthias Clasen - 4.0-7 -- Catch more X errors - -* Thu Oct 15 2009 Matthias Clasen - 4.0-6 -- Incorporate upstream fixes for XInput error handling - -* Fri Oct 2 2009 Matthias Clasen - 4.0-5 -- Handle BadDrawable errors gracefully - -* Sat Jul 25 2009 Fedora Release Engineering - 4.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Thu Jul 9 2009 Matthias Clasen - 4.0-3 -- Avoid a critical warning at runtime - -* Wed Jul 01 2009 Rex Dieter - 4.0-2 -- %%files: track files closer, esp lib sonames -- %%build: drop --disable-doxygen, add --disable-static, add %%{?_smp_mflags} - -* Tue Jun 30 2009 Matthias Clasen - 4.0-1 -- Update to 4.0 - -* Thu Mar 19 2009 Matthias Clasen - 3.9-1 -- Update to 3.9 - -* Sat Mar 7 2009 Matthias Clasen - 3.8-4 -- Suppress xkbcomp spew in .xsession-errors - -* Wed Feb 25 2009 Fedora Release Engineering - 3.8-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Mon Nov 24 2008 Matthias Clasen - 3.8-2 -- Update to 3.8 - -* Fri Sep 19 2008 Matthias Clasen - 3.7-3 -- Plug a memory leak - -* Fri Sep 5 2008 Matthias Clasen - 3.7-1 -- Update to 3.7 - -* Fri Jun 27 2008 Ray Strode - 3.6-2 -- Apply upstream patch to fix libxklavier crash (bug 452966) - -* Wed Apr 30 2008 Matthias Clasen - 3.6-1 -- Update to 3.6 - -* Mon Mar 10 2008 Matthias Clasen - 3.5-1 -- Update to 3.5 - -* Wed Jan 30 2008 Matthias Clasen - 3.4-1 -- Update to 3.4 - -* Wed Sep 5 2007 Matthias Clasen - 3.3-1 -- Update to 3.3 - -* Thu Aug 23 2007 Adam Jackson - 3.2-3 -- Rebuild for build ID - -* Wed Aug 8 2007 Matthias Clasen - 3.2-2 -- Update the license field - -* Sat May 19 2007 Matthias Clasen - 3.2-1 -- Update to 3.2 - -* Sat Nov 4 2006 Matthias Clasen - 3.1-2 -- Fix a possible crash (#213419) - -* Sat Nov 4 2006 Matthias Clasen - 3.1-1 -- Update to 3.1 - -* Wed Aug 30 2006 Matthias Clasen - 3.0-1.fc6 -- Update to 3.0 -- Require pkgconfig in the -devel package -- Don't ship static libraries - -* Wed Jul 12 2006 Jesse Keating - 2.91-1.1 -- rebuild - -* Wed Jun 14 2006 Matthias Clasen - 2.91-1 -- Update to 2.91 - -* Thu Jun 8 2006 Jesse Keating - 2.2-3 -- Add missing BR libxml2-devel - -* Wed Jun 7 2006 Jeremy Katz - 2.2-2 -- rebuild for -devel deps - -* Mon Mar 13 2006 Ray Strode - 2.2-1 -- Update to 2.2 - -* Thu Mar 9 2006 Ray Strode - 2.1.0.2006.02.23-2 -- trap X error reply to limit the damage of bug 183569. - -* Thu Feb 23 2006 Ray Strode - 2.1.0.2006.02.23-1 -- upgrade to latest cvs to handle xml comments (bug 178163) - -* Fri Feb 10 2006 Jesse Keating - 2.1-3.2 -- bump again for double-long bug on ppc(64) - -* Tue Feb 07 2006 Jesse Keating - 2.1-3.1 -- rebuilt for new gcc4.1 snapshot and glibc changes - -* Thu Jan 19 2006 Christopher Aillon 2.1-3 -- Add missing BR: libX11-devel libxml2-devel libxkbfile-devel - -* Tue Dec 27 2005 Christopher Aillon 2.1-2 -- Pull in latest version and get rid of the annoying XKB error dialog - -* Fri Dec 09 2005 Jesse Keating -- rebuilt - -* Mon Nov 21 2005 Ray Strode 2.0-3 -- Don't hard code the xkb data prefix. - -* Fri Nov 18 2005 Bill Nottingham 2.0-2 -- Fix references to obsolete X11R6 paths - -* Mon Mar 21 2005 David Zeuthen 2.0-1 -- Update to latest upstream version - -* Wed Mar 16 2005 David Zeuthen 1.14-2 -- Rebuild - -* Mon Jan 31 2005 Matthias Clasen 1.14-1 -- Update to 1.14 - -* Wed Sep 29 2004 Jonathan Blandford 1.02-3 -- bump version - -* Tue Jun 15 2004 Elliot Lee -- rebuilt - -* Tue Apr 20 2004 Jeremy Katz - 1.02-1 -- update to 1.02 with real fixes for xorg - -* Thu Apr 15 2004 Jeremy Katz - 1.00-2 -- patch for xorg.xml instead of xfree86.xml - -* Fri Apr 2 2004 Alex Larsson 1.00-1 -- update to 1.00 - -* Mon Mar 15 2004 Bill Nottingham -- fix typo (#118237) - -* Tue Mar 02 2004 Elliot Lee -- rebuilt - -* Fri Feb 13 2004 Elliot Lee -- rebuilt - - -* Tue Jan 27 2004 Alexander Larsson 0.97-1 -- First version diff --git a/sources b/sources deleted file mode 100644 index f4a5a15..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -13af74dcb6011ecedf1e3ed122bd31fa libxklavier-5.4.tar.bz2