public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-05-03 22:04 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-05-03 22:04 UTC (permalink / raw
  To: gentoo-commits

commit:     e422e667d0d5bd69bff8e6f4079464d67177e5d3
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri May  1 06:46:52 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun May  3 22:04:18 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e422e667

targets: Inline functions with one caller

Inline check_bootargs and check_filesystem_type since they have only one
caller (in a different file).

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

 targets/support/bootloader-setup.sh | 21 +++++++++++++++++++--
 targets/support/functions.sh        | 22 ----------------------
 2 files changed, 19 insertions(+), 24 deletions(-)

diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh
index d507fe5e..d3a6b2dc 100755
--- a/targets/support/bootloader-setup.sh
+++ b/targets/support/bootloader-setup.sh
@@ -19,8 +19,25 @@ else
 fi
 
 extract_kernels $1/boot
-check_bootargs
-check_filesystem_type
+
+# Add any additional options
+if [ -n "${clst_livecd_bootargs}" ]
+then
+	for x in ${clst_livecd_bootargs}
+	do
+		cmdline_opts="${cmdline_opts} ${x}"
+	done
+fi
+
+case ${clst_fstype} in
+	squashfs)
+		cmdline_opts="${cmdline_opts} looptype=squashfs loop=/image.squashfs"
+	;;
+	jffs2)
+		cmdline_opts="${cmdline_opts} looptype=jffs2 loop=/image.jffs2"
+	;;
+esac
+
 
 default_append_line="root=/dev/ram0 init=/linuxrc ${cmdline_opts} ${custom_kopts} cdroot"
 [ -n "${clst_splash_theme}" ] && default_append_line="${default_append_line} splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet"

diff --git a/targets/support/functions.sh b/targets/support/functions.sh
index 601f5dc9..ac6710ad 100755
--- a/targets/support/functions.sh
+++ b/targets/support/functions.sh
@@ -216,25 +216,3 @@ extract_kernel() {
 		mv ${1}/initramfs-* ${1}/${2}.igz
 	fi
 }
-
-check_bootargs(){
-	# Add any additional options
-	if [ -n "${clst_livecd_bootargs}" ]
-	then
-		for x in ${clst_livecd_bootargs}
-		do
-			cmdline_opts="${cmdline_opts} ${x}"
-		done
-	fi
-}
-
-check_filesystem_type(){
-	case ${clst_fstype} in
-		squashfs)
-			cmdline_opts="${cmdline_opts} looptype=squashfs loop=/image.squashfs"
-		;;
-		jffs2)
-			cmdline_opts="${cmdline_opts} looptype=jffs2 loop=/image.jffs2"
-		;;
-	esac
-}


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-05-03 22:04 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-05-03 22:04 UTC (permalink / raw
  To: gentoo-commits

commit:     415e88f301517f3efc4289912889509a67fe5115
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri May  1 06:40:26 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun May  3 22:04:18 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=415e88f3

targets: Inline filesystem-functions.sh

Inline create_squashfs and create_jffs2 since they're called only from
one place (in a different file).

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

 targets/support/filesystem-functions.sh | 19 -------------------
 targets/support/target_image_setup.sh   | 20 ++++++--------------
 2 files changed, 6 insertions(+), 33 deletions(-)

diff --git a/targets/support/filesystem-functions.sh b/targets/support/filesystem-functions.sh
deleted file mode 100755
index a95ae0b9..00000000
--- a/targets/support/filesystem-functions.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-# Dont forget to update functions.sh  check_looptype
-# $1 is the target directory for the filesystem
-
-create_squashfs() {
-	echo "Creating squashfs..."
-	export loopname="image.squashfs"
-	gensquashfs -D "${clst_destpath}" ${clst_fsops} "$1/${loopname}" \
-		|| die "gensquashfs failed, did you emerge squashfs-tools-ng?"
-}
-
-create_jffs2(){
-	echo "Creating jffs2..."
-	export loopname="image.jffs"
-	# fs_check /usr/sbin/mkfs.jffs2 jffs2 sys-fs/mtd
-	mkfs.jffs2 --root=${clst_destpath} --output=$1/${loopname} ${clst_fsops} \
-		|| die "Could not create a jffs2 filesystem"
-}

diff --git a/targets/support/target_image_setup.sh b/targets/support/target_image_setup.sh
index 423dc4c4..03cb4741 100755
--- a/targets/support/target_image_setup.sh
+++ b/targets/support/target_image_setup.sh
@@ -1,25 +1,17 @@
 #!/bin/bash
 
 source ${clst_shdir}/support/functions.sh
-source ${clst_shdir}/support/filesystem-functions.sh
 
-# Make the directory if it doesnt exist
-mkdir -p $1
+mkdir -p "${1}"
 
-loopret=1
+echo "Creating ${clst_fstype} filesystem"
 case ${clst_fstype} in
 	squashfs)
-		create_squashfs $1
-		loopret=$?
+		gensquashfs -D "${clst_destpath}" "${clst_fsops}" "${1}/image.squashfs" \
+			|| die "Failed to create squashfs filesystem"
 	;;
 	jffs2)
-		create_jffs2 $1
-		loopret=$?
+		mkfs.jffs2 --root="${clst_destpath}" --output="${1}/image.jffs" "${clst_fsops}" \
+			|| die "Failed to create jffs2 filesystem"
 	;;
 esac
-
-if [ ${loopret} = "1" ]
-then
-	die "Filesystem not setup"
-fi
-exit $loopret


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-05-03 22:04 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-05-03 22:04 UTC (permalink / raw
  To: gentoo-commits

commit:     d6b3fd5226b548d28fdb1bd52dd52ee368ec347a
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri May  1 06:47:29 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun May  3 22:04:18 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d6b3fd52

targets: Remove run_crossdev() function

Has never been used in its entire existence.

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

 targets/support/functions.sh | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/targets/support/functions.sh b/targets/support/functions.sh
index daf6f190..601f5dc9 100755
--- a/targets/support/functions.sh
+++ b/targets/support/functions.sh
@@ -238,7 +238,3 @@ check_filesystem_type(){
 		;;
 	esac
 }
-
-run_crossdev() {
-	crossdev ${clst_CHOST}
-}


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-05-03 22:58 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-05-03 22:58 UTC (permalink / raw
  To: gentoo-commits

commit:     9aae239878b059969c0b8f087106a8de48599212
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri May  1 06:40:26 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun May  3 22:55:53 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=9aae2398

targets: Inline filesystem-functions.sh

Inline create_squashfs and create_jffs2 since they're called only from
one place (in a different file).

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

 targets/support/filesystem-functions.sh | 19 -------------------
 targets/support/target_image_setup.sh   | 20 ++++++--------------
 2 files changed, 6 insertions(+), 33 deletions(-)

diff --git a/targets/support/filesystem-functions.sh b/targets/support/filesystem-functions.sh
deleted file mode 100755
index a95ae0b9..00000000
--- a/targets/support/filesystem-functions.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-# Dont forget to update functions.sh  check_looptype
-# $1 is the target directory for the filesystem
-
-create_squashfs() {
-	echo "Creating squashfs..."
-	export loopname="image.squashfs"
-	gensquashfs -D "${clst_destpath}" ${clst_fsops} "$1/${loopname}" \
-		|| die "gensquashfs failed, did you emerge squashfs-tools-ng?"
-}
-
-create_jffs2(){
-	echo "Creating jffs2..."
-	export loopname="image.jffs"
-	# fs_check /usr/sbin/mkfs.jffs2 jffs2 sys-fs/mtd
-	mkfs.jffs2 --root=${clst_destpath} --output=$1/${loopname} ${clst_fsops} \
-		|| die "Could not create a jffs2 filesystem"
-}

diff --git a/targets/support/target_image_setup.sh b/targets/support/target_image_setup.sh
index 423dc4c4..03cb4741 100755
--- a/targets/support/target_image_setup.sh
+++ b/targets/support/target_image_setup.sh
@@ -1,25 +1,17 @@
 #!/bin/bash
 
 source ${clst_shdir}/support/functions.sh
-source ${clst_shdir}/support/filesystem-functions.sh
 
-# Make the directory if it doesnt exist
-mkdir -p $1
+mkdir -p "${1}"
 
-loopret=1
+echo "Creating ${clst_fstype} filesystem"
 case ${clst_fstype} in
 	squashfs)
-		create_squashfs $1
-		loopret=$?
+		gensquashfs -D "${clst_destpath}" "${clst_fsops}" "${1}/image.squashfs" \
+			|| die "Failed to create squashfs filesystem"
 	;;
 	jffs2)
-		create_jffs2 $1
-		loopret=$?
+		mkfs.jffs2 --root="${clst_destpath}" --output="${1}/image.jffs" "${clst_fsops}" \
+			|| die "Failed to create jffs2 filesystem"
 	;;
 esac
-
-if [ ${loopret} = "1" ]
-then
-	die "Filesystem not setup"
-fi
-exit $loopret


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-05-03 22:58 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-05-03 22:58 UTC (permalink / raw
  To: gentoo-commits

commit:     8690b6f5a0afffc56fbe46b6c29a91d8ba91578d
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri May  1 06:46:52 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun May  3 22:55:53 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=8690b6f5

targets: Inline functions with one caller

Inline check_bootargs and check_filesystem_type since they have only one
caller (in a different file).

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

 targets/support/bootloader-setup.sh | 21 +++++++++++++++++++--
 targets/support/functions.sh        | 22 ----------------------
 2 files changed, 19 insertions(+), 24 deletions(-)

diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh
index d507fe5e..d3a6b2dc 100755
--- a/targets/support/bootloader-setup.sh
+++ b/targets/support/bootloader-setup.sh
@@ -19,8 +19,25 @@ else
 fi
 
 extract_kernels $1/boot
-check_bootargs
-check_filesystem_type
+
+# Add any additional options
+if [ -n "${clst_livecd_bootargs}" ]
+then
+	for x in ${clst_livecd_bootargs}
+	do
+		cmdline_opts="${cmdline_opts} ${x}"
+	done
+fi
+
+case ${clst_fstype} in
+	squashfs)
+		cmdline_opts="${cmdline_opts} looptype=squashfs loop=/image.squashfs"
+	;;
+	jffs2)
+		cmdline_opts="${cmdline_opts} looptype=jffs2 loop=/image.jffs2"
+	;;
+esac
+
 
 default_append_line="root=/dev/ram0 init=/linuxrc ${cmdline_opts} ${custom_kopts} cdroot"
 [ -n "${clst_splash_theme}" ] && default_append_line="${default_append_line} splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet"

diff --git a/targets/support/functions.sh b/targets/support/functions.sh
index 601f5dc9..ac6710ad 100755
--- a/targets/support/functions.sh
+++ b/targets/support/functions.sh
@@ -216,25 +216,3 @@ extract_kernel() {
 		mv ${1}/initramfs-* ${1}/${2}.igz
 	fi
 }
