1 |
commit: 81d881eb14318990b3e4ca06a66090b93663a3cf |
2 |
Author: Anthony G. Basile <basile <AT> opensource <DOT> dyc <DOT> edu> |
3 |
AuthorDate: Tue May 3 13:39:55 2011 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 3 13:39:55 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-openbsd.git;a=commit;h=81d881eb |
7 |
|
8 |
Automation of bootstrap process - in progress |
9 |
|
10 |
--- |
11 |
script/bootstrap-bash.sh | 4 ++- |
12 |
script/full-bootstrap-prefix.sh | 71 +++++++++++++++++++++++++++++++++++++++ |
13 |
2 files changed, 74 insertions(+), 1 deletions(-) |
14 |
|
15 |
diff --git a/script/bootstrap-bash.sh b/script/bootstrap-bash.sh |
16 |
old mode 100644 |
17 |
new mode 100755 |
18 |
index dc0ac27..c452fc4 |
19 |
--- a/script/bootstrap-bash.sh |
20 |
+++ b/script/bootstrap-bash.sh |
21 |
@@ -17,7 +17,9 @@ cd "$1" |
22 |
mkdir bash-build |
23 |
cd bash-build |
24 |
|
25 |
-ftp "http://distfiles.gentoo.org/distfiles/bash-4.1.tar.gz" |
26 |
+GENTOO_MIRROR=${GENTOO_MIRROR:="http://distfiles.gentoo.org/distfiles"} |
27 |
+ |
28 |
+ftp "${GENTOO_MIRROR}/bash-4.1.tar.gz" |
29 |
gzip -d bash-4.1.tar.gz |
30 |
tar -xf bash-4.1.tar |
31 |
cd bash-4.1 |
32 |
|
33 |
diff --git a/script/full-bootstrap-prefix.sh b/script/full-bootstrap-prefix.sh |
34 |
new file mode 100755 |
35 |
index 0000000..bbbf90a |
36 |
--- /dev/null |
37 |
+++ b/script/full-bootstrap-prefix.sh |
38 |
@@ -0,0 +1,71 @@ |
39 |
+#!/usr/bin/env bash |
40 |
+ |
41 |
+# Local gentoo mirror, or default to main, eg. |
42 |
+# |
43 |
+export GENTOO_MIRROR="ftp://192.168.100.9/pub/gentoo/distfiles" |
44 |
+ |
45 |
+# If there is no GENTOO_MIRROR set, then default to our main distfiles server |
46 |
+# |
47 |
+export GENTOO_MIRROR=${GENTOO_MIRROR:="http://distfiles.gentoo.org/distfiles"} |
48 |
+ |
49 |
+# Installation location |
50 |
+# |
51 |
+export EPREFIX="$HOME/gentoo" |
52 |
+export PATH="$EPREFIX/usr/bin:$EPREFIX/bin:$EPREFIX/tmp/usr/bin:$EPREFIX/tmp/bin:$PATH" |
53 |
+ |
54 |
+mkdir -p $EPREFIX/tmp |
55 |
+ |
56 |
+[ ! -x ${EPREFIX}/tmp/usr/bin/bash ] && ./bootstrap-bash.sh $EPREFIX/tmp |
57 |
+[ ! -d ${EPREFIX}/usr/portage ] && ./bootstrap-prefix.sh $EPREFIX tree |
58 |
+ |
59 |
+[ ! -x ${EPREFIX}/tmp/usr/bin/make ] && ./bootstrap-prefix.sh $EPREFIX/tmp make |
60 |
+[ ! -x ${EPREFIX}/tmp/usr/bin/wget ] && ./bootstrap-prefix.sh $EPREFIX/tmp wget |
61 |
+[ ! -x ${EPREFIX}/tmp/usr/bin/sed ] && ./bootstrap-prefix.sh $EPREFIX/tmp sed |
62 |
+[ ! -x ${EPREFIX}/tmp/usr/bin/python2.6 ] && ./bootstrap-prefix.sh $EPREFIX/tmp python |
63 |
+[ ! -x ${EPREFIX}/tmp/usr/bin/cp ] && ./bootstrap-prefix.sh $EPREFIX/tmp coreutils8 |
64 |
+[ ! -x ${EPREFIX}/tmp/usr/bin/find ] && ./bootstrap-prefix.sh $EPREFIX/tmp findutils3 |
65 |
+[ ! -x ${EPREFIX}/tmp/usr/bin/tar ] && ./bootstrap-prefix.sh $EPREFIX/tmp tar22 |
66 |
+[ ! -x ${EPREFIX}/tmp/usr/bin/patch ] && ./bootstrap-prefix.sh $EPREFIX/tmp patch9 |
67 |
+[ ! -x ${EPREFIX}/tmp/usr/bin/gawk ] && ./bootstrap-prefix.sh $EPREFIX/tmp gawk |
68 |
+[ ! -x ${EPREFIX}/tmp/usr/bin/grep ] && ./bootstrap-prefix.sh $EPREFIX/tmp grep |
69 |
+[ ! -x ${EPREFIX}/usr/bin/emerge ] && ./bootstrap-prefix.sh $EPREFIX portage |
70 |
+ |
71 |
+hash -r |
72 |
+ |
73 |
+# FIXME: the bootstrap scripts use GENTOO_MIRROR but emerge uses GENTOO_MIRRORS |
74 |
+# |
75 |
+export GENTOO_MIRRORS=${GENTOO_MIRROR%/distfiles} |
76 |
+ |
77 |
+# FIXME: Sooner or later we'll have to get our profiles straight and won't need this |
78 |
+# |
79 |
+export ACCEPT_KEYWORDS="* ~*" |
80 |
+[ ! -x ${EPREFIX}/bin/sed ] && emerge -1 sed |
81 |
+[ ! -x ${EPREFIX}/bin/bash ] && emerge -1 -O bash |
82 |
+[ ! -x ${EPREFIX}/usr/bin/wget ] && emerge -1 -O wget |
83 |
+ |
84 |
+[ ! -x ${EPREFIX}/sbin/runscript.sh ] && emerge -1 -O baselayout-prefix |
85 |
+[ ! -x ${EPREFIX}/usr/bin/m4 ] && emerge -1 -O m4 |
86 |
+[ ! -x ${EPREFIX}/usr/bin/autoconf-* ] && emerge -1 -O autoconf |
87 |
+[ ! -x ${EPREFIX}/usr/bin/autoconf ] && emerge -1 -O autoconf-wrapper |
88 |
+[ ! -x ${EPREFIX}/usr/bin/automake-* ] && emerge -1 -O automake |
89 |
+[ ! -x ${EPREFIX}/usr/bin/automake ] && emerge -1 -O automake-wrapper |
90 |
+[ ! -x ${EPREFIX}/usr/bin/libtool ] && emerge -1 -O libtool |
91 |
+# |
92 |
+# FIXME: this fails with an error that the print function was not found in libtool |
93 |
+#[ ! -x ${EPREFIX}/usr/bin/xz ] && emerge -1 -O xz-utils |
94 |
+# |
95 |
+[ ! -x ${EPREFIX}/usr/bin/flex ] && emerge -1 -O flex |
96 |
+[ ! -x ${EPREFIX}/usr/bin/bison ] && emerge -1 -O bison |
97 |
+[ ! -x ${EPREFIX}/usr/bin/binutils-config ] && emerge -1 -O binutils-config |
98 |
+[ ! -x ${EPREFIX}/usr/bin/gcc-config ] && emerge -1 -O gcc-config |
99 |
+ |
100 |
+# |
101 |
+# TODO: We've gotten up to approx code listing 1.7 of the FBSD bootstrap |
102 |
+# http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-freebsd.xml |
103 |
+# |
104 |
+#$ emerge --oneshot --nodeps binutils |
105 |
+#$ emerge --oneshot --nodeps "=gcc-4.2*" |
106 |
+ |
107 |
+ |
108 |
+ |
109 |
+ |