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

These are all bad things, and should be fixed, and the content of this section should be eventually removed.

assumptions

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

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

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/:

-- 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

missing features

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.

DebianInstaller/kFreeBSD (last edited 2009-10-12 20:48:09 by LucaFavatella)