public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/
  2020-05-20  3:39 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
@ 2020-05-20  3:39 ` Matt Turner
  0 siblings, 0 replies; 9+ messages in thread
From: Matt Turner @ 2020-05-20  3:39 UTC (permalink / raw
  To: gentoo-commits

commit:     718a67fc8927ae28574182a0fe551e99ee6d66ce
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed May 20 02:22:11 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed May 20 03:13:13 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=718a67fc

catalyst: Only emit true boolean envars

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

 catalyst/base/stagebase.py          | 2 --
 targets/support/chroot-functions.sh | 6 +++---
 targets/support/kmerge.sh           | 4 ++--
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 8e2b08da..645a9f61 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1283,8 +1283,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
             elif isinstance(self.settings[x], bool):
                 if self.settings[x]:
                     self.env[varname] = "true"
-                else:
-                    self.env[varname] = "false"
             elif isinstance(self.settings[x], dict):
                 if x in ['compress_definitions', 'decompress_definitions']:
                     continue

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index b6e221af..b531eb6a 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -117,7 +117,7 @@ setup_emerge_opts() {
 	emerge_opts=()
 	bootstrap_opts=()
 
-	if [[ "${clst_VERBOSE}" == "true" ]]
+	if [ -n "${clst_VERBOSE}" ]
 	then
 		emerge_opts+=(--verbose)
 		bootstrap_opts+=(-v)
@@ -256,7 +256,7 @@ run_merge() {
 	export EPAUSE_IGNORE=0
 	[[ $CONFIG_PROTECT != "-*"* ]] && export CONFIG_PROTECT="-*"
 
-	if [[ "${clst_VERBOSE}" == "true" ]]
+	if [ -n "${clst_VERBOSE}" ]
 	then
 		echo "ROOT=${ROOT} emerge ${emerge_opts[@]} -pt $@" || exit 1
 		emerge ${emerge_opts[@]} -pt $@ || exit 3
@@ -268,7 +268,7 @@ run_merge() {
 }
 
 show_debug() {
-	if [ "${clst_DEBUG}" = "1" ]
+	if [ -n "${clst_DEBUG}" ]
 	then
 		unset PACKAGES
 		echo "DEBUG:"

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 6b589493..702c5454 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -58,7 +58,7 @@ setup_gk_args() {
 		fi
 	fi
 
-	if [[ "${clst_VERBOSE}" == "true" ]]
+	if [ -n "${clst_VERBOSE}" ]
 	then
 		GK_ARGS+=(--loglevel=2)
 	fi
@@ -85,7 +85,7 @@ genkernel_compile(){
 	esac
 	# Build with genkernel using the set options
 	# callback is put here to avoid escaping issues
-	if [[ "${clst_VERBOSE}" == "true" ]]
+	if [ -n "${clst_VERBOSE}" ]
 	then
 		gk_callback_opts=(-vN)
 	else


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

* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/
@ 2020-05-27  6:21 Matt Turner
  0 siblings, 0 replies; 9+ messages in thread
From: Matt Turner @ 2020-05-27  6:21 UTC (permalink / raw
  To: gentoo-commits

commit:     576cbab37a1a6a52b9409c2bf0dfa81c5e36e947
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu May 21 22:37:29 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed May 27 06:21:10 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=576cbab3

catalyst: Clean up unbind() function

Does a couple of things:
	- drops log.notice -> log.warning
	- Removes the kill_chroot_pids support code since ....
	  namespaces?

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

 catalyst/base/stagebase.py          | 45 +++++++--------------------
 targets/support/kill-chroot-pids.sh | 62 -------------------------------------
 2 files changed, 12 insertions(+), 95 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index aa5cafd0..d92f3ffb 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -625,17 +625,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
             assert self.settings[verify] == "blake2"
             self.settings.setdefault("gk_mainargs", []).append("--b2sum")
 
-    def kill_chroot_pids(self):
-        log.info('Checking for processes running in chroot and killing them.')
-
-        # Force environment variables to be exported so script can see them
-        self.setup_environment()
-
-        killcmd = normpath(self.settings["sharedir"] +
-                           self.settings["shdir"] + "/support/kill-chroot-pids.sh")
-        if os.path.exists(killcmd):
-            cmd([killcmd], env=self.env)
-
     def mount_safety_check(self):
         """
         Check and verify that none of our paths in mypath are mounted. We don't
@@ -886,35 +875,28 @@ class StageBase(TargetBase, ClearBase, GenBase):
                 raise CatalystError
 
     def unbind(self):
-        ouch = 0
-        mypath = self.settings["chroot_path"]
+        chroot_path = self.settings["chroot_path"]
+        umount_failed = False
 
         # Unmount in reverse order
-        for x in [x for x in reversed(self.mount) if self.mount[x]['enable']]:
-            target = normpath(mypath + self.mount[x]['target'])
-            if not os.path.exists(target):
-                log.notice('%s does not exist. Skipping', target)
+        for target in [Path(chroot_path + self.mount[x]['target'])
+                       for x in reversed(self.mount)
+                       if self.mount[x]['enable']]:
+            if not target.exists():
+                log.debug('%s does not exist. Skipping', target)
                 continue
 
             if not ismount(target):
-                log.notice('%s is not a mount point. Skipping', target)
+                log.debug('%s is not a mount point. Skipping', target)
                 continue
 
             try:
                 umount(target)
-            except CatalystError:
-                log.warning('First attempt to unmount failed: %s', target)
-                log.warning('Killing any pids still running in the chroot')
-
-                self.kill_chroot_pids()
-
-                try:
-                    umount(target)
-                except CatalystError:
-                    ouch = 1
-                    log.warning("Couldn't umount bind mount: %s", target)
+            except OSError as e:
+                log.warning("Couldn't umount bind mount: %s", target)
+                umount_failed = True
 
-        if ouch:
+        if umount_failed:
             # if any bind mounts really failed, then we need to raise
             # this to potentially prevent an upcoming bash stage cleanup script
             # from wiping our bind mounts.
@@ -1307,9 +1289,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
     def run(self):
         self.chroot_lock.write_lock()
 
-        # Kill any pids in the chroot
-        self.kill_chroot_pids()
-
         # Check for mounts right away and abort if we cannot unmount them
         self.mount_safety_check()
 

diff --git a/targets/support/kill-chroot-pids.sh b/targets/support/kill-chroot-pids.sh
deleted file mode 100755
index ea8ee402..00000000
--- a/targets/support/kill-chroot-pids.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-# Script to kill processes found running in the chroot.
-
-if [ "${clst_chroot_path}" == "/" ]
-then
-	echo "Aborting .... clst_chroot_path is set to /"
-	echo "This is very dangerous"
-	exit 1
-fi
-
-if [ "${clst_chroot_path}" == "" ]
-then
-	echo "Aborting .... clst_chroot_path is NOT set"
-	echo "This is very dangerous"
-	exit 1
-fi
-
-j=0
-declare -a pids
-# Get files and dirs in /proc
-for i in `ls /proc`
-do
-	# Test for directories
-	if [ -d /proc/$i ]
-	then
-	# Search for exe containing string inside ${clst_chroot_path}
-	ls -la --color=never /proc/$i 2>&1 |grep exe|grep ${clst_chroot_path} > /dev/null
-
-	# If found
-	if [ $? == 0 ]
-	then
-		# Assign the pid into the pids array
-		pids[$j]=$i
-		j=$(($j+1))
-	fi
-	fi
-done
-
-if [ ${j} -gt 0 ]
-then
-	echo
-	echo "Killing process(es)"
-	echo "pid: process name"
-	for pid in ${pids[@]}
-	do
-		P_NAME=$(ls -la --color=never /proc/${pid} 2>&1 |grep exe|grep ${clst_chroot_path}|awk '{print $11}')
-		echo ${pid}: ${P_NAME}
-	done
-	echo
-	echo "Press Ctrl-C within 10 seconds to abort"
-
-	sleep 10
-
-	for pid in ${pids[@]}
-	do
-		kill -9 ${pid}
-	done
-
-	# Small sleep here to give the process(es) a chance to die before running unbind again.
-	sleep 5
-
-fi


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

* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/
  2020-12-27 23:15 [gentoo-commits] proj/catalyst:master " Matt Turner
@ 2020-12-19 19:56 ` Matt Turner
  0 siblings, 0 replies; 9+ messages in thread
