commit:     c1cb8a79531c039b3601b4ae428e4888ad724a60
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 10 15:25:47 2025 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Mar 10 16:18:08 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1cb8a79

x11-apps/xinit: Version bump to 1.4.4

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 x11-apps/xinit/Manifest                            |  1 +
 .../files/xinit-1.4.4-gentoo-customizations.patch  | 59 ++++++++++++++++++
 .../xinit-1.4.4-move-serverauthfile-into-tmp.patch | 22 +++++++
 .../files/xinit-1.4.4-startx-current-vt.patch      | 33 ++++++++++
 x11-apps/xinit/xinit-1.4.4.ebuild                  | 71 ++++++++++++++++++++++
 5 files changed, 186 insertions(+)

diff --git a/x11-apps/xinit/Manifest b/x11-apps/xinit/Manifest
index 2f4aa3ce6a07..d71da15774e8 100644
--- a/x11-apps/xinit/Manifest
+++ b/x11-apps/xinit/Manifest
@@ -1,2 +1,3 @@
 DIST xinit-1.4.2.tar.xz 156728 BLAKE2B 
8f5c16d5ec9cc16c734b1661def4f7e68321259f24e7aac2b039b8e142fb4a324d2471a0f04d3b4448ae713082ad9ec7018083b00ed1a93aac90fa7db172247d
 SHA512 
4b62c2edd97b40133577cbba88b3f31b36c5634b4eb667ef0c302e8358dc1c55a255abe42aaadc910d8aa9ea0e3add157a12a301382f1cdbe091df4e1215fae0
 DIST xinit-1.4.3.tar.xz 158348 BLAKE2B 
321400aa6572a7309ece961c1f053382825de5c12a235eb7f4345d5da4f95a199a9e1987e21baa5c3a472d2638e8c18a1610e4f0d617f3205f58cd66415efb6a
 SHA512 
ff754567d2224d1ff5023b302cae3a435950a6f24a773e214ea108b96d18b722d4cc86d0e25a7d92edea1307e3037248b4da004c1b392f73ba7bc1e04a94b77b
+DIST xinit-1.4.4.tar.xz 162496 BLAKE2B 
54da6f5d31658a228987d4e3a17636bb5f3a36bc7067dfc8bcbe35c2944831e320edd7a92b172a55b2db41d6d757b22cfa2b712beb9d17c8f39d539a4294ba23
 SHA512 
387285c952bbe074d2ed2dbbf745d1634763bb71f7f7edb22b3306b9e96ae4e28e59ecd6c48cc646b12dbdbcc68d42036bd127da75ef3c16fabdae87794ad6d1

