public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/, catalyst/base/
Date: Sun, 24 May 2015 00:08:31 +0000 (UTC)	[thread overview]
Message-ID: <1427509696.64cae407aa8e334a2b925fd5aab1f6a4d164a47a.dolsen@gentoo> (raw)
Message-ID: <20150524000831.a4nH2CKFxzl-_uzYg2PxEPKtf3LYG2kBqqknVsFWspo@z> (raw)

commit:     64cae407aa8e334a2b925fd5aab1f6a4d164a47a
Author:     Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  6 16:48:27 2014 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Mar 28 02:28:16 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=64cae407

Add --xattrs and --acls to the tar calls so we don't lose file properties while building the stages - should fix bug 531788.

Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo.org>

 catalyst/base/stagebase.py | 18 +++++++++---------
 catalyst/contents.py       |  6 +++---
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index c94f6b6..a33cae4 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -696,10 +696,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					self.settings["chroot_path"]+\
 						" (This may take some time) ...\n"
 				if "bz2" == self.settings["chroot_path"][-3:]:
-					unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+					unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 						self.settings["chroot_path"]
 				else:
-					unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+					unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 						self.settings["chroot_path"]
 				error_msg="Tarball extraction of "+\
 					self.settings["source_path"]+" to "+\
@@ -711,10 +711,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				self.settings["chroot_path"]+\
 				" (This may take some time) ...\n"
 			if "bz2" == self.settings["chroot_path"][-3:]:
-				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+				unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 					self.settings["chroot_path"]
 			else:
-				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+				unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 					self.settings["chroot_path"]
 			error_msg="Tarball extraction of "+self.settings["source_path"]+\
 				" to "+self.settings["chroot_path"]+" failed."
@@ -806,9 +806,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					"catalyst-hash")
 			destdir=self.settings["snapshot_cache_path"]
 			if "bz2" == self.settings["chroot_path"][-3:]:
-				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
+				unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
 			else:
-				unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+destdir
+				unpack_cmd="tar --xattrs --acls xpf "+self.settings["snapshot_path"]+" -C "+destdir
 			unpack_errmsg="Error unpacking snapshot"
 			cleanup_msg="Cleaning up invalid snapshot cache at \n\t"+\
 				self.settings["snapshot_cache_path"]+\
@@ -825,10 +825,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			cleanup_msg=\
 				"Cleaning up existing portage tree (This can take a long time)..."
 			if "bz2" == self.settings["chroot_path"][-3:]:
-				unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
+				unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
 					self.settings["chroot_path"]+"/usr"
 			else:
-				unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+\
+				unpack_cmd="tar --xattrs --acls xpf "+self.settings["snapshot_path"]+" -C "+\
 					self.settings["chroot_path"]+"/usr"
 			unpack_errmsg="Error unpacking snapshot"
 
@@ -1248,7 +1248,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 			print "Creating stage tarball..."
 
-			cmd("tar -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\
+			cmd("tar --xattrs --acls -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\
 				self.settings["stage_path"]+" .",\
 				"Couldn't create stage tarball",env=self.env)
 

diff --git a/catalyst/contents.py b/catalyst/contents.py
index 9611890..a06b2db 100644
--- a/catalyst/contents.py
+++ b/catalyst/contents.py
@@ -11,9 +11,9 @@ CONTENTS_DEFINITIONS = {
 	# 'find' is disabled because it requires the source path, which is not
 	# always available
 	#"find"		:["calc_contents","find %(path)s"],
-	"tar_tv":["calc_contents","tar tvf %(file)s"],
-	"tar_tvz":["calc_contents","tar tvzf %(file)s"],
-	"tar_tvj":["calc_contents","tar -I lbzip2 -tvf %(file)s"],
+	"tar_tv":["calc_contents","tar --xattrs tvf %(file)s"],
+	"tar_tvz":["calc_contents","tar --xattrs tvzf %(file)s"],
+	"tar_tvj":["calc_contents","tar --xattrs -I lbzip2 -tvf %(file)s"],
 	"isoinfo_l":["calc_contents","isoinfo -l -i %(file)s"],
 	# isoinfo_f should be a last resort only
 	"isoinfo_f":["calc_contents","isoinfo -f -i %(file)s"],


             reply	other threads:[~2015-05-24  0:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21 23:53 Brian Dolbec [this message]
2015-05-24  0:08 ` [gentoo-commits] proj/catalyst:master commit in: catalyst/, catalyst/base/ Brian Dolbec
  -- strict thread matches above, loose matches on Subject: below --
2015-01-01  5:59 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2014-09-11  3:08 Brian Dolbec
2014-09-11  3:08 Brian Dolbec
2014-09-02 23:10 Brian Dolbec
2014-09-02 23:10 Brian Dolbec
2014-09-02  7:12 Brian Dolbec
2014-09-02  7:12 Brian Dolbec
2014-09-02  5:54 Brian Dolbec
2014-09-02  5:54 Brian Dolbec
2014-09-02  2:43 Brian Dolbec
2014-09-02  2:43 Brian Dolbec
2014-06-15 14:56 Brian Dolbec
2014-06-15 14:56 Brian Dolbec
2014-06-14  5:58 Brian Dolbec
2014-06-14  5:58 Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427509696.64cae407aa8e334a2b925fd5aab1f6a4d164a47a.dolsen@gentoo \
    --to=dolsen@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox