diff options
author | Yuta SATOH <nigoro.dev@gmail.com> | 2017-12-10 07:29:07 +0900 |
---|---|---|
committer | Yuta SATOH <nigoro.dev@gmail.com> | 2017-12-10 07:29:07 +0900 |
commit | 577e2305cbb5ee32eb808b3728dd84b291f02db2 (patch) | |
tree | 1977128f91d9ae46f4715d68613be566415717e9 /dev-util/catalyst/files/catalyst-2.0.18-fbsd-add-tmpfs-support.patch | |
parent | dev-util/catalyst: import from the main tree. (diff) | |
download | gentoo-bsd-577e2305cbb5ee32eb808b3728dd84b291f02db2.tar.gz gentoo-bsd-577e2305cbb5ee32eb808b3728dd84b291f02db2.tar.bz2 gentoo-bsd-577e2305cbb5ee32eb808b3728dd84b291f02db2.zip |
dev-util/catalyst: add the patches for Gentoo/FreeBSD.
Diffstat (limited to 'dev-util/catalyst/files/catalyst-2.0.18-fbsd-add-tmpfs-support.patch')
-rw-r--r-- | dev-util/catalyst/files/catalyst-2.0.18-fbsd-add-tmpfs-support.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/dev-util/catalyst/files/catalyst-2.0.18-fbsd-add-tmpfs-support.patch b/dev-util/catalyst/files/catalyst-2.0.18-fbsd-add-tmpfs-support.patch new file mode 100644 index 0000000..dee3183 --- /dev/null +++ b/dev-util/catalyst/files/catalyst-2.0.18-fbsd-add-tmpfs-support.patch @@ -0,0 +1,48 @@ +https://bugs.gentoo.org/show_bug.cgi?id=363577 + +diff --git a/catalyst-2.0.18/modules/generic_stage_target.py b/catalyst-2.0.18/modules/generic_stage_target.py +index cc24c63..75101e7 100644 +--- a/catalyst-2.0.18/modules/generic_stage_target.py ++++ b/catalyst-2.0.18/modules/generic_stage_target.py +@@ -911,25 +911,26 @@ class generic_stage_target(generic_target): + src=self.mountmap[x] + if "SNAPCACHE" in self.settings and x == "/usr/portage": + self.snapshot_lock_object.read_lock() +- if os.uname()[0] == "FreeBSD": +- if src == "/dev": +- retval=os.system("mount -t devfs none "+\ +- self.settings["chroot_path"]+x) +- else: +- retval=os.system("mount_nullfs "+src+" "+\ ++ if src == "tmpfs": ++ if "var_tmpfs_portage" in self.settings: ++ retval=os.system("mount -t tmpfs -o size="+\ ++ self.settings["var_tmpfs_portage"]+"G "+src+" "+\ + self.settings["chroot_path"]+x) + else: +- if src == "tmpfs": +- if "var_tmpfs_portage" in self.settings: +- retval=os.system("mount -t tmpfs -o size="+\ +- self.settings["var_tmpfs_portage"]+"G "+src+" "+\ ++ if os.uname()[0] == "FreeBSD": ++ if src == "/dev": ++ retval=os.system("mount -t devfs none "+\ ++ self.settings["chroot_path"]+x) ++ else: ++ retval=os.system("mount_nullfs "+src+" "+\ + self.settings["chroot_path"]+x) +- elif src == "shmfs": +- retval=os.system("mount -t tmpfs -o noexec,nosuid,nodev shm "+\ +- self.settings["chroot_path"]+x) + else: +- retval=os.system("mount --bind "+src+" "+\ +- self.settings["chroot_path"]+x) ++ if src == "shmfs": ++ retval=os.system("mount -t tmpfs -o noexec,nosuid,nodev shm "+\ ++ self.settings["chroot_path"]+x) ++ else: ++ retval=os.system("mount --bind "+src+" "+\ ++ self.settings["chroot_path"]+x) + if retval!=0: + self.unbind() + raise CatalystError,"Couldn't bind mount "+src |