Contents
building d-i on GNU/kFreeBSD
introduction
goal
Building d-i on GNU/kFreeBSD should be as simple as on GNU/Linux, i.e.
$ svn co svn://svn.debian.org/svn/d-i/trunk/installer/build/ $ cd build/ $ make all_clean && make reallyclean && fakeroot make build_monolithic # or build_netboot
This section contains instructions on how to build d-i on GNU/kFreeBSD dealing with
- code in kfreebsd d-i branch not merged in trunk
- short term solutions
- not uploaded udebs (kernel)
- patches not in Debian packages
- patches not merged upstream
These are all bad things, and should be fixed, and the content of this section should be eventually removed.
assumptions
- unstable Debian GNU/kFreeBSD amd64 or i386 installed
both deb and deb-src lines in /etc/apt/sources.list from official archive, i.e. debian-ports.org
dependencies between tasks
All tasks described here should be indipendent from each other unless differently specified.
localudebs
GNU Parted
Building GNU Parted udeb is described here.
This custom instructions are needed because of patches not merged in the parted Debian package yet.
$ mkdir sandbox && cd sandbox/ # creating a working dir and jumping in it $ apt-get source parted # fetching source
This will create a "sandbox/parted-1.8.8.git.2009.07.19" dir.
Download all the patches from http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/d-i/parted/unstable/ into the "sandbox/parted-1.8.8.git.2009.07.19" dir.
From "sandbox/parted-1.8.8.git.2009.07.19":
$ for x in *.diff; do patch -p1 < $x; done # applying all patches $ dpkg-checkbuilddeps # ensure build-deps are satisfied! $ dpkg-buildpackage -tc # building the package
This will create (among other files) libparted1.8-udeb_1.8.8.git.2009.07.19-4_kfreebsd-i386.udeb.
references
BusyBox
Building BusyBox udeb is described here.
$ mkdir sandbox && cd sandbox/ # creating a working dir and jumping in it $ apt-get source busybox # fetching source
This will create a "sandbox/busybox-1.14.2" dir.
Download all the patches from http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian/ and its "already_upstream" subdir into the "sandbox/busybox-1.14.2" dir.
From "sandbox/busybox-1.14.2":
$ for x in *.diff; do patch -p1 < $x; done # applying all patches $ cd debian/config/ $ cp udeb deb && cp udeb static # building deb and static with the same config of udeb $ cd ../../ $ dpkg-checkbuilddeps # ensure build-deps are satisfied! $ dpkg-buildpackage -tc # building the package
This will create (among other files) busybox-udeb_1.14.2-2_kfreebsd-i386.udeb.
references
TODO
- clean the patches that are too hackish (as the mount/umount ones)
- port patches to upstream master (long term goal)
- include patches in Debian package (medium term goal)
- merge patches upstream (long term goal)
At http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.13/debian/to_review/debian.rules.config_os_split.diff there is a draft patch to split linux/kfreebsd config files (if needed).
temporary info
-- LucaFavatella 2009-08-12 15:12:33 BusyBox 1.14 is in unstable. A couple of GNU/kFreeBSD BusyBox patches
- were previously merged upstream
were backported to 1.14 Debian package http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian/already_upstream/
- are not in upstream 1.14, and are not in its Debian package
freebsd-net-tools
Building freebsd-net-tools udeb is described here.
This udeb is needed to provide "ifconfig" and "route" commands in d-i, as a short term solution until BusyBox "ip" applet is ported.
Not to be merged patch
The patch to build freebsd-net-tools udeb is not expected to be merged in freebsd-utils Debian package. Please port BusyBox "ip" applet instead.
$ mkdir sandbox && cd sandbox/ # creating a working dir and jumping in it $ apt-get source freebsd-utils # fetching source $ cd freebsd-utils-7.2/ # jumping in source dir $ wget http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/d-i/freebsd-net-tools-udeb.diff # downloading needed patch $ patch -p1 < freebsd-net-tools-udeb.diff # applying patch $ dpkg-checkbuilddeps # ensure build-deps are satisfied! $ dpkg-buildpackage -tc # building the package
This will create (among other files) freebsd-net-tools-udeb_7.2-7_kfreebsd-i386.udeb.
ISC DHCP client
Building ISC DHCP client udeb is described here.
Not to be merged patch
The modified dhclient-script.udeb is not expected to be merged in dhcp3-client Debian package. Please port BusyBox "ip" applet instead.
$ mkdir sandbox && cd sandbox/ # creating a working dir and jumping in it $ apt-get source dhcp3-client # fetching source $ cd dhcp3-3.1.2p1/ # jumping in source dir $ wget http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/d-i/dhclient-script.udeb # downloading needed file $ cp dhclient-script.udeb debian/dhclient-script.udeb # substituting file $ dpkg-checkbuilddeps # ensure build-deps are satisfied! $ dpkg-buildpackage -tc # building the package
This will create (among other files) dhcp3-client-udeb_3.1.2p1-1_kfreebsd-i386.udeb.
others
For all others packages, running
$ svn co svn://svn.debian.org/svn/d-i/trunk/packages/[path]
and then
$ dpkg-buildpackage -tc
should suffice; if not, looking if there is a HACKING file or similar should help.
d-i image
Building d-i image is described here; in particular, monolithic is described (netboot should not work because of udebs fetched from the net instead of localeudebs).
This task depends on all the previous ones.
$ svn co svn://svn.debian.org/svn/d-i/branches/d-i/kfreebsd/installer/build/ # fetching source
Copy in build/localeudebs/:
- base-installer
- bootstrap-base
- busybox-udeb
- dhcp3-client-udeb
- di-utils
- freebsd-net-tools-udeb
- libparted1.8-udeb
- netcfg
- netcfg-static
- partman-basicfilesystems
- partman-target
- partman-ufs
-- LucaFavatella 2009-08-12 17:05:32 The output of the following command is helpful to understand which packages to build
$ svn diff svn://svn.debian.org/svn/d-i/trunk/packages@60128 svn://svn.debian.org/svn/d-i/branches/d-i/kfreebsd/packages@60128 | grep Index > 60128.indices
See #localudebs for their build instructions.
$ make all_clean && make reallyclean && fakeroot make build_monolithic # (or build_netboot) # building
This will create (among other files) build/dest/monolithic/mini.iso.
references
bugs and missing features
bugs
- installation report fails
missing features
- UTF-8 console and features
keyboard configuration (workaround: run $ dpkg-reconfigure kbdcontrol after rebooting on the installed system)
- support for xfs
- support for efi
- support for gpt disk label
- installation from CD-ROM
- missings udebs (list TBD)
- support for boot options
little things to do
parted: delete debian/patches/kfreebsd-gnu.dpatch
In GNU parted Debian package, debian/patches/kfreebsd-gnu.dpatch can be completely removed. See http://git.debian.org/?p=parted/debian/parted.git;a=commit;h=93991bd9a0ebd8051f3efbe11584472b70859092.