diff --git a/x11-apps/xinit/files/xinit-1.4.4-gentoo-customizations.patch 
b/x11-apps/xinit/files/xinit-1.4.4-gentoo-customizations.patch
new file mode 100644
index 000000000000..2cdc251dec1a
--- /dev/null
+++ b/x11-apps/xinit/files/xinit-1.4.4-gentoo-customizations.patch
@@ -0,0 +1,59 @@
+From b9f484825ccb8902e0fe121ae8abafb51c81677d Mon Sep 17 00:00:00 2001
+From: Tomas Chvatal <[email protected]>
+Date: Mon, 1 Nov 2010 16:46:36 +0100
+Subject: [PATCH app/xinit 1/2] Gentoo customizations.
+
+Signed-off-by: Tomas Chvatal <[email protected]>
+---
+ xinitrc.in | 26 ++++++++++++++++++--------
+ 1 file changed, 18 insertions(+), 8 deletions(-)
+
+diff --git ./xinitrc.in ./xinitrc.in
+index 9d9a78c..7391180
+--- ./xinitrc.in
++++ ./xinitrc.in
+@@ -11,8 +11,8 @@ xmodmap="@XMODMAP@"
+ 
+ userresources="$HOME/.Xresources"
+ usermodmap="$HOME/.Xmodmap"
+-sysresources="$xinitdir/.Xresources"
+-sysmodmap="$xinitdir/.Xmodmap"
++sysresources="$xinitdir/Xresources"
++sysmodmap="$xinitdir/Xmodmap"
+ 
+ # merge in defaults and keymaps
+ 
+@@ -42,15 +42,25 @@ fi
+ 
+ # start some nice programs
+ 
++if [ -n "`/etc/X11/chooser.sh`" ]; then
++      command="`/etc/X11/chooser.sh`"
++else
++      failsafe="yes"
++fi
++
+ if [ -d "$xinitdir"/xinitrc.d ] ; then
+-      for f in "$xinitdir/xinitrc.d"/?*.sh ; do
++      for f in "$xinitdir/xinitrc.d"/?* ; do
+               [ -x "$f" ] && . "$f"
+       done
+       unset f
+ fi
+ 
+-"$twm" &
+-"$xclock" -geometry 50x50-1+1 &
+-"$xterm" -geometry 80x50+494+51 &
+-"$xterm" -geometry 80x20+494-0 &
+-exec "$xterm" -geometry 80x66+0+0 -name login
++if [ -n "$failsafe" ]; then
++      "$twm" &
++      "$xclock" -geometry 50x50-1+1 &
++      "$xterm" -geometry 80x50+494+51 &
++      "$xterm" -geometry 80x20+494-0 &
++      exec "$xterm" -geometry 80x66+0+0 -name login
++else
++      exec $command
++fi
+-- 
+2.48.1

diff --git 
a/x11-apps/xinit/files/xinit-1.4.4-move-serverauthfile-into-tmp.patch 
b/x11-apps/xinit/files/xinit-1.4.4-move-serverauthfile-into-tmp.patch
new file mode 100644
index 000000000000..3d2f4e244cc3
--- /dev/null
+++ b/x11-apps/xinit/files/xinit-1.4.4-move-serverauthfile-into-tmp.patch
@@ -0,0 +1,22 @@
+Move startx auth files in /tmp so they are removed on reboot.
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=357736
+The trap patch didn't seem to work on reboot.
+---
+ startx.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git ./startx.in ./startx.in
+index 8247156..134b704 100644
+--- ./startx.in
++++ ./startx.in
+@@ -272,7 +272,7 @@ if [ "$enable_xauth" = 1 ] ; then
+     dummy=0
+ 
+     # create a file with auth information for the server. ':0' is a dummy.
+-    xserverauthfile="$HOME/.serverauth.$$"
++    xserverauthfile="`mktemp --tmpdir serverauth.XXXXXXXXXX`"
+     trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP BUS TERM
+     xauth -q -f "$xserverauthfile" << EOF
+ add :$dummy . $mcookie
+-- 
+2.48.1

diff --git a/x11-apps/xinit/files/xinit-1.4.4-startx-current-vt.patch 
b/x11-apps/xinit/files/xinit-1.4.4-startx-current-vt.patch
new file mode 100644
index 000000000000..d1b410f21f7b
--- /dev/null
+++ b/x11-apps/xinit/files/xinit-1.4.4-startx-current-vt.patch
@@ -0,0 +1,33 @@
+From 8c1c8a7e9d2a149461b60b8c6d16c04d6f4aadd9 Mon Sep 17 00:00:00 2001
+From: Matt Turner <[email protected]>
+Date: Sat, 3 Dec 2022 18:21:50 -0500
+Subject: [PATCH app/xinit 2/2] files/xinit-1.4.0-startx-current-vt.patch
+
+---
+ startx.in | 11 -----------
+ 1 file changed, 11 deletions(-)
+
+diff --git ./startx.in ./startx.in
+index 9b224af..8247156 100644
+--- ./startx.in
++++ ./startx.in
+@@ -213,17 +213,6 @@ fi
+ if [ "$server" = "" ]; then
+     server="$defaultserver"
+ 
+-if [ "$(uname -s)" = "Linux" ] ; then
+-    # When starting the defaultserver start X on the current tty to avoid
+-    # the startx session being seen as inactive:
+-    # "https://bugzilla.redhat.com/show_bug.cgi?id=806491";
+-    tty=$(tty)
+-    if expr "$tty" : '/dev/tty[0-9][0-9]*$' > /dev/null; then
+-        tty_num="${tty#/dev/tty}"
+-        vtarg="vt$tty_num -keeptty"
+-    fi
+-fi
+-
+     # For compatibility reasons, only use xserverrc if there were no server 
command line arguments
+     if [ "$serverargs" = "" ] && [ "$display" = "" ]; then
+       if [ -f "$userserverrc" ]; then
+-- 
+2.48.1