From: Matt Turner @ 2020-12-19 19:56 UTC (permalink / raw
  To: gentoo-commits

commit:     03914bb12003cbf1b34be07f356b97c9c06d10fe
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 19 00:23:32 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=03914bb1

catalyst: Remove set_dest_path()

root_path is always set, so half of this function was dead. The other
half set the same thing as set_stage_path().

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

 catalyst/base/stagebase.py            | 20 ++++++--------------
 targets/support/target_image_setup.sh |  4 ++--
 2 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index ba6b1a1b..ed4d1227 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -154,7 +154,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
         self.set_source_path()
         self.set_chroot_path()
         self.set_autoresume_path()
-        self.set_dest_path()
         self.set_stage_path()
         self.set_target_path()
 
@@ -426,13 +425,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
                         self.generate_hash(self.settings["source_path"], "sha1")
         log.notice('Source path set to %s', self.settings['source_path'])
 
-    def set_dest_path(self):
-        if "root_path" in self.settings:
-            self.settings["destpath"] = normpath(self.settings["chroot_path"] +
-                                                 self.settings["root_path"])
-        else:
-            self.settings["destpath"] = normpath(self.settings["chroot_path"])
-
     def set_cleanables(self):
         self.settings['cleanables'] = [
             "/etc/resolv.conf",
@@ -845,7 +837,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
                                    "/root_overlay"]:
                 if os.path.exists(x):
                     log.info('Copying root_overlay: %s', x)
-                    cmd(['rsync', '-a', x + '/', self.settings['destpath']],
+                    cmd(['rsync', '-a', x + '/', self.settings['stage_path']],
                         env=self.env)
 
     def bind(self):
@@ -1095,7 +1087,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
         else:
             for x in self.settings["cleanables"]:
                 log.notice('Cleaning chroot: %s', x)
-                clear_path(normpath(self.settings["destpath"] + x))
+                clear_path(normpath(self.settings["stage_path"] + x))
 
         # Put /etc/hosts back into place
         hosts_file = self.settings['chroot_path'] + '/etc/hosts'
@@ -1119,14 +1111,14 @@ class StageBase(TargetBase, ClearBase, GenBase):
             log.debug("clean(), portage_preix = %s, no sticky-config",
                       self.settings["portage_prefix"])
             for _dir in "package.accept_keywords", "package.keywords", "package.mask", "package.unmask", "package.use", "package.env", "env":
-                target = pjoin(self.settings["destpath"],
+                target = pjoin(self.settings["stage_path"],
                                "etc/portage/%s" % _dir,
                                self.settings["portage_prefix"])
                 log.notice("Clearing portage_prefix target: %s", target)
                 clear_path(target)
 
         # Remove hacks that should *never* go into stages
-        target = pjoin(self.settings["destpath"], "etc/portage/patches")
+        target = pjoin(self.settings["stage_path"], "etc/portage/patches")
         if os.path.exists(target):
             log.warning("You've been hacking. Clearing target patches: %s", target)
             clear_path(target)
@@ -1172,7 +1164,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
                     self.settings[self.settings["spec_prefix"] +
                                   "/empty"].split()
             for x in self.settings[self.settings["spec_prefix"] + "/empty"]:
-                myemp = self.settings["destpath"] + x
+                myemp = self.settings["stage_path"] + x
                 if not os.path.isdir(myemp) or os.path.islink(myemp):
                     log.warning('not a directory or does not exist, '
                                 'skipping "empty" operation: %s', x)
@@ -1192,7 +1184,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
                 # We're going to shell out for all these cleaning
                 # operations, so we get easy glob handling.
                 log.notice('%s: removing %s', self.settings["spec_prefix"], x)
-                clear_path(self.settings["destpath"] + x)
+                clear_path(self.settings["stage_path"] + x)
             try:
                 if os.path.exists(self.settings["controller_file"]):
                     cmd([self.settings['controller_file'], 'clean'],

diff --git a/targets/support/target_image_setup.sh b/targets/support/target_image_setup.sh
index fdc4a234..f9427eaf 100755
--- a/targets/support/target_image_setup.sh
+++ b/targets/support/target_image_setup.sh
@@ -7,11 +7,11 @@ mkdir -p "${1}"
 echo "Creating ${clst_fstype} filesystem"
 case ${clst_fstype} in
 	squashfs)
-		gensquashfs -D "${clst_destpath}" -q ${clst_fsops} "${1}/image.squashfs" \
+		gensquashfs -D "${clst_stage_path}" -q ${clst_fsops} "${1}/image.squashfs" \
 			|| die "Failed to create squashfs filesystem"
 	;;
 	jffs2)
-		mkfs.jffs2 --root="${clst_destpath}" --output="${1}/image.jffs" "${clst_fsops}" \
+		mkfs.jffs2 --root="${clst_stage_path}" --output="${1}/image.jffs" "${clst_fsops}" \
 			|| die "Failed to create jffs2 filesystem"
 	;;
 esac


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

* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/
@ 2021-01-18  3:38 Matt Turner
  0 siblings, 0 replies; 9+ messages in thread
From: Matt Turner @ 2021-01-18  3:38 UTC (permalink / raw
  To: gentoo-commits

commit:     88f38bc955b664741b2473a4316c0b55d622b8ad
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 18 03:09:30 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Jan 18 03:27:41 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=88f38bc9

catalyst: Call config_profile_link for all targets

This reverts the following two commits, which have no documented
rationale.

Revert "Set the profile by calling eselect."

This reverts commit 90c03f9dc255ba89849e46490f9ead7ab3921950.

Revert "Drop config_profile_link from the action_sequence for the generic stage."

This reverts commit 3bd10159bf7cfe14b6d8a8218b94eca73be4c997.

Doing so improves the code in two ways:

   1) it makes prepare_sequence identical across all targets, which will
      allow me to deduplicate some code
   2) it no longer calls eselect profile each time chroot-functions.sh
      is sourced (even for those targets that were still calling
      config_profile_link)

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

 catalyst/base/stagebase.py          | 1 +
 targets/support/chroot-functions.sh | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 79f00149..5115d029 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -483,6 +483,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
         """Set basic stage1, 2, 3 action sequences"""
         self.prepare_sequence.extend([
             self.unpack,
+            self.config_profile_link,
             self.setup_confdir,
             self.portage_overlay,
         ])

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 2aec018e..88465c31 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -1,8 +1,5 @@
 #!/bin/bash
 
-# Set the profile
-eselect profile set ${clst_target_profile}
-
 # Trap these signals and kill ourselves if received
 # Force ourselves to die if any of these signals are received
 # most likely our controlling terminal is gone


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

* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/
@ 2021-01-18  3:49 Matt Turner
  0 siblings, 0 replies; 9+ messages in thread
From: Matt Turner @ 2021-01-18  3:49 UTC (permalink / raw
  To: gentoo-commits

commit:     e55b5bce1dfd69e767cd17c961267e9bc113ea47
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 18 03:09:30 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Jan 18 03:49:48 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e55b5bce

catalyst: Call config_profile_link for all targets

This reverts the following two commits, which have no documented
rationale.

Revert "Set the profile by calling eselect."

This reverts commit 90c03f9dc255ba89849e46490f9ead7ab3921950.

Revert "Drop config_profile_link from the action_sequence for the generic stage."

This reverts commit 3bd10159bf7cfe14b6d8a8218b94eca73be4c997.

Doing so improves the code in two ways:

   1) it makes prepare_sequence identical across all targets, which will
      allow me to deduplicate some code
   2) it no longer calls eselect profile each time chroot-functions.sh
      is sourced (even for those targets that were still calling
      config_profile_link)

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

 catalyst/base/stagebase.py          | 1 +
 targets/support/chroot-functions.sh | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index ae13e35f..753f378e 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -483,6 +483,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
         """Set basic stage1, 2, 3 action sequences"""
         self.prepare_sequence.extend([
             self.unpack,
+            self.config_profile_link,
             self.setup_confdir,
             self.portage_overlay,
         ])

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 2aec018e..88465c31 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -1,8 +1,5 @@
 #!/bin/bash
 
