public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/catalyst:catalyst-3.0-stable commit in: catalyst/base/
@ 2020-05-17  3:54 Matt Turner
  0 siblings, 0 replies; 8+ messages in thread
From: Matt Turner @ 2020-05-17  3:54 UTC (permalink / raw
  To: gentoo-commits

commit:     5df43dae5bd6a58d80bd4d478397e89bf04fdcd5
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 18 20:25:38 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun May 17 03:49:42 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5df43dae

catalyst: Open CONTENTS file in text mode

Fixes: bb21b8615e64 (catalyst: gzip the .CONTENTS file)
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
(cherry picked from commit 060df92357aed97af955aa36caf47e8518b01e05)

 catalyst/base/genbase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py
index 0fc1f57e..0909a475 100644
--- a/catalyst/base/genbase.py
+++ b/catalyst/base/genbase.py
@@ -19,7 +19,7 @@ class GenBase(object):
 		if "contents" in self.settings:
 			contents_map = self.settings["contents_map"]
 			if os.path.exists(path):
-				with gzip.open(contents, "w", encoding='utf-8') as myf:
+				with gzip.open(contents, "wt", encoding='utf-8') as myf:
 					keys={}
 					for i in self.settings["contents"].split():
 						keys[i]=1


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

* [gentoo-commits] proj/catalyst:catalyst-3.0-stable commit in: catalyst/base/
@ 2020-07-20  0:25 Andreas K. Hüttel
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas K. Hüttel @ 2020-07-20  0:25 UTC (permalink / raw
  To: gentoo-commits

commit:     b7e588333cbafa3a35a223614a960eed78464b79
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 20 00:24:30 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Jul 20 00:25:23 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b7e58833

Add "interpreter" parameter for qemu-user build support

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 catalyst/base/stagebase.py | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 776e1a71..0ddd359f 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -41,7 +41,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			"cflags", "cxxflags", "fcflags", "fflags", "ldflags", "asflags",
 			"common_flags", "cbuild", "hostuse", "catalyst_use",
 			"distcc_hosts", "makeopts", "pkgcache_path", "kerncache_path",
-			"compression_mode", "decompression_mode"])
+			"compression_mode", "decompression_mode", "interpreter"])
 
 		self.set_valid_build_kernel_vars(addlargs)
 		TargetBase.__init__(self, myspec, addlargs)
@@ -1061,6 +1061,22 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 			shutil.copy('/etc/resolv.conf', self.settings['chroot_path'] + '/etc/')
 
