commit 3d48b3019031e0e22b9c5c36037054ba9a939c381035297c43a2103c8e5b5f33 Author: Stefan Dirsch Date: Sun Oct 13 19:18:30 2024 +0000 - Update to 1.5.1 * gitlab CI: add xz-utils to container for "make distcheck" * gitlab CI: collect config.log to help diagnose failures * gitlab CI: add libc-dev to required packages in build container * LocalInitTransports: Fix -Wuseless-cast warning for getenv() call * SocketCreateListener: Fix -Wuseless-cast warning in bind() call * Clear numerous -Wsign-compare warnings from gcc 14.1 * SocketINETConnect: return failure when malloc() fails * ParseAddress: return failure when strdup() fails * MakeAllCOTSServerListeners: Initialize temp_ciptrs * GetMyNetworkId: Avoid writing to NULL pointer if malloc() fails * GetPeerNetworkId: Avoid writing to NULL pointer if malloc() fails * GetPeerNetworkId: avoid calling strlen() on a NULL pointer * SocketOpen: avoid leak of out-of-range fd * is_numeric: Add TRANS_SERVER to required ifdefs * update .gitignore * TRANS(ParseAddress): Fix "assignment discards ‘const’ qualifier" warnings * TRANS(GetHostname): Fix "‘strncpy’ output truncated.." warning * Fix string length check OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xtrans?expand=0&rev=32 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/n_unifdef-LBXPROXY_t-and-TEST_t.patch b/n_unifdef-LBXPROXY_t-and-TEST_t.patch new file mode 100644 index 0000000..9ba714a --- /dev/null +++ b/n_unifdef-LBXPROXY_t-and-TEST_t.patch @@ -0,0 +1,62 @@ +From 0794b1b712a90b40e2b019c9edc6f96874493c52 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Wed, 18 May 2016 12:41:41 -0400 +Subject: [PATCH] unifdef LBXPROXY_t and TEST_t + +LBX is dead, and TEST_t is unused. + +Reviewed-by: Keith Packard +Signed-off-by: Adam Jackson +--- + Xtrans.h | 15 --------------- + Xtranssock.c | 8 -------- + 2 files changed, 23 deletions(-) + +diff --git a/Xtrans.h b/Xtrans.h +index 3fd73b8..7ed033b 100644 +--- a/Xtrans.h ++++ b/Xtrans.h +@@ -111,21 +111,6 @@ static const char *__xtransname = "_IceTrans"; + #endif + #endif /* ICE_t */ + +-#ifdef TEST_t +-#define TRANS(func) _TESTTrans##func +-#ifdef XTRANSDEBUG +-static const char *__xtransname = "_TESTTrans"; +-#endif +-#endif /* TEST_t */ +- +-#ifdef LBXPROXY_t +-#define TRANS(func) _LBXPROXYTrans##func +-#define X11_t /* The server defines this - so should the LBX proxy */ +-#ifdef XTRANSDEBUG +-static const char *__xtransname = "_LBXPROXYTrans"; +-#endif +-#endif /* LBXPROXY_t */ +- + #if !defined(TRANS) + #define TRANS(func) _XTrans##func + #ifdef XTRANSDEBUG +diff --git a/Xtranssock.c b/Xtranssock.c +index 2cda9bb..866f4ab 100644 +--- a/Xtranssock.c ++++ b/Xtranssock.c +@@ -215,14 +215,6 @@ static int TRANS(SocketINETClose) (XtransConnInfo ciptr); + #define UNIX_PATH "/tmp/.ICE-unix/" + #define UNIX_DIR "/tmp/.ICE-unix" + #endif /* ICE_t */ +-#if defined(TEST_t) +-#define UNIX_PATH "/tmp/.Test-unix/test" +-#define UNIX_DIR "/tmp/.Test-unix" +-#endif +-#if defined(LBXPROXY_t) +-#define UNIX_PATH "/tmp/.X11-unix/X" +-#define UNIX_DIR "/tmp/.X11-unix" +-#endif + + + #endif /* UNIXCONN */ +-- +2.16.4 + diff --git a/p_xauth.diff b/p_xauth.diff new file mode 100644 index 0000000..f274521 --- /dev/null +++ b/p_xauth.diff @@ -0,0 +1,18 @@ +--- Xtranssock.c.orig 2009-10-16 23:25:57.000000000 +0200 ++++ Xtranssock.c 2010-04-04 16:10:29.000000000 +0200 +@@ -1790,12 +1790,15 @@ + + { + char hostnamebuf[256]; ++ char* xauthlocalname = getenv("XAUTHLOCALHOSTNAME"); + + TRANS(GetHostname) (hostnamebuf, sizeof (hostnamebuf)); + + if (strcmp (hostnamebuf, host) == 0) + { + return (1); ++ } else if(xauthlocalname && strcmp (xauthlocalname, host) == 0) { ++ return (1); + } else { + #if defined(IPv6) && defined(AF_INET6) + struct addrinfo *localhostaddr; diff --git a/u_xtrans-noarch-pkgconfig.patch b/u_xtrans-noarch-pkgconfig.patch new file mode 100644 index 0000000..e5ae266 --- /dev/null +++ b/u_xtrans-noarch-pkgconfig.patch @@ -0,0 +1,11 @@ +Index: xtrans-1.4.0/xtrans.pc.in +=================================================================== +--- xtrans-1.4.0.orig/xtrans.pc.in ++++ xtrans-1.4.0/xtrans.pc.in +@@ -1,6 +1,5 @@ + prefix=@prefix@ + exec_prefix=@exec_prefix@ +-libdir=@libdir@ + includedir=@includedir@ + + Name: XTrans diff --git a/xtrans-1.5.0.tar.xz b/xtrans-1.5.0.tar.xz new file mode 100644 index 0000000..61c4784 --- /dev/null +++ b/xtrans-1.5.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ba4b703696bfddbf40bacf25bce4e3efb2a0088878f017a50e9884b0c8fb1bd +size 170388 diff --git a/xtrans-1.5.1.tar.xz b/xtrans-1.5.1.tar.xz new file mode 100644 index 0000000..80dc3a7 --- /dev/null +++ b/xtrans-1.5.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dea80fbd8c3c941495b4b1d2785cb652815d016849a0d2ef90d1140de916993e +size 175624 diff --git a/xtrans.changes b/xtrans.changes new file mode 100644 index 0000000..4f7f272 --- /dev/null +++ b/xtrans.changes @@ -0,0 +1,346 @@ +------------------------------------------------------------------- +Sun Oct 13 19:15:17 UTC 2024 - Stefan Dirsch + +- Update to 1.5.1 + * gitlab CI: add xz-utils to container for "make distcheck" + * gitlab CI: collect config.log to help diagnose failures + * gitlab CI: add libc-dev to required packages in build container + * LocalInitTransports: Fix -Wuseless-cast warning for getenv() call + * SocketCreateListener: Fix -Wuseless-cast warning in bind() call + * Clear numerous -Wsign-compare warnings from gcc 14.1 + * SocketINETConnect: return failure when malloc() fails + * ParseAddress: return failure when strdup() fails + * MakeAllCOTSServerListeners: Initialize temp_ciptrs + * GetMyNetworkId: Avoid writing to NULL pointer if malloc() fails + * GetPeerNetworkId: Avoid writing to NULL pointer if malloc() fails + * GetPeerNetworkId: avoid calling strlen() on a NULL pointer + * SocketOpen: avoid leak of out-of-range fd + * is_numeric: Add TRANS_SERVER to required ifdefs + * update .gitignore + * TRANS(ParseAddress): Fix "assignment discards ‘const’ qualifier" warnings + * TRANS(GetHostname): Fix "‘strncpy’ output truncated.." warning + * Fix string length check + +------------------------------------------------------------------- +Mon Feb 26 12:17:39 UTC 2024 - Dominique Leuenberger + +- Use %patch -P N instead of deprecated %patchN. + +------------------------------------------------------------------- +Sat Jun 10 10:39:31 UTC 2023 - Stefan Dirsch + +- Update to 1.5.0 +xtrans is a library of code that is shared among various X packages to handle +network protocol transport in a modular fashion, allowing a single place to +add new transport types - but it is *not* a shared library, more like a \ +"header-only" library. It is used by the X server, the XIM support in libX11, +libICE, the X font server, and related components. Because this is not a +shared library, the changes in this release will only take effect in consumers +that are rebuilt on a system with this release of xtrans installed. + +This release makes progress towards resolving CVE-2020-25697, reported in +https://www.openwall.com/lists/oss-security/2020/11/09/3 . Clients will no +longer attempt to connect to sockets in the abstract namespace, though +servers will still bind to them to prevent other programs binding to those +names to intercept connections from clients using libraries built with older +versions of libxtrans or libxcb while the servers are running. Clients can +also now specify a full Unix domain socket pathname to connect to, instead +of relying on built-in defaults under /tmp. (Note that libX11 1.4.0 and later +relies on libxcb for making connections instead of libxtrans, so X11 protocol +clients will get this support in an upcoming release of libxcb, and the changes +in xtrans will only affect clients of other protocols using libxtrans, such as +XIM, ICE, SM, and the font service protocols.) + +This release also removes support for System V UNIX platforms other than +Solaris and the illumos family - OS'es from SCO, AT&T's Unix Systems Group, +Novell, and NCR are no longer supported. + +------------------------------------------------------------------- +Wed Sep 30 08:49:47 UTC 2020 - Dominique Leuenberger + +- Add u_xtrans-noarch-pkgconfig.patch: Do not add + libdir=/usr(lib|lib64) entry to an arch-independent pkgconfig + file (installed to /usr/share) (boo#1109895). + +------------------------------------------------------------------- +Thu Aug 8 10:59:38 UTC 2019 - Dominique Leuenberger + +- Own %{_datadir}/aclocal: when we might switch to pkgconf instead + of pkg-config, nothing in the build root is 'accidentally' owning + this directory for us. + +------------------------------------------------------------------- +Fri Mar 22 13:38:03 UTC 2019 - Stefan Dirsch + +- n_unifdef-LBXPROXY_t-and-TEST_t.patch + * reverse apply in order to fix build of lbxproxy again ... + +------------------------------------------------------------------- +Fri Mar 22 11:11:11 UTC 2019 - Stefan Dirsch + +- Update to version 1.4.0 + * This release drops a bunch of dead code, including support + only used by lbxproxy and pre-1.4.0 versions of libX11, as + well as support for obsolete SysV x86 platforms. It also + provides some bug fixes & other maintenance work. + +------------------------------------------------------------------- +Tue May 30 09:43:50 UTC 2017 - sndirsch@suse.com + +- includes everything needed for missing sle issue entries: + fate #320388 (bsc#1041610) + +------------------------------------------------------------------- +Tue Sep 23 13:29:14 UTC 2014 - tobias.johannes.klausmann@mni.thm.de + +- Update to version 1.3.5: + Here's a release of Xtrans that includes a bunch of const fixes + and a new Listen function which the X server wants to allow + -nolisten tcp by default. + +------------------------------------------------------------------- +Fri Apr 25 00:34:39 UTC 2014 - tobias.johannes.klausmann@mni.thm.de + +- Remove superfluous Require + +------------------------------------------------------------------- +Mon Mar 31 20:51:52 UTC 2014 - tobias.johannes.klausmann@mni.thm.de + +- Update to version 1.3.4: + + configure: Also add -D_DEFAULT_SOURCE to .pc cflags to shut up glibc warnings + + Increase UNIX socket buffer size + + Cast ctype(3) function arguments to unsigned char. + + Add missing headers for free() and strlen(). + +------------------------------------------------------------------- +Mon Jan 27 14:32:27 UTC 2014 - tobias.johannes.klausmann@mni.thm.de + +- Update to version 1.3.3: + + xtrans.m4: replace obsolete AC_HELP_STRING + + xtrans.m4: replace deprecated AC_HAVE_LIBRARY with AC_CHECK_LIB + + xtrans.m4: remove AC_TYPE_SIGNAL and Imake SIGNALRETURNSINT + + Add TransIsListening() + + Remove unused static inlines + + Fix alignment issues in FD passing code + + Don't restrict FD passing to Linux & Solaris + + Define TRANS_RECEIVED flag for transports + + Enable systemd socket activation + +------------------------------------------------------------------- +Fri Nov 8 17:30:20 UTC 2013 - tobias.johannes.klausmann@mni.thm.de + +- Update to version 1.3.2: + Another round of fixes for the fd sending API's: improves portability, + fixes build failures on BSD & Solaris when building with the new API + disabled, and enables the new API for Solaris. + + Add stubs for send/recv fd functions in local transports + + Check if we need to define _XOPEN_SOURCE for struct msghdr.msg_control + + Allow XTRANS_SEND_FDS on Solaris as well + + Actually disable all of the FD passing code unless XTRANS_SEND_FDS is set + + Switch to CMSG_* macros for FD passing + +------------------------------------------------------------------- +Thu Nov 7 16:27:19 UTC 2013 - tobias.johannes.klausmann@mni.thm.de + +- Update to version 1.3.1: + Here's a new 1.3.1 release of libXtrans. The only interesting change + is that it now requires applications to specify that they want FD + passing support by defining XTRANS_SEND_FDS; the X server will do that + only on Linux. When non-Linux FD passing support is integrated, we can + change what the X server does. +- Add upstream patch to fix build: + + U_disable_all_of_the_FD_passing_code_unless_XTRANS_SEND_FDS_is_set.patch + +------------------------------------------------------------------- +Sun Nov 3 00:46:57 UTC 2013 - tobias.johannes.klausmann@mni.thm.de + +- Update to version 1.3.0: + + configure: Remove AM_MAINTAINER_MODE + + Remove unused TLI ("STREAMSCONN") code from xtrans + + Docs: convert function synopses to docbook funcsynopsis markup + + autogen.sh: Implement GNOME Build API + + Remove 'Readv' interface + + Add APIs to send file descriptors through the network + +------------------------------------------------------------------- +Fri Apr 5 07:58:19 UTC 2013 - idonmez@suse.com + +- Add Source URL, see https://en.opensuse.org/SourceUrls + +------------------------------------------------------------------- +Tue Sep 25 08:58:07 UTC 2012 - sndirsch@suse.com + +- specfile cleanup + +------------------------------------------------------------------- +Sun Apr 15 08:22:42 UTC 2012 - vuntz@opensuse.org + +- Rename source and binary package from xorg-x11-xtrans-devel to + xtrans. +- Add Provides/Obsoletes for xorg-x11-xtrans-devel to smooth + upgrades. +- Pass --docdir=%{_docdir}/xtrans to configure to install + xtrans.xml in the right doc directory, instead of + /usr/share/doc/xtrans/). + +------------------------------------------------------------------- +Wed Apr 11 18:21:01 UTC 2012 - vuntz@opensuse.org + +- Update to xtrans 1.2.7: + + Lot of cleanups, both from manual inspection and from automated + static code analysis + + Bug fixes, including: + - fix some resource & memory leaks + - avoid buffer overrun in SocketReopen + + Remove decnet leftover + + Remove SUN specific code, let solaris create .X11-pipe with + sticky bit on + + Documentation & build configuration improvments +- Include version of xtrans in the version of the package. For + instance, this will now be 7.6_1.2.7. +- Add pkgconfig(xorg-macros) BuildRequires. + +------------------------------------------------------------------- +Thu Mar 22 00:00:04 UTC 2012 - jengelh@medozas.de + +- Parallel build with %_smp_mflags; strip redundant sections/tags + +------------------------------------------------------------------- +Wed Jan 11 11:35:24 UTC 2012 - sndirsch@suse.com + +- fixed build on factory +- package build errors fixed + +------------------------------------------------------------------- +Tue Dec 21 02:52:02 UTC 2010 - sndirsch@novell.com + +- bumped version number to 7.6 + +------------------------------------------------------------------- +Tue Nov 9 06:10:24 UTC 2010 - sndirsch@novell.com + +- xtrans 1.2.6 + * This minor release converts the libxtrans API documentation + from troff to DocBook/XML and updates it for the current state + of the code. + It also includes some minor bug fixes, and of course, the usual + recent collection of build configuration improvements and + janitorial cleanups. + +------------------------------------------------------------------- +Sun Apr 4 16:05:52 CEST 2010 - sndirsch@suse.de + +- xtrans 1.2.5 +- adjusted p_xauth.diff +- bumped version number to 7.5 + +------------------------------------------------------------------- +Mon Dec 14 16:59:45 CET 2009 - jengelh@medozas.de + +- enable parallel building + +------------------------------------------------------------------- +Sat Aug 1 10:34:34 CEST 2009 - sndirsch@suse.de + +- xtrans 1.2.4 + * various fixes +- obsoletes xtrans-sig11.diff + +------------------------------------------------------------------- +Thu Feb 26 03:00:17 CET 2009 - sndirsch@suse.de + +- xtrans 1.2.3 + +------------------------------------------------------------------- +Sat Oct 25 11:28:30 CEST 2008 - sndirsch@suse.de + +- xtrans-sig11.diff + * Before accessing the string it needs to be checked if the + string isn't NULL. (Egbert Eich, bnc #419576) + +------------------------------------------------------------------- +Thu Sep 11 14:23:02 CEST 2008 - sndirsch@suse.de + +- bumped release number to 7.4 + +------------------------------------------------------------------- +Fri Jul 4 05:06:31 CEST 2008 - sndirsch@suse.de + +- xtrans 1.2.1 + * Connection failure for abstract socket is ECONNREFUSED, not + ENOENT. + * LocalClose() takes a ConnInfoPtr, not an fd + * Clear some pointer type mismatch warnings + * Ignore mkdir() errors when creating the abstract socket. + * Remove extraneous execute bit from .c file + * Launchd: This functionality has been moved into xorg-server + +------------------------------------------------------------------- +Thu May 8 21:08:30 CEST 2008 - sndirsch@suse.de + +- xtrans 1.2 + * Among other things, this release fixes the linux abstract + socket support which was broken in 1.1 (fdo bug#15677). Also + various bug fixes and win32 updates. + +------------------------------------------------------------------- +Thu Mar 6 07:59:54 CET 2008 - sndirsch@suse.de + +- xtrans 1.1 + +------------------------------------------------------------------- +Sat Sep 29 12:24:36 CEST 2007 - sndirsch@suse.de + +- bumped version to 7.3 + +------------------------------------------------------------------- +Fri Aug 24 15:38:22 CEST 2007 - sndirsch@suse.de + +- xtrans 1.0.4: + * Fix typo in Xtranslcl.c (sprintf with size argument should be + snprintf) + +------------------------------------------------------------------- +Mon Dec 18 11:05:09 CET 2006 - sndirsch@suse.de + +- updated to release 1.0.3 + * Makefile.am: make ChangeLog hook safer + +------------------------------------------------------------------- +Sat Oct 14 06:34:18 CEST 2006 - sndirsch@suse.de + +- updated to X.Org 7.2RC1 + +------------------------------------------------------------------- +Thu Aug 17 11:00:50 CEST 2006 - sndirsch@suse.de + +- removed xorg-x11-xproto-devel from BuildRequires to improve + autobuild deps + +------------------------------------------------------------------- +Sat Aug 5 22:50:32 CEST 2006 - sndirsch@suse.de + +- p_xauth.diff: + * Let X authorization be tolerant to hostname changes (Bug #98627) + +------------------------------------------------------------------- +Wed Aug 2 15:22:38 CEST 2006 - ro@suse.de + +- fix setup line + +------------------------------------------------------------------- +Fri Jul 28 14:45:37 CEST 2006 - sndirsch@suse.de + +- use "-fno-strict-aliasing" + +------------------------------------------------------------------- +Thu Jul 27 11:50:04 CEST 2006 - sndirsch@suse.de + +- use $RPM_OPT_FLAGS +- remove existing /usr/include/X11 symlink in %pre + +------------------------------------------------------------------- +Thu Jun 22 11:02:00 CEST 2006 - sndirsch@suse.de + +- created package + diff --git a/xtrans.spec b/xtrans.spec new file mode 100644 index 0000000..a822d85 --- /dev/null +++ b/xtrans.spec @@ -0,0 +1,72 @@ +# +# spec file for package xtrans +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: xtrans +Version: 1.5.1 +Release: 0 +Summary: Library to handle network protocol transport in X +License: MIT +Group: Development/Libraries/X11 +URL: https://xorg.freedesktop.org/ +Source: http://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.xz +Patch0: p_xauth.diff +Patch1: n_unifdef-LBXPROXY_t-and-TEST_t.patch +Patch2: u_xtrans-noarch-pkgconfig.patch +BuildRequires: pkgconfig +BuildRequires: pkgconfig(xorg-macros) >= 1.12 +BuildRequires: pkgconfig(xshmfence) +# Package was named xorg-x11-xtrans-devel until 12.2 +# We use 7.7 for Provides/Obsoletes, since we're renaming the packages when +# X11R7.7 is in RC1, and xorg-x11-xtrans-devel was version 7.6 +Provides: xorg-x11-xtrans-devel = 7.7 +Obsoletes: xorg-x11-xtrans-devel < 7.7 +BuildArch: noarch + +%description +xtrans is a library of code that is shared among various X packages to +handle network protocol transport in a modular fashion, allowing a +single place to add new transport types. It is used by the X server, +libX11, libICE, the X font server, and related components. + +%prep +%setup -q +%patch -P 0 +%patch -P 1 -p1 -R +%patch -P 2 -p1 + +%build +%configure --docdir=%{_docdir}/xtrans +make %{?_smp_mflags} + +%install +%make_install + +%pre +test -L usr/include/X11 && rm usr/include/X11 +exit 0 + +%files +%license COPYING +%doc AUTHORS ChangeLog README.md +%doc doc/xtrans.xml +%{_includedir}/X11/Xtrans/ +%dir %{_datadir}/aclocal +%{_datadir}/aclocal/xtrans.m4 +%{_datadir}/pkgconfig/xtrans.pc + +%changelog