From c138c77f5915f5efed917fa9d95c5c6c35a6eeea Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Thu, 3 Aug 2023 12:49:00 +0200 Subject: tried xauth/xhost, dont work (too new?) --- README | 7 ++++- configs/versions | 2 ++ patches/xauth-ipv6.patch | 50 +++++++++++++++++++++++++++++ patches/xhost-ipv6.patch | 82 ++++++++++++++++++++++++++++++++++++++++++++++++ scripts/build.sh | 32 +++++++++++++++++++ scripts/download.sh | 10 ++++++ 6 files changed, 182 insertions(+), 1 deletion(-) create mode 100644 patches/xauth-ipv6.patch create mode 100644 patches/xhost-ipv6.patch diff --git a/README b/README index 9fe9a5d..f58a386 100644 --- a/README +++ b/README @@ -507,7 +507,12 @@ Call Trace: - also real hardware (Unisys): no graphic VESA, only text-VESA modes, missing => cirrus framebuffer drivers at boot time (cannot be a module)? - +- ${BASE} and @@BASE@@ with sed are both used to pass the build pathes to + builds in patches. ${BASE} sounds like it is working more by accident.. +- 'cd DIR' used everywhere without 'cd DIR || exit 1' +- can we do a crunch binary for X apps, they get 400k when linked statically + with X libraries1 + tools ----- diff --git a/configs/versions b/configs/versions index 7485a85..85aaa81 100644 --- a/configs/versions +++ b/configs/versions @@ -26,6 +26,8 @@ BDFTOPCF_VERSION="1.1" FONT_CURSOR_MISC_VERSION="1.0.4" FONT_MISC_MISC_VERSION="1.1.3" RXVT_VERSION="2.6.4" +XHOST_VERSION="1.0.9" +XAUTH_VERSION="1.1.2" LUA_VERSION="5.1.5" NOTION_VERSION="435631f" WORDGRINDER_VERSION="0.8" diff --git a/patches/xauth-ipv6.patch b/patches/xauth-ipv6.patch new file mode 100644 index 0000000..7488c53 --- /dev/null +++ b/patches/xauth-ipv6.patch @@ -0,0 +1,50 @@ +diff -rauN xauth/gethost.c xauth-ipv6-patch/gethost.c +--- xauth/gethost.c 2022-04-20 04:04:52.000000000 +0200 ++++ xauth-ipv6-patch/gethost.c 2023-08-03 12:08:37.729435452 +0200 +@@ -64,6 +64,8 @@ + #include + #endif + ++#undef IPv6 ++ + const char * + get_hostname (Xauth *auth) + { +diff -rauN xauth/parsedpy.c xauth-ipv6-patch/parsedpy.c +--- xauth/parsedpy.c 2022-04-20 04:04:52.000000000 +0200 ++++ xauth-ipv6-patch/parsedpy.c 2023-08-03 12:11:14.119664828 +0200 +@@ -45,6 +45,8 @@ + #include + #include + ++#undef IPv6 ++ + #if defined(UNIXCONN) || defined(LOCALCONN) + #define UNIX_CONNECTION "unix" + #define UNIX_CONNECTION_LENGTH 4 +@@ -141,11 +143,13 @@ + family = FamilyInternet; + } + #endif ++#if defined(IPv6) && defined(AF_INET6) + } else if (!dnet && (*displayname == '[') && (*(ptr - 1) == ']')) { + /* Allow RFC2732-like []:display syntax */ + family = FamilyInternet6; + host = copystring (displayname + 1, len - 2); + } else { ++#endif + host = copystring (displayname, len); + if (dnet) { + family = dnet; +diff -rauN xauth/process.c xauth-ipv6-patch/process.c +--- xauth/process.c 2022-04-20 04:04:52.000000000 +0200 ++++ xauth-ipv6-patch/process.c 2023-08-03 12:11:46.849712832 +0200 +@@ -51,6 +51,8 @@ + #include + #include + ++#undef IPv6 ++ + #ifndef DEFAULT_PROTOCOL_ABBREV /* to make add command easier */ + #define DEFAULT_PROTOCOL_ABBREV "." + #endif diff --git a/patches/xhost-ipv6.patch b/patches/xhost-ipv6.patch new file mode 100644 index 0000000..67ec92a --- /dev/null +++ b/patches/xhost-ipv6.patch @@ -0,0 +1,82 @@ +diff -rauN xhost/xhost.c xhost-ipv6-patch/xhost.c +--- xhost/xhost.c 2022-12-13 00:44:28.000000000 +0100 ++++ xhost-ipv6-patch/xhost.c 2023-08-03 12:17:50.820246665 +0200 +@@ -119,6 +119,9 @@ + #endif + #endif + ++#undef IPv6 ++#define _X_UNUSED ++ + #ifdef USE_GETTEXT + # include /* setlocale() */ + # include /* gettext(), textdomain(), etc. */ +@@ -232,9 +235,11 @@ + case FamilyInternet: + printf("INET:"); + break; ++#if defined(IPv6) && defined(AF_INET6) + case FamilyInternet6: + printf("INET6:"); + break; ++#endif + case FamilyDECnet: + printf("DNET:"); + break; +@@ -247,9 +252,11 @@ + case FamilyLocalHost: + printf("LOCAL:"); + break; ++#if 0 + case FamilyServerInterpreted: + printf("SI:"); + break; ++#endif + default: + printf(gettext(":"), list[i].family); + break; +@@ -411,10 +418,12 @@ + else if (!strncmp("local:", lname, 6)) { + family = FamilyLocalHost; + } ++#if 0 + else if (!strncmp("si:", lname, 3)) { + family = FamilyServerInterpreted; + name += 3; + } ++#endif + if (family == FamilyWild && (cp = strchr(lname, ':'))) { + #ifdef IPv6 + /* +@@ -434,6 +443,7 @@ + } + free(lname); + ++#if 0 + if (family == FamilyServerInterpreted) { + XServerInterpretedAddress siaddr; + int rc; +@@ -461,6 +471,7 @@ + return 0; + return 1; + } ++#endif + + #ifdef K5AUTH + if (family == FamilyKrb5Principal) { +@@ -826,6 +837,7 @@ + if (ha->family == FamilyLocalHost) { + return ""; + } ++#if 0 + if (ha->family == FamilyServerInterpreted) { + XServerInterpretedAddress *sip; + static char *addressString; +@@ -854,6 +866,7 @@ + } + return addressString; + } ++#endif + return (NULL); + } + diff --git a/scripts/build.sh b/scripts/build.sh index 9d073ea..9718b5b 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -505,6 +505,38 @@ else echo "stage1 rxvt exists" fi +if [ ! -f "${BASE}/build/stage1/bin/xauth" ]; then + rm -rf "xauth-${XAUTH_VERSION}" + tar xf "${BASE}/downloads/xauth-${XAUTH_VERSION}.tar.gz" + cd "xauth-${XAUTH_VERSION}" + patch -Np1 < "${BASE}/patches/xauth-ipv6.patch" + CC="${BASE}/build/stage1/bin/i386-tcc" \ + ./configure --enable-static --prefix="${BASE}/build/stage1" \ + --x-includes="${BASE}/build/stage1/include" \ + --x-libraries="${BASE}/build/stage1/lib" + make -j$CPUS LDFLAGS="-static" + make -j$CPUS install + cd .. +else + echo "stage1 xauth exists" +fi + +if [ ! -f "${BASE}/build/stage1/bin/xhost" ]; then + rm -rf "xhost-${XHOST_VERSION}" + tar xf "${BASE}/downloads/xhost-${XHOST_VERSION}.tar.gz" + cd "xhost-${XHOST_VERSION}" + patch -Np1 < "${BASE}/patches/xhost-ipv6.patch" + CC="${BASE}/build/stage1/bin/i386-tcc" \ + ./configure --enable-static --prefix="${BASE}/build/stage1" \ + --x-includes="${BASE}/build/stage1/include" \ + --x-libraries="${BASE}/build/stage1/lib" + make -j$CPUS LDFLAGS="-static" + make -j$CPUS install + cd .. +else + echo "stage1 xhost exists" +fi + if [ ! -f "${BASE}/build/stage1/bin/lua" ]; then rm -rf "lua-${LUA_VERSION}" tar xf "${BASE}/downloads/lua-${LUA_VERSION}.tar.gz" diff --git a/scripts/download.sh b/scripts/download.sh index be7a057..b791872 100755 --- a/scripts/download.sh +++ b/scripts/download.sh @@ -148,6 +148,16 @@ if [ ! -f "${BASE}/downloads/rxvt-${RXVT_VERSION}.tar.gz" ]; then "https://sourceforge.net/projects/rxvt/files/rxvt/${RXVT_VERSION}/rxvt-${RXVT_VERSION}.tar.gz/download" fi +if [ ! -f "${BASE}/downloads/xhost-${XHOST_VERSION}.tar.gz" ]; then + wget -O "${BASE}/downloads/xhost-${XHOST_VERSION}.tar.gz" \ + "https://www.x.org/archive//individual/app/xhost-${XHOST_VERSION}.tar.xz" +fi + +if [ ! -f "${BASE}/downloads/xauth-${XAUTH_VERSION}.tar.gz" ]; then + wget -O "${BASE}/downloads/xauth-${XAUTH_VERSION}.tar.gz" \ + "https://www.x.org/archive//individual/app/xauth-${XAUTH_VERSION}.tar.xz" +fi + if [ ! -f "${BASE}/downloads/bdftopcf-${BDFTOPCF_VERSION}.tar.gz" ]; then wget -O "${BASE}/downloads/bdftopcf-${BDFTOPCF_VERSION}.tar.gz" \ "https://www.x.org/archive/individual/app/bdftopcf-${BDFTOPCF_VERSION}.tar.gz" -- cgit v1.2.3-54-g00ecf