24
Why Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 Wookey (Linaro) Why Would Anyone Develop on Debian/Ubuntu Automotive Linux Summit 2012 1/ 22

Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

  • Upload
    vohuong

  • View
    245

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Why Would Anyone Develop on Debian/Ubuntu

Wookey

19th September 2012

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 1 /

22

Page 2: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Outline

1 A little History

2 Debian ecosystem

3 Choosing a distro base

4 Development

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 2 /

22

Page 3: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Prelude — the notion of “distribution”

distributions are meant to ease software management

key notion: the abstraction of package

offer coherent collections of software

killer application: package managers

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 3 /

22

Page 4: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Outline

1 A little History

2 Debian ecosystem

3 Choosing a distro base

4 Development

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 4 /

22

Page 5: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Debian: once upon a time

Fellow Linuxers,This is just to announce the imminent completion of a

brand-new Linux release, which I’m calling the Debian LinuxRelease. [. . . ]

Ian A Murdock, 16/08/1993comp.os.linux.development

entirely independent - no one commercial sponsor

Free software, tools and open process

built collaboratively by experts

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 5 /

22

Page 6: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Debian: one of a kind?

1993 — not many distros back then19 years later — lots of other distros

openSUSE, Linux Mint, PCLinuxOS, Slackware, Gentoo Linux, CentOS, FreeBSD, Arch, Sabayon, Puppy, Lubuntu, MEPIS,Ultimate, NetBSD, Tiny Core, Zenwalk, CrunchBang, Dreamlinux, Vector, Kubuntu, Maemo, Red Hat, aptosid, Peppermint,PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super OS, BackTrack, gOS, TinyMe, Zentyal, EasyPeasy, Frugalware,Clonezilla, Pardus, Meego, OpenBSD, Quirky, PC/OS, Zorin, Debian, SystemRescue, Element, Unity, SliTaz, Macpup, wattOS,Scientific, Mythbuntu, Slax, DragonFLY, Elive, linux-gamers, 64 Studio, Ubuntu, mageia, Nexenta, Parisx, NuTyX, GhostBSD,Kongoni, moonOS, LFS, Lunar, Imagineos, Untangle, Fedora, Yellow Dog, aLinux, Yoper, IPFire, BlankOn, Mandriva, PureOS,FreeNAS, Moblin, Linpus, TurboLinux, blackPanther, . . .

with many differences:

technical choices

release management

release schedule

target users/purpose

community

support

packaging system

user base

look & feel

package set

How is Debian different?Wookey (Linaro) Why Would Anyone Develop on Debian/Ubuntu

Automotive Linux Summit 2012 6 /22

Page 7: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Outline

1 A little History

2 Debian ecosystem

3 Choosing a distro base

4 Development

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 7 /

22

Page 8: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

The distribution pipeline

yesterday . . .

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 8 /

22

Page 9: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

The new distribution pipeline

. . . today

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 8 /

22

Page 10: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

The new distribution pipeline

. . . today

This is a Good Thing

wider FLOSS adoption

more eyeballs swallow more bugs

more potential contributors

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 8 /

22

Page 11: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

A Debian derivative example: Ubuntu

started in 2004 by Canonicaltarget: desktop

Debian derivative

very popular (15–20x Debian?)

historical/past correlations

main ↔ corporateuniverse ↔ community

I heavily customized/forked in mainI very close to Debian elsewhere

sprouting its own derivatives (≈80)I . . . as Debian transitive derivatives

Debian

Ubuntu

Upstream

Patch

74%15%

11%

Data for Oneiric Ocelot, main + universe

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 9 /

22

Page 12: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Blends and remixes

Debian Pure BlendsI Debian Edu, Debian Med, Debian Science, Debian GIS, DebiChem, . . .I Debian AutomotiveI blends.alioth.debian.org

Ubuntu Automotive remix

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 10 /

22

Page 13: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Mechanism

dpkg-vendor

package tracking system

launchpad ‘also exists in’

Focus on the delta

