/[gentoo]/xml/htdocs/doc/en/gentoo-freebsd.xml
Gentoo

Diff of /xml/htdocs/doc/en/gentoo-freebsd.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 Revision 1.4
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-freebsd.xml,v 1.2 2005/09/09 11:09:07 fox2mike Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-freebsd.xml,v 1.4 2005/09/11 16:27:55 cam Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 4
5<guide link="/doc/en/gentoo-freebsd.xml"> 5<guide link="/doc/en/gentoo-freebsd.xml">
6<title>A short guide to Gentoo/FreeBSD</title> 6<title>A short guide to Gentoo/FreeBSD</title>
7 7
26 26
27<!-- The content of this document is licensed under the CC-BY-SA license --> 27<!-- The content of this document is licensed under the CC-BY-SA license -->
28<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 28<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
29<license/> 29<license/>
30 30
31<version>1.1</version> 31<version>1.2</version>
32<date>2005-09-09</date> 32<date>2005-09-10</date>
33 33
34<chapter> 34<chapter>
35<title>Introduction to FreeBSD</title> 35<title>Introduction to FreeBSD</title>
36<section> 36<section>
37<title>What is FreeBSD?</title> 37<title>What is FreeBSD?</title>
55<section> 55<section>
56<title>What is Gentoo/FreeBSD?</title> 56<title>What is Gentoo/FreeBSD?</title>
57<body> 57<body>
58 58
59<p> 59<p>
60Gentoo/FreeBSD is an effort effort to provide a fully-capable FreeBSD operating 60Gentoo/FreeBSD is an effort to provide a fully-capable FreeBSD operating system
61system with Gentoo's design sensibilities. The long-term goal of the Gentoo/BSD 61with Gentoo's design sensibilities. The long-term goal of the Gentoo/BSD project
62project is to allow users to choose any combination of *BSD or Linux kernels, 62is to allow users to choose any combination of *BSD or Linux kernels, *BSD or
63*BSD or GNU libc, and *BSD or GNU userland tools. 63GNU libc, and *BSD or GNU userland tools.
64</p> 64</p>
65 65
66</body> 66</body>
67</section> 67</section>
68<section> 68<section>
79<ul> 79<ul>
80 <li> 80 <li>
81 Contrary to Linux, which actually only refers to the kernel, FreeBSD is a 81 Contrary to Linux, which actually only refers to the kernel, FreeBSD is a
82 complete operating system, consisting of a C library, userland tools and 82 complete operating system, consisting of a C library, userland tools and
83 much more. This development approach makes the overall system very 83 much more. This development approach makes the overall system very
84 consistent 84 consistent.
85 </li> 85 </li>
86 <li> 86 <li>
87 Contrary to the Linux kernel, FreeBSD development is not led by one person, 87 Contrary to the Linux kernel, FreeBSD development is not led by one person,
88 but instead managed by a small group of people called the <uri 88 but instead managed by a small group of people called the <uri
89 link="http://www.freebsd.org/doc/en_US.ISO8859-1/articles/contributors/staff-core.html">Core 89 link="http://www.freebsd.org/doc/en_US.ISO8859-1/articles/contributors/staff-core.html">Core
97joining the Gentoo/FreeBSD development effort: 97joining the Gentoo/FreeBSD development effort:
98</p> 98</p>
99 99
100<ul> 100<ul>
101 <li> 101 <li>
102 To get run-time dynamic linking fuctions like <c>dlopen()</c>, programs do 102 To get run-time dynamic linking functions like <c>dlopen()</c>, programs do
103 not need to be linked against libdl like on GNU/Linux. Instead they are 103 not need to be linked against libdl like on GNU/Linux. Instead they are
104 linked against libc 104 linked against libc.
105 </li> 105 </li>
106 <li> 106 <li>
107 FreeBSD doesn't have an official tool for kernel compilation, thus you'll 107 FreeBSD doesn't have an official tool for kernel compilation, thus you'll
108 have to resolve feature dependecies on your own 108 have to resolve feature dependencies on your own.
109 </li> 109 </li>
110 <li> 110 <li>
111 FreeBSD uses UFS/UFS-2 as its filesystems and has no official support for 111 FreeBSD uses UFS/UFS-2 as its filesystems and has no official support for
112 e.g. ReiserFS or XFS. However, there are projects for adding read-only 112 e.g. ReiserFS or XFS. However, there are projects for adding read-only
113 support for these filesystems. However, accessing ext2/ext3 partitions is 113 support for these filesystems. Accessing ext2/ext3 partitions is already
114 already possible, but you cannot install your system on them. 114 possible, but you cannot install your system on them.
115 </li> 115 </li>
116</ul> 116</ul>
117 117
118</body> 118</body>
119</section> 119</section>
169# <i>cp stage3-x86-fbsd-20050811.tar.bz2 /mnt/gfbsd/</i> 169# <i>cp stage3-x86-fbsd-20050811.tar.bz2 /mnt/gfbsd/</i>
170# <i>cd /mnt/gfbsd/</i> 170# <i>cd /mnt/gfbsd/</i>
171# <i>tar -jxvpf stage3-x86-fbsd-20050811.tar.bz2</i> 171# <i>tar -jxvpf stage3-x86-fbsd-20050811.tar.bz2</i>
172<comment>(You can delete the tarball with the following command if you want to.)</comment> 172<comment>(You can delete the tarball with the following command if you want to.)</comment>
173# <i>rm stage3-x86-fbsd-20050811.tar.bz2</i> 173# <i>rm stage3-x86-fbsd-20050811.tar.bz2</i>
174<comment>(Create a home directory for root.)</comment>
175# <i>mkdir /mnt/gfbsd/root</i>
176</pre>
177
178<p>
179Before chrooting into the newly-extracted stage, you first must obtain a copy of
180the Gentoo/FreeBSD overlay. If you are not a Gentoo developer, you can get it
181from the mirror provided by <mail link="carpaski@gentoo.org">Nick Jones</mail>.
182Theoretically, you could put this overlay in any directory you like, but from
183now on we will just assume that you have downloaded it to
184<path>/usr/local/portage/gentoo-freebsd</path>.
185</p>
186
187<pre caption="Getting the Gentoo/FreeBSD portage overlay">
188# <i>cvs -d:pserver:anonymous@zarquon.twobit.net:/var/cvsroot -q -z9 co -R gentoo-projects/bsd/fbsd/</i>
174</pre> 189</pre>
175 190
176<p> 191<p>
177In order for your install to work, you need to mount the <path>/dev</path> 192In order for your install to work, you need to mount the <path>/dev</path>
178filesystem from the currently running system into the Gentoo/FreeBSD mount 193filesystem from the currently running system into the Gentoo/FreeBSD mount
180</p> 195</p>
181 196
182<pre caption="Mounting the /dev filesystem and chrooting"> 197<pre caption="Mounting the /dev filesystem and chrooting">
183# <i>mount -t devfs none /mnt/gfbsd/dev/</i> 198# <i>mount -t devfs none /mnt/gfbsd/dev/</i>
184# <i>chroot /mnt/gfbsd/ /bin/bash</i> 199# <i>chroot /mnt/gfbsd/ /bin/bash</i>
185</pre>
186
187<p>
188Once inside the chroot you have to obtain a copy of the Gentoo/FreeBSD overlay.
189If you are not a Gentoo developer, you can get it from the mirror provided by
190<mail link="carpaski@gentoo.org">Nick Jones</mail>. Theoretically, you could
191put this overlay in any directory you like, but from now on we will just assume
192that you have downloaded it to <path>/usr/local/portage/gentoo-freebsd</path>.
193</p>
194
195<pre caption="Getting the Gentoo/FreeBSD portage overlay">
196# <i>cvs -d:pserver:anonymous@zarquon.twobit.net:/var/cvsroot -q -z9 co -R gentoo-projects/bsd/fbsd/</i>
197</pre> 200</pre>
198 201
199<p> 202<p>
200After you got hold of the Gentoo/FreeBSD overlay, it's time to link 203After you got hold of the Gentoo/FreeBSD overlay, it's time to link
201<path>/etc/make.profile</path> to the correct profile and add get your 204<path>/etc/make.profile</path> to the correct profile and add get your
205<pre caption="Setting up the profile and editing /etc/make.conf"> 208<pre caption="Setting up the profile and editing /etc/make.conf">
206# <i>ln -sf /usr/local/portage/gentoo-freebsd/profiles/default-bsd/fbsd/5.4/x86/ /etc/make.profile</i> 209# <i>ln -sf /usr/local/portage/gentoo-freebsd/profiles/default-bsd/fbsd/5.4/x86/ /etc/make.profile</i>
207<comment>(FreeBSD's standard editor is ee, which is used to edit /etc/make.conf)</comment> 210<comment>(FreeBSD's standard editor is ee, which is used to edit /etc/make.conf)</comment>
208# <i>ee /etc/make.conf</i> 211# <i>ee /etc/make.conf</i>
209<comment>(Please make sure you add at least the following entries:)</comment> 212<comment>(Please make sure you add at least the following entries:)</comment>
210CHOST="i686-gentoo-freebsd5.4" 213CHOST="i686-gentoo-freebsd5.4"
211ACCEPT_KEYWORDS="~x86-fbsd ~x86" 214ACCEPT_KEYWORDS="~x86-fbsd ~x86"
212FEATURES="-sandbox collision-protect" 215FEATURES="-sandbox collision-protect"
213PORTDIR_OVERLAY="/usr/local/portage/gentoo-freebsd" 216PORTDIR_OVERLAY="/usr/local/portage/gentoo-freebsd"
214</pre> 217</pre>
215 218
216<p> 219<p>
226After you have synchronised your Portage tree, you only have to take a few last 229After you have synchronised your Portage tree, you only have to take a few last
227steps before your Gentoo/FreeBSD system is ready to use. 230steps before your Gentoo/FreeBSD system is ready to use.
228</p> 231</p>
229 232
230<pre caption="Final configuration"> 233<pre caption="Final configuration">
231<comment>(Prevent crt1.o from getting removed by emerging gcc)</comment> 234<comment>(Prevent crt1.o from getting removed by emerging gcc.)</comment>
232# <i>chflags schg /usr/lib/crt1.o</i> 235# <i>chflags schg /usr/lib/crt1.o</i>
233<comment>(Emerge binary packages for binutils and patch provided by the stage3 tarball)</comment> 236<comment>(Update the binutils installed by the stage3 tarball.)</comment>
234# <i>emerge -K binutils patch</i> 237# <i>emerge -u binutils</i>
235<comment>(Select the correct gcc)</comment> 238<comment>(Select the correct gcc.)</comment>
236# <i>gcc-config 1</i> 239# <i>gcc-config 1</i>
240# <i>source /etc/profile</i>
241<comment>(Start the following script to fix a current bug in the stage3.)</comment>
242# <i>/usr/local/portage/gentoo-freebsd/scripts/domove.sh</i>
237<comment>(Re-emerging python, portage and py-freebsd)</comment> 243<comment>(Re-emerge python, portage and py-freebsd.)</comment>
238# <i>emerge --nodeps python portage py-freebsd</i> 244# <i>emerge --nodeps python portage py-freebsd</i>
239</pre> 245</pre>
246
247<note>
248After gcc-config you will notice a message about GCC-SPECS which you can safely
249ignore.
250</note>
240 251
241<p> 252<p>
242Congratulations, by the time you have reached this step you should have a 253Congratulations, by the time you have reached this step you should have a
243running Gentoo/FreeBSD system! If you want, you can now rebuild the system's 254running Gentoo/FreeBSD system! If you want, you can now rebuild the system's
244core packages. 255core packages.
293</chapter> 304</chapter>
294 305
295<chapter> 306<chapter>
296<title>Developing for Gentoo/FreeBSD</title> 307<title>Developing for Gentoo/FreeBSD</title>
297<section> 308<section>
298<title>How to help </title> 309<title>How to help</title>
299<body> 310<body>
300 311
301<p> 312<p>
302There are many things you could help with, depending on your skill level and 313There are many things you could help with, depending on your skill level and
303spare time: 314spare time:
304</p> 315</p>
305 316
306<ul> 317<ul>
307 <li> 318 <li>
308 We need GCC and binutils hackers who are able to port FreeBSD's patches to 319 We need GCC and binutils hackers who are able to port FreeBSD's patches to
309 the original versions of these tools provided by our main Portage tree 320 the original versions of these tools provided by our main Portage tree.
310 </li> 321 </li>
311 <li> 322 <li>
312 Working with userland ebuilds: this means working closely with other 323 Working with userland ebuilds: this means working closely with other
313 developers in order to have our changes/patches accepted into the main tree 324 developers in order to have our changes/patches accepted into the main tree.
314 </li> 325 </li>
315 <li> 326 <li>
316 Security: if you are into security, we need you! Although security 327 Security: if you are into security, we need you! Although security
317 advisories from the FreeBSD project are tracked and fixed, we can always 328 advisories from the FreeBSD project are tracked and fixed, we can always
318 use help in this area 329 use help in this area.
319 </li> 330 </li>
320 <li> 331 <li>
321 Contacts: we need people who can get in touch with FreeBSD developers to 332 Contacts: we need people who can get in touch with FreeBSD developers to
322 maintain contacts between us and the original project to exchange patches 333 maintain contacts between us and the original project to exchange patches
323 and discuss various problems and their solutions. Note that this should 334 and discuss various problems and their solutions. Note that this should
324 never involve any kind of spamming of mailing lists or IRC channels 335 never involve any kind of spamming of mailing lists or IRC channels.
325 </li> 336 </li>
326 <li> 337 <li>
327 Testing: the more people are actively using Gentoo/FreeBSD, the more bugs 338 Testing: the more people are actively using Gentoo/FreeBSD, the more bugs
328 will be discovered, which helps us improving the quality of the port. If 339 will be discovered, which helps us improving the quality of the port. If
329 you are good at describing bugs or problems, we definitely want to hear 340 you are good at describing bugs or problems, we definitely want to hear
330 from you 341 from you.
331 </li> 342 </li>
332 <li> 343 <li>
333 Other areas where we need help include: system ebuilds, baselayout, 344 Other areas where we need help include: system ebuilds, baselayout,
334 creation of installation CDs, documentation, kernel hacking. 345 creation of installation CDs, documentation, kernel hacking.
335 </li> 346 </li>
351 <li> 362 <li>
352 FreeBSD doesn't use the GNU autotools (autoconf, automake, autoheader). 363 FreeBSD doesn't use the GNU autotools (autoconf, automake, autoheader).
353 Instead, it uses its own implementation of <c>make</c>, putting 364 Instead, it uses its own implementation of <c>make</c>, putting
354 configuration options in external files and some .mk files that are 365 configuration options in external files and some .mk files that are
355 included with each Makefile. Although a lot of work has been put into 366 included with each Makefile. Although a lot of work has been put into
356 those .mk files, it is not hard to find some installations failling due to 367 those .mk files, it is not hard to find some installations failing due to
357 a missing <c>${INSTALL}&nbsp;-d</c> somewhere. The easy way to deal with 368 a missing <c>${INSTALL}&nbsp;-d</c> somewhere. The easy way to deal with
358 this kind of problem is to read the Makefile to find the accompanying .mk 369 this kind of problem is to read the Makefile to find the accompanying .mk
359 file, then open that file and try to figure out which part failed (this is 370 file, then open that file and try to figure out which part failed (this is
360 not really hard once you figure out where in the installation process it 371 not really hard once you figure out where in the installation process it
361 stopped) 372 stopped).
362 </li> 373 </li>
363 <li> 374 <li>
364 Besides, due to the fact that FreeBSD is a complete operating system, you 375 Besides, due to the fact that FreeBSD is a complete operating system, you
365 won't find things like a FreeBSD kernel tarball for download on a web site. 376 won't find things like a FreeBSD kernel tarball for download on a web site.
366 The system is meant to be concise, thus whenever you start making an ebuild 377 The system is meant to be concise, thus whenever you start making an ebuild
406<ul> 417<ul>
407 <li> 418 <li>
408 Some init scripts depend on the clock service which we don't provide right 419 Some init scripts depend on the clock service which we don't provide right
409 now. You can just remove it from the dependencies of the script and report 420 now. You can just remove it from the dependencies of the script and report
410 that on our <uri link="http://bugs.gentoo.org/">bugzilla</uri>. Please 421 that on our <uri link="http://bugs.gentoo.org/">bugzilla</uri>. Please
411 remember to use the "Gentoo BSD" product for your submission 422 remember to use the "Gentoo BSD" product for your submission.
412 </li> 423 </li>
413 <li> 424 <li>
414 Some ebuilds have hardcoded -ldl flags to link against libdl to get 425 Some ebuilds have hardcoded -ldl flags to link against libdl to get
415 <c>dlopen()</c>. This needs to be fixed 426 <c>dlopen()</c>. This needs to be fixed.
416 </li> 427 </li>
417 <li> 428 <li>
418 xorg-x11 6.8.99.14 and .15 won't build. Until this has been fixed, you can 429 xorg-x11 6.8.99.14 and .15 won't build. Until this has been fixed, you can
419 revert to xorg-x11-6.8.99.13. An ebuild can be obtained via <uri 430 revert to xorg-x11-6.8.99.13. An ebuild can be obtained via <uri
420 link="http://viewcvs.gentoo.org">ViewCVS</uri> 431 link="http://viewcvs.gentoo.org">ViewCVS</uri>.
421 </li> 432 </li>
422 <li>glib and gnome in general need a lot of fixes to be backported.</li> 433 <li>glib and gnome in general need a lot of fixes to be backported.</li>
423</ul> 434</ul>
424 435
425</body> 436</body>
430<title>Contact</title> 441<title>Contact</title>
431<section> 442<section>
432<body> 443<body>
433 444
434<p> 445<p>
435At list of Gentoo/FreeBSD developers can be found at the <uri 446A list of Gentoo/FreeBSD developers can be found at the <uri
436link="/proj/en/gentoo-alt/bsd/fbsd/">project page</uri>. Other ways to contact 447link="/proj/en/gentoo-alt/bsd/fbsd/">project page</uri>. Other ways to contact
437Gentoo/FreeBSD developers include our IRC Channel <c>#gentoo-bsd</c> on 448Gentoo/FreeBSD developers include our IRC Channel <c>#gentoo-bsd</c> on
438Freenode, as well as the mailing list <mail>gentoo-bsd@gentoo.org</mail>. To 449Freenode, as well as the mailing list <mail>gentoo-bsd@gentoo.org</mail>. To
439subscribe just send an empty email to 450subscribe just send an empty email to
440<mail>gentoo-bsd-subscribe@gentoo.org</mail> and follow the instructions 451<mail>gentoo-bsd-subscribe@gentoo.org</mail> and follow the instructions

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20