Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target...

78
pkgbase: Are we there yet ? Emmanuel Vadot [email protected] EuroBSDCon Lillehammer, Norway September 19 – 22, 2019

Transcript of Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target...

Page 1: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

pkgbase: Are we there yet ?

Emmanuel [email protected]

EuroBSDConLillehammer, Norway

September 19 – 22, 2019

Page 2: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Who am I

I Emmanuel Vadot ([email protected])

I FreeBSD user since 2004

I FreeBSD src commiter since 2016

I FreeBSD ports commiter since 2018

I Freelance developer

Page 3: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

What is pkgbase ?

I Using pkg(8) for packaging and updating base

I pkg(8) is the default package manager since FreeBSD 10.0

I Splits base into multiple packages

I Started in 2015 (yeah ...) by bapt@

Page 4: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

What is pkgbase ?

I Using pkg(8) for packaging and updating base

I pkg(8) is the default package manager since FreeBSD 10.0

I Splits base into multiple packages

I Started in 2015 (yeah ...) by bapt@

Page 5: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

What is pkgbase ?

I Using pkg(8) for packaging and updating base

I pkg(8) is the default package manager since FreeBSD 10.0

I Splits base into multiple packages

I Started in 2015 (yeah ...) by bapt@

Page 6: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

What is pkgbase ?

I Using pkg(8) for packaging and updating base

I pkg(8) is the default package manager since FreeBSD 10.0

I Splits base into multiple packages

I Started in 2015 (yeah ...) by bapt@

Page 7: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Goals

I Binary upgrades for RELEASE, STABLE and CURRENT

I Fine grain installation (no sendmail, no toolchain etc ...)

I Let pkg(8) deal with conf file updates

I Allow developers to provide package for users to test

Page 8: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Goals

I Binary upgrades for RELEASE, STABLE and CURRENT

I Fine grain installation (no sendmail, no toolchain etc ...)

I Let pkg(8) deal with conf file updates

I Allow developers to provide package for users to test

Page 9: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Goals

I Binary upgrades for RELEASE, STABLE and CURRENT

I Fine grain installation (no sendmail, no toolchain etc ...)

I Let pkg(8) deal with conf file updates

I Allow developers to provide package for users to test

Page 10: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Goals

I Binary upgrades for RELEASE, STABLE and CURRENT

I Fine grain installation (no sendmail, no toolchain etc ...)

I Let pkg(8) deal with conf file updates

I Allow developers to provide package for users to test

Page 11: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Goals (2)

I In the build system (make packages)

I Run as user

I Cross arch creation of packages

I I want people to create FreeBSD “distros”

Page 12: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Goals (2)

I In the build system (make packages)

I Run as user

I Cross arch creation of packages

I I want people to create FreeBSD “distros”

Page 13: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Goals (2)

I In the build system (make packages)

I Run as user

I Cross arch creation of packages

I I want people to create FreeBSD “distros”

Page 14: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Goals (2)

I In the build system (make packages)

I Run as user

I Cross arch creation of packages

I I want people to create FreeBSD “distros”

Page 15: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How packages are generated

I Install a “fake” root during target worldstage/kernelstage

I Uses -DNO ROOT and METALOG (mtree file)

I Add tags into the METALOG with the destination package

I Defaults to FreeBSD-utilities package

I Makefiles can override the package with PACKAGE=XXX

I ucls (package definition) are in release/packages

I plist (package content) automatically generated

I Package and repository are created by make packages target

Page 16: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How packages are generated

I Install a “fake” root during target worldstage/kernelstage

I Uses -DNO ROOT and METALOG (mtree file)

I Add tags into the METALOG with the destination package

I Defaults to FreeBSD-utilities package

I Makefiles can override the package with PACKAGE=XXX

I ucls (package definition) are in release/packages

I plist (package content) automatically generated

I Package and repository are created by make packages target

Page 17: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How packages are generated

I Install a “fake” root during target worldstage/kernelstage

I Uses -DNO ROOT and METALOG (mtree file)

I Add tags into the METALOG with the destination package

I Defaults to FreeBSD-utilities package

I Makefiles can override the package with PACKAGE=XXX

I ucls (package definition) are in release/packages

I plist (package content) automatically generated

I Package and repository are created by make packages target

Page 18: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How packages are generated

I Install a “fake” root during target worldstage/kernelstage

I Uses -DNO ROOT and METALOG (mtree file)

I Add tags into the METALOG with the destination package

I Defaults to FreeBSD-utilities package

I Makefiles can override the package with PACKAGE=XXX

I ucls (package definition) are in release/packages

I plist (package content) automatically generated

I Package and repository are created by make packages target

Page 19: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How packages are generated

I Install a “fake” root during target worldstage/kernelstage

I Uses -DNO ROOT and METALOG (mtree file)

I Add tags into the METALOG with the destination package

I Defaults to FreeBSD-utilities package

I Makefiles can override the package with PACKAGE=XXX

I ucls (package definition) are in release/packages

I plist (package content) automatically generated

I Package and repository are created by make packages target

Page 20: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How packages are generated

I Install a “fake” root during target worldstage/kernelstage

I Uses -DNO ROOT and METALOG (mtree file)

I Add tags into the METALOG with the destination package

I Defaults to FreeBSD-utilities package

I Makefiles can override the package with PACKAGE=XXX

I ucls (package definition) are in release/packages

I plist (package content) automatically generated

I Package and repository are created by make packages target

Page 21: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How packages are generated

I Install a “fake” root during target worldstage/kernelstage

I Uses -DNO ROOT and METALOG (mtree file)

I Add tags into the METALOG with the destination package

I Defaults to FreeBSD-utilities package

I Makefiles can override the package with PACKAGE=XXX

I ucls (package definition) are in release/packages

I plist (package content) automatically generated

I Package and repository are created by make packages target

Page 22: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How packages are generated

I Install a “fake” root during target worldstage/kernelstage

I Uses -DNO ROOT and METALOG (mtree file)

I Add tags into the METALOG with the destination package

I Defaults to FreeBSD-utilities package

I Makefiles can override the package with PACKAGE=XXX

I ucls (package definition) are in release/packages

I plist (package content) automatically generated

I Package and repository are created by make packages target

Page 23: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How base is split

I Current split isn’t final

I FreeBSD-kernel-$kernconf : Each Kernel in its own package(based on the config)

I FreeBSD-bootloader contain bootloaders and configurationfiles (lua or forth)

I FreeBSD-clibs contain the C runtime (ld-elf.so.1, libc, libthretc ...)

I FreeBSD-runtime contain everything for booting to single userand repair an installation

I FreeBSD-rc contain the rc subsystem

I FreeBSD-utilities is the default package so contain a lot ofdifferent thing

I Some stuff will be moved out of it

Page 24: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How base is split

I Current split isn’t final

I FreeBSD-kernel-$kernconf : Each Kernel in its own package(based on the config)

I FreeBSD-bootloader contain bootloaders and configurationfiles (lua or forth)

I FreeBSD-clibs contain the C runtime (ld-elf.so.1, libc, libthretc ...)

I FreeBSD-runtime contain everything for booting to single userand repair an installation

I FreeBSD-rc contain the rc subsystem

I FreeBSD-utilities is the default package so contain a lot ofdifferent thing

I Some stuff will be moved out of it

Page 25: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How base is split

I Current split isn’t final

I FreeBSD-kernel-$kernconf : Each Kernel in its own package(based on the config)

I FreeBSD-bootloader contain bootloaders and configurationfiles (lua or forth)

I FreeBSD-clibs contain the C runtime (ld-elf.so.1, libc, libthretc ...)

I FreeBSD-runtime contain everything for booting to single userand repair an installation

I FreeBSD-rc contain the rc subsystem

I FreeBSD-utilities is the default package so contain a lot ofdifferent thing

I Some stuff will be moved out of it

Page 26: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How base is split

I Current split isn’t final

I FreeBSD-kernel-$kernconf : Each Kernel in its own package(based on the config)

I FreeBSD-bootloader contain bootloaders and configurationfiles (lua or forth)

I FreeBSD-clibs contain the C runtime (ld-elf.so.1, libc, libthretc ...)

I FreeBSD-runtime contain everything for booting to single userand repair an installation

I FreeBSD-rc contain the rc subsystem

I FreeBSD-utilities is the default package so contain a lot ofdifferent thing

I Some stuff will be moved out of it

Page 27: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How base is split

I Current split isn’t final

I FreeBSD-kernel-$kernconf : Each Kernel in its own package(based on the config)

I FreeBSD-bootloader contain bootloaders and configurationfiles (lua or forth)

I FreeBSD-clibs contain the C runtime (ld-elf.so.1, libc, libthretc ...)

I FreeBSD-runtime contain everything for booting to single userand repair an installation

I FreeBSD-rc contain the rc subsystem

I FreeBSD-utilities is the default package so contain a lot ofdifferent thing

I Some stuff will be moved out of it

Page 28: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How base is split

I Current split isn’t final

I FreeBSD-kernel-$kernconf : Each Kernel in its own package(based on the config)

I FreeBSD-bootloader contain bootloaders and configurationfiles (lua or forth)

I FreeBSD-clibs contain the C runtime (ld-elf.so.1, libc, libthretc ...)

I FreeBSD-runtime contain everything for booting to single userand repair an installation

I FreeBSD-rc contain the rc subsystem

I FreeBSD-utilities is the default package so contain a lot ofdifferent thing

I Some stuff will be moved out of it

Page 29: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How base is split

I Current split isn’t final

I FreeBSD-kernel-$kernconf : Each Kernel in its own package(based on the config)

I FreeBSD-bootloader contain bootloaders and configurationfiles (lua or forth)

I FreeBSD-clibs contain the C runtime (ld-elf.so.1, libc, libthretc ...)

I FreeBSD-runtime contain everything for booting to single userand repair an installation

I FreeBSD-rc contain the rc subsystem

I FreeBSD-utilities is the default package so contain a lot ofdifferent thing

I Some stuff will be moved out of it

Page 30: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How base is split

I Current split isn’t final

I FreeBSD-kernel-$kernconf : Each Kernel in its own package(based on the config)

I FreeBSD-bootloader contain bootloaders and configurationfiles (lua or forth)

I FreeBSD-clibs contain the C runtime (ld-elf.so.1, libc, libthretc ...)

I FreeBSD-runtime contain everything for booting to single userand repair an installation

I FreeBSD-rc contain the rc subsystem

I FreeBSD-utilities is the default package so contain a lot ofdifferent thing

I Some stuff will be moved out of it

Page 31: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How base is split

I Current split isn’t final

I FreeBSD-kernel-$kernconf : Each Kernel in its own package(based on the config)

I FreeBSD-bootloader contain bootloaders and configurationfiles (lua or forth)

I FreeBSD-clibs contain the C runtime (ld-elf.so.1, libc, libthretc ...)

I FreeBSD-runtime contain everything for booting to single userand repair an installation

I FreeBSD-rc contain the rc subsystem

I FreeBSD-utilities is the default package so contain a lot ofdifferent thing

I Some stuff will be moved out of it

Page 32: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How base is split (cont.)

I Every package is split with -debug -development -profilepackage

I On 64 bits arch with 32 bits support some -lib32 packages arecreated

I Every lib/programs from contrib/ in their own package (Easierfor SA/EN)

I FreeBSD-tests contain all the testsuite (should we put kyuathere ?)

I Other packages are application or lib specifics, e.g. :FreeBSD-bluetooth/FreeBSD-wpa/FreeBSD-ssh/FreeBSD-libarchive...

I Will continue to move things out of utilities when it makesense (nfs ? kerberos ?)

Page 33: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How base is split (cont.)

I Every package is split with -debug -development -profilepackage

I On 64 bits arch with 32 bits support some -lib32 packages arecreated

I Every lib/programs from contrib/ in their own package (Easierfor SA/EN)

I FreeBSD-tests contain all the testsuite (should we put kyuathere ?)

I Other packages are application or lib specifics, e.g. :FreeBSD-bluetooth/FreeBSD-wpa/FreeBSD-ssh/FreeBSD-libarchive...

I Will continue to move things out of utilities when it makesense (nfs ? kerberos ?)

Page 34: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How base is split (cont.)

I Every package is split with -debug -development -profilepackage

I On 64 bits arch with 32 bits support some -lib32 packages arecreated

I Every lib/programs from contrib/ in their own package (Easierfor SA/EN)

I FreeBSD-tests contain all the testsuite (should we put kyuathere ?)

I Other packages are application or lib specifics, e.g. :FreeBSD-bluetooth/FreeBSD-wpa/FreeBSD-ssh/FreeBSD-libarchive...

I Will continue to move things out of utilities when it makesense (nfs ? kerberos ?)

Page 35: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How base is split (cont.)

I Every package is split with -debug -development -profilepackage

I On 64 bits arch with 32 bits support some -lib32 packages arecreated

I Every lib/programs from contrib/ in their own package (Easierfor SA/EN)

I FreeBSD-tests contain all the testsuite (should we put kyuathere ?)

I Other packages are application or lib specifics, e.g. :FreeBSD-bluetooth/FreeBSD-wpa/FreeBSD-ssh/FreeBSD-libarchive...

I Will continue to move things out of utilities when it makesense (nfs ? kerberos ?)

Page 36: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How base is split (cont.)

I Every package is split with -debug -development -profilepackage

I On 64 bits arch with 32 bits support some -lib32 packages arecreated

I Every lib/programs from contrib/ in their own package (Easierfor SA/EN)

I FreeBSD-tests contain all the testsuite (should we put kyuathere ?)

I Other packages are application or lib specifics, e.g. :FreeBSD-bluetooth/FreeBSD-wpa/FreeBSD-ssh/FreeBSD-libarchive...

I Will continue to move things out of utilities when it makesense (nfs ? kerberos ?)

Page 37: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How base is split (cont.)

I Every package is split with -debug -development -profilepackage

I On 64 bits arch with 32 bits support some -lib32 packages arecreated

I Every lib/programs from contrib/ in their own package (Easierfor SA/EN)

I FreeBSD-tests contain all the testsuite (should we put kyuathere ?)

I Other packages are application or lib specifics, e.g. :FreeBSD-bluetooth/FreeBSD-wpa/FreeBSD-ssh/FreeBSD-libarchive...

I Will continue to move things out of utilities when it makesense (nfs ? kerberos ?)

Page 38: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How base is split (cont.)

I Every package is split with -debug -development -profilepackage

I On 64 bits arch with 32 bits support some -lib32 packages arecreated

I Every lib/programs from contrib/ in their own package (Easierfor SA/EN)

I FreeBSD-tests contain all the testsuite (should we put kyuathere ?)

I Other packages are application or lib specifics, e.g. :FreeBSD-bluetooth/FreeBSD-wpa/FreeBSD-ssh/FreeBSD-libarchive...

I Will continue to move things out of utilities when it makesense (nfs ? kerberos ?)

Page 39: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Number of packages

I It apparently matters to some people

I It matters to me only for time spent installing/upgrading

I Total : 392 (529MB with xz compression)

I Current count without -debug/-development/-profile : 118(158MB with xz compression)

I Current count without -debug/-development/-profile/-lib32 :80 (150MB with xz compression)

I Number of packages will only go up starting now

Page 40: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Number of packages

I It apparently matters to some people

I It matters to me only for time spent installing/upgrading

I Total : 392 (529MB with xz compression)

I Current count without -debug/-development/-profile : 118(158MB with xz compression)

I Current count without -debug/-development/-profile/-lib32 :80 (150MB with xz compression)

I Number of packages will only go up starting now

Page 41: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Number of packages

I It apparently matters to some people

I It matters to me only for time spent installing/upgrading

I Total : 392 (529MB with xz compression)

I Current count without -debug/-development/-profile : 118(158MB with xz compression)

I Current count without -debug/-development/-profile/-lib32 :80 (150MB with xz compression)

I Number of packages will only go up starting now

Page 42: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Number of packages

I It apparently matters to some people

I It matters to me only for time spent installing/upgrading

I Total : 392 (529MB with xz compression)

I Current count without -debug/-development/-profile : 118(158MB with xz compression)

I Current count without -debug/-development/-profile/-lib32 :80 (150MB with xz compression)

I Number of packages will only go up starting now

Page 43: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Number of packages

I It apparently matters to some people

I It matters to me only for time spent installing/upgrading

I Total : 392 (529MB with xz compression)

I Current count without -debug/-development/-profile : 118(158MB with xz compression)

I Current count without -debug/-development/-profile/-lib32 :80 (150MB with xz compression)

I Number of packages will only go up starting now

Page 44: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Number of packages

I It apparently matters to some people

I It matters to me only for time spent installing/upgrading

I Total : 392 (529MB with xz compression)

I Current count without -debug/-development/-profile : 118(158MB with xz compression)

I Current count without -debug/-development/-profile/-lib32 :80 (150MB with xz compression)

I Number of packages will only go up starting now

Page 45: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

WITH /WITHOUT interaction

I WITH and WITHOUT control what we build (seesrc.conf(7))

I Some simply exclude one componant from the system(WITHOUT APM or WITHOUT AMD)

I Some change binaries (WITHOUT KERBEROS orWITHOUT CAPSICUM)

I No real solution for this now, we would need flavors like inports

Page 46: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

WITH /WITHOUT interaction

I WITH and WITHOUT control what we build (seesrc.conf(7))

I Some simply exclude one componant from the system(WITHOUT APM or WITHOUT AMD)

I Some change binaries (WITHOUT KERBEROS orWITHOUT CAPSICUM)

I No real solution for this now, we would need flavors like inports

Page 47: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

WITH /WITHOUT interaction

I WITH and WITHOUT control what we build (seesrc.conf(7))

I Some simply exclude one componant from the system(WITHOUT APM or WITHOUT AMD)

I Some change binaries (WITHOUT KERBEROS orWITHOUT CAPSICUM)

I No real solution for this now, we would need flavors like inports

Page 48: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

WITH /WITHOUT interaction

I WITH and WITHOUT control what we build (seesrc.conf(7))

I Some simply exclude one componant from the system(WITHOUT APM or WITHOUT AMD)

I Some change binaries (WITHOUT KERBEROS orWITHOUT CAPSICUM)

I No real solution for this now, we would need flavors like inports

Page 49: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How to bootstrap packages (the correct way)

I Define WITH REPRODUCIBLE BUILD in src.conf

I Define SOURCE DATE EPOCH in env

I Pass REPODIR to make(1)

I make packages

Page 50: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How to bootstrap packages (the correct way)

I Define WITH REPRODUCIBLE BUILD in src.conf

I Define SOURCE DATE EPOCH in env

I Pass REPODIR to make(1)

I make packages

Page 51: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How to bootstrap packages (the correct way)

I Define WITH REPRODUCIBLE BUILD in src.conf

I Define SOURCE DATE EPOCH in env

I Pass REPODIR to make(1)

I make packages

Page 52: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How to bootstrap packages (the correct way)

I Define WITH REPRODUCIBLE BUILD in src.conf

I Define SOURCE DATE EPOCH in env

I Pass REPODIR to make(1)

I make packages

Page 53: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How to bootstrap packages (the correct way)

I Define WITH REPRODUCIBLE BUILD in src.conf

I Define SOURCE DATE EPOCH in env

I Pass REPODIR to make(1)

I make packages

Page 54: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How to generate packages for -p updates

I Define WITH REPRODUCIBLE BUILD in src.conf

I Define SOURCE DATE EPOCH in env (same one as thebootstrap one)

I Pass PKG VERSION to make(1) (same value as the bootstrapone)

I Use a temporary REPODIR

I Compare packages with the bootstrap ones

I Regenerate package with new SOURCE DATE EPOCH andnew PKG VERSION

I rm packages from original repo, copy new ones and re-run pkgrepo

I User now only have to download/install package(s) affectedby the SA/EN

Page 55: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How to generate packages for -p updates

I Define WITH REPRODUCIBLE BUILD in src.conf

I Define SOURCE DATE EPOCH in env (same one as thebootstrap one)

I Pass PKG VERSION to make(1) (same value as the bootstrapone)

I Use a temporary REPODIR

I Compare packages with the bootstrap ones

I Regenerate package with new SOURCE DATE EPOCH andnew PKG VERSION

I rm packages from original repo, copy new ones and re-run pkgrepo

I User now only have to download/install package(s) affectedby the SA/EN

Page 56: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How to generate packages for -p updates

I Define WITH REPRODUCIBLE BUILD in src.conf

I Define SOURCE DATE EPOCH in env (same one as thebootstrap one)

I Pass PKG VERSION to make(1) (same value as the bootstrapone)

I Use a temporary REPODIR

I Compare packages with the bootstrap ones

I Regenerate package with new SOURCE DATE EPOCH andnew PKG VERSION

I rm packages from original repo, copy new ones and re-run pkgrepo

I User now only have to download/install package(s) affectedby the SA/EN

Page 57: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How to generate packages for -p updates

I Define WITH REPRODUCIBLE BUILD in src.conf

I Define SOURCE DATE EPOCH in env (same one as thebootstrap one)

I Pass PKG VERSION to make(1) (same value as the bootstrapone)

I Use a temporary REPODIR

I Compare packages with the bootstrap ones

I Regenerate package with new SOURCE DATE EPOCH andnew PKG VERSION

I rm packages from original repo, copy new ones and re-run pkgrepo

I User now only have to download/install package(s) affectedby the SA/EN

Page 58: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How to generate packages for -p updates

I Define WITH REPRODUCIBLE BUILD in src.conf

I Define SOURCE DATE EPOCH in env (same one as thebootstrap one)

I Pass PKG VERSION to make(1) (same value as the bootstrapone)

I Use a temporary REPODIR

I Compare packages with the bootstrap ones

I Regenerate package with new SOURCE DATE EPOCH andnew PKG VERSION

I rm packages from original repo, copy new ones and re-run pkgrepo

I User now only have to download/install package(s) affectedby the SA/EN

Page 59: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How to generate packages for -p updates

I Define WITH REPRODUCIBLE BUILD in src.conf

I Define SOURCE DATE EPOCH in env (same one as thebootstrap one)

I Pass PKG VERSION to make(1) (same value as the bootstrapone)

I Use a temporary REPODIR

I Compare packages with the bootstrap ones

I Regenerate package with new SOURCE DATE EPOCH andnew PKG VERSION

I rm packages from original repo, copy new ones and re-run pkgrepo

I User now only have to download/install package(s) affectedby the SA/EN

Page 60: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How to generate packages for -p updates

I Define WITH REPRODUCIBLE BUILD in src.conf

I Define SOURCE DATE EPOCH in env (same one as thebootstrap one)

I Pass PKG VERSION to make(1) (same value as the bootstrapone)

I Use a temporary REPODIR

I Compare packages with the bootstrap ones

I Regenerate package with new SOURCE DATE EPOCH andnew PKG VERSION

I rm packages from original repo, copy new ones and re-run pkgrepo

I User now only have to download/install package(s) affectedby the SA/EN

Page 61: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How to generate packages for -p updates

I Define WITH REPRODUCIBLE BUILD in src.conf

I Define SOURCE DATE EPOCH in env (same one as thebootstrap one)

I Pass PKG VERSION to make(1) (same value as the bootstrapone)

I Use a temporary REPODIR

I Compare packages with the bootstrap ones

I Regenerate package with new SOURCE DATE EPOCH andnew PKG VERSION

I rm packages from original repo, copy new ones and re-run pkgrepo

I User now only have to download/install package(s) affectedby the SA/EN

Page 62: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

How to generate packages for -p updates

I Define WITH REPRODUCIBLE BUILD in src.conf

I Define SOURCE DATE EPOCH in env (same one as thebootstrap one)

I Pass PKG VERSION to make(1) (same value as the bootstrapone)

I Use a temporary REPODIR

I Compare packages with the bootstrap ones

I Regenerate package with new SOURCE DATE EPOCH andnew PKG VERSION

I rm packages from original repo, copy new ones and re-run pkgrepo

I User now only have to download/install package(s) affectedby the SA/EN

Page 63: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

pkg groups

I Meta-pkg at the repo level

I Installer install “FreeBSD-base” “FreeBSD-debug”“FreeBSD-lib32” etc ...

I New packages are installed automatically on update

I Multitiple candidates for one package (-noman, -nocapsicum)

Page 64: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

pkg groups

I Meta-pkg at the repo level

I Installer install “FreeBSD-base” “FreeBSD-debug”“FreeBSD-lib32” etc ...

I New packages are installed automatically on update

I Multitiple candidates for one package (-noman, -nocapsicum)

Page 65: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

pkg groups

I Meta-pkg at the repo level

I Installer install “FreeBSD-base” “FreeBSD-debug”“FreeBSD-lib32” etc ...

I New packages are installed automatically on update

I Multitiple candidates for one package (-noman, -nocapsicum)

Page 66: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

pkg groups

I Meta-pkg at the repo level

I Installer install “FreeBSD-base” “FreeBSD-debug”“FreeBSD-lib32” etc ...

I New packages are installed automatically on update

I Multitiple candidates for one package (-noman, -nocapsicum)

Page 67: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Current work

I bsdinstall support

I release image support

I kernel-select

I more packages split

Page 68: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Current work

I bsdinstall support

I release image support

I kernel-select

I more packages split

Page 69: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Current work

I bsdinstall support

I release image support

I kernel-select

I more packages split

Page 70: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Current work

I bsdinstall support

I release image support

I kernel-select

I more packages split

Page 71: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Future work

I Talk to re@ so we have official packages

I “freebsd-update”

I poudriere image support

Page 72: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Future work

I Talk to re@ so we have official packages

I “freebsd-update”

I poudriere image support

Page 73: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Future work

I Talk to re@ so we have official packages

I “freebsd-update”

I poudriere image support

Page 74: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Are we there yet ?

I Not yet but close

I Wanna help ?

I Still a few bugs in bsd.*.mk

I Test installing a minimal FreeBSD based pkgbase and installeach package separatly to test if everything is working

I [email protected]

Page 75: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Are we there yet ?

I Not yet but close

I Wanna help ?

I Still a few bugs in bsd.*.mk

I Test installing a minimal FreeBSD based pkgbase and installeach package separatly to test if everything is working

I [email protected]

Page 76: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Are we there yet ?

I Not yet but close

I Wanna help ?

I Still a few bugs in bsd.*.mk

I Test installing a minimal FreeBSD based pkgbase and installeach package separatly to test if everything is working

I [email protected]

Page 77: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Thanks

I Baptiste Daroussin ([email protected])

I Glen Barber ([email protected])

Page 78: Emmanuel Vadot manu@FreeBSD · How packages are generated I Install a \fake" root during target worldstage/kernelstage I Uses -DNO ROOT and METALOG (mtree le) I Add tags into the

Questions ?Emmanuel [email protected]

Twitter: @manuvadot