public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/catalyst:master commit in: catalyst/, targets/stage1/, targets/support/
@ 2020-04-17 19:52 Matt Turner
  0 siblings, 0 replies; only message in thread
From: Matt Turner @ 2020-04-17 19:52 UTC (permalink / raw
  To: gentoo-commits

commit:     80ec0abb4c0f801df3f604aea5fa3b51e9a9db54
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 15 23:43:42 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Apr 15 23:43:42 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=80ec0abb

catalyst: Remove GNU sed detection

Was added in commit f3d246e24b5b (detect and use a configured sed
command for Gentoo/FreeBSD # 363577) for FreeBSD, but BSD support is now
gone.

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

 catalyst/defaults.py                |  1 -
 catalyst/main.py                    |  6 ------
 targets/stage1/chroot.sh            | 10 +++++-----
 targets/support/chroot-functions.sh | 10 +++++-----
 targets/support/kmerge.sh           |  8 ++++----
 targets/support/livecdfs-update.sh  | 32 ++++++++++++++++----------------
 6 files changed, 30 insertions(+), 37 deletions(-)

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 4f67878c..8e276500 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -52,7 +52,6 @@ confdefaults = {
     "PythonDir": "./catalyst",
     "repo_basedir": REPODIR[:],
     "repo_name": MAINREPO[:],
-    "sed": "sed",
     "sharedir": "/usr/share/catalyst",
     "shdir": "/usr/share/catalyst/targets/",
     "snapshot_cache": "/var/tmp/catalyst/snapshot_cache",

diff --git a/catalyst/main.py b/catalyst/main.py
index 8603012d..0fb8a682 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -404,12 +404,6 @@ def _main(parser, opts):
                 hash_map.hash_map[conf_values['hash_function']].cmd,
                 conf_values['hash_function'])
 
-    # detect GNU sed
-    for sed in ('/usr/bin/gsed', '/bin/sed', '/usr/bin/sed'):
-        if os.path.exists(sed):
-            conf_values["sed"] = sed
-            break
-
     addlargs = {}
 
     if myspecfile:

diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh
index 6e20027a..ac9d68ea 100755
--- a/targets/stage1/chroot.sh
+++ b/targets/stage1/chroot.sh
@@ -48,14 +48,14 @@ else
 fi
 
 # Clear USE
-[ -e ${clst_make_conf} ] && ${clst_sed} -i -e "/^USE=\"${BINDIST} ${USE}\"/d" ${clst_make_conf}
+[ -e ${clst_make_conf} ] && sed -i -e "/^USE=\"${BINDIST} ${USE}\"/d" ${clst_make_conf}
 make_destpath "${clst_root_path}"
 
 ## START BUILD
 # First, we drop in a known-good baselayout
 [ -e ${clst_make_conf} ] && echo "USE=\"${USE} -build\"" >> ${clst_make_conf}
 run_merge "--oneshot --nodeps sys-apps/baselayout"
-${clst_sed} -i "/USE=\"${USE} -build\"/d" ${clst_make_conf}
+sed -i "/USE=\"${USE} -build\"/d" ${clst_make_conf}
 
 echo "$locales" > /etc/locale.gen
 for etc in /etc "${clst_root_path}"/etc; do
@@ -87,10 +87,10 @@ locale-gen --destdir "${clst_root_path}"/ || die "locale-gen failed"
 # Why are we removing these? Don't we need them for final make.conf?
 for useexpand in ${clst_HOSTUSEEXPAND}; do
 	x="clst_${useexpand}"
-	${clst_sed} -i "/${useexpand}=\"${!x}\"/d" \
+	sed -i "/${useexpand}=\"${!x}\"/d" \
 	${clst_make_conf}
 done
 
 # Clear USE
-[ -e ${clst_make_conf} ] && ${clst_sed} -i -e "/^CATALYST_USE/d" ${clst_make_conf}
-[ -e ${clst_make_conf} ] && ${clst_sed} -i -e "/^USE=\"/s/\${CATALYST_USE} ${USE} ${BOOTSTRAP_USE}//" ${clst_make_conf}
+[ -e ${clst_make_conf} ] && sed -i -e "/^CATALYST_USE/d" ${clst_make_conf}
+[ -e ${clst_make_conf} ] && sed -i -e "/^USE=\"/s/\${CATALYST_USE} ${USE} ${BOOTSTRAP_USE}//" ${clst_make_conf}

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 2c256f06..2fe5ac00 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -102,7 +102,7 @@ setup_myfeatures(){
 		else
 			clst_root_path=/ run_merge --oneshot --noreplace sys-devel/distcc || exit 1
 		fi
-		${clst_sed} -i '/USE="${USE} -avahi -gtk -gnome"/d' ${clst_make_conf}
+		sed -i '/USE="${USE} -avahi -gtk -gnome"/d' ${clst_make_conf}
 		mkdir -p /etc/distcc
 		echo "${clst_distcc_hosts}" > /etc/distcc/hosts
 
@@ -191,7 +191,7 @@ setup_pkgmgr(){
 		echo "Adding USE=\"\${USE} $1\" to make.conf for portage build"
 		[ -e "${clst_make_conf}" ] && echo "USE=\"\${USE} $1\"" >> "${clst_make_conf}"
 		run_merge --oneshot --update --newuse sys-apps/portage
-		${clst_sed} -i "/USE=\"\${USE} $1\"/d" "${clst_make_conf}"
+		sed -i "/USE=\"\${USE} $1\"/d" "${clst_make_conf}"
 	else
 		run_merge --oneshot --update --newuse sys-apps/portage
 	fi
@@ -245,8 +245,8 @@ cleanup_stages() {
 	esac
 
 	# Remove bindist from use
-	${clst_sed} -i "/USE=\"\${USE} bindist\"/d" "${clst_make_conf}"
-	${clst_sed} -i "/USE=\"bindist\"/d" "${clst_make_conf}"
+	sed -i "/USE=\"\${USE} bindist\"/d" "${clst_make_conf}"
+	sed -i "/USE=\"bindist\"/d" "${clst_make_conf}"
 
 	rm -f /var/log/emerge.log /var/log/portage/elog/*
 }
@@ -264,7 +264,7 @@ die() {
 
 make_destpath() {
 	# ROOT is / by default, so remove any ROOT= settings from make.conf
-	${clst_sed} -i '/ROOT=/d' ${clst_make_conf}
+	sed -i '/ROOT=/d' ${clst_make_conf}
 	export ROOT=/
 	if [ "${1}" != "/" -a -n "${1}" ]
 	then

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 2d642390..7a00059a 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -261,7 +261,7 @@ then
 		if [ ! "${clst_kextraversion}" = "" ]
 		then
 			echo "Setting extraversion to ${clst_kextraversion}"
-			${clst_sed} -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
+			sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
 			echo ${clst_kextraversion} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
 		else
 			touch /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
@@ -278,7 +278,7 @@ $(portageq contents / $(portageq best_visible / "${clst_ksource}" 2>/dev/null) 2
 	if [ ! "${clst_kextraversion}" = "" ]
 	then
 		echo "Setting extraversion to ${clst_kextraversion}"
-		${clst_sed} -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
+		sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
 	fi
 fi
 
@@ -291,12 +291,12 @@ make_destpath
 
 
 build_kernel
-${clst_sed} -i "/USE=\"\${USE} ${clst_kernel_use} \"/d" ${clst_make_conf}
+sed -i "/USE=\"\${USE} ${clst_kernel_use} \"/d" ${clst_make_conf}
 # grep out the kernel version so that we can do our modules magic
 VER=`grep ^VERSION\ \= /usr/src/linux/Makefile | awk '{ print $3 };'`
 PAT=`grep ^PATCHLEVEL\ \= /usr/src/linux/Makefile | awk '{ print $3 };'`
 SUB=`grep ^SUBLEVEL\ \= /usr/src/linux/Makefile | awk '{ print $3 };'`
-EXV=`grep ^EXTRAVERSION\ \= /usr/src/linux/Makefile | ${clst_sed} -e "s/EXTRAVERSION =//" -e "s/ //g"`
+EXV=`grep ^EXTRAVERSION\ \= /usr/src/linux/Makefile | sed -e "s/EXTRAVERSION =//" -e "s/ //g"`
 clst_fudgeuname=${VER}.${PAT}.${SUB}${EXV}
 
 unset USE

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index d0a76a92..046473df 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -7,7 +7,7 @@ source /tmp/chroot-functions.sh
 # Allow root logins to our CD by default
 if [ -e /etc/ssh/sshd_config ]
 then
-	${clst_sed} -i 's:^#PermitRootLogin\ yes:PermitRootLogin\ yes:' \
+	sed -i 's:^#PermitRootLogin\ yes:PermitRootLogin\ yes:' \
 		/etc/ssh/sshd_config
 fi
 
@@ -62,7 +62,7 @@ fi
 # Setup sudoers
 if [ -f /etc/sudoers ]
 then
-	${clst_sed} -i '/NOPASSWD: ALL/ s/^# //' /etc/sudoers
+	sed -i '/NOPASSWD: ALL/ s/^# //' /etc/sudoers
 fi
 
 # Setup links for ethernet devices
@@ -94,7 +94,7 @@ EOF
 cat ${clst_make_conf}.old >> ${clst_make_conf}
 
 # devfs tweaks
-[ -e /etc/devfsd.conf ] && ${clst_sed} -i '/dev-state/ s:^:#:' /etc/devfsd.conf
+[ -e /etc/devfsd.conf ] && sed -i '/dev-state/ s:^:#:' /etc/devfsd.conf
 
 # Add some helpful aliases
 cat <<EOF > /etc/profile
@@ -136,10 +136,10 @@ fi
 # Setup configured display manager
 if [ -n "${clst_livecd_xdm}" ]
 then
-	${clst_sed} -i \
+	sed -i \
 		-e "s:^#\\?DISPLAYMANAGER=.\+$:DISPLAYMANAGER=\"${clst_livecd_xdm}\":" \
 		/etc/rc.conf
-	${clst_sed} -i \
+	sed -i \
 		-e "s:^#\\?DISPLAYMANAGER=.\+$:DISPLAYMANAGER=\"${clst_livecd_xdm}\":" \
 		/etc/conf.d/xdm
 fi
@@ -158,16 +158,16 @@ case ${clst_livecd_type} in
 	gentoo-release-universal)
 		cat /etc/generic.motd.txt /etc/universal.motd.txt \
 			/etc/minimal.motd.txt > /etc/motd
-		${clst_sed} -i 's:^##GREETING:Welcome to the Gentoo Linux Universal Installation CD!:' /etc/motd
+		sed -i 's:^##GREETING:Welcome to the Gentoo Linux Universal Installation CD!:' /etc/motd
 	;;
 	gentoo-release-minimal)
 		cat /etc/generic.motd.txt /etc/minimal.motd.txt > /etc/motd
-		${clst_sed} -i 's:^##GREETING:Welcome to the Gentoo Linux Minimal Installation CD!:' /etc/motd
+		sed -i 's:^##GREETING:Welcome to the Gentoo Linux Minimal Installation CD!:' /etc/motd
 	;;
 	gentoo-release-live*)
 		cat /etc/generic.motd.txt \
 			/etc/minimal.motd.txt /etc/livecd.motd.txt > /etc/motd
-		${clst_sed} -i -e 's:^##GREETING:Welcome to the Gentoo Linux LiveCD!:' \
+		sed -i -e 's:^##GREETING:Welcome to the Gentoo Linux LiveCD!:' \
 			-e "s:##DISPLAY_MANAGER:${clst_livecd_xdm}:" /etc/motd
 	;;
 esac
@@ -179,7 +179,7 @@ if [ -n "${clst_livecd_splash_theme}" ]
 then
 	if [ -d /etc/splash/${clst_livecd_splash_theme} ]
 	then
-		${clst_sed} -i \
+		sed -i \
 			-e "s:# SPLASH_THEME=\"gentoo\":SPLASH_THEME=\"${clst_livecd_splash_theme}\":" \
 			-e "/^# SPLASH_TTYS=/ s/^#//" \
 			/etc/conf.d/splash
@@ -234,7 +234,7 @@ case ${clst_livecd_type} in
 					/etc/X11/gdm/custom.conf
 			else
 				cp -f /etc/X11/gdm/gdm.conf /etc/X11/gdm/gdm.conf.old
-				${clst_sed} -i \
+				sed -i \
 					-e 's:TimedLoginEnable=false:TimedLoginEnable=true:' \
 					-e 's:TimedLoginDelay=30:TimedLoginDelay=10:' \
 					-e 's:AllowRemoteRoot=true:AllowRemoteRoot=false:' \
@@ -244,7 +244,7 @@ case ${clst_livecd_type} in
 
 				if [ -n "${clst_livecd_users}" ] && [ -n "${first_user}" ]
 				then
-					${clst_sed} -i \
+					sed -i \
 						-e "s:TimedLogin=:TimedLogin=${first_user}:" \
 						/etc/X11/gdm/gdm.conf
 				fi
@@ -254,7 +254,7 @@ case ${clst_livecd_type} in
 		# This gives us our list of system packages for the installer
 		mkdir -p /usr/livecd
 		### XXX: Andrew says we don't need this anymore
-		USE="-* $(cat /var/db/pkg/sys-libs/glibc*/USE)" emerge -eqp @system | grep -e '^\[ebuild' | ${clst_sed} -e 's:^\[ebuild .\+\] ::' -e 's: .\+$::' > /usr/livecd/systempkgs.txt
+		USE="-* $(cat /var/db/pkg/sys-libs/glibc*/USE)" emerge -eqp @system | grep -e '^\[ebuild' | sed -e 's:^\[ebuild .\+\] ::' -e 's: .\+$::' > /usr/livecd/systempkgs.txt
 
 		# This is my hack to reduce tmpfs usage
 		cp -r ${clst_repo_basedir}/${clst_repo_name}/{profiles,eclass} /usr/livecd
@@ -285,10 +285,10 @@ case ${clst_livecd_type} in
 				if [ -e /usr/share/applications/installer-gtk.desktop ]
 				then
 					cp -f /usr/share/applications/installer-{gtk,dialog}.desktop /home/${username}/Desktop
-					${clst_sed} -i -e \
+					sed -i -e \
 						's:Exec=installer-dialog:Exec=sudo installer-dialog:' \
 						/home/${username}/Desktop/installer-dialog.desktop
-					${clst_sed} -i -e 's:Exec=installer-gtk:Exec=installer:' \
+					sed -i -e 's:Exec=installer-gtk:Exec=installer:' \
 						/home/${username}/Desktop/installer-gtk.desktop
 				fi
 				chown -R ${username}:100 /home/${username}
@@ -323,12 +323,12 @@ esac
 # We want the first user to be used when auto-starting X
 if [ -e /etc/startx ]
 then
-	${clst_sed} -i "s:##STARTX:echo startx | su - '${first_user}':" /root/.bashrc
+	sed -i "s:##STARTX:echo startx | su - '${first_user}':" /root/.bashrc
 fi
 
 if [ -e /lib/rcscripts/addons/udev-start.sh ]
 then
-	${clst_sed} -i "s:\t\[\[ -x /sbin/evms_activate:\t\[\[ -x \${CDBOOT} \]\] \&\& \[\[ -x /sbin/evms_activate:" /lib/rcscripts/addons/udev-start.sh
+	sed -i "s:\t\[\[ -x /sbin/evms_activate:\t\[\[ -x \${CDBOOT} \]\] \&\& \[\[ -x /sbin/evms_activate:" /lib/rcscripts/addons/udev-start.sh
 fi
 
 env-update


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-17 19:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-17 19:52 [gentoo-commits] proj/catalyst:master commit in: catalyst/, targets/stage1/, targets/support/ Matt Turner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox