pkgsrc on mirbsd - fosdem · pkgsrc on mirbsd benny siegert ‹bsiegert@{mir,net}bsd.org› fosdem...

22
pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

Upload: others

Post on 29-Sep-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

pkgsrc on MirBSDBenny Siegert ‹bsiegert@{mir,net}bsd.org›

FOSDEM 2012

Page 2: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

Contents

1. Introduction

a. MirBSD

b. What is pkgsrc?

2. Comparison pkgsrc ↔ MirPorts

3. MirBSD as new pkgsrc platform

4. Conclusion

2

Page 3: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

Introduction

3

Page 4: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

What is MirOS / MirBSD?

• MirOS BSD or MirBSD: “a secureoperating system from the BSD family”, OpenBSD based

• The MirOS Project: Thorsten Glaser and me +contributors

• other software: mksh (shell), jupp (editor), PaxMirabilis (archiver), MirMake (build system), MirCksum, MirNroff, KWalletCLI, etc.

4

Page 5: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

What is pkgsrc?

• In GNU/Linux distributions, everything is a package.

• In BSD, the base system is a “single unit”.

• pkgsrc provides a way to install additional software not contained in the base system.

• over 11000 packages available

• made by the NetBSD project,runs on 16 different OSes

5

Page 6: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

Building from source• Before first use: run

/usr/pkgsrc/bootstrap/bootstrap

• Packages are organized in categories:/usr/pkgsrc/category/pkgname

• “bmake package-install” does everything:

• download

• extract, patch

• build

• create and install binary package6

Page 7: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

Stable branches

• four stable releases per year

• most recent was pkgsrc-2011Q4

• security team deals with vulnerable packages, fixes are “pulled up”

• automatically check for installed packages with known vulnerabilities

7

% pkg_admin fetch-pkg-vulnerabilities% pkg_admin audit

Page 8: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

Binary packages

• ftp.netbsd.org contains packages for many architectures and OSes

• set PKG_PATH: pkg_add automatically downloads packages for installation

• pkgin, nih: binary package managers provide apt-like functions

8

% export PKG_PATH=ftp://ftp.netbsd.org/pub/pkgsrc/packages/MirBSD/i386/10uAE_2011Q3/All% pkg_add screen

Page 9: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

Getting involved

• Mailing lists: [email protected], [email protected]

• Bug tracker: http://www.netbsd.org/support/query-pr.html

• low barrier to entry for new packages:pkgsrc-wip project on Sourceforge

• entries are added to pkgsrc after review

• For commit access to pkgsrc, you need to become a NetBSD developer.

9

Page 10: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

Back to MirBSD …

10

Page 11: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

MirPorts

• MirBSD also has MirPorts, with about the same goals as pkgsrc

• 2852 entries (>11000 for pkgsrc)

• many of the packages are in old versionsdue to lack of manpower

• But: several MirBSD-specific packages

• so we decided to join forces:pkgsrc as a complement / replacement (?)

11

Page 12: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

Terminology differences

12

MirPorts pkgsrc

port package

package binary package

package flavour package option

“faking” DESTDIR support

Page 13: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

Interesting MirPorts features

• cpan2port: recursively create packages for Perl modules

• mpczar: “normalized” archive format for VCS checkouts

• to allow checksumming

• VCS checkout instead of distfile

• cvs-1.12 with extensions

13

Page 14: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

How did we get MirBSD support?

14

Page 15: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

Beginning

15

• tg wrote basic patches in 2006.They were never applied.

• I revived them at 26C3 (Dec 2010).Important: personal contact with developers (joerg, wiz)

• First parts committed in January 2011.

Page 16: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

(cont.)

• Maintaining pkgsrc support is much easier as developer.

• At FOSDEM 2011: mbalmer proposes me to become a NetBSD developer, starts newdev process.

• Sponsored by Alistair G. Crooks (agc) and Guillaume Lasmayous (gls) – thanks!

16

Page 17: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

Becoming a NetBSD developer1. A developer proposes you to be added.

Two weeks for internal objections.

2. Two developers become your “sponsors”.

3. You fill out a questionnaire, internal discussion.

4. Your GPG key needs to be signed by two developers.

5. If accepted, you need to sign a contract with The NetBSD Foundation.

17

Page 18: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

Files touched

• bootstrap/bootstrap

• pkgtools/bootstrap-mk-files/files/mods/MirBSD.sys.mk

• mk/

• bsd.prefs.mk, pthread.builtin.mk

• platform/MirBSD.mk, tools/tools.MirBSD.mk

• configure/gnu-configure.mk: workaround

18

Page 19: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

More controversial changes

• It took about six more months for bootstrap without patches on MirBSD

• fixes for libfetch

• fix for incompatibilities between mkshand the bmake test suite

• libtool support

• In all cases: need OK from maintainers / authors

19

Page 20: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

Conclusion

20

Page 21: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

pkgsrc and MirBSD

21

• pkgsrc works well on MirBSD.

• last bulk build (2011Q3): 5850 packages.

• Some “important” packages still need fixes.

• pkgsrc cannot completely replace MirPorts at the moment (e.g. local ports).

• But: MirPorts and pkgsrc can coexist!

Page 22: pkgsrc on MirBSD - FOSDEM · pkgsrc on MirBSD Benny Siegert ‹bsiegert@{mir,net}bsd.org› FOSDEM 2012

Thank you for your attention

Thanks to:

Come to our booth (K building)!We distribute DVDs with MirBSD + pkgsrc.

22

Thorsten GlaserDaniel Seuffert Marius Nünnerich

Marc BalmerAlistair G. Crooks Guillaume LasmayousJörg Sonnenberger Thomas Klausner