-# Set the profile
-eselect profile set ${clst_target_profile}
-
 # Trap these signals and kill ourselves if received
 # Force ourselves to die if any of these signals are received
 # most likely our controlling terminal is gone


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

* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/
@ 2021-01-18 16:56 Matt Turner
  0 siblings, 0 replies; 9+ messages in thread
From: Matt Turner @ 2021-01-18 16:56 UTC (permalink / raw
  To: gentoo-commits

commit:     6e494c8d99072a6a6cb5feeafe893510147e51c1
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 18 03:09:30 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Jan 18 16:55:29 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6e494c8d

catalyst: Call config_profile_link for all targets

This reverts the following two commits, which have no documented
rationale.

Revert "Set the profile by calling eselect."

This reverts commit 90c03f9dc255ba89849e46490f9ead7ab3921950.

Revert "Drop config_profile_link from the action_sequence for the generic stage."

This reverts commit 3bd10159bf7cfe14b6d8a8218b94eca73be4c997.

Doing so improves the code in two ways:

   1) it makes prepare_sequence identical across all targets, which will
      allow me to deduplicate some code
   2) it no longer calls eselect profile each time chroot-functions.sh
      is sourced (even for those targets that were still calling
      config_profile_link)

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

 catalyst/base/stagebase.py          | 1 +
 targets/support/chroot-functions.sh | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 0e742acb..bccba11c 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -483,6 +483,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
         """Set basic stage1, 2, 3 action sequences"""
         self.prepare_sequence.extend([
             self.unpack,
+            self.config_profile_link,
             self.setup_confdir,
             self.portage_overlay,
         ])

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 2aec018e..88465c31 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -1,8 +1,5 @@
 #!/bin/bash
 
