public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Matt Turner <mattst88@gentoo.org>
To: gentoo-dev@lists.gentoo.org, gentoo-catalyst@lists.gentoo.org
Cc: Matt Turner <mattst88@gentoo.org>
Subject: [gentoo-dev] [PATCH 5/5] catalyst: Drop livecd/{xinitrc,xsession,xdm}
Date: Mon, 14 Nov 2022 21:51:57 -0500	[thread overview]
Message-ID: <20221115025157.1703859-5-mattst88@gentoo.org> (raw)
In-Reply-To: <20221115025157.1703859-1-mattst88@gentoo.org>

This is functionality better implemented in fsscripts outside of
catalyst.

Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
 catalyst/targets/livecd_stage2.py    |  3 --
 doc/catalyst-spec.5.txt              | 20 ---------
 examples/livecd-stage2_template.spec | 24 -----------
 examples/stage4_template.spec        | 10 -----
 livecd/files/livecd.motd.txt         |  3 --
 targets/livecd-stage2/controller.sh  |  9 ----
 targets/stage4/controller.sh         |  8 ----
 targets/support/livecdfs-update.sh   | 63 +---------------------------
 8 files changed, 1 insertion(+), 139 deletions(-)

diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index 832e0998..1a798a1e 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -39,9 +39,6 @@ class livecd_stage2(StageBase):
         "livecd/users",
         "livecd/verify",
         "livecd/volid",
-        "livecd/xdm",
-        "livecd/xinitrc",
-        "livecd/xsession",
         "repos",
     ])
 
diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt
index f6251597..1abf9efb 100644
--- a/doc/catalyst-spec.5.txt
+++ b/doc/catalyst-spec.5.txt
@@ -395,26 +395,6 @@ This is typically used for adding the documentation, distfiles,
 snapshots, and stages to the official media.  These files will not be
 available if `docache` is enabled, as they are outside the loop.
 
-*<target>/xinitrc*::
-This is used by catalyst to copy the specified file to
-`/etc/X11/xinit/xinitrc` and is used by the *<target>/type*
-`generic-livecd`.  While the file will still be copied for any
-*<target>/type*, catalyst will only create the necessary `/etc/startx`
-for those types, so X will not be automatically started.  This is
-useful also for setting up X on a CD where you do not wish X to start
-automatically.  We do not use this on the release media.  This setting
-is supported by the `stage4` and `livecd` targets.
-
-*livecd/xdm*::
-This is used by catalyst to determine which display manager you wish
-to become the default (example: `gdm`).  This is used on the official
-Gentoo LiveCD and is valid for any `livecd/type`.
-
-*livecd/xsession*::
-This is used by catalyst to determine which X session should be
-started by default by the display manager (example: `gnome`).  This is
-used on the official Gentoo LiveCD and is valid for any livecd/type.
-
 *<target>/users*::
 This option is used to create non-root users on your target.  It takes
 a space separated list of user names.  These users will be added to
diff --git a/examples/livecd-stage2_template.spec b/examples/livecd-stage2_template.spec
index 8e179b73..efbc6d82 100644
--- a/examples/livecd-stage2_template.spec
+++ b/examples/livecd-stage2_template.spec
@@ -202,30 +202,6 @@ livecd/overlay:
 # livecd/root_overlay:
 livecd/root_overlay:
 
-# This is used by catalyst to copy the specified file to /etc/X11/xinit/xinitrc
-# and is used by the livecd/type and generic-livecd.  While the file will still
-# be copied for any livecd/type, catalyst will only create the necessary
-# /etc/startx for those types, so X will not be automatically started.  This is
-# useful also for setting up X on a CD where you do not wish X to start
-# automatically.  We do not use this on the release media, so it is left blank.
-# example:
-# livecd/xinitrc:
-livecd/xinitrc:
-
-# This is used by catalyst to determine which display manager you wish to
-# become the default.  This is used on the official Gentoo LiveCD and is valid
-# for any livecd/type.
-# example:
-# livecd/xdm: gdm
-livecd/xdm:
-
-# This is used by catalyst to determine which X session should be started by
-# default by the display manager.  This is used on the official Gentoo LiveCD
-# and is valid for any livecd/type.
-# example:
-# livecd/xsession: gnome
-livecd/xsession:
-
 # This option is used to create non-root users on your CD.  It takes a space
 # separated list of user names.  These users will be added to the following
 # groups: users,wheel,audio,games,cdrom,usb
