summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Stelling <blubb@gentoo.org>2006-08-25 13:37:46 +0000
committerSimon Stelling <blubb@gentoo.org>2006-08-25 13:37:46 +0000
commit11183bb66d6bca9c825b196f9d607e41113daf01 (patch)
tree67bc6a37b321cdbff87da39a65262f2946a95574 /app-emulation
parentAdding a self-built 6.4.2 for hppa and keywording (diff)
downloadhistorical-11183bb66d6bca9c825b196f9d607e41113daf01.tar.gz
historical-11183bb66d6bca9c825b196f9d607e41113daf01.tar.bz2
historical-11183bb66d6bca9c825b196f9d607e41113daf01.zip
initial import by me
Package-Manager: portage-2.1-r2
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/x86-chroot/ChangeLog10
-rw-r--r--app-emulation/x86-chroot/Manifest24
-rw-r--r--app-emulation/x86-chroot/files/digest-x86-chroot-2006.03
-rw-r--r--app-emulation/x86-chroot/files/initd37
-rw-r--r--app-emulation/x86-chroot/files/x86-chroot3
-rw-r--r--app-emulation/x86-chroot/metadata.xml14
-rw-r--r--app-emulation/x86-chroot/x86-chroot-2006.0.ebuild73
7 files changed, 164 insertions, 0 deletions
diff --git a/app-emulation/x86-chroot/ChangeLog b/app-emulation/x86-chroot/ChangeLog
new file mode 100644
index 000000000000..8e432f45d50e
--- /dev/null
+++ b/app-emulation/x86-chroot/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for app-emulation/x86-chroot
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/x86-chroot/ChangeLog,v 1.1 2006/08/25 13:37:46 blubb Exp $
+
+*x86-chroot-2006.0 (25 Aug 2006)
+
+ 25 Aug 2006; <blubb@gentoo.org> +files/initd, +files/x86-chroot,
+ +metadata.xml, +x86-chroot-2006.0.ebuild:
+ initial import by me
+
diff --git a/app-emulation/x86-chroot/Manifest b/app-emulation/x86-chroot/Manifest
new file mode 100644
index 000000000000..7a4172eeacf9
--- /dev/null
+++ b/app-emulation/x86-chroot/Manifest
@@ -0,0 +1,24 @@
+AUX initd 1399 RMD160 a36fc2e4dc6ee3140ea7cae2a0c19e9a9ce19a51 SHA1 41a4bcea8ca0275fac49903c9065aa718ffa3723 SHA256 99ddccf65d6c54de8192fd759bef0ff4af18f3526726bfec785a93afa3069cd9
+MD5 56395e1fc87445e77d123a53ca7015e4 files/initd 1399
+RMD160 a36fc2e4dc6ee3140ea7cae2a0c19e9a9ce19a51 files/initd 1399
+SHA256 99ddccf65d6c54de8192fd759bef0ff4af18f3526726bfec785a93afa3069cd9 files/initd 1399
+AUX x86-chroot 86 RMD160 8329b497e36fb54b8394fd879fa40a3894ad179e SHA1 813acb2b6405fc91a83fd6e9ec7513081386abbc SHA256 982b8d7cdf99c922ec48622f8a2d3261fc98c005d6e47da59205be85a7b83c52
+MD5 cf707c29d74c15e9f57976c2a0071edf files/x86-chroot 86
+RMD160 8329b497e36fb54b8394fd879fa40a3894ad179e files/x86-chroot 86
+SHA256 982b8d7cdf99c922ec48622f8a2d3261fc98c005d6e47da59205be85a7b83c52 files/x86-chroot 86
+DIST stage3-i686-2006.0.tar.bz2 104949773 RMD160 6f0b95ed55a26d2421af9c6982fa7b05e272225e SHA1 dc3aeeba33dc661b81225cb4909fcc1787c69db1 SHA256 98f11e98e7aa13d8a8c88255587f79fe998f6623b39909c21d8a7764dca8abe6
+EBUILD x86-chroot-2006.0.ebuild 2433 RMD160 d5863a1ff204debb0c423fa7075d9066c34d41d5 SHA1 152306beea9495c74df262081bfadbc37ba1905f SHA256 e47855c972e5e116b0c23170d53556308f68f0d86915d248465897c85c8bd3e2
+MD5 5fff8aaef58fae9d2edf0ee9679543de x86-chroot-2006.0.ebuild 2433
+RMD160 d5863a1ff204debb0c423fa7075d9066c34d41d5 x86-chroot-2006.0.ebuild 2433
+SHA256 e47855c972e5e116b0c23170d53556308f68f0d86915d248465897c85c8bd3e2 x86-chroot-2006.0.ebuild 2433
+MISC ChangeLog 389 RMD160 66af6428c49fe25d63182c3bde591b0fbbbcaa2b SHA1 4d5414a46f3ee990a6f872ceb699a301666a6072 SHA256 dcfea8533b737bb22b3ad163439d2a8f4653c3c3efeacb1be5fec9f73fc6444a
+MD5 357626315a680a429fb2017c4fd5cda9 ChangeLog 389
+RMD160 66af6428c49fe25d63182c3bde591b0fbbbcaa2b ChangeLog 389
+SHA256 dcfea8533b737bb22b3ad163439d2a8f4653c3c3efeacb1be5fec9f73fc6444a ChangeLog 389
+MISC metadata.xml 485 RMD160 2233cf5d20e2e0c279865ba84133a1f2c860ac6c SHA1 15c3f194b35eb270bcd52a39bd4dc24cb165c6e6 SHA256 ef474470c23048c3d0f449d9b824b8c8e1b89da169ecc176de072d0dce60b2ee
+MD5 fd25fba5b52d422419fe9f54f96c8ee4 metadata.xml 485
+RMD160 2233cf5d20e2e0c279865ba84133a1f2c860ac6c metadata.xml 485
+SHA256 ef474470c23048c3d0f449d9b824b8c8e1b89da169ecc176de072d0dce60b2ee metadata.xml 485
+MD5 e0e08e75771c9a451095a94d6301db4e files/digest-x86-chroot-2006.0 268
+RMD160 cf63531fdaa6c248f193a5d8697d36b59c8d3c2c files/digest-x86-chroot-2006.0 268
+SHA256 49586268ceb285f76644ee5a4f8bf303c4ffa7e78ba3d7d5262ee935180f247e files/digest-x86-chroot-2006.0 268
diff --git a/app-emulation/x86-chroot/files/digest-x86-chroot-2006.0 b/app-emulation/x86-chroot/files/digest-x86-chroot-2006.0
new file mode 100644
index 000000000000..ebe1b4c1fa49
--- /dev/null
+++ b/app-emulation/x86-chroot/files/digest-x86-chroot-2006.0
@@ -0,0 +1,3 @@
+MD5 42b5b865cfd199d4c607b95e5ce140fe stage3-i686-2006.0.tar.bz2 104949773
+RMD160 6f0b95ed55a26d2421af9c6982fa7b05e272225e stage3-i686-2006.0.tar.bz2 104949773
+SHA256 98f11e98e7aa13d8a8c88255587f79fe998f6623b39909c21d8a7764dca8abe6 stage3-i686-2006.0.tar.bz2 104949773
diff --git a/app-emulation/x86-chroot/files/initd b/app-emulation/x86-chroot/files/initd
new file mode 100644
index 000000000000..fa024f5c67d7
--- /dev/null
+++ b/app-emulation/x86-chroot/files/initd
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHROOT_LOCATION=${CHROOT_LOCATION:-/opt/x86-chroot}
+
+depend() {
+ need localmount
+ need bootmisc
+}
+
+start() {
+ ebegin "Mounting 32bits chroot dirs to ${CHROOT_LOCATION}"
+ for loc in /dev /dev/pts /dev/shm /proc /proc/bus/usb /sys /tmp ; do
+ mount -o bind ${loc} ${CHROOT_LOCATION}${loc} >/dev/null
+ done
+ eval "$(portageq envvar -v PORTDIR DISTDIR)"
+ [[ -d ${PORTDIR}/distfiles ]] || mkdir ${PORTDIR}/distfiles
+ mount -o bind ${PORTDIR} ${CHROOT_LOCATION}/usr/portage >/dev/null
+ mount -o bind ${DISTDIR} ${CHROOT_LOCATION}/usr/portage/distfiles >/dev/null
+ eend $? "An error occured while attempting to mount 32bit chroot directories"
+
+ ebegin "Copying 32bits chroot files"
+ for conffile in resolv.conf passwd shadow group gshadow hosts ; do
+ [[ -f /etc/${conffile} ]] && cp -pf /etc/${conffile} ${CHROOT_LOCATION}/etc >/dev/null &
+ done
+ cp -Ppf /etc/localtime ${CHROOT_LOCATION}/etc >/dev/null &
+ eend $? "An error occured while attempting to copy 32 bits chroot files."
+}
+
+stop() {
+ ebegin "Unmounting 32bits chroot dirs"
+ for loc in /dev/pts /dev/shm /dev /proc/bus/usb /proc /sys /tmp /usr/portage/distfiles /usr/portage; do
+ umount -f ${CHROOT_LOCATION}${loc} >/dev/null
+ done
+ eend $? "An error occured while attempting to unmount 32bits chroot directories"
+}
diff --git a/app-emulation/x86-chroot/files/x86-chroot b/app-emulation/x86-chroot/files/x86-chroot
new file mode 100644
index 000000000000..966c4dac086f
--- /dev/null
+++ b/app-emulation/x86-chroot/files/x86-chroot
@@ -0,0 +1,3 @@
+#!/bin/bash
+source /etc/conf.d/x86-chroot
+linux32 chroot ${CHROOT_LOCATION} /bin/bash
diff --git a/app-emulation/x86-chroot/metadata.xml b/app-emulation/x86-chroot/metadata.xml
new file mode 100644
index 000000000000..a59cb4c453db
--- /dev/null
+++ b/app-emulation/x86-chroot/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>amd64</herd>
+<maintainer>
+ <email>blubb@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+x86-chroot is aimed at amd64 users that need to run 32bit software. The tool
+installs the latest Gentoo release, sets up all the needed mounts and files and
+applies the X hack to get apps using X running in the chroot.
+</longdescription>
+</pkgmetadata>
+
diff --git a/app-emulation/x86-chroot/x86-chroot-2006.0.ebuild b/app-emulation/x86-chroot/x86-chroot-2006.0.ebuild
new file mode 100644
index 000000000000..ddc7e4d4b3b5
--- /dev/null
+++ b/app-emulation/x86-chroot/x86-chroot-2006.0.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/x86-chroot/x86-chroot-2006.0.ebuild,v 1.1 2006/08/25 13:37:46 blubb Exp $
+
+inherit linux-info
+
+DESCRIPTION="Provides a 32bit chroot for amd64 users"
+HOMEPAGE="http://amd64.gentoo.org/"
+SRC_URI="http://distfiles.gentoo.org/releases/x86/${PV}/stages/stage3-i686-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="${PV}"
+KEYWORDS="-* ~amd64"
+IUSE=""
+
+RDEPEND="sys-apps/setarch"
+
+CONFIG_CHECK="IA32_EMULATION"
+CHROOT_LOCATION=${CHROOT_LOCATION:-/opt/x86-chroot}
+
+pkg_setup() {
+ if [[ -e ${CHROOT_LOCATION} && -z ${IKNOWMYSHIT} ]] ; then
+ eerror "ATTENTION! The location you are going to install the chroot to"
+ eerror "already exists and probably contains a chroot. Re-merging ${PN}"
+ eerror "will overwrite files in the chroot and likely result in a broken"
+ eerror "chroot. If you still want to merge it, execute:"
+ eerror ""
+ eerror "export IKNOWMYSHIT=breakmychroot"
+ die "Previous chroot instance found!"
+ fi
+ linux-info_pkg_setup
+}
+
+src_unpack() {
+ cd ${WORKDIR}
+ mkdir -p ".${CHROOT_LOCATION}"
+ cd ".${CHROOT_LOCATION}"
+ unpack ${A}
+}
+
+src_compile() {
+ cat <<- EOF > "${WORKDIR}/${CHROOT_LOCATION}/etc/make.conf"
+ CFLAGS="-O2 -march=athlon-xp -msse2 -pipe -fomit-frame-pointer"
+ CHOST="i686-pc-linux-gnu"
+ CXXFLAGS="\${CFLAGS}"
+ EOF
+ echo "env-update" >> "${WORKDIR}/${CHROOT_LOCATION}/root/.bashrc"
+ echo "CHROOT_LOCATION=${CHROOT_LOCATION}" > "${WORKDIR}/${CHROOT_LOCATION}/etc/conf.d/${PN}"
+
+ echo "which xhost &>/dev/null && xhost local:localhost" >> \
+ "${WORKDIR}/${CHROOT_LOCATION}/root/.bashrc"
+}
+
+src_install() {
+ mv ${WORKDIR}/* ${D}/ || die "moving chroot failed!"
+ newinitd ${FILESDIR}/initd ${PN} || die "could not install init.d file!"
+ mkdir -p "${D}/etc/conf.d"
+ echo "CHROOT_LOCATION=${CHROOT_LOCATION}" > "${D}/etc/conf.d/${PN}" || die "could not install conf.d file!"
+ dobin ${FILESDIR}/${PN} || die "couldn't install x86-chroot"
+}
+
+pkg_postinst() {
+ einfo "Your chroot system is now installed. To do all the necessary setup"
+ einfo "work, run '/etc/init.d/x86-chroot start'. To start a chroot session,"
+ einfo "run 'x86-chroot'."
+}
+
+pkg_prerm() {
+ [[ -f /etc/conf.d/${PN} ]] && source /etc/conf.d/${PN}
+ ewarn "There are still files around in ${CHROOT_LOCATION}; make sure you
+ manually"
+ ewarn "remove that directory *after* checking the mounts for it"
+}