summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuta SATOH <nigoro.dev@gmail.com>2017-12-10 07:15:54 +0900
committerYuta SATOH <nigoro.dev@gmail.com>2017-12-10 07:15:54 +0900
commit751d0ad85386de84b94fd33acfe42db0e45362b3 (patch)
tree232438246b56465e2d987a8a1f1a9a71416204b0 /dev-util/catalyst/files
parentdev-util/catalyst: remove old. (diff)
downloadgentoo-bsd-751d0ad85386de84b94fd33acfe42db0e45362b3.tar.gz
gentoo-bsd-751d0ad85386de84b94fd33acfe42db0e45362b3.tar.bz2
gentoo-bsd-751d0ad85386de84b94fd33acfe42db0e45362b3.zip
dev-util/catalyst: import from the main tree.
Diffstat (limited to 'dev-util/catalyst/files')
-rw-r--r--dev-util/catalyst/files/catalyst-2.0.18-Do-notuntarwith--acls.patch95
-rw-r--r--dev-util/catalyst/files/catalyst-2.0.18-fix-quotes.patch38
-rw-r--r--dev-util/catalyst/files/catalyst-2.0.18-remove-machine-id.patch25
-rw-r--r--dev-util/catalyst/files/catalyst-2.0.18-stage1-export-ROOT.patch42
4 files changed, 200 insertions, 0 deletions
diff --git a/dev-util/catalyst/files/catalyst-2.0.18-Do-notuntarwith--acls.patch b/dev-util/catalyst/files/catalyst-2.0.18-Do-notuntarwith--acls.patch
new file mode 100644
index 0000000..f4cbcfb
--- /dev/null
+++ b/dev-util/catalyst/files/catalyst-2.0.18-Do-notuntarwith--acls.patch
@@ -0,0 +1,95 @@
+From 45286727a63d16d0688a88bf7cf68289efd26861 Mon Sep 17 00:00:00 2001
+From: "Anthony G. Basile" <blueness@gentoo.org>
+Date: Sun, 18 Jan 2015 22:21:16 -0500
+Subject: [PATCH] Do not untar with --acls, fixes bug #536762
+To: gentoo-catalyst@lists.gentoo.org
+
+---
+ modules/catalyst_support.py | 6 +++---
+ modules/generic_stage_target.py | 18 +++++++++---------
+ 2 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/modules/catalyst_support.py b/modules/catalyst_support.py
+index 0e9faac..702887d 100644
+--- a/modules/catalyst_support.py
++++ b/modules/catalyst_support.py
+@@ -108,9 +108,9 @@ contents_map={
+ # '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 --xattrs --acls tvf %(file)s"],
+- "tar-tvz":[calc_contents,"tar --xattrs --acls tvzf %(file)s"],
+- "tar-tvj":[calc_contents,"tar --xattrs --acls -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"],
+diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
+index c7db027..cc24c63 100644
+--- a/modules/generic_stage_target.py
++++ b/modules/generic_stage_target.py
+@@ -660,10 +660,10 @@ class generic_stage_target(generic_target):
+ self.settings["chroot_path"]+\
+ " (This may take some time) ...\n"
+ if "bz2" == self.settings["chroot_path"][-3:]:
+- unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
++ unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+ self.settings["chroot_path"]
+ else:
+- unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
++ unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+ self.settings["chroot_path"]
+ error_msg="Tarball extraction of "+\
+ self.settings["source_path"]+" to "+\
+@@ -675,10 +675,10 @@ class generic_stage_target(generic_target):
+ self.settings["chroot_path"]+\
+ " (This may take some time) ...\n"
+ if "bz2" == self.settings["chroot_path"][-3:]:
+- unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
++ unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+ self.settings["chroot_path"]
+ else:
+- unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
++ unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -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."
+@@ -777,9 +777,9 @@ class generic_stage_target(generic_target):
+ "catalyst-hash")
+ destdir=self.settings["snapshot_cache_path"]
+ if "bz2" == self.settings["chroot_path"][-3:]:
+- unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
++ unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
+ else:
+- unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -xpf "+self.settings["snapshot_path"]+" -C "+destdir
++ unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -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"]+\
+@@ -796,10 +796,10 @@ class generic_stage_target(generic_target):
+ cleanup_msg=\
+ "Cleaning up existing portage tree (This can take a long time)..."
+ if "bz2" == self.settings["chroot_path"][-3:]:
+- unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
++ unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
+ self.settings["chroot_path"]+"/usr"
+ else:
+- unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -xpf "+self.settings["snapshot_path"]+" -C "+\
++ unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -xpf "+self.settings["snapshot_path"]+" -C "+\
+ self.settings["chroot_path"]+"/usr"
+ unpack_errmsg="Error unpacking snapshot"
+
+@@ -1224,7 +1224,7 @@ class generic_stage_target(generic_target):
+
+ print "Creating stage tarball..."
+
+- cmd("tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\
++ cmd("tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\
+ self.settings["stage_path"]+" .",\
+ "Couldn't create stage tarball",env=self.env)
+
+--
+2.2.2
+
diff --git a/dev-util/catalyst/files/catalyst-2.0.18-fix-quotes.patch b/dev-util/catalyst/files/catalyst-2.0.18-fix-quotes.patch
new file mode 100644
index 0000000..ccaffbe
--- /dev/null
+++ b/dev-util/catalyst/files/catalyst-2.0.18-fix-quotes.patch
@@ -0,0 +1,38 @@
+From 1eabce3a9c15c5caf022e71c1959e8c8f4819fad Mon Sep 17 00:00:00 2001
+From: "Anthony G. Basile" <blueness@gentoo.org>
+Date: Thu, 3 Mar 2016 20:48:43 -0500
+Subject: [PATCH] targets/support/chroot-functions.sh: correct quotes to allow
+ expansion of $1
+
+This is a backport of commit b2473eff. The single quotes prevented the proper
+expansion of $1 in setup_pkgmgr(). Since this is usually called as
+`setup_pkgmgr "build"` during stage1 builds, it is surprising this was
+not caught earlier.
+---
+ targets/support/chroot-functions.sh | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
+index 3b7f77b..6c1a31c 100755
+--- a/targets/support/chroot-functions.sh
++++ b/targets/support/chroot-functions.sh
+@@ -172,12 +172,12 @@ setup_pkgmgr(){
+ # Use --update or portage might just waste time/cycles and reinstall the same version.
+ # Use --newuse to make sure it rebuilds with any changed use flags.
+ if [ -n "$1" ];then
+- echo "Adding USE='${USE} $1' to make.conf for portage build"
+- [ -e /etc/portage/make.conf ] && echo 'USE="${USE} $1"' >> /etc/portage/make.conf
++ echo "Adding USE=\"${USE} $1\" to make.conf for portage build"
++ [ -e /etc/portage/make.conf ] && echo "USE=\"\${USE} $1\"" >> /etc/portage/make.conf
+ run_merge --oneshot --update --newuse sys-apps/portage
+- sed -i '/USE="${USE} $1"/d' /etc/portage/make.conf
++ sed -i "/USE=\"\${USE} $1\"/d" /etc/portage/make.conf
+ else
+- echo "Updating portage with USE='${USE}'"
++ echo "Updating portage with USE=\"${USE}\""
+ run_merge --oneshot --update --newuse sys-apps/portage
+ fi
+ }
+--
+2.4.10
+
diff --git a/dev-util/catalyst/files/catalyst-2.0.18-remove-machine-id.patch b/dev-util/catalyst/files/catalyst-2.0.18-remove-machine-id.patch
new file mode 100644
index 0000000..1c641fd
--- /dev/null
+++ b/dev-util/catalyst/files/catalyst-2.0.18-remove-machine-id.patch
@@ -0,0 +1,25 @@
+From fbf94254a714c8d72840faee42cf348eb69b1a43 Mon Sep 17 00:00:00 2001
+From: "Anthony G. Basile" <blueness@gentoo.org>
+Date: Fri, 8 Apr 2016 17:58:15 -0400
+Subject: [PATCH] targets/support/chroot-functions.sh: remove machine-id for
+ systemd stages
+
+---
+ targets/support/chroot-functions.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
+index 6c1a31c..67874a0 100755
+--- a/targets/support/chroot-functions.sh
++++ b/targets/support/chroot-functions.sh
+@@ -223,6 +223,7 @@ cleanup_stages() {
+ stage1|stage2|stage3|system)
+ rm -f /var/lib/portage/world
+ touch /var/lib/portage/world
++ rm -f /etc/machine-id
+ ;;
+ *)
+ echo "Skipping removal of world file for ${clst_target}"
+--
+2.7.3
+
diff --git a/dev-util/catalyst/files/catalyst-2.0.18-stage1-export-ROOT.patch b/dev-util/catalyst/files/catalyst-2.0.18-stage1-export-ROOT.patch
new file mode 100644
index 0000000..67fc2c6
--- /dev/null
+++ b/dev-util/catalyst/files/catalyst-2.0.18-stage1-export-ROOT.patch
@@ -0,0 +1,42 @@
+From 5fd2d5edd3c4c1e99687beb9acc130bab162866b Mon Sep 17 00:00:00 2001
+From: "Anthony G. Basile" <blueness@gentoo.org>
+Date: Sat, 4 Jun 2016 12:43:44 -0400
+Subject: stage1-preclean-chroot.sh: export ROOT=/tmp/stage1root for
+ setup_gcc()
+
+setup_gcc() calls gcc-config to select a particular gcc profile. At stage1 this
+needs to be done in the /tmp/stage1root chroot. gcc-config looks for ROOT to
+choose the root directory in which to make the selection. If we don't export
+ROOT, then setup_gcc is ineffective.
+
+X-Gentoo-Bug: 584234
+X-Gentoo-Bug-Url: https://bugs.gentoo.org/show_bug.cgi?id=584234
+
+Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
+---
+ targets/stage1/stage1-preclean-chroot.sh | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/targets/stage1/stage1-preclean-chroot.sh b/targets/stage1/stage1-preclean-chroot.sh
+index a80fc92..dc67521 100755
+--- a/targets/stage1/stage1-preclean-chroot.sh
++++ b/targets/stage1/stage1-preclean-chroot.sh
+@@ -1,5 +1,6 @@
+ #!/bin/bash
+
++export ROOT=/tmp/stage1root
+ export RUN_DEFAULT_FUNCS="no"
+
+ source /tmp/chroot-functions.sh
+@@ -8,8 +9,6 @@ update_env_settings
+ show_debug
+
+ # Now, some finishing touches to initialize gcc-config....
+-unset ROOT
+-
+ setup_gcc
+ setup_binutils
+
+--
+cgit v0.12
+