diff --git a/examples/stage4_template.spec b/examples/stage4_template.spec
index 5d9a390c..a7a3e766 100644
--- a/examples/stage4_template.spec
+++ b/examples/stage4_template.spec
@@ -161,16 +161,6 @@ stage4/rcdel:
 # stage4/root_overlay:
 stage4/root_overlay:
 
-# This is used by catalyst to copy the specified file to /etc/X11/xinit/xinitrc
-# and is used by the stage4/type generic-livecd.  While the file will still be
-# copied for any stage4/type, catalyst will only create the necessary
-# /etc/startx for those types, so X will not be automatically started.  This is
-# useful also for setting up X on a CD where you do not wish X to start
-# automatically.  We do not use this on the release media, so it is left blank.
-# example:
-# stage4/xinitrc:
-stage4/xinitrc:
-
 # This option is used to create groups. It takes a carriage-return separated
 # list of group names. For instance:
 # stage4/groups:
diff --git a/livecd/files/livecd.motd.txt b/livecd/files/livecd.motd.txt
index 9f8e2396..a37f53cb 100644
--- a/livecd/files/livecd.motd.txt
+++ b/livecd/files/livecd.motd.txt
@@ -1,6 +1,3 @@
-To (re)start X Windows, please type "##DISPLAY_MANAGER" at the prompt below.
-There is also a rescue session for X using twm if you simply use "startx".
-
 Please report any bugs you find to https://bugs.gentoo.org. Be sure to include
 detailed information about how to reproduce the bug you are reporting.
 
diff --git a/targets/livecd-stage2/controller.sh b/targets/livecd-stage2/controller.sh
index 826dc9dc..2b8858c0 100755
--- a/targets/livecd-stage2/controller.sh
+++ b/targets/livecd-stage2/controller.sh
@@ -52,15 +52,6 @@ case $1 in
 	livecd-update)
 		# Now, finalize and tweak the livecd fs (inside of the chroot)
 		exec_in_chroot ${clst_shdir}/support/livecdfs-update.sh
-
-		# Move over the xinitrc (if applicable)
-		# This is moved here, so we can override any default xinitrc
-		if [ -n "${clst_livecd_xinitrc}" ]
-		then
-			mkdir -p ${clst_chroot_path}/etc/X11/xinit
-			cp -f ${clst_livecd_xinitrc} \
-				${clst_chroot_path}/etc/X11/xinit/xinitrc
-		fi
 		;;
 
 	rc-update)
diff --git a/targets/stage4/controller.sh b/targets/stage4/controller.sh
index 0c40145e..9c1866e4 100755
--- a/targets/stage4/controller.sh
+++ b/targets/stage4/controller.sh
@@ -42,14 +42,6 @@ case $1 in
 	livecd-update)
 		# Now, finalize and tweak the livecd fs (inside of the chroot)
 		exec_in_chroot ${clst_shdir}/support/livecdfs-update.sh
-
-		# Move over the xinitrc (if applicable)
-		# This is moved here, so we can override any default xinitrc
-		if [ -n "${clst_livecd_xinitrc}" ]
-		then
-			cp -f ${clst_livecd_xinitrc} \
-				${clst_chroot_path}/etc/X11/xinit/xinitrc
-		fi
 	;;
 
 	bootloader)
diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index 64a9e4b2..e750e785 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -51,12 +51,6 @@ then
 		useradd -G users,wheel,audio,plugdev,games,cdrom,disk,floppy,usb \
 			-g 100 -c "${user_comment}" -m ${x}
 		chown -R ${x}:users /home/${x}
-		if [ -n "${clst_livecd_xdm}" -a -n "${clst_livecd_xsession}" ]
-		then
-			echo "[Desktop]" > /home/${x}/.dmrc
-			echo "Session=${clst_livecd_xsession}" >> /home/${x}/.dmrc
-			chown -R ${x}:users /home/${x}
-		fi
 	done
 fi
 
@@ -131,23 +125,6 @@ then
 		http://www.linux-usb.org/usb.ids
 fi
 
