summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuta SATOH <nigoro.dev@gmail.com>2016-11-01 01:16:43 +0900
committerYuta SATOH <nigoro.dev@gmail.com>2016-11-01 01:16:43 +0900
commit5bedc2513a1f3bdc91e0e0793f451f55fca8d6cd (patch)
tree14a93c98f2f7f9b018afe9b82a28b4c9aff4cbfd
parentdev-util/catalyst-9999: import from latest tree. (diff)
downloadgentoo-bsd-5bedc2513a1f3bdc91e0e0793f451f55fca8d6cd.tar.gz
gentoo-bsd-5bedc2513a1f3bdc91e0e0793f451f55fca8d6cd.tar.bz2
gentoo-bsd-5bedc2513a1f3bdc91e0e0793f451f55fca8d6cd.zip
dev-util/catalyst: added -9999 patches.
-rw-r--r--dev-util/catalyst/Manifest3
-rw-r--r--dev-util/catalyst/catalyst-9999.ebuild10
-rw-r--r--dev-util/catalyst/files/catalyst-9999-sed.patch302
-rw-r--r--dev-util/catalyst/files/catalyst-9999-tmpfs.patch40
4 files changed, 353 insertions, 2 deletions
diff --git a/dev-util/catalyst/Manifest b/dev-util/catalyst/Manifest
index b9a8134..5a8318f 100644
--- a/dev-util/catalyst/Manifest
+++ b/dev-util/catalyst/Manifest
@@ -1,9 +1,12 @@
AUX catalyst-2.0.12.1-fbsd.patch 9713 SHA256 c66f856b7f3b0b9988984cf7eac1ab332d6103ac4bbcc855dbfdb0f4de8e6692 SHA512 335b29e7bda61c1875a66694031924a3f04851b056651b6ee8f3572209bf216d5f63520513223ca996f3b9404eeefacf7cfe40d0feddbebd5c3782bf8db36d4d WHIRLPOOL b63adab3d5ead0950a06d9a6490cfbef9d07ca420e45eaee99b9bef87f3b96d93cdaada2212faa368c1473360f917db094f8319f34bdbc1dd673390fb55cc9bf
AUX catalyst-2.0.14-fbsd.patch 10559 SHA256 c4f53aa4a29eceb01a19b76b08b898efab1244b045b7657430c81ac796ebd8f3 SHA512 344193243bea083c8af3c641f69b70362635af7eaec9887cb0a5aa92957f951b53bbc8ea68f62e66395a2efa63b3b69bb2da7aeac489f88df70abf117a6108b7 WHIRLPOOL 3c54e14b0a05e272403ff738c2a5ba25eaa5c034148f35317809c5ccb758f245490ccead2d6554b36ef3f4e6a592faa2988974f901f01096eefe1466de058272
AUX catalyst-2.0.15-fbsd-extra.patch 5180 SHA256 3f9cfe533be0050e936d47f2d4392f7ca5110cecb4a5dcd68e7cb79c59b25efb SHA512 dc930e063cf3870048a395577ba5c7d8fce96a150345af7766c4156109ec9539455e05b59a7c5873dfc596ab240e9d7dde55dc954410054fd85eaf289def7a1c WHIRLPOOL 78be8967fdce9b2c247f720d3389a41ff056d9ce3d270f2951dbd2318e8c93519c91ea4b6c889aced17775ea187180899f7a8a13450334c1b7df76611f944f9f
+AUX catalyst-9999-sed.patch 12970 SHA256 279d0ba5b32bc7e921e9a6038a85981da2229773edc1b7519e144e05f34614c2 SHA512 f90d9e64079c88380508c42c5f408a106d7cc6fe07732d25722f92c94ddea84c9a592c61e403585b29e16612c2a8b59f1245e3259e7d7587aeb11881c6e84932 WHIRLPOOL 6e4db5701884eb976b2b893dbc3ec73297096ef30319ff7a2dbec43861403ad2444dc0af40fe5b03143f5694ccd7806b6e057a6ab7cc58d59c19aa245ae86eb1
+AUX catalyst-9999-tmpfs.patch 1531 SHA256 23cdf7e169129343d7a55e62870a70f971b8746c721cf6acf8b19027d8f9cf6e SHA512 1ff41b0c994336ff73e69c54258f6d0aa75b235eeeefbfe67ebc6c20322b9c27bf7554e6236b0f7376a06e115abdb80e6947b32afe94ff73755290f80b85a68d WHIRLPOOL 8715a0fb31c323ec76e30be6e4dd9fd864d5acdf61c3633e9a194c4355c250d6da6570d99de68bc487e7419eac396ce2f722d44aa639662f5032f3ca59b1c6cd
DIST catalyst-2.0.12.2.tar.bz2 907893 SHA256 411d531b6de8c8c1bc9fa9502af3a4882e94e9db8b911bb48e4a0fcfc1efe7e8 SHA512 12349f6249363a94a72a71d05b2fe6ee13593b5ea67e1cb9a054c5ece896ff68f89d1af6341b98238ba6a6510e2737f81dcc2606649c10681235315663ab04ae WHIRLPOOL 1769a78f615c8e0eec2167dd9d6ab873e24801ecb5e4634037898933c6f5a1dbb189d967a628be6f8811f6769eadc91c5003ddbb6bd58eb05efbbd5110f740c7
DIST catalyst-2.0.15.tar.bz2 873335 SHA256 80fc39e6f6b7c32fb84f51333d8bf62a56a1ee068eb83cf2b03cb21c1f163e51 SHA512 9e61ba61eaa806424041f7edd1680b55dfd69bdea5b292aff305b4b3ef03349d82a47d8ab876baf7bf888e03810d79c6a00d74dc748082a1ed180ec1ed7043bd WHIRLPOOL 03c0f1137f59c57d106df4210104000c498a4c7ff2ae5bcc6e6c7a23d3d0c4c35ed125c036a0468859706da82af799641c1abe1b18c716c230c6ab657b4b765c
DIST catalyst-2.0.17.tar.bz2 861341 SHA256 5f4142598d921e5174ff06f9571856760a324e79db5f3b63caf0d1a16adc813c SHA512 9d7b9ad383dcc5d4ba058596c0b607eb9601b28025d9300f63e68d78cbd5bca8fa3f3e03a81dc6b233021e773ba4301df0bf5cec51ca4368eb3577a68d33a92c WHIRLPOOL e97fc120141cc4f9f5c297652d8b43313780f615429c0eb3d9b85cba40aeca01dcbc6efb0f8d388cc5e7debabb2563cfc9b5a5aa00e3d00d306aed0f799fc642
EBUILD catalyst-2.0.12.2.ebuild 3660 SHA256 4b0714dbb8eb96a9588f6b95e5e9021ddb62144c1a2e47f717111d70a84593a2 SHA512 f5ca61ec95864928d27e93ac72c2b441fdc04d30a27ebb3cedff6ec327147cee51a213b06d5f8e82bfda50ebc9e2eff51d77f43d3b699018459a4094b691ff4f WHIRLPOOL 1a558bd6eba2f278e4f6fcc4c846d884cf3fe79961204e6cf04bdb41889c96dd5f0af447eb14a6e8d17eac0622d8874cc6be20ff97e59d9632114495c77c2019
EBUILD catalyst-2.0.15.ebuild 3166 SHA256 90063f74c89fa79969cfc35c695cadd20aadce8c922dd9d9444d8243b08f974e SHA512 1e0a83a4c65679c0f2c11b3ccbb96695a7f551f97c875bb0d81453db1f6803873a1ef8838eee884a9b34bb69dd97bbdb80344deac103301882d9e95dd61e8b55 WHIRLPOOL 6239a89daa41d5bc983cf020eb2fd6486c3e990ebc5cccd27260ce54ade5fb9a1e20c256d8a6861c728fa9286f54d0f6b7fa7e63949222147f178bcbd2e0a3b7
EBUILD catalyst-2.0.17.ebuild 3162 SHA256 1f9aacf9e56f5184fa791583ea7c9d332b7ab4a1504bde50ae77f7f879a17a2c SHA512 31ab393441dd34eeb030703e75c91c4b01ecb32354728e0bedff40ec1c2a6f70ba4868eeeb1e63ff4f68c500d62abea0d2e2d17743b89c37c000d6cb18b8aa7c WHIRLPOOL b424423dfaaf07b8df3317e93d0b93eac341d0b82fe201f9ed71ef8c7dda365434a5796cf9abbe5a2c9ef21c45702649220524675e8113e6ef76d7e05000bd62
+EBUILD catalyst-9999.ebuild 1758 SHA256 f5f551262785dfb504bc8f1b8fd37ed4db4c2e7b416a97c0bd3821ef7f07dc95 SHA512 f5a56f1d6f2ca9a91e398a20400c6fe40619a4aa32b8db17254203a849e9ef745efd1318ea15c069c4b893d7931205c52ec148ee70dca54f5261e16166ad9e1c WHIRLPOOL 58cc2bd7c78fd8cd11dca0ce64b125985972fe6e432802e7ed43be7fb7a6aa8e99ff521a747742cbc719ea6cfd73445a1475ae1a5dd152156f952706ed9f9afc
diff --git a/dev-util/catalyst/catalyst-9999.ebuild b/dev-util/catalyst/catalyst-9999.ebuild
index adc1244..e19b49c 100644
--- a/dev-util/catalyst/catalyst-9999.ebuild
+++ b/dev-util/catalyst/catalyst-9999.ebuild
@@ -36,18 +36,24 @@ RDEPEND="
=dev-python/pydecomp-9999[${PYTHON_USEDEP}]
app-arch/lbzip2
app-crypt/shash
- app-arch/tar[xattr]
virtual/cdrtools
amd64? ( >=sys-boot/syslinux-3.72 )
ia64? ( sys-fs/dosfstools )
x86? ( >=sys-boot/syslinux-3.72 )
ccache? ( dev-util/ccache )
- kernel_linux? ( app-misc/zisofs-tools >=sys-fs/squashfs-tools-2.1 )
+ kernel_linux? ( app-arch/tar[xattr] app-misc/zisofs-tools >=sys-fs/squashfs-tools-2.1 )
"
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-9999-sed.patch
+ epatch "${FILESDIR}"/${PN}-9999-tmpfs.patch
+}
+
python_prepare_all() {
echo VERSION="${PV}" "${PYTHON}" setup.py set_version
VERSION="${PV}" "${PYTHON}" setup.py set_version
+
+ distutils-r1_python_prepare_all
}
python_compile_all() {
diff --git a/dev-util/catalyst/files/catalyst-9999-sed.patch b/dev-util/catalyst/files/catalyst-9999-sed.patch
new file mode 100644
index 0000000..d7ef1b3
--- /dev/null
+++ b/dev-util/catalyst/files/catalyst-9999-sed.patch
@@ -0,0 +1,302 @@
+diff --git a/catalyst-3.0_rc1/catalyst/defaults.py b/catalyst-3.0_rc1/catalyst/defaults.py
+index a0e3ea8..67ad8f7 100644
+--- a/catalyst-3.0_rc1/catalyst/defaults.py
++++ b/catalyst-3.0_rc1/catalyst/defaults.py
+@@ -39,6 +39,7 @@ confdefaults={
+ "PythonDir": "./catalyst",
+ "repo_basedir": "/usr",
+ "repo_name": "portage",
++ "sed": "sed",
+ "sharedir": "/usr/share/catalyst",
+ "shdir": "/usr/share/catalyst/targets/",
+ "snapshot_cache": "/var/tmp/catalyst/snapshot_cache",
+diff --git a/catalyst-3.0_rc1/catalyst/main.py b/catalyst-3.0_rc1/catalyst/main.py
+index 6608b86..4a0e515 100644
+--- a/catalyst-3.0_rc1/catalyst/main.py
++++ b/catalyst-3.0_rc1/catalyst/main.py
+@@ -343,6 +343,12 @@ def _main(parser, opts):
+ conf_values['compress_definitions'] = COMPRESS_DEFINITIONS
+ # TODO add capability to config/spec new definitions
+
++ # detect GNU sed
++ for sed in ('/usr/bin/gsed', '/bin/sed', '/usr/bin/sed'):
++ if os.path.exists(sed):
++ conf_values["sed"] = sed
++ break
++
+ # Start checking that digests are valid now that hash_map is initialized
+ if "digests" in conf_values:
+ digests = set(conf_values['digests'].split())
+diff --git a/catalyst-3.0_rc1/targets/stage1/stage1-chroot.sh b/catalyst-3.0_rc1/targets/stage1/stage1-chroot.sh
+index fbda84b..28bd743 100755
+--- a/catalyst-3.0_rc1/targets/stage1/stage1-chroot.sh
++++ b/catalyst-3.0_rc1/targets/stage1/stage1-chroot.sh
+@@ -49,7 +49,7 @@ make_destpath /tmp/stage1root
+ # First, we drop in a known-good baselayout
+ [ -e ${clst_make_conf} ] && echo "USE=\"${USE} -build\"" >> ${clst_make_conf}
+ run_merge "--oneshot --nodeps sys-apps/baselayout"
+-sed -i "/USE=\"${USE} -build\"/d" ${clst_make_conf}
++${clst_sed} -i "/USE=\"${USE} -build\"/d" ${clst_make_conf}
+
+ # Now, we install our packages
+ if [ -e ${clst_make_conf} ]; then
+@@ -62,10 +62,10 @@ if [ -e ${clst_make_conf} ]; then
+ fi
+
+ run_merge "--oneshot ${clst_buildpkgs}"
+-sed -i "/USE=\"-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"/d" \
++${clst_sed} -i "/USE=\"-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"/d" \
+ ${clst_make_conf}
+ for useexpand in ${clst_HOSTUSEEXPAND}; do
+ x="clst_${useexpand}"
+- sed -i "/${useexpand}=\"${!x}\"/d" \
++ ${clst_sed} -i "/${useexpand}=\"${!x}\"/d" \
+ ${clst_make_conf}
+ done
+diff --git a/catalyst-3.0_rc1/targets/stage2/stage2-chroot.sh b/catalyst-3.0_rc1/targets/stage2/stage2-chroot.sh
+index 38dfea3..30dc47a 100755
+--- a/catalyst-3.0_rc1/targets/stage2/stage2-chroot.sh
++++ b/catalyst-3.0_rc1/targets/stage2/stage2-chroot.sh
+@@ -21,5 +21,5 @@ fi
+ ${clst_repo_basedir}/${clst_repo_name}/scripts/bootstrap.sh ${bootstrap_opts} || exit 1
+
+ # Clean-up USE again
+-sed -i "/USE=\"\${USE} bindist\"/d" "${clst_make_conf}"
+-sed -i "/USE=\"bindist\"/d" "${clst_make_conf}"
++${clst_sed} -i "/USE=\"\${USE} bindist\"/d" "${clst_make_conf}"
++${clst_sed} -i "/USE=\"bindist\"/d" "${clst_make_conf}"
+diff --git a/catalyst-3.0_rc1/targets/support/bootloader-setup.sh b/catalyst-3.0_rc1/targets/support/bootloader-setup.sh
+index d9e2620..ffe7be2 100755
+--- a/catalyst-3.0_rc1/targets/support/bootloader-setup.sh
++++ b/catalyst-3.0_rc1/targets/support/bootloader-setup.sh
+@@ -79,7 +79,7 @@ case ${clst_hostarch} in
+ echo "message=/boot/boot.msg" >> ${icfg}
+
+ # Here is where I fix up the boot.msg file.
+- sed -e 's/ARCH/PowerPC/' \
++ ${clst_sed} -e 's/ARCH/PowerPC/' \
+ -e 's/HARDWARE/Apple and IBM hardware/' \
+ -i $kmsg
+
+diff --git a/catalyst-3.0_rc1/targets/support/chroot-functions.sh b/catalyst-3.0_rc1/targets/support/chroot-functions.sh
+index 456ae4c..004e7c3 100755
+--- a/catalyst-3.0_rc1/targets/support/chroot-functions.sh
++++ b/catalyst-3.0_rc1/targets/support/chroot-functions.sh
+@@ -87,7 +87,7 @@ setup_myfeatures(){
+ else
+ clst_root_path=/ run_merge --oneshot --noreplace sys-devel/distcc || exit 1
+ fi
+- sed -i '/USE="${USE} -avahi -gtk -gnome"/d' ${clst_make_conf}
++ ${clst_sed} -i '/USE="${USE} -avahi -gtk -gnome"/d' ${clst_make_conf}
+ mkdir -p /etc/distcc
+ echo "${clst_distcc_hosts}" > /etc/distcc/hosts
+
+@@ -186,7 +186,7 @@ setup_pkgmgr(){
+ echo "Adding USE=\"\${USE} $1\" to make.conf for portage build"
+ [ -e "${clst_make_conf}" ] && echo "USE=\"\${USE} $1\"" >> "${clst_make_conf}"
+ run_merge --oneshot --update --newuse sys-apps/portage
+- sed -i "/USE=\"\${USE} $1\"/d" "${clst_make_conf}"
++ ${clst_sed} -i "/USE=\"\${USE} $1\"/d" "${clst_make_conf}"
+ else
+ run_merge --oneshot --update --newuse sys-apps/portage
+ fi
+@@ -241,8 +241,8 @@ cleanup_stages() {
+
+ # Remove bindist from use
+ # this is handled independantly in stage2, changes here should be mirrored there
+- sed -i "/USE=\"\${USE} bindist\"/d" "${clst_make_conf}"
+- sed -i "/USE=\"bindist\"/d" "${clst_make_conf}"
++ ${clst_sed} -i "/USE=\"\${USE} bindist\"/d" "${clst_make_conf}"
++ ${clst_sed} -i "/USE=\"bindist\"/d" "${clst_make_conf}"
+
+ [ "${clst_target}" != "tinderbox" ] && rm -f /var/log/emerge.log /var/log/portage/elog/*
+ }
+@@ -260,7 +260,7 @@ die() {
+
+ make_destpath() {
+ # ROOT is / by default, so remove any ROOT= settings from make.conf
+- sed -i '/ROOT=/d' ${clst_make_conf}
++ ${clst_sed} -i '/ROOT=/d' ${clst_make_conf}
+ export ROOT=/
+ if [ "${1}" != "/" -a -n "${1}" ]
+ then
+diff --git a/catalyst-3.0_rc1/targets/support/kmerge.sh b/catalyst-3.0_rc1/targets/support/kmerge.sh
+index 3d4afea..68cd3f2 100755
+--- a/catalyst-3.0_rc1/targets/support/kmerge.sh
++++ b/catalyst-3.0_rc1/targets/support/kmerge.sh
+@@ -245,7 +245,7 @@ then
+ if [ ! "${clst_kextraversion}" = "" ]
+ then
+ echo "Setting extraversion to ${clst_kextraversion}"
+- sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
++ ${clst_sed} -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
+ echo ${clst_kextraversion} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
+ else
+ touch /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
+@@ -262,7 +262,7 @@ $(portageq contents / $(portageq best_visible / "${clst_ksource}" 2>/dev/null) 2
+ if [ ! "${clst_kextraversion}" = "" ]
+ then
+ echo "Setting extraversion to ${clst_kextraversion}"
+- sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
++ ${clst_sed} -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
+ fi
+ fi
+
+@@ -275,12 +275,12 @@ make_destpath
+
+
+ build_kernel
+-sed -i "/USE=\"\${USE} ${clst_kernel_use} \"/d" ${clst_make_conf}
++${clst_sed} -i "/USE=\"\${USE} ${clst_kernel_use} \"/d" ${clst_make_conf}
+ # grep out the kernel version so that we can do our modules magic
+ VER=`grep ^VERSION\ \= /usr/src/linux/Makefile | awk '{ print $3 };'`
+ PAT=`grep ^PATCHLEVEL\ \= /usr/src/linux/Makefile | awk '{ print $3 };'`
+ SUB=`grep ^SUBLEVEL\ \= /usr/src/linux/Makefile | awk '{ print $3 };'`
+-EXV=`grep ^EXTRAVERSION\ \= /usr/src/linux/Makefile | sed -e "s/EXTRAVERSION =//" -e "s/ //g"`
++EXV=`grep ^EXTRAVERSION\ \= /usr/src/linux/Makefile | ${clst_sed} -e "s/EXTRAVERSION =//" -e "s/ //g"`
+ clst_fudgeuname=${VER}.${PAT}.${SUB}${EXV}
+
+ unset USE
+diff --git a/catalyst-3.0_rc1/targets/support/livecdfs-update.sh b/catalyst-3.0_rc1/targets/support/livecdfs-update.sh
+index 31cdf04..2c551b4 100755
+--- a/catalyst-3.0_rc1/targets/support/livecdfs-update.sh
++++ b/catalyst-3.0_rc1/targets/support/livecdfs-update.sh
+@@ -7,7 +7,7 @@ source /tmp/chroot-functions.sh
+ # Allow root logins to our CD by default
+ if [ -e /etc/ssh/sshd_config ]
+ then
+- sed -i 's:^#PermitRootLogin\ yes:PermitRootLogin\ yes:' \
++ ${clst_sed} -i 's:^#PermitRootLogin\ yes:PermitRootLogin\ yes:' \
+ /etc/ssh/sshd_config
+ fi
+
+@@ -73,7 +73,7 @@ fi
+ # Setup sudoers
+ if [ -f /etc/sudoers ]
+ then
+- sed -i '/NOPASSWD: ALL/ s/^# //' /etc/sudoers
++ ${clst_sed} -i '/NOPASSWD: ALL/ s/^# //' /etc/sudoers
+ fi
+
+ # Setup links for ethernet devices
+@@ -113,7 +113,7 @@ echo "####################################################" >> ${clst_make_conf}
+ cat ${clst_make_conf}.old >> ${clst_make_conf}
+
+ # devfs tweaks
+-[ -e /etc/devfsd.conf ] && sed -i '/dev-state/ s:^:#:' /etc/devfsd.conf
++[ -e /etc/devfsd.conf ] && ${clst_sed} -i '/dev-state/ s:^:#:' /etc/devfsd.conf
+
+ # Add some helpful aliases
+ echo "alias cp='cp -i'" >> /etc/profile
+@@ -153,10 +153,10 @@ fi
+ # Setup configured display manager
+ if [ -n "${clst_livecd_xdm}" ]
+ then
+- sed -i \
++ ${clst_sed} -i \
+ -e "s:^#\\?DISPLAYMANAGER=.\+$:DISPLAYMANAGER=\"${clst_livecd_xdm}\":" \
+ /etc/rc.conf
+- sed -i \
++ ${clst_sed} -i \
+ -e "s:^#\\?DISPLAYMANAGER=.\+$:DISPLAYMANAGER=\"${clst_livecd_xdm}\":" \
+ /etc/conf.d/xdm
+ fi
+@@ -175,21 +175,21 @@ case ${clst_livecd_type} in
+ gentoo-release-universal)
+ cat /etc/generic.motd.txt /etc/universal.motd.txt \
+ /etc/minimal.motd.txt > /etc/motd
+- sed -i 's:^##GREETING:Welcome to the Gentoo Linux Universal Installation CD!:' /etc/motd
++ ${clst_sed} -i 's:^##GREETING:Welcome to the Gentoo Linux Universal Installation CD!:' /etc/motd
+ ;;
+ gentoo-release-minimal)
+ cat /etc/generic.motd.txt /etc/minimal.motd.txt > /etc/motd
+- sed -i 's:^##GREETING:Welcome to the Gentoo Linux Minimal Installation CD!:' /etc/motd
++ ${clst_sed} -i 's:^##GREETING:Welcome to the Gentoo Linux Minimal Installation CD!:' /etc/motd
+ ;;
+ gentoo-release-live*)
+ cat /etc/generic.motd.txt \
+ /etc/minimal.motd.txt /etc/livecd.motd.txt > /etc/motd
+- sed -i -e 's:^##GREETING:Welcome to the Gentoo Linux LiveCD!:' \
++ ${clst_sed} -i -e 's:^##GREETING:Welcome to the Gentoo Linux LiveCD!:' \
+ -e "s:##DISPLAY_MANAGER:${clst_livecd_xdm}:" /etc/motd
+ ;;
+ gentoo-gamecd)
+ cat /etc/generic.motd.txt /etc/gamecd.motd.txt > /etc/motd
+- sed -i 's:^##GREETING:Welcome to the Gentoo Linux ##GAME_NAME GameCD!:' /etc/motd
++ ${clst_sed} -i 's:^##GREETING:Welcome to the Gentoo Linux ##GAME_NAME GameCD!:' /etc/motd
+ ;;
+ esac
+
+@@ -200,7 +200,7 @@ if [ -n "${clst_livecd_splash_theme}" ]
+ then
+ if [ -d /etc/splash/${clst_livecd_splash_theme} ]
+ then
+- sed -i \
++ ${clst_sed} -i \
+ -e "s:# SPLASH_THEME=\"gentoo\":SPLASH_THEME=\"${clst_livecd_splash_theme}\":" \
+ -e "/^# SPLASH_TTYS=/ s/^#//" \
+ /etc/conf.d/splash
+@@ -229,7 +229,7 @@ case ${clst_livecd_type} in
+ rm /tmp/gamecd.conf
+
+ # Here we replace out game information into several files
+- sed -i -e "s:##GAME_NAME:${GAME_NAME}:" /etc/motd
++ ${clst_sed} -i -e "s:##GAME_NAME:${GAME_NAME}:" /etc/motd
+
+ # Here we setup our xinitrc
+ echo "exec ${GAME_EXECUTABLE}" > /etc/X11/xinit/xinitrc
+@@ -276,7 +276,7 @@ case ${clst_livecd_type} in
+ /etc/X11/gdm/custom.conf
+ else
+ cp -f /etc/X11/gdm/gdm.conf /etc/X11/gdm/gdm.conf.old
+- sed -i \
++ ${clst_sed} -i \
+ -e 's:TimedLoginEnable=false:TimedLoginEnable=true:' \
+ -e 's:TimedLoginDelay=30:TimedLoginDelay=10:' \
+ -e 's:AllowRemoteRoot=true:AllowRemoteRoot=false:' \
+@@ -286,7 +286,7 @@ case ${clst_livecd_type} in
+
+ if [ -n "${clst_livecd_users}" ] && [ -n "${first_user}" ]
+ then
+- sed -i \
++ ${clst_sed} -i \
+ -e "s:TimedLogin=:TimedLogin=${first_user}:" \
+ /etc/X11/gdm/gdm.conf
+ fi
+@@ -296,7 +296,7 @@ case ${clst_livecd_type} in
+ # This gives us our list of system packages for the installer
+ mkdir -p /usr/livecd
+ ### XXX: Andrew says we don't need this anymore
+- USE="-* $(cat /var/db/pkg/sys-libs/glibc*/USE)" emerge -eqp @system | grep -e '^\[ebuild' | sed -e 's:^\[ebuild .\+\] ::' -e 's: .\+$::' > /usr/livecd/systempkgs.txt
++ USE="-* $(cat /var/db/pkg/sys-libs/glibc*/USE)" emerge -eqp @system | grep -e '^\[ebuild' | ${clst_sed} -e 's:^\[ebuild .\+\] ::' -e 's: .\+$::' > /usr/livecd/systempkgs.txt
+
+ # This is my hack to reduce tmpfs usage
+ cp -r ${clst_repo_basedir}/${clst_repo_name}/profiles /usr/livecd
+@@ -331,10 +331,10 @@ case ${clst_livecd_type} in
+ /home/${username}/Desktop
+ cp -f /usr/share/applications/installer-dialog.desktop \
+ /home/${username}/Desktop
+- sed -i -e \
++ ${clst_sed} -i -e \
+ 's:Exec=installer-dialog:Exec=sudo installer-dialog:' \
+ /home/${username}/Desktop/installer-dialog.desktop
+- sed -i -e 's:Exec=installer-gtk:Exec=installer:' \
++ ${clst_sed} -i -e 's:Exec=installer-gtk:Exec=installer:' \
+ /home/${username}/Desktop/installer-gtk.desktop
+ fi
+ chown -R ${username}:100 /home/${username}
+@@ -369,12 +369,12 @@ esac
+ # We want the first user to be used when auto-starting X
+ if [ -e /etc/startx ]
+ then
+- sed -i "s:##STARTX:echo startx | su - '${first_user}':" /root/.bashrc
++ ${clst_sed} -i "s:##STARTX:echo startx | su - '${first_user}':" /root/.bashrc
+ fi
+
+ if [ -e /lib/rcscripts/addons/udev-start.sh ]
+ then
+- sed -i "s:\t\[\[ -x /sbin/evms_activate:\t\[\[ -x \${CDBOOT} \]\] \&\& \[\[ -x /sbin/evms_activate:" /lib/rcscripts/addons/udev-start.sh
++ ${clst_sed} -i "s:\t\[\[ -x /sbin/evms_activate:\t\[\[ -x \${CDBOOT} \]\] \&\& \[\[ -x /sbin/evms_activate:" /lib/rcscripts/addons/udev-start.sh
+ fi
+
+ env-update
diff --git a/dev-util/catalyst/files/catalyst-9999-tmpfs.patch b/dev-util/catalyst/files/catalyst-9999-tmpfs.patch
new file mode 100644
index 0000000..9a41f49
--- /dev/null
+++ b/dev-util/catalyst/files/catalyst-9999-tmpfs.patch
@@ -0,0 +1,40 @@
+diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
+index 68ccb79..966d872 100644
+--- a/catalyst/base/stagebase.py
++++ b/catalyst/base/stagebase.py
+@@ -935,21 +935,22 @@ class StageBase(TargetBase, ClearBase, GenBase):
+ if "snapcache" in self.settings["options"] and x == "portdir":
+ self.snapcache_lock.read_lock()
+ _cmd = None
+- if os.uname()[0] == "FreeBSD":
+- if src == "/dev":
+- _cmd = ['mount', '-t', 'devfs', 'none', target]
+- else:
+- _cmd = ['mount_nullfs', src, target]
++ if src == "tmpfs":
++ if "var_tmpfs_portage" in self.settings:
++ _cmd = ['mount', '-t', 'tmpfs',
++ '-o', 'size=' + self.settings['var_tmpfs_portage'] + 'G',
++ src, target]
+ else:
+- if src == "tmpfs":
+- if "var_tmpfs_portage" in self.settings:
+- _cmd = ['mount', '-t', 'tmpfs',
+- '-o', 'size=' + self.settings['var_tmpfs_portage'] + 'G',
+- src, target]
+- elif src == "shmfs":
+- _cmd = ['mount', '-t', 'tmpfs', '-o', 'noexec,nosuid,nodev', 'shm', target]
++ if os.uname()[0] == "FreeBSD":
++ if src == "/dev":
++ _cmd = ['mount', '-t', 'devfs', 'none', target]
++ else:
++ _cmd = ['mount_nullfs', src, target]
+ else:
+- _cmd = ['mount', '--bind', src, target]
++ if src == "shmfs":
++ _cmd = ['mount', '-t', 'tmpfs', '-o', 'noexec,nosuid,nodev', 'shm', target]
++ else:
++ _cmd = ['mount', '--bind', src, target]
+ if _cmd:
+ log.debug('bind(); _cmd = %s', _cmd)
+ cmd(_cmd, env=self.env, fail_func=self.unbind)