aboutsummaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorTrevor Johnson <trevor@FreeBSD.org>2003-10-13 21:13:42 +0000
committerTrevor Johnson <trevor@FreeBSD.org>2003-10-13 21:13:42 +0000
commit5b95d6f7245ea44b6d07a78d78826f0074293f14 (patch)
tree82a8fd88b8fb4e917519a4c6b26a82d5c95fc723 /emulators
parent2251cacc00f88bbd49a51ed2d4636804a0812f17 (diff)
downloadports-5b95d6f7245ea44b6d07a78d78826f0074293f14.tar.gz
ports-5b95d6f7245ea44b6d07a78d78826f0074293f14.zip
new port of the Gentoo Linux userland (I only tested this on i386)
Notes
Notes: svn path=/head/; revision=91103
Diffstat (limited to 'emulators')
-rw-r--r--emulators/Makefile1
-rw-r--r--emulators/linux_base-gentoo-stage1/Makefile69
-rw-r--r--emulators/linux_base-gentoo-stage1/distinfo.alpha2
-rw-r--r--emulators/linux_base-gentoo-stage1/distinfo.amd642
-rw-r--r--emulators/linux_base-gentoo-stage1/distinfo.i3862
-rw-r--r--emulators/linux_base-gentoo-stage1/distinfo.ia642
-rw-r--r--emulators/linux_base-gentoo-stage1/distinfo.sparc642
-rw-r--r--emulators/linux_base-gentoo-stage1/pkg-descr10
-rw-r--r--emulators/linux_base-gentoo-stage1/pkg-install34
-rw-r--r--emulators/linux_base-gentoo-stage1/pkg-message18
-rw-r--r--emulators/linux_dist-gentoo-stage1/Makefile69
-rw-r--r--emulators/linux_dist-gentoo-stage1/distinfo.alpha2
-rw-r--r--emulators/linux_dist-gentoo-stage1/distinfo.amd642
-rw-r--r--emulators/linux_dist-gentoo-stage1/distinfo.i3862
-rw-r--r--emulators/linux_dist-gentoo-stage1/distinfo.ia642
-rw-r--r--emulators/linux_dist-gentoo-stage1/distinfo.sparc642
-rw-r--r--emulators/linux_dist-gentoo-stage1/pkg-descr10
-rw-r--r--emulators/linux_dist-gentoo-stage1/pkg-install34
-rw-r--r--emulators/linux_dist-gentoo-stage1/pkg-message18
19 files changed, 283 insertions, 0 deletions
diff --git a/emulators/Makefile b/emulators/Makefile
index 3fc5616ad909..be43ab2a1b2b 100644
--- a/emulators/Makefile
+++ b/emulators/Makefile
@@ -48,6 +48,7 @@
SUBDIR += linux_base-6
SUBDIR += linux_base-8
SUBDIR += linux_base-debian
+ SUBDIR += linux_base-gentoo-stage1
SUBDIR += mastergear
SUBDIR += minivmac
SUBDIR += mtools
diff --git a/emulators/linux_base-gentoo-stage1/Makefile b/emulators/linux_base-gentoo-stage1/Makefile
new file mode 100644
index 000000000000..92baca1a5c06
--- /dev/null
+++ b/emulators/linux_base-gentoo-stage1/Makefile
@@ -0,0 +1,69 @@
+# New ports collection makefile for: linux_base-gentoo-stage1
+# Date created: 2003-10-12
+# Whom: trevor
+#
+# $FreeBSD$
+#
+
+PORTNAME= linux_base-gentoo-stage1
+PORTVERSION= 1.4
+CATEGORIES= emulators linux
+MASTER_SITES= ${MASTER_SITE_GENTOO}
+USE_BZIP2= y
+.include <bsd.port.pre.mk>
+PORTARCH=${MACHINE_ARCH:S/64//}
+.if (${PORTARCH} == "alpha")
+MASTER_SITE_SUBDIR= experimental/alpha/stages
+DISTNAME= stage1-alpha-20030721
+.endif
+.if (${PORTARCH} == "amd")
+MASTER_SITE_SUBDIR= experimental/amd64/stages
+DISTNAME= stage1-amd64-20030728
+.endif
+.if (${PORTARCH} == "ia")
+MASTER_SITE_SUBDIR= experimental/ia64
+DISTNAME= stage1-ia64-20030912
+.endif
+.if (${PORTARCH} == "i386")
+MASTER_SITE_SUBDIR= releases/x86/${PORTVERSION}/stages/x86
+DISTNAME= stage1-x86-1.4-20030806
+.endif
+.if (${PORTARCH} == "sparc")
+MASTER_SITE_SUBDIR= experimental/sparc/stages/sparc64
+DISTNAME= stage1-sparc64-20031011
+.endif
+DIST_SUBDIR= gentoo-linux
+EXTRACT_ONLY=
+
+MAINTAINER= trevor@FreeBSD.org
+COMMENT= Files from Gentoo distribution, for Linux compatibility
+
+MD5_FILE= ${MASTERDIR}/distinfo.${MACHINE_ARCH}
+NO_BUILD= y
+ONLY_FOR_ARCHS= alpha amd64 ia64 i386 sparc64
+PLIST= ${WRKDIR}/pkg-plist
+PREFIX= ${LINUXBASE}
+RESTRICTED= "binaries licensed under GNU GPL without accompanying source"
+CONFLICTS= linux_base-*
+
+pre-install:
+ ${ECHO_CMD} etc/resolv.conf > ${PLIST}
+ ${TAR} tyf ${DISTDIR}/${DIST_SUBDIR}/${DISTFILES} | cut -c3-100 \
+ > ${WRKDIR}/list.txt
+ cd ${WRKDIR} && ${GREP} -v '/$$' ${WRKDIR}/list.txt >> ${PLIST}
+ ${GREP} '/$$' ${WRKDIR}/list.txt | ${SED} -e "s:^:@dirrm :g" >> ${PLIST}
+ ${RM} ${WRKDIR}/list.txt
+ @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
+do-install:
+ - ${MKDIR} ${PREFIX}
+ ${TAR} -C ${PREFIX} -xypSf ${DISTDIR}/${DIST_SUBDIR}/${DISTFILES}
+ - ${CP} -p /etc/resolv.conf ${PREFIX}/etc/
+ ${RM} ${PREFIX}/dev/null ${PREFIX}/dev/null
+ mknod ${PREFIX}/dev/null c 2 2
+ mknod ${PREFIX}/dev/stdout c 22 1
+ brandelf -t Linux ${PREFIX}/sbin/ldconfig ${PREFIX}/sbin/sln
+ @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/emulators/linux_base-gentoo-stage1/distinfo.alpha b/emulators/linux_base-gentoo-stage1/distinfo.alpha
new file mode 100644
index 000000000000..0dc6a5ff7cf1
--- /dev/null
+++ b/emulators/linux_base-gentoo-stage1/distinfo.alpha
@@ -0,0 +1,2 @@
+$FreeBSD$
+MD5 (gentoo-linux/stage1-alpha-20030721.tar.bz2) = 26af7ffae217b0f1cd8b3eefddaa12de
diff --git a/emulators/linux_base-gentoo-stage1/distinfo.amd64 b/emulators/linux_base-gentoo-stage1/distinfo.amd64
new file mode 100644
index 000000000000..0f6e8329e196
--- /dev/null
+++ b/emulators/linux_base-gentoo-stage1/distinfo.amd64
@@ -0,0 +1,2 @@
+$FreeBSD$
+MD5 (gentoo-linux/stage1-amd64-20030728.tar.bz2) = 2c96d7e8b49b3e3b65345e95185ae2e5
diff --git a/emulators/linux_base-gentoo-stage1/distinfo.i386 b/emulators/linux_base-gentoo-stage1/distinfo.i386
new file mode 100644
index 000000000000..91933a3880dc
--- /dev/null
+++ b/emulators/linux_base-gentoo-stage1/distinfo.i386
@@ -0,0 +1,2 @@
+$FreeBSD$
+MD5 (gentoo-linux/stage1-x86-1.4-20030806.tar.bz2) = a0db1f3ff23e59e73454ddc934ab1074
diff --git a/emulators/linux_base-gentoo-stage1/distinfo.ia64 b/emulators/linux_base-gentoo-stage1/distinfo.ia64
new file mode 100644
index 000000000000..dd397be42566
--- /dev/null
+++ b/emulators/linux_base-gentoo-stage1/distinfo.ia64
@@ -0,0 +1,2 @@
+$FreeBSD$
+MD5 (gentoo-linux/stage1-ia64-20030912.tar.bz2) = 26c14afff7dd7b90e6a1fbb2b35363e2
diff --git a/emulators/linux_base-gentoo-stage1/distinfo.sparc64 b/emulators/linux_base-gentoo-stage1/distinfo.sparc64
new file mode 100644
index 000000000000..e4cbcd1299f3
--- /dev/null
+++ b/emulators/linux_base-gentoo-stage1/distinfo.sparc64
@@ -0,0 +1,2 @@
+$FreeBSD$
+MD5 (gentoo-linux/stage1-sparc64-20031011.tar.bz2) = d6fbba1df90890ba4295a95e2cda3db4
diff --git a/emulators/linux_base-gentoo-stage1/pkg-descr b/emulators/linux_base-gentoo-stage1/pkg-descr
new file mode 100644
index 000000000000..06f2c5310b01
--- /dev/null
+++ b/emulators/linux_base-gentoo-stage1/pkg-descr
@@ -0,0 +1,10 @@
+from Daniel Robbins of Gentoo Technologies, Inc.:
+
+ The "stage1" tarball is what we used to call a "build
+ tarball". It is a chrootable image that you can use to
+ build Gentoo Linux completely from scratch. It requires a
+ bootstrap and an "emerge system" to convert it to a bootable
+ Gentoo Linux system, and it will run on any PC (i486 or
+ greater).
+
+WWW: http://www.gentoo.org/
diff --git a/emulators/linux_base-gentoo-stage1/pkg-install b/emulators/linux_base-gentoo-stage1/pkg-install
new file mode 100644
index 000000000000..2d569a739289
--- /dev/null
+++ b/emulators/linux_base-gentoo-stage1/pkg-install
@@ -0,0 +1,34 @@
+#!/bin/sh
+# an installation script for linux_base
+
+case "$2" in
+PRE-INSTALL)
+ if [ -z "`kldstat -v | grep -E 'linux(aout|elf)'`" ]; then
+ echo 'Linux mode is not enabled.'
+ echo 'Loading linux kernel module now...'
+ if ! kldload linux; then
+ echo 'The linux kernel module could not be loaded.'
+ echo 'Please enable linux mode manually and retry.'
+ exit 1
+ fi
+ fi
+ if [ -n "`mount | grep -w ^linprocfs`" ]; then
+ echo 'Un-mounting linprocfs...'
+ umount linprocfs
+ fi
+ ;;
+POST-INSTALL)
+ if [ -n "`grep -w ^linprocfs /etc/fstab`" ]; then
+ echo 'Re-mounting linprocfs...'
+ mount linprocfs
+ fi
+ ;;
+DEINSTALL)
+ if [ -n "`mount | grep -w ^linprocfs`" ]; then
+ echo 'Un-mounting linprocfs...'
+ umount linprocfs
+ fi
+ ;;
+esac
+
+exit 0
diff --git a/emulators/linux_base-gentoo-stage1/pkg-message b/emulators/linux_base-gentoo-stage1/pkg-message
new file mode 100644
index 000000000000..b38ae7cd42df
--- /dev/null
+++ b/emulators/linux_base-gentoo-stage1/pkg-message
@@ -0,0 +1,18 @@
+* The port/package has attempted to enable Linux compatibility mode by loading
+* the linux.ko kernel module. You can load the module manually as root with the
+* command "kldload linux" or have it load automatically at boot time by adding
+* to /etc/rc.conf the line:
+*
+* linux_enable="YES"
+*
+* You may wish to enable emulation of the Linux proc filesystem. See the
+* linprocfs(5) man page.
+*
+* To download Portage, do "chroot /compat/linux emerge sync" as root. Then you
+* may want to do "chroot /compat/linux /usr/portage/scripts/bootstrap.sh" to
+* rebuild binutils, gcc, gettext, and glibc. See
+* <URL:http://www.gentoo.org/doc/en/gentoo-alpha-install.xml> or
+* <URL:http://www.gentoo.org/doc/en/gentoo-x86-install.xml> for more complete
+* instructions.
+*
+* Do not do "emerge portage" in stage 1.
diff --git a/emulators/linux_dist-gentoo-stage1/Makefile b/emulators/linux_dist-gentoo-stage1/Makefile
new file mode 100644
index 000000000000..92baca1a5c06
--- /dev/null
+++ b/emulators/linux_dist-gentoo-stage1/Makefile
@@ -0,0 +1,69 @@
+# New ports collection makefile for: linux_base-gentoo-stage1
+# Date created: 2003-10-12
+# Whom: trevor
+#
+# $FreeBSD$
+#
+
+PORTNAME= linux_base-gentoo-stage1
+PORTVERSION= 1.4
+CATEGORIES= emulators linux
+MASTER_SITES= ${MASTER_SITE_GENTOO}
+USE_BZIP2= y
+.include <bsd.port.pre.mk>
+PORTARCH=${MACHINE_ARCH:S/64//}
+.if (${PORTARCH} == "alpha")
+MASTER_SITE_SUBDIR= experimental/alpha/stages
+DISTNAME= stage1-alpha-20030721
+.endif
+.if (${PORTARCH} == "amd")
+MASTER_SITE_SUBDIR= experimental/amd64/stages
+DISTNAME= stage1-amd64-20030728
+.endif
+.if (${PORTARCH} == "ia")
+MASTER_SITE_SUBDIR= experimental/ia64
+DISTNAME= stage1-ia64-20030912
+.endif
+.if (${PORTARCH} == "i386")
+MASTER_SITE_SUBDIR= releases/x86/${PORTVERSION}/stages/x86
+DISTNAME= stage1-x86-1.4-20030806
+.endif
+.if (${PORTARCH} == "sparc")
+MASTER_SITE_SUBDIR= experimental/sparc/stages/sparc64
+DISTNAME= stage1-sparc64-20031011
+.endif
+DIST_SUBDIR= gentoo-linux
+EXTRACT_ONLY=
+
+MAINTAINER= trevor@FreeBSD.org
+COMMENT= Files from Gentoo distribution, for Linux compatibility
+
+MD5_FILE= ${MASTERDIR}/distinfo.${MACHINE_ARCH}
+NO_BUILD= y
+ONLY_FOR_ARCHS= alpha amd64 ia64 i386 sparc64
+PLIST= ${WRKDIR}/pkg-plist
+PREFIX= ${LINUXBASE}
+RESTRICTED= "binaries licensed under GNU GPL without accompanying source"
+CONFLICTS= linux_base-*
+
+pre-install:
+ ${ECHO_CMD} etc/resolv.conf > ${PLIST}
+ ${TAR} tyf ${DISTDIR}/${DIST_SUBDIR}/${DISTFILES} | cut -c3-100 \
+ > ${WRKDIR}/list.txt
+ cd ${WRKDIR} && ${GREP} -v '/$$' ${WRKDIR}/list.txt >> ${PLIST}
+ ${GREP} '/$$' ${WRKDIR}/list.txt | ${SED} -e "s:^:@dirrm :g" >> ${PLIST}
+ ${RM} ${WRKDIR}/list.txt
+ @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
+do-install:
+ - ${MKDIR} ${PREFIX}
+ ${TAR} -C ${PREFIX} -xypSf ${DISTDIR}/${DIST_SUBDIR}/${DISTFILES}
+ - ${CP} -p /etc/resolv.conf ${PREFIX}/etc/
+ ${RM} ${PREFIX}/dev/null ${PREFIX}/dev/null
+ mknod ${PREFIX}/dev/null c 2 2
+ mknod ${PREFIX}/dev/stdout c 22 1
+ brandelf -t Linux ${PREFIX}/sbin/ldconfig ${PREFIX}/sbin/sln
+ @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/emulators/linux_dist-gentoo-stage1/distinfo.alpha b/emulators/linux_dist-gentoo-stage1/distinfo.alpha
new file mode 100644
index 000000000000..0dc6a5ff7cf1
--- /dev/null
+++ b/emulators/linux_dist-gentoo-stage1/distinfo.alpha
@@ -0,0 +1,2 @@
+$FreeBSD$
+MD5 (gentoo-linux/stage1-alpha-20030721.tar.bz2) = 26af7ffae217b0f1cd8b3eefddaa12de
diff --git a/emulators/linux_dist-gentoo-stage1/distinfo.amd64 b/emulators/linux_dist-gentoo-stage1/distinfo.amd64
new file mode 100644
index 000000000000..0f6e8329e196
--- /dev/null
+++ b/emulators/linux_dist-gentoo-stage1/distinfo.amd64
@@ -0,0 +1,2 @@
+$FreeBSD$
+MD5 (gentoo-linux/stage1-amd64-20030728.tar.bz2) = 2c96d7e8b49b3e3b65345e95185ae2e5
diff --git a/emulators/linux_dist-gentoo-stage1/distinfo.i386 b/emulators/linux_dist-gentoo-stage1/distinfo.i386
new file mode 100644
index 000000000000..91933a3880dc
--- /dev/null
+++ b/emulators/linux_dist-gentoo-stage1/distinfo.i386
@@ -0,0 +1,2 @@
+$FreeBSD$
+MD5 (gentoo-linux/stage1-x86-1.4-20030806.tar.bz2) = a0db1f3ff23e59e73454ddc934ab1074
diff --git a/emulators/linux_dist-gentoo-stage1/distinfo.ia64 b/emulators/linux_dist-gentoo-stage1/distinfo.ia64
new file mode 100644
index 000000000000..dd397be42566
--- /dev/null
+++ b/emulators/linux_dist-gentoo-stage1/distinfo.ia64
@@ -0,0 +1,2 @@
+$FreeBSD$
+MD5 (gentoo-linux/stage1-ia64-20030912.tar.bz2) = 26c14afff7dd7b90e6a1fbb2b35363e2
diff --git a/emulators/linux_dist-gentoo-stage1/distinfo.sparc64 b/emulators/linux_dist-gentoo-stage1/distinfo.sparc64
new file mode 100644
index 000000000000..e4cbcd1299f3
--- /dev/null
+++ b/emulators/linux_dist-gentoo-stage1/distinfo.sparc64
@@ -0,0 +1,2 @@
+$FreeBSD$
+MD5 (gentoo-linux/stage1-sparc64-20031011.tar.bz2) = d6fbba1df90890ba4295a95e2cda3db4
diff --git a/emulators/linux_dist-gentoo-stage1/pkg-descr b/emulators/linux_dist-gentoo-stage1/pkg-descr
new file mode 100644
index 000000000000..06f2c5310b01
--- /dev/null
+++ b/emulators/linux_dist-gentoo-stage1/pkg-descr
@@ -0,0 +1,10 @@
+from Daniel Robbins of Gentoo Technologies, Inc.:
+
+ The "stage1" tarball is what we used to call a "build
+ tarball". It is a chrootable image that you can use to
+ build Gentoo Linux completely from scratch. It requires a
+ bootstrap and an "emerge system" to convert it to a bootable
+ Gentoo Linux system, and it will run on any PC (i486 or
+ greater).
+
+WWW: http://www.gentoo.org/
diff --git a/emulators/linux_dist-gentoo-stage1/pkg-install b/emulators/linux_dist-gentoo-stage1/pkg-install
new file mode 100644
index 000000000000..2d569a739289
--- /dev/null
+++ b/emulators/linux_dist-gentoo-stage1/pkg-install
@@ -0,0 +1,34 @@
+#!/bin/sh
+# an installation script for linux_base
+
+case "$2" in
+PRE-INSTALL)
+ if [ -z "`kldstat -v | grep -E 'linux(aout|elf)'`" ]; then
+ echo 'Linux mode is not enabled.'
+ echo 'Loading linux kernel module now...'
+ if ! kldload linux; then
+ echo 'The linux kernel module could not be loaded.'
+ echo 'Please enable linux mode manually and retry.'
+ exit 1
+ fi
+ fi
+ if [ -n "`mount | grep -w ^linprocfs`" ]; then
+ echo 'Un-mounting linprocfs...'
+ umount linprocfs
+ fi
+ ;;
+POST-INSTALL)
+ if [ -n "`grep -w ^linprocfs /etc/fstab`" ]; then
+ echo 'Re-mounting linprocfs...'
+ mount linprocfs
+ fi
+ ;;
+DEINSTALL)
+ if [ -n "`mount | grep -w ^linprocfs`" ]; then
+ echo 'Un-mounting linprocfs...'
+ umount linprocfs
+ fi
+ ;;
+esac
+
+exit 0
diff --git a/emulators/linux_dist-gentoo-stage1/pkg-message b/emulators/linux_dist-gentoo-stage1/pkg-message
new file mode 100644
index 000000000000..b38ae7cd42df
--- /dev/null
+++ b/emulators/linux_dist-gentoo-stage1/pkg-message
@@ -0,0 +1,18 @@
+* The port/package has attempted to enable Linux compatibility mode by loading
+* the linux.ko kernel module. You can load the module manually as root with the
+* command "kldload linux" or have it load automatically at boot time by adding
+* to /etc/rc.conf the line:
+*
+* linux_enable="YES"
+*
+* You may wish to enable emulation of the Linux proc filesystem. See the
+* linprocfs(5) man page.
+*
+* To download Portage, do "chroot /compat/linux emerge sync" as root. Then you
+* may want to do "chroot /compat/linux /usr/portage/scripts/bootstrap.sh" to
+* rebuild binutils, gcc, gettext, and glibc. See
+* <URL:http://www.gentoo.org/doc/en/gentoo-alpha-install.xml> or
+* <URL:http://www.gentoo.org/doc/en/gentoo-x86-install.xml> for more complete
+* instructions.
+*
+* Do not do "emerge portage" in stage 1.