| 1 | <?xml version='1.0' encoding="UTF-8"?> |
1 | <?xml version="1.0" encoding="UTF-8"?> |
|
|
2 | |
| 2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/new-upgrade-to-gentoo-1.4.xml,v 1.10 2004/09/23 12:23:42 swift Exp $ --> |
3 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/new-upgrade-to-gentoo-1.4.xml,v 1.16 2006/03/06 09:18:30 neysx Exp $ --> |
|
|
4 | |
| 3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
5 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 4 | |
6 | |
| 5 | <guide link="new-upgrade-to-gentoo-1.4.xml"> |
7 | <guide link="/doc/en/new-upgrade-to-gentoo-1.4.xml"> |
| 6 | |
8 | |
| 7 | <title>Gentoo 1.4 Upgrade Guide</title> |
9 | <title>Gentoo 1.4 Upgrade Guide</title> |
| 8 | |
10 | |
| 9 | <author title = "Author"> |
11 | <author title="Author"> |
| 10 | <mail link = "rac@gentoo.org">Robert Coie</mail> |
12 | <mail link="rac@gentoo.org">Robert Coie</mail> |
| 11 | </author> |
13 | </author> |
| 12 | |
|
|
| 13 | <author title = "Copy Editor"> |
14 | <author title="Copy Editor"> |
| 14 | <mail link = "avenj@gentoo.org">Jon Portnoy</mail> |
15 | <mail link="avenj@gentoo.org">Jon Portnoy</mail> |
| 15 | </author> |
16 | </author> |
| 16 | |
17 | |
|
|
18 | <abstract> |
| 17 | <abstract>A method for upgrading older Gentoo installations in place to Gentoo 1.4</abstract> |
19 | A method for upgrading older Gentoo installations in place to Gentoo 1.4 |
|
|
20 | </abstract> |
|
|
21 | |
|
|
22 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
|
|
23 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 18 | <license/> |
24 | <license/> |
|
|
25 | |
| 19 | <version>0.2</version> |
26 | <version>0.4</version> |
| 20 | <date>September 23, 2004</date> |
27 | <date>2005-07-02</date> |
| 21 | |
28 | |
| 22 | |
|
|
| 23 | |
|
|
| 24 | <chapter> |
29 | <chapter> |
| 25 | <title>Before you begin</title> |
30 | <title>Before you begin</title> |
| 26 | <section> |
31 | <section> |
| 27 | <title>Be prepared</title> |
32 | <title>Be prepared</title> |
| 28 | <body> |
33 | <body> |
| 29 | <p>As with any major upgrade to the core of your Gentoo |
34 | |
| 30 | system, there is always the possibility that unforeseen |
35 | <p> |
| 31 | problems will ensue. It is always prudent to back up all |
36 | As with any major upgrade to the core of your Gentoo system, there is always the |
|
|
37 | possibility that unforeseen problems will ensue. It is always prudent to back |
| 32 | important data before beginning this process. If possible, |
38 | up all important data before beginning this process. If possible, try to |
| 33 | try to allocate a large block of time for this upgrade, so |
39 | allocate a large block of time for this upgrade, so that you will not feel |
| 34 | that you will not feel rushed. All the software on your |
40 | rushed. All the software on your machine will need to be recompiled. |
| 35 | machine will need to be recompiled.</p> |
41 | </p> |
|
|
42 | |
| 36 | </body> |
43 | </body> |
| 37 | </section> |
44 | </section> |
| 38 | <section> |
45 | <section> |
| 39 | <title>Other options</title> |
46 | <title>Other options</title> |
| 40 | <body> |
47 | <body> |
|
|
48 | |
|
|
49 | <p> |
| 41 | <p>This is not the only way to upgrade your system. You can |
50 | This is not the only way to upgrade your system. You can install a new 1.4 |
| 42 | install a new 1.4 system onto a separate partition and |
51 | system onto a separate partition and reuse some of your system configuration |
| 43 | reuse some of your system configuration instead. This method also has |
52 | instead. This method also has the advantage that you can always go back to your |
| 44 | the advantage that you can always go back to your old system |
|
|
| 45 | in the meantime as a fallback. You may also decide to simply |
53 | old system in the meantime as a fallback. You may also decide to simply not |
| 46 | not upgrade your system. If you decide you want to upgrade |
54 | upgrade your system. If you decide you want to upgrade in place, read on. |
| 47 | in place, read on.</p> |
55 | </p> |
|
|
56 | |
| 48 | </body> |
57 | </body> |
| 49 | </section> |
58 | </section> |
| 50 | <section> |
59 | <section> |
| 51 | <title>General notes</title> |
60 | <title>General notes</title> |
| 52 | <body> |
61 | <body> |
| 53 | <p>Whenever the code listings suggest running the |
62 | |
| 54 | <c>emerge</c> command, it is always a good idea to make a test |
63 | <p> |
| 55 | run of the command using the <c>-p</c> or <c>--pretend</c> |
64 | Whenever the code listings suggest running the <c>emerge</c> command, it is |
|
|
65 | always a good idea to make a test run of the command using the <c>-p</c> or |
| 56 | option to make sure that the command will do what you expect |
66 | <c>--pretend</c> option to make sure that the command will do what you expect it |
| 57 | it to do.</p> |
67 | to do. |
|
|
68 | </p> |
|
|
69 | |
| 58 | </body> |
70 | </body> |
| 59 | </section> |
71 | </section> |
| 60 | </chapter> |
72 | </chapter> |
| 61 | <chapter> |
73 | <chapter> |
| 62 | <title>Upgrading in place</title> |
74 | <title>Upgrading in place</title> |
| 63 | <section> |
75 | <section> |
| 64 | <title>Get Portage as current as possible</title> |
76 | <title>Get Portage as current as possible</title> |
| 65 | <body> |
77 | <body> |
|
|
78 | |
|
|
79 | <p> |
| 66 | <p>Some of the syntax of current ebuilds is unreadable by |
80 | Some of the syntax of current ebuilds is unreadable by older versions of |
| 67 | older versions of Portage. If you don't have at least Portage 2.0.44, try upgrading Portage.</p> |
81 | Portage. If you don't have at least Portage 2.0.44, try upgrading Portage. |
| 68 | <pre> |
82 | </p> |
|
|
83 | |
|
|
84 | <pre caption="Updating Portage"> |
| 69 | # <i>emerge sync</i> |
85 | # <i>emerge --sync</i> |
| 70 | # <i>emerge -u portage</i> |
86 | # <i>emerge -u portage</i> |
| 71 | </pre> |
87 | </pre> |
| 72 | <note>If your Portage version is very old, you may get an |
88 | |
| 73 | error message containing the phrase "unscriptable object". |
89 | <note> |
| 74 | Read and follow the instructions in |
90 | If your Portage version is very old, you may get an error message containing the |
|
|
91 | phrase "unscriptable object". Read and follow the instructions in |
| 75 | <path>/usr/portage/sys-apps/portage/files/README.RESCUE</path>. |
92 | <path>/usr/portage/sys-apps/portage/files/README.RESCUE</path>. Your Portage |
| 76 | Your Portage install should then be |
93 | install should then be current. |
| 77 | current.</note> |
94 | </note> |
| 78 | </body></section> |
|
|
| 79 | |
95 | |
|
|
96 | </body> |
|
|
97 | </section> |
| 80 | <section> |
98 | <section> |
| 81 | <title>Preparing GCC for cohabitation</title> |
99 | <title>Preparing GCC for cohabitation</title> |
| 82 | <body> |
100 | <body> |
|
|
101 | |
|
|
102 | <p> |
| 83 | <p>You will be installing a newer version of GCC during this |
103 | You will be installing a newer version of GCC during this upgrade. Versions of |
| 84 | upgrade. Versions of GCC older than 2.95.3-r8 are not |
104 | GCC older than 2.95.3-r8 are not designed to have multiple versions of GCC |
| 85 | designed to have multiple versions of GCC installed. You must |
|
|
| 86 | therefore upgrade GCC to at least version 2.95.3-r8. This |
105 | installed. You must therefore upgrade GCC to at least version 2.95.3-r8. This |
| 87 | will also have the beneficial side-effect of installing the |
106 | will also have the beneficial side-effect of installing the <c>gcc-config</c> |
| 88 | <c>gcc-config</c> package on your system, which can be used to |
107 | package on your system, which can be used to switch back and forth between |
| 89 | switch back and forth between various installed versions of |
108 | various installed versions of GCC. |
| 90 | GCC.</p> |
109 | </p> |
| 91 | |
110 | |
| 92 | <pre> |
111 | <pre caption="Updating GCC"> |
| 93 | # <i>emerge -u gcc</i> |
112 | # <i>emerge -u gcc</i> |
| 94 | </pre> |
113 | </pre> |
| 95 | |
114 | |
|
|
115 | <p> |
| 96 | <p>You can now check to see if gcc-config is working properly:</p> |
116 | You can now check to see if gcc-config is working properly: |
| 97 | <pre> |
117 | </p> |
|
|
118 | |
|
|
119 | <pre caption="Verifying GCC profile"> |
| 98 | # <i>gcc-config --get-current-profile</i> |
120 | # <i>gcc-config --get-current-profile</i> |
| 99 | </pre> |
121 | </pre> |
|
|
122 | |
|
|
123 | <p> |
| 100 | <p>This should return i686-pc-linux-gnu-2.95.3 on most x86 systems. Older systems may return i586-pc-linux-gnu-2.95.3.</p> |
124 | This should return i686-pc-linux-gnu-2.95.3 on most x86 systems. Older systems |
|
|
125 | may return i586-pc-linux-gnu-2.95.3. |
|
|
126 | </p> |
|
|
127 | |
| 101 | </body> |
128 | </body> |
| 102 | </section> |
129 | </section> |
| 103 | <section> |
130 | <section> |
| 104 | <title>Installing GCC 3</title> |
131 | <title>Installing GCC 3</title> |
| 105 | <body> |
132 | <body> |
|
|
133 | |
|
|
134 | <p> |
| 106 | <p>Now you can install a newer version of GCC without damaging |
135 | Now you can install a newer version of GCC without damaging your current |
| 107 | your current compiler. Look in |
|
|
| 108 | <path>/usr/portage/sys-devel/gcc</path> for a version of the |
136 | compiler. Look in <path>/usr/portage/sys-devel/gcc</path> for a version of the |
| 109 | GCC ebuild that is at least 3.2.1-r6. Choose the highest |
137 | GCC ebuild that is at least 3.2.1-r6. Choose the highest version that is marked |
| 110 | version that is marked stable for your architecture. To see |
138 | stable for your architecture. To see if an ebuild is considered stable for your |
| 111 | if an ebuild is considered stable for your architecture, look |
|
|
| 112 | for the KEYWORDS line in the ebuild file. If it has your |
139 | architecture, look for the KEYWORDS line in the ebuild file. If it has your |
| 113 | architecture listed without a ~ in front of it, it is |
140 | architecture listed without a ~ in front of it, it is considered stable. |
| 114 | considered stable. Assuming 3.2.2 is the most current stable |
141 | Assuming 3.2.2 is the most current stable version, we first need to remove the |
| 115 | version, we first need to remove the glibc dependency from gcc.</p> |
142 | glibc dependency from gcc. |
|
|
143 | </p> |
| 116 | |
144 | |
| 117 | <p> |
145 | <p> |
| 118 | Edit <path>/usr/portage/sys-devel/gcc/gcc-3.2.2.ebuild</path> and search for the |
146 | Edit <path>/usr/portage/sys-devel/gcc/gcc-3.2.2.ebuild</path> and search for the |
| 119 | line containing <c>DEPEND</c>. Remove the <c>glibc</c> dependency and save the |
147 | line containing <c>DEPEND</c>. Remove the <c>glibc</c> dependency and save the |
| 120 | ebuild. |
148 | ebuild. |
| … | |
… | |
| 126 | |
154 | |
| 127 | <p> |
155 | <p> |
| 128 | Now install the latest GCC version on your system: |
156 | Now install the latest GCC version on your system: |
| 129 | </p> |
157 | </p> |
| 130 | |
158 | |
| 131 | <pre> |
159 | <pre caption="Install the latest GCC"> |
| 132 | # <i>USE="-java" emerge /usr/portage/sys-devel/gcc/gcc-3.2.2.ebuild</i> |
160 | # <i>USE="-java" emerge /usr/portage/sys-devel/gcc/gcc-3.2.2.ebuild</i> |
| 133 | </pre> |
161 | </pre> |
|
|
162 | |
| 134 | </body> |
163 | </body> |
| 135 | </section> |
164 | </section> |
| 136 | <section> |
165 | <section> |
| 137 | <title>Changing profiles</title> |
166 | <title>Changing profiles</title> |
| 138 | <body> |
167 | <body> |
| 139 | <p>Now you need to change two sets of profiles: your |
168 | |
| 140 | gcc-config profile and your Portage profile.</p> |
169 | <p> |
| 141 | <pre> |
170 | Now you need to change two sets of profiles: your gcc-config profile and your |
|
|
171 | Portage profile. |
|
|
172 | </p> |
|
|
173 | |
|
|
174 | <pre caption="Change the Portage profile"> |
| 142 | # <i>cd /etc</i> |
175 | # <i>cd /etc</i> |
| 143 | # <i>rm make.profile</i> |
176 | # <i>rm make.profile</i> |
| 144 | # <i>ln -s ../usr/portage/profiles/default-x86-1.4 make.profile</i> <codenote>Replace "x86" with your architecture</codenote> |
177 | <comment>(Replace "x86" with your architecture)</comment> |
|
|
178 | # <i>ln -s ../usr/portage/profiles/default-x86-1.4 make.profile</i> |
| 145 | </pre> |
179 | </pre> |
| 146 | |
180 | |
| 147 | <pre> |
181 | <pre caption="Change the GCC profile"> |
| 148 | # <i>gcc-config --list-profiles</i> <codenote>Note the one for the version you just emerged, use it below</codenote> |
182 | <comment>(Note the one for the version you just emerged, use it below)</comment> |
| 149 | # <i>gcc-config i686-pc-linux-gnu-3.2.2</i> <codenote>Replace with the version you noted above</codenote> |
183 | # <i>gcc-config --list-profiles</i> |
|
|
184 | <comment>(Replace with the version you noted above)</comment> |
|
|
185 | # <i>gcc-config i686-pc-linux-gnu-3.2.2</i> |
| 150 | </pre> |
186 | </pre> |
|
|
187 | |
| 151 | </body> |
188 | </body> |
| 152 | </section> |
189 | </section> |
| 153 | <section> |
190 | <section> |
| 154 | <title>Recompile toolchain</title> |
191 | <title>Recompile toolchain</title> |
| 155 | <body> |
192 | <body> |
|
|
193 | |
|
|
194 | <p> |
| 156 | <p>Now you need to recompile your core toolchain with your new |
195 | Now you need to recompile your core toolchain with your new compiler. If you |
| 157 | compiler. If you are continuing in the same shell, you need |
196 | are continuing in the same shell, you need to run <c>source /etc/profile</c> as |
| 158 | to run <c>source /etc/profile</c> as gcc-config instructed you |
|
|
| 159 | to. Then emerge glibc and binutils using your new |
197 | gcc-config instructed you to. Then emerge glibc and binutils using your new |
| 160 | compiler:</p> |
198 | compiler: |
| 161 | <pre> |
199 | </p> |
|
|
200 | |
|
|
201 | <pre caption="Rebuilding the toolchain"> |
| 162 | # <i>emerge glibc binutils</i> |
202 | # <i>emerge glibc binutils</i> |
| 163 | </pre> |
203 | </pre> |
|
|
204 | |
|
|
205 | <warn> |
| 164 | <warn>It is quite likely that you will upgrade glibc from a |
206 | It is quite likely that you will upgrade glibc from a 2.2 or older version to |
| 165 | 2.2 or older version to 2.3. Do not downgrade glibc |
207 | 2.3. Do not downgrade glibc afterwards. Any software you have compiled against |
| 166 | afterwards. Any software you have compiled against glibc 2.3 |
|
|
| 167 | will stop working, and this can make your system |
208 | glibc 2.3 will stop working, and this can make your system unusable. |
| 168 | unusable.</warn> |
209 | </warn> |
|
|
210 | |
| 169 | </body> |
211 | </body> |
| 170 | </section> |
212 | </section> |
| 171 | <section> |
213 | <section> |
| 172 | <title>Recompiling everything with your new compiler</title> |
214 | <title>Recompiling everything with your new compiler</title> |
|
|
215 | <body> |
|
|
216 | |
|
|
217 | <p> |
| 173 | <body><p>Now you may recompile everything on your system with |
218 | Now you may recompile everything on your system with your new compiler: |
| 174 | your new compiler:</p> |
219 | </p> |
| 175 | <pre> |
220 | |
|
|
221 | <pre caption="Rebuilding the entire system"> |
| 176 | # <i>emerge -e world</i> |
222 | # <i>emerge -e world</i> |
| 177 | </pre> |
223 | </pre> |
|
|
224 | |
|
|
225 | <note> |
| 178 | <note>If this command fails at any point due to errors, you |
226 | If this command fails at any point due to errors, you |
| 179 | can use <c>emerge --resume</c> to continue the process where |
227 | can use <c>emerge --resume</c> to continue the process where |
| 180 | you left off. This requires Portage 2.0.47 or later.</note> |
228 | you left off. This requires Portage 2.0.47 or later. |
|
|
229 | </note> |
|
|
230 | |
| 181 | </body> |
231 | </body> |
| 182 | </section> |
232 | </section> |
| 183 | </chapter> |
233 | </chapter> |
| 184 | </guide> |
234 | </guide> |
| 185 | |
|
|
| 186 | |
|
|
| 187 | |
|
|