Working upstream saves time

Everything is a packageAmazing array of tooling - rebuildd, reprepro, dpkg-dev, debrsign, dupload, sbuild, pbuilder, debdiff, debchange,debconf, svn-buildpackage, git-buildpackage, debcheckout, debcommit, debi, dose, dpkg-source, debsnap, apt-cache,grep-dctrl, devscripts, . . .

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 11 /

22

Page 14: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

The universal OS

Wide architecture support (arm, i386, amd64, mips) and 6 others

Same environment on dev box and target

Easy debugging

Open infrastructure - easy to have your own repository

Legal checks already doneI All software meets the 4 freedomsI Linking checked for incompatibility

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 12 /

22

Page 15: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Outline

1 A little History

2 Debian ecosystem

3 Choosing a distro base

4 Development

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 13 /

22

Page 16: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Debian or Ubuntu

Fundamentally quite similar

2 yr release cycle

3-3.5yr security support

Easier to use systemd

Do-ocracy

More solid upgrades

Distributed support:(linpro, credativ)

6 month release cycle

18-months security support - 5yrs forLTS releases

Commercial support

Quicker to get things changed

Automotive needs really long-term security support

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 14 /

22

Page 17: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Effective community working

Propose ideas early

Take and give feedback

Write down specs for shared understanding

Learn to work in the open

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 15 /

22

Page 18: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Managing derivatives

Everyone has the same issues

Tracking upstream

Managing patches

Running repo, buildd, versioning

Upstreaming saves a lot of hassle in the long run

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 16 /

22

Page 19: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Emdebian

Identical binaries

Reduced on-disc bloat

Cross-toolchains

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 17 /

22

Page 20: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Outline

1 A little History

2 Debian ecosystem

3 Choosing a distro base

4 Development

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 18 /

22

Page 21: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Multiarch is very simple

Put libraries into architecture-specific pathsI /usr/lib/libfoo (amd64)→/usr/lib/x86 64-linux-gnu/libfooI /usr/lib/libfoo (armel)→/usr/lib/arm-linux-gnueabi/libfooI /usr/lib/libfoo (i386)→/usr/lib/i386-linux-gnu/libfoo

Change the default linux loader path.

Install libraries side-by side i386/amd64, arm/arm64

Run foreign binaries in-place with qemu

32/64 special casing goes away (/emul/ia32-linux)

Canonical locationsI Files don’t move when cross-bulding

Build/host version lockstep

dpkg --add-architecture i386

apt-get install libattr1-dev:armel

apt-get -aarmel build-dep acl

dpkg-buildpackage -aarmelWookey (Linaro) Why Would Anyone Develop on Debian/Ubuntu

Automotive Linux Summit 2012 19 /22

Page 22: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Crossbuilding - library paths

Runtime is the same as build-time.

Old system (classic/dpkg-cross)build-time library path: /usr/arm-linux-gnueabi/lib/libfooruntime library path: /usr/lib/libfoo

Multiarchbuild-time library path: /usr/lib/arm-linux-gnueabi/libfooruntime library path: /usr/lib/arm-linux-gnueabi/libfoo

Much harder for libtool to screw it up

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 20 /

22

Page 23: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Bootstrapping

dpkg build profiles

Remove circular build-dependencies

Cross-build from scratch

Dose3 dependency analysis

One of main Yocto/OE advantages

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 21 /

22

Page 24: Why Would Anyone Develop on Debian/Ubuntu · PDF fileWhy Would Anyone Develop on Debian/Ubuntu Wookey 19th September 2012 ... PC-BSD, Chakra, Salix, ClearOS, KNOPPIX, Xubuntu, Super

Thanks!

[email protected]

http://wookware.org

about the slides:available at http://wookware.org/talks/

copyright c© 2012 Wookeylicense CC BY-SA 3.0 — Creative Commons Attribution-ShareAlike 3.0

Wookey (Linaro) Why Would Anyone Develop on Debian/UbuntuAutomotive Linux Summit 2012 22 /

22