-# Set the profile
-eselect profile set ${clst_target_profile}
-
 # Trap these signals and kill ourselves if received
 # Force ourselves to die if any of these signals are received
 # most likely our controlling terminal is gone


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

* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/
@ 2021-01-18 17:06 Matt Turner
  0 siblings, 0 replies; 9+ messages in thread
From: Matt Turner @ 2021-01-18 17:06 UTC (permalink / raw
  To: gentoo-commits

commit:     e1a706383378a1ed71ea4d4300dfc04b42479390
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 18 03:09:30 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Jan 18 17:05:45 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e1a70638

catalyst: Call config_profile_link for all targets

This reverts the following two commits, which have no documented
rationale.

Revert "Set the profile by calling eselect."

This reverts commit 90c03f9dc255ba89849e46490f9ead7ab3921950.

Revert "Drop config_profile_link from the action_sequence for the generic stage."

This reverts commit 3bd10159bf7cfe14b6d8a8218b94eca73be4c997.

Doing so improves the code in two ways:

   1) it makes prepare_sequence identical across all targets, which will
      allow me to deduplicate some code
   2) it no longer calls eselect profile each time chroot-functions.sh
      is sourced (even for those targets that were still calling
      config_profile_link)

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

 catalyst/base/stagebase.py          | 1 +
 targets/support/chroot-functions.sh | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 447e073d..9d72e765 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -500,6 +500,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
         """Set basic stage1, 2, 3 action sequences"""
         self.prepare_sequence.extend([
             self.unpack,
+            self.config_profile_link,
             self.setup_confdir,
             self.portage_overlay,
         ])

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 2aec018e..88465c31 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -1,8 +1,5 @@
 #!/bin/bash
 
-# Set the profile
-eselect profile set ${clst_target_profile}
-
 # Trap these signals and kill ourselves if received
 # Force ourselves to die if any of these signals are received
 # most likely our controlling terminal is gone


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

* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/
@ 2021-01-18 18:24 Matt Turner
  0 siblings, 0 replies; 9+ messages in thread
From: Matt Turner @ 2021-01-18 18:24 UTC (permalink / raw
  To: gentoo-commits

commit:     adce739a1d4e1c4f5321a705f526ae4759844565
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 18 03:09:30 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Jan 18 18:01:21 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=adce739a

catalyst: Call config_profile_link for all targets

This reverts the following two commits, which have no documented
rationale.

Revert "Set the profile by calling eselect."

This reverts commit 90c03f9dc255ba89849e46490f9ead7ab3921950.

Revert "Drop config_profile_link from the action_sequence for the generic stage."

This reverts commit 3bd10159bf7cfe14b6d8a8218b94eca73be4c997.

Doing so improves the code in two ways:

   1) it makes prepare_sequence identical across all targets, which will
      allow deduplicating some code
   2) it no longer calls eselect profile each time chroot-functions.sh
      is sourced (even for those targets that were still calling
      config_profile_link)

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

 catalyst/base/stagebase.py          | 1 +
 targets/support/chroot-functions.sh | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 447e073d..9d72e765 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -500,6 +500,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
         """Set basic stage1, 2, 3 action sequences"""
         self.prepare_sequence.extend([
             self.unpack,
+            self.config_profile_link,
             self.setup_confdir,
             self.portage_overlay,
         ])

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 2aec018e..88465c31 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -1,8 +1,5 @@
 #!/bin/bash
 
