From 9934e9349787a6b7d4a222d4d5cbf59f812936cb Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Mon, 21 Jan 2013 15:26:32 +0100 Subject: [PATCH 01/49] Rebuild due to "jpeg8-ABI" feature drop Signed-off-by: Adam Tkac --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 8dab8a5..3b8d88f 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -126,6 +126,9 @@ rm -rf %{buildroot} %{_libdir}/lib*.a %changelog +* Mon Jan 21 2013 Adam Tkac - 2.3.4-4 +- rebuild due to "jpeg8-ABI" feature drop + * Fri Oct 26 2012 Thomas Woerner 2.3.4-3 - do not use _isa for build requires From 3f96c3ec5c790fe0d365dda2b01cc40988f45ec0 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 14 Feb 2013 01:32:00 -0600 Subject: [PATCH 02/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 3b8d88f..1bef98b 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -126,6 +126,9 @@ rm -rf %{buildroot} %{_libdir}/lib*.a %changelog +* Thu Feb 14 2013 Fedora Release Engineering - 2.3.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Mon Jan 21 2013 Adam Tkac - 2.3.4-4 - rebuild due to "jpeg8-ABI" feature drop From 076d9effd951f6c1a01289269d58347d08bca853 Mon Sep 17 00:00:00 2001 From: Michael Schwendt Date: Tue, 28 May 2013 12:18:17 +0200 Subject: [PATCH 03/49] fix missing BuildRequires flex-static (RHBZ#889175) --- motif.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/motif.spec b/motif.spec index 1bef98b..9995f22 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -14,10 +14,7 @@ Requires: xorg-x11-xinit BuildRequires: automake, libtool, autoconf, flex # flex static libs have been part of flex for RHEL <= 6 and Fedora <= 12 -%if 0%{?fedora} > 17 || 0%{?rhel} > 6 -BuildRequires: flex-devel -%endif -%if 0%{?fedora} > 12 && 0%{?fedora} <= 17 +%if 0%{?fedora} > 12 || 0%{?rhel} > 6 BuildRequires: flex-static %endif BuildRequires: byacc, pkgconfig @@ -126,6 +123,9 @@ rm -rf %{buildroot} %{_libdir}/lib*.a %changelog +* Tue May 28 2013 Michael Schwendt - 2.3.4-6 +- fix missing BuildRequires flex-static (RHBZ#889175) + * Thu Feb 14 2013 Fedora Release Engineering - 2.3.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From f26b2bf73357d4dfa9c16bd0f2da23958371abe2 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 3 Aug 2013 06:51:25 -0500 Subject: [PATCH 04/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 9995f22..5af3d2d 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 6%{?dist} +Release: 7%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -123,6 +123,9 @@ rm -rf %{buildroot} %{_libdir}/lib*.a %changelog +* Sat Aug 03 2013 Fedora Release Engineering - 2.3.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Tue May 28 2013 Michael Schwendt - 2.3.4-6 - fix missing BuildRequires flex-static (RHBZ#889175) From 9e28ff9b3cc57802d8beef315014b9963d70ad44 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 06:07:37 -0500 Subject: [PATCH 05/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 5af3d2d..85ead0c 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 7%{?dist} +Release: 8%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -123,6 +123,9 @@ rm -rf %{buildroot} %{_libdir}/lib*.a %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 2.3.4-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Sat Aug 03 2013 Fedora Release Engineering - 2.3.4-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From 7381f1dc2cfbeda7c18573c6880381009d5bceaa Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 17 Aug 2014 10:22:06 +0000 Subject: [PATCH 06/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 85ead0c..37bc19c 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 8%{?dist} +Release: 9%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -123,6 +123,9 @@ rm -rf %{buildroot} %{_libdir}/lib*.a %changelog +* Sun Aug 17 2014 Fedora Release Engineering - 2.3.4-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sat Jun 07 2014 Fedora Release Engineering - 2.3.4-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 95b797b80f9d6e823e126574236cf4aea9a90729 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 17 Jun 2015 21:03:04 +0000 Subject: [PATCH 07/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 37bc19c..4bfa41a 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 9%{?dist} +Release: 10%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -123,6 +123,9 @@ rm -rf %{buildroot} %{_libdir}/lib*.a %changelog +* Wed Jun 17 2015 Fedora Release Engineering - 2.3.4-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Sun Aug 17 2014 Fedora Release Engineering - 2.3.4-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 8a3eb8ee1b894d7f3fe1e0e11dc34ca4046c62ce Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 4 Feb 2016 08:44:43 +0000 Subject: [PATCH 08/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 4bfa41a..4aeb655 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 10%{?dist} +Release: 11%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -123,6 +123,9 @@ rm -rf %{buildroot} %{_libdir}/lib*.a %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 2.3.4-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Wed Jun 17 2015 Fedora Release Engineering - 2.3.4-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 6f4cdff265b471790c2f8fd790f20b6e7b077fb8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 21:42:30 +0000 Subject: [PATCH 09/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 4aeb655..824c869 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 11%{?dist} +Release: 12%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -123,6 +123,9 @@ rm -rf %{buildroot} %{_libdir}/lib*.a %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 2.3.4-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Thu Feb 04 2016 Fedora Release Engineering - 2.3.4-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 578af8c6e559271afd48c59667c25c2e9ba94eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0abata?= Date: Thu, 8 Jun 2017 12:34:39 +0200 Subject: [PATCH 10/49] Fix issues with -Werror=format-security (#1448819) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Petr Šabata --- ...x-issues-with-Werror-format-security.patch | 815 ++++++++++++++++++ motif.spec | 8 +- 2 files changed, 822 insertions(+), 1 deletion(-) create mode 100644 motif-2.3.4-Fix-issues-with-Werror-format-security.patch diff --git a/motif-2.3.4-Fix-issues-with-Werror-format-security.patch b/motif-2.3.4-Fix-issues-with-Werror-format-security.patch new file mode 100644 index 0000000..f0ff860 --- /dev/null +++ b/motif-2.3.4-Fix-issues-with-Werror-format-security.patch @@ -0,0 +1,815 @@ +From 4783fb4cec8624311bb87b2eb4a2ac94a5c7d849 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20=C5=A0abata?= +Date: Thu, 8 Jun 2017 12:12:04 +0200 +Subject: [PATCH] Fix issues with -Werror=format-security +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Šabata +--- + lib/Mrm/Mrmhier.c | 4 +- + lib/Mrm/Mrmicon.c | 4 +- + lib/Mrm/Mrmlread.c | 2 +- + lib/Mrm/Mrmwcrw.c | 4 +- + tools/wml/wmldbcreate.c | 2 +- + tools/wml/wmlouth.c | 128 ++++++++++++++++++++++++------------------------ + tools/wml/wmloutkey.c | 10 ++-- + tools/wml/wmloutmm.c | 16 +++--- + tools/wml/wmlresolve.c | 26 +++++----- + 9 files changed, 98 insertions(+), 98 deletions(-) + +diff --git a/lib/Mrm/Mrmhier.c b/lib/Mrm/Mrmhier.c +index 2712742..2a8703c 100644 +--- a/lib/Mrm/Mrmhier.c ++++ b/lib/Mrm/Mrmhier.c +@@ -264,10 +264,10 @@ Urm__OpenHierarchy (MrmCount num_files, + case MrmSUCCESS: + break; + case MrmNOT_VALID: +- sprintf (err_stg, _MrmMMsg_0113); ++ sprintf (err_stg, "%s", _MrmMMsg_0113); + break; + default: +- sprintf (err_stg, _MrmMMsg_0114); ++ sprintf (err_stg, "%s", _MrmMMsg_0114); + break; + } + } +diff --git a/lib/Mrm/Mrmicon.c b/lib/Mrm/Mrmicon.c +index 95d4086..191e2d2 100644 +--- a/lib/Mrm/Mrmicon.c ++++ b/lib/Mrm/Mrmicon.c +@@ -1176,7 +1176,7 @@ Urm__RealizeColorTable (Screen *screen, + } + break; + default: +- sprintf(err_msg, _MrmMMsg_0040); ++ sprintf(err_msg, "%s", _MrmMMsg_0040); + return Urm__UT_Error ("Urm__RelizeColorTable", + err_msg, NULL, NULL, MrmFAILURE) ; + } +@@ -1252,7 +1252,7 @@ Urm__RealizeColorTable (Screen *screen, + break; + default: + result = MrmFAILURE; +- sprintf (err_msg, _MrmMMsg_0040); ++ sprintf (err_msg, "%s", _MrmMMsg_0040); + Urm__UT_Error ("Urm__RelizeColorTable", + err_msg, NULL, NULL, MrmFAILURE) ; + } +diff --git a/lib/Mrm/Mrmlread.c b/lib/Mrm/Mrmlread.c +index c2fd94c..be433a3 100644 +--- a/lib/Mrm/Mrmlread.c ++++ b/lib/Mrm/Mrmlread.c +@@ -698,7 +698,7 @@ MrmFetchColorLiteral (MrmHierarchy hierarchy_id, + XBlackPixelOfScreen(XDefaultScreenOfDisplay(display))); + break; + default: +- sprintf(err_msg, _MrmMMsg_0040); ++ sprintf(err_msg, "%s", _MrmMMsg_0040); + result = Urm__UT_Error ("MrmFetchColorLiteral", + err_msg, NULL, NULL, MrmFAILURE) ; + _MrmAppUnlock(app); +diff --git a/lib/Mrm/Mrmwcrw.c b/lib/Mrm/Mrmwcrw.c +index fe3db52..3c5857f 100644 +--- a/lib/Mrm/Mrmwcrw.c ++++ b/lib/Mrm/Mrmwcrw.c +@@ -1390,7 +1390,7 @@ Urm__CW_CreateArglist (Widget parent, + } + break; + default: +- sprintf (err_msg, _MrmMMsg_0040); ++ sprintf (err_msg, "%s", _MrmMMsg_0040); + result = Urm__UT_Error ("Urm__CW_ConvertValue", + err_msg, NULL, NULL, MrmFAILURE) ; + }; +@@ -2426,7 +2426,7 @@ Urm__CW_ConvertValue (Widget parent, + } + break; + default: +- sprintf(err_msg, _MrmMMsg_0040); ++ sprintf(err_msg, "%s", _MrmMMsg_0040); + return Urm__UT_Error ("Urm__CW_ConvertValue", + err_msg, NULL, NULL, MrmFAILURE) ; + }; +diff --git a/tools/wml/wmldbcreate.c b/tools/wml/wmldbcreate.c +index 07c0a3c..6de585a 100644 +--- a/tools/wml/wmldbcreate.c ++++ b/tools/wml/wmldbcreate.c +@@ -425,7 +425,7 @@ int table_id; + { + fprintf (afile, "%d, ", entry_vec[j]); + } +- fprintf (afile, "\n"); ++ fprintf (afile, "%s", "\n"); + } + } + } +diff --git a/tools/wml/wmlouth.c b/tools/wml/wmlouth.c +index d2330e3..a52843f 100644 +--- a/tools/wml/wmlouth.c ++++ b/tools/wml/wmlouth.c +@@ -225,12 +225,12 @@ if ( outfil == (FILE *) NULL ) + printf ("\nCouldn't open UilSymGen.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); + + /* + * Write the sym_k..._object literals + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + clsobj = (WmlClassDefPtr) wml_obj_class_ptr->hvec[ndx].objptr; +@@ -244,7 +244,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + /* + * Define the sym_k_..._reason literals + */ +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + resobj = (WmlResourceDefPtr) wml_obj_reason_ptr->hvec[ndx].objptr; +@@ -258,7 +258,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + /* + * Define the sym_k_..._arg literals + */ +-fprintf (outfil, canned4); ++fprintf (outfil, "%s", canned4); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + resobj = (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[ndx].objptr; +@@ -272,7 +272,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + /* + * Define the sym_k_..._enumset structs and literals + */ +-fprintf (outfil, canned5); ++fprintf (outfil, "%s", canned5); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + enumsetobj = (WmlEnumSetDefPtr) wml_obj_enumset_ptr->hvec[ndx].objptr; +@@ -286,7 +286,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + /* + * Define the sym_k_..._enumval literals + */ +-fprintf (outfil, canned6); ++fprintf (outfil, "%s", canned6); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + enumvalobj = (WmlEnumValueDefPtr) wml_obj_enumval_ptr->hvec[ndx].objptr; +@@ -301,7 +301,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + * Define the sym_k_..._charsize literals + * Define the sym_k_..._charset literals + */ +-fprintf (outfil, canned7); ++fprintf (outfil, "%s", canned7); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + charsetobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr; +@@ -315,7 +315,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + /* + * Define the sym_k_..._child literals + */ +-fprintf (outfil, canned8); ++fprintf (outfil, "%s", canned8); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + childobj = (WmlChildDefPtr) wml_obj_child_ptr->hvec[ndx].objptr; +@@ -379,12 +379,12 @@ if ( outfil == (FILE *) NULL ) + printf ("\nCouldn't open UilSymChCL.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); + + /* + * Create table entries, similar to writing sym_k... + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + childobj = (WmlChildDefPtr) wml_obj_child_ptr->hvec[ndx].objptr; +@@ -392,7 +392,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + fprintf (outfil, " sym_k_%s_object,\n", + classobj->tkname); + } +-fprintf (outfil, canned1a); ++fprintf (outfil, "%s", canned1a); + + /* + * close the output file +@@ -446,12 +446,12 @@ if ( outfil == (FILE *) NULL ) + printf ("\nCouldn't open UilSymArTy.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); + + /* + * Create table entries, similar to writing sym_k... + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + resobj = (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[ndx].objptr; +@@ -459,7 +459,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + fprintf (outfil, " sym_k_%s_value,\n", + datobj->tkname); + } +-fprintf (outfil, canned1a); ++fprintf (outfil, "%s", canned1a); + + /* + * close the output file +@@ -509,19 +509,19 @@ if ( outfil == (FILE *) NULL ) + printf ("\nCouldn't open UilSymRArg.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); + + /* + * Create table entries, similar to writing sym_k... + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + resobj = (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[ndx].objptr; + fprintf (outfil, " %d,\n", + resobj->related_code); + } +-fprintf (outfil, canned1a); ++fprintf (outfil, "%s", canned1a); + + /* + * close the output file +@@ -621,12 +621,12 @@ if ( outfil == (FILE *) NULL ) + printf ("\nCouldn't open UilUrmClas.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); + + /* + * Write entries for widgets + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + clsobj = (WmlClassDefPtr) wml_obj_class_ptr->hvec[ndx].objptr; +@@ -637,7 +637,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + else + fprintf (outfil, " \"%s\",\t\n", synobj->convfunc); + } +-fprintf (outfil, canned2); ++fprintf (outfil, "%s", canned2); + + /* + * Write entries for gadget variants of widget classes +@@ -661,7 +661,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + synobj->name); + } + } +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); + + /* + * Write entries for non-dialog widgets +@@ -685,7 +685,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + synobj->name); + } + } +-fprintf (outfil, canned4); ++fprintf (outfil, "%s", canned4); + + /* + * Write entries for the resource a widget's controls map to +@@ -701,7 +701,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + else + fprintf (outfil, " sym_k_%s_arg,\n", mapresobj->tkname); + } +-fprintf (outfil, canned5); ++fprintf (outfil, "%s", canned5); + + /* + * Write entries for arguments +@@ -714,7 +714,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + fprintf (outfil, " %s,\n", + synres->resliteral); + } +-fprintf (outfil, canned6); ++fprintf (outfil, "%s", canned6); + + /* + * Write entries for reasons +@@ -727,7 +727,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + fprintf (outfil, " %s,\n", + synres->resliteral); + } +-fprintf (outfil, canned7); ++fprintf (outfil, "%s", canned7); + + /* + * close the output file +@@ -781,13 +781,13 @@ if ( outfil == (FILE *) NULL ) + printf ("\nCouldn't open UilConst.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); + + /* + * Process the arguments in code order. We start with 1, and write out + * the mask after processing 8 codes. + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + strcpy (maskbuf, "0"); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { +@@ -805,7 +805,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + } + if ( bitno != 8 ) + fprintf (outfil, "%s", maskbuf); +-fprintf (outfil, canned1a); ++fprintf (outfil, "%s", canned1a); + + /* + * close the output file +@@ -878,8 +878,8 @@ if ( outfil == (FILE *) NULL ) + printf ("\nCouldn't open UilSymReas.h"); + return; + } +-fprintf (outfil, canned_warn); +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned_warn); ++fprintf (outfil, "%s", canned1); + + /* + * Generate the bit vectors for each class. Outer loop on the reason code, +@@ -919,19 +919,19 @@ for ( resndx=0 ; resndxcnt ; resndx++ ) + if ( itemno != 0 ) + fprintf (outfil, "%s 0};\n", maskbuf); + else +- fprintf (outfil, "};\n"); ++ fprintf (outfil, "%s", "};\n"); + } + + /* + * Write the vector of vectors. + */ +-fprintf (outfil, canned2); ++fprintf (outfil, "%s", canned2); + for ( resndx=0 ; resndxcnt ; resndx++ ) + { + resobj = (WmlResourceDefPtr) wml_obj_reason_ptr->hvec[resndx].objptr; + fprintf (outfil, " reason_class_vec%d,\n", resobj->sym_code); + } +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); + + /* + * close the output file +@@ -1004,8 +1004,8 @@ if ( outfil == (FILE *) NULL ) + printf ("\nCouldn't open UilSymArTa.h"); + return; + } +-fprintf (outfil, canned_warn); +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned_warn); ++fprintf (outfil, "%s", canned1); + + /* + * Generate the bit vectors for each class. Outer loop on the argument code, +@@ -1045,19 +1045,19 @@ for ( resndx=0 ; resndxcnt ; resndx++ ) + if ( itemno != 0 ) + fprintf (outfil, "%s 0};\n", maskbuf); + else +- fprintf (outfil, "};\n"); ++ fprintf (outfil, "%s", "};\n"); + } + + /* + * Write the vector of vectors. + */ +-fprintf (outfil, canned2); ++fprintf (outfil, "%s", canned2); + for ( resndx=0 ; resndxcnt ; resndx++ ) + { + resobj = (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[resndx].objptr; + fprintf (outfil, " arg_class_vec%d,\n", resobj->sym_code); + } +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); + + /* + * close the output file +@@ -1129,8 +1129,8 @@ if ( outfil == (FILE *) NULL ) + printf ("\nCouldn't open UilSymChTa.h"); + return; + } +-fprintf (outfil, canned_warn); +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned_warn); ++fprintf (outfil, "%s", canned1); + + /* + * Generate the bit vectors for each class. Outer loop on the child code, +@@ -1168,19 +1168,19 @@ for ( childndx=0 ; childndxcnt ; childndx++ ) + if ( itemno != 0 ) + fprintf (outfil, "%s 0};\n", maskbuf); + else +- fprintf (outfil, "};\n"); ++ fprintf (outfil, "%s", "};\n"); + } + + /* + * Write the vector of vectors. + */ +-fprintf (outfil, canned2); ++fprintf (outfil, "%s", canned2); + for ( childndx=0 ; childndxcnt ; childndx++ ) + { + childobj = (WmlChildDefPtr) wml_obj_child_ptr->hvec[childndx].objptr; + fprintf (outfil, " child_class_vec%d,\n", childobj->sym_code); + } +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); + + /* + * close the output file +@@ -1251,8 +1251,8 @@ if ( outfil == (FILE *) NULL ) + printf ("\nCouldn't open UilSymCtl.h"); + return; + } +-fprintf (outfil, canned_warn); +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned_warn); ++fprintf (outfil, "%s", canned1); + + /* + * Generate the bit vectors for each class. Outer loop on the class code, +@@ -1290,19 +1290,19 @@ for ( ctlndx=0 ; ctlndxcnt ; ctlndx++ ) + if ( itemno != 0 ) + fprintf (outfil, "%s 0};\n", maskbuf); + else +- fprintf (outfil, "};\n"); ++ fprintf (outfil, "%s", "};\n"); + } + + /* + * Write the vector of vectors. + */ +-fprintf (outfil, canned2); ++fprintf (outfil, "%s", canned2); + for ( ctlndx=0 ; ctlndxcnt ; ctlndx++ ) + { + clsobj = (WmlClassDefPtr) wml_obj_class_ptr->hvec[ctlndx].objptr; + fprintf (outfil, " object_class_vec%d,\n", clsobj->sym_code); + } +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); + + /* + * close the output file +@@ -1438,7 +1438,7 @@ if ( outfil == (FILE *) NULL ) + printf ("\nCouldn't open UilSymNam.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); + + /* + * Write entries for widgets +@@ -1517,7 +1517,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + fprintf (outfil, " \"%s\",\n", + synch->name); + } +-fprintf (outfil, canned7); ++fprintf (outfil, "%s", canned7); + + /* + * close the output file +@@ -1621,12 +1621,12 @@ if ( outfil == (FILE *) NULL ) + printf ("\nCouldn't open UilSymEnum.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); + + /* + * Generate the enumeration value vectors for each enumeration set. + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + enumsetobj = (WmlEnumSetDefPtr) wml_obj_enumset_ptr->hvec[ndx].objptr; +@@ -1637,13 +1637,13 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + fprintf (outfil, " %d,\n", + evobj->sym_code); + } +- fprintf (outfil, " };\n"); ++ fprintf (outfil, "%s", " };\n"); + } + + /* + * Generate the enumeration set tables + */ +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + enumsetobj = (WmlEnumSetDefPtr) wml_obj_enumset_ptr->hvec[ndx].objptr; +@@ -1655,7 +1655,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + /* + * Create enumset table entries for arguments, similar to writing sym_k... + */ +-fprintf (outfil, canned4); ++fprintf (outfil, "%s", canned4); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + resobj = (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[ndx].objptr; +@@ -1669,13 +1669,13 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + /* + * Create the enumval values table. + */ +-fprintf (outfil, canned5); ++fprintf (outfil, "%s", canned5); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + evobj = (WmlEnumValueDefPtr) wml_obj_enumval_ptr->hvec[ndx].objptr; + fprintf (outfil, " %s,\n", evobj->syndef->enumlit); + } +-fprintf (outfil, canned5a); ++fprintf (outfil, "%s", canned5a); + + /* + * close the output file +@@ -1813,12 +1813,12 @@ if ( outfil == (FILE *) NULL ) + printf ("\nCouldn't open UilSymCSet.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); + + /* + * Generate the standards name table + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + csobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr; +@@ -1836,7 +1836,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + /* + * Generate the writing direction table + */ +-fprintf (outfil, canned2); ++fprintf (outfil, "%s", canned2); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + csobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr; +@@ -1858,7 +1858,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + /* + * Generate the parsing direction table + */ +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + csobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr; +@@ -1880,7 +1880,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + /* + * Generate the character size table + */ +-fprintf (outfil, canned4); ++fprintf (outfil, "%s", canned4); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + csobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr; +@@ -1906,7 +1906,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + /* + * Generate the $LANG name recognition table + */ +-fprintf (outfil, canned5); ++fprintf (outfil, "%s", canned5); + lang_max = 0; + for ( ndx=0 ; ndxcnt ; ndx++ ) + { +@@ -1936,7 +1936,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + /* + * Generate the $LANG code lookup table, in upper case + */ +-fprintf (outfil, canned6); ++fprintf (outfil, "%s", canned6); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + csobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr; +diff --git a/tools/wml/wmloutkey.c b/tools/wml/wmloutkey.c +index af42f22..4c14728 100644 +--- a/tools/wml/wmloutkey.c ++++ b/tools/wml/wmloutkey.c +@@ -574,16 +574,16 @@ if ( outfil == NULL ) + printf ("\nCouldn't open UilKeyTab.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); + + /* + * Print the case sensitive and insensitive tables + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + wmlOutputUilKeyTabBody (outfil, wml_tok_sens_ptr, &maxlen, &maxkey); + fprintf (outfil, canned2, maxlen, maxkey); + wmlOutputUilKeyTabBody (outfil, wml_tok_insens_ptr, &maxlen, &maxkey); +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); + + /* + * close the output file +@@ -812,8 +812,8 @@ if ( outfil == NULL ) + printf ("\nCouldn't open UilTokName.h"); + return; + } +-fprintf (outfil, canned_warn); +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned_warn); ++fprintf (outfil, "%s", canned1); + + /* + * Print the token name entries +diff --git a/tools/wml/wmloutmm.c b/tools/wml/wmloutmm.c +index 84a97bb..dc8ec09 100644 +--- a/tools/wml/wmloutmm.c ++++ b/tools/wml/wmloutmm.c +@@ -209,9 +209,9 @@ int ctlndx; /* to access ordered vector */ + /* + * Write out header information + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + fprintf (outfil, "%s\n", name); +-fprintf (outfil, canned2); ++fprintf (outfil, "%s", canned2); + + /* + * Alphabetize the controls, reason, and argument lists +@@ -264,7 +264,7 @@ while ( ctlref != NULL ) + rsnndx = 0; + ctlndx = 0; + if ( mm_ctl_ptr->cnt == 0 ) +- fprintf (outfil, "No children are supported"); ++ fprintf (outfil, "%s", "No children are supported"); + while ( rsnndxcnt || ctlndxcnt ) + { + if ( ctlndx < mm_ctl_ptr->cnt ) +@@ -275,7 +275,7 @@ while ( rsnndxcnt || ctlndxcnt ) + ctlndx += 1; + } + else +- fprintf (outfil, "@"); ++ fprintf (outfil, "%s", "@"); + + if ( rsnndx < mm_rsn_ptr->cnt ) + { +@@ -285,9 +285,9 @@ while ( rsnndxcnt || ctlndxcnt ) + rsnndx += 1; + } + else +- fprintf (outfil, "\n"); ++ fprintf (outfil, "%s", "\n"); + } +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); + + /* + * Write out the argument table +@@ -319,11 +319,11 @@ while ( argndx < mm_arg_ptr->cnt ) + argref->act_resource->syndef->dflt); + } + else +- fprintf (outfil, " \n"); ++ fprintf (outfil, "%s", " \n"); + } + argndx += 1; + } +-fprintf (outfil, canned4); ++fprintf (outfil, "%s", canned4); + + } + +diff --git a/tools/wml/wmlresolve.c b/tools/wml/wmlresolve.c +index 464ef29..3b8642c 100644 +--- a/tools/wml/wmlresolve.c ++++ b/tools/wml/wmlresolve.c +@@ -1340,7 +1340,7 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + /* + * close the output file + */ +-fprintf (outfil, "\n\n"); ++fprintf (outfil, "%s", "\n\n"); + printf ("\nCreated report file wml.report"); + fclose (outfil); + +@@ -1369,14 +1369,14 @@ fprintf (outfil, "\n\n\nClass %s:", synobj->name); + switch ( synobj->type ) + { + case WmlClassTypeMetaclass: +- fprintf (outfil, "\n Type: Metaclass\t"); ++ fprintf (outfil, "%s", "\n Type: Metaclass\t"); + if ( synobj->superclass != NULL ) + fprintf (outfil, "Superclass: %s\t", synobj->superclass); + if ( synobj->parentclass != NULL ) + fprintf (outfil, "Parentclass: %s\t", synobj->parentclass); + break; + case WmlClassTypeWidget: +- fprintf (outfil, "\n Type: Widget\t"); ++ fprintf (outfil, "%s", "\n Type: Widget\t"); + if ( synobj->superclass != NULL ) + fprintf (outfil, "Superclass: %s\t", synobj->superclass); + if ( synobj->parentclass != NULL ) +@@ -1388,7 +1388,7 @@ switch ( synobj->type ) + fprintf (outfil, "Convenience function: %s", synobj->convfunc); + break; + case WmlClassTypeGadget: +- fprintf (outfil, "\n Type: Gadget\t"); ++ fprintf (outfil, "%s", "\n Type: Gadget\t"); + if ( synobj->superclass != NULL ) + fprintf (outfil, "Superclass: %s\t", synobj->superclass); + if ( synobj->parentclass != NULL ) +@@ -1414,19 +1414,19 @@ if ( clsobj->nondialog != NULL ) + * is intended to match the way resources are printed in the toolkit manual, + * so that checking is as easy as possible. + */ +-fprintf (outfil, "\n Arguments:"); ++fprintf (outfil, "%s", "\n Arguments:"); + wmlResolvePrintClassArgs (outfil, clsobj); + + /* + * Print the reasons valid in the class + */ +-fprintf (outfil, "\n Reasons:"); ++fprintf (outfil, "%s", "\n Reasons:"); + wmlResolvePrintClassReasons (outfil, clsobj); + + /* + * Print the controls valid in the class + */ +-fprintf (outfil, "\n Controls:"); ++fprintf (outfil, "%s", "\n Controls:"); + for ( ndx=0 ; ndxcnt ; ndx++ ) + { + ctrlobj = (WmlClassDefPtr) wml_obj_class_ptr->hvec[ndx].objptr; +@@ -1512,10 +1512,10 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + switch ( resref->exclude ) + { + case WmlAttributeTrue: +- fprintf (outfil, "\n\tExclude = True;"); ++ fprintf (outfil, "%s", "\n\tExclude = True;"); + break; + case WmlAttributeFalse: +- fprintf (outfil, "\n\tExclude = False;"); ++ fprintf (outfil, "%s", "\n\tExclude = False;"); + break; + } + if ( resref->dflt != NULL ) +@@ -1558,10 +1558,10 @@ if ( constr ) + switch ( resref->exclude ) + { + case WmlAttributeTrue: +- fprintf (outfil, "\n\tExclude = True;"); ++ fprintf (outfil, "%s", "\n\tExclude = True;"); + break; + case WmlAttributeFalse: +- fprintf (outfil, "\n\tExclude = False;"); ++ fprintf (outfil, "%s", "\n\tExclude = False;"); + break; + } + if ( resref->dflt != NULL ) +@@ -1632,10 +1632,10 @@ for ( ndx=0 ; ndxcnt ; ndx++ ) + switch ( resref->exclude ) + { + case WmlAttributeTrue: +- fprintf (outfil, "\n\tExclude = True;"); ++ fprintf (outfil, "%s", "\n\tExclude = True;"); + break; + case WmlAttributeFalse: +- fprintf (outfil, "\n\tExclude = False;"); ++ fprintf (outfil, "%s", "\n\tExclude = False;"); + break; + } + resobj->ref_ptr = NULL; +-- +2.13.0 + diff --git a/motif.spec b/motif.spec index 824c869..da68925 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 12%{?dist} +Release: 13%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -29,6 +29,8 @@ Patch43: openMotif-2.3.0-rgbtxt.patch Patch45: motif-2.3.4-mwmrc_dir.patch Patch46: motif-2.3.4-bindings.patch Patch47: openMotif-2.3.0-no_X11R6.patch +# FTBFS #1448819 +Patch48: motif-2.3.4-Fix-issues-with-Werror-format-security.patch Conflicts: lesstif <= 0.92.32-6 @@ -69,6 +71,7 @@ This package contains the static Motif libraries. %patch45 -p1 -b .mwmrc_dir %patch46 -p1 -b .bindings %patch47 -p1 -b .no_X11R6 +%patch48 -p1 -b .format-security %build CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" \ @@ -123,6 +126,9 @@ rm -rf %{buildroot} %{_libdir}/lib*.a %changelog +* Thu Jun 08 2017 Petr Šabata - 2.3.4-13 +- Fix issues with -Werror=format-security (#1448819) + * Fri Feb 10 2017 Fedora Release Engineering - 2.3.4-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 15aa4bb253d8d820f2ab055f6f0be8ef874f1a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 12 Jul 2017 14:35:57 +0200 Subject: [PATCH 11/49] perl dependency renamed to perl-interpreter --- motif.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index da68925..89d906e 100644 --- a/motif.spec +++ b/motif.spec @@ -21,7 +21,7 @@ BuildRequires: byacc, pkgconfig BuildRequires: libjpeg-devel libpng-devel BuildRequires: libXft-devel libXmu-devel libXp-devel libXt-devel libXext-devel BuildRequires: xorg-x11-xbitmaps -BuildRequires: perl +BuildRequires: perl-interpreter Patch22: motif-2.3.4-no_demos.patch Patch23: openMotif-2.2.3-uil_lib.patch From da3d696fdd60d87ff790b1be1c7bdf4253422625 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 22:15:43 +0000 Subject: [PATCH 12/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 89d906e..dd911c6 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 13%{?dist} +Release: 14%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -126,6 +126,9 @@ rm -rf %{buildroot} %{_libdir}/lib*.a %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 2.3.4-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Thu Jun 08 2017 Petr Šabata - 2.3.4-13 - Fix issues with -Werror=format-security (#1448819) From 7e32520763dcd2a1d402207a4903242fc30055b1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 03:34:56 +0000 Subject: [PATCH 13/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index dd911c6..f771ae8 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 14%{?dist} +Release: 15%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -126,6 +126,9 @@ rm -rf %{buildroot} %{_libdir}/lib*.a %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 2.3.4-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 2.3.4-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 51d9052aa2f54356dff701f64909963e2f2eb31c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 8 Feb 2018 03:15:16 +0000 Subject: [PATCH 14/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index f771ae8..13b0e38 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 15%{?dist} +Release: 16%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -126,6 +126,9 @@ rm -rf %{buildroot} %{_libdir}/lib*.a %changelog +* Thu Feb 08 2018 Fedora Release Engineering - 2.3.4-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Thu Aug 03 2017 Fedora Release Engineering - 2.3.4-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From c9e5298fd08a2d687993347c88543ec2a476031a Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 14 Feb 2018 07:21:51 +0100 Subject: [PATCH 15/49] Remove %clean section None of currently supported distributions need that. Last one was EL5 which is EOL for a while. Signed-off-by: Igor Gnatenko --- motif.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/motif.spec b/motif.spec index 13b0e38..39455d3 100644 --- a/motif.spec +++ b/motif.spec @@ -93,9 +93,6 @@ rm -f %{buildroot}%{_libdir}/*.la %post -p /sbin/ldconfig %postun -p /sbin/ldconfig -%clean -rm -rf %{buildroot} - %files %doc COPYING README RELEASE RELNOTES /etc/X11/xinit/xinitrc.d/xmbind.sh From 01d2dd669e889136559cb2626bf6f9eb7971674a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 11:02:02 +0000 Subject: [PATCH 16/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 39455d3..3b51b00 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 16%{?dist} +Release: 17%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -123,6 +123,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 2.3.4-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Thu Feb 08 2018 Fedora Release Engineering - 2.3.4-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 78363643cd140e5c491dac3f399016ede4125bd7 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 22 Jan 2019 18:40:26 +0100 Subject: [PATCH 17/49] Remove obsolete ldconfig scriptlets References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets Signed-off-by: Igor Gnatenko --- motif.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/motif.spec b/motif.spec index 3b51b00..55ab792 100644 --- a/motif.spec +++ b/motif.spec @@ -90,8 +90,7 @@ install -m 755 %{SOURCE1} %{buildroot}/etc/X11/xinit/xinitrc.d/xmbind.sh rm -f %{buildroot}%{_libdir}/*.la -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%ldconfig_scriptlets %files %doc COPYING README RELEASE RELNOTES From 762ae24991c9590f60bddbe6f6eace5756189ae6 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:55 +0100 Subject: [PATCH 18/49] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- motif.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/motif.spec b/motif.spec index 55ab792..cc48df8 100644 --- a/motif.spec +++ b/motif.spec @@ -3,7 +3,6 @@ Name: motif Version: 2.3.4 Release: 17%{?dist} License: LGPLv2+ -Group: System Environment/Libraries Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind URL: http://www.motifzone.net/ @@ -41,7 +40,6 @@ linked against Motif and the Motif Window Manager mwm. %package devel Summary: Development libraries and header files -Group: Development/Libraries Conflicts: lesstif-devel <= 0.92.32-6 Requires: %{name}%{?_isa} = %{version}-%{release} Requires: libjpeg-devel%{?_isa} libpng-devel%{?_isa} @@ -56,7 +54,6 @@ header files and also static libraries necessary to build Motif applications. %package static Summary: Static libraries -Group: Development/Libraries Conflicts: lesstif-devel <= 0.92.32-6 Requires: %{name}-devel%{?_isa} = %{version}-%{release} From 16d99fd5bf08acb1e869fd761b20eeca5f8725dc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 1 Feb 2019 11:29:15 +0000 Subject: [PATCH 19/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index cc48df8..140bc75 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 17%{?dist} +Release: 18%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -119,6 +119,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Fri Feb 01 2019 Fedora Release Engineering - 2.3.4-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Fri Jul 13 2018 Fedora Release Engineering - 2.3.4-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From a0560de267ce8c17417f7066caa2906e2ab6d4ba Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 17:42:57 +0000 Subject: [PATCH 20/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 140bc75..973b46a 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 18%{?dist} +Release: 19%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -119,6 +119,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 2.3.4-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Fri Feb 01 2019 Fedora Release Engineering - 2.3.4-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 80b27aea798921b837d370aae4305fd0b0b31578 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 14:03:09 +0000 Subject: [PATCH 21/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 973b46a..88e76e2 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 19%{?dist} +Release: 20%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -119,6 +119,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 2.3.4-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Thu Jul 25 2019 Fedora Release Engineering - 2.3.4-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From b01785d47e9befa9302de9121397f70eca823785 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 08:26:44 +0000 Subject: [PATCH 22/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 88e76e2..feddc15 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 20%{?dist} +Release: 21%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -119,6 +119,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 2.3.4-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jan 29 2020 Fedora Release Engineering - 2.3.4-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 36963dd5a48efc215906a43f33666ce8ffa490e9 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 8 Jan 2021 04:05:07 +0000 Subject: [PATCH 23/49] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- motif.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/motif.spec b/motif.spec index feddc15..7b3ea35 100644 --- a/motif.spec +++ b/motif.spec @@ -11,6 +11,7 @@ Provides: openmotif = %{version}-%{release} Requires: xorg-x11-xbitmaps Requires: xorg-x11-xinit +BuildRequires: make BuildRequires: automake, libtool, autoconf, flex # flex static libs have been part of flex for RHEL <= 6 and Fedora <= 12 %if 0%{?fedora} > 12 || 0%{?rhel} > 6 From d4bca32634334d2134348accecb831e090fee134 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 20:49:18 +0000 Subject: [PATCH 24/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 7b3ea35..15beba7 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 21%{?dist} +Release: 22%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -120,6 +120,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 2.3.4-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Tue Jul 28 2020 Fedora Release Engineering - 2.3.4-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 866258f938153c3e8b73ef4b5908d6210dfa5240 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 15:23:27 +0000 Subject: [PATCH 25/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 15beba7..8089b54 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 22%{?dist} +Release: 23%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -120,6 +120,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 2.3.4-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue Jan 26 2021 Fedora Release Engineering - 2.3.4-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 92dfead7a2d1e346ca2daccec7154ad1871e6c0f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 20:26:02 +0000 Subject: [PATCH 26/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 8089b54..035fcb5 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 23%{?dist} +Release: 24%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -120,6 +120,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 2.3.4-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Thu Jul 22 2021 Fedora Release Engineering - 2.3.4-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 36fd4892719dbece937001b899e3f21d5f8b8e81 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 3 Feb 2022 14:17:55 -0500 Subject: [PATCH 27/49] Fix invoking autogen/configure so the default CFLAGS actually get applied --- motif.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/motif.spec b/motif.spec index 035fcb5..47a9b2b 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 24%{?dist} +Release: 25%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -72,9 +72,8 @@ This package contains the static Motif libraries. %patch48 -p1 -b .format-security %build -CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" \ -./autogen.sh --libdir=%{_libdir} --enable-static --enable-xft --enable-jpeg \ - --enable-png +./autogen.sh +%configure --enable-static --enable-xft --enable-jpeg --enable-png make clean %{?_smp_mflags} make -C include @@ -120,6 +119,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Thu Feb 03 2022 Adam Jackson - 2.3.4-25 +- Fix invoking autogen/configure so the default CFLAGS actually get applied + * Thu Jan 20 2022 Fedora Release Engineering - 2.3.4-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From f610eff92b1a3c0332e152fc01b1a93e528cc305 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 23:45:24 +0000 Subject: [PATCH 28/49] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 47a9b2b..f4a17a1 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 25%{?dist} +Release: 26%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -119,6 +119,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 2.3.4-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Thu Feb 03 2022 Adam Jackson - 2.3.4-25 - Fix invoking autogen/configure so the default CFLAGS actually get applied From 6a65188e7ebf1f1613d05f1421a21787b7aa3d70 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 20:44:37 +0000 Subject: [PATCH 29/49] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index f4a17a1..7908ae3 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 26%{?dist} +Release: 27%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -119,6 +119,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 2.3.4-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jul 21 2022 Fedora Release Engineering - 2.3.4-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 5e2c9f6f8b9516563500c6ea771ec2b852692b61 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 14 Apr 2023 14:22:57 +0200 Subject: [PATCH 30/49] Port to C99 (#2186773) Related to: --- motif-c99-bug1602.patch | 54 +++++++++++++ motif-c99-bug1605.patch | 134 +++++++++++++++++++++++++++++++ motif-c99-bug1609.patch | 147 +++++++++++++++++++++++++++++++++++ motif-c99-string.patch | 19 +++++ motif-c99-void-sprintf.patch | 40 ++++++++++ motif-configure-c99.patch | 20 +++++ motif.spec | 17 +++- 7 files changed, 430 insertions(+), 1 deletion(-) create mode 100644 motif-c99-bug1602.patch create mode 100644 motif-c99-bug1605.patch create mode 100644 motif-c99-bug1609.patch create mode 100644 motif-c99-string.patch create mode 100644 motif-c99-void-sprintf.patch create mode 100644 motif-configure-c99.patch diff --git a/motif-c99-bug1602.patch b/motif-c99-bug1602.patch new file mode 100644 index 0000000..b20340b --- /dev/null +++ b/motif-c99-bug1602.patch @@ -0,0 +1,54 @@ +commit 56dae22f7c2e7446852af1d68116f1809edae633 +Author: Mykola Vshyvkov +Date: Wed Jun 26 19:21:20 2013 +0300 + + Fixed bug #1602 (Eliminates 6 warnings "implicit declaration of function" in some modules). + +diff --git a/tools/wml/wml.c b/tools/wml/wml.c +index d8ad382ebb93f0cc..723288a9c29cead2 100644 +--- a/tools/wml/wml.c ++++ b/tools/wml/wml.c +@@ -80,6 +80,7 @@ static char rcsid[] = "$TOG: wml.c /main/8 1999/04/16 09:41:47 mgreess $" + #endif + #include + #include ++#include + + + /* +@@ -159,6 +160,7 @@ void wmlInit (); + * External variables + */ + extern int yyleng; ++extern int yyparse(); + + + +diff --git a/tools/wml/wmloutp1.c b/tools/wml/wmloutp1.c +index c826c4f0fad65b68..ea6a8e2780d08d78 100644 +--- a/tools/wml/wmloutp1.c ++++ b/tools/wml/wmloutp1.c +@@ -45,6 +45,11 @@ static char rcsid[] = "$XConsortium: wmloutp1.c /main/7 1995/07/13 21:04:31 drk + + #include "wml.h" + ++/* External functions declaraion */ ++extern void wmlOutputKeyWordFiles (); ++extern void wmlOutputMmFiles(); ++ ++ + + void wmlOutput () + +diff --git a/tools/wml/wmlresolve.c b/tools/wml/wmlresolve.c +index 3b8642c12474cfbd..c9bc84151f8a7902 100644 +--- a/tools/wml/wmlresolve.c ++++ b/tools/wml/wmlresolve.c +@@ -58,6 +58,7 @@ static char rcsid[] = "$XConsortium: wmlresolve.c /main/9 1995/08/29 11:11:05 dr + #include + #endif + #include ++#include + + /* + * Routines used only in this module diff --git a/motif-c99-bug1605.patch b/motif-c99-bug1605.patch new file mode 100644 index 0000000..ac47267 --- /dev/null +++ b/motif-c99-bug1605.patch @@ -0,0 +1,134 @@ +commit d094e8c4a6a1890520ade3e1900229454dc2eac2 +Author: Mykola Vshyvkov +Date: Mon Jul 1 19:02:25 2013 +0300 + + Fixed bug #1605 (Eliminates 14 warnings of some types in WML tool). + +diff --git a/lib/Xm/XmRenderT.c b/lib/Xm/XmRenderT.c +index 0abd71265fc901b9..5ecd38bef29d2c6b 100644 +--- a/lib/Xm/XmRenderT.c ++++ b/lib/Xm/XmRenderT.c +@@ -1993,7 +1993,7 @@ GetSameRenditions(XmRendition *rend_cache, XmRendition rend, int count_rend) + for (i=0; i +Date: Wed Jul 3 18:52:21 2013 +0300 + + Fixed bug #1609 (Eliminates 18 warnings of "incompatible implicit declaration" in modules of "clients" catalog). + +diff --git a/clients/mwm/WmCmd.c b/clients/mwm/WmCmd.c +index f21d41d541dc50a3..4d723aa4848314f6 100644 +--- a/clients/mwm/WmCmd.c ++++ b/clients/mwm/WmCmd.c +@@ -48,6 +48,7 @@ + #include "WmWsm.h" + #include "WmDebug.h" + #include "WmWinConf.h" ++#include "WmFeedback.h" + + + +diff --git a/clients/mwm/WmCmd.h b/clients/mwm/WmCmd.h +index ff779defe240933b..e8bc104e850c5ec3 100644 +--- a/clients/mwm/WmCmd.h ++++ b/clients/mwm/WmCmd.h +@@ -59,5 +59,8 @@ extern void AddWindowMenuEntry (ClientData *); + extern void DeleteCommand (long, CmdTree **); + extern void SendInvokeMessage (CARD32, CARD32, Atom, Time); + ++extern void ++GetAutomationData (XtPointer input, Atom *outputType, XtPointer *output, unsigned long *outputLen, int *outputFmt); ++ + + #endif /* _WM_CMD_ */ +diff --git a/clients/mwm/WmFunction.c b/clients/mwm/WmFunction.c +index 9a2102bcf80cbf08..94fb8cde2c0ec83d 100644 +--- a/clients/mwm/WmFunction.c ++++ b/clients/mwm/WmFunction.c +@@ -112,6 +112,7 @@ extern pid_t vfork(); + #include "WmWinList.h" + #include "WmWinState.h" + #include "WmXSMP.h" ++#include "WmCmd.h" + + #include /* for MS_LastManagedMenuTime */ + extern XmMenuState _XmGetMenuState(); +diff --git a/clients/mwm/WmInitWs.c b/clients/mwm/WmInitWs.c +index aaa584cd3e4ce7b7..d29b5f96fec246fc 100644 +--- a/clients/mwm/WmInitWs.c ++++ b/clients/mwm/WmInitWs.c +@@ -134,6 +134,7 @@ typedef struct + #include + #endif /* WSM */ + #include "WmXSMP.h" ++#include "Xm/VirtKeysI.h" + + /* + * Function Declarations: +diff --git a/clients/mwm/WmResParse.c b/clients/mwm/WmResParse.c +index 465f5b4d29e99411..a63e928acd643c54 100644 +--- a/clients/mwm/WmResParse.c ++++ b/clients/mwm/WmResParse.c +@@ -63,6 +63,7 @@ static char rcsid[] = "$XConsortium: WmResParse.c /main/9 1996/11/01 10:17:34 dr + #include "WmResource.h" + + #include ++#include "Xm/VirtKeysI.h" + + #include + #include +diff --git a/clients/mwm/WmWinList.c b/clients/mwm/WmWinList.c +index a45a4fc9471ab21d..31472a5caa832d90 100644 +--- a/clients/mwm/WmWinList.c ++++ b/clients/mwm/WmWinList.c +@@ -63,7 +63,7 @@ static char rcsid[] = "$TOG: WmWinList.c /main/8 1997/06/10 15:50:50 samborn $" + #ifdef WSM + #include "WmWrkspace.h" + #endif /* WSM */ +- ++#include "WmEvent.h" + + + +diff --git a/clients/mwm/WmWsmLib/recv.c b/clients/mwm/WmWsmLib/recv.c +index 8b2833fbc2ea756f..06908e24756b0e3c 100644 +--- a/clients/mwm/WmWsmLib/recv.c ++++ b/clients/mwm/WmWsmLib/recv.c +@@ -38,6 +38,8 @@ XtPointer *, unsigned long *, int * + ); + #endif /* JUNK */ + ++extern Time GetTimestamp (Display *dpy); ++ + + /* Function Name: WSMDefaultOwnSelection + * Description: This is the default routine that owns the proper +diff --git a/clients/mwm/WmWsmLib/send.c b/clients/mwm/WmWsmLib/send.c +index 8792e2c7c8ac82bb..c261da70bfff366a 100644 +--- a/clients/mwm/WmWsmLib/send.c ++++ b/clients/mwm/WmWsmLib/send.c +@@ -45,6 +45,8 @@ static void ReplyReceived( + Widget, XtPointer, Atom *, Atom *, XtPointer, unsigned long *, int * + ); + ++extern Time GetTimestamp (Display *dpy); ++ + /* Function Name: WSMSendMessage + * Description: Sends a message to WSM or WM on the screen + * and display specified. +diff --git a/clients/uil/UilDefI.h b/clients/uil/UilDefI.h +index a0176b619e89f1eb..f17bff764bf6fd1e 100644 +--- a/clients/uil/UilDefI.h ++++ b/clients/uil/UilDefI.h +@@ -608,7 +608,7 @@ extern void sym_dump_object_variant _ARGUMENTS(( sym_def_obj_entry_type *az_sym + extern void sym_dump_root_entry _ARGUMENTS(( sym_root_entry_type *az_symbol_entry )); + extern char *sym_section_text _ARGUMENTS(( int b_type )); + extern void dump_free_list _ARGUMENTS(( void )); +- ++extern int sar_get_units_type (yystype *parse_frame); + #if defined(__cplusplus) || defined(c_plusplus) + } + #endif +diff --git a/clients/uil/UilMain.c b/clients/uil/UilMain.c +index 6120eda2fa176670..1864ba78597e2dd6 100644 +--- a/clients/uil/UilMain.c ++++ b/clients/uil/UilMain.c +@@ -104,9 +104,10 @@ static void UilWrapup _ARGUMENTS((Uil_compile_desc_type *compile_desc)); + #endif + + externaldef(uilmsg) nl_catd uil_catd = NULL; +- + #endif + ++extern int yyparse(); ++ + /* + ** + ** MODULE Definitions +diff --git a/clients/xmbind/xmbind.c b/clients/xmbind/xmbind.c +index f3d5a67ce35dab84..a16e2d968c45f7f0 100644 +--- a/clients/xmbind/xmbind.c ++++ b/clients/xmbind/xmbind.c +@@ -29,6 +29,7 @@ static char rcsid[] = "$TOG: xmbind.c /main/10 1997/06/18 17:34:48 samborn $" + #endif + #endif + #include ++#include + #include + + /* Internal routines "borrowed" from libXm. Don't try this at home! */ diff --git a/motif-c99-string.patch b/motif-c99-string.patch new file mode 100644 index 0000000..ff07b71 --- /dev/null +++ b/motif-c99-string.patch @@ -0,0 +1,19 @@ +Unconditionally include , to avoid implicit function +declarations. libXpm defines SYSV during the build, which is why they +do not see t his isssue. + +diff --git a/lib/Xm/XpmI.h b/lib/Xm/XpmI.h +index bbba02b0cac1f91e..3468f2d1edf84f7c 100644 +--- a/lib/Xm/XpmI.h ++++ b/lib/Xm/XpmI.h +@@ -118,9 +118,9 @@ extern "C" { + extern FILE *popen(); + #endif + +-#if defined(SYSV) || defined(SVR4) || defined(VMS) || defined(WIN32) || defined (_SVID_SOURCE) + #include + ++#if defined(SYSV) || defined(SVR4) || defined(VMS) || defined(WIN32) || defined (_SVID_SOURCE) + #ifndef index + #define index strchr + #endif diff --git a/motif-c99-void-sprintf.patch b/motif-c99-void-sprintf.patch new file mode 100644 index 0000000..040c79e --- /dev/null +++ b/motif-c99-void-sprintf.patch @@ -0,0 +1,40 @@ +Stop defining VOID_SPRINTF, following what upstream libXpm does. The +check has an implicit declaration of exit and an implicit int, so it +will fail to build with future compilers. + +diff --git a/acinclude.m4 b/acinclude.m4 +index 88edfce3d169a267..38409a28a65cb028 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -45,19 +45,6 @@ if test $lt_cv_xthreads = yes; then + fi + ]) + +-dnl This test is not very reliable probably ... +-AC_DEFUN([AM_FUNC_VOID_SPRINTF], +-[AC_CACHE_CHECK(whether sprintf returns void, ac_cv_func_void_sprintf, +-[AC_TRY_RUN([#include +-int sprintf(); main() { exit(sprintf(".")); }], +- ac_cv_func_void_sprintf=no, ac_cv_func_void_sprintf=yes, ac_cv_func_void_sprintf=yes)]) +-if test $ac_cv_func_void_sprintf = no; then +- AC_DEFINE(VOID_SPRINTF,1, +- [Define if sprintf doesn't return the number of chars written]) +-fi +-]) +- +- + dnl + dnl End of special macros. + dnl +diff --git a/configure.ac b/configure.ac +index 3b412361e6f43da4..6cbeb2f5eea235eb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -120,7 +120,6 @@ AC_FUNC_STRCOLL + AC_FUNC_STRFTIME + AC_FUNC_FORK([]) + AC_FUNC_VPRINTF +-AM_FUNC_VOID_SPRINTF + AC_CHECK_FUNCS(wcslen wcscpy wcsncpy wcschr wcscat wcsncat getcwd gettimeofday mkdir re_comp regcmp select strcspn strerror strstr strtod strtol uname) + AC_CHECK_FUNCS(strdup,,AC_DEFINE(NEED_STRDUP, 1, no strdup)) + AC_CHECK_FUNCS(strcasecmp,,AC_DEFINE(NEED_STRCASECMP, 1, no strcasecmp)) diff --git a/motif-configure-c99.patch b/motif-configure-c99.patch new file mode 100644 index 0000000..63a081a --- /dev/null +++ b/motif-configure-c99.patch @@ -0,0 +1,20 @@ +Another implicit declaration of exit in the -DXTHREADS check, which +will go wrong with future compilers that do not support implicit +function declarations. + +diff --git a/acinclude.m4 b/acinclude.m4 +index 61706f3e63d94d8a..88edfce3d169a267 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -22,9 +22,9 @@ int main() { + Boolean brc; + brc=XtToolkitThreadInitialize(); + if (True==brc) +- exit(0); ++ return 0; + else +- exit(1); ++ return 1; + } + ], + lt_cv_xthreads=yes, diff --git a/motif.spec b/motif.spec index 7908ae3..6fcec9c 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 27%{?dist} +Release: 28%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -31,6 +31,12 @@ Patch46: motif-2.3.4-bindings.patch Patch47: openMotif-2.3.0-no_X11R6.patch # FTBFS #1448819 Patch48: motif-2.3.4-Fix-issues-with-Werror-format-security.patch +Patch49: motif-configure-c99.patch +Patch50: motif-c99-void-sprintf.patch +Patch51: motif-c99-string.patch +Patch52: motif-c99-bug1602.patch +Patch53: motif-c99-bug1605.patch +Patch54: motif-c99-bug1609.patch Conflicts: lesstif <= 0.92.32-6 @@ -70,6 +76,12 @@ This package contains the static Motif libraries. %patch46 -p1 -b .bindings %patch47 -p1 -b .no_X11R6 %patch48 -p1 -b .format-security +%patch49 -p1 +%patch50 -p1 +%patch51 -p1 +%patch52 -p1 +%patch53 -p1 +%patch54 -p1 %build ./autogen.sh @@ -119,6 +131,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Fri Apr 14 2023 Florian Weimer - 2.3.4-28 +- Port to C99 (#2186773) + * Thu Jan 19 2023 Fedora Release Engineering - 2.3.4-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 510b27d47458f7f0f9555cff2fd94a144c483c04 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 15:49:08 +0000 Subject: [PATCH 31/49] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 6fcec9c..fa6d898 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 28%{?dist} +Release: 29%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -131,6 +131,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 2.3.4-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Fri Apr 14 2023 Florian Weimer - 2.3.4-28 - Port to C99 (#2186773) From 2aa142348a8846b2d5da929eb3a8a1cebb04a063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= Date: Mon, 27 Nov 2023 13:06:27 +0100 Subject: [PATCH 32/49] Fixes for CVE-2023-43788 and CVE-2023-43789 Check X.Org Security Advisory [1] for more information. [1] https://lists.x.org/archives/xorg-announce/2023-October/003424.html Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2248828 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2248829 --- ...88-Out-of-bounds-read-in-XpmCreateXp.patch | 32 +++++++++++++++++ ...89-Out-of-bounds-read-on-XPM-with-co.patch | 36 +++++++++++++++++++ motif.spec | 12 ++++++- 3 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-CVE-2023-43788-Out-of-bounds-read-in-XpmCreateXp.patch create mode 100644 0001-Fix-CVE-2023-43789-Out-of-bounds-read-on-XPM-with-co.patch diff --git a/0001-Fix-CVE-2023-43788-Out-of-bounds-read-in-XpmCreateXp.patch b/0001-Fix-CVE-2023-43788-Out-of-bounds-read-in-XpmCreateXp.patch new file mode 100644 index 0000000..5ee660d --- /dev/null +++ b/0001-Fix-CVE-2023-43788-Out-of-bounds-read-in-XpmCreateXp.patch @@ -0,0 +1,32 @@ +From 2fa554b01ef6079a9b35df9332bdc4f139ed67e0 Mon Sep 17 00:00:00 2001 +From: Alan Coopersmith +Date: Sat, 29 Apr 2023 17:50:39 -0700 +Subject: [PATCH] Fix CVE-2023-43788: Out of bounds read in + XpmCreateXpmImageFromBuffer + +When the test case for CVE-2022-46285 was run with the Address Sanitizer +enabled, it found an out-of-bounds read in ParseComment() when reading +from a memory buffer instead of a file, as it continued to look for the +closing comment marker past the end of the buffer. + +Signed-off-by: Alan Coopersmith +--- + lib/Xm/Xpmdata.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/Xm/Xpmdata.c b/lib/Xm/Xpmdata.c +index 7524e65..0b0f1f3 100644 +--- a/lib/Xm/Xpmdata.c ++++ b/lib/Xm/Xpmdata.c +@@ -108,7 +108,7 @@ ParseComment(xpmData *data) + n++; + s2++; + } while (c == *s2 && *s2 != '\0' && c); +- if (*s2 == '\0') { ++ if (*s2 == '\0' || c == '\0') { + /* this is the end of the comment */ + notend = 0; + mdata->cptr--; +-- +2.41.0 + diff --git a/0001-Fix-CVE-2023-43789-Out-of-bounds-read-on-XPM-with-co.patch b/0001-Fix-CVE-2023-43789-Out-of-bounds-read-on-XPM-with-co.patch new file mode 100644 index 0000000..292988b --- /dev/null +++ b/0001-Fix-CVE-2023-43789-Out-of-bounds-read-on-XPM-with-co.patch @@ -0,0 +1,36 @@ +From 7e21cb63b9a1ca760a06cc4cd9b19bbc3fcd8f51 Mon Sep 17 00:00:00 2001 +From: Alan Coopersmith +Date: Sat, 29 Apr 2023 18:30:34 -0700 +Subject: [PATCH] Fix CVE-2023-43789: Out of bounds read on XPM with corrupted + colormap + +Found with clang's libfuzzer + +Signed-off-by: Alan Coopersmith +--- + lib/Xm/Xpmdata.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/Xm/Xpmdata.c b/lib/Xm/Xpmdata.c +index 0b0f1f3..6e87455 100644 +--- a/lib/Xm/Xpmdata.c ++++ b/lib/Xm/Xpmdata.c +@@ -259,13 +259,13 @@ xpmNextWord( + int c; + + if (!mdata->type || mdata->type == XPMBUFFER) { +- while (isspace(c = *mdata->cptr) && c != mdata->Eos) ++ while ((c = *mdata->cptr) && isspace(c) && (c != mdata->Eos)) + mdata->cptr++; + do { + c = *mdata->cptr++; + *buf++ = c; + n++; +- } while (!isspace(c) && c != mdata->Eos && n < buflen); ++ } while (c && !isspace(c) && (c != mdata->Eos) && (n < buflen)); + n--; + mdata->cptr--; + } else { +-- +2.41.0 + diff --git a/motif.spec b/motif.spec index fa6d898..b1d730a 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 29%{?dist} +Release: 30%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -37,6 +37,10 @@ Patch51: motif-c99-string.patch Patch52: motif-c99-bug1602.patch Patch53: motif-c99-bug1605.patch Patch54: motif-c99-bug1609.patch +# CVE-2023-43788 +Patch55: 0001-Fix-CVE-2023-43788-Out-of-bounds-read-in-XpmCreateXp.patch +# CVE-2023-43789 +Patch56: 0001-Fix-CVE-2023-43789-Out-of-bounds-read-on-XPM-with-co.patch Conflicts: lesstif <= 0.92.32-6 @@ -82,6 +86,8 @@ This package contains the static Motif libraries. %patch52 -p1 %patch53 -p1 %patch54 -p1 +%patch55 -p1 +%patch56 -p1 %build ./autogen.sh @@ -131,6 +137,10 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Mon Nov 27 2023 José Expósito - 2.3.4-30 +- Fix CVE-2023-43788: out of bounds read in XpmCreateXpmImageFromBuffer() +- Fix CVE-2023-43789: out of bounds read on XPM with corrupted colormap + * Thu Jul 20 2023 Fedora Release Engineering - 2.3.4-29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 16418a72a5309fe0fd9d1e0f284d2fda34025e26 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 08:39:55 +0000 Subject: [PATCH 33/49] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index b1d730a..73c0387 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 30%{?dist} +Release: 31%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -137,6 +137,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 2.3.4-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Nov 27 2023 José Expósito - 2.3.4-30 - Fix CVE-2023-43788: out of bounds read in XpmCreateXpmImageFromBuffer() - Fix CVE-2023-43789: out of bounds read on XPM with corrupted colormap From b2f5f2f3d2d2694ff3426ed75cd752d3a5fb581b Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sun, 21 Jan 2024 21:01:24 +0100 Subject: [PATCH 34/49] Backport upstream patch to fix incompatible-pointer-types issues --- motif-c99-bug1599.patch | 182 ++++++++++++++++++++++++++++++++++++++++ motif.spec | 7 +- 2 files changed, 188 insertions(+), 1 deletion(-) create mode 100644 motif-c99-bug1599.patch diff --git a/motif-c99-bug1599.patch b/motif-c99-bug1599.patch new file mode 100644 index 0000000..244340d --- /dev/null +++ b/motif-c99-bug1599.patch @@ -0,0 +1,182 @@ +commit 23d12d1f25b33773018bb873c21547b0f4aab14c +Author: Mykola Vshyvkov +Date: Wed Jun 26 15:34:53 2013 +0300 + + Fixed bug #1599 (Eliminates 14 warnings of incompatible type argument from some modules). + +diff --git a/lib/Xm/ColorObj.c b/lib/Xm/ColorObj.c +index 63ed4748721a807e..b3a51eb99ffca232 100644 +--- a/lib/Xm/ColorObj.c ++++ b/lib/Xm/ColorObj.c +@@ -62,7 +62,7 @@ + #define WARNING2 _XmMMsgColObj_0002 + + #ifdef FIX_1400 +-static void trap_XCloseDisplay(Display *disp, XExtCodes *codes); ++static int trap_XCloseDisplay(Display *disp, XExtCodes *codes); + #endif + + /** default should not be killed unless application is dying **/ +@@ -1543,9 +1543,10 @@ XmeGetDesktopColorCells (Screen * screen, + } + + #ifdef FIX_1400 +-static void trap_XCloseDisplay(Display *disp, XExtCodes *codes) ++static int trap_XCloseDisplay(Display *disp, XExtCodes *codes) + { + if (disp == _XmColorObjCacheDisplay) + _XmColorObjCacheDisplay = NULL; ++ return 0; + } + #endif +diff --git a/lib/Xm/Container.c b/lib/Xm/Container.c +index f0b35a919d3e36a3..6576783f055a86f9 100644 +--- a/lib/Xm/Container.c ++++ b/lib/Xm/Container.c +@@ -3234,7 +3234,7 @@ ConstraintSetValues( + ContainerResetDepths(nc); + + #ifdef FIX_1425 +- FindMaxDepths(cc, cw); ++ FindMaxDepths(cc, (Widget)cw); + #else + cw->container.max_depth = MAX(cw->container.max_depth,nc->depth); + #endif +@@ -7181,7 +7181,7 @@ static void FindMaxDepths(XmContainerConstraint c, Widget w) + Widget child = node->widget_ptr; + XmContainerConstraint cc = GetContainerConstraint(child); + cw->container.max_depth = MAX(cw->container.max_depth, cc->depth); +- FindMaxDepths(cc, cw); ++ FindMaxDepths(cc, (Widget)cw); + node = node->next_ptr; + } + } +diff --git a/lib/Xm/DataF.c b/lib/Xm/DataF.c +index 622ee61a309c38af..a780c972e49069ba 100644 +--- a/lib/Xm/DataF.c ++++ b/lib/Xm/DataF.c +@@ -8867,7 +8867,7 @@ df_LoadFontMetrics( + #ifdef USE_XFT + } else if (XmTextF_use_xft(tf)) { + #ifdef FIX_1415 +- _XmXftFontAverageWidth((Widget) tf, TextF_XftFont(tf), &charwidth); ++ _XmXftFontAverageWidth((Widget) tf, TextF_XftFont(tf), (int *)&charwidth); + #else + charwidth = XmTextF_xft_font(tf)->max_advance_width; + #endif +diff --git a/lib/Xm/IconButton.c b/lib/Xm/IconButton.c +index 2cd206347b0bd895..5f2cae7a23853167 100644 +--- a/lib/Xm/IconButton.c ++++ b/lib/Xm/IconButton.c +@@ -1870,7 +1870,7 @@ CreateGCs(Widget w) + + #ifdef FIX_1381 + /*generally gray insensitive foreground (instead stipple)*/ +- values.foreground = _XmAssignInsensitiveColor(iw); ++ values.foreground = _XmAssignInsensitiveColor((Widget)iw); + XmIconButton_insensitive_text_gc(iw) = XtGetGC(w, smask, &values); + #else + XmIconButton_stippled_text_gc(iw) = XtGetGC(w, smask, &values); +diff --git a/lib/Xm/Label.c b/lib/Xm/Label.c +index 8f5621229d4314a6..fd4c63abb5747050 100644 +--- a/lib/Xm/Label.c ++++ b/lib/Xm/Label.c +@@ -1562,7 +1562,7 @@ Redisplay( + #ifdef FIX_1505 + if (pix_use == Pix(lw)) { + XSetFillStyle(XtDisplay(lw), gc, FillStippled); +- XSetStipple(XtDisplay(lw), gc, _XmGetInsensitiveStippleBitmap(lw)); ++ XSetStipple(XtDisplay(lw), gc, _XmGetInsensitiveStippleBitmap((Widget)lw)); + XFillRectangle(XtDisplay(lw), XtWindow(lw), gc, + lp->TextRect.x + lp->PixmapRect.x, + lp->TextRect.y + lp->PixmapRect.y, +diff --git a/lib/Xm/LabelG.c b/lib/Xm/LabelG.c +index d574e436df53a764..b674041fc9bc1f87 100644 +--- a/lib/Xm/LabelG.c ++++ b/lib/Xm/LabelG.c +@@ -2452,7 +2452,7 @@ LRectangle *background_box) + #ifdef FIX_1505 + if (pix_use == Pix(lw)) { + XSetFillStyle(XtDisplay(lw), gc, FillStippled); +- XSetStipple(XtDisplay(lw), gc, _XmGetInsensitiveStippleBitmap(lw)); ++ XSetStipple(XtDisplay(lw), gc, _XmGetInsensitiveStippleBitmap((Widget)lw)); + XFillRectangle(XtDisplay(lw), XtWindow(lw), gc, + lw->rectangle.x + LabG_TextRect(lw).x + + LabG_PixmapRect(lw).x, +diff --git a/lib/Xm/List.c b/lib/Xm/List.c +index 1dd16d2880f84ceb..98aec0e47c01c343 100644 +--- a/lib/Xm/List.c ++++ b/lib/Xm/List.c +@@ -2486,7 +2486,7 @@ DrawItems(XmListWidget lw, + #ifdef FIX_1381 + { + gc = lw->list.InsensitiveGC; +- _XmRendFG(lw->list.scratchRend) = _XmAssignInsensitiveColor(lw); ++ _XmRendFG(lw->list.scratchRend) = _XmAssignInsensitiveColor((Widget)lw); + } + #else + gc = lw->list.InsensitiveGC; +@@ -2831,7 +2831,7 @@ MakeGC(XmListWidget lw) + values.background = lw->core.background_pixel; + #ifdef FIX_1381 + /*generally gray insensitive foreground (instead stipple)*/ +- values.foreground = _XmAssignInsensitiveColor(lw); ++ values.foreground = _XmAssignInsensitiveColor((Widget)lw); + #else + values.foreground = lw->primitive.foreground; + valueMask |= GCStipple | GCFillStyle; +diff --git a/lib/Xm/ResEncod.c b/lib/Xm/ResEncod.c +index fdb44644c94be415..09d2d8f14d181379 100644 +--- a/lib/Xm/ResEncod.c ++++ b/lib/Xm/ResEncod.c +@@ -2513,9 +2513,9 @@ processCharsetAndTextUtf8(XmStringCharSet tag, + + /* Now copy in the text */ + if (ctlen > 0) { +- char *text = Convert(ctext, ctlen, "UTF-8", tag); ++ char *text = Convert((char *)ctext, ctlen, "UTF-8", tag); + if (text == NULL) return(False); +- *outc = ctextConcat(*outc, *outlen, text, strlen(text)); ++ *outc = ctextConcat(*outc, *outlen, (const_OctetPtr)text, strlen(text)); + *outlen += ctlen; + XtFree(text); + }; +diff --git a/lib/Xm/Text.c b/lib/Xm/Text.c +index 0cf37018bd68da52..427b613c97b12750 100644 +--- a/lib/Xm/Text.c ++++ b/lib/Xm/Text.c +@@ -1745,7 +1745,7 @@ _XmTextUpdateLineTable(Widget widget, + } + _XmTextSetCursorPosition(widget, cursorPos); + } else if (start == tw->text.cursor_position && tw->text.auto_show_cursor_position) { +- _XmTextShowPosition(tw, cursorPos); ++ _XmTextShowPosition((Widget)tw, cursorPos); + } + } + #else +diff --git a/lib/Xm/TextF.c b/lib/Xm/TextF.c +index 6b7a85bd7a8fe836..e8f1c78a33cef5a2 100644 +--- a/lib/Xm/TextF.c ++++ b/lib/Xm/TextF.c +@@ -6988,7 +6988,7 @@ LoadFontMetrics(XmTextFieldWidget tf) + #ifdef USE_XFT + } else if (TextF_UseXft(tf)) { + #ifdef FIX_1415 +- _XmXftFontAverageWidth((Widget) tf, TextF_XftFont(tf), &charwidth); ++ _XmXftFontAverageWidth((Widget) tf, TextF_XftFont(tf), (int *)&charwidth); + #else + charwidth = TextF_XftFont(tf)->max_advance_width; + #endif +diff --git a/lib/Xm/TextIn.c b/lib/Xm/TextIn.c +index 40f2b5ad89d846da..b4f2d111f6277cdb 100644 +--- a/lib/Xm/TextIn.c ++++ b/lib/Xm/TextIn.c +@@ -1345,7 +1345,7 @@ PrintableString(XmTextWidget tw, + #ifdef USE_XFT + } else if (o_data->use_xft) { + XGlyphInfo ext; +- XftTextExtentsUtf8(XtDisplay(tw), (XftFont*)o_data->font, str, n, &ext); ++ XftTextExtentsUtf8(XtDisplay(tw), (XftFont*)o_data->font, (_Xconst FcChar8 *)str, n, &ext); + return ext.xOff != 0; + #endif + } else { diff --git a/motif.spec b/motif.spec index 73c0387..8486d92 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 31%{?dist} +Release: 32%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -41,6 +41,7 @@ Patch54: motif-c99-bug1609.patch Patch55: 0001-Fix-CVE-2023-43788-Out-of-bounds-read-in-XpmCreateXp.patch # CVE-2023-43789 Patch56: 0001-Fix-CVE-2023-43789-Out-of-bounds-read-on-XPM-with-co.patch +Patch57: motif-c99-bug1599.patch Conflicts: lesstif <= 0.92.32-6 @@ -88,6 +89,7 @@ This package contains the static Motif libraries. %patch54 -p1 %patch55 -p1 %patch56 -p1 +%patch -P 57 -p1 %build ./autogen.sh @@ -137,6 +139,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Sun Jan 21 2024 Florian Weimer - 2.3.4-32 +- Backport upstream patch to fix incompatible-pointer-types issues + * Sun Jan 21 2024 Fedora Release Engineering - 2.3.4-31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 1139a14d53708712633ccf859c9f7baa4a37f7c7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 08:06:10 +0000 Subject: [PATCH 35/49] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 8486d92..d163a24 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 32%{?dist} +Release: 33%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -139,6 +139,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 2.3.4-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Florian Weimer - 2.3.4-32 - Backport upstream patch to fix incompatible-pointer-types issues From 120c491539dfe745f0d697a9a8abfb7fda1849f5 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sun, 14 Apr 2024 16:17:48 -0400 Subject: [PATCH 36/49] Drop xorg-x11-xinit dependency Simple use of the motif library does not require xinit, nor is it necessary for xinitrc.d directory ownership (which is in filesystem). --- motif.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/motif.spec b/motif.spec index d163a24..6e36053 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 33%{?dist} +Release: 34%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -9,7 +9,6 @@ URL: http://www.motifzone.net/ Obsoletes: openmotif < 2.3.4 Provides: openmotif = %{version}-%{release} Requires: xorg-x11-xbitmaps -Requires: xorg-x11-xinit BuildRequires: make BuildRequires: automake, libtool, autoconf, flex @@ -139,6 +138,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Sun Apr 14 2024 Yaakov Selkowitz - 2.3.4-34 +- Drop xorg-x11-xinit dependency + * Thu Jan 25 2024 Fedora Release Engineering - 2.3.4-33 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From d13b2604b190825492c6e4fddfa417db6a5dccf7 Mon Sep 17 00:00:00 2001 From: Software Management Team Date: Thu, 30 May 2024 12:46:47 +0200 Subject: [PATCH 37/49] Eliminate use of obsolete %patchN syntax (#2283636) --- motif.spec | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/motif.spec b/motif.spec index 6e36053..3179635 100644 --- a/motif.spec +++ b/motif.spec @@ -73,21 +73,21 @@ This package contains the static Motif libraries. %prep %setup -q -%patch22 -p1 -b .no_demos -%patch23 -p1 -b .uil_lib -%patch43 -p1 -b .rgbtxt -%patch45 -p1 -b .mwmrc_dir -%patch46 -p1 -b .bindings -%patch47 -p1 -b .no_X11R6 -%patch48 -p1 -b .format-security -%patch49 -p1 -%patch50 -p1 -%patch51 -p1 -%patch52 -p1 -%patch53 -p1 -%patch54 -p1 -%patch55 -p1 -%patch56 -p1 +%patch -P22 -p1 -b .no_demos +%patch -P23 -p1 -b .uil_lib +%patch -P43 -p1 -b .rgbtxt +%patch -P45 -p1 -b .mwmrc_dir +%patch -P46 -p1 -b .bindings +%patch -P47 -p1 -b .no_X11R6 +%patch -P48 -p1 -b .format-security +%patch -P49 -p1 +%patch -P50 -p1 +%patch -P51 -p1 +%patch -P52 -p1 +%patch -P53 -p1 +%patch -P54 -p1 +%patch -P55 -p1 +%patch -P56 -p1 %patch -P 57 -p1 %build From 914d8214949d225bb8ce1360adaec9e3612ad094 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 18:40:24 +0000 Subject: [PATCH 38/49] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 3179635..d9fa005 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 34%{?dist} +Release: 35%{?dist} License: LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind @@ -138,6 +138,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 2.3.4-35 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Sun Apr 14 2024 Yaakov Selkowitz - 2.3.4-34 - Drop xorg-x11-xinit dependency From 9ae4613d5c47ce2c03860bf5f5b89f6a85af7975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Mon, 2 Sep 2024 11:59:07 +0200 Subject: [PATCH 39/49] convert license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 --- motif.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/motif.spec b/motif.spec index d9fa005..b410819 100644 --- a/motif.spec +++ b/motif.spec @@ -1,8 +1,9 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 35%{?dist} -License: LGPLv2+ +Release: 36%{?dist} +# Automatically converted from old format: LGPLv2+ - review is highly recommended. +License: LicenseRef-Callaway-LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz Source1: xmbind URL: http://www.motifzone.net/ @@ -138,6 +139,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Mon Sep 02 2024 Miroslav Suchý - 2.3.4-36 +- convert license to SPDX + * Thu Jul 18 2024 Fedora Release Engineering - 2.3.4-35 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 90761f25d7eb21a0bf87bbcff8e9757078ee3bde Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 19:07:28 +0000 Subject: [PATCH 40/49] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index b410819..bad7469 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 36%{?dist} +Release: 37%{?dist} # Automatically converted from old format: LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -139,6 +139,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 2.3.4-37 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Mon Sep 02 2024 Miroslav Suchý - 2.3.4-36 - convert license to SPDX From 99ef8dd9273f350b3fb93c2f926efe2e6d3a7dcb Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Wed, 29 Jan 2025 12:11:01 -0600 Subject: [PATCH 41/49] cleanup, fix FTBFS --- motif.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/motif.spec b/motif.spec index bad7469..5f80075 100644 --- a/motif.spec +++ b/motif.spec @@ -13,10 +13,7 @@ Requires: xorg-x11-xbitmaps BuildRequires: make BuildRequires: automake, libtool, autoconf, flex -# flex static libs have been part of flex for RHEL <= 6 and Fedora <= 12 -%if 0%{?fedora} > 12 || 0%{?rhel} > 6 BuildRequires: flex-static -%endif BuildRequires: byacc, pkgconfig BuildRequires: libjpeg-devel libpng-devel BuildRequires: libXft-devel libXmu-devel libXp-devel libXt-devel libXext-devel @@ -92,6 +89,7 @@ This package contains the static Motif libraries. %patch -P 57 -p1 %build +export CFLAGS="$CFLAGS -std=gnu17" ./autogen.sh %configure --enable-static --enable-xft --enable-jpeg --enable-png From 5dc0381e633fd3af3ae22cd913ffbb7a68c7cc1d Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Mon, 2 Jun 2025 16:11:51 +0200 Subject: [PATCH 42/49] Add xinerama support From upstream https://sourceforge.net/p/motif/code/merge-requests/9/ --- ...uild-Check-for-Xinerama-availability.patch | 61 +++ ...isplay-Add-optional-Xinerama-support.patch | 419 ++++++++++++++++++ ...enuShell-Use-Xinerama-to-place-menus.patch | 136 ++++++ ...-DropDown-Use-Xinerama-for-placement.patch | 65 +++ ...Xm-RCMenu-Use-Xinerama-for-placement.patch | 70 +++ ...m-Tooltip-Use-Xinerama-for-placement.patch | 53 +++ ...-ComboBox-Use-Xinerama-for-placement.patch | 51 +++ motif.spec | 20 +- 8 files changed, 874 insertions(+), 1 deletion(-) create mode 100644 0001-build-Check-for-Xinerama-availability.patch create mode 100644 0002-Xm-Display-Add-optional-Xinerama-support.patch create mode 100644 0003-Xm-MenuShell-Use-Xinerama-to-place-menus.patch create mode 100644 0004-Xm-DropDown-Use-Xinerama-for-placement.patch create mode 100644 0005-Xm-RCMenu-Use-Xinerama-for-placement.patch create mode 100644 0006-Xm-Tooltip-Use-Xinerama-for-placement.patch create mode 100644 0007-Xm-ComboBox-Use-Xinerama-for-placement.patch diff --git a/0001-build-Check-for-Xinerama-availability.patch b/0001-build-Check-for-Xinerama-availability.patch new file mode 100644 index 0000000..724c6c3 --- /dev/null +++ b/0001-build-Check-for-Xinerama-availability.patch @@ -0,0 +1,61 @@ +From 3a164564cf8241ee4544ff012659e8eb510b195b Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan +Date: Tue, 19 Nov 2024 18:40:33 +0100 +Subject: [PATCH 1/7] build: Check for Xinerama availability + +Signed-off-by: Olivier Fourdan +--- + configure.ac | 22 ++++++++++++++++++++++ + lib/Xm/Makefile.am | 2 +- + 2 files changed, 23 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index d57f71e6..f0b2617d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -280,7 +280,29 @@ AC_SUBST(LIB_XP) + AC_FIND_XFT + AC_IMAGE_SUPPORT + ++AC_ARG_ENABLE(xinerama,[ --enable-xinerama Enable Xinerama (default=yes)]) ++if test "x$enable_xinerama" = "x" ++then ++ enable_xinerama="yes" ++fi ++ ++if test "x$enable_xinerama" = "xyes" ++then ++ AC_MSG_CHECKING([for libXinerama]) ++ AC_CHECK_HEADERS(X11/extensions/Xinerama.h, ++ AC_CHECK_LIB(Xinerama, XineramaQueryExtension, ,enable_xinerama="no"), ++ enable_xinerama="no") ++fi ++ ++if test "x$enable_xinerama" = "xyes" ++then ++ LIB_XINERAMA=-lXinerama ++else ++ LIB_XINERAMA= ++fi + ++AM_CONDITIONAL(XINERAMA, test "$enable_xinerama" = "yes") ++AC_SUBST(LIB_XINERAMA) + + # AM_CONDITIONAL(Motif22Compatibility, test x$enable_motif22_compatibility = xyes) + +diff --git a/lib/Xm/Makefile.am b/lib/Xm/Makefile.am +index a95fa2db..07b733f5 100644 +--- a/lib/Xm/Makefile.am ++++ b/lib/Xm/Makefile.am +@@ -71,7 +71,7 @@ else + PRINTS_SRC = + endif + +-libXm_la_LIBADD = ${X_LIBS} ${X_XMU} -lXt -lXext ${LIB_XP} -lX11 ${X_EXTRA_LIBS} ++libXm_la_LIBADD = ${X_LIBS} ${X_XMU} -lXt -lXext ${LIB_XP} ${LIB_XINERAMA} -lX11 ${X_EXTRA_LIBS} + + noinst_HEADERS = BaseClassI.h \ + BitmapsI.h \ +-- +2.49.0 + diff --git a/0002-Xm-Display-Add-optional-Xinerama-support.patch b/0002-Xm-Display-Add-optional-Xinerama-support.patch new file mode 100644 index 0000000..3bce3bf --- /dev/null +++ b/0002-Xm-Display-Add-optional-Xinerama-support.patch @@ -0,0 +1,419 @@ +From f8aa9901f3cfa5fb49b809fdb223798623bede63 Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan +Date: Wed, 20 Nov 2024 10:26:28 +0100 +Subject: [PATCH 2/7] Xm/Display: Add optional Xinerama support + +Xinerama support is disabled by default, unless the Xresource +"enableXinerama" is set in the X resources database, e.g.: + + *enableXinerama: True + +This also provides an additional private Screen API to get the monitor +boundaries given a point on screen. This is meant to be used in the +following commits to implement Xinerama awareness in the relevant +widgets. + +Signed-off-by: Olivier Fourdan +--- + doc/man/man3/XmDisplay.3 | 2 + + lib/Xm/Display.c | 95 +++++++++++++++++++++++++++++ + lib/Xm/DisplayP.h | 18 ++++++ + lib/Xm/Screen.c | 128 +++++++++++++++++++++++++++++++++++++++ + lib/Xm/ScreenP.h | 8 +++ + lib/Xm/xmstring.list.in | 2 + + 6 files changed, 253 insertions(+) + +diff --git a/doc/man/man3/XmDisplay.3 b/doc/man/man3/XmDisplay.3 +index a57ea089..ec360c80 100644 +--- a/doc/man/man3/XmDisplay.3 ++++ b/doc/man/man3/XmDisplay.3 +@@ -158,6 +158,8 @@ XmNnoRenditionCallbackXmCCallbackXtCallbackListNULLC + _____ + XmNuserDataXmCUserDataXtPointerNULLCSG + _____ ++XmNenableXineramaXmCEnableXineramaBooleanFalseC ++_____ + .TE + .IP "\fBXmNdefaultButtonEmphasis\fP" 10 + Specifies whether to change the look of the PushButton widget and +diff --git a/lib/Xm/Display.c b/lib/Xm/Display.c +index 55fe4cd3..3ab047f2 100644 +--- a/lib/Xm/Display.c ++++ b/lib/Xm/Display.c +@@ -35,6 +35,9 @@ static char rcsid[] = "$TOG: Display.c /main/23 1997/06/18 17:36:59 samborn $" + + #include + #include ++#ifdef HAVE_LIBXINERAMA ++#include ++#endif + + #include + #include +@@ -273,6 +276,13 @@ static XtResource resources[] = { + XtOffsetOf(WMShellRec, wm.wm_hints.icon_pixmap), + XmRImmediate, NULL + }, ++ /* Xinerama support */ ++ { ++ XmNenableXinerama, XmCEnableXinerama, ++ XmRBoolean, sizeof(Boolean), ++ Offset(display.enable_xinerama), ++ XmRImmediate, (XtPointer) False ++ }, + }; + + #undef Offset +@@ -388,6 +398,45 @@ DisplayClassInitialize( void ) + XmMakeCanonicalString("_MOTIF_DRAG_AND_DROP_MESSAGE"); + } + ++static void ++DisplayInitializeXinerama( XmDisplay xmDisplay ) ++{ ++#ifdef HAVE_LIBXINERAMA ++ Display *display = XtDisplay(xmDisplay); ++ int dummy1, dummy2; ++ Status have_xinerama; ++ ++ xmDisplay->display.monitors = NULL; ++ xmDisplay->display.n_monitors = 0; ++ ++ /* Xinerama support is disabled by default, unless XmNenableXinerama is set */ ++ if (!xmDisplay->display.enable_xinerama) { ++#ifdef DEBUG_XINERAMA ++ printf("XINERAMA support not enabled\n"); ++#endif /* DEBUG_XINERAMA */ ++ return; ++ } ++ ++ if (!XineramaQueryExtension(display, &dummy1, &dummy2)) { ++#ifdef DEBUG_XINERAMA ++ printf("XINERAMA extension not available\n"); ++#endif /* DEBUG_XINERAMA */ ++ xmDisplay->display.enable_xinerama = False; ++ return; ++ } ++ ++ if (!XineramaIsActive(display)) { ++#ifdef DEBUG_XINERAMA ++ printf("XINERAMA extension not activated\n"); ++#endif /* DEBUG_XINERAMA */ ++ xmDisplay->display.enable_xinerama = False; ++ return; ++ } ++ ++ _XmDisplayUpdateXinerama(xmDisplay); ++#endif /* HAVE_LIBXINERAMA */ ++} ++ + /*ARGSUSED*/ + static void + SetDragReceiverInfo( +@@ -553,6 +602,8 @@ DisplayInitialize( + XmDRAG_PREFER_PREREGISTER; + } + ++ DisplayInitializeXinerama(xmDisplay); ++ + _XmVirtKeysInitialize (new_widget); + + _XmProcessLock(); +@@ -672,6 +723,9 @@ DisplayDestroy( + + _XmVirtKeysDestroy (w); + ++#ifdef HAVE_LIBXINERAMA ++ XFree(dd->display.monitors); ++#endif /* HAVE_LIBXINERAMA */ + XDeleteContext( XtDisplay( w), None, context) ; + } + +@@ -1225,3 +1279,44 @@ _XmSetThicknessDefault0( + value->addr = (XPointer)&thickness; + + } ++ ++ ++Boolean ++_XmDisplayUseXinerama( ++ XmDisplay xmDisplay ) ++{ ++ return xmDisplay && xmDisplay->display.enable_xinerama; ++} ++ ++ ++void ++_XmDisplayUpdateXinerama( ++ XmDisplay xmDisplay ) ++{ ++#ifdef HAVE_LIBXINERAMA ++#ifdef DEBUG_XINERAMA ++ int i; ++#endif /* DEBUG_XINERAMA */ ++ ++ if (!_XmDisplayUseXinerama(xmDisplay)) ++ return; ++ ++#ifdef DEBUG_XINERAMA ++ printf("Updating XINERAMA configuration\n"); ++#endif /* DEBUG_XINERAMA */ ++ ++ if (xmDisplay->display.monitors) ++ XFree(xmDisplay->display.monitors); ++ ++ xmDisplay->display.monitors = ++ XineramaQueryScreens (XtDisplay(xmDisplay), &xmDisplay->display.n_monitors); ++ ++#ifdef DEBUG_XINERAMA ++ for (i = 0; i < xmDisplay->display.n_monitors; ++i) { ++ printf("XINERAMA Monitor %i: (%i,%i) [%ix%i]\n", i, ++ xmDisplay->display.monitors[i].x_org, xmDisplay->display.monitors[i].y_org, ++ xmDisplay->display.monitors[i].width, xmDisplay->display.monitors[i].height); ++ } ++#endif /* DEBUG_XINERAMA */ ++#endif /* HAVE_LIBXINERAMA */ ++} +diff --git a/lib/Xm/DisplayP.h b/lib/Xm/DisplayP.h +index 655c29b6..a2420f96 100644 +--- a/lib/Xm/DisplayP.h ++++ b/lib/Xm/DisplayP.h +@@ -23,6 +23,14 @@ + #ifndef _XmDisplayP_h + #define _XmDisplayP_h + ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ ++#ifdef HAVE_LIBXINERAMA ++#include ++#endif ++ + #include + #include + #include +@@ -115,6 +123,11 @@ typedef struct { + Boolean enable_unselectable_drag; + Boolean enable_thin_thickness; + Boolean enable_multi_key_bindings; ++ Boolean enable_xinerama; ++#ifdef HAVE_LIBXINERAMA ++ XineramaScreenInfo *monitors; ++ int n_monitors; ++#endif + } XmDisplayPart, *XmDisplayPartPtr; + + typedef struct _XmDisplayInfo { +@@ -143,6 +156,11 @@ externalref XmDisplayClassRec xmDisplayClassRec; + + externalref String _Xm_MOTIF_DRAG_AND_DROP_MESSAGE ; + ++extern Boolean _XmDisplayUseXinerama( ++ XmDisplay xmDisplay ) ; ++ ++extern void _XmDisplayUpdateXinerama( ++ XmDisplay xmDisplay ) ; + + #ifdef __cplusplus + } /* Close scope of 'extern "C"' declaration which encloses file. */ +diff --git a/lib/Xm/Screen.c b/lib/Xm/Screen.c +index 10ba8d2b..44abcfb3 100644 +--- a/lib/Xm/Screen.c ++++ b/lib/Xm/Screen.c +@@ -396,7 +396,67 @@ GetUnitFromFont( + } + + } ++#ifdef HAVE_LIBXINERAMA ++/* ARGSUSED */ ++static void ++StructureNotifyHandler( ++ Widget wid, ++ XtPointer data, ++ XEvent *event, ++ Boolean *cont ) ++{ ++ Display *display = XtDisplay(wid); ++ ++#ifdef DEBUG_XINERAMA ++ printf("Root event received\n"); ++#endif /* DEBUG_XINERAMA */ + ++ if (event->type == ConfigureNotify) ++ _XmDisplayUpdateXinerama((XmDisplay) XmGetXmDisplay(display)) ; ++} ++ ++/* ARGSUSED */ ++static void ++InstallStructureNotifyHandler( ++ XmScreen xmScreen) ++{ ++ Display *display = XtDisplay(xmScreen); ++ Window rootwindow; ++ XWindowAttributes rootattributes; ++ ++ if (!_XmDisplayUseXinerama((XmDisplay) XmGetXmDisplay(display))) ++ return; ++ ++ rootwindow = RootWindowOfScreen(XtScreen(xmScreen)); ++ XGetWindowAttributes(display, rootwindow, &rootattributes); ++ XSelectInput(display, ++ rootwindow, ++ StructureNotifyMask | rootattributes.your_event_mask); ++ XtRegisterDrawable(display, rootwindow, (Widget)xmScreen); ++ XtAddEventHandler((Widget)xmScreen, ++ (EventMask) StructureNotifyMask, True, ++ StructureNotifyHandler, (XtPointer) NULL); ++} ++ ++/* ARGSUSED */ ++static void ++UninstallStructureNotifyHandler( ++ XmScreen xmScreen) ++{ ++ Display *display = XtDisplay(xmScreen); ++ Window rootwindow; ++ XWindowAttributes rootattributes; ++ ++ if (!_XmDisplayUseXinerama((XmDisplay) XmGetXmDisplay(display))) ++ return; ++ ++ rootwindow = RootWindowOfScreen(XtScreen(xmScreen)); ++ XtUnregisterDrawable(display, rootwindow); ++ XtRemoveEventHandler((Widget)xmScreen, ++ (EventMask) StructureNotifyMask, True, ++ StructureNotifyHandler, (XtPointer) NULL); ++} ++#endif /* HAVE_LIBXINERAMA */ + + /************************************************************************ + * +@@ -413,6 +473,8 @@ Initialize( + { + XmScreen xmScreen = (XmScreen)new_widget; + Display *display = XtDisplay(new_widget); ++ Window rootwindow; ++ XWindowAttributes rootattributes; + + xmScreen->screen.screenInfo = NULL; + +@@ -474,6 +536,9 @@ Initialize( + } + #endif + ++#ifdef HAVE_LIBXINERAMA ++ InstallStructureNotifyHandler(xmScreen); ++#endif /* HAVE_LIBXINERAMA */ + } + + /************************************************************************ +@@ -672,6 +737,10 @@ Destroy( + + /* need to remove pixmap and GC related to this screen */ + _XmCleanPixmapCache (XtScreen(widget), NULL); ++ ++#ifdef HAVE_LIBXINERAMA ++ UninstallStructureNotifyHandler(xmScreen); ++#endif /* HAVE_LIBXINERAMA */ + } + + static void +@@ -1447,3 +1516,62 @@ XmGetXmScreen( + _XmAppUnlock(app); + return widget; + } ++ ++void ++_XmScreenGetBoundariesAtpoint( ++ Screen *screen, ++ Position pt_x, ++ Position pt_y, ++ Position *ret_x, ++ Position *ret_y, ++ Position *ret_max_x, ++ Position *ret_max_y ) ++{ ++ XmDisplay xmDisplay; ++ Position screen_x, screen_y; ++ Position screen_max_x, screen_max_y; ++#ifdef HAVE_LIBXINERAMA ++ Position tmp_x, tmp_y; ++ Position tmp_max_x, tmp_max_y; ++ int i; ++#endif /* HAVE_LIBXINERAMA */ ++ ++ xmDisplay = (XmDisplay) XmGetXmDisplay(DisplayOfScreen(screen)); ++ screen_x = 0; ++ screen_y = 0; ++ screen_max_x = WidthOfScreen(screen); ++ screen_max_y = HeightOfScreen(screen); ++ ++ if (!_XmDisplayUseXinerama(xmDisplay)) ++ goto out; ++ ++#ifdef HAVE_LIBXINERAMA ++ for (i = 0; i < xmDisplay->display.n_monitors; ++i) { ++ tmp_x = xmDisplay->display.monitors[i].x_org; ++ tmp_y = xmDisplay->display.monitors[i].y_org; ++ tmp_max_x = tmp_x + xmDisplay->display.monitors[i].width; ++ tmp_max_y = tmp_y + xmDisplay->display.monitors[i].height; ++ ++ if (pt_x >= tmp_x && pt_x < tmp_max_x && pt_y >= tmp_y && pt_y < tmp_max_y) { ++ screen_x = tmp_x; ++ screen_y = tmp_y; ++ screen_max_x = tmp_max_x; ++ screen_max_y = tmp_max_y; ++ break; /* We have a match */ ++ } ++ } ++#endif /* HAVE_LIBXINERAMA */ ++out: ++#ifdef DEBUG_XINERAMA ++ printf("Point (%i,%i) constrained within (%i,%i) and (%i,%i)\n", ++ pt_x, pt_y, screen_x, screen_y, screen_max_x, screen_max_y); ++#endif /* DEBUG_XINERAMA */ ++ if (ret_x) ++ *ret_x = screen_x; ++ if (ret_y) ++ *ret_y = screen_y; ++ if (ret_max_x) ++ *ret_max_x = screen_max_x; ++ if (ret_max_y) ++ *ret_max_y = screen_max_y; ++} +diff --git a/lib/Xm/ScreenP.h b/lib/Xm/ScreenP.h +index c870c19e..b4b95a6f 100644 +--- a/lib/Xm/ScreenP.h ++++ b/lib/Xm/ScreenP.h +@@ -134,6 +134,14 @@ typedef struct _XmScreenRec { + XmScreenPart screen; + } XmScreenRec; + ++extern void _XmScreenGetBoundariesAtpoint( ++ Screen *screen, ++ Position pt_x, ++ Position pt_y, ++ Position *ret_x, ++ Position *ret_y, ++ Position *ret_max_x, ++ Position *ret_max_y ) ; + + #ifdef __cplusplus + } /* Close scope of 'extern "C"' declaration which encloses file. */ +diff --git a/lib/Xm/xmstring.list.in b/lib/Xm/xmstring.list.in +index 8c0c4f9a..5887e7ad 100644 +--- a/lib/Xm/xmstring.list.in ++++ b/lib/Xm/xmstring.list.in +@@ -1692,6 +1692,8 @@ CFontEncoding + NxftFont + CXftFont + SUTF8_STRING ++NenableXinerama ++CEnableXinerama + + #file XmStrDefsI.h + #table _XmStringsI +-- +2.49.0 + diff --git a/0003-Xm-MenuShell-Use-Xinerama-to-place-menus.patch b/0003-Xm-MenuShell-Use-Xinerama-to-place-menus.patch new file mode 100644 index 0000000..7f86717 --- /dev/null +++ b/0003-Xm-MenuShell-Use-Xinerama-to-place-menus.patch @@ -0,0 +1,136 @@ +From 5fbc1dff0e2e248d61e43c362606c3f5e5255f7d Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan +Date: Thu, 21 Nov 2024 11:52:22 +0100 +Subject: [PATCH 3/7] Xm/MenuShell: Use Xinerama to place menus + +v2: If we have a pulldown button, use the location of that button to + keep the menu on the same monitor as that button so that the menu + doesn't eventually end up on another monitor entirely. + +Signed-off-by: Olivier Fourdan +--- + lib/Xm/MenuShell.c | 47 +++++++++++++++++++++++++++++----------------- + 1 file changed, 30 insertions(+), 17 deletions(-) + +diff --git a/lib/Xm/MenuShell.c b/lib/Xm/MenuShell.c +index 483cc95a..c78bfb08 100644 +--- a/lib/Xm/MenuShell.c ++++ b/lib/Xm/MenuShell.c +@@ -41,6 +41,7 @@ static char rcsid[] = "$TOG: MenuShell.c /main/24 1999/07/08 16:49:59 vipin $" + #include + #include + #include ++#include + #include + #include + #include +@@ -913,7 +914,9 @@ ForceMenuPaneOnScreen( + register Position *y ) + { + Position rightEdgeOfMenu, bottomEdgeOfMenu; +- Dimension dispWidth, dispHeight; ++ Position dispX, dispY, dispMaxX, dispMaxY; ++ Position x1 = *x; ++ Position y1 = *y; + Widget pulldown_button = RC_CascadeBtn(rowcol); + Dimension RowColBorderWidth = rowcol->core.border_width << 1; + Dimension CascadeBorderWidth = 0; +@@ -925,8 +928,18 @@ ForceMenuPaneOnScreen( + + rightEdgeOfMenu = *x + RowColBorderWidth + rowcol->core.width; + bottomEdgeOfMenu = *y + RowColBorderWidth + rowcol->core.height; +- dispWidth = WidthOfScreen (XtScreen(rowcol)); +- dispHeight = HeightOfScreen (XtScreen(rowcol)); ++#ifdef HAVE_LIBXINERAMA ++ if (pulldown_button) ++ { ++ /* If we have a pulldown button, use the location of that button to ++ * keep the menu on the same monitor as that button so that the menu ++ * doesn't eventually end up on another monitor entirely. ++ */ ++ XtTranslateCoords((Widget) pulldown_button, ++ XtX(pulldown_button), XtY(pulldown_button), &x1, &y1); ++ } ++#endif ++ _XmScreenGetBoundariesAtpoint(XtScreen(rowcol), x1, y1, &dispX, &dispY, &dispMaxX, &dispMaxY); + + /* + * For OPTION menus, if the submenu is [partially] offscreen, offset it +@@ -937,9 +950,9 @@ ForceMenuPaneOnScreen( + (RC_Type(XtParent(pulldown_button)) == XmMENU_OPTION)) + { + Position old_x = *x; +- if (bottomEdgeOfMenu >= (Position)dispHeight) ++ if (bottomEdgeOfMenu >= dispMaxY) + { +- *y = dispHeight - rowcol->core.height - RowColBorderWidth - 1; ++ *y = dispMaxY - rowcol->core.height - RowColBorderWidth - 1; + if (LayoutIsRtoLM(rowcol)) + *x = old_x - rowcol->core.width - (rowcol->core.border_width <<1); + else +@@ -948,9 +961,9 @@ ForceMenuPaneOnScreen( + bottomEdgeOfMenu = *y + RowColBorderWidth + rowcol->core.height; + } + +- if (*y < 0) ++ if (*y < dispY) + { +- *y = 0; ++ *y = dispY; + + /* Consider CascadeBtn as well as RowCol width to allow multi + * column RowColumn +@@ -963,13 +976,13 @@ ForceMenuPaneOnScreen( + bottomEdgeOfMenu = *y + RowColBorderWidth + rowcol->core.height; + } + +- if (rightEdgeOfMenu >= (Position)dispWidth) ++ if (rightEdgeOfMenu >= dispMaxX) + { + *x = old_x - rowcol->core.width + RowColBorderWidth; + rightEdgeOfMenu = *x + RowColBorderWidth + rowcol->core.width; + } + +- if (*x < 0) ++ if (*x < dispX) + { + if (LayoutIsRtoLM(rowcol)) + *x = old_x + pulldown_button->core.width + CascadeBorderWidth; +@@ -982,10 +995,10 @@ ForceMenuPaneOnScreen( + /* + * If the submenu is offscreen force it completely on. + */ +- if (rightEdgeOfMenu >= (Position)dispWidth) +- *x -= (rightEdgeOfMenu - dispWidth + 1); ++ if (rightEdgeOfMenu >= dispMaxX) ++ *x -= (rightEdgeOfMenu - dispMaxX + 1); + +- if (bottomEdgeOfMenu >= (Position)dispHeight) ++ if (bottomEdgeOfMenu >= dispMaxY) + { + if (pulldown_button && XtParent(pulldown_button) && + (RC_Type(XtParent(pulldown_button)) == XmMENU_BAR)) +@@ -1005,15 +1018,15 @@ ForceMenuPaneOnScreen( + *y = y_temp; + } + else +- *y -= (bottomEdgeOfMenu - dispHeight + 1); ++ *y -= (bottomEdgeOfMenu - dispMaxY + 1); + } + + /* Make sure that the top left corner os on screen! */ +- if (*x < 0) +- *x = 0; ++ if (*x < dispX) ++ *x = dispX; + +- if (*y < 0) +- *y = 0; ++ if (*y < dispY) ++ *y = dispY; + } + + /* +-- +2.49.0 + diff --git a/0004-Xm-DropDown-Use-Xinerama-for-placement.patch b/0004-Xm-DropDown-Use-Xinerama-for-placement.patch new file mode 100644 index 0000000..b65e7fc --- /dev/null +++ b/0004-Xm-DropDown-Use-Xinerama-for-placement.patch @@ -0,0 +1,65 @@ +From 0e834a8d37dfabd8fa4463f83c132478e50f8337 Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan +Date: Thu, 21 Nov 2024 14:11:11 +0100 +Subject: [PATCH 4/7] Xm/DropDown: Use Xinerama for placement + +Signed-off-by: Olivier Fourdan +--- + lib/Xm/DropDown.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/lib/Xm/DropDown.c b/lib/Xm/DropDown.c +index a25d1092..665e0e26 100644 +--- a/lib/Xm/DropDown.c ++++ b/lib/Xm/DropDown.c +@@ -13,7 +13,7 @@ + #include "XmI.h" + #include + #include +- ++#include + #include + + #include +@@ -2169,8 +2169,9 @@ PopupList(Widget w) + XmDropDownWidget cbw = (XmDropDownWidget) w; + Widget shell = XmDropDown_popup_shell(cbw); + Position x, y, temp; ++ Position dispX, dispY, dispMaxX, dispMaxY; + Dimension width; +- int ret, scr_width, scr_height; ++ int ret; + Arg args[10]; + Cardinal num_args; + +@@ -2209,21 +2210,20 @@ PopupList(Widget w) + * + * Lets start by getting the width and height of the screen. + */ +- scr_width = WidthOfScreen(XtScreen(shell)); +- scr_height = HeightOfScreen(XtScreen(shell)); ++ _XmScreenGetBoundariesAtpoint(XtScreen(shell), x, y, &dispX, &dispY, &dispMaxX, &dispMaxY); + +- if( (int)(y + XtHeight(shell)) > scr_height ) ++ if( (int)(y + XtHeight(shell)) > dispMaxY ) + { + Position tmp; + XtTranslateCoords(w, 0, 0, &tmp, &y); + y -= ((int)XtHeight(shell)); + } +- if( y < 0 ) y = 0; +- if( (int)(x + width) > scr_width ) ++ if( y < dispY ) y = dispY; ++ if( (int)(x + width) > dispMaxX ) + { +- x = scr_width - ((int)width); ++ x = dispMaxX - ((int)width); + } +- if( x < 0 ) x = 0; ++ if( x < dispX ) x = dispX; + + XtSetArg(args[num_args], XmNx, x); num_args++; + XtSetArg(args[num_args], XmNy, y); num_args++; +-- +2.49.0 + diff --git a/0005-Xm-RCMenu-Use-Xinerama-for-placement.patch b/0005-Xm-RCMenu-Use-Xinerama-for-placement.patch new file mode 100644 index 0000000..a3f26fa --- /dev/null +++ b/0005-Xm-RCMenu-Use-Xinerama-for-placement.patch @@ -0,0 +1,70 @@ +From 3ef8c038b06f136a6abe7cfa23afec4d514af4f0 Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan +Date: Thu, 21 Nov 2024 14:17:21 +0100 +Subject: [PATCH 5/7] Xm/RCMenu: Use Xinerama for placement + +Please note that when building with Xinerama enabled, the placement +logic changes, as the original location of the CascadeButton is not +taken into account when relocating the RCMenu widget. + +Reason for that is because I reckon the current code is not correct, as +it moves the RCMenu way off the screen, yet it doesn't show without +Xinerama because there is another check later to make sure the widget +remains on the overall screen, hence hiding the problem. + +With Xinerama, that breaks in-between monitors and the RCMenu ends up +completely misplaced, which is why I think the code was wrong, yet the +logic is preserved when building without XINERAMA support to preserve +the current behavior if needed. + +Signed-off-by: Olivier Fourdan +--- + lib/Xm/RCMenu.c | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +diff --git a/lib/Xm/RCMenu.c b/lib/Xm/RCMenu.c +index 2c698d4f..abd7a70e 100644 +--- a/lib/Xm/RCMenu.c ++++ b/lib/Xm/RCMenu.c +@@ -537,6 +537,7 @@ LocatePulldown( + XEvent *event ) + { + Position x, y, x1, y1; ++ Position dispX, dispMaxX; + + if (root == NULL) + return; +@@ -617,17 +618,26 @@ LocatePulldown( + * window co-ords. + */ + XtTranslateCoords( (Widget) p, x, y, &x1, &y1); ++ _XmScreenGetBoundariesAtpoint(XtScreen(m), x1, y1, &dispX, NULL, &dispMaxX, NULL); + + /* Oh no! we're going off screen. Let's try and do + something reasonable. We're only doing the cascade + off a menu case for now. (CR 6421) */ +- if ((x1 + XtWidth(m)) > WidthOfScreen(XtScreen(m))) { ++ if ((x1 + XtWidth(m)) > dispMaxX) { + if (!IsOption(root) && (XmIsCascadeButton(p) || XmIsCascadeButtonGadget(p))) { +- x1 -= XtWidth(m) + x - XtX(p); ++ x1 -= XtWidth(m) + x; ++#ifndef HAVE_LIBXINERAMA ++ /* XXX: I don't think it's correct, but that's what the original code was doing… */ ++ x1 -= XtX(p); ++#endif /* not HAVE_LIBXINERAMA */ + } +- } else if (x1 < 0) { /* R to L case */ ++ } else if (x1 < dispX) { /* R to L case */ + if (!IsOption(root) && (XmIsCascadeButton(p) || XmIsCascadeButtonGadget(p))) { +- x1 += XtWidth(m) + x - XtX(p); ++ x1 += XtWidth(m) + x; ++#ifndef HAVE_LIBXINERAMA ++ /* XXX: I don't think it's correct, but that's what the original code was doing… */ ++ x1 -= XtX(p); ++#endif /* not HAVE_LIBXINERAMA */ + } + } + +-- +2.49.0 + diff --git a/0006-Xm-Tooltip-Use-Xinerama-for-placement.patch b/0006-Xm-Tooltip-Use-Xinerama-for-placement.patch new file mode 100644 index 0000000..1387787 --- /dev/null +++ b/0006-Xm-Tooltip-Use-Xinerama-for-placement.patch @@ -0,0 +1,53 @@ +From f2bc91c789ed33fc1e0a31d167a6a7bc0383429e Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan +Date: Thu, 21 Nov 2024 14:24:30 +0100 +Subject: [PATCH 6/7] Xm/Tooltip: Use Xinerama for placement + +Signed-off-by: Olivier Fourdan +--- + lib/Xm/ToolTip.c | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/lib/Xm/ToolTip.c b/lib/Xm/ToolTip.c +index dc65071d..fdd32221 100644 +--- a/lib/Xm/ToolTip.c ++++ b/lib/Xm/ToolTip.c +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -153,6 +154,8 @@ ToolTipPost (XtPointer client_data, + XtWidgetGeometry geo; + Position destX, + destY; ++ Position dispMaxX, ++ dispMaxY; + + XmToolTipConfigTrait ttp; /* ToolTip pointer */ + +@@ -197,12 +200,14 @@ ToolTipPost (XtPointer client_data, + Don't let the tip be off the right/bottom of the screen + */ + destX = rx + (XmIsGadget (w) ? XtX (w) : 0) - x + XtWidth (w) / 2; +- if (destX + geo.width > WidthOfScreen (XtScreen (w))) ++ destY = ry + (XmIsGadget (w) ? XtY (w) : 0) - y + XtHeight (w); ++ _XmScreenGetBoundariesAtpoint(XtScreen(w), destX, destY, NULL, NULL, &dispMaxX, &dispMaxY); ++ ++ if (destX + geo.width > dispMaxX) + { +- destX = WidthOfScreen (XtScreen (w)) - geo.width; ++ destX = dispMaxX - geo.width; + } +- destY = ry + (XmIsGadget (w) ? XtY (w) : 0) - y + XtHeight (w); +- if (destY + geo.height > HeightOfScreen (XtScreen (w))) ++ if (destY + geo.height > dispMaxY) + { + destY = ry + (XmIsGadget (w) ? XtY (w) : 0) - y - geo.height; + } +-- +2.49.0 + diff --git a/0007-Xm-ComboBox-Use-Xinerama-for-placement.patch b/0007-Xm-ComboBox-Use-Xinerama-for-placement.patch new file mode 100644 index 0000000..772f930 --- /dev/null +++ b/0007-Xm-ComboBox-Use-Xinerama-for-placement.patch @@ -0,0 +1,51 @@ +From eb193dce2b7f8ce80004d14ccf64c53552ae103c Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan +Date: Thu, 21 Nov 2024 14:30:23 +0100 +Subject: [PATCH 7/7] Xm/ComboBox: Use Xinerama for placement + +Signed-off-by: Olivier Fourdan +--- + lib/Xm/ComboBox.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/lib/Xm/ComboBox.c b/lib/Xm/ComboBox.c +index 1472e458..0f49de50 100644 +--- a/lib/Xm/ComboBox.c ++++ b/lib/Xm/ComboBox.c +@@ -43,6 +43,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -1791,6 +1792,7 @@ CBDropDownList(Widget widget, + Cardinal n; + int tmp; + Position root_x, root_y, shell_x, shell_y; ++ Position dispX, dispY, dispMaxX, dispMaxY; + Dimension shell_width; + + XtTranslateCoords((Widget)cb, XtX(cb), XtY(cb), &root_x, &root_y); +@@ -1801,12 +1803,13 @@ CBDropDownList(Widget widget, + XtY(cb); + + /* Try to position the shell on the screen. */ +- tmp = WidthOfScreen(XtScreen(cb)) - XtWidth(CB_ListShell(cb)); ++ _XmScreenGetBoundariesAtpoint(XtScreen(cb), shell_x, shell_y, &dispX, &dispY, &dispMaxX, &dispMaxY); ++ tmp = dispMaxX - XtWidth(CB_ListShell(cb)); + tmp = MIN(tmp, shell_x); +- shell_x = MAX(0, tmp); +- tmp = HeightOfScreen(XtScreen(cb)) - XtHeight(CB_ListShell(cb)); ++ shell_x = MAX(dispX, tmp); ++ tmp = dispMaxY - XtHeight(CB_ListShell(cb)); + tmp = MIN(tmp, shell_y); +- shell_y = MAX(0, tmp); ++ shell_y = MAX(dispY, tmp); + + /* CR 8446: The shell width may have changed unexpectedly. */ + shell_width = XtWidth(cb) - 2 * CB_HighlightThickness(cb); +-- +2.49.0 + diff --git a/motif.spec b/motif.spec index 5f80075..7e2360d 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 37%{?dist} +Release: 38%{?dist} # Automatically converted from old format: LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -39,6 +39,14 @@ Patch55: 0001-Fix-CVE-2023-43788-Out-of-bounds-read-in-XpmCreateXp.patch # CVE-2023-43789 Patch56: 0001-Fix-CVE-2023-43789-Out-of-bounds-read-on-XPM-with-co.patch Patch57: motif-c99-bug1599.patch +# https://sourceforge.net/p/motif/code/merge-requests/9/ +Patch58: 0001-build-Check-for-Xinerama-availability.patch +Patch59: 0002-Xm-Display-Add-optional-Xinerama-support.patch +Patch60: 0003-Xm-MenuShell-Use-Xinerama-to-place-menus.patch +Patch61: 0004-Xm-DropDown-Use-Xinerama-for-placement.patch +Patch62: 0005-Xm-RCMenu-Use-Xinerama-for-placement.patch +Patch63: 0006-Xm-Tooltip-Use-Xinerama-for-placement.patch +Patch64: 0007-Xm-ComboBox-Use-Xinerama-for-placement.patch Conflicts: lesstif <= 0.92.32-6 @@ -87,6 +95,13 @@ This package contains the static Motif libraries. %patch -P55 -p1 %patch -P56 -p1 %patch -P 57 -p1 +%patch -P 58 -p1 -b .xinerama +%patch -P 59 -p1 -b .xinerama +%patch -P 60 -p1 -b .xinerama +%patch -P 61 -p1 -b .xinerama +%patch -P 62 -p1 -b .xinerama +%patch -P 63 -p1 -b .xinerama +%patch -P 64 -p1 -b .xinerama %build export CFLAGS="$CFLAGS -std=gnu17" @@ -137,6 +152,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Mon Jun 2 2025 Olivier Fourdan - 2.3.4-38 +- Add Xinerama support from https://sourceforge.net/p/motif/code/merge-requests/9/ + * Fri Jan 17 2025 Fedora Release Engineering - 2.3.4-37 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 89af9464d2560e8b7db0dc3ed3aadb54514a81c5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 22:21:32 +0000 Subject: [PATCH 43/49] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index 7e2360d..715591a 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.4 -Release: 38%{?dist} +Release: 39%{?dist} # Automatically converted from old format: LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz @@ -152,6 +152,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 2.3.4-39 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Mon Jun 2 2025 Olivier Fourdan - 2.3.4-38 - Add Xinerama support from https://sourceforge.net/p/motif/code/merge-requests/9/ From ecf900d00b4c95b10a434240dc673c29cb448f20 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 14 Aug 2025 14:42:51 -0500 Subject: [PATCH 44/49] 2.3.8 --- .gitignore | 1 + includes.patch | 72 ++++++++++++++ motif-c99-bug1599.patch | 182 ----------------------------------- motif-c99-bug1602.patch | 54 ----------- motif-c99-bug1605.patch | 134 -------------------------- motif-c99-bug1609.patch | 147 ---------------------------- motif-c99-void-sprintf.patch | 39 ++++---- motif.spec | 48 ++++----- sources | 2 +- 9 files changed, 116 insertions(+), 563 deletions(-) create mode 100644 includes.patch delete mode 100644 motif-c99-bug1599.patch delete mode 100644 motif-c99-bug1602.patch delete mode 100644 motif-c99-bug1605.patch delete mode 100644 motif-c99-bug1609.patch diff --git a/.gitignore b/.gitignore index 8a39d88..d6d11eb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /motif-2.3.4-src.tgz +/motif-2.3.8.tar.gz diff --git a/includes.patch b/includes.patch new file mode 100644 index 0000000..0608941 --- /dev/null +++ b/includes.patch @@ -0,0 +1,72 @@ +--- motif-2.3.8/lib/Xm/XpmCrBufFrI.c~ 2016-03-15 21:10:08.000000000 -0500 ++++ motif-2.3.8/lib/Xm/XpmCrBufFrI.c 2025-08-14 14:07:13.543514735 -0500 +@@ -39,7 +39,7 @@ + #ifdef HAVE_CONFIG_H + #include + #endif +- ++#include + + /* October 2004, source code review by Thomas Biege */ + +--- motif-2.3.8/lib/Xm/XpmWrFFrI.c~ 2016-03-15 21:10:08.000000000 -0500 ++++ motif-2.3.8/lib/Xm/XpmWrFFrI.c 2025-08-14 14:10:27.307965260 -0500 +@@ -37,6 +37,7 @@ + #include + #endif + ++#include + + /* October 2004, source code review by Thomas Biege */ + +--- motif-2.3.8/lib/Xm/Xpmrgb.c~ 2016-03-15 21:10:08.000000000 -0500 ++++ motif-2.3.8/lib/Xm/Xpmrgb.c 2025-08-14 14:13:47.593686683 -0500 +@@ -50,6 +50,7 @@ + + #include "XpmI.h" + #include ++#include + + #ifndef FOR_MSW /* normal part first, MSW part at + * the end, (huge ifdef!) */ +--- motif-2.3.8/lib/Xm/XpmCrDatFrI.c~ 2016-03-15 21:10:08.000000000 -0500 ++++ motif-2.3.8/lib/Xm/XpmCrDatFrI.c 2025-08-14 14:14:21.697225831 -0500 +@@ -37,6 +37,7 @@ + #include + #endif + ++#include + + /* October 2004, source code review by Thomas Biege */ + +--- motif-2.3.8/lib/Xm/XpmRdFToI.c~ 2016-03-15 21:10:08.000000000 -0500 ++++ motif-2.3.8/lib/Xm/XpmRdFToI.c 2025-08-14 14:16:09.040737658 -0500 +@@ -37,6 +37,7 @@ + #include + #endif + ++#include + + /* October 2004, source code review by Thomas Biege */ + +--- motif-2.3.8/lib/Xm/Xpmcreate.c~ 2016-03-15 21:10:08.000000000 -0500 ++++ motif-2.3.8/lib/Xm/Xpmcreate.c 2025-08-14 14:17:00.651339098 -0500 +@@ -43,6 +43,7 @@ + #include + #endif + ++#include + + /* October 2004, source code review by Thomas Biege */ + +--- motif-2.3.8/lib/Xm/XpmI.h~ 2017-08-16 19:38:43.000000000 -0500 ++++ motif-2.3.8/lib/Xm/XpmI.h 2025-08-14 14:20:19.913720840 -0500 +@@ -28,6 +28,8 @@ + extern "C" { + #endif + ++#include ++ + /* Xpm internal symbols are prefixed with _Xm */ + + #define xpmParseData _XmxpmParseData diff --git a/motif-c99-bug1599.patch b/motif-c99-bug1599.patch deleted file mode 100644 index 244340d..0000000 --- a/motif-c99-bug1599.patch +++ /dev/null @@ -1,182 +0,0 @@ -commit 23d12d1f25b33773018bb873c21547b0f4aab14c -Author: Mykola Vshyvkov -Date: Wed Jun 26 15:34:53 2013 +0300 - - Fixed bug #1599 (Eliminates 14 warnings of incompatible type argument from some modules). - -diff --git a/lib/Xm/ColorObj.c b/lib/Xm/ColorObj.c -index 63ed4748721a807e..b3a51eb99ffca232 100644 ---- a/lib/Xm/ColorObj.c -+++ b/lib/Xm/ColorObj.c -@@ -62,7 +62,7 @@ - #define WARNING2 _XmMMsgColObj_0002 - - #ifdef FIX_1400 --static void trap_XCloseDisplay(Display *disp, XExtCodes *codes); -+static int trap_XCloseDisplay(Display *disp, XExtCodes *codes); - #endif - - /** default should not be killed unless application is dying **/ -@@ -1543,9 +1543,10 @@ XmeGetDesktopColorCells (Screen * screen, - } - - #ifdef FIX_1400 --static void trap_XCloseDisplay(Display *disp, XExtCodes *codes) -+static int trap_XCloseDisplay(Display *disp, XExtCodes *codes) - { - if (disp == _XmColorObjCacheDisplay) - _XmColorObjCacheDisplay = NULL; -+ return 0; - } - #endif -diff --git a/lib/Xm/Container.c b/lib/Xm/Container.c -index f0b35a919d3e36a3..6576783f055a86f9 100644 ---- a/lib/Xm/Container.c -+++ b/lib/Xm/Container.c -@@ -3234,7 +3234,7 @@ ConstraintSetValues( - ContainerResetDepths(nc); - - #ifdef FIX_1425 -- FindMaxDepths(cc, cw); -+ FindMaxDepths(cc, (Widget)cw); - #else - cw->container.max_depth = MAX(cw->container.max_depth,nc->depth); - #endif -@@ -7181,7 +7181,7 @@ static void FindMaxDepths(XmContainerConstraint c, Widget w) - Widget child = node->widget_ptr; - XmContainerConstraint cc = GetContainerConstraint(child); - cw->container.max_depth = MAX(cw->container.max_depth, cc->depth); -- FindMaxDepths(cc, cw); -+ FindMaxDepths(cc, (Widget)cw); - node = node->next_ptr; - } - } -diff --git a/lib/Xm/DataF.c b/lib/Xm/DataF.c -index 622ee61a309c38af..a780c972e49069ba 100644 ---- a/lib/Xm/DataF.c -+++ b/lib/Xm/DataF.c -@@ -8867,7 +8867,7 @@ df_LoadFontMetrics( - #ifdef USE_XFT - } else if (XmTextF_use_xft(tf)) { - #ifdef FIX_1415 -- _XmXftFontAverageWidth((Widget) tf, TextF_XftFont(tf), &charwidth); -+ _XmXftFontAverageWidth((Widget) tf, TextF_XftFont(tf), (int *)&charwidth); - #else - charwidth = XmTextF_xft_font(tf)->max_advance_width; - #endif -diff --git a/lib/Xm/IconButton.c b/lib/Xm/IconButton.c -index 2cd206347b0bd895..5f2cae7a23853167 100644 ---- a/lib/Xm/IconButton.c -+++ b/lib/Xm/IconButton.c -@@ -1870,7 +1870,7 @@ CreateGCs(Widget w) - - #ifdef FIX_1381 - /*generally gray insensitive foreground (instead stipple)*/ -- values.foreground = _XmAssignInsensitiveColor(iw); -+ values.foreground = _XmAssignInsensitiveColor((Widget)iw); - XmIconButton_insensitive_text_gc(iw) = XtGetGC(w, smask, &values); - #else - XmIconButton_stippled_text_gc(iw) = XtGetGC(w, smask, &values); -diff --git a/lib/Xm/Label.c b/lib/Xm/Label.c -index 8f5621229d4314a6..fd4c63abb5747050 100644 ---- a/lib/Xm/Label.c -+++ b/lib/Xm/Label.c -@@ -1562,7 +1562,7 @@ Redisplay( - #ifdef FIX_1505 - if (pix_use == Pix(lw)) { - XSetFillStyle(XtDisplay(lw), gc, FillStippled); -- XSetStipple(XtDisplay(lw), gc, _XmGetInsensitiveStippleBitmap(lw)); -+ XSetStipple(XtDisplay(lw), gc, _XmGetInsensitiveStippleBitmap((Widget)lw)); - XFillRectangle(XtDisplay(lw), XtWindow(lw), gc, - lp->TextRect.x + lp->PixmapRect.x, - lp->TextRect.y + lp->PixmapRect.y, -diff --git a/lib/Xm/LabelG.c b/lib/Xm/LabelG.c -index d574e436df53a764..b674041fc9bc1f87 100644 ---- a/lib/Xm/LabelG.c -+++ b/lib/Xm/LabelG.c -@@ -2452,7 +2452,7 @@ LRectangle *background_box) - #ifdef FIX_1505 - if (pix_use == Pix(lw)) { - XSetFillStyle(XtDisplay(lw), gc, FillStippled); -- XSetStipple(XtDisplay(lw), gc, _XmGetInsensitiveStippleBitmap(lw)); -+ XSetStipple(XtDisplay(lw), gc, _XmGetInsensitiveStippleBitmap((Widget)lw)); - XFillRectangle(XtDisplay(lw), XtWindow(lw), gc, - lw->rectangle.x + LabG_TextRect(lw).x + - LabG_PixmapRect(lw).x, -diff --git a/lib/Xm/List.c b/lib/Xm/List.c -index 1dd16d2880f84ceb..98aec0e47c01c343 100644 ---- a/lib/Xm/List.c -+++ b/lib/Xm/List.c -@@ -2486,7 +2486,7 @@ DrawItems(XmListWidget lw, - #ifdef FIX_1381 - { - gc = lw->list.InsensitiveGC; -- _XmRendFG(lw->list.scratchRend) = _XmAssignInsensitiveColor(lw); -+ _XmRendFG(lw->list.scratchRend) = _XmAssignInsensitiveColor((Widget)lw); - } - #else - gc = lw->list.InsensitiveGC; -@@ -2831,7 +2831,7 @@ MakeGC(XmListWidget lw) - values.background = lw->core.background_pixel; - #ifdef FIX_1381 - /*generally gray insensitive foreground (instead stipple)*/ -- values.foreground = _XmAssignInsensitiveColor(lw); -+ values.foreground = _XmAssignInsensitiveColor((Widget)lw); - #else - values.foreground = lw->primitive.foreground; - valueMask |= GCStipple | GCFillStyle; -diff --git a/lib/Xm/ResEncod.c b/lib/Xm/ResEncod.c -index fdb44644c94be415..09d2d8f14d181379 100644 ---- a/lib/Xm/ResEncod.c -+++ b/lib/Xm/ResEncod.c -@@ -2513,9 +2513,9 @@ processCharsetAndTextUtf8(XmStringCharSet tag, - - /* Now copy in the text */ - if (ctlen > 0) { -- char *text = Convert(ctext, ctlen, "UTF-8", tag); -+ char *text = Convert((char *)ctext, ctlen, "UTF-8", tag); - if (text == NULL) return(False); -- *outc = ctextConcat(*outc, *outlen, text, strlen(text)); -+ *outc = ctextConcat(*outc, *outlen, (const_OctetPtr)text, strlen(text)); - *outlen += ctlen; - XtFree(text); - }; -diff --git a/lib/Xm/Text.c b/lib/Xm/Text.c -index 0cf37018bd68da52..427b613c97b12750 100644 ---- a/lib/Xm/Text.c -+++ b/lib/Xm/Text.c -@@ -1745,7 +1745,7 @@ _XmTextUpdateLineTable(Widget widget, - } - _XmTextSetCursorPosition(widget, cursorPos); - } else if (start == tw->text.cursor_position && tw->text.auto_show_cursor_position) { -- _XmTextShowPosition(tw, cursorPos); -+ _XmTextShowPosition((Widget)tw, cursorPos); - } - } - #else -diff --git a/lib/Xm/TextF.c b/lib/Xm/TextF.c -index 6b7a85bd7a8fe836..e8f1c78a33cef5a2 100644 ---- a/lib/Xm/TextF.c -+++ b/lib/Xm/TextF.c -@@ -6988,7 +6988,7 @@ LoadFontMetrics(XmTextFieldWidget tf) - #ifdef USE_XFT - } else if (TextF_UseXft(tf)) { - #ifdef FIX_1415 -- _XmXftFontAverageWidth((Widget) tf, TextF_XftFont(tf), &charwidth); -+ _XmXftFontAverageWidth((Widget) tf, TextF_XftFont(tf), (int *)&charwidth); - #else - charwidth = TextF_XftFont(tf)->max_advance_width; - #endif -diff --git a/lib/Xm/TextIn.c b/lib/Xm/TextIn.c -index 40f2b5ad89d846da..b4f2d111f6277cdb 100644 ---- a/lib/Xm/TextIn.c -+++ b/lib/Xm/TextIn.c -@@ -1345,7 +1345,7 @@ PrintableString(XmTextWidget tw, - #ifdef USE_XFT - } else if (o_data->use_xft) { - XGlyphInfo ext; -- XftTextExtentsUtf8(XtDisplay(tw), (XftFont*)o_data->font, str, n, &ext); -+ XftTextExtentsUtf8(XtDisplay(tw), (XftFont*)o_data->font, (_Xconst FcChar8 *)str, n, &ext); - return ext.xOff != 0; - #endif - } else { diff --git a/motif-c99-bug1602.patch b/motif-c99-bug1602.patch deleted file mode 100644 index b20340b..0000000 --- a/motif-c99-bug1602.patch +++ /dev/null @@ -1,54 +0,0 @@ -commit 56dae22f7c2e7446852af1d68116f1809edae633 -Author: Mykola Vshyvkov -Date: Wed Jun 26 19:21:20 2013 +0300 - - Fixed bug #1602 (Eliminates 6 warnings "implicit declaration of function" in some modules). - -diff --git a/tools/wml/wml.c b/tools/wml/wml.c -index d8ad382ebb93f0cc..723288a9c29cead2 100644 ---- a/tools/wml/wml.c -+++ b/tools/wml/wml.c -@@ -80,6 +80,7 @@ static char rcsid[] = "$TOG: wml.c /main/8 1999/04/16 09:41:47 mgreess $" - #endif - #include - #include -+#include - - - /* -@@ -159,6 +160,7 @@ void wmlInit (); - * External variables - */ - extern int yyleng; -+extern int yyparse(); - - - -diff --git a/tools/wml/wmloutp1.c b/tools/wml/wmloutp1.c -index c826c4f0fad65b68..ea6a8e2780d08d78 100644 ---- a/tools/wml/wmloutp1.c -+++ b/tools/wml/wmloutp1.c -@@ -45,6 +45,11 @@ static char rcsid[] = "$XConsortium: wmloutp1.c /main/7 1995/07/13 21:04:31 drk - - #include "wml.h" - -+/* External functions declaraion */ -+extern void wmlOutputKeyWordFiles (); -+extern void wmlOutputMmFiles(); -+ -+ - - void wmlOutput () - -diff --git a/tools/wml/wmlresolve.c b/tools/wml/wmlresolve.c -index 3b8642c12474cfbd..c9bc84151f8a7902 100644 ---- a/tools/wml/wmlresolve.c -+++ b/tools/wml/wmlresolve.c -@@ -58,6 +58,7 @@ static char rcsid[] = "$XConsortium: wmlresolve.c /main/9 1995/08/29 11:11:05 dr - #include - #endif - #include -+#include - - /* - * Routines used only in this module diff --git a/motif-c99-bug1605.patch b/motif-c99-bug1605.patch deleted file mode 100644 index ac47267..0000000 --- a/motif-c99-bug1605.patch +++ /dev/null @@ -1,134 +0,0 @@ -commit d094e8c4a6a1890520ade3e1900229454dc2eac2 -Author: Mykola Vshyvkov -Date: Mon Jul 1 19:02:25 2013 +0300 - - Fixed bug #1605 (Eliminates 14 warnings of some types in WML tool). - -diff --git a/lib/Xm/XmRenderT.c b/lib/Xm/XmRenderT.c -index 0abd71265fc901b9..5ecd38bef29d2c6b 100644 ---- a/lib/Xm/XmRenderT.c -+++ b/lib/Xm/XmRenderT.c -@@ -1993,7 +1993,7 @@ GetSameRenditions(XmRendition *rend_cache, XmRendition rend, int count_rend) - for (i=0; i -Date: Wed Jul 3 18:52:21 2013 +0300 - - Fixed bug #1609 (Eliminates 18 warnings of "incompatible implicit declaration" in modules of "clients" catalog). - -diff --git a/clients/mwm/WmCmd.c b/clients/mwm/WmCmd.c -index f21d41d541dc50a3..4d723aa4848314f6 100644 ---- a/clients/mwm/WmCmd.c -+++ b/clients/mwm/WmCmd.c -@@ -48,6 +48,7 @@ - #include "WmWsm.h" - #include "WmDebug.h" - #include "WmWinConf.h" -+#include "WmFeedback.h" - - - -diff --git a/clients/mwm/WmCmd.h b/clients/mwm/WmCmd.h -index ff779defe240933b..e8bc104e850c5ec3 100644 ---- a/clients/mwm/WmCmd.h -+++ b/clients/mwm/WmCmd.h -@@ -59,5 +59,8 @@ extern void AddWindowMenuEntry (ClientData *); - extern void DeleteCommand (long, CmdTree **); - extern void SendInvokeMessage (CARD32, CARD32, Atom, Time); - -+extern void -+GetAutomationData (XtPointer input, Atom *outputType, XtPointer *output, unsigned long *outputLen, int *outputFmt); -+ - - #endif /* _WM_CMD_ */ -diff --git a/clients/mwm/WmFunction.c b/clients/mwm/WmFunction.c -index 9a2102bcf80cbf08..94fb8cde2c0ec83d 100644 ---- a/clients/mwm/WmFunction.c -+++ b/clients/mwm/WmFunction.c -@@ -112,6 +112,7 @@ extern pid_t vfork(); - #include "WmWinList.h" - #include "WmWinState.h" - #include "WmXSMP.h" -+#include "WmCmd.h" - - #include /* for MS_LastManagedMenuTime */ - extern XmMenuState _XmGetMenuState(); -diff --git a/clients/mwm/WmInitWs.c b/clients/mwm/WmInitWs.c -index aaa584cd3e4ce7b7..d29b5f96fec246fc 100644 ---- a/clients/mwm/WmInitWs.c -+++ b/clients/mwm/WmInitWs.c -@@ -134,6 +134,7 @@ typedef struct - #include - #endif /* WSM */ - #include "WmXSMP.h" -+#include "Xm/VirtKeysI.h" - - /* - * Function Declarations: -diff --git a/clients/mwm/WmResParse.c b/clients/mwm/WmResParse.c -index 465f5b4d29e99411..a63e928acd643c54 100644 ---- a/clients/mwm/WmResParse.c -+++ b/clients/mwm/WmResParse.c -@@ -63,6 +63,7 @@ static char rcsid[] = "$XConsortium: WmResParse.c /main/9 1996/11/01 10:17:34 dr - #include "WmResource.h" - - #include -+#include "Xm/VirtKeysI.h" - - #include - #include -diff --git a/clients/mwm/WmWinList.c b/clients/mwm/WmWinList.c -index a45a4fc9471ab21d..31472a5caa832d90 100644 ---- a/clients/mwm/WmWinList.c -+++ b/clients/mwm/WmWinList.c -@@ -63,7 +63,7 @@ static char rcsid[] = "$TOG: WmWinList.c /main/8 1997/06/10 15:50:50 samborn $" - #ifdef WSM - #include "WmWrkspace.h" - #endif /* WSM */ -- -+#include "WmEvent.h" - - - -diff --git a/clients/mwm/WmWsmLib/recv.c b/clients/mwm/WmWsmLib/recv.c -index 8b2833fbc2ea756f..06908e24756b0e3c 100644 ---- a/clients/mwm/WmWsmLib/recv.c -+++ b/clients/mwm/WmWsmLib/recv.c -@@ -38,6 +38,8 @@ XtPointer *, unsigned long *, int * - ); - #endif /* JUNK */ - -+extern Time GetTimestamp (Display *dpy); -+ - - /* Function Name: WSMDefaultOwnSelection - * Description: This is the default routine that owns the proper -diff --git a/clients/mwm/WmWsmLib/send.c b/clients/mwm/WmWsmLib/send.c -index 8792e2c7c8ac82bb..c261da70bfff366a 100644 ---- a/clients/mwm/WmWsmLib/send.c -+++ b/clients/mwm/WmWsmLib/send.c -@@ -45,6 +45,8 @@ static void ReplyReceived( - Widget, XtPointer, Atom *, Atom *, XtPointer, unsigned long *, int * - ); - -+extern Time GetTimestamp (Display *dpy); -+ - /* Function Name: WSMSendMessage - * Description: Sends a message to WSM or WM on the screen - * and display specified. -diff --git a/clients/uil/UilDefI.h b/clients/uil/UilDefI.h -index a0176b619e89f1eb..f17bff764bf6fd1e 100644 ---- a/clients/uil/UilDefI.h -+++ b/clients/uil/UilDefI.h -@@ -608,7 +608,7 @@ extern void sym_dump_object_variant _ARGUMENTS(( sym_def_obj_entry_type *az_sym - extern void sym_dump_root_entry _ARGUMENTS(( sym_root_entry_type *az_symbol_entry )); - extern char *sym_section_text _ARGUMENTS(( int b_type )); - extern void dump_free_list _ARGUMENTS(( void )); -- -+extern int sar_get_units_type (yystype *parse_frame); - #if defined(__cplusplus) || defined(c_plusplus) - } - #endif -diff --git a/clients/uil/UilMain.c b/clients/uil/UilMain.c -index 6120eda2fa176670..1864ba78597e2dd6 100644 ---- a/clients/uil/UilMain.c -+++ b/clients/uil/UilMain.c -@@ -104,9 +104,10 @@ static void UilWrapup _ARGUMENTS((Uil_compile_desc_type *compile_desc)); - #endif - - externaldef(uilmsg) nl_catd uil_catd = NULL; -- - #endif - -+extern int yyparse(); -+ - /* - ** - ** MODULE Definitions -diff --git a/clients/xmbind/xmbind.c b/clients/xmbind/xmbind.c -index f3d5a67ce35dab84..a16e2d968c45f7f0 100644 ---- a/clients/xmbind/xmbind.c -+++ b/clients/xmbind/xmbind.c -@@ -29,6 +29,7 @@ static char rcsid[] = "$TOG: xmbind.c /main/10 1997/06/18 17:34:48 samborn $" - #endif - #endif - #include -+#include - #include - - /* Internal routines "borrowed" from libXm. Don't try this at home! */ diff --git a/motif-c99-void-sprintf.patch b/motif-c99-void-sprintf.patch index 040c79e..381e1bb 100644 --- a/motif-c99-void-sprintf.patch +++ b/motif-c99-void-sprintf.patch @@ -2,11 +2,21 @@ Stop defining VOID_SPRINTF, following what upstream libXpm does. The check has an implicit declaration of exit and an implicit int, so it will fail to build with future compilers. -diff --git a/acinclude.m4 b/acinclude.m4 -index 88edfce3d169a267..38409a28a65cb028 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -45,19 +45,6 @@ if test $lt_cv_xthreads = yes; then +diff --git a/configure.ac b/configure.ac +index 3b412361e6f43da4..6cbeb2f5eea235eb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -120,7 +120,6 @@ AC_FUNC_STRCOLL + AC_FUNC_STRFTIME + AC_FUNC_FORK([]) + AC_FUNC_VPRINTF +-AM_FUNC_VOID_SPRINTF + AC_CHECK_FUNCS(wcslen wcscpy wcsncpy wcschr wcscat wcsncat getcwd gettimeofday mkdir re_comp regcmp select strcspn strerror strstr strtod strtol uname) + AC_CHECK_FUNCS(strdup,,AC_DEFINE(NEED_STRDUP, 1, no strdup)) + AC_CHECK_FUNCS(strcasecmp,,AC_DEFINE(NEED_STRCASECMP, 1, no strcasecmp)) +--- motif-2.3.8/acinclude.m4~ 2025-08-14 13:27:19.058051442 -0500 ++++ motif-2.3.8/acinclude.m4 2025-08-14 13:29:04.868675609 -0500 +@@ -46,18 +46,6 @@ fi ]) @@ -22,19 +32,6 @@ index 88edfce3d169a267..38409a28a65cb028 100644 -fi -]) - -- - dnl - dnl End of special macros. - dnl -diff --git a/configure.ac b/configure.ac -index 3b412361e6f43da4..6cbeb2f5eea235eb 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -120,7 +120,6 @@ AC_FUNC_STRCOLL - AC_FUNC_STRFTIME - AC_FUNC_FORK([]) - AC_FUNC_VPRINTF --AM_FUNC_VOID_SPRINTF - AC_CHECK_FUNCS(wcslen wcscpy wcsncpy wcschr wcscat wcsncat getcwd gettimeofday mkdir re_comp regcmp select strcspn strerror strstr strtod strtol uname) - AC_CHECK_FUNCS(strdup,,AC_DEFINE(NEED_STRDUP, 1, no strdup)) - AC_CHECK_FUNCS(strcasecmp,,AC_DEFINE(NEED_STRCASECMP, 1, no strcasecmp)) + dnl This tests whether weak aliases are supported. + AC_DEFUN([WEAK_ALIAS_SUPPORT], + [AC_CACHE_CHECK(whether weak aliases are supported, ac_cv_weak_alias_support, diff --git a/motif.spec b/motif.spec index 715591a..8b14733 100644 --- a/motif.spec +++ b/motif.spec @@ -1,10 +1,10 @@ Summary: Run-time libraries and programs Name: motif -Version: 2.3.4 -Release: 39%{?dist} +Version: 2.3.8 +Release: 1%{?dist} # Automatically converted from old format: LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-LGPLv2+ -Source: http://downloads.sf.net/motif/motif-%{version}-src.tgz +Source: http://downloads.sf.net/motif/motif-%{version}.tar.gz Source1: xmbind URL: http://www.motifzone.net/ Obsoletes: openmotif < 2.3.4 @@ -31,14 +31,10 @@ Patch48: motif-2.3.4-Fix-issues-with-Werror-format-security.patch Patch49: motif-configure-c99.patch Patch50: motif-c99-void-sprintf.patch Patch51: motif-c99-string.patch -Patch52: motif-c99-bug1602.patch -Patch53: motif-c99-bug1605.patch -Patch54: motif-c99-bug1609.patch # CVE-2023-43788 Patch55: 0001-Fix-CVE-2023-43788-Out-of-bounds-read-in-XpmCreateXp.patch # CVE-2023-43789 Patch56: 0001-Fix-CVE-2023-43789-Out-of-bounds-read-on-XPM-with-co.patch -Patch57: motif-c99-bug1599.patch # https://sourceforge.net/p/motif/code/merge-requests/9/ Patch58: 0001-build-Check-for-Xinerama-availability.patch Patch59: 0002-Xm-Display-Add-optional-Xinerama-support.patch @@ -48,6 +44,8 @@ Patch62: 0005-Xm-RCMenu-Use-Xinerama-for-placement.patch Patch63: 0006-Xm-Tooltip-Use-Xinerama-for-placement.patch Patch64: 0007-Xm-ComboBox-Use-Xinerama-for-placement.patch +Patch65: includes.patch + Conflicts: lesstif <= 0.92.32-6 %description @@ -79,22 +77,18 @@ This package contains the static Motif libraries. %prep %setup -q -%patch -P22 -p1 -b .no_demos -%patch -P23 -p1 -b .uil_lib -%patch -P43 -p1 -b .rgbtxt -%patch -P45 -p1 -b .mwmrc_dir -%patch -P46 -p1 -b .bindings -%patch -P47 -p1 -b .no_X11R6 -%patch -P48 -p1 -b .format-security -%patch -P49 -p1 -%patch -P50 -p1 -%patch -P51 -p1 -%patch -P52 -p1 -%patch -P53 -p1 -%patch -P54 -p1 -%patch -P55 -p1 -%patch -P56 -p1 -%patch -P 57 -p1 +%patch -P 22 -p1 -b .no_demos +%patch -P 23 -p1 -b .uil_lib +%patch -P 43 -p1 -b .rgbtxt +%patch -P 45 -p1 -b .mwmrc_dir +%patch -P 46 -p1 -b .bindings +%patch -P 47 -p1 -b .no_X11R6 +%patch -P 48 -p1 -b .format-security +%patch -P 49 -p1 +%patch -P 50 -p1 +%patch -P 52 -p1 +%patch -P 55 -p1 +%patch -P 56 -p1 %patch -P 58 -p1 -b .xinerama %patch -P 59 -p1 -b .xinerama %patch -P 60 -p1 -b .xinerama @@ -103,9 +97,12 @@ This package contains the static Motif libraries. %patch -P 63 -p1 -b .xinerama %patch -P 64 -p1 -b .xinerama +%patch -P 65 -p1 -b .includes + %build export CFLAGS="$CFLAGS -std=gnu17" -./autogen.sh +touch AUTHORS NEWS +autoreconf -fi %configure --enable-static --enable-xft --enable-jpeg --enable-png make clean %{?_smp_mflags} @@ -152,6 +149,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Thu Aug 14 2025 Gwyn Ciesla - 2.3.8-1 +- 2.3.8 + * Thu Jul 24 2025 Fedora Release Engineering - 2.3.4-39 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/sources b/sources index c891fa3..50b70d1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -612bb8127d0d31da6e5474edf8a5c247 motif-2.3.4-src.tgz +SHA512 (motif-2.3.8.tar.gz) = 1ab8e8eece25ef97e948592b5fa3e19d98e932695290a18b7a8e90f1aa2766bc4f082bdbc3999dff5660e684821178a149040f76bb477163e53ca06474d02b55 From 6a01f80d0e21a5636202800f8de409b22e8231f0 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 14 Aug 2025 15:01:49 -0500 Subject: [PATCH 45/49] Patch fix --- motif.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/motif.spec b/motif.spec index 8b14733..45fc78a 100644 --- a/motif.spec +++ b/motif.spec @@ -86,6 +86,7 @@ This package contains the static Motif libraries. %patch -P 48 -p1 -b .format-security %patch -P 49 -p1 %patch -P 50 -p1 +%patch -P 51 -p1 %patch -P 52 -p1 %patch -P 55 -p1 %patch -P 56 -p1 From 1920af63517e7d5ab1afa5c2b9510078a5419085 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 14 Aug 2025 15:15:52 -0500 Subject: [PATCH 46/49] Patch fix --- motif.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/motif.spec b/motif.spec index 45fc78a..4f8a9cd 100644 --- a/motif.spec +++ b/motif.spec @@ -87,7 +87,6 @@ This package contains the static Motif libraries. %patch -P 49 -p1 %patch -P 50 -p1 %patch -P 51 -p1 -%patch -P 52 -p1 %patch -P 55 -p1 %patch -P 56 -p1 %patch -P 58 -p1 -b .xinerama From aefca4e5a693ccdd63671fbe6ac371bcbfce7210 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Thu, 11 Dec 2025 08:21:02 +0100 Subject: [PATCH 47/49] Sync with RHEL / upstream patches - Fix memleak in XmString from: https://sourceforge.net/p/motif/code/merge-requests/10/ - Add NET_WORKAREA and GTK_WORKAREAS support from: https://sourceforge.net/p/motif/code/merge-requests/11/ --- ...-Xm-Screen-Add-_NET_WORKAREA-support.patch | 146 ++++++++++++++++++ 0001-Xm-String-Fix-memory-leak.patch | 28 ++++ ...TK_WORKAREAS-support-for-multi-monit.patch | 145 +++++++++++++++++ motif.spec | 20 ++- 4 files changed, 336 insertions(+), 3 deletions(-) create mode 100644 0001-Xm-Screen-Add-_NET_WORKAREA-support.patch create mode 100644 0001-Xm-String-Fix-memory-leak.patch create mode 100644 0002-Xm-Screen-Add-_GTK_WORKAREAS-support-for-multi-monit.patch diff --git a/0001-Xm-Screen-Add-_NET_WORKAREA-support.patch b/0001-Xm-Screen-Add-_NET_WORKAREA-support.patch new file mode 100644 index 0000000..6dc940c --- /dev/null +++ b/0001-Xm-Screen-Add-_NET_WORKAREA-support.patch @@ -0,0 +1,146 @@ +From 78a0cd5bdbe447bab807a09fae18d8a961366abc Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan +Date: Mon, 16 Jun 2025 14:29:22 +0200 +Subject: [PATCH 1/2] Xm/Screen: Add _NET_WORKAREA support + +Add support for the extended window manager hint _NET_WORKAREA to +prevent Motif from placing its widgets outside of the geometry +advertised by the window manager. + +Support for _NET_WORKAREA depends on the Xinerama patches as it shares +the same logic. + +Signed-off-by: Olivier Fourdan +--- + lib/Xm/Screen.c | 108 ++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 108 insertions(+) + +diff --git a/lib/Xm/Screen.c b/lib/Xm/Screen.c +index 44abcfb3..6269ffb3 100644 +--- a/lib/Xm/Screen.c ++++ b/lib/Xm/Screen.c +@@ -1517,6 +1517,113 @@ XmGetXmScreen( + return widget; + } + ++static int ++_XmScreenGetCurrentDesktop(Screen *screen) ++{ ++ static Atom XmA_NET_CURRENT_DESKTOP = None; ++ Atom type; ++ Display *dpy; ++ Window rootwindow; ++ int result = False; ++ int desktop = 0; ++ int format; ++ unsigned long lengthRtn; ++ unsigned long bytesAfter; ++ unsigned char *data; ++ ++ dpy = DisplayOfScreen(screen); ++ rootwindow = RootWindowOfScreen(screen); ++ ++ if (XmA_NET_CURRENT_DESKTOP == None) ++ XmA_NET_CURRENT_DESKTOP = XInternAtom(dpy, "_NET_CURRENT_DESKTOP", False); ++ ++ result =XGetWindowProperty(dpy, rootwindow, ++ XmA_NET_CURRENT_DESKTOP, ++ 0L, 100000L, False, XA_CARDINAL, ++ &type, &format, &lengthRtn, &bytesAfter, ++ &data); ++ ++ if (type == XA_CARDINAL) { ++ desktop = *(int *)data; ++ XFree(data); ++ } ++#ifdef DEBUG_XINERAMA ++ printf("Current desktop is %i\n", desktop); ++#endif /* DEBUG_XINERAMA */ ++ ++ return desktop; ++} ++ ++static void ++_XmCheckNetWorkarea( ++ Screen *screen, ++ Position *ret_x, ++ Position *ret_y, ++ Position *ret_max_x, ++ Position *ret_max_y ) ++{ ++ static Atom XmA_NET_WORKAREA = None; ++ Atom type; ++ Display *dpy; ++ Window rootwindow; ++ int result = False; ++ int desktop = 0; ++ int format; ++ unsigned long lengthRtn; ++ unsigned long bytesAfter; ++ unsigned char *data; ++ long *net_workarea; ++ ++ dpy = DisplayOfScreen(screen); ++ rootwindow = RootWindowOfScreen(screen); ++ desktop = _XmScreenGetCurrentDesktop(screen); ++ ++ if (XmA_NET_WORKAREA == None) ++ XmA_NET_WORKAREA = XInternAtom(dpy, "_NET_WORKAREA", False); ++ ++ result =XGetWindowProperty(dpy, rootwindow, ++ XmA_NET_WORKAREA, ++ 0L, 100000L, False, XA_CARDINAL, ++ &type, &format, &lengthRtn, &bytesAfter, ++ &data); ++ ++ if (result != Success || type != XA_CARDINAL || format != 32 || ++ bytesAfter != 0 || lengthRtn % 4 != 0 || desktop + 1 > lengthRtn / 4) ++ goto done; ++ ++ net_workarea = (long *) data; ++ ++#define NET_WORKAREA_X (desktop * 4) ++#define NET_WORKAREA_Y (desktop * 4 + 1) ++#define NET_WORKAREA_WIDTH (desktop * 4 + 2) ++#define NET_WORKAREA_HEIGHT (desktop * 4 + 3) ++ ++ if (*ret_x < net_workarea[NET_WORKAREA_X]) ++ *ret_x = net_workarea[NET_WORKAREA_X]; ++ ++ if (*ret_y < net_workarea[NET_WORKAREA_Y]) ++ *ret_y = net_workarea[NET_WORKAREA_Y]; ++ ++ if (*ret_max_x > net_workarea[NET_WORKAREA_X] + net_workarea[NET_WORKAREA_WIDTH]) ++ *ret_max_x = net_workarea[NET_WORKAREA_X] + net_workarea[NET_WORKAREA_WIDTH]; ++ ++ if (*ret_max_y > net_workarea[NET_WORKAREA_Y] + net_workarea[NET_WORKAREA_HEIGHT]) ++ *ret_max_y = net_workarea[NET_WORKAREA_Y] + net_workarea[NET_WORKAREA_HEIGHT]; ++ ++#undef NET_WORKAREA_X ++#undef NET_WORKAREA_Y ++#undef NET_WORKAREA_WIDTH ++#undef NET_WORKAREA_HEIGHT ++ ++#ifdef DEBUG_XINERAMA ++ printf("_NET_WORKAREA within (%i,%i) and (%i,%i)\n", *ret_x, *ret_y, *ret_max_x, *ret_max_y); ++#endif /* DEBUG_XINERAMA */ ++ ++done: ++ if (data) ++ XFree(data); ++} ++ + void + _XmScreenGetBoundariesAtpoint( + Screen *screen, +@@ -1561,6 +1668,7 @@ _XmScreenGetBoundariesAtpoint( + } + } + #endif /* HAVE_LIBXINERAMA */ ++ _XmCheckNetWorkarea(screen, &screen_x, &screen_y, &screen_max_x, &screen_max_y); + out: + #ifdef DEBUG_XINERAMA + printf("Point (%i,%i) constrained within (%i,%i) and (%i,%i)\n", +-- +2.50.0 + diff --git a/0001-Xm-String-Fix-memory-leak.patch b/0001-Xm-String-Fix-memory-leak.patch new file mode 100644 index 0000000..45a9143 --- /dev/null +++ b/0001-Xm-String-Fix-memory-leak.patch @@ -0,0 +1,28 @@ +From 30ff6e00e9a5edc15ff438b6cfd8a5a4169630a1 Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan +Date: Mon, 16 Jun 2025 14:49:55 +0200 +Subject: [PATCH] Xm/String: Fix memory leak + +ComputeMetrics() would leak the string created by _XmUtf8ToUcs2(), make +sure to free the string once done with it. + +Signed-off-by: Olivier Fourdan +--- + lib/Xm/XmString.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/Xm/XmString.c b/lib/Xm/XmString.c +index 2c54ef57..6ee1c40e 100644 +--- a/lib/Xm/XmString.c ++++ b/lib/Xm/XmString.c +@@ -6272,6 +6272,7 @@ ComputeMetrics(XmRendition rend, + + XTextExtents16(font_struct, str, str_len, + &dir, &asc, &desc, &char_ret); ++ XFree(str); + } else + XTextExtents16(font_struct, + (XChar2b *)text, Half(byte_count), +-- +2.50.0 + diff --git a/0002-Xm-Screen-Add-_GTK_WORKAREAS-support-for-multi-monit.patch b/0002-Xm-Screen-Add-_GTK_WORKAREAS-support-for-multi-monit.patch new file mode 100644 index 0000000..7726681 --- /dev/null +++ b/0002-Xm-Screen-Add-_GTK_WORKAREAS-support-for-multi-monit.patch @@ -0,0 +1,145 @@ +From 2f18ccbffee237845c0b3c2d745d20ac66748f8a Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan +Date: Fri, 27 Jun 2025 12:11:41 +0200 +Subject: [PATCH 2/2] Xm/Screen: Add _GTK_WORKAREAS support for multi-monitor + +Add support for the GTK property _GTK_WORKAREAS to prevent Motif from +placing its widgets outside of the geometry advertised by the window +manager on a multi-monitor setup. + +Unlike the extended window manager hint _NET_WORKAREA which defines a +single rectangle for the whole screen spanning across all the monitors, +_GTK_WORKAREAS provides an area per monitor, making that property more +adequate on a multi-monitor setup. + +However, if _GTK_WORKAREAS is not supported, we fallback to the standard +_NET_WORKAREA property. + +Support for _GTK_WORKAREAS depends on the Xinerama patches as it shares +the same logic. + +Signed-off-by: Olivier Fourdan +--- + lib/Xm/Screen.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 91 insertions(+), 1 deletion(-) + +diff --git a/lib/Xm/Screen.c b/lib/Xm/Screen.c +index 6269ffb3..d8d24e9a 100644 +--- a/lib/Xm/Screen.c ++++ b/lib/Xm/Screen.c +@@ -1554,6 +1554,91 @@ _XmScreenGetCurrentDesktop(Screen *screen) + return desktop; + } + ++static Boolean ++_XmCheckGtkWorkareas( ++ Screen *screen, ++ Position pt_x, ++ Position pt_y, ++ Position *ret_x, ++ Position *ret_y, ++ Position *ret_max_x, ++ Position *ret_max_y ) ++{ ++ Atom XmA_GTK_WORKAREAS; ++ Atom type; ++ Display *dpy; ++ Window rootwindow; ++ int result = False; ++ int desktop = 0; ++ int format; ++ unsigned long lengthRtn; ++ unsigned long bytesAfter; ++ unsigned char *data; ++ long *gtk_workareas; ++ char atom_name[32]; ++ int monitor, n_monitors; ++ Position tmp_x, tmp_y; ++ Position tmp_max_x, tmp_max_y; ++ Boolean ret = False; ++ ++ dpy = DisplayOfScreen(screen); ++ rootwindow = RootWindowOfScreen(screen); ++ desktop = _XmScreenGetCurrentDesktop(screen); ++ ++ snprintf(atom_name, sizeof(atom_name), "_GTK_WORKAREAS_D%d", desktop); ++ XmA_GTK_WORKAREAS = XInternAtom(dpy, atom_name, False); ++ ++ result = XGetWindowProperty(dpy, rootwindow, ++ XmA_GTK_WORKAREAS, ++ 0L, 100000L, False, XA_CARDINAL, ++ &type, &format, &lengthRtn, &bytesAfter, ++ &data); ++ ++ if (result != Success || type != XA_CARDINAL || format != 32 || ++ bytesAfter != 0 || lengthRtn % 4 != 0) { ++ goto done; ++ } ++ ++ gtk_workareas = (long *) data; ++ n_monitors = lengthRtn / 4; ++ ++#define GTK_WORKAREA_X (monitor * 4) ++#define GTK_WORKAREA_Y (monitor * 4 + 1) ++#define GTK_WORKAREA_WIDTH (monitor * 4 + 2) ++#define GTK_WORKAREA_HEIGHT (monitor * 4 + 3) ++ ++ for (monitor = 0; monitor < n_monitors; ++monitor) { ++ tmp_x = gtk_workareas[GTK_WORKAREA_X]; ++ tmp_y = gtk_workareas[GTK_WORKAREA_Y]; ++ tmp_max_x = tmp_x + gtk_workareas[GTK_WORKAREA_WIDTH]; ++ tmp_max_y = tmp_y + gtk_workareas[GTK_WORKAREA_HEIGHT]; ++ ++ if (pt_x >= tmp_x && pt_x < tmp_max_x && pt_y >= tmp_y && pt_y < tmp_max_y) { ++ *ret_x = tmp_x; ++ *ret_y = tmp_y; ++ *ret_max_x = tmp_max_x; ++ *ret_max_y = tmp_max_y; ++ ret = True; ++ break; /* We have a match */ ++ } ++ } ++ ++#undef GTK_WORKAREA_X ++#undef GTK_WORKAREA_Y ++#undef GTK_WORKAREA_WIDTH ++#undef GTK_WORKAREA_HEIGHT ++ ++#ifdef DEBUG_XINERAMA ++ printf("Point (%i,%i) constrained by _GTK_WORKAREAS_D%d within (%i,%i) and (%i,%i)\n", ++ pt_x, pt_y, desktop, *ret_x, *ret_y, *ret_max_x, *ret_max_y); ++#endif /* DEBUG_XINERAMA */ ++ ++done: ++ if (data) ++ XFree(data); ++ return ret; ++} ++ + static void + _XmCheckNetWorkarea( + Screen *screen, +@@ -1637,6 +1722,7 @@ _XmScreenGetBoundariesAtpoint( + XmDisplay xmDisplay; + Position screen_x, screen_y; + Position screen_max_x, screen_max_y; ++ Boolean check_gtk_workarea; + #ifdef HAVE_LIBXINERAMA + Position tmp_x, tmp_y; + Position tmp_max_x, tmp_max_y; +@@ -1668,7 +1754,11 @@ _XmScreenGetBoundariesAtpoint( + } + } + #endif /* HAVE_LIBXINERAMA */ +- _XmCheckNetWorkarea(screen, &screen_x, &screen_y, &screen_max_x, &screen_max_y); ++ check_gtk_workarea = _XmCheckGtkWorkareas(screen, pt_x, pt_y, ++ &screen_x, &screen_y, ++ &screen_max_x, &screen_max_y); ++ if (!check_gtk_workarea) ++ _XmCheckNetWorkarea(screen, &screen_x, &screen_y, &screen_max_x, &screen_max_y); + out: + #ifdef DEBUG_XINERAMA + printf("Point (%i,%i) constrained within (%i,%i) and (%i,%i)\n", +-- +2.50.0 + diff --git a/motif.spec b/motif.spec index 4f8a9cd..f5476ce 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.8 -Release: 1%{?dist} +Release: 2%{?dist} # Automatically converted from old format: LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}.tar.gz @@ -43,8 +43,13 @@ Patch61: 0004-Xm-DropDown-Use-Xinerama-for-placement.patch Patch62: 0005-Xm-RCMenu-Use-Xinerama-for-placement.patch Patch63: 0006-Xm-Tooltip-Use-Xinerama-for-placement.patch Patch64: 0007-Xm-ComboBox-Use-Xinerama-for-placement.patch +# https://sourceforge.net/p/motif/code/merge-requests/10/ +Patch65: 0001-Xm-String-Fix-memory-leak.patch +# https://sourceforge.net/p/motif/code/merge-requests/11/ +Patch66: 0001-Xm-Screen-Add-_NET_WORKAREA-support.patch +Patch67: 0002-Xm-Screen-Add-_GTK_WORKAREAS-support-for-multi-monit.patch -Patch65: includes.patch +Patch68: includes.patch Conflicts: lesstif <= 0.92.32-6 @@ -96,8 +101,11 @@ This package contains the static Motif libraries. %patch -P 62 -p1 -b .xinerama %patch -P 63 -p1 -b .xinerama %patch -P 64 -p1 -b .xinerama +%patch -P 65 -p1 -b .utf8-memleak +%patch -P 66 -p1 -b .net-workarea +%patch -P 67 -p1 -b .gtk-workareas -%patch -P 65 -p1 -b .includes +%patch -P 68 -p1 -b .includes %build export CFLAGS="$CFLAGS -std=gnu17" @@ -149,6 +157,12 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Thu Dec 11 2025 Olivier Fourdan - 2.3.8-2 +- Fix memleak in XmString from: + https://sourceforge.net/p/motif/code/merge-requests/10/ +- Add NET_WORKAREA and GTK_WORKAREAS support from: + https://sourceforge.net/p/motif/code/merge-requests/11/ + * Thu Aug 14 2025 Gwyn Ciesla - 2.3.8-1 - 2.3.8 From dd044ef15cb72956a963584de2b8725b32c31e2b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 16 Jan 2026 21:37:40 +0000 Subject: [PATCH 48/49] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index f5476ce..b787480 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.8 -Release: 2%{?dist} +Release: 3%{?dist} # Automatically converted from old format: LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}.tar.gz @@ -157,6 +157,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Fri Jan 16 2026 Fedora Release Engineering - 2.3.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Thu Dec 11 2025 Olivier Fourdan - 2.3.8-2 - Fix memleak in XmString from: https://sourceforge.net/p/motif/code/merge-requests/10/ From a6632a9dc28065ad527b9728be862f2c5509c552 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jul 2026 08:59:40 +0000 Subject: [PATCH 49/49] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild --- motif.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/motif.spec b/motif.spec index b787480..8cdd323 100644 --- a/motif.spec +++ b/motif.spec @@ -1,7 +1,7 @@ Summary: Run-time libraries and programs Name: motif Version: 2.3.8 -Release: 3%{?dist} +Release: 4%{?dist} # Automatically converted from old format: LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-LGPLv2+ Source: http://downloads.sf.net/motif/motif-%{version}.tar.gz @@ -157,6 +157,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Thu Jul 16 2026 Fedora Release Engineering - 2.3.8-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + * Fri Jan 16 2026 Fedora Release Engineering - 2.3.8-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild