51
Improving the Quality of OpenWrt/LEDE Improving the Quality of OpenWrt/LEDE If it compiles, ship it. Alexander Couzens Improving the Quality of OpenWrt/LEDE

Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

Improving the Quality of OpenWrt/LEDE

If it compiles, ship it.

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 2: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

Who am I?

c and python developer

hardware and embedded projects

coreboot - open source bootloader

LEDE + OpenWrt

freelancer

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 3: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

pain station?

Who has broken a board?

Who had to solder UART?

Who had to use JT G?

Who has soldered the flash chip?

Who has broken 100 devices at once?

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 4: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

pain station?

Who has broken a board?

Who had to solder UART?

Who had to use JT G?

Who has soldered the flash chip?

Who has broken 100 devices at once?

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 5: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

pain station?

Who has broken a board?

Who had to solder UART?

Who had to use JT G?

Who has soldered the flash chip?

Who has broken 100 devices at once?

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 6: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

pain station?

Who has broken a board?

Who had to solder UART?

Who had to use JTAG?

Who has soldered the flash chip?

Who has broken 100 devices at once?

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 7: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

pain station?

Who has broken a board?

Who had to solder UART?

Who had to use JTAG?

Who has soldered the flash chip?

Who has broken 100 devices at once?

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 8: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

pain station?

Who has broken a board?

Who had to solder UART?

Who had to use JTAG?

Who has soldered the flash chip?

Who has broken 100 devices at once?

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 9: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 10: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

Testing..

unit tests

integration tests on VMs

test on real devices

human tests

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 11: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

Testing..

unit tests

integration tests on VMs

test on real devices

human tests

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 12: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

Testing..

unit tests

integration tests on VMs

test on real devices

human tests

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 13: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

Testing..

unit tests

integration tests on VMs

test on real devices

human tests

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 14: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

Testing..

unit tests

integration tests on VMs

test on real devices

human tests

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 15: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

build bot

git clone git.lede-project.org/source.git

make

rsync bin/ https://downloads.lede-project.org/snapshots

ou’ll get blamed on IRC when ou break it

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 16: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

build bot

git clone git.lede-project.org/source.git

make

rsync bin/ https://downloads.lede-project.org/snapshots

you’ll get blamed on IRC when you break it

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 17: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

travis

active on feeds

only pull request

make check

make compile

rep rt into the Pull Request

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 18: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

travis

active on feeds

only pull request

make check

make compile

rep rt into the Pull Request

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 19: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

travis

active on feeds

only pull request

make check

make compile

report into the Pull Request

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 20: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

uscan

checks for updates

CVEs

send mails tomaintainer

Thanks to swalker

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 21: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

uscan

checks for updates

CVEs

send mails tomaintainer

Thanks to swalker

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 22: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

uscan

checks for updates

CVEs

send mails tomaintainer

Thanks to swalker

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 23: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

uscan

checks for updates

CVEs

send mails tomaintainer

Thanks to swalker

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 24: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

coverity

static anlysis

finds memleaks

finds runtime issues

randomly updated

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 25: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

coverity

static anlysis

finds memleaks

finds runtime issues

randomly updated

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 26: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

coverity

static anlysis

finds memleaks

finds runtime issues

randomly updated

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 27: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

coverity

static anlysis

finds memleaks

finds runtime issues

randomly updated

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 28: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

boardfarm

hardware testing

network tests (iperf, netperf, nat)

setup wifi, memory usage, . . .

no integration

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 29: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

LAVA

hardware testing

distributed

api

more flexible

no tests

no integration

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 30: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

reproducible builds

means: bit-by-bit identical

enable anyone to verify

provides a trustworthy link between binary and source

environment”must“ the same as in the

”original“ build

missing buildinfo files

how to recreate the exact same build env in the future?

[. . . ]

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 31: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

reproducible builds

means: bit-by-bit identical

enable anyone to verify

provides a trustworthy link between binary and source

environment”must“ the same as in the

”original“ build

missing buildinfo files

how to recreate the exact same build env in the future?

[. . . ]

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 32: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

reproducible builds

means: bit-by-bit identical

enable anyone to verify

provides a trustworthy link between binary and source

environment”must“ the same as in the

”original“ build

missing buildinfo files

how to recreate the exact same build env in the future?

[. . . ]

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 33: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

reproducible builds

means: bit-by-bit identical

enable anyone to verify

provides a trustworthy link between binary and source

environment”must“ the same as in the

”original“ build

missing buildinfo files

how to recreate the exact same build env in the future?

[. . . ]

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 34: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

reproducible builds

means: bit-by-bit identical

enable anyone to verify

provides a trustworthy link between binary and source

environment”must“ the same as in the

”original“ build

missing buildinfo files

how to recreate the exact same build env in the future?

[. . . ]

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 35: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

reproducible builds

means: bit-by-bit identical

enable anyone to verify

provides a trustworthy link between binary and source

environment”must“ the same as in the

”original“ build

missing buildinfo files

how to recreate the exact same build env in the future?

[. . . ]

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 36: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

reproducible builds

means: bit-by-bit identical

enable anyone to verify

provides a trustworthy link between binary and source

environment”must“ the same as in the

”original“ build

missing buildinfo files

how to recreate the exact same build env in the future?

[. . . ]

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 37: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

What’s a good tool?

upstream

well integrated

automated

green and red lights

helpful, not painful

maintained by YOU!

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 38: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

What’s a good tool?

upstream

well integrated

automated

green and red lights

helpful, not painful

maintained by YOU!

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 39: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

What’s a good tool?

upstream

well integrated

automated

green and red lights

helpful, not painful

maintained by YOU!

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 40: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

What’s a good tool?

upstream

well integrated

automated

green and red lights

helpful, not painful

maintained by YOU!

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 41: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

What’s a good tool?

upstream

well integrated

automated

green and red lights

helpful, not painful

maintained by YOU!

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 42: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

What’s a good tool?

upstream

well integrated

automated

green and red lights

helpful, not painful

maintained by YOU!

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 43: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 44: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 45: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

Future plans and ideas

CVE/CPE tag in packages

more PKG XYZ checks e.g. license

reproducible builds

automated hardware tests

automated test of commits before merging

our ideas

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 46: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

Future plans and ideas

CVE/CPE tag in packages

more PKG XYZ checks e.g. license

reproducible builds

automated hardware tests

automated test of commits before merging

our ideas

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 47: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

Future plans and ideas

CVE/CPE tag in packages

more PKG XYZ checks e.g. license

reproducible builds

automated hardware tests

automated test of commits before merging

our ideas

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 48: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

Future plans and ideas

CVE/CPE tag in packages

more PKG XYZ checks e.g. license

reproducible builds

automated hardware tests

automated test of commits before merging

our ideas

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 49: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

Future plans and ideas

CVE/CPE tag in packages

more PKG XYZ checks e.g. license

reproducible builds

automated hardware tests

automated test of commits before merging

our ideas

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 50: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

Future plans and ideas

CVE/CPE tag in packages

more PKG XYZ checks e.g. license

reproducible builds

automated hardware tests

automated test of commits before merging

your ideas

Alexander Couzens Improving the Quality of OpenWrt/LEDE

Page 51: Improving the Quality of OpenWrt/LEDE...ImprovingtheQualityofOpenWrt/LEDE reproduciblebuilds means: bit-by-bit identical enable anyone to verify provides a trustworthy link between

Improving the Quality of OpenWrt/LEDE

Thank you

Alexander Couzens

<[email protected]>

390D CF78 8BF9 AA50 4F8F

F1E2 C29E 9DA6 A0DF 8604

Alexander Couzens Improving the Quality of OpenWrt/LEDE