diff --git a/x11-apps/xinit/xinit-1.4.4.ebuild 
b/x11-apps/xinit/xinit-1.4.4.ebuild
new file mode 100644
index 000000000000..f2052237e29e
--- /dev/null
+++ b/x11-apps/xinit/xinit-1.4.4.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit eapi9-ver xorg-3
+
+DESCRIPTION="X Window System initializer"
+
+LICENSE="${LICENSE} GPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~arm-linux ~x86-linux"
+IUSE="twm"
+
+RDEPEND="
+       x11-apps/xauth
+       x11-libs/libX11
+"
+DEPEND="${RDEPEND}"
+PDEPEND="x11-apps/xrdb
+       twm? (
+               x11-apps/xclock
+               x11-apps/xsm
+               x11-terms/xterm
+               x11-wm/twm
+       )
+"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-1.4.4-gentoo-customizations.patch"
+       "${FILESDIR}/${PN}-1.4.4-startx-current-vt.patch"
+       "${FILESDIR}/${PN}-1.4.4-move-serverauthfile-into-tmp.patch"
+)
+
+XORG_CONFIGURE_OPTIONS=(
+       --with-xinitdir="${EPREFIX}"/etc/X11/xinit
+)
+
+src_install() {
+       xorg-3_src_install
+
+       exeinto /etc/X11
+       doexe "${FILESDIR}"/chooser.sh
+       exeinto /etc/X11/Sessions
+       doexe "${FILESDIR}"/Xsession
+       exeinto /etc/X11/xinit
+       newexe "${FILESDIR}"/xserverrc.2 xserverrc
+       exeinto /etc/X11/xinit/xinitrc.d/
+       doexe "${FILESDIR}"/00-xhost
+
+       insinto /usr/share/xsessions
+       doins "${FILESDIR}"/Xsession.desktop
+}
+
+pkg_postinst() {
+       if [[ -z "${REPLACING_VERSIONS}" ]]; then
+               ewarn "If you use startx to start X instead of a login manager 
like gdm/kdm,"
+               ewarn "you can set the XSESSION variable to anything in 
/etc/X11/Sessions/ or"
+               ewarn "any executable. When you run startx, it will run this as 
the login session."
+               ewarn "You can set this in a file in /etc/env.d/ for the entire 
system,"
+               ewarn "or set it per-user in ~/.bash_profile (or similar for 
other shells)."
+               ewarn "Here's an example of setting it for the whole system:"
+               ewarn "    echo XSESSION=\"Gnome\" > /etc/env.d/90xsession"
+               ewarn "    env-update && source /etc/profile"
+       elif ver_replacing "-lt" "1.4.1"; then
+               ewarn "Starting with ${CATEGORY}/${PN}-1.4.1 serverauth files 
are no longer kept in the"
+               ewarn "home directory but rather are created in \$TMPDIR 
(typically /tmp).  The change"
+               ewarn "is transparent for most of users, however those that use 
runtime temporary"
+               ewarn "directories cleaning tools, like app-admin/tmpreaper, 
may need to adjust them"
+               ewarn "not to remove the 'serverauth.*' files."
+       fi
+}

Reply via email to