+			# Copy over the binary interpreter (qemu), if applicable; note that it's given
+			# as full path and goes to the same place in the chroot
+			if "interpreter" in self.settings:
+				if not os.path.exists(self.settings["interpreter"]):
+					raise CatalystError(
+						"Can't find interpreter " + self.settings["interpreter"],
+						print_traceback=True)
+
+				log.notice('Copying binary interpreter %s into chroot', self.settings['interpreter'])
+
+				if os.path.exists(self.settings['chroot_path'] + '/' + self.settings['interpreter']):
+					os.rename(self.settings['chroot_path'] + '/' + self.settings['interpreter'], self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst')
+
+				shutil.copy(self.settings['interpreter'],
+					self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+
 			# Copy over the envscript, if applicable
 			if "envscript" in self.settings:
 				if not os.path.exists(self.settings["envscript"]):
@@ -1226,6 +1242,13 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		if os.path.exists(hosts_file + '.catalyst'):
 			os.rename(hosts_file + '.catalyst', hosts_file)
 
+		# optionally clean up binary interpreter
+		if "interpreter" in self.settings:
+			if os.path.exists(self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst'):
+				os.rename(self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst', self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+			else:
+				os.remove(self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+
 		# optionally clean up portage configs
 		if ("portage_prefix" in self.settings and
 			"sticky-config" not in self.settings["options"]):


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

* [gentoo-commits] proj/catalyst:catalyst-3.0-stable commit in: catalyst/base/
@ 2020-07-24 20:33 Andreas K. Hüttel
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas K. Hüttel @ 2020-07-24 20:33 UTC (permalink / raw
  To: gentoo-commits

commit:     9f8dec72a371f7b60af1b1669d112c0d5c13b728
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 24 12:35:09 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Jul 24 13:33:53 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=9f8dec72

stagebase: Extend cleanup logic to more directories

Needed for FEATURES management (switching off pid namespaces in qemu)
and for testing build system hacks (like building python single-threaded
to avoid hangs).

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 catalyst/base/stagebase.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 0ddd359f..afeda722 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1253,13 +1253,19 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		if ("portage_prefix" in self.settings and
 			"sticky-config" not in self.settings["options"]):
 			log.debug("clean(), portage_preix = %s, no sticky-config", self.settings["portage_prefix"])
-			for _dir in "accept_keywords", "keywords", "mask", "unmask", "use":
+			for _dir in "package.accept_keywords", "package.keywords", "package.mask", "package.unmask", "package.use", "package.env", "env":
 				target = pjoin(self.settings["destpath"],
-					"etc/portage/package.%s" % _dir,
+					"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")
+		if os.path.exists(target):
+			log.warning("You've been hacking. Clearing target patches: %s", target)
+			clear_path(target)
+
 		# Remove our overlay
 		overlay = normpath(self.settings["chroot_path"] + self.settings["local_overlay"])
 		if os.path.exists(overlay):


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

* [gentoo-commits] proj/catalyst:catalyst-3.0-stable commit in: catalyst/base/
  2020-09-17 21:13 [gentoo-commits] proj/catalyst:dilfridge/image " Andreas K. Hüttel
@ 2020-09-05 18:33 ` Andreas K. Hüttel
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas K. Hüttel @ 2020-09-05 18:33 UTC (permalink / raw
  To: gentoo-commits

commit:     52b7235e399444247adf3d9c24a20dd57db50f20
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Sep  4 16:34:54 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Sep  4 20:18:17 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=52b7235e

Allow "interpreter" parameter as space-separated list of files

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 catalyst/base/stagebase.py | 44 +++++++++++++++++++++++++++++---------------
 1 file changed, 29 insertions(+), 15 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index afeda722..0cf3495a 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1061,21 +1061,28 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 			shutil.copy('/etc/resolv.conf', self.settings['chroot_path'] + '/etc/')
 
-			# Copy over the binary interpreter (qemu), if applicable; note that it's given
-			# as full path and goes to the same place in the chroot
+			# Copy over the binary interpreter(s) (qemu), if applicable; note that they are given
+			# as space-separated list of full paths and go to the same place in the chroot
 			if "interpreter" in self.settings:
-				if not os.path.exists(self.settings["interpreter"]):
-					raise CatalystError(
-						"Can't find interpreter " + self.settings["interpreter"],
-						print_traceback=True)
 
-				log.notice('Copying binary interpreter %s into chroot', self.settings['interpreter'])
+				if isinstance(self.settings["interpreter"], str):
+					myints = [self.settings["interpreter"]]
+				else:
+					myints = self.settings["interpreter"]
+
+				for myi in myints:
+					if not os.path.exists(myi):
+						raise CatalystError(
+							"Can't find interpreter " + myi,
+							print_traceback=True)
 
-				if os.path.exists(self.settings['chroot_path'] + '/' + self.settings['interpreter']):
-					os.rename(self.settings['chroot_path'] + '/' + self.settings['interpreter'], self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst')
+					log.notice('Copying binary interpreter %s into chroot', myi)
 
-				shutil.copy(self.settings['interpreter'],
-					self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+					if os.path.exists(self.settings['chroot_path'] + '/' + myi):
+						os.rename(self.settings['chroot_path'] + '/' + myi, self.settings['chroot_path'] + '/' + myi + '.catalyst')
+
+					shutil.copy(myi,
+						self.settings['chroot_path'] + '/' + myi)
 
 			# Copy over the envscript, if applicable
 			if "envscript" in self.settings:
@@ -1242,12 +1249,19 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		if os.path.exists(hosts_file + '.catalyst'):
 			os.rename(hosts_file + '.catalyst', hosts_file)
 
-		# optionally clean up binary interpreter
+		# optionally clean up binary interpreter(s)
 		if "interpreter" in self.settings:
-			if os.path.exists(self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst'):
-				os.rename(self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst', self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+
+			if isinstance(self.settings["interpreter"], str):
+				myints = [self.settings["interpreter"]]
 			else:
-				os.remove(self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+				myints = self.settings["interpreter"]
+
+			for myi in myints:
+				if os.path.exists(self.settings['chroot_path'] + '/' + myi + '.catalyst'):
+					os.rename(self.settings['chroot_path'] + '/' + myi + '.catalyst', self.settings['chroot_path'] + '/' + myi)
+				else:
+					os.remove(self.settings['chroot_path'] + '/' + myi)
 
 		# optionally clean up portage configs
 		if ("portage_prefix" in self.settings and


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

* [gentoo-commits] proj/catalyst:catalyst-3.0-stable commit in: catalyst/base/
@ 2020-10-14 17:50 Matt Turner
  0 siblings, 0 replies; 8+ messages in thread
From: Matt Turner @ 2020-10-14 17:50 UTC (permalink / raw
  To: gentoo-commits

commit:     e82e550b1b8d0d73673d8cbf701d0c76537f4525
Author:     Felix Bier <Felix.Bier <AT> rohde-schwarz <DOT> com>
AuthorDate: Wed Oct 14 13:38:21 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Oct 14 17:50:09 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e82e550b

catalyst: Fix spec file USE flag parsing

In stagebase, the set_use function applies .split() to the use flags
passed from the spec file, if the value is a string. However, the
result is immediately overwritten after the if-statement. Therefore the
.split() is ineffectual.

This results in self.settings["use"] holding a string,
which is then regarded as a list of characters in write_make_conf.
This fix ensures that the result of the split is not overwritten
(matching the similar code in set_catalyst_use).

For example, setting "stage4/use: abc" in a spec file results
in USE="a b c ..." in the generated make.conf.
With this fix, the generated make.conf contains the expected
USE="abc ...".

Fixes: b30dd97d ("Unify all make.conf settings and writing")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
(cherry picked from commit 5d01bda685236a8543da3a8136a4fe809f6fd9ae)

 catalyst/base/stagebase.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 0cf3495a..bb8f29da 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -571,7 +571,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		if use in self.settings:
 			if isinstance(self.settings[use], str):
 				self.settings["use"] = self.settings[use].split()
-			self.settings["use"] = self.settings[use]
+			else:
+				self.settings["use"] = self.settings[use]
 			del self.settings[use]
 		else:
 			self.settings["use"] = []


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

* [gentoo-commits] proj/catalyst:catalyst-3.0-stable commit in: catalyst/base/
@ 2021-06-06 22:38 Matt Turner
  0 siblings, 0 replies; 8+ messages in thread
From: Matt Turner @ 2021-06-06 22:38 UTC (permalink / raw
  To: gentoo-commits

commit:     ec59a48305783e56b768213073e7cf21e1349f00
Author:     Daniel Cordero <catalyst <AT> 0xdc <DOT> io>
AuthorDate: Thu Feb  4 11:07:19 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Jun  6 22:37:11 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ec59a483

catalyst: Remove /etc/machine-id in all stages

Machine IDs are unique per installation, but if they are retained in a
stage tarball, all installations from that stage share the same machine
id.

Signed-off-by: Daniel Cordero <catalyst <AT> 0xdc.io>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
(cherry picked from commit c1f5707a9c9f27f730aad908c8f3c86075201fc9)

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index bb8f29da..770d1b35 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -470,7 +470,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			self.settings["destpath"] = normpath(self.settings["chroot_path"])
 
 	def set_cleanables(self):
-		self.settings["cleanables"] = ["/etc/resolv.conf", "/var/tmp/*", "/tmp/*",
+		self.settings["cleanables"] = ["/etc/machine-id", "/etc/resolv.conf", "/var/tmp/*", "/tmp/*",
 			self.settings["repo_basedir"] + "/" +
 			self.settings["repo_name"]]
 


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

* [gentoo-commits] proj/catalyst:catalyst-3.0-stable commit in: catalyst/base/
@ 2021-07-06 22:13 Matt Turner
  0 siblings, 0 replies; 8+ messages in thread
From: Matt Turner @ 2021-07-06 22:13 UTC (permalink / raw
  To: gentoo-commits

commit:     29c56b4712c738ff37c4d506d42f1adb21b4ec9c
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  6 22:10:59 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Jul  6 22:10:59 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=29c56b47

catalyst: Remove remaining snakeoil LockInUse usage

I missed this when backporting.

Fixes: 9221e327 ("catalyst: Replace snakeoil's locks with fasteners")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index ad0028e1..28c4ee23 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1497,10 +1497,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			sys.stdout.flush()
 			try:
 				getattr(self, x)()
-			except LockInUse:
-				log.error('Unable to aquire the lock...')
-				failure = True
-				break
 			except Exception:
 				log.error('Exception running action sequence %s', x, exc_info=True)
 				failure = True


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

* [gentoo-commits] proj/catalyst:catalyst-3.0-stable commit in: catalyst/base/
@ 2022-01-30 21:02 Matt Turner
  0 siblings, 0 replies; 8+ messages in thread
From: Matt Turner @ 2022-01-30 21:02 UTC (permalink / raw
  To: gentoo-commits

commit:     5f563e551d7cb99edd3af4427186cc250a811f04
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 20:59:25 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 20:59:25 2022 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5f563e55

catalyst: Create snapcache directory

Apparently the snakeoil locking mechanisms implicitly created the
directory for us.

Closes: https://bugs.gentoo.org/806229
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 28c4ee23..0cb43033 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -879,6 +879,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				unpack = False
 
 		if unpack:
+			ensure_dirs(self.settings['snapshot_cache_path'])
 			if os.path.exists(target_portdir):
 				log.info('%s', cleanup_msg)
 			clear_dir(target_portdir)


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

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

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-17  3:54 [gentoo-commits] proj/catalyst:catalyst-3.0-stable commit in: catalyst/base/ Matt Turner
  -- strict thread matches above, loose matches on Subject: below --
2020-07-20  0:25 Andreas K. Hüttel
2020-07-24 20:33 Andreas K. Hüttel
2020-09-17 21:13 [gentoo-commits] proj/catalyst:dilfridge/image " Andreas K. Hüttel
2020-09-05 18:33 ` [gentoo-commits] proj/catalyst:catalyst-3.0-stable " Andreas K. Hüttel
2020-10-14 17:50 Matt Turner
2021-06-06 22:38 Matt Turner
2021-07-06 22:13 Matt Turner
2022-01-30 21:02 Matt Turner

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