GNU/kFreeBSD explained

Steven Chamberlain <steven@pyro.eu.org>

?DebConf15, Heidelberg

Overview

Overview

Some history

Some history

Some history

ZFS backup strategy

ZFS backup strategy

    NAME USED - REFER -

    tank/srv/mail@autosnap-2014-11-10 19.2G - 154G -
    tank/srv/mail@autosnap-2015-03-18 8.33G - 185G -
    tank/srv/mail@autosnap-2015-05-21 6.69G - 203G -
    tank/srv/mail@autosnap-2015-06-22 6.37G - 210G -
    tank/srv/mail@autosnap-2015-07-24 3.32G - 225G -
    tank/srv/mail@autosnap-2015-08-01 2.70G - 227G -
    tank/srv/mail@autosnap-2015-08-05 2.44G - 228G -
    tank/srv/mail@autosnap-2015-08-07 1.58G - 229G -
    tank/srv/mail@autosnap-2015-08-09 445M - 229G -
    tank/srv/mail@autosnap-2015-08-10 145M - 229G -

In production

For jessie

Releasing jessie-kfreebsd

New in jessie-kfreebsd

The GNU/kFreeBSD desktop

How jessie-kfreebsd works

How jessie-kfreebsd works

        deb http://httpredir.debian.org/debian jessie-kfreebsd main
        deb-src http://httpredir.debian.org/debian jessie-kfreebsd main

        deb http://security.debian.org/ jessie-kfreebsd/updates main
        deb-src http://security.debian.org/ jessie-kfreebsd/updates main

How the userland is structured

Patterns to avoid

        #define PLATFORM gnukfreebsd

        #ifdef linux
        ...
        #elif __FreeBSD__
        ...
        #elif __DragonFly__
        ...
        #elif __GNU_kFreeBSD__ /* Please don't do this! */
        ...
        #endif

Slightly better

        #ifdef __linux__
        ...
        #else
        ...
        #endif

        #ifdef __GLIBC__
        ...
        #else
        ...
        #endif

Ideally

        #ifdef HAVE_DTRACE
        ...
        #endif

Worst-case scenario

        #include <linux/cdrom.h>
        #include <linux/fd.h>
        #include <sys/mount.h>
        #include <scsi/scsi.h>
        #include <scsi/sg.h>
        #include <scsi/scsi_ioctl.h>

Package porting example

My own objectives

  1. Support old hardware for as long as possible:
    • floppy drives, tape drives, ISA network cards - whatever our users might have;
    • hardware can be useful, for as long as we provide a stable OS for it;
    • be an alternative for any situation where Linux has issues, and to help in debugging those issues.

My own objectives

  1. Allow old software and installed systems to exist for as long as possible:
    • rewriting application software costs time and effort
    • FreeBSD users often follow a stable branch for many years;
    • Debian LTS was a really good idea.
    • Would like to ease migration of FreeBSD systems to Debian, or vice-versa.
  2. Retain familiarity, expertise:
    • it's annoying to need to be required to learn new systems;
    • developing for POSIX, how to administer UNIX systems, and System V init, are well understood by many people; and whole shelves of books explain them.

My own opinions

Diversity in free software is good

What's next?