Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DockerでGentooのテスト

naota
July 05, 2014

 DockerでGentooのテスト

naota

July 05, 2014
Tweet

More Decks by naota

Other Decks in Technology

Transcript

  1. repoman repoman full ͢Δͱ ebuild ͷจ໘ΛνΣ οΫͯ͘͠ΕΔ ͜ͷ package ͸

    RDEPEND ʹೖͬͯΔ͚Ͳɺ΄Μͱʹ? DEPEND ͩ ͚Ͱ͍͍Μ͡Όͳ͍ͷɻͱ͔΋ݴͬͯ͘ΕΔ ੨ా௚େ Docker Ͱςετ͢Δ 2014-07-05 4 / 16
  2. ઃఆ͕ඞཁ FEATURES=test ύοέʔδ಺ͷςετϓϩάϥϜΛ࣮ߦ PORTAGEELOGCLASSES="${PORTAGEELOGCLASSES} qa" ༷ʑͳ QA ͷϩάग़ྗ CFLAGS,CXXFLAGS,FFLAGS,FCFLAGS ͷ

    શͯ ʹ "-frecord-gcc-switches" ΛೖΕΔ gcc ͷ CFLAGS ΛόΠφϦʹه࿥ ͪΌΜͱ CFLAGS ͕൓ө͞Ε͍ͯΔ͔Ͳ͏͔ΛνΣ οΫͯ͘͠ΕΔ ld.gold Λ࢖͏ underlinking Λ;͙ͤ ੨ా௚େ Docker Ͱςετ͢Δ 2014-07-05 6 / 16
  3. QA ͷྫ SONAME missing .so ϑΝΠϧʹ SONAME ͱ͍͏஋͕ઃఆ͞Ε͍ͯͳ͍ ϦϯΧ͕ϦϯΫΛߦͳ͏࣌ʹ༻͍Δ (͋ͬͨํ͕Α͍)

    world writable setuid binary ΍͹͍ RUNPATHɾEXECSTACK RUNPATH: shared object ͷ lookup ઌ: /tmp ͱ͔ೖͬͯͳ͍? EXECSTACK: ࣮ߦՄೳͳελοΫ: มͳίʔυೖΕΒΕͳ͍? ੨ా௚େ Docker Ͱςετ͢Δ 2014-07-05 7 / 16
  4. ͜Ε͚ͩͰ͍͍ͷ? ຊ౰ʹ ͦΕͰ Ͳ͜Ͱ΋ ϏϧυͰ͖ΔͷͩΖ͏͔? DEPEND ʹೖͬͯͳ͍΋ͷ͕͋Δ͔΋? ͨ·ͨ·ࣗ෼ͷ؀ڥʹ͸ೖ͍ͬͯͨʜͱ͍͏Φν Ͳ͏΍ͬͯςετͨ͠Β͍͍? stage3

    ͷ·ͬ͞Βͳ؀ڥ͔Β ΊΜͲ͘ͳ͍ɾ ɾ ɾ? ؀ڥ͍͍ͪͪ࡞Δͷ? ຖճ࠷ॳ͔ΒશͯίϯύΠϧ͢Δͷ? ੨ా௚େ Docker Ͱςετ͢Δ 2014-07-05 8 / 16
  5. Docker Ͱ Gentoo ؀ڥ git clone https://github.com/naota/dockergentoo export MAINTAINER="Naohiro Aota

    <[email protected]>" ./bin/update.sh Docker ͷ stage3 ؀ڥͱ Portage πϦʔ؀ڥ͕Ͱ͖ΔΑ! ಉ͡Α͏ʹ distfiles ؀ڥ΋࡞Δ ੨ా௚େ Docker Ͱςετ͢Δ 2014-07-05 10 / 16
  6. Docker Ͱ emerge ͢Δ ./bin/build-package.sh <flag> <package> ./bin/build-package.sh ’app-editors/emacs +X’

    ’app-editors/emacs’ ./bin/build-package.sh ” ’pficommon’ (ࣗ෼ͷ؀ڥʹ͋Δ) ࠷৽ͷ stage3 ͱ Portage πϦʔΛ࢖ͬͯɺUSE ϑϥάΛઃఆͯ͠ɺemerge ͕૸Δ ίϯςφΠϝʔδ͸ࣗಈফڈʹ͍ͯ͠Δ ࣗ෼Ͱফڈ͢ΔखؒΛল͘ emerge ͕੒ޭͨ͠ -> ͓ΊͰͱ͏͍͟͝·͢ ಉ࣌ʹόΠφϦ͕࡞ΒΕ͍ͯΔͷͰɺޙͷ emerge ͸ޮ཰తʹͳΔ emerge ͕ࣦഊͨ͠ -> ݪҼΛௐ΂͍ͨΑͶ results/ͷԼʹ/var/tmp/portage Λ tar.xz ͨ͠΋ͷ͕ೖͬͯΔ unpack ͯ͠޷͖ͳ͚ͩݪҼΛ୳ΕΔ ੨ా௚େ Docker Ͱςετ͢Δ 2014-07-05 12 / 16
  7. ࣗ෼ͷ ebuild Λςετ͢Δ ./bin/test-ebuild.sh ’gwaei +hunspell’ gwaei-3.6.2.ebuild ίϯςφͷதͰࢦఆͨ͠ ebuild ͚ͩΛ

    overlay ʹ͍Εͯ emerge ͯ͠ ͘ΕΔ ࣗ෼Ͱॻ͍ͨ ebuild Λςετ͢Δͷʹ࠷ద ੨ా௚େ Docker Ͱςετ͢Δ 2014-07-05 13 / 16
  8. ͼΈΐ͏ʹ΍Γ͍ͨ͜ͱ͕͋Δ USE ϑϥάΛཱͯΔ͚ͩͰ͸଍Γͳ͍ ./bin/shell.sh gwaei-3.6.2.ebuild overlay Λ࡞ͬͯίϯςφͷதͰ shell ͕ىಈ͞ΕΔ emerge

    ͷલʹ͍ͨ͜͠ͱΛ͍Ζ͍Ζͯ͠ /build/dockerbuild.sh <flag> <package> ੨ా௚େ Docker Ͱςετ͢Δ 2014-07-05 14 / 16
  9. কདྷతʹ portage πϦʔͷதͷ΋ͷΛ͔ͨͬͺ͔͠ΒϏϧυ ͳΜ͔΋͏΍ͬͯΔਓ͕͍ΔͬΆ͍? Python ͔ͳΜ͔Ͱॻ͖௚͢ ebuild Λ upload ͯ͠ςετͯ͘͠ΕΔ

    Web αʔϏε distfiles Λෳ਺ϚγϯͰڞ༗ ϏϧυΩϡʔΛ࡞ͬͯ෼ۀͱ͔ ੨ా௚େ Docker Ͱςετ͢Δ 2014-07-05 15 / 16