-# Set the profile
-eselect profile set ${clst_target_profile}
-
 # Trap these signals and kill ourselves if received
 # Force ourselves to die if any of these signals are received
 # most likely our controlling terminal is gone


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

* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/
  2021-07-29 22:00 [gentoo-commits] proj/catalyst:master " Matt Turner
@ 2022-01-30 20:42 ` Matt Turner
  0 siblings, 0 replies; 9+ messages in thread
From: Matt Turner @ 2022-01-30 20:42 UTC (permalink / raw
  To: gentoo-commits

commit:     ad04eab48c96350f0866d6c1fe76f289499df21b
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 29 01:10:58 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Jul 29 01:13:52 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ad04eab4

catalyst: Remove boot/kernel/*/kernelopts support

This undocumented option was only wired up for hppa, and was used by the
minimal livecd to set panic=30.

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

 catalyst/base/stagebase.py          | 11 -----------
 targets/support/bootloader-setup.sh |  8 +-------
 2 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 10cffd4c..4a1b4eb6 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -662,7 +662,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
                     "boot/kernel/" + x + "/gk_action",
                     "boot/kernel/" + x + "/gk_kernargs",
                     "boot/kernel/" + x + "/initramfs_overlay",
-                    "boot/kernel/" + x + "/kernelopts",
                     "boot/kernel/" + x + "/packages",
                     "boot/kernel/" + x + "/softlevel",
                     "boot/kernel/" + x + "/sources",
@@ -1508,16 +1507,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
             return
         self._copy_kernel_config(kname=kname)
 
-        # If we need to pass special options to the bootloader
-        # for this kernel put them into the environment
-        key = 'boot/kernel/' + kname + '/kernelopts'
-        if key in self.settings:
-            myopts = self.settings[key]
-
-            if not isinstance(myopts, str):
-                myopts = ' '.join(myopts)
-            self.env[kname + "_kernelopts"] = myopts
-
         key = 'boot/kernel/' + kname + '/extraversion'
         self.settings.setdefault(key, '')
         self.env["clst_kextraversion"] = self.settings[key]

diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh
index a998a420..08d25b59 100755
--- a/targets/support/bootloader-setup.sh
+++ b/targets/support/bootloader-setup.sh
@@ -70,16 +70,10 @@ case ${clst_hostarch} in
 		boot_kernel_common_name=${first/%32/}
 		boot_kernel_common_name=${boot_kernel_common_name/%64/}
 
-		for x in ${clst_boot_kernel}
-		do
-			eval kopt=\$clst_boot_kernel_${x}_kernelopts
-			kopts+=(${kopt})
-		done
-
 		# copy the bootloader for the final image
 		cp /usr/share/palo/iplboot $1/boot/
 
-		echo "--commandline=0/${boot_kernel_common_name} initrd=${first}.igz ${default_append_line[@]} ${kopts[@]}" >> ${icfg}
+		echo "--commandline=0/${boot_kernel_common_name} initrd=${first}.igz ${default_append_line[@]}" >> ${icfg}
 		echo "--bootloader=boot/iplboot" >> ${icfg}
 		echo "--ramdisk=boot/${first}.igz" >> ${icfg}
 		for x in ${clst_boot_kernel}


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

end of thread, other threads:[~2022-01-30 20:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-27  6:21 [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, targets/support/ Matt Turner
  -- strict thread matches above, loose matches on Subject: below --
2021-07-29 22:00 [gentoo-commits] proj/catalyst:master " Matt Turner
2022-01-30 20:42 ` [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2021-01-18 18:24 Matt Turner
2021-01-18 17:06 Matt Turner
2021-01-18 16:56 Matt Turner
2021-01-18  3:49 Matt Turner
2021-01-18  3:38 Matt Turner
2020-12-27 23:15 [gentoo-commits] proj/catalyst:master " Matt Turner
2020-12-19 19:56 ` [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-05-20  3:39 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-05-20  3:39 ` [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner

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