From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7D9EC138350 for ; Fri, 17 Apr 2020 19:52:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C3369E086D; Fri, 17 Apr 2020 19:52:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 976B7E086D for ; Fri, 17 Apr 2020 19:52:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7DB5D34F0E2 for ; Fri, 17 Apr 2020 19:52:27 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2F72371 for ; Fri, 17 Apr 2020 19:52:26 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1586994222.80ec0abb4c0f801df3f604aea5fa3b51e9a9db54.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/, targets/stage1/, targets/support/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/defaults.py catalyst/main.py targets/stage1/chroot.sh targets/support/chroot-functions.sh targets/support/kmerge.sh targets/support/livecdfs-update.sh X-VCS-Directories: targets/stage1/ targets/support/ catalyst/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 80ec0abb4c0f801df3f604aea5fa3b51e9a9db54 X-VCS-Branch: master Date: Fri, 17 Apr 2020 19:52:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c3239b6c-0716-477b-aaf1-707ce5f7a47e X-Archives-Hash: f9d5d8f6744a0c74f1e984904e4086e6 commit: 80ec0abb4c0f801df3f604aea5fa3b51e9a9db54 Author: Matt Turner gentoo org> AuthorDate: Wed Apr 15 23:43:42 2020 +0000 Commit: Matt Turner gentoo 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 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 < /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