-
-check_bootargs(){
-	# Add any additional options
-	if [ -n "${clst_livecd_bootargs}" ]
-	then
-		for x in ${clst_livecd_bootargs}
-		do
-			cmdline_opts="${cmdline_opts} ${x}"
-		done
-	fi
-}
-
-check_filesystem_type(){
-	case ${clst_fstype} in
-		squashfs)
-			cmdline_opts="${cmdline_opts} looptype=squashfs loop=/image.squashfs"
-		;;
-		jffs2)
-			cmdline_opts="${cmdline_opts} looptype=jffs2 loop=/image.jffs2"
-		;;
-	esac
-}


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-05-03 22:58 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-05-03 22:58 UTC (permalink / raw
  To: gentoo-commits

commit:     e042fb1fc83f9af663eac81c12ea82b708c5960e
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri May  1 06:47:29 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun May  3 22:55:53 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e042fb1f

targets: Remove run_crossdev() function

Has never been used in its entire existence.

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

 targets/support/functions.sh | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/targets/support/functions.sh b/targets/support/functions.sh
index daf6f190..601f5dc9 100755
--- a/targets/support/functions.sh
+++ b/targets/support/functions.sh
@@ -238,7 +238,3 @@ check_filesystem_type(){
 		;;
 	esac
 }
-
-run_crossdev() {
-	crossdev ${clst_CHOST}
-}


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-05-16  6:54 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-05-16  6:54 UTC (permalink / raw
  To: gentoo-commits

commit:     421d73ea3ad22bd9cb915f56f1ef4a66fd0c752a
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat May 16 06:12:21 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat May 16 06:49:46 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=421d73ea

targets: Don't unnecessarily override emerge_opts

emerge_opts contains the options we want already, and if there are extra
options we need for a special case we can just pass them to run_merge.

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

 targets/support/kmerge.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 23489d8e..e92072bb 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -212,7 +212,7 @@ then
 
 	# install dependencies of kernel sources ahead of time in case
 	# package.provided generated below causes them not to be (re)installed
-	PKGDIR=${PKGDIR} emerge_opts=(--quiet --usepkg --buildpkg --binpkg-respect-use=y --update --newuse --onlydeps) run_merge "${clst_ksource}" || exit 1
+	PKGDIR=${PKGDIR} run_merge --onlydeps "${clst_ksource}" || exit 1
 
 	# Create the kerncache directory if it doesn't exists
 	mkdir -p /tmp/kerncache/${clst_kname}
@@ -236,7 +236,7 @@ then
 
 	[ -L /usr/src/linux ] && rm -f /usr/src/linux
 
-	PKGDIR=${PKGDIR} emerge_opts=(--quiet --update --newuse) run_merge "${clst_ksource}" || exit 1
+	PKGDIR=${PKGDIR} run_merge "${clst_ksource}" || exit 1
 
 	SOURCESDIR="/tmp/kerncache/${clst_kname}/sources"
 	if [ -L /usr/src/linux ]


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
  2020-05-17  3:26 [gentoo-commits] proj/catalyst:master " Matt Turner
@ 2020-05-16  6:54 ` Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-05-16  6:54 UTC (permalink / raw
  To: gentoo-commits

commit:     76e00418920285d4899ecda1f3cf3edd93ead2e2
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat May 16 06:23:46 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat May 16 06:49:51 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=76e00418

targets: Decouple distfile fetching from binary packages

This removes a hack introduced in 2006 to work around a bug in portage
where it wouldn't fetch distfiles if a binary package existed for the
package. Presumably that's been fixed in the intervening 14 years. See
commit 4e00f1338637 (We now only set the options for pkgcache if we are
not using fetchonly.)

Also remove the useless "i++ // increment i"-style comment.

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

 targets/support/chroot-functions.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 488041fe..d40279ae 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -152,8 +152,9 @@ setup_emerge_opts() {
 	then
 		emerge_opts+=(--fetchonly)
 		bootstrap_opts+=(-f)
-	# if we have PKGCACHE, and either update_seed is empty or 'no', make and use binpkgs
-	elif [ -n "${clst_PKGCACHE}" ] && [ -z "${clst_update_seed}" -o "${clst_update_seed}" = "no" ]
+	fi
+
+	if [ -n "${clst_PKGCACHE}" ] && [ -z "${clst_update_seed}" -o "${clst_update_seed}" = "no" ]
 	then
 		emerge_opts+=(--usepkg --buildpkg --binpkg-respect-use=y --newuse)
 		bootstrap_opts+=(-r)


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
  2020-05-21 20:25 [gentoo-commits] proj/catalyst:master " Matt Turner
@ 2020-05-20  3:39 ` Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-05-20  3:39 UTC (permalink / raw
  To: gentoo-commits

commit:     b4941f10b5ab361c9dbee8a1ed4957cba564eccd
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed May 20 01:24:58 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed May 20 01:49:37 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b4941f10

targets: Remove check_genkernel_version() function

Existed to ensure a minimum genkernel version, and was last updated in
2005. genkernel is emerged during the catalyst build now, so we will
always have an updated version.

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

 targets/support/chroot-functions.sh | 23 -----------------------
 targets/support/kmerge.sh           |  2 --
 2 files changed, 25 deletions(-)

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index d63e4918..b6e221af 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -29,29 +29,6 @@ if [[ -z "${clst_CHOST}" ]] ; then
 	fi
 fi
 
-check_genkernel_version() {
-	local version parts=() major minor
-
-	version=$(genkernel --version)
-	if [[ -z ${version} ]] ; then
-		echo "ERROR: Could not detect genkernel version!"
-		exit 1
-	fi
-	printf 'Genkernel version '%s' found ... ' "${version}"
-
-	IFS='.' read -a parts <<<"${version}"
-	major=${parts[0]}
-	minor=${parts[1]}
-	if [[ ${major} -gt 3 || ( ${major} -eq 3 && ${minor} -ge 3 ) ]] ; then
-		echo "OK"
-	else
-		echo "FAIL"
-		echo "ERROR: Your genkernel version is too low in your seed stage."
-		echo "       genkernel version 3.3.0 or greater is required."
-		exit 1
-	fi
-}
-
 get_libdir() {
 	ABI=$(portageq envvar ABI)
 	DEFAULT_ABI=$(portageq envvar DEFAULT_ABI)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 1a432293..6b589493 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -2,8 +2,6 @@
 
 source /tmp/chroot-functions.sh
 
-check_genkernel_version
-
 install -d /tmp/kerncache
 PKGDIR=/tmp/kerncache/${clst_kname}/ebuilds
 


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-05-20  3:39 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-05-20  3:39 UTC (permalink / raw
  To: gentoo-commits

commit:     5a8322accecab68d7b00637f288487354e7a01d3
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed May 20 01:20:02 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed May 20 01:49:30 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5a8322ac

targets: Remove copy_{file,symlink,lib} functions

Unused since the removal of the original netboot target.

I'm honestly kind of impressed with the strategy of running ldd and
recursively copying libraries to the netboot image. Unfortunately for
this strategy, dlopen() exists so this cannot work.

Fixes: 89f57e145f82 (targets: Delete the netboot target)
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/chroot-functions.sh | 75 -------------------------------------
 1 file changed, 75 deletions(-)

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index d40279ae..d63e4918 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -335,81 +335,6 @@ run_default_funcs() {
 	fi
 }
 
-# Functions
-# Copy libs of a executable in the chroot
-function copy_libs() {
-	# Check if it's a dynamix exec
-	ldd ${1} > /dev/null 2>&1 || return
-
-	for lib in `ldd ${1} | awk '{ print $3 }'`
-	do
-		echo ${lib}
-		if [ -e ${lib} ]
-		then
-			if [ ! -e ${clst_root_path}/${lib} ]
-			then
-				copy_file ${lib}
-				[ -e "${clst_root_path}/${lib}" ] && \
-				strip -R .comment -R .note ${clst_root_path}/${lib} \
-				|| echo "WARNING : Cannot strip lib ${clst_root_path}/${lib} !"
-			fi
-		else
-			echo "WARNING : Some library was not found for ${lib} !"
-		fi
-	done
-}
-
-function copy_symlink() {
-	STACK=${2}
-	[ "${STACK}" = "" ] && STACK=16 || STACK=$((${STACK} - 1 ))
-
-	if [ ${STACK} -le 0 ]
-	then
-		echo "WARNING : ${TARGET} : too many levels of symbolic links !"
-		return
-	fi
-
-	[ ! -e ${clst_root_path}/`dirname ${1}` ] && \
-		mkdir -p ${clst_root_path}/`dirname ${1}`
-	[ ! -e ${clst_root_path}/${1} ] && \
-		cp -vfdp ${1} ${clst_root_path}/${1}
-
-	if [[ -n $(type -p realpath) ]]; then
-		TARGET=`realpath ${1}`
-	else
-		TARGET=`readlink -f ${1}`
-	fi
-	if [ -h ${TARGET} ]
-	then
-		copy_symlink ${TARGET} ${STACK}
-	else
-		copy_file ${TARGET}
-	fi
-}
-
-function copy_file() {
-	f="${1}"
-
-	if [ ! -e "${f}" ]
-	then
-		echo "WARNING : File not found : ${f}"
-		continue
-	fi
-
-	[ ! -e ${clst_root_path}/`dirname ${f}` ] && \
-		mkdir -p ${clst_root_path}/`dirname ${f}`
-	[ ! -e ${clst_root_path}/${f} ] && \
-		cp -vfdp ${f} ${clst_root_path}/${f}
-	if [ -x ${f} -a ! -h ${f} ]
-	then
-		copy_libs ${f}
-		strip -R .comment -R .note ${clst_root_path}/${f} > /dev/null 2>&1
-	elif [ -h ${f} ]
-	then
-		copy_symlink ${f}
-	fi
-}
-
 create_handbook_icon() {
 	# This function creates a local icon to the Gentoo Handbook
 	echo "[Desktop Entry]


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     cfef36af3f81f40d6d7d3ee45aa2b631253fc35a
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 05:11:23 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Oct 19 19:19:06 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=cfef36af

targets: Remove some disabled debugging messages

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

 targets/support/kmerge.sh | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index bcc83cd6..3d7f697a 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -66,8 +66,7 @@ setup_gk_args() {
 
 genkernel_compile(){
 	setup_gk_args
-	#echo "The GK_ARGS are"
-	#echo ${GK_ARGS[@]}
+
 	export clst_kernel_merge
 	export clst_initramfs_overlay
 	# Build our list of kernel packages
@@ -146,7 +145,6 @@ then
 		STR2=$(for i in ${clst_kernel_use}; do echo $i; done|sort)
 		if [ "${STR1}" = "${STR2}" ]
 		then
-			#echo "USE Flags match"
 			USE_MATCH=1
 		else
 			[ -d /tmp/kerncache/${clst_kname}/ebuilds ] && \
@@ -163,7 +161,6 @@ then
 		STR2=${clst_kextraversion}
 		if [ "${STR1}" = "${STR2}" ]
 		then
-			#echo "EXTRAVERSION match"
 			EXTRAVERSION_MATCH=1
 		fi
 	fi


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     084c2b550bb09a5d8db6094dd51933fba661ec55
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 05:11:47 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Oct 19 19:19:06 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=084c2b55

targets: Remove some unnecessary exports

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

 targets/support/kmerge.sh | 2 --
 1 file changed, 2 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 3d7f697a..0e72e98b 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -67,8 +67,6 @@ setup_gk_args() {
 genkernel_compile(){
 	setup_gk_args
 
-	export clst_kernel_merge
-	export clst_initramfs_overlay
 	# Build our list of kernel packages
 	case ${clst_livecd_type} in
 		gentoo-release-live*)


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     36d5a16a3832f27ba667c0352e1b02d3277fdc90
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:08:28 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=36d5a16a

targets: Use USE=symlink when emerging kernel sources

Just use the thing that exists instead of rolling our own...

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

 targets/support/kmerge.sh | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 80152077..7f1f029c 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -189,9 +189,7 @@ then
 		rm -f ${clst_port_conf}/profile/package.provided
 	fi
 
-	[ -L /usr/src/linux ] && rm -f /usr/src/linux
-
-	run_merge "${ksource}"
+	USE=symlink run_merge "${ksource}"
 
 	SOURCESDIR="/tmp/kerncache/${kname}/sources"
 	if [ -L /usr/src/linux ]
@@ -221,12 +219,8 @@ then
 		fi
 	fi
 else
-	run_merge "${ksource}"
-	#ensure that there is a /usr/src/linux symlink and it points to the sources we just installed
-	echo "Adjusting /usr/src/linux to point to \
-$(portageq contents / $(portageq best_visible / "${ksource}" 2>/dev/null) 2>/dev/null | grep --color=never '/usr/src/' | head -n1 2>/dev/null)"
-	ln -snf $(portageq contents / $(portageq best_visible / "${ksource}" 2>/dev/null) 2>/dev/null | grep --color=never '/usr/src/' | head -n1 2>/dev/null) \
-		/usr/src/linux
+	USE=symlink run_merge "${ksource}"
+
 	if [ ! "${clst_kextraversion}" = "" ]
 	then
 		echo "Setting extraversion to ${clst_kextraversion}"


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     a6da8b1dcb1503e898b2d0d3f792dc8be9999313
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 18:17:56 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=a6da8b1d

targets: Default to sys-kernel/gentoo-sources directly

Using virtual/linux-sources was a nice idea, but leads to multiple
failures in practice. For example, we use 'portageq contents' later, and
the virtual provides no files. We could handle the indirection with
'portageq expand_virtual' in some cases but that requires the virtual to
be installed on the system.

Fixes: 388def77 ("kmerge.sh blows away the /usr/src/linux symlink ...")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/kmerge.sh | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 911d7cb3..b2c4a31a 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -118,11 +118,7 @@ eval "kernel_merge=\$clst_boot_kernel_${kname}_packages"
 eval "kernel_use=\$clst_boot_kernel_${kname}_use"
 eval eval kernel_gk_kernargs=( \$clst_boot_kernel_${kname}_gk_kernargs )
 eval "ksource=\$clst_boot_kernel_${kname}_sources"
-
-if [ -z "${ksource}" ]
-then
-	ksource="virtual/linux-sources"
-fi
+[[ -z ${ksource} ]] && ksource="sys-kernel/gentoo-sources"
 
 # Check if we have a match in kerncach
 


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     4e677fb7fbd6d0a9453e2ad653a27565c56c5b11
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 17:11:58 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4e677fb7

targets: Use pkgcache for kernel sources

The rationale for not using it before made sense, given that multiple
binpkgs could not exist for the same version of a package. But we now
use FEATURES=binpkg-multi-instance so this is no longer the case.

The dumbest part of this is that the code wasn't even disabling the
package cache. It was instead just overriding PKGDIR to dump the binary
package into a location (named "ebuilds" no less!) that emerge would
never otherwise use.

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

 targets/support/kmerge.sh | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 15a21b90..aec4d71e 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -3,7 +3,6 @@
 source /tmp/chroot-functions.sh
 
 install -d /tmp/kerncache
-PKGDIR=/tmp/kerncache/${kname}/ebuilds
 
 setup_gk_args() {
 	# default genkernel args
@@ -85,7 +84,6 @@ genkernel_compile(){
 	else
 		gk_callback_opts=(-qN)
 	fi
-	PKGDIR=${PKGDIR}
 	if [ -n "${clst_KERNCACHE}" ]
 	then
 		gk_callback_opts+=(-kb)
@@ -126,11 +124,6 @@ then
 	ksource="virtual/linux-sources"
 fi
 
-# Don't use pkgcache here, as the kernel source may get emerged with different
-# USE variables (and thus different patches enabled/disabled.) Also, there's no
-# real benefit in using the pkgcache for kernel source ebuilds.
-
-
 # Check if we have a match in kerncach
 
 if [ -n "${clst_KERNCACHE}" ]
@@ -145,8 +138,6 @@ then
 		then
 			USE_MATCH=1
 		else
-			[ -d /tmp/kerncache/${kname}/ebuilds ] && \
-				rm -r /tmp/kerncache/${kname}/ebuilds
 			[ -e /tmp/kerncache/${kname}/usr/src/linux/.config ] && \
 				rm /tmp/kerncache/${kname}/usr/src/linux/.config
 		fi
@@ -181,7 +172,7 @@ then
 
 	# install dependencies of kernel sources ahead of time in case
 	# package.provided generated below causes them not to be (re)installed
-	PKGDIR=${PKGDIR} run_merge --onlydeps "${ksource}"
+	run_merge --onlydeps "${ksource}"
 
 	# Create the kerncache directory if it doesn't exists
 	mkdir -p /tmp/kerncache/${kname}
@@ -205,7 +196,7 @@ then
 
 	[ -L /usr/src/linux ] && rm -f /usr/src/linux
 
-	PKGDIR=${PKGDIR} run_merge "${ksource}"
+	run_merge "${ksource}"
 
 	SOURCESDIR="/tmp/kerncache/${kname}/sources"
 	if [ -L /usr/src/linux ]


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     196cf9fe3375b5af881b7c8f75768314df7ae851
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:38:54 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=196cf9fe

targets: Use full 'sys-kernel/genkernel' package name

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

 targets/support/pre-kmerge.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/targets/support/pre-kmerge.sh b/targets/support/pre-kmerge.sh
index 165dfd51..a92c436c 100755
--- a/targets/support/pre-kmerge.sh
+++ b/targets/support/pre-kmerge.sh
@@ -20,5 +20,5 @@ if [[ ${clst_hostarch} == hppa ]]; then
 	[[ $num64 > 1 ]] && die "Only one 64-bit kernel can be configured"
 fi
 
-run_merge --oneshot genkernel
+run_merge --oneshot sys-kernel/genkernel
 install -d /tmp/kerncache


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     4c9aecb6a0c04bb6115cab906ed8c6c72f8b1c01
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 23:30:05 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4c9aecb6

targets: Emerge kernel sources with --update --changed-use

Ensure that we have the appropriate version with appropriate USE flags.

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

 targets/support/kmerge.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 7f1f029c..ee75e0a8 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -189,7 +189,7 @@ then
 		rm -f ${clst_port_conf}/profile/package.provided
 	fi
 
-	USE=symlink run_merge "${ksource}"
+	USE=symlink run_merge --update --changed-use "${ksource}"
 
 	SOURCESDIR="/tmp/kerncache/${kname}/sources"
 	if [ -L /usr/src/linux ]
@@ -219,7 +219,7 @@ then
 		fi
 	fi
 else
-	USE=symlink run_merge "${ksource}"
+	USE=symlink run_merge --update --changed-use "${ksource}"
 
 	if [ ! "${clst_kextraversion}" = "" ]
 	then


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     1ef11ad8950e12aa4fe0e11c2deaab8989f87fd7
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:42:13 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=1ef11ad8

targets: Inline run_default_funcs() function

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

 targets/support/chroot-functions.sh | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index b531eb6a..307a9042 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -303,15 +303,6 @@ show_debug() {
 	fi
 }
 
-run_default_funcs() {
-	if [ "${RUN_DEFAULT_FUNCS}" != "no" ]
-	then
-		update_env_settings
-		setup_features
-		show_debug
-	fi
-}
-
 create_handbook_icon() {
 	# This function creates a local icon to the Gentoo Handbook
 	echo "[Desktop Entry]
@@ -330,5 +321,9 @@ readonly locales="
 C.UTF8 UTF-8
 "
 
-# We do this everywhere, so why not put it in this script
-run_default_funcs
+if [[ ${RUN_DEFAULT_FUNCS} != no ]]
+then
+	update_env_settings
+	setup_features
+	show_debug
+fi


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     ad487bd196eb7bca1f6b0b6bf2e59151941a3111
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:38:06 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ad487bd1

targets: Rewrite hppa pre-kmerge check

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

 targets/support/pre-kmerge.sh | 43 +++++++++++++++++--------------------------
 1 file changed, 17 insertions(+), 26 deletions(-)

diff --git a/targets/support/pre-kmerge.sh b/targets/support/pre-kmerge.sh
index dd51ae9a..165dfd51 100755
--- a/targets/support/pre-kmerge.sh
+++ b/targets/support/pre-kmerge.sh
@@ -2,32 +2,23 @@
 
 source /tmp/chroot-functions.sh
 
-case ${clst_hostarch} in
-	hppa)
-		got_32=0
-		got_64=0
-		for i in ${clst_boot_kernel}
-		do
-			if [ "${i: -2}" == "32" ]
-			then
-				if [ $got_32 -eq 1 ]
-				then
-					die "Only one 32 bit kernel can be configured"
-				fi
-				got_32=1
-			elif [ "${i: -2}" == "64" ]
-			then
-				if [ $got_64 -eq 1 ]
-				then
-					die "Only one 64 bit kernel can be configured"
-				fi
-				got_64=1
-			else
-				die "Kernel names must end by either 32 or 64"
-			fi
-		done
-	;;
-esac
+if [[ ${clst_hostarch} == hppa ]]; then
+	for i in ${clst_boot_kernel}; do
+		case ${i} in
+			*32)
+				let num32++
+				;;
+			*64)
+				let num64++
+				;;
+			*)
+				die "Kernel names must end with either \"32\" or \"64\""
+				;;
+		esac
+	done
+	[[ $num32 > 1 ]] && die "Only one 32-bit kernel can be configured"
+	[[ $num64 > 1 ]] && die "Only one 64-bit kernel can be configured"
+fi
 
 run_merge --oneshot genkernel
 install -d /tmp/kerncache


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     ba069a6fc43341a34e016f6cc15328e422bdd269
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:40:34 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ba069a6f

targets: Explicitly set RUN_DEFAULT_FUNCS="yes"

For documentation purposes.

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

 targets/support/pre-kmerge.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/targets/support/pre-kmerge.sh b/targets/support/pre-kmerge.sh
index a92c436c..0dfc835e 100755
--- a/targets/support/pre-kmerge.sh
+++ b/targets/support/pre-kmerge.sh
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+RUN_DEFAULT_FUNCS="yes"
+
 source /tmp/chroot-functions.sh
 
 if [[ ${clst_hostarch} == hppa ]]; then


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     909ae81f02afa15b535e349c86e8bbb8beea0af1
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:47:34 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=909ae81f

targets: Move create_handbook_icon() to its use

And use <<- so we can indent the heredoc properly.

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

 targets/support/chroot-functions.sh | 14 --------------
 targets/support/livecdfs-update.sh  | 15 +++++++++++++++
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 307a9042..22340023 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -303,20 +303,6 @@ show_debug() {
 	fi
 }
 
-create_handbook_icon() {
-	# This function creates a local icon to the Gentoo Handbook
-	echo "[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Link
-URL=file:///mnt/cdrom/docs/handbook/html/index.html
-Terminal=false
-Name=Gentoo Linux Handbook
-GenericName=Gentoo Linux Handbook
-Comment=This is a link to the local copy of the Gentoo Linux Handbook.
-Icon=text-editor" > /usr/share/applications/gentoo-handbook.desktop
-}
-
 readonly locales="
 C.UTF8 UTF-8
 "

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index 557d990b..47dbb5b3 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -243,6 +243,21 @@ case ${clst_livecd_type} in
 		# Clear out lastlog
 		rm -f /var/log/lastlog && touch /var/log/lastlog
 
+		create_handbook_icon() {
+			cat <<-EOF > /usr/share/applications/gentoo-handbook.desktop
+				[Desktop Entry]
+				Encoding=UTF-8
+				Version=1.0
+				Type=Link
+				URL=file:///mnt/cdrom/docs/handbook/html/index.html
+				Terminal=false
+				Name=Gentoo Linux Handbook
+				GenericName=Gentoo Linux Handbook
+				Comment=This is a link to the local copy of the Gentoo Linux Handbook.
+				Icon=text-editor
+			EOF
+		}
+
 		# Create our Handbook icon
 		[ -e /docs/handbook/index.html ] && create_handbook_icon
 		[ -n "${clst_livecd_overlay}" ] && [ -e ${clst_livecd_overlay}/docs/handbook/index.html ] && create_handbook_icon


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     f3b21f61d8ea7f7bdef21fc10c8bfba504333a9a
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 18:23:47 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f3b21f61

targets: Remove bizarre make_destpath() call

The commit that added it says it did so in order to "export ROOT=/ prior
to running genkernel". Why that was necessary is unclear. I can find no
evidence that genkernel needs (or needed) ROOT to be set, and why it
would need ROOT=/ seems even more doubtful.

Fixes: 8fb885ff ("Added an additional make_destpath call to kmerge.sh ...")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/kmerge.sh | 2 --
 1 file changed, 2 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index b2c4a31a..0951a6fc 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -238,8 +238,6 @@ fi
 [ -e ${clst_make_conf} ] && \
 	echo "USE=\"\${USE} ${kernel_use} build\"" >> ${clst_make_conf}
 
-make_destpath
-
 genkernel_compile
 
 sed -i "/USE=\"\${USE} ${kernel_use} \"/d" ${clst_make_conf}


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     5e1d4cfcac80ac6582acaa8b8e2b110ce5815734
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 17:52:39 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5e1d4cfc

targets: Delete some more dead code

Dead since 2015.

Fixes: 1c7687f6 ("update-modules doesn't exists anymore.")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/kmerge.sh | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index d512954b..911d7cb3 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -247,13 +247,6 @@ make_destpath
 genkernel_compile
 
 sed -i "/USE=\"\${USE} ${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 | sed -e "s/EXTRAVERSION =//" -e "s/ //g"`
-clst_fudgeuname=${VER}.${PAT}.${SUB}${EXV}
-
 unset USE
 
 if [ -n "${clst_KERNCACHE}" ]


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     64e27c1d0169e5c05007b17869cbc2d25c402746
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 17:20:06 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=64e27c1d

targets: Remove a bunch of stray newlines

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

 targets/support/kmerge.sh | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index aec4d71e..d512954b 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -128,7 +128,6 @@ fi
 
 if [ -n "${clst_KERNCACHE}" ]
 then
-
 	USE_MATCH=0
 	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE ]
 	then
@@ -201,7 +200,6 @@ then
 	SOURCESDIR="/tmp/kerncache/${kname}/sources"
 	if [ -L /usr/src/linux ]
 	then
-
 		# A kernel was merged, move it to $SOURCESDIR
 		[ -e ${SOURCESDIR} ] && rm -Rf ${SOURCESDIR}
 
@@ -210,7 +208,6 @@ then
 
 		echo "Moving kernel sources to ${SOURCESDIR} ..."
 		mv `readlink -f /usr/src/linux` ${SOURCESDIR}
-
 	fi
 	ln -sf ${SOURCESDIR} /usr/src/linux
 
@@ -227,7 +224,6 @@ then
 			touch /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION
 		fi
 	fi
-
 else
 	run_merge "${ksource}"
 	#ensure that there is a /usr/src/linux symlink and it points to the sources we just installed
@@ -242,14 +238,12 @@ $(portageq contents / $(portageq best_visible / "${ksource}" 2>/dev/null) 2>/dev
 	fi
 fi
 
-
 # Update USE flag in make.conf
 [ -e ${clst_make_conf} ] && \
 	echo "USE=\"\${USE} ${kernel_use} build\"" >> ${clst_make_conf}
 
 make_destpath
 
-
 genkernel_compile
 
 sed -i "/USE=\"\${USE} ${kernel_use} \"/d" ${clst_make_conf}
@@ -262,7 +256,6 @@ clst_fudgeuname=${VER}.${PAT}.${SUB}${EXV}
 
 unset USE
 
-
 if [ -n "${clst_KERNCACHE}" ]
 then
 	echo ${kernel_use} > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     122786ffec903927826c11832a360f87f15c00e9
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 19:15:57 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=122786ff

targets: Remove unnecessary unset USE

Dead code since 2008.

Fixes: 454c1682 ("Rather than using the environment, we write out our USE to make.conf ...")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/kmerge.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 0951a6fc..80152077 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -241,7 +241,6 @@ fi
 genkernel_compile
 
 sed -i "/USE=\"\${USE} ${kernel_use} \"/d" ${clst_make_conf}
-unset USE
 
 if [ -n "${clst_KERNCACHE}" ]
 then


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     4ffbaad404a557623c050644097b8037090595d1
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:38:39 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4ffbaad4

targets: Rewrite kerncache support

I cannot see how the code added in the undermentioned commit could have
possibly worked.

Fixes: fed3b45b ("Fix and improve kernel build when kerncache is enabled.")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/kmerge.sh | 148 +++++++++++++++-------------------------------
 1 file changed, 47 insertions(+), 101 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 6bdce30a..2eb5ee25 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -85,11 +85,6 @@ genkernel_compile() {
 	else
 		genkernel "${GK_ARGS[@]}" || exit 1
 	fi
-	if [ -n "${clst_KERNCACHE}" -a -e /var/tmp/${kname}.config ]
-	then
-		md5sum /var/tmp/${kname}.config | awk '{print $1}' > \
-			/tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG
-	fi
 }
 
 [ -n "${clst_ENVSCRIPT}" ] && source /tmp/envscript
@@ -106,112 +101,51 @@ eval eval kernel_gk_kernargs=( \$clst_boot_kernel_${kname}_gk_kernargs )
 eval "ksource=\$clst_boot_kernel_${kname}_sources"
 [[ -z ${ksource} ]] && ksource="sys-kernel/gentoo-sources"
 
-# Check if we have a match in kerncach
+kernel_version=$(portageq best_visible / "${ksource}")
 
-if [ -n "${clst_KERNCACHE}" ]
-then
-	USE_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE ]
-	then
-		STR1=$(for i in `cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE`; do echo $i; done|sort)
-		STR2=$(for i in ${kernel_use}; do echo $i; done|sort)
-		if [ "${STR1}" = "${STR2}" ]
-		then
-			USE_MATCH=1
-		else
-			[ -e /tmp/kerncache/${kname}/usr/src/linux/.config ] && \
-				rm /tmp/kerncache/${kname}/usr/src/linux/.config
-		fi
-	fi
+if [[ -n ${clst_KERNCACHE} ]]; then
+	mkdir "/tmp/kerncache/${kname}"
+	pushd "/tmp/kerncache/${kname}"
 
-	EXTRAVERSION_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION ]
-	then
-		STR1=`cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION`
-		STR2=${clst_kextraversion}
-		if [ "${STR1}" = "${STR2}" ]
-		then
-			EXTRAVERSION_MATCH=1
-		fi
-	fi
+	echo "${kernel_use}" > /tmp/USE
+	echo "${kernel_version}" > /tmp/VERSION
+	echo "${clst_kextraversion}" > /tmp/EXTRAVERSION
 
-	CONFIG_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG ]
-	then
-		if [ ! -e /var/tmp/${kname}.config ]
-		then
-			CONFIG_MATCH=1
-		else
-			STR1=`cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG`
-			STR2=`md5sum /var/tmp/${kname}.config|awk '{print $1}'`
-			if [ "${STR1}" = "${STR2}" ]
-			then
-				CONFIG_MATCH=1
-			fi
-		fi
-	fi
-
-	# install dependencies of kernel sources ahead of time in case
-	# package.provided generated below causes them not to be (re)installed
-	run_merge --onlydeps "${ksource}"
-
-	# Create the kerncache directory if it doesn't exists
-	mkdir -p /tmp/kerncache/${kname}
-
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION ]
-	then
-		KERNELVERSION=$(</tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION)
-		mkdir -p ${clst_port_conf}/profile
-		echo "${KERNELVERSION}" > ${clst_port_conf}/profile/package.provided
-	else
-		rm -f ${clst_port_conf}/profile/package.provided
+	if cmp -s {/tmp/,}USE && \
+	   cmp -s {/tmp/,}VERSION && \
+	   cmp -s {/tmp/,}EXTRAVERSION && \
+	   cmp -s /var/tmp/${kname}.config CONFIG; then
+		cached_kernel_found="true"
 	fi
 
-	# Don't use package.provided if there's a pending up/downgrade
-	if [[ "$(portageq best_visible / ${ksource})" == "${KERNELVERSION}" ]]; then
-		echo "No pending updates for ${ksource}"
-	else
-		echo "Pending updates for ${ksource}, removing package.provided"
-		rm -f ${clst_port_conf}/profile/package.provided
-	fi
+	rm -f /tmp/{USE,VERSION,EXTRAVERSION}
+	popd
+fi
 
+if [[ ! ${cached_kernel_found} ]]; then
 	USE=symlink run_merge --update --changed-use "${ksource}"
+fi
 
+if [[ -n ${clst_KERNCACHE} && ! ${cached_kernel_found} ]]; then
 	SOURCESDIR="/tmp/kerncache/${kname}/sources"
-	if [ -L /usr/src/linux ]
-	then
-		# A kernel was merged, move it to $SOURCESDIR
-		[ -e ${SOURCESDIR} ] && rm -Rf ${SOURCESDIR}
+	echo "Moving kernel sources to ${SOURCESDIR} ..."
 
-		KERNELVERSION=`portageq best_visible / "${ksource}"`
-		echo "${KERNELVERSION}" > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION
+	# FINISHME: Use rsync instead?
+	rm -rf "${SOURCESDIR}"
+	mv $(readlink -f /usr/src/linux) "${SOURCESDIR}"
+	ln -snf "${SOURCESDIR}" /usr/src/linux
+fi
 
-		echo "Moving kernel sources to ${SOURCESDIR} ..."
-		mv `readlink -f /usr/src/linux` ${SOURCESDIR}
-	fi
-	ln -sf ${SOURCESDIR} /usr/src/linux
+if [[ -n ${clst_kextraversion} ]]; then
+	echo "Setting extraversion to ${clst_kextraversion}"
 
-	# If catalyst has set to a empty string, extraversion wasn't specified so we
-	# skip this part
-	if [ "${EXTRAVERSION_MATCH}" = "0" ]
-	then
-		if [ ! "${clst_kextraversion}" = "" ]
-		then
-			echo "Setting extraversion to ${clst_kextraversion}"
-			sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
-			echo ${clst_kextraversion} > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION
-		else
-			touch /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION
-		fi
-	fi
-else
-	USE=symlink run_merge --update --changed-use "${ksource}"
-
-	if [ ! "${clst_kextraversion}" = "" ]
-	then
-		echo "Setting extraversion to ${clst_kextraversion}"
-		sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
+	if [[ -e /usr/src/linux/Makefile.bak ]]; then
+		cp /usr/src/linux/Makefile{.bak,}
+	else
+		cp /usr/src/linux/Makefile{,.bak}
 	fi
+	sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" \
+		/usr/src/linux/Makefile
 fi
 
 # Update USE flag in make.conf
@@ -222,7 +156,19 @@ genkernel_compile
 
 sed -i "/USE=\"\${USE} ${kernel_use} \"/d" ${clst_make_conf}
 
-if [ -n "${clst_KERNCACHE}" ]
-then
-	echo ${kernel_use} > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE
+# Write out CONFIG, USE, VERSION, and EXTRAVERSION files
+if [[ -n ${clst_KERNCACHE} && ! ${cached_kernel_found} ]]; then
+	pushd "/tmp/kerncache/${kname}"
+
+	cp /usr/src/linux/.config CONFIG
+	echo "${kernel_use}" > USE
+	echo "${kernel_version}" > VERSION
+	echo "${clst_kextraversion}" > EXTRAVERSION
+
+	popd
+fi
+
+if [[ ! ${cached_kernel_found} ]]; then
+	run_merge -C "${ksource}"
+	rm /usr/src/linux
 fi


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     71894ae8d88cb26270487b89f8d83a3b2fac5476
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 01:27:17 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=71894ae8

targets: Remove kernelpkgs.txt generation

Evidently this was to be consumed by the Gentoo Linux Installer, which
saw its last commit in 2008.

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

 targets/support/kmerge.sh          | 10 ----------
 targets/support/livecdfs-update.sh | 11 -----------
 2 files changed, 21 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index ee75e0a8..76d263ba 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -66,16 +66,6 @@ setup_gk_args() {
 genkernel_compile(){
 	setup_gk_args
 
-	# Build our list of kernel packages
-	case ${clst_livecd_type} in
-		gentoo-release-live*)
-			if [ -n "${kernel_merge}" ]
-			then
-				mkdir -p /usr/livecd
-				echo "${kernel_merge}" > /usr/livecd/kernelpkgs.txt
-			fi
-		;;
-	esac
 	# Build with genkernel using the set options
 	# callback is put here to avoid escaping issues
 	if [ -n "${clst_VERBOSE}" ]

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index 47dbb5b3..b7ead552 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -296,19 +296,8 @@ case ${clst_livecd_type} in
 			ln -sf /usr/livecd/gconf /etc/gconf
 		fi
 
-		if [ -e /usr/livecd/kernelpkgs.txt ]
-		then
-			rm -f /usr/livecd/kernelpkgs.txt
-		fi
-
 		touch /etc/startx
 		;;
-	* )
-		if [ -e /usr/livecd/kernelpkgs.txt ]
-		then
-			rm -f /usr/livecd/kernelpkgs.txt
-		fi
-		;;
 esac
 
 # We want the first user to be used when auto-starting X


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     d0e2681e477f6d06a2180c3f4ba9c8457ef8a374
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:48:07 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d0e2681e

targets: Use double-brackets in kmerge.sh

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

 targets/support/kmerge.sh | 50 ++++++++++++++---------------------------------
 1 file changed, 15 insertions(+), 35 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 7bf009ad..e4bd4b1c 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -15,71 +15,51 @@ genkernel_compile() {
 		--minkernpackage=/tmp/kerncache/${kname}-kernel-initrd-${clst_version_stamp}.tar.bz2 all
 	)
 	# extra genkernel options that we have to test for
-	if [ -n "${clst_gk_mainargs}" ]
-	then
+	if [[ -n ${clst_gk_mainargs} ]]; then
 		GK_ARGS+=(${clst_gk_mainargs})
 	fi
-	if [ -n "${clst_KERNCACHE}" ]
-	then
+	if [[ -n ${clst_KERNCACHE} ]]; then
 		GK_ARGS+=(--kerncache=/tmp/kerncache/${kname}-kerncache-${clst_version_stamp}.tar.bz2)
 	fi
-	if [ -e /var/tmp/${kname}.config ]
-	then
+	if [[ -e /var/tmp/${kname}.config ]]; then
 		GK_ARGS+=(--kernel-config=/var/tmp/${kname}.config)
 	fi
-
-	if [ -d "/tmp/initramfs_overlay/${initramfs_overlay}" ]
-	then
+	if [[ -d /tmp/initramfs_overlay/${initramfs_overlay} ]]; then
 		GK_ARGS+=(--initramfs-overlay=/tmp/initramfs_overlay/${initramfs_overlay})
 	fi
-	if [ -n "${clst_CCACHE}" ]
-	then
+	if [[ -n ${clst_CCACHE} ]]; then
 		GK_ARGS+=(--kernel-cc=/usr/lib/ccache/bin/gcc --utils-cc=/usr/lib/ccache/bin/gcc)
 	fi
-
-	if [ -n "${clst_linuxrc}" ]
-	then
+	if [[ -n ${clst_linuxrc} ]]; then
 		GK_ARGS+=(--linuxrc=/tmp/linuxrc)
 	fi
-
-	if [ -n "${clst_busybox_config}" ]
-	then
+	if [[ -n ${clst_busybox_config} ]]; then
 		GK_ARGS+=(--busybox-config=/tmp/busy-config)
 	fi
-
-	if [ "${clst_target}" == "netboot" ]
-	then
+	if [[ ${clst_target} == netboot ]]; then
 		GK_ARGS+=(--netboot)
 
-		if [ -n "${clst_merge_path}" ]
-		then
+		if [[ -n ${clst_merge_path} ]]; then
 			GK_ARGS+=(--initramfs-overlay="${clst_merge_path}")
 		fi
 	fi
-
-	if [ -n "${clst_VERBOSE}" ]
-	then
+	if [[ -n ${clst_VERBOSE} ]]; then
 		GK_ARGS+=(--loglevel=2)
 	fi
 
-	# Build with genkernel using the set options
-	# callback is put here to avoid escaping issues
-	if [ -n "${clst_VERBOSE}" ]
-	then
+	if [[ -n ${clst_VERBOSE} ]]; then
 		gk_callback_opts=(-vN)
 	else
 		gk_callback_opts=(-qN)
 	fi
-	if [ -n "${clst_KERNCACHE}" ]
-	then
+	if [[ -n ${clst_KERNCACHE} ]]; then
 		gk_callback_opts+=(-kb)
 	fi
-	if [ -n "${clst_FETCH}" ]
-	then
+	if [[ -n ${clst_FETCH} ]]; then
 		gk_callback_opts+=(-f)
 	fi
-	if [ "${kernel_merge}" != "" ]
-	then
+
+	if [[ -n ${kernel_merge} ]]; then
 		genkernel --callback="emerge ${gk_callback_opts[@]} ${kernel_merge}" \
 			"${GK_ARGS[@]}" || exit 1
 	else


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     7ee544f6794c6c9732f4a78244a247af382239fc
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 23:10:36 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=7ee544f6

targets: Remove unnecessary unset PACKAGES

Dead code since 2008.

Fixes: b79d06a3 ("Remove temporary package listing code, ...")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/chroot-functions.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 22340023..7222892e 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -270,7 +270,6 @@ run_merge() {
 show_debug() {
 	if [ -n "${clst_DEBUG}" ]
 	then
-		unset PACKAGES
 		echo "DEBUG:"
 		echo "Profile/target info:"
 		echo "Profile inheritance:"


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     86cbba5c3dfd16f40648d8185d8e002c88217b80
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 01:33:30 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=86cbba5c

targets: Merge setup_gk_args() and genkernel_compile()

These both just do a bunch of argument concatenation and are not
separate functions in any meaningful way.

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

 targets/support/kmerge.sh | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 76d263ba..6bdce30a 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -4,7 +4,7 @@ source /tmp/chroot-functions.sh
 
 install -d /tmp/kerncache
 
-setup_gk_args() {
+genkernel_compile() {
 	# default genkernel args
 	GK_ARGS=(
 		"${kernel_gk_kernargs[@]}"
@@ -61,10 +61,6 @@ setup_gk_args() {
 	then
 		GK_ARGS+=(--loglevel=2)
 	fi
-}
-
-genkernel_compile(){
-	setup_gk_args
 
 	# Build with genkernel using the set options
 	# callback is put here to avoid escaping issues


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  2:50 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     695a373649886256cb1cd9281359cc596848507e
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:41:09 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 02:50:08 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=695a3736

targets: Remove unnecessary CONFIG_PROTECT assignment

CONFIG_PROTECT is set in run_merge, making this assignment and export
unnecessary.

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

 targets/support/kmerge.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 2eb5ee25..7bf009ad 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -88,7 +88,6 @@ genkernel_compile() {
 }
 
 [ -n "${clst_ENVSCRIPT}" ] && source /tmp/envscript
-export CONFIG_PROTECT="-*"
 
 # Set the timezone for the kernel build
 rm /etc/localtime


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  4:31 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     c6c25f8cc6ff56690316c29179e29d4b018c03a5
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:38:54 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 03:55:05 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=c6c25f8c

targets: Use full 'sys-kernel/genkernel' package name

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

 targets/support/pre-kmerge.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/targets/support/pre-kmerge.sh b/targets/support/pre-kmerge.sh
index 165dfd51..a92c436c 100755
--- a/targets/support/pre-kmerge.sh
+++ b/targets/support/pre-kmerge.sh
@@ -20,5 +20,5 @@ if [[ ${clst_hostarch} == hppa ]]; then
 	[[ $num64 > 1 ]] && die "Only one 64-bit kernel can be configured"
 fi
 
-run_merge --oneshot genkernel
+run_merge --oneshot sys-kernel/genkernel
 install -d /tmp/kerncache


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  4:31 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     3676184ec6609b36c1b04523ce36a1dfa3f73b79
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 23:30:05 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 03:54:49 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=3676184e

targets: Emerge kernel sources with --update

Ensure that we have the appropriate version.

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

 targets/support/kmerge.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 7f1f029c..c241440a 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -189,7 +189,7 @@ then
 		rm -f ${clst_port_conf}/profile/package.provided
 	fi
 
-	USE=symlink run_merge "${ksource}"
+	USE=symlink run_merge --update "${ksource}"
 
 	SOURCESDIR="/tmp/kerncache/${kname}/sources"
 	if [ -L /usr/src/linux ]
@@ -219,7 +219,7 @@ then
 		fi
 	fi
 else
-	USE=symlink run_merge "${ksource}"
+	USE=symlink run_merge --update "${ksource}"
 
 	if [ ! "${clst_kextraversion}" = "" ]
 	then


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  4:31 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     130ada4d364931f42889fa1197504aa2ce6720b6
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 23:10:36 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 03:55:05 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=130ada4d

targets: Remove unnecessary unset PACKAGES

Dead code since 2008.

Fixes: b79d06a3 ("Remove temporary package listing code, ...")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/chroot-functions.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 22340023..7222892e 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -270,7 +270,6 @@ run_merge() {
 show_debug() {
 	if [ -n "${clst_DEBUG}" ]
 	then
-		unset PACKAGES
 		echo "DEBUG:"
 		echo "Profile/target info:"
 		echo "Profile inheritance:"


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  4:31 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     e7a8563d44041f61736562bd9923e64a8c7ffead
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:47:34 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 03:55:05 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e7a8563d

targets: Move create_handbook_icon() to its use

And use <<- so we can indent the heredoc properly.

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

 targets/support/chroot-functions.sh | 14 --------------
 targets/support/livecdfs-update.sh  | 15 +++++++++++++++
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 307a9042..22340023 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -303,20 +303,6 @@ show_debug() {
 	fi
 }
 
-create_handbook_icon() {
-	# This function creates a local icon to the Gentoo Handbook
-	echo "[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Link
-URL=file:///mnt/cdrom/docs/handbook/html/index.html
-Terminal=false
-Name=Gentoo Linux Handbook
-GenericName=Gentoo Linux Handbook
-Comment=This is a link to the local copy of the Gentoo Linux Handbook.
-Icon=text-editor" > /usr/share/applications/gentoo-handbook.desktop
-}
-
 readonly locales="
 C.UTF8 UTF-8
 "

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index 557d990b..47dbb5b3 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -243,6 +243,21 @@ case ${clst_livecd_type} in
 		# Clear out lastlog
 		rm -f /var/log/lastlog && touch /var/log/lastlog
 
+		create_handbook_icon() {
+			cat <<-EOF > /usr/share/applications/gentoo-handbook.desktop
+				[Desktop Entry]
+				Encoding=UTF-8
+				Version=1.0
+				Type=Link
+				URL=file:///mnt/cdrom/docs/handbook/html/index.html
+				Terminal=false
+				Name=Gentoo Linux Handbook
+				GenericName=Gentoo Linux Handbook
+				Comment=This is a link to the local copy of the Gentoo Linux Handbook.
+				Icon=text-editor
+			EOF
+		}
+
 		# Create our Handbook icon
 		[ -e /docs/handbook/index.html ] && create_handbook_icon
 		[ -n "${clst_livecd_overlay}" ] && [ -e ${clst_livecd_overlay}/docs/handbook/index.html ] && create_handbook_icon


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  4:31 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     4b9f3ad1254ee70269c0aa4cc26cf9f21d0556b9
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:42:13 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 03:55:05 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4b9f3ad1

targets: Inline run_default_funcs() function

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

 targets/support/chroot-functions.sh | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index b531eb6a..307a9042 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -303,15 +303,6 @@ show_debug() {
 	fi
 }
 
-run_default_funcs() {
-	if [ "${RUN_DEFAULT_FUNCS}" != "no" ]
-	then
-		update_env_settings
-		setup_features
-		show_debug
-	fi
-}
-
 create_handbook_icon() {
 	# This function creates a local icon to the Gentoo Handbook
 	echo "[Desktop Entry]
@@ -330,5 +321,9 @@ readonly locales="
 C.UTF8 UTF-8
 "
 
-# We do this everywhere, so why not put it in this script
-run_default_funcs
+if [[ ${RUN_DEFAULT_FUNCS} != no ]]
+then
+	update_env_settings
+	setup_features
+	show_debug
+fi


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  4:31 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     639bbd1f1aabcf217286f6d59c62320be536603f
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:40:34 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 03:55:05 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=639bbd1f

targets: Explicitly set RUN_DEFAULT_FUNCS="yes"

For documentation purposes.

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

 targets/support/pre-kmerge.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/targets/support/pre-kmerge.sh b/targets/support/pre-kmerge.sh
index a92c436c..0dfc835e 100755
--- a/targets/support/pre-kmerge.sh
+++ b/targets/support/pre-kmerge.sh
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+RUN_DEFAULT_FUNCS="yes"
+
 source /tmp/chroot-functions.sh
 
 if [[ ${clst_hostarch} == hppa ]]; then


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  4:31 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     18c4f5bf51af9dab2779cafd2689121d42388aa3
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:38:06 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 03:55:05 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=18c4f5bf

targets: Rewrite hppa pre-kmerge check

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

 targets/support/pre-kmerge.sh | 43 +++++++++++++++++--------------------------
 1 file changed, 17 insertions(+), 26 deletions(-)

diff --git a/targets/support/pre-kmerge.sh b/targets/support/pre-kmerge.sh
index dd51ae9a..165dfd51 100755
--- a/targets/support/pre-kmerge.sh
+++ b/targets/support/pre-kmerge.sh
@@ -2,32 +2,23 @@
 
 source /tmp/chroot-functions.sh
 
-case ${clst_hostarch} in
-	hppa)
-		got_32=0
-		got_64=0
-		for i in ${clst_boot_kernel}
-		do
-			if [ "${i: -2}" == "32" ]
-			then
-				if [ $got_32 -eq 1 ]
-				then
-					die "Only one 32 bit kernel can be configured"
-				fi
-				got_32=1
-			elif [ "${i: -2}" == "64" ]
-			then
-				if [ $got_64 -eq 1 ]
-				then
-					die "Only one 64 bit kernel can be configured"
-				fi
-				got_64=1
-			else
-				die "Kernel names must end by either 32 or 64"
-			fi
-		done
-	;;
-esac
+if [[ ${clst_hostarch} == hppa ]]; then
+	for i in ${clst_boot_kernel}; do
+		case ${i} in
+			*32)
+				let num32++
+				;;
+			*64)
+				let num64++
+				;;
+			*)
+				die "Kernel names must end with either \"32\" or \"64\""
+				;;
+		esac
+	done
+	[[ $num32 > 1 ]] && die "Only one 32-bit kernel can be configured"
+	[[ $num64 > 1 ]] && die "Only one 64-bit kernel can be configured"
+fi
 
 run_merge --oneshot genkernel
 install -d /tmp/kerncache


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  4:31 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     410460f79a4cc9b83635389584aee0a1a31b1839
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:48:07 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 03:55:48 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=410460f7

targets: Use double-brackets in kmerge.sh

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

 targets/support/kmerge.sh | 50 ++++++++++++++---------------------------------
 1 file changed, 15 insertions(+), 35 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index c0fdcfcc..46d7f89d 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -15,71 +15,51 @@ genkernel_compile() {
 		--minkernpackage=/tmp/kerncache/${kname}-kernel-initrd-${clst_version_stamp}.tar.bz2 all
 	)
 	# extra genkernel options that we have to test for
-	if [ -n "${clst_gk_mainargs}" ]
-	then
+	if [[ -n ${clst_gk_mainargs} ]]; then
 		GK_ARGS+=(${clst_gk_mainargs})
 	fi
-	if [ -n "${clst_KERNCACHE}" ]
-	then
+	if [[ -n ${clst_KERNCACHE} ]]; then
 		GK_ARGS+=(--kerncache=/tmp/kerncache/${kname}-kerncache-${clst_version_stamp}.tar.bz2)
 	fi
-	if [ -e /var/tmp/${kname}.config ]
-	then
+	if [[ -e /var/tmp/${kname}.config ]]; then
 		GK_ARGS+=(--kernel-config=/var/tmp/${kname}.config)
 	fi
-
-	if [ -d "/tmp/initramfs_overlay/${initramfs_overlay}" ]
-	then
+	if [[ -d /tmp/initramfs_overlay/${initramfs_overlay} ]]; then
 		GK_ARGS+=(--initramfs-overlay=/tmp/initramfs_overlay/${initramfs_overlay})
 	fi
-	if [ -n "${clst_CCACHE}" ]
-	then
+	if [[ -n ${clst_CCACHE} ]]; then
 		GK_ARGS+=(--kernel-cc=/usr/lib/ccache/bin/gcc --utils-cc=/usr/lib/ccache/bin/gcc)
 	fi
-
-	if [ -n "${clst_linuxrc}" ]
-	then
+	if [[ -n ${clst_linuxrc} ]]; then
 		GK_ARGS+=(--linuxrc=/tmp/linuxrc)
 	fi
-
-	if [ -n "${clst_busybox_config}" ]
-	then
+	if [[ -n ${clst_busybox_config} ]]; then
 		GK_ARGS+=(--busybox-config=/tmp/busy-config)
 	fi
-
-	if [ "${clst_target}" == "netboot" ]
-	then
+	if [[ ${clst_target} == netboot ]]; then
 		GK_ARGS+=(--netboot)
 
-		if [ -n "${clst_merge_path}" ]
-		then
+		if [[ -n ${clst_merge_path} ]]; then
 			GK_ARGS+=(--initramfs-overlay="${clst_merge_path}")
 		fi
 	fi
-
-	if [ -n "${clst_VERBOSE}" ]
-	then
+	if [[ -n ${clst_VERBOSE} ]]; then
 		GK_ARGS+=(--loglevel=2)
 	fi
 
-	# Build with genkernel using the set options
-	# callback is put here to avoid escaping issues
-	if [ -n "${clst_VERBOSE}" ]
-	then
+	if [[ -n ${clst_VERBOSE} ]]; then
 		gk_callback_opts=(-vN)
 	else
 		gk_callback_opts=(-qN)
 	fi
-	if [ -n "${clst_KERNCACHE}" ]
-	then
+	if [[ -n ${clst_KERNCACHE} ]]; then
 		gk_callback_opts+=(-kb)
 	fi
-	if [ -n "${clst_FETCH}" ]
-	then
+	if [[ -n ${clst_FETCH} ]]; then
 		gk_callback_opts+=(-f)
 	fi
-	if [ "${kernel_merge}" != "" ]
-	then
+
+	if [[ -n ${kernel_merge} ]]; then
 		genkernel --callback="emerge ${gk_callback_opts[@]} ${kernel_merge}" \
 			"${GK_ARGS[@]}" || exit 1
 	else


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  4:31 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     ee1676ceff535cda3a1867a6407bd31e49071e4c
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:41:09 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 03:55:48 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ee1676ce

targets: Remove unnecessary CONFIG_PROTECT assignment

CONFIG_PROTECT is set in run_merge, making this assignment and export
unnecessary.

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

 targets/support/kmerge.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 3b1230db..c0fdcfcc 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -88,7 +88,6 @@ genkernel_compile() {
 }
 
 [ -n "${clst_ENVSCRIPT}" ] && source /tmp/envscript
-export CONFIG_PROTECT="-*"
 
 # Set the timezone for the kernel build
 rm /etc/localtime


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  4:31 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     34102fa16251ae14e55e43bdc2976304d06e2f59
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:38:39 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 03:55:47 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=34102fa1

targets: Rewrite kerncache support

I cannot see how the code added in the undermentioned commit could have
possibly worked.

Fixes: fed3b45b ("Fix and improve kernel build when kerncache is enabled.")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/kmerge.sh | 148 +++++++++++++++-------------------------------
 1 file changed, 47 insertions(+), 101 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index a9a2a72a..3b1230db 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -85,11 +85,6 @@ genkernel_compile() {
 	else
 		genkernel "${GK_ARGS[@]}" || exit 1
 	fi
-	if [ -n "${clst_KERNCACHE}" -a -e /var/tmp/${kname}.config ]
-	then
-		md5sum /var/tmp/${kname}.config | awk '{print $1}' > \
-			/tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG
-	fi
 }
 
 [ -n "${clst_ENVSCRIPT}" ] && source /tmp/envscript
@@ -106,112 +101,51 @@ eval eval kernel_gk_kernargs=( \$clst_boot_kernel_${kname}_gk_kernargs )
 eval "ksource=\$clst_boot_kernel_${kname}_sources"
 [[ -z ${ksource} ]] && ksource="sys-kernel/gentoo-sources"
 
-# Check if we have a match in kerncach
+kernel_version=$(portageq best_visible / "${ksource}")
 
-if [ -n "${clst_KERNCACHE}" ]
-then
-	USE_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE ]
-	then
-		STR1=$(for i in `cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE`; do echo $i; done|sort)
-		STR2=$(for i in ${kernel_use}; do echo $i; done|sort)
-		if [ "${STR1}" = "${STR2}" ]
-		then
-			USE_MATCH=1
-		else
-			[ -e /tmp/kerncache/${kname}/usr/src/linux/.config ] && \
-				rm /tmp/kerncache/${kname}/usr/src/linux/.config
-		fi
-	fi
+if [[ -n ${clst_KERNCACHE} ]]; then
+	mkdir "/tmp/kerncache/${kname}"
+	pushd "/tmp/kerncache/${kname}" >/dev/null
 
-	EXTRAVERSION_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION ]
-	then
-		STR1=`cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION`
-		STR2=${clst_kextraversion}
-		if [ "${STR1}" = "${STR2}" ]
-		then
-			EXTRAVERSION_MATCH=1
-		fi
-	fi
+	echo "${kernel_use}" > /tmp/USE
+	echo "${kernel_version}" > /tmp/VERSION
+	echo "${clst_kextraversion}" > /tmp/EXTRAVERSION
 
-	CONFIG_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG ]
-	then
-		if [ ! -e /var/tmp/${kname}.config ]
-		then
-			CONFIG_MATCH=1
-		else
-			STR1=`cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG`
-			STR2=`md5sum /var/tmp/${kname}.config|awk '{print $1}'`
-			if [ "${STR1}" = "${STR2}" ]
-			then
-				CONFIG_MATCH=1
-			fi
-		fi
-	fi
-
-	# install dependencies of kernel sources ahead of time in case
-	# package.provided generated below causes them not to be (re)installed
-	run_merge --onlydeps "${ksource}"
-
-	# Create the kerncache directory if it doesn't exists
-	mkdir -p /tmp/kerncache/${kname}
-
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION ]
-	then
-		KERNELVERSION=$(</tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION)
-		mkdir -p ${clst_port_conf}/profile
-		echo "${KERNELVERSION}" > ${clst_port_conf}/profile/package.provided
-	else
-		rm -f ${clst_port_conf}/profile/package.provided
+	if cmp -s {/tmp/,}USE && \
+	   cmp -s {/tmp/,}VERSION && \
+	   cmp -s {/tmp/,}EXTRAVERSION && \
+	   cmp -s /var/tmp/${kname}.config CONFIG; then
+		cached_kernel_found="true"
 	fi
 
-	# Don't use package.provided if there's a pending up/downgrade
-	if [[ "$(portageq best_visible / ${ksource})" == "${KERNELVERSION}" ]]; then
-		echo "No pending updates for ${ksource}"
-	else
-		echo "Pending updates for ${ksource}, removing package.provided"
-		rm -f ${clst_port_conf}/profile/package.provided
-	fi
+	rm -f /tmp/{USE,VERSION,EXTRAVERSION}
+	popd >/dev/null
+fi
 
+if [[ ! ${cached_kernel_found} ]]; then
 	USE=symlink run_merge --update "${ksource}"
+fi
 
+if [[ -n ${clst_KERNCACHE} && ! ${cached_kernel_found} ]]; then
 	SOURCESDIR="/tmp/kerncache/${kname}/sources"
-	if [ -L /usr/src/linux ]
-	then
-		# A kernel was merged, move it to $SOURCESDIR
-		[ -e ${SOURCESDIR} ] && rm -Rf ${SOURCESDIR}
+	echo "Moving kernel sources to ${SOURCESDIR} ..."
 
-		KERNELVERSION=`portageq best_visible / "${ksource}"`
-		echo "${KERNELVERSION}" > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION
+	# FINISHME: Use rsync instead?
+	rm -rf "${SOURCESDIR}"
+	mv $(readlink -f /usr/src/linux) "${SOURCESDIR}"
+	ln -snf "${SOURCESDIR}" /usr/src/linux
+fi
 
-		echo "Moving kernel sources to ${SOURCESDIR} ..."
-		mv `readlink -f /usr/src/linux` ${SOURCESDIR}
-	fi
-	ln -sf ${SOURCESDIR} /usr/src/linux
+if [[ -n ${clst_kextraversion} ]]; then
+	echo "Setting extraversion to ${clst_kextraversion}"
 
-	# If catalyst has set to a empty string, extraversion wasn't specified so we
-	# skip this part
-	if [ "${EXTRAVERSION_MATCH}" = "0" ]
-	then
-		if [ ! "${clst_kextraversion}" = "" ]
-		then
-			echo "Setting extraversion to ${clst_kextraversion}"
-			sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
-			echo ${clst_kextraversion} > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION
-		else
-			touch /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION
-		fi
-	fi
-else
-	USE=symlink run_merge --update "${ksource}"
-
-	if [ ! "${clst_kextraversion}" = "" ]
-	then
-		echo "Setting extraversion to ${clst_kextraversion}"
-		sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
+	if [[ -e /usr/src/linux/Makefile.bak ]]; then
+		cp /usr/src/linux/Makefile{.bak,}
+	else
+		cp /usr/src/linux/Makefile{,.bak}
 	fi
+	sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" \
+		/usr/src/linux/Makefile
 fi
 
 # Update USE flag in make.conf
@@ -222,7 +156,19 @@ genkernel_compile
 
 sed -i "/USE=\"\${USE} ${kernel_use} \"/d" ${clst_make_conf}
 
-if [ -n "${clst_KERNCACHE}" ]
-then
-	echo ${kernel_use} > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE
+# Write out CONFIG, USE, VERSION, and EXTRAVERSION files
+if [[ -n ${clst_KERNCACHE} && ! ${cached_kernel_found} ]]; then
+	pushd "/tmp/kerncache/${kname}" >/dev/null
+
+	cp /usr/src/linux/.config CONFIG
+	echo "${kernel_use}" > USE
+	echo "${kernel_version}" > VERSION
+	echo "${clst_kextraversion}" > EXTRAVERSION
+
+	popd >/dev/null
+fi
+
+if [[ ! ${cached_kernel_found} ]]; then
+	run_merge -C "${ksource}"
+	rm /usr/src/linux
 fi


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  4:31 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     01b88d370af30a9c77f7755dd86b9a2c09b07c16
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 01:33:30 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 03:55:05 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=01b88d37

targets: Merge setup_gk_args() and genkernel_compile()

These both just do a bunch of argument concatenation and are not
separate functions in any meaningful way.

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

 targets/support/kmerge.sh | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index b8cc0ce6..a9a2a72a 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -4,7 +4,7 @@ source /tmp/chroot-functions.sh
 
 install -d /tmp/kerncache
 
-setup_gk_args() {
+genkernel_compile() {
 	# default genkernel args
 	GK_ARGS=(
 		"${kernel_gk_kernargs[@]}"
@@ -61,10 +61,6 @@ setup_gk_args() {
 	then
 		GK_ARGS+=(--loglevel=2)
 	fi
-}
-
-genkernel_compile(){
-	setup_gk_args
 
 	# Build with genkernel using the set options
 	# callback is put here to avoid escaping issues


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  4:31 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     d221236a8b9d6ac165f11114ecd83934bb3903d0
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 01:27:17 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 03:55:05 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d221236a

targets: Remove kernelpkgs.txt generation

Evidently this was to be consumed by the Gentoo Linux Installer, which
saw its last commit in 2008.

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

 targets/support/kmerge.sh          | 10 ----------
 targets/support/livecdfs-update.sh | 11 -----------
 2 files changed, 21 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index c241440a..b8cc0ce6 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -66,16 +66,6 @@ setup_gk_args() {
 genkernel_compile(){
 	setup_gk_args
 
-	# Build our list of kernel packages
-	case ${clst_livecd_type} in
-		gentoo-release-live*)
-			if [ -n "${kernel_merge}" ]
-			then
-				mkdir -p /usr/livecd
-				echo "${kernel_merge}" > /usr/livecd/kernelpkgs.txt
-			fi
-		;;
-	esac
 	# Build with genkernel using the set options
 	# callback is put here to avoid escaping issues
 	if [ -n "${clst_VERBOSE}" ]

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index 47dbb5b3..b7ead552 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -296,19 +296,8 @@ case ${clst_livecd_type} in
 			ln -sf /usr/livecd/gconf /etc/gconf
 		fi
 
-		if [ -e /usr/livecd/kernelpkgs.txt ]
-		then
-			rm -f /usr/livecd/kernelpkgs.txt
-		fi
-
 		touch /etc/startx
 		;;
-	* )
-		if [ -e /usr/livecd/kernelpkgs.txt ]
-		then
-			rm -f /usr/livecd/kernelpkgs.txt
-		fi
-		;;
 esac
 
 # We want the first user to be used when auto-starting X


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
  2020-10-21 17:58 [gentoo-commits] proj/catalyst:master " Matt Turner
@ 2020-10-20  8:30 ` Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     5af4e00582761330325abdef14f507e8aaa1dc99
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 06:59:20 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 07:10:01 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5af4e005

targets: Remove wrong make.conf munging

With pkgcache fixed for kernel sources in a prior commit, I noticed that
if a livecd-stage2 built three kernels, the first would emerge normally
and build a binpkg, the second would emerge and fail to use the binpkg
produced earlier, and the third would use a previously produced binpkg.
I discovered the reason is that the second and third emerges are run
after USE="... build" has been added to make.conf. We intentionally
removed this in commit c0fcbf02 ("kmerge.sh: Don't set USE=build for
emerging kernels.") years ago, so I was surprised to find this code.

The commit mentioned below inexplicably (and wrongly) readded USE=build
to make.conf, failed to update the sed command to remove it, and readded
the addition in entirely the wrong spot so it didn't even affect the
kernel merge.

genkernel doesn't source the system's make.conf, so this code would be
entirely useless if it wasn't harmful.

Fixes: 0343a18e ("Fix merging kernel without kerncache enabled.")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/kmerge.sh | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 4f82a01f..1209e330 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -238,14 +238,8 @@ $(portageq contents / $(portageq best_visible / "${ksource}" 2>/dev/null) 2>/dev
 	fi
 fi
 
-# Update USE flag in make.conf
-[ -e ${clst_make_conf} ] && \
-	echo "USE=\"\${USE} ${kernel_use} build\"" >> ${clst_make_conf}
-
 genkernel_compile
 
-sed -i "/USE=\"\${USE} ${kernel_use} \"/d" ${clst_make_conf}
-
 if [ -n "${clst_KERNCACHE}" ]
 then
 	echo ${kernel_use} > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  8:30 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     0fe50361b38be1f7ad67d4172962c4d2f4adb453
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:08:28 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 07:10:03 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=0fe50361

targets: Use USE=symlink when emerging kernel sources

Just use the thing that exists instead of rolling our own...

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

 targets/support/kmerge.sh | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 1209e330..7eb18313 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -193,9 +193,7 @@ then
 		rm -f ${clst_port_conf}/profile/package.provided
 	fi
 
-	[ -L /usr/src/linux ] && rm -f /usr/src/linux
-
-	run_merge "${ksource}"
+	USE=symlink run_merge "${ksource}"
 
 	SOURCESDIR="/tmp/kerncache/${kname}/sources"
 	if [ -L /usr/src/linux ]
@@ -225,12 +223,8 @@ then
 		fi
 	fi
 else
-	run_merge "${ksource}"
-	#ensure that there is a /usr/src/linux symlink and it points to the sources we just installed
-	echo "Adjusting /usr/src/linux to point to \
-$(portageq contents / $(portageq best_visible / "${ksource}" 2>/dev/null) 2>/dev/null | grep --color=never '/usr/src/' | head -n1 2>/dev/null)"
-	ln -snf $(portageq contents / $(portageq best_visible / "${ksource}" 2>/dev/null) 2>/dev/null | grep --color=never '/usr/src/' | head -n1 2>/dev/null) \
-		/usr/src/linux
+	USE=symlink run_merge "${ksource}"
+
 	if [ ! "${clst_kextraversion}" = "" ]
 	then
 		echo "Setting extraversion to ${clst_kextraversion}"


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
  2020-10-21 17:58 [gentoo-commits] proj/catalyst:master " Matt Turner
@ 2020-10-20  8:30 ` Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     ffe1b6669ba37b166ba968c0cc99267f1b1f0aab
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 18:17:56 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 07:10:03 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ffe1b666

targets: Default to sys-kernel/gentoo-sources directly

Using virtual/linux-sources was a nice idea, but leads to multiple
failures in practice. For example, we use 'portageq contents' later, and
the virtual provides no files. We could handle the indirection with
'portageq expand_virtual' in some cases but that requires the virtual to
be installed on the system.

Fixes: 388def77 ("kmerge.sh blows away the /usr/src/linux symlink ...")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/kmerge.sh | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 40e208e4..c4136dec 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -118,11 +118,7 @@ eval "kernel_merge=\$clst_boot_kernel_${kname}_packages"
 eval "kernel_use=\$clst_boot_kernel_${kname}_use"
 eval eval kernel_gk_kernargs=( \$clst_boot_kernel_${kname}_gk_kernargs )
 eval "ksource=\$clst_boot_kernel_${kname}_sources"
-
-if [ -z "${ksource}" ]
-then
-	ksource="virtual/linux-sources"
-fi
+[[ -z ${ksource} ]] && ksource="sys-kernel/gentoo-sources"
 
 # Check if we have a match in kerncach
 


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  8:30 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     f75188c7dfc1f7682c393d1d4b1b1ad4eae97a36
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:38:06 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 07:10:03 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f75188c7

targets: Rewrite hppa pre-kmerge check

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

 targets/support/pre-kmerge.sh | 43 +++++++++++++++++--------------------------
 1 file changed, 17 insertions(+), 26 deletions(-)

diff --git a/targets/support/pre-kmerge.sh b/targets/support/pre-kmerge.sh
index dd51ae9a..165dfd51 100755
--- a/targets/support/pre-kmerge.sh
+++ b/targets/support/pre-kmerge.sh
@@ -2,32 +2,23 @@
 
 source /tmp/chroot-functions.sh
 
-case ${clst_hostarch} in
-	hppa)
-		got_32=0
-		got_64=0
-		for i in ${clst_boot_kernel}
-		do
-			if [ "${i: -2}" == "32" ]
-			then
-				if [ $got_32 -eq 1 ]
-				then
-					die "Only one 32 bit kernel can be configured"
-				fi
-				got_32=1
-			elif [ "${i: -2}" == "64" ]
-			then
-				if [ $got_64 -eq 1 ]
-				then
-					die "Only one 64 bit kernel can be configured"
-				fi
-				got_64=1
-			else
-				die "Kernel names must end by either 32 or 64"
-			fi
-		done
-	;;
-esac
+if [[ ${clst_hostarch} == hppa ]]; then
+	for i in ${clst_boot_kernel}; do
+		case ${i} in
+			*32)
+				let num32++
+				;;
+			*64)
+				let num64++
+				;;
+			*)
+				die "Kernel names must end with either \"32\" or \"64\""
+				;;
+		esac
+	done
+	[[ $num32 > 1 ]] && die "Only one 32-bit kernel can be configured"
+	[[ $num64 > 1 ]] && die "Only one 64-bit kernel can be configured"
+fi
 
 run_merge --oneshot genkernel
 install -d /tmp/kerncache


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
  2020-10-21 17:58 [gentoo-commits] proj/catalyst:master " Matt Turner
@ 2020-10-20  8:30 ` Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     852b486b445cf9c49800c6052142bde972706c41
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 18:23:47 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 07:09:16 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=852b486b

targets: Remove bizarre make_destpath() call

The commit that added it says it did so in order to "export ROOT=/ prior
to running genkernel". Why that was necessary is unclear. I can find no
evidence that genkernel needs (or needed) ROOT to be set, and why it
would need ROOT=/ seems even more doubtful.

Fixes: 8fb885ff ("Added an additional make_destpath call to kmerge.sh ...")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/kmerge.sh | 2 --
 1 file changed, 2 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 911d7cb3..d65b8142 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -242,8 +242,6 @@ fi
 [ -e ${clst_make_conf} ] && \
 	echo "USE=\"\${USE} ${kernel_use} build\"" >> ${clst_make_conf}
 
-make_destpath
-
 genkernel_compile
 
 sed -i "/USE=\"\${USE} ${kernel_use} \"/d" ${clst_make_conf}


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
  2020-10-21 17:58 [gentoo-commits] proj/catalyst:master " Matt Turner
@ 2020-10-20  8:30 ` Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     24029c40a07b8e9def8ec5d59010c430c52a50c4
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 19:15:57 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 07:09:16 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=24029c40

targets: Remove unnecessary unset USE

Dead code since 2008.

Fixes: 454c1682 ("Rather than using the environment, we write out our USE to make.conf ...")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/kmerge.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index d65b8142..4f82a01f 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -245,7 +245,6 @@ fi
 genkernel_compile
 
 sed -i "/USE=\"\${USE} ${kernel_use} \"/d" ${clst_make_conf}
-unset USE
 
 if [ -n "${clst_KERNCACHE}" ]
 then


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
  2020-10-21 17:58 [gentoo-commits] proj/catalyst:master " Matt Turner
@ 2020-10-20  8:30 ` Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     59ea20315a3df7941b4439dd14746133ac03c069
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 23:30:05 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 07:10:03 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=59ea2031

targets: Emerge kernel sources with --update

Ensure that we have the appropriate version.

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

 targets/support/kmerge.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 7eb18313..40e208e4 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -193,7 +193,7 @@ then
 		rm -f ${clst_port_conf}/profile/package.provided
 	fi
 
-	USE=symlink run_merge "${ksource}"
+	USE=symlink run_merge --update "${ksource}"
 
 	SOURCESDIR="/tmp/kerncache/${kname}/sources"
 	if [ -L /usr/src/linux ]
@@ -223,7 +223,7 @@ then
 		fi
 	fi
 else
-	USE=symlink run_merge "${ksource}"
+	USE=symlink run_merge --update "${ksource}"
 
 	if [ ! "${clst_kextraversion}" = "" ]
 	then


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  8:30 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     8f709204b54c85464d58a677eb27e139a549e2cf
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:41:09 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 08:30:20 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=8f709204

targets: Remove unnecessary CONFIG_PROTECT assignment

CONFIG_PROTECT is set in run_merge, making this assignment and export
unnecessary.

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

 targets/support/kmerge.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 105a49e7..6c921994 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -88,7 +88,6 @@ genkernel_compile() {
 }
 
 [ -n "${clst_ENVSCRIPT}" ] && source /tmp/envscript
-export CONFIG_PROTECT="-*"
 
 # Set the timezone for the kernel build
 rm /etc/localtime


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
  2020-10-29 21:00 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
@ 2020-10-20  8:30 ` Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     d59b71937aad3de9a855562736a25de7f522cf4b
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:42:13 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 07:10:03 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d59b7193

targets: Inline run_default_funcs() function

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

 targets/support/chroot-functions.sh | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index b531eb6a..307a9042 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -303,15 +303,6 @@ show_debug() {
 	fi
 }
 
-run_default_funcs() {
-	if [ "${RUN_DEFAULT_FUNCS}" != "no" ]
-	then
-		update_env_settings
-		setup_features
-		show_debug
-	fi
-}
-
 create_handbook_icon() {
 	# This function creates a local icon to the Gentoo Handbook
 	echo "[Desktop Entry]
@@ -330,5 +321,9 @@ readonly locales="
 C.UTF8 UTF-8
 "
 
-# We do this everywhere, so why not put it in this script
-run_default_funcs
+if [[ ${RUN_DEFAULT_FUNCS} != no ]]
+then
+	update_env_settings
+	setup_features
+	show_debug
+fi


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  8:30 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     621d7824670e77aededb0192707e5d885223d05a
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 01:27:17 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 07:10:03 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=621d7824

targets: Remove kernelpkgs.txt generation

Evidently this was to be consumed by the Gentoo Linux Installer, which
saw its last commit in 2008.

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

 targets/support/kmerge.sh          | 10 ----------
 targets/support/livecdfs-update.sh | 11 -----------
 2 files changed, 21 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index c4136dec..27584d51 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -66,16 +66,6 @@ setup_gk_args() {
 genkernel_compile(){
 	setup_gk_args
 
-	# Build our list of kernel packages
-	case ${clst_livecd_type} in
-		gentoo-release-live*)
-			if [ -n "${kernel_merge}" ]
-			then
-				mkdir -p /usr/livecd
-				echo "${kernel_merge}" > /usr/livecd/kernelpkgs.txt
-			fi
-		;;
-	esac
 	# Build with genkernel using the set options
 	# callback is put here to avoid escaping issues
 	if [ -n "${clst_VERBOSE}" ]

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index 47dbb5b3..b7ead552 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -296,19 +296,8 @@ case ${clst_livecd_type} in
 			ln -sf /usr/livecd/gconf /etc/gconf
 		fi
 
-		if [ -e /usr/livecd/kernelpkgs.txt ]
-		then
-			rm -f /usr/livecd/kernelpkgs.txt
-		fi
-
 		touch /etc/startx
 		;;
-	* )
-		if [ -e /usr/livecd/kernelpkgs.txt ]
-		then
-			rm -f /usr/livecd/kernelpkgs.txt
-		fi
-		;;
 esac
 
 # We want the first user to be used when auto-starting X


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
  2020-10-21 17:58 [gentoo-commits] proj/catalyst:master " Matt Turner
@ 2020-10-20  8:30 ` Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     9e8a99b1ac019f032d2e4e163c41ea88edd79803
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:40:34 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 07:10:03 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=9e8a99b1

targets: Explicitly set RUN_DEFAULT_FUNCS="yes"

For documentation purposes.

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

 targets/support/pre-kmerge.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/targets/support/pre-kmerge.sh b/targets/support/pre-kmerge.sh
index a92c436c..0dfc835e 100755
--- a/targets/support/pre-kmerge.sh
+++ b/targets/support/pre-kmerge.sh
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+RUN_DEFAULT_FUNCS="yes"
+
 source /tmp/chroot-functions.sh
 
 if [[ ${clst_hostarch} == hppa ]]; then


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  8:30 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     c2b6d25fb883cdcc36e05d44507326d7ae53f560
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:47:34 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 07:10:03 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=c2b6d25f

targets: Move create_handbook_icon() to its use

And use <<- so we can indent the heredoc properly.

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

 targets/support/chroot-functions.sh | 14 --------------
 targets/support/livecdfs-update.sh  | 15 +++++++++++++++
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 307a9042..22340023 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -303,20 +303,6 @@ show_debug() {
 	fi
 }
 
-create_handbook_icon() {
-	# This function creates a local icon to the Gentoo Handbook
-	echo "[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Link
-URL=file:///mnt/cdrom/docs/handbook/html/index.html
-Terminal=false
-Name=Gentoo Linux Handbook
-GenericName=Gentoo Linux Handbook
-Comment=This is a link to the local copy of the Gentoo Linux Handbook.
-Icon=text-editor" > /usr/share/applications/gentoo-handbook.desktop
-}
-
 readonly locales="
 C.UTF8 UTF-8
 "

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index 557d990b..47dbb5b3 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -243,6 +243,21 @@ case ${clst_livecd_type} in
 		# Clear out lastlog
 		rm -f /var/log/lastlog && touch /var/log/lastlog
 
+		create_handbook_icon() {
+			cat <<-EOF > /usr/share/applications/gentoo-handbook.desktop
+				[Desktop Entry]
+				Encoding=UTF-8
+				Version=1.0
+				Type=Link
+				URL=file:///mnt/cdrom/docs/handbook/html/index.html
+				Terminal=false
+				Name=Gentoo Linux Handbook
+				GenericName=Gentoo Linux Handbook
+				Comment=This is a link to the local copy of the Gentoo Linux Handbook.
+				Icon=text-editor
+			EOF
+		}
+
 		# Create our Handbook icon
 		[ -e /docs/handbook/index.html ] && create_handbook_icon
 		[ -n "${clst_livecd_overlay}" ] && [ -e ${clst_livecd_overlay}/docs/handbook/index.html ] && create_handbook_icon


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  8:30 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     5c3f5f65dda816eff22f6bee44e88f12a2c0c865
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:38:39 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 08:30:20 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5c3f5f65

targets: Rewrite kerncache support

I cannot see how the code added in the undermentioned commit could have
possibly worked.

Fixes: fed3b45b ("Fix and improve kernel build when kerncache is enabled.")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/kmerge.sh | 148 +++++++++++++++-------------------------------
 1 file changed, 47 insertions(+), 101 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 6a0137d7..105a49e7 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -85,11 +85,6 @@ genkernel_compile() {
 	else
 		genkernel "${GK_ARGS[@]}" || exit 1
 	fi
-	if [ -n "${clst_KERNCACHE}" -a -e /var/tmp/${kname}.config ]
-	then
-		md5sum /var/tmp/${kname}.config | awk '{print $1}' > \
-			/tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG
-	fi
 }
 
 [ -n "${clst_ENVSCRIPT}" ] && source /tmp/envscript
@@ -106,117 +101,68 @@ eval eval kernel_gk_kernargs=( \$clst_boot_kernel_${kname}_gk_kernargs )
 eval "ksource=\$clst_boot_kernel_${kname}_sources"
 [[ -z ${ksource} ]] && ksource="sys-kernel/gentoo-sources"
 
-# Check if we have a match in kerncach
+kernel_version=$(portageq best_visible / "${ksource}")
 
-if [ -n "${clst_KERNCACHE}" ]
-then
-	USE_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE ]
-	then
-		STR1=$(for i in `cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE`; do echo $i; done|sort)
-		STR2=$(for i in ${kernel_use}; do echo $i; done|sort)
-		if [ "${STR1}" = "${STR2}" ]
-		then
-			USE_MATCH=1
-		else
-			[ -e /tmp/kerncache/${kname}/usr/src/linux/.config ] && \
-				rm /tmp/kerncache/${kname}/usr/src/linux/.config
-		fi
-	fi
+if [[ -n ${clst_KERNCACHE} ]]; then
+	mkdir -p "/tmp/kerncache/${kname}"
+	pushd "/tmp/kerncache/${kname}" >/dev/null
 
-	EXTRAVERSION_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION ]
-	then
-		STR1=`cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION`
-		STR2=${clst_kextraversion}
-		if [ "${STR1}" = "${STR2}" ]
-		then
-			EXTRAVERSION_MATCH=1
-		fi
-	fi
+	echo "${kernel_use}" > /tmp/USE
+	echo "${kernel_version}" > /tmp/VERSION
+	echo "${clst_kextraversion}" > /tmp/EXTRAVERSION
 
-	CONFIG_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG ]
-	then
-		if [ ! -e /var/tmp/${kname}.config ]
-		then
-			CONFIG_MATCH=1
-		else
-			STR1=`cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG`
-			STR2=`md5sum /var/tmp/${kname}.config|awk '{print $1}'`
-			if [ "${STR1}" = "${STR2}" ]
-			then
-				CONFIG_MATCH=1
-			fi
-		fi
-	fi
-
-	# install dependencies of kernel sources ahead of time in case
-	# package.provided generated below causes them not to be (re)installed
-	run_merge --onlydeps "${ksource}"
-
-	# Create the kerncache directory if it doesn't exists
-	mkdir -p /tmp/kerncache/${kname}
-
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION ]
-	then
-		KERNELVERSION=$(</tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION)
-		mkdir -p ${clst_port_conf}/profile
-		echo "${KERNELVERSION}" > ${clst_port_conf}/profile/package.provided
-	else
-		rm -f ${clst_port_conf}/profile/package.provided
+	if cmp -s {/tmp/,}USE && \
+	   cmp -s {/tmp/,}VERSION && \
+	   cmp -s {/tmp/,}EXTRAVERSION && \
+	   cmp -s /var/tmp/${kname}.config CONFIG; then
+		cached_kernel_found="true"
 	fi
 
-	# Don't use package.provided if there's a pending up/downgrade
-	if [[ "$(portageq best_visible / ${ksource})" == "${KERNELVERSION}" ]]; then
-		echo "No pending updates for ${ksource}"
-	else
-		echo "Pending updates for ${ksource}, removing package.provided"
-		rm -f ${clst_port_conf}/profile/package.provided
-	fi
+	rm -f /tmp/{USE,VERSION,EXTRAVERSION}
+	popd >/dev/null
+fi
 
+if [[ ! ${cached_kernel_found} ]]; then
 	USE=symlink run_merge --update "${ksource}"
+fi
 
+if [[ -n ${clst_KERNCACHE} && ! ${cached_kernel_found} ]]; then
 	SOURCESDIR="/tmp/kerncache/${kname}/sources"
-	if [ -L /usr/src/linux ]
-	then
-		# A kernel was merged, move it to $SOURCESDIR
-		[ -e ${SOURCESDIR} ] && rm -Rf ${SOURCESDIR}
+	echo "Moving kernel sources to ${SOURCESDIR} ..."
 
-		KERNELVERSION=`portageq best_visible / "${ksource}"`
-		echo "${KERNELVERSION}" > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION
+	# FINISHME: Use rsync instead?
+	rm -rf "${SOURCESDIR}"
+	mv $(readlink -f /usr/src/linux) "${SOURCESDIR}"
+	ln -snf "${SOURCESDIR}" /usr/src/linux
+fi
 
-		echo "Moving kernel sources to ${SOURCESDIR} ..."
-		mv `readlink -f /usr/src/linux` ${SOURCESDIR}
-	fi
-	ln -sf ${SOURCESDIR} /usr/src/linux
+if [[ -n ${clst_kextraversion} ]]; then
+	echo "Setting extraversion to ${clst_kextraversion}"
 
-	# If catalyst has set to a empty string, extraversion wasn't specified so we
-	# skip this part
-	if [ "${EXTRAVERSION_MATCH}" = "0" ]
-	then
-		if [ ! "${clst_kextraversion}" = "" ]
-		then
-			echo "Setting extraversion to ${clst_kextraversion}"
-			sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
-			echo ${clst_kextraversion} > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION
-		else
-			touch /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION
-		fi
-	fi
-else
-	USE=symlink run_merge --update "${ksource}"
-
-	if [ ! "${clst_kextraversion}" = "" ]
-	then
-		echo "Setting extraversion to ${clst_kextraversion}"
-		sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
+	if [[ -e /usr/src/linux/Makefile.bak ]]; then
+		cp /usr/src/linux/Makefile{.bak,}
+	else
+		cp /usr/src/linux/Makefile{,.bak}
 	fi
+	sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" \
+		/usr/src/linux/Makefile
 fi
 
 genkernel_compile
 
-if [ -n "${clst_KERNCACHE}" ]
-then
-	echo ${kernel_use} > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE
+# Write out CONFIG, USE, VERSION, and EXTRAVERSION files
+if [[ -n ${clst_KERNCACHE} && ! ${cached_kernel_found} ]]; then
+	pushd "/tmp/kerncache/${kname}" >/dev/null
+
+	cp /var/tmp/${kname}.config CONFIG
+	echo "${kernel_use}" > USE
+	echo "${kernel_version}" > VERSION
+	echo "${clst_kextraversion}" > EXTRAVERSION
+
+	popd >/dev/null
+fi
+
+if [[ ! ${cached_kernel_found} ]]; then
+	run_merge -C "${ksource}"
+	rm /usr/src/linux
 fi


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
  2020-10-21 17:58 [gentoo-commits] proj/catalyst:master " Matt Turner
@ 2020-10-20  8:30 ` Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     14ca450abdf91c9352ca4ff68e67b4e1ba8f0529
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 22:38:54 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 07:10:03 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=14ca450a

targets: Use full 'sys-kernel/genkernel' package name

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

 targets/support/pre-kmerge.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/targets/support/pre-kmerge.sh b/targets/support/pre-kmerge.sh
index 165dfd51..a92c436c 100755
--- a/targets/support/pre-kmerge.sh
+++ b/targets/support/pre-kmerge.sh
@@ -20,5 +20,5 @@ if [[ ${clst_hostarch} == hppa ]]; then
 	[[ $num64 > 1 ]] && die "Only one 64-bit kernel can be configured"
 fi
 
-run_merge --oneshot genkernel
+run_merge --oneshot sys-kernel/genkernel
 install -d /tmp/kerncache


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  8:30 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     1ae34034945c32a5aab1e2d2795a1cf4acba12bd
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 23:10:36 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 07:10:03 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=1ae34034

targets: Remove unnecessary unset PACKAGES

Dead code since 2008.

Fixes: b79d06a3 ("Remove temporary package listing code, ...")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/chroot-functions.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 22340023..7222892e 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -270,7 +270,6 @@ run_merge() {
 show_debug() {
 	if [ -n "${clst_DEBUG}" ]
 	then
-		unset PACKAGES
 		echo "DEBUG:"
 		echo "Profile/target info:"
 		echo "Profile inheritance:"


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  8:30 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     372508e258fb0fc0b1d4f08e335d7fbe1e48a7ff
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:48:07 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 08:30:20 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=372508e2

targets: Use double-brackets in kmerge.sh

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

 targets/support/kmerge.sh | 50 ++++++++++++++---------------------------------
 1 file changed, 15 insertions(+), 35 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 6c921994..716befed 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -15,71 +15,51 @@ genkernel_compile() {
 		--minkernpackage=/tmp/kerncache/${kname}-kernel-initrd-${clst_version_stamp}.tar.bz2 all
 	)
 	# extra genkernel options that we have to test for
-	if [ -n "${clst_gk_mainargs}" ]
-	then
+	if [[ -n ${clst_gk_mainargs} ]]; then
 		GK_ARGS+=(${clst_gk_mainargs})
 	fi
-	if [ -n "${clst_KERNCACHE}" ]
-	then
+	if [[ -n ${clst_KERNCACHE} ]]; then
 		GK_ARGS+=(--kerncache=/tmp/kerncache/${kname}-kerncache-${clst_version_stamp}.tar.bz2)
 	fi
-	if [ -e /var/tmp/${kname}.config ]
-	then
+	if [[ -e /var/tmp/${kname}.config ]]; then
 		GK_ARGS+=(--kernel-config=/var/tmp/${kname}.config)
 	fi
-
-	if [ -d "/tmp/initramfs_overlay/${initramfs_overlay}" ]
-	then
+	if [[ -d /tmp/initramfs_overlay/${initramfs_overlay} ]]; then
 		GK_ARGS+=(--initramfs-overlay=/tmp/initramfs_overlay/${initramfs_overlay})
 	fi
-	if [ -n "${clst_CCACHE}" ]
-	then
+	if [[ -n ${clst_CCACHE} ]]; then
 		GK_ARGS+=(--kernel-cc=/usr/lib/ccache/bin/gcc --utils-cc=/usr/lib/ccache/bin/gcc)
 	fi
-
-	if [ -n "${clst_linuxrc}" ]
-	then
+	if [[ -n ${clst_linuxrc} ]]; then
 		GK_ARGS+=(--linuxrc=/tmp/linuxrc)
 	fi
-
-	if [ -n "${clst_busybox_config}" ]
-	then
+	if [[ -n ${clst_busybox_config} ]]; then
 		GK_ARGS+=(--busybox-config=/tmp/busy-config)
 	fi
-
-	if [ "${clst_target}" == "netboot" ]
-	then
+	if [[ ${clst_target} == netboot ]]; then
 		GK_ARGS+=(--netboot)
 
-		if [ -n "${clst_merge_path}" ]
-		then
+		if [[ -n ${clst_merge_path} ]]; then
 			GK_ARGS+=(--initramfs-overlay="${clst_merge_path}")
 		fi
 	fi
-
-	if [ -n "${clst_VERBOSE}" ]
-	then
+	if [[ -n ${clst_VERBOSE} ]]; then
 		GK_ARGS+=(--loglevel=2)
 	fi
 
-	# Build with genkernel using the set options
-	# callback is put here to avoid escaping issues
-	if [ -n "${clst_VERBOSE}" ]
-	then
+	if [[ -n ${clst_VERBOSE} ]]; then
 		gk_callback_opts=(-vN)
 	else
 		gk_callback_opts=(-qN)
 	fi
-	if [ -n "${clst_KERNCACHE}" ]
-	then
+	if [[ -n ${clst_KERNCACHE} ]]; then
 		gk_callback_opts+=(-kb)
 	fi
-	if [ -n "${clst_FETCH}" ]
-	then
+	if [[ -n ${clst_FETCH} ]]; then
 		gk_callback_opts+=(-f)
 	fi
-	if [ "${kernel_merge}" != "" ]
-	then
+
+	if [[ -n ${kernel_merge} ]]; then
 		genkernel --callback="emerge ${gk_callback_opts[@]} ${kernel_merge}" \
 			"${GK_ARGS[@]}" || exit 1
 	else


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20  8:30 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     3d2ac7c3b32bd253bf16d774194be85aa053ccf3
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 01:33:30 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 07:10:03 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=3d2ac7c3

targets: Merge setup_gk_args() and genkernel_compile()

These both just do a bunch of argument concatenation and are not
separate functions in any meaningful way.

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

 targets/support/kmerge.sh | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 27584d51..6a0137d7 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -4,7 +4,7 @@ source /tmp/chroot-functions.sh
 
 install -d /tmp/kerncache
 
-setup_gk_args() {
+genkernel_compile() {
 	# default genkernel args
 	GK_ARGS=(
 		"${kernel_gk_kernargs[@]}"
@@ -61,10 +61,6 @@ setup_gk_args() {
 	then
 		GK_ARGS+=(--loglevel=2)
 	fi
-}
-
-genkernel_compile(){
-	setup_gk_args
 
 	# Build with genkernel using the set options
 	# callback is put here to avoid escaping issues


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20 19:59 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20 19:59 UTC (permalink / raw
  To: gentoo-commits

commit:     4b8f3807edb46f57806f20e6c81f4b56c25aac53
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:38:39 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 19:58:58 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4b8f3807

targets: Rewrite kerncache support

I cannot see how the code added in the undermentioned commit could have
possibly worked.

Fixes: fed3b45b ("Fix and improve kernel build when kerncache is enabled.")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/kmerge.sh | 147 +++++++++++++++-------------------------------
 1 file changed, 46 insertions(+), 101 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 6a0137d7..021e31d3 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -85,11 +85,6 @@ genkernel_compile() {
 	else
 		genkernel "${GK_ARGS[@]}" || exit 1
 	fi
-	if [ -n "${clst_KERNCACHE}" -a -e /var/tmp/${kname}.config ]
-	then
-		md5sum /var/tmp/${kname}.config | awk '{print $1}' > \
-			/tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG
-	fi
 }
 
 [ -n "${clst_ENVSCRIPT}" ] && source /tmp/envscript
@@ -106,117 +101,67 @@ eval eval kernel_gk_kernargs=( \$clst_boot_kernel_${kname}_gk_kernargs )
 eval "ksource=\$clst_boot_kernel_${kname}_sources"
 [[ -z ${ksource} ]] && ksource="sys-kernel/gentoo-sources"
 
-# Check if we have a match in kerncach
+kernel_version=$(portageq best_visible / "${ksource}")
 
-if [ -n "${clst_KERNCACHE}" ]
-then
-	USE_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE ]
-	then
-		STR1=$(for i in `cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE`; do echo $i; done|sort)
-		STR2=$(for i in ${kernel_use}; do echo $i; done|sort)
-		if [ "${STR1}" = "${STR2}" ]
-		then
-			USE_MATCH=1
-		else
-			[ -e /tmp/kerncache/${kname}/usr/src/linux/.config ] && \
-				rm /tmp/kerncache/${kname}/usr/src/linux/.config
-		fi
-	fi
+if [[ -n ${clst_KERNCACHE} ]]; then
+	mkdir -p "/tmp/kerncache/${kname}"
+	pushd "/tmp/kerncache/${kname}" >/dev/null
 
-	EXTRAVERSION_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION ]
-	then
-		STR1=`cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION`
-		STR2=${clst_kextraversion}
-		if [ "${STR1}" = "${STR2}" ]
-		then
-			EXTRAVERSION_MATCH=1
-		fi
-	fi
+	echo "${kernel_use}" > /tmp/USE
+	echo "${kernel_version}" > /tmp/VERSION
+	echo "${clst_kextraversion}" > /tmp/EXTRAVERSION
 
-	CONFIG_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG ]
-	then
-		if [ ! -e /var/tmp/${kname}.config ]
-		then
-			CONFIG_MATCH=1
-		else
-			STR1=`cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG`
-			STR2=`md5sum /var/tmp/${kname}.config|awk '{print $1}'`
-			if [ "${STR1}" = "${STR2}" ]
-			then
-				CONFIG_MATCH=1
-			fi
-		fi
-	fi
-
-	# install dependencies of kernel sources ahead of time in case
-	# package.provided generated below causes them not to be (re)installed
-	run_merge --onlydeps "${ksource}"
-
-	# Create the kerncache directory if it doesn't exists
-	mkdir -p /tmp/kerncache/${kname}
-
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION ]
-	then
-		KERNELVERSION=$(</tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION)
-		mkdir -p ${clst_port_conf}/profile
-		echo "${KERNELVERSION}" > ${clst_port_conf}/profile/package.provided
-	else
-		rm -f ${clst_port_conf}/profile/package.provided
+	if cmp -s {/tmp/,}USE && \
+	   cmp -s {/tmp/,}VERSION && \
+	   cmp -s {/tmp/,}EXTRAVERSION && \
+	   cmp -s /var/tmp/${kname}.config CONFIG; then
+		cached_kernel_found="true"
 	fi
 
-	# Don't use package.provided if there's a pending up/downgrade
-	if [[ "$(portageq best_visible / ${ksource})" == "${KERNELVERSION}" ]]; then
-		echo "No pending updates for ${ksource}"
-	else
-		echo "Pending updates for ${ksource}, removing package.provided"
-		rm -f ${clst_port_conf}/profile/package.provided
-	fi
+	rm -f /tmp/{USE,VERSION,EXTRAVERSION}
+	popd >/dev/null
+fi
 
+if [[ ! ${cached_kernel_found} ]]; then
 	USE=symlink run_merge --update "${ksource}"
 
-	SOURCESDIR="/tmp/kerncache/${kname}/sources"
-	if [ -L /usr/src/linux ]
-	then
-		# A kernel was merged, move it to $SOURCESDIR
-		[ -e ${SOURCESDIR} ] && rm -Rf ${SOURCESDIR}
-
-		KERNELVERSION=`portageq best_visible / "${ksource}"`
-		echo "${KERNELVERSION}" > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION
-
+	if [[ -n ${clst_KERNCACHE} ]]; then
+		SOURCESDIR="/tmp/kerncache/${kname}/sources"
 		echo "Moving kernel sources to ${SOURCESDIR} ..."
-		mv `readlink -f /usr/src/linux` ${SOURCESDIR}
-	fi
-	ln -sf ${SOURCESDIR} /usr/src/linux
 
-	# If catalyst has set to a empty string, extraversion wasn't specified so we
-	# skip this part
-	if [ "${EXTRAVERSION_MATCH}" = "0" ]
-	then
-		if [ ! "${clst_kextraversion}" = "" ]
-		then
-			echo "Setting extraversion to ${clst_kextraversion}"
-			sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
-			echo ${clst_kextraversion} > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION
-		else
-			touch /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION
-		fi
+		rm -rf "${SOURCESDIR}"
+		mv $(readlink -f /usr/src/linux) "${SOURCESDIR}"
+		ln -snf "${SOURCESDIR}" /usr/src/linux
 	fi
-else
-	USE=symlink run_merge --update "${ksource}"
+fi
 
-	if [ ! "${clst_kextraversion}" = "" ]
-	then
-		echo "Setting extraversion to ${clst_kextraversion}"
-		sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
+if [[ -n ${clst_kextraversion} ]]; then
+	echo "Setting EXTRAVERSION to ${clst_kextraversion}"
+
+	if [[ -e /usr/src/linux/Makefile.bak ]]; then
+		cp /usr/src/linux/Makefile{.bak,}
+	else
+		cp /usr/src/linux/Makefile{,.bak}
 	fi
+	sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" \
+		/usr/src/linux/Makefile
 fi
 
 genkernel_compile
 
-if [ -n "${clst_KERNCACHE}" ]
-then
-	echo ${kernel_use} > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE
+# Write out CONFIG, USE, VERSION, and EXTRAVERSION files
+if [[ -n ${clst_KERNCACHE} && ! ${cached_kernel_found} ]]; then
+	pushd "/tmp/kerncache/${kname}" >/dev/null
+
+	cp /var/tmp/${kname}.config CONFIG
+	echo "${kernel_use}" > USE
+	echo "${kernel_version}" > VERSION
+	echo "${clst_kextraversion}" > EXTRAVERSION
+
+	popd >/dev/null
+fi
+
+if [[ ! ${cached_kernel_found} ]]; then
+	run_merge -C "${ksource}"
+	rm /usr/src/linux
 fi


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20 19:59 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20 19:59 UTC (permalink / raw
  To: gentoo-commits

commit:     bc5afc7b6147b562a5de694476f387cb10c1e846
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:48:07 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 19:58:58 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=bc5afc7b

targets: Use double-brackets in kmerge.sh

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

 targets/support/kmerge.sh | 50 ++++++++++++++---------------------------------
 1 file changed, 15 insertions(+), 35 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index b6841fe5..584655d6 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -15,71 +15,51 @@ genkernel_compile() {
 		--minkernpackage=/tmp/kerncache/${kname}-kernel-initrd-${clst_version_stamp}.tar.bz2 all
 	)
 	# extra genkernel options that we have to test for
-	if [ -n "${clst_gk_mainargs}" ]
-	then
+	if [[ -n ${clst_gk_mainargs} ]]; then
 		GK_ARGS+=(${clst_gk_mainargs})
 	fi
-	if [ -n "${clst_KERNCACHE}" ]
-	then
+	if [[ -n ${clst_KERNCACHE} ]]; then
 		GK_ARGS+=(--kerncache=/tmp/kerncache/${kname}-kerncache-${clst_version_stamp}.tar.bz2)
 	fi
-	if [ -e /var/tmp/${kname}.config ]
-	then
+	if [[ -e /var/tmp/${kname}.config ]]; then
 		GK_ARGS+=(--kernel-config=/var/tmp/${kname}.config)
 	fi
-
-	if [ -d "/tmp/initramfs_overlay/${initramfs_overlay}" ]
-	then
+	if [[ -d /tmp/initramfs_overlay/${initramfs_overlay} ]]; then
 		GK_ARGS+=(--initramfs-overlay=/tmp/initramfs_overlay/${initramfs_overlay})
 	fi
-	if [ -n "${clst_CCACHE}" ]
-	then
+	if [[ -n ${clst_CCACHE} ]]; then
 		GK_ARGS+=(--kernel-cc=/usr/lib/ccache/bin/gcc --utils-cc=/usr/lib/ccache/bin/gcc)
 	fi
-
-	if [ -n "${clst_linuxrc}" ]
-	then
+	if [[ -n ${clst_linuxrc} ]]; then
 		GK_ARGS+=(--linuxrc=/tmp/linuxrc)
 	fi
-
-	if [ -n "${clst_busybox_config}" ]
-	then
+	if [[ -n ${clst_busybox_config} ]]; then
 		GK_ARGS+=(--busybox-config=/tmp/busy-config)
 	fi
-
-	if [ "${clst_target}" == "netboot" ]
-	then
+	if [[ ${clst_target} == netboot ]]; then
 		GK_ARGS+=(--netboot)
 
-		if [ -n "${clst_merge_path}" ]
-		then
+		if [[ -n ${clst_merge_path} ]]; then
 			GK_ARGS+=(--initramfs-overlay="${clst_merge_path}")
 		fi
 	fi
-
-	if [ -n "${clst_VERBOSE}" ]
-	then
+	if [[ -n ${clst_VERBOSE} ]]; then
 		GK_ARGS+=(--loglevel=2)
 	fi
 
-	# Build with genkernel using the set options
-	# callback is put here to avoid escaping issues
-	if [ -n "${clst_VERBOSE}" ]
-	then
+	if [[ -n ${clst_VERBOSE} ]]; then
 		gk_callback_opts=(-vN)
 	else
 		gk_callback_opts=(-qN)
 	fi
-	if [ -n "${clst_KERNCACHE}" ]
-	then
+	if [[ -n ${clst_KERNCACHE} ]]; then
 		gk_callback_opts+=(-kb)
 	fi
-	if [ -n "${clst_FETCH}" ]
-	then
+	if [[ -n ${clst_FETCH} ]]; then
 		gk_callback_opts+=(-f)
 	fi
-	if [ "${kernel_merge}" != "" ]
-	then
+
+	if [[ -n ${kernel_merge} ]]; then
 		genkernel --callback="emerge ${gk_callback_opts[@]} ${kernel_merge}" \
 			"${GK_ARGS[@]}" || exit 1
 	else


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20 19:59 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20 19:59 UTC (permalink / raw
  To: gentoo-commits

commit:     be9eb8377cf3a41a302717e1cab81d570bce3ddf
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:41:09 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 19:58:58 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=be9eb837

targets: Remove unnecessary CONFIG_PROTECT assignment

CONFIG_PROTECT is set in run_merge, making this assignment and export
unnecessary.

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

 targets/support/kmerge.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 021e31d3..b6841fe5 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -88,7 +88,6 @@ genkernel_compile() {
 }
 
 [ -n "${clst_ENVSCRIPT}" ] && source /tmp/envscript
-export CONFIG_PROTECT="-*"
 
 # Set the timezone for the kernel build
 rm /etc/localtime


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20 23:20 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20 23:20 UTC (permalink / raw
  To: gentoo-commits

commit:     c3d10e421b0195bc7ae1f27002871f8191342b8f
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:41:09 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 23:20:41 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=c3d10e42

targets: Remove unnecessary CONFIG_PROTECT assignment

CONFIG_PROTECT is set in run_merge, making this assignment and export
unnecessary.

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

 targets/support/kmerge.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 972feb99..5e284183 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -88,7 +88,6 @@ genkernel_compile() {
 }
 
 [ -n "${clst_ENVSCRIPT}" ] && source /tmp/envscript
-export CONFIG_PROTECT="-*"
 
 # Set the timezone for the kernel build
 rm /etc/localtime


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20 23:20 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20 23:20 UTC (permalink / raw
  To: gentoo-commits

commit:     13d7acf7618049a918ea17f95b988bb7ef1230b0
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:48:07 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 23:20:41 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=13d7acf7

targets: Use double-brackets in kmerge.sh

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

 targets/support/kmerge.sh | 50 ++++++++++++++---------------------------------
 1 file changed, 15 insertions(+), 35 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 5e284183..fb67aba6 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -15,71 +15,51 @@ genkernel_compile() {
 		--minkernpackage=/tmp/kerncache/${kname}-kernel-initrd-${clst_version_stamp}.tar.bz2 all
 	)
 	# extra genkernel options that we have to test for
-	if [ -n "${clst_gk_mainargs}" ]
-	then
+	if [[ -n ${clst_gk_mainargs} ]]; then
 		GK_ARGS+=(${clst_gk_mainargs})
 	fi
-	if [ -n "${clst_KERNCACHE}" ]
-	then
+	if [[ -n ${clst_KERNCACHE} ]]; then
 		GK_ARGS+=(--kerncache=/tmp/kerncache/${kname}-kerncache-${clst_version_stamp}.tar.bz2)
 	fi
-	if [ -e /var/tmp/${kname}.config ]
-	then
+	if [[ -e /var/tmp/${kname}.config ]]; then
 		GK_ARGS+=(--kernel-config=/var/tmp/${kname}.config)
 	fi
-
-	if [ -d "/tmp/initramfs_overlay/${initramfs_overlay}" ]
-	then
+	if [[ -d /tmp/initramfs_overlay/${initramfs_overlay} ]]; then
 		GK_ARGS+=(--initramfs-overlay=/tmp/initramfs_overlay/${initramfs_overlay})
 	fi
-	if [ -n "${clst_CCACHE}" ]
-	then
+	if [[ -n ${clst_CCACHE} ]]; then
 		GK_ARGS+=(--kernel-cc=/usr/lib/ccache/bin/gcc --utils-cc=/usr/lib/ccache/bin/gcc)
 	fi
-
-	if [ -n "${clst_linuxrc}" ]
-	then
+	if [[ -n ${clst_linuxrc} ]]; then
 		GK_ARGS+=(--linuxrc=/tmp/linuxrc)
 	fi
-
-	if [ -n "${clst_busybox_config}" ]
-	then
+	if [[ -n ${clst_busybox_config} ]]; then
 		GK_ARGS+=(--busybox-config=/tmp/busy-config)
 	fi
-
-	if [ "${clst_target}" == "netboot" ]
-	then
+	if [[ ${clst_target} == netboot ]]; then
 		GK_ARGS+=(--netboot)
 
-		if [ -n "${clst_merge_path}" ]
-		then
+		if [[ -n ${clst_merge_path} ]]; then
 			GK_ARGS+=(--initramfs-overlay="${clst_merge_path}")
 		fi
 	fi
-
-	if [ -n "${clst_VERBOSE}" ]
-	then
+	if [[ -n ${clst_VERBOSE} ]]; then
 		GK_ARGS+=(--loglevel=2)
 	fi
 
-	# Build with genkernel using the set options
-	# callback is put here to avoid escaping issues
-	if [ -n "${clst_VERBOSE}" ]
-	then
+	if [[ -n ${clst_VERBOSE} ]]; then
 		gk_callback_opts=(-vN)
 	else
 		gk_callback_opts=(-qN)
 	fi
-	if [ -n "${clst_KERNCACHE}" ]
-	then
+	if [[ -n ${clst_KERNCACHE} ]]; then
 		gk_callback_opts+=(-kb)
 	fi
-	if [ -n "${clst_FETCH}" ]
-	then
+	if [[ -n ${clst_FETCH} ]]; then
 		gk_callback_opts+=(-f)
 	fi
-	if [ "${kernel_merge}" != "" ]
-	then
+
+	if [[ -n ${kernel_merge} ]]; then
 		genkernel --callback="emerge ${gk_callback_opts[@]} ${kernel_merge}" \
 			"${GK_ARGS[@]}" || exit 1
 	else


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20 23:20 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20 23:20 UTC (permalink / raw
  To: gentoo-commits

commit:     4a713242d6af2e056b7e2c46e3d844257da3645c
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:38:39 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 23:20:41 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4a713242

targets: Rewrite kerncache support

I cannot see how the code added in the undermentioned commit could have
possibly worked.

Fixes: fed3b45b ("Fix and improve kernel build when kerncache is enabled.")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/kmerge.sh | 147 +++++++++++++++-------------------------------
 1 file changed, 47 insertions(+), 100 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 6a0137d7..972feb99 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -85,11 +85,6 @@ genkernel_compile() {
 	else
 		genkernel "${GK_ARGS[@]}" || exit 1
 	fi
-	if [ -n "${clst_KERNCACHE}" -a -e /var/tmp/${kname}.config ]
-	then
-		md5sum /var/tmp/${kname}.config | awk '{print $1}' > \
-			/tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG
-	fi
 }
 
 [ -n "${clst_ENVSCRIPT}" ] && source /tmp/envscript
@@ -106,117 +101,69 @@ eval eval kernel_gk_kernargs=( \$clst_boot_kernel_${kname}_gk_kernargs )
 eval "ksource=\$clst_boot_kernel_${kname}_sources"
 [[ -z ${ksource} ]] && ksource="sys-kernel/gentoo-sources"
 
-# Check if we have a match in kerncach
-
-if [ -n "${clst_KERNCACHE}" ]
-then
-	USE_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE ]
-	then
-		STR1=$(for i in `cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE`; do echo $i; done|sort)
-		STR2=$(for i in ${kernel_use}; do echo $i; done|sort)
-		if [ "${STR1}" = "${STR2}" ]
-		then
-			USE_MATCH=1
-		else
-			[ -e /tmp/kerncache/${kname}/usr/src/linux/.config ] && \
-				rm /tmp/kerncache/${kname}/usr/src/linux/.config
-		fi
-	fi
-
-	EXTRAVERSION_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION ]
-	then
-		STR1=`cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION`
-		STR2=${clst_kextraversion}
-		if [ "${STR1}" = "${STR2}" ]
-		then
-			EXTRAVERSION_MATCH=1
-		fi
-	fi
-
-	CONFIG_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG ]
-	then
-		if [ ! -e /var/tmp/${kname}.config ]
-		then
-			CONFIG_MATCH=1
-		else
-			STR1=`cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG`
-			STR2=`md5sum /var/tmp/${kname}.config|awk '{print $1}'`
-			if [ "${STR1}" = "${STR2}" ]
-			then
-				CONFIG_MATCH=1
-			fi
-		fi
-	fi
+kernel_version=$(portageq best_visible / "${ksource}")
 
-	# install dependencies of kernel sources ahead of time in case
-	# package.provided generated below causes them not to be (re)installed
-	run_merge --onlydeps "${ksource}"
+if [[ -n ${clst_KERNCACHE} ]]; then
+	mkdir -p "/tmp/kerncache/${kname}"
+	pushd "/tmp/kerncache/${kname}" >/dev/null
 
-	# Create the kerncache directory if it doesn't exists
-	mkdir -p /tmp/kerncache/${kname}
+	echo "${kernel_use}" > /tmp/USE
+	echo "${kernel_version}" > /tmp/VERSION
+	echo "${clst_kextraversion}" > /tmp/EXTRAVERSION
 
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION ]
-	then
-		KERNELVERSION=$(</tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION)
-		mkdir -p ${clst_port_conf}/profile
-		echo "${KERNELVERSION}" > ${clst_port_conf}/profile/package.provided
-	else
-		rm -f ${clst_port_conf}/profile/package.provided
+	if cmp -s {/tmp/,}USE && \
+	   cmp -s {/tmp/,}VERSION && \
+	   cmp -s {/tmp/,}EXTRAVERSION && \
+	   cmp -s /var/tmp/${kname}.config CONFIG; then
+		cached_kernel_found="true"
 	fi
 
-	# Don't use package.provided if there's a pending up/downgrade
-	if [[ "$(portageq best_visible / ${ksource})" == "${KERNELVERSION}" ]]; then
-		echo "No pending updates for ${ksource}"
-	else
-		echo "Pending updates for ${ksource}, removing package.provided"
-		rm -f ${clst_port_conf}/profile/package.provided
-	fi
+	rm -f /tmp/{USE,VERSION,EXTRAVERSION}
+	popd >/dev/null
+fi
 
+if [[ ! ${cached_kernel_found} ]]; then
 	USE=symlink run_merge --update "${ksource}"
+fi
 
+if [[ -n ${clst_KERNCACHE} ]]; then
 	SOURCESDIR="/tmp/kerncache/${kname}/sources"
-	if [ -L /usr/src/linux ]
-	then
-		# A kernel was merged, move it to $SOURCESDIR
-		[ -e ${SOURCESDIR} ] && rm -Rf ${SOURCESDIR}
-
-		KERNELVERSION=`portageq best_visible / "${ksource}"`
-		echo "${KERNELVERSION}" > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION
-
+	if [[ ! ${cached_kernel_found} ]]; then
 		echo "Moving kernel sources to ${SOURCESDIR} ..."
-		mv `readlink -f /usr/src/linux` ${SOURCESDIR}
-	fi
-	ln -sf ${SOURCESDIR} /usr/src/linux
 
-	# If catalyst has set to a empty string, extraversion wasn't specified so we
-	# skip this part
-	if [ "${EXTRAVERSION_MATCH}" = "0" ]
-	then
-		if [ ! "${clst_kextraversion}" = "" ]
-		then
-			echo "Setting extraversion to ${clst_kextraversion}"
-			sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
-			echo ${clst_kextraversion} > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION
-		else
-			touch /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION
-		fi
+		rm -rf "${SOURCESDIR}"
+		mv $(readlink -f /usr/src/linux) "${SOURCESDIR}"
 	fi
-else
-	USE=symlink run_merge --update "${ksource}"
+	ln -snf "${SOURCESDIR}" /usr/src/linux
+fi
 
-	if [ ! "${clst_kextraversion}" = "" ]
-	then
-		echo "Setting extraversion to ${clst_kextraversion}"
-		sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
+if [[ -n ${clst_kextraversion} ]]; then
+	echo "Setting EXTRAVERSION to ${clst_kextraversion}"
+
+	if [[ -e /usr/src/linux/Makefile.bak ]]; then
+		cp /usr/src/linux/Makefile{.bak,}
+	else
+		cp /usr/src/linux/Makefile{,.bak}
 	fi
+	sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" \
+		/usr/src/linux/Makefile
 fi
 
 genkernel_compile
 
-if [ -n "${clst_KERNCACHE}" ]
-then
-	echo ${kernel_use} > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE
+# Write out CONFIG, USE, VERSION, and EXTRAVERSION files
+if [[ -n ${clst_KERNCACHE} && ! ${cached_kernel_found} ]]; then
+	pushd "/tmp/kerncache/${kname}" >/dev/null
+
+	cp /var/tmp/${kname}.config CONFIG
+	echo "${kernel_use}" > USE
+	echo "${kernel_version}" > VERSION
+	echo "${clst_kextraversion}" > EXTRAVERSION
+
+	popd >/dev/null
+fi
+
+if [[ ! ${cached_kernel_found} ]]; then
+	run_merge -C "${ksource}"
+	rm /usr/src/linux
 fi


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-20 23:20 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-20 23:20 UTC (permalink / raw
  To: gentoo-commits

commit:     4db324d29474f19779b027e9b06e0516a85453b6
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 23:03:02 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 23:20:41 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4db324d2

targets: Drop warning about no cdtar

Most platforms use grub now and don't need a cdtar. Also use double
brackets while we're here.

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

 targets/support/bootloader-setup.sh | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh
index a82b69dc..ea18f736 100755
--- a/targets/support/bootloader-setup.sh
+++ b/targets/support/bootloader-setup.sh
@@ -4,12 +4,8 @@ source ${clst_shdir}/support/functions.sh
 
 # $1 is the destination root
 
-if [ -n "${clst_cdtar}" ]
-then
+if [[ -n ${clst_cdtar} ]]; then
 	extract_cdtar $1
-else
-	#While this seems a little crazy, it's entirely possible the bootloader is just shoved in isoroot overlay
-	echo "No cdtar and unable to auto generate boot loader files... good luck"
 fi
 
 extract_kernels $1/boot


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-22 18:06 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-22 18:06 UTC (permalink / raw
  To: gentoo-commits

commit:     97060f608afd21e1463115f46cf2fbc3cee73b5c
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:38:39 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 23:26:35 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=97060f60

targets: Reimplement kerncache support

I cannot see how the code added in commit fed3b45b could have possibly
worked, and in practice it did not.

An earlier commit (beb92087) deleted most or all of the uses of the
*_MATCH variables but left the code that set them in place.

Fixes: beb92087 ("Added patches from Joshua Kinard <kumba <AT> gentoo.org>")
Fixes: fed3b45b ("Fix and improve kernel build when kerncache is enabled.")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/kmerge.sh | 147 +++++++++++++++-------------------------------
 1 file changed, 47 insertions(+), 100 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 6a0137d7..972feb99 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -85,11 +85,6 @@ genkernel_compile() {
 	else
 		genkernel "${GK_ARGS[@]}" || exit 1
 	fi
-	if [ -n "${clst_KERNCACHE}" -a -e /var/tmp/${kname}.config ]
-	then
-		md5sum /var/tmp/${kname}.config | awk '{print $1}' > \
-			/tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG
-	fi
 }
 
 [ -n "${clst_ENVSCRIPT}" ] && source /tmp/envscript
@@ -106,117 +101,69 @@ eval eval kernel_gk_kernargs=( \$clst_boot_kernel_${kname}_gk_kernargs )
 eval "ksource=\$clst_boot_kernel_${kname}_sources"
 [[ -z ${ksource} ]] && ksource="sys-kernel/gentoo-sources"
 
-# Check if we have a match in kerncach
-
-if [ -n "${clst_KERNCACHE}" ]
-then
-	USE_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE ]
-	then
-		STR1=$(for i in `cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE`; do echo $i; done|sort)
-		STR2=$(for i in ${kernel_use}; do echo $i; done|sort)
-		if [ "${STR1}" = "${STR2}" ]
-		then
-			USE_MATCH=1
-		else
-			[ -e /tmp/kerncache/${kname}/usr/src/linux/.config ] && \
-				rm /tmp/kerncache/${kname}/usr/src/linux/.config
-		fi
-	fi
-
-	EXTRAVERSION_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION ]
-	then
-		STR1=`cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION`
-		STR2=${clst_kextraversion}
-		if [ "${STR1}" = "${STR2}" ]
-		then
-			EXTRAVERSION_MATCH=1
-		fi
-	fi
-
-	CONFIG_MATCH=0
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG ]
-	then
-		if [ ! -e /var/tmp/${kname}.config ]
-		then
-			CONFIG_MATCH=1
-		else
-			STR1=`cat /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.CONFIG`
-			STR2=`md5sum /var/tmp/${kname}.config|awk '{print $1}'`
-			if [ "${STR1}" = "${STR2}" ]
-			then
-				CONFIG_MATCH=1
-			fi
-		fi
-	fi
+kernel_version=$(portageq best_visible / "${ksource}")
 
-	# install dependencies of kernel sources ahead of time in case
-	# package.provided generated below causes them not to be (re)installed
-	run_merge --onlydeps "${ksource}"
+if [[ -n ${clst_KERNCACHE} ]]; then
+	mkdir -p "/tmp/kerncache/${kname}"
+	pushd "/tmp/kerncache/${kname}" >/dev/null
 
-	# Create the kerncache directory if it doesn't exists
-	mkdir -p /tmp/kerncache/${kname}
+	echo "${kernel_use}" > /tmp/USE
+	echo "${kernel_version}" > /tmp/VERSION
+	echo "${clst_kextraversion}" > /tmp/EXTRAVERSION
 
-	if [ -e /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION ]
-	then
-		KERNELVERSION=$(</tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION)
-		mkdir -p ${clst_port_conf}/profile
-		echo "${KERNELVERSION}" > ${clst_port_conf}/profile/package.provided
-	else
-		rm -f ${clst_port_conf}/profile/package.provided
+	if cmp -s {/tmp/,}USE && \
+	   cmp -s {/tmp/,}VERSION && \
+	   cmp -s {/tmp/,}EXTRAVERSION && \
+	   cmp -s /var/tmp/${kname}.config CONFIG; then
+		cached_kernel_found="true"
 	fi
 
-	# Don't use package.provided if there's a pending up/downgrade
-	if [[ "$(portageq best_visible / ${ksource})" == "${KERNELVERSION}" ]]; then
-		echo "No pending updates for ${ksource}"
-	else
-		echo "Pending updates for ${ksource}, removing package.provided"
-		rm -f ${clst_port_conf}/profile/package.provided
-	fi
+	rm -f /tmp/{USE,VERSION,EXTRAVERSION}
+	popd >/dev/null
+fi
 
+if [[ ! ${cached_kernel_found} ]]; then
 	USE=symlink run_merge --update "${ksource}"
+fi
 
+if [[ -n ${clst_KERNCACHE} ]]; then
 	SOURCESDIR="/tmp/kerncache/${kname}/sources"
-	if [ -L /usr/src/linux ]
-	then
-		# A kernel was merged, move it to $SOURCESDIR
-		[ -e ${SOURCESDIR} ] && rm -Rf ${SOURCESDIR}
-
-		KERNELVERSION=`portageq best_visible / "${ksource}"`
-		echo "${KERNELVERSION}" > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.KERNELVERSION
-
+	if [[ ! ${cached_kernel_found} ]]; then
 		echo "Moving kernel sources to ${SOURCESDIR} ..."
-		mv `readlink -f /usr/src/linux` ${SOURCESDIR}
-	fi
-	ln -sf ${SOURCESDIR} /usr/src/linux
 
-	# If catalyst has set to a empty string, extraversion wasn't specified so we
-	# skip this part
-	if [ "${EXTRAVERSION_MATCH}" = "0" ]
-	then
-		if [ ! "${clst_kextraversion}" = "" ]
-		then
-			echo "Setting extraversion to ${clst_kextraversion}"
-			sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
-			echo ${clst_kextraversion} > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION
-		else
-			touch /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.EXTRAVERSION
-		fi
+		rm -rf "${SOURCESDIR}"
+		mv $(readlink -f /usr/src/linux) "${SOURCESDIR}"
 	fi
-else
-	USE=symlink run_merge --update "${ksource}"
+	ln -snf "${SOURCESDIR}" /usr/src/linux
+fi
 
-	if [ ! "${clst_kextraversion}" = "" ]
-	then
-		echo "Setting extraversion to ${clst_kextraversion}"
-		sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
+if [[ -n ${clst_kextraversion} ]]; then
+	echo "Setting EXTRAVERSION to ${clst_kextraversion}"
+
+	if [[ -e /usr/src/linux/Makefile.bak ]]; then
+		cp /usr/src/linux/Makefile{.bak,}
+	else
+		cp /usr/src/linux/Makefile{,.bak}
 	fi
+	sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" \
+		/usr/src/linux/Makefile
 fi
 
 genkernel_compile
 
-if [ -n "${clst_KERNCACHE}" ]
-then
-	echo ${kernel_use} > /tmp/kerncache/${kname}/${kname}-${clst_version_stamp}.USE
+# Write out CONFIG, USE, VERSION, and EXTRAVERSION files
+if [[ -n ${clst_KERNCACHE} && ! ${cached_kernel_found} ]]; then
+	pushd "/tmp/kerncache/${kname}" >/dev/null
+
+	cp /var/tmp/${kname}.config CONFIG
+	echo "${kernel_use}" > USE
+	echo "${kernel_version}" > VERSION
+	echo "${clst_kextraversion}" > EXTRAVERSION
+
+	popd >/dev/null
+fi
+
+if [[ ! ${cached_kernel_found} ]]; then
+	run_merge -C "${ksource}"
+	rm /usr/src/linux
 fi


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-22 18:06 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-22 18:06 UTC (permalink / raw
  To: gentoo-commits

commit:     07a8d208e1226d58efb8bc9416c030129dcae712
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 01:27:17 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 23:26:35 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=07a8d208

targets: Remove kernelpkgs.txt generation

Evidently this was to be consumed by the Gentoo Linux Installer, which
saw its last commit in 2008.

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

 targets/support/kmerge.sh          | 10 ----------
 targets/support/livecdfs-update.sh | 11 -----------
 2 files changed, 21 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index c4136dec..27584d51 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -66,16 +66,6 @@ setup_gk_args() {
 genkernel_compile(){
 	setup_gk_args
 
-	# Build our list of kernel packages
-	case ${clst_livecd_type} in
-		gentoo-release-live*)
-			if [ -n "${kernel_merge}" ]
-			then
-				mkdir -p /usr/livecd
-				echo "${kernel_merge}" > /usr/livecd/kernelpkgs.txt
-			fi
-		;;
-	esac
 	# Build with genkernel using the set options
 	# callback is put here to avoid escaping issues
 	if [ -n "${clst_VERBOSE}" ]

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index 47dbb5b3..b7ead552 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -296,19 +296,8 @@ case ${clst_livecd_type} in
 			ln -sf /usr/livecd/gconf /etc/gconf
 		fi
 
-		if [ -e /usr/livecd/kernelpkgs.txt ]
-		then
-			rm -f /usr/livecd/kernelpkgs.txt
-		fi
-
 		touch /etc/startx
 		;;
-	* )
-		if [ -e /usr/livecd/kernelpkgs.txt ]
-		then
-			rm -f /usr/livecd/kernelpkgs.txt
-		fi
-		;;
 esac
 
 # We want the first user to be used when auto-starting X


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
  2020-10-29 21:00 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
@ 2020-10-22 18:06 ` Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-22 18:06 UTC (permalink / raw
  To: gentoo-commits

commit:     e96ef61854ae6f85f90dc9f5e01b5e1743c8a6f6
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:48:07 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 23:26:35 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e96ef618

targets: Use double-brackets in kmerge.sh

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

 targets/support/kmerge.sh | 50 ++++++++++++++---------------------------------
 1 file changed, 15 insertions(+), 35 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 5e284183..fb67aba6 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -15,71 +15,51 @@ genkernel_compile() {
 		--minkernpackage=/tmp/kerncache/${kname}-kernel-initrd-${clst_version_stamp}.tar.bz2 all
 	)
 	# extra genkernel options that we have to test for
-	if [ -n "${clst_gk_mainargs}" ]
-	then
+	if [[ -n ${clst_gk_mainargs} ]]; then
 		GK_ARGS+=(${clst_gk_mainargs})
 	fi
-	if [ -n "${clst_KERNCACHE}" ]
-	then
+	if [[ -n ${clst_KERNCACHE} ]]; then
 		GK_ARGS+=(--kerncache=/tmp/kerncache/${kname}-kerncache-${clst_version_stamp}.tar.bz2)
 	fi
-	if [ -e /var/tmp/${kname}.config ]
-	then
+	if [[ -e /var/tmp/${kname}.config ]]; then
 		GK_ARGS+=(--kernel-config=/var/tmp/${kname}.config)
 	fi
-
-	if [ -d "/tmp/initramfs_overlay/${initramfs_overlay}" ]
-	then
+	if [[ -d /tmp/initramfs_overlay/${initramfs_overlay} ]]; then
 		GK_ARGS+=(--initramfs-overlay=/tmp/initramfs_overlay/${initramfs_overlay})
 	fi
-	if [ -n "${clst_CCACHE}" ]
-	then
+	if [[ -n ${clst_CCACHE} ]]; then
 		GK_ARGS+=(--kernel-cc=/usr/lib/ccache/bin/gcc --utils-cc=/usr/lib/ccache/bin/gcc)
 	fi
-
-	if [ -n "${clst_linuxrc}" ]
-	then
+	if [[ -n ${clst_linuxrc} ]]; then
 		GK_ARGS+=(--linuxrc=/tmp/linuxrc)
 	fi
-
-	if [ -n "${clst_busybox_config}" ]
-	then
+	if [[ -n ${clst_busybox_config} ]]; then
 		GK_ARGS+=(--busybox-config=/tmp/busy-config)
 	fi
-
-	if [ "${clst_target}" == "netboot" ]
-	then
+	if [[ ${clst_target} == netboot ]]; then
 		GK_ARGS+=(--netboot)
 
-		if [ -n "${clst_merge_path}" ]
-		then
+		if [[ -n ${clst_merge_path} ]]; then
 			GK_ARGS+=(--initramfs-overlay="${clst_merge_path}")
 		fi
 	fi
-
-	if [ -n "${clst_VERBOSE}" ]
-	then
+	if [[ -n ${clst_VERBOSE} ]]; then
 		GK_ARGS+=(--loglevel=2)
 	fi
 
-	# Build with genkernel using the set options
-	# callback is put here to avoid escaping issues
-	if [ -n "${clst_VERBOSE}" ]
-	then
+	if [[ -n ${clst_VERBOSE} ]]; then
 		gk_callback_opts=(-vN)
 	else
 		gk_callback_opts=(-qN)
 	fi
-	if [ -n "${clst_KERNCACHE}" ]
-	then
+	if [[ -n ${clst_KERNCACHE} ]]; then
 		gk_callback_opts+=(-kb)
 	fi
-	if [ -n "${clst_FETCH}" ]
-	then
+	if [[ -n ${clst_FETCH} ]]; then
 		gk_callback_opts+=(-f)
 	fi
-	if [ "${kernel_merge}" != "" ]
-	then
+
+	if [[ -n ${kernel_merge} ]]; then
 		genkernel --callback="emerge ${gk_callback_opts[@]} ${kernel_merge}" \
 			"${GK_ARGS[@]}" || exit 1
 	else


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
  2020-10-29 21:00 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
@ 2020-10-22 18:06 ` Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-22 18:06 UTC (permalink / raw
  To: gentoo-commits

commit:     9d167d45f011940b15c7bba09dd04fd2ca0235ae
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 19 23:10:36 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 23:26:35 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=9d167d45

targets: Remove unnecessary unset PACKAGES

Dead code since 2008.

Fixes: b79d06a3 ("Remove temporary package listing code, ...")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/chroot-functions.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 22340023..7222892e 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -270,7 +270,6 @@ run_merge() {
 show_debug() {
 	if [ -n "${clst_DEBUG}" ]
 	then
-		unset PACKAGES
 		echo "DEBUG:"
 		echo "Profile/target info:"
 		echo "Profile inheritance:"


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
  2020-10-29 21:00 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
@ 2020-10-22 18:06 ` Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-22 18:06 UTC (permalink / raw
  To: gentoo-commits

commit:     6cac6a666a7ab8fec2dc966ed62b827f9f8b7d44
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 01:33:30 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 23:26:35 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6cac6a66

targets: Merge setup_gk_args() and genkernel_compile()

These both just do a bunch of argument concatenation and are not
separate functions in any meaningful way.

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

 targets/support/kmerge.sh | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 27584d51..6a0137d7 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -4,7 +4,7 @@ source /tmp/chroot-functions.sh
 
 install -d /tmp/kerncache
 
-setup_gk_args() {
+genkernel_compile() {
 	# default genkernel args
 	GK_ARGS=(
 		"${kernel_gk_kernargs[@]}"
@@ -61,10 +61,6 @@ setup_gk_args() {
 	then
 		GK_ARGS+=(--loglevel=2)
 	fi
-}
-
-genkernel_compile(){
-	setup_gk_args
 
 	# Build with genkernel using the set options
 	# callback is put here to avoid escaping issues


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
  2020-10-29 21:00 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
@ 2020-10-22 18:06 ` Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-22 18:06 UTC (permalink / raw
  To: gentoo-commits

commit:     627fd3bc71cdd47086a300a3810a0a651d97824e
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 02:41:09 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 23:26:35 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=627fd3bc

targets: Remove unnecessary CONFIG_PROTECT assignment

CONFIG_PROTECT is set in run_merge, making this assignment and export
unnecessary.

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

 targets/support/kmerge.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 972feb99..5e284183 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -88,7 +88,6 @@ genkernel_compile() {
 }
 
 [ -n "${clst_ENVSCRIPT}" ] && source /tmp/envscript
-export CONFIG_PROTECT="-*"
 
 # Set the timezone for the kernel build
 rm /etc/localtime


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-22 18:06 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-22 18:06 UTC (permalink / raw
  To: gentoo-commits

commit:     9119f4ac49947825398f609627d03f4525aa004a
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 23:03:02 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 23:26:35 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=9119f4ac

targets: Drop warning about no cdtar

Most platforms use grub now and don't need a cdtar. Also use double
brackets while we're here.

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

 targets/support/bootloader-setup.sh | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh
index a82b69dc..ea18f736 100755
--- a/targets/support/bootloader-setup.sh
+++ b/targets/support/bootloader-setup.sh
@@ -4,12 +4,8 @@ source ${clst_shdir}/support/functions.sh
 
 # $1 is the destination root
 
-if [ -n "${clst_cdtar}" ]
-then
+if [[ -n ${clst_cdtar} ]]; then
 	extract_cdtar $1
-else
-	#While this seems a little crazy, it's entirely possible the bootloader is just shoved in isoroot overlay
-	echo "No cdtar and unable to auto generate boot loader files... good luck"
 fi
 
 extract_kernels $1/boot


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-28 20:51 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-28 20:51 UTC (permalink / raw
  To: gentoo-commits

commit:     898b9798e2f2e7e325f3b06b3e60d8251809351e
Author:     Daniel Cordero <catalyst <AT> 0xdc <DOT> io>
AuthorDate: Fri Oct 23 09:18:44 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Oct 24 22:03:23 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=898b9798

Update requirements for amd64/x86 ISO creation

xorriso uses mkisofs to create the ISO.

Signed-off-by: Daniel Cordero <catalyst <AT> 0xdc.io>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/create-iso.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/targets/support/create-iso.sh b/targets/support/create-iso.sh
index ac97ef56..9b1c7185 100755
--- a/targets/support/create-iso.sh
+++ b/targets/support/create-iso.sh
@@ -18,9 +18,13 @@ case ${clst_hostarch} in
                 cdmaker="grub-mkrescue"
                 cdmakerpkg="dev-libs/libisoburn and sys-boot/grub:2"
                 ;;
-	ia64)
+	amd64|ia64|x86)
 		cdmaker="grub-mkrescue"
-		cdmakerpkg="sys-fs/mtools, dev-libs/libisoburn, and sys-boot/grub:2"
+		# grub-mkrescue requires:
+		#  xorriso from libisoburn
+		#  mkisofs from cdrtools
+		#  mformat from mtools
+		cdmakerpkg="sys-fs/mtools, dev-libs/libisoburn, sys-boot/grub:2, and virtual/cdrtools"
 		;;
 	*)
 		cdmaker="mkisofs"


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
@ 2020-10-28 20:51 Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2020-10-28 20:51 UTC (permalink / raw
  To: gentoo-commits

commit:     7e1ea3ac0107c349333d1ec887917eb3627af7a4
Author:     Daniel Cordero <catalyst <AT> 0xdc <DOT> io>
AuthorDate: Fri Oct 23 09:18:45 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Oct 24 22:07:01 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=7e1ea3ac

Build ISO with Joliet directory information

Previous syslinux based CDs had this information.
Necessary for direct kernel booting with virt-install --location.

Fixes: 0a27a7a39a "targets: Use GRUB for BIOS boot"
Signed-off-by: Daniel Cordero <catalyst <AT> 0xdc.io>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/support/create-iso.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/targets/support/create-iso.sh b/targets/support/create-iso.sh
index 9b1c7185..a5d5194e 100755
--- a/targets/support/create-iso.sh
+++ b/targets/support/create-iso.sh
@@ -191,12 +191,13 @@ case ${clst_hostarch} in
 	amd64|ia64|ppc*|powerpc*|sparc*|x86)
 		isoroot_checksum
 
+		extra_opts=("-joliet")
 		case ${clst_hostarch} in
-		sparc*) extra_opts="--sparc-boot" ;;
+		sparc*) extra_opts+=("--sparc-boot") ;;
 		esac
 
 		echo ">> Running grub-mkrescue to create iso image...."
-		grub-mkrescue ${extra_opts} -o "${1}" "${clst_target_path}"
+		grub-mkrescue "${extra_opts[*]}" -o "${1}" "${clst_target_path}"
 	;;
 esac
 exit  $?


^ permalink raw reply related	[flat|nested] 77+ messages in thread

* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/
  2020-12-19 19:56 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
@ 2021-01-18 19:53 ` Matt Turner
  0 siblings, 0 replies; 77+ messages in thread
From: Matt Turner @ 2021-01-18 19:53 UTC (permalink / raw
  To: gentoo-commits

commit:     ee1fb86d76f47a38e0c3991f897b4c1896637557
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 19 00:04:23 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Dec 19 02:56:52 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ee1fb86d

targets: Remove EBEEP_IGNORE / EPAUSE_IGNORE

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

 targets/support/chroot-functions.sh | 2 --
 1 file changed, 2 deletions(-)

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 89a313f7..d125756f 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -260,8 +260,6 @@ run_merge() {
 
 	export EMERGE_WARNING_DELAY=0
 	export CLEAN_DELAY=0
-	export EBEEP_IGNORE=0
-	export EPAUSE_IGNORE=0
 	[[ $CONFIG_PROTECT != "-*"* ]] && export CONFIG_PROTECT="-*"
 
 	if [ -n "${clst_VERBOSE}" ]


^ permalink raw reply related	[flat|nested] 77+ messages in thread

end of thread, other threads:[~2021-01-18 19:53 UTC | newest]

Thread overview: 77+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-20  2:50 [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/ Matt Turner
  -- strict thread matches above, loose matches on Subject: below --
2020-12-19 19:56 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2021-01-18 19:53 ` [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-10-29 21:00 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-10-22 18:06 ` [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-10-29 21:00 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-10-22 18:06 ` [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-10-29 21:00 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-10-22 18:06 ` [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-10-29 21:00 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-10-22 18:06 ` [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-10-29 21:00 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-10-20  8:30 ` [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-10-28 20:51 Matt Turner
2020-10-28 20:51 Matt Turner
2020-10-22 18:06 Matt Turner
2020-10-22 18:06 Matt Turner
2020-10-22 18:06 Matt Turner
2020-10-21 17:58 [gentoo-commits] proj/catalyst:master " Matt Turner
2020-10-20  8:30 ` [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-10-21 17:58 [gentoo-commits] proj/catalyst:master " Matt Turner
2020-10-20  8:30 ` [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-10-21 17:58 [gentoo-commits] proj/catalyst:master " Matt Turner
2020-10-20  8:30 ` [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-10-21 17:58 [gentoo-commits] proj/catalyst:master " Matt Turner
2020-10-20  8:30 ` [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-10-21 17:58 [gentoo-commits] proj/catalyst:master " Matt Turner
2020-10-20  8:30 ` [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-10-21 17:58 [gentoo-commits] proj/catalyst:master " Matt Turner
2020-10-20  8:30 ` [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-10-21 17:58 [gentoo-commits] proj/catalyst:master " Matt Turner
2020-10-20  8:30 ` [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-10-20 23:20 Matt Turner
2020-10-20 23:20 Matt Turner
2020-10-20 23:20 Matt Turner
2020-10-20 23:20 Matt Turner
2020-10-20 19:59 Matt Turner
2020-10-20 19:59 Matt Turner
2020-10-20 19:59 Matt Turner
2020-10-20  8:30 Matt Turner
2020-10-20  8:30 Matt Turner
2020-10-20  8:30 Matt Turner
2020-10-20  8:30 Matt Turner
2020-10-20  8:30 Matt Turner
2020-10-20  8:30 Matt Turner
2020-10-20  8:30 Matt Turner
2020-10-20  8:30 Matt Turner
2020-10-20  8:30 Matt Turner
2020-10-20  4:31 Matt Turner
2020-10-20  4:31 Matt Turner
2020-10-20  4:31 Matt Turner
2020-10-20  4:31 Matt Turner
2020-10-20  4:31 Matt Turner
2020-10-20  4:31 Matt Turner
2020-10-20  4:31 Matt Turner
2020-10-20  4:31 Matt Turner
2020-10-20  4:31 Matt Turner
2020-10-20  4:31 Matt Turner
2020-10-20  4:31 Matt Turner
2020-10-20  4:31 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-10-20  2:50 Matt Turner
2020-05-21 20:25 [gentoo-commits] proj/catalyst:master " Matt Turner
2020-05-20  3:39 ` [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-05-20  3:39 Matt Turner
2020-05-17  3:26 [gentoo-commits] proj/catalyst:master " Matt Turner
2020-05-16  6:54 ` [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-05-16  6:54 Matt Turner
2020-05-03 22:58 Matt Turner
2020-05-03 22:58 Matt Turner
2020-05-03 22:58 Matt Turner
2020-05-03 22:04 Matt Turner
2020-05-03 22:04 Matt Turner
2020-05-03 22:04 Matt Turner

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