-# Setup configured display manager
-if [ -n "${clst_livecd_xdm}" ]
-then
-	sed -i \
-		-e "s:^#\\?DISPLAYMANAGER=.\+$:DISPLAYMANAGER=\"${clst_livecd_xdm}\":" \
-		/etc/rc.conf
-	sed -i \
-		-e "s:^#\\?DISPLAYMANAGER=.\+$:DISPLAYMANAGER=\"${clst_livecd_xdm}\":" \
-		/etc/conf.d/xdm
-fi
-
-# Setup configured default X Session
-if [ -n "${clst_livecd_xsession}" ]
-then
-	echo "XSESSION=\"${clst_livecd_xsession}\"" > /etc/env.d/90xsession
-fi
-
 # touch /etc/asound.state
 touch /etc/asound.state
 
@@ -165,8 +142,7 @@ case ${clst_livecd_type} in
 	gentoo-release-live*)
 		cat /etc/generic.motd.txt \
 			/etc/minimal.motd.txt /etc/livecd.motd.txt > /etc/motd
-		sed -i -e 's:^##GREETING:Welcome to the Gentoo Linux LiveCD!:' \
-			-e "s:##DISPLAY_MANAGER:${clst_livecd_xdm}:" /etc/motd
+		sed -i -e 's:^##GREETING:Welcome to the Gentoo Linux LiveCD!:' /etc/motd
 	;;
 esac
 
@@ -175,43 +151,6 @@ rm -f /etc/generic.motd.txt /etc/universal.motd.txt /etc/minimal.motd.txt /etc/l
 # Post configuration
 case ${clst_livecd_type} in
 	gentoo-release-live*)
-		# Setup GDM
-		if [ "${clst_livecd_xdm}" == "gdm" ]
-		then
-			if [ ! -e /etc/X11/gdm/gdm.conf ] && [ -e /usr/share/gdm/defaults.conf ]
-			then
-				if [ -n "${clst_livecd_users}" ] && [ -n "${first_user}" ]
-				then
-					sedxtra="\nTimedLogin=${first_user}"
-				else
-					sedxtra=""
-				fi
-
-				cp -f /etc/X11/gdm/custom.conf /etc/X11/gdm/custom.conf.old
-
-				sed	-i \
-					-e "s:\(\[daemon\]\)$:\1\nTimedLoginEnable=true\nTimedLoginDelay=10${sedxtra}:" \
-					-e 's:\(\[greeter\]\)$:\1\nGraphicalTheme=gentoo-emergence:' \
-					/etc/X11/gdm/custom.conf
-			else
-				cp -f /etc/X11/gdm/gdm.conf /etc/X11/gdm/gdm.conf.old
-				sed -i \
-					-e 's:TimedLoginEnable=false:TimedLoginEnable=true:' \
-					-e 's:TimedLoginDelay=30:TimedLoginDelay=10:' \
-					-e 's:AllowRemoteRoot=true:AllowRemoteRoot=false:' \
-					-e ':^#GraphicalTheme=: s:^#::' \
-					-e 's:^GraphicalTheme=.*$:GraphicalTheme=gentoo-emergence:' \
-					/etc/X11/gdm/gdm.conf
-
-				if [ -n "${clst_livecd_users}" ] && [ -n "${first_user}" ]
-				then
-					sed -i \
-						-e "s:TimedLogin=:TimedLogin=${first_user}:" \
-						/etc/X11/gdm/gdm.conf
-				fi
-			fi
-		fi
-
 		# This is my hack to reduce tmpfs usage
 		mkdir -p /usr/livecd
 		cp -r ${clst_repo_basedir}/${clst_repo_name}/{profiles,eclass} /usr/livecd
-- 
2.37.4



      parent reply	other threads:[~2022-11-15  2:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-15  2:51 [gentoo-dev] [PATCH 1/5] targets: Fix enabling PermitRootLogin Matt Turner
2022-11-15  2:51 ` [gentoo-dev] [PATCH 2/5] targets: Remove remnants of support for the installer Matt Turner
2022-11-15  2:51 ` [gentoo-dev] [PATCH 3/5] targets: Remove gconf usage Matt Turner
2022-11-15  2:51 ` [gentoo-dev] [PATCH 4/5] targets: Remove openglify usage Matt Turner
2022-11-15  2:51 ` Matt Turner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221115025157.1703859-5-mattst88@gentoo.org \
    --to=mattst88@gentoo.org \
    --cc=gentoo-catalyst@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox