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

rossconf: Contributing to Ruby and Ruby OpenSSL

rossconf: Contributing to Ruby and Ruby OpenSSL

7fe945668a4fc098e886e20dea71d2ee?s=128

Zachary Scott

September 26, 2015
Tweet

Transcript

  1. @_zzak Ruby #rossconf

  2. @_zzak Ruby #rossconf Hello!!

  3. @_zzak Ruby #rossconf Hallo!!

  4. @_zzak Ruby #rossconf Hällö!!

  5. @_zzak Ruby #rossconf Möïn Möïn!!

  6. @_zzak Ruby #rossconf Tschüßi!!

  7. @_zzak Ruby #rossconf Tuesday!!

  8. @_zzak Ruby #rossconf 30 minutes is too short

  9. @_zzak Ruby #rossconf

  10. @_zzak Ruby #rossconf Zachary Scott

  11. @_zzak Ruby #rossconf Zachary Scott

  12. @_zzak Ruby #rossconf zzak

  13. @_zzak Ruby #rossconf zzangief

  14. @_zzak Ruby #rossconf Vermont

  15. @_zzak Ruby #rossconf San Francisco

  16. @_zzak Ruby #rossconf San Francisco

  17. @_zzak Ruby #rossconf

  18. @_zzak Ruby #rossconf

  19. @_zzak Ruby #rossconf LEGACY CODE LEGACY CODE

  20. @_zzak Ruby #rossconf Open Source

  21. @_zzak Ruby #rossconf

  22. @_zzak Ruby #rossconf

  23. @_zzak Ruby #rossconf

  24. @_zzak Ruby #rossconf

  25. None
  26. @_zzak Ruby #rossconf Thank you!!!

  27. @_zzak Ruby #rossconf

  28. @_zzak Ruby #rossconf ÖMG

  29. @_zzak Ruby #rossconf Berlin!!

  30. @_zzak Ruby #rossconf ßërlïn!!

  31. @_zzak Ruby #rossconf How to German

  32. @_zzak Ruby #rossconf Höw tö Gërmän

  33. @_zzak Ruby #rossconf ümläüts ëvërÿwhërë

  34. @_zzak Ruby #rossconf gütë näüght

  35. @_zzak Ruby #rossconf Käräökë!!

  36. @_zzak Ruby #rossconf Käräökë!!

  37. @_zzak Ruby #rossconf bit.ly/rossconfkaraoke

  38. @_zzak Ruby #rossconf bit.ly/rossconfkaraoke 8pm at King Karaoke

  39. @_zzak Ruby #rossconf Agenda

  40. @_zzak Ruby #rossconf

  41. @_zzak Ruby #rossconf Ruby

  42. @_zzak Ruby #rossconf ...ruby

  43. @_zzak Ruby #rossconf What is it?

  44. @_zzak Ruby #rossconf What is it????

  45. @_zzak Ruby #rossconf

  46. @_zzak Ruby #rossconf Agenda 1. Bug tracker 101 2. Patching

    Ruby 3. Contribute to StdLib
  47. @_zzak Ruby #rossconf bugs.ruby-lang.org

  48. @_zzak Ruby #rossconf

  49. @_zzak Ruby #rossconf How to Report

  50. @_zzak Ruby #rossconf

  51. @_zzak Ruby #rossconf

  52. @_zzak Ruby #rossconf

  53. @_zzak Ruby #rossconf

  54. @_zzak Ruby #rossconf

  55. @_zzak Ruby #rossconf Let me show you

  56. @_zzak Ruby #rossconf Step 1: Create an account

  57. @_zzak Ruby #rossconf

  58. @_zzak Ruby #rossconf

  59. @_zzak Ruby #rossconf

  60. @_zzak Ruby #rossconf

  61. @_zzak Ruby #rossconf

  62. @_zzak Ruby #rossconf Step 2: Start from trunk*

  63. @_zzak Ruby #rossconf Step 2: Start from trunk* *Commits are

    backported by maintainer
  64. @_zzak Ruby #rossconf

  65. @_zzak Ruby #rossconf

  66. @_zzak Ruby #rossconf

  67. @_zzak Ruby #rossconf

  68. @_zzak Ruby #rossconf

  69. @_zzak Ruby #rossconf

  70. @_zzak Ruby #rossconf

  71. @_zzak Ruby #rossconf

  72. @_zzak Ruby #rossconf Bug vs. Feature

  73. @_zzak Ruby #rossconf Bugs are... 1. It broke 2. Its

    hard 3. Its wrong
  74. @_zzak Ruby #rossconf Bugs are NOT... 1. It works... but

    2. Its hard... but 3. Its wrong... but
  75. @_zzak Ruby #rossconf Features are... 1. I wish it did...

    2. If only we could... 3. Let's make...
  76. @_zzak Ruby #rossconf

  77. @_zzak Ruby #rossconf

  78. @_zzak Ruby #rossconf Features are... 1. with a patch 2.

    with a usecase 3. need maintainers approval
  79. @_zzak Ruby #rossconf

  80. @_zzak Ruby #rossconf

  81. @_zzak Ruby #rossconf

  82. @_zzak Ruby #rossconf

  83. @_zzak Ruby #rossconf

  84. @_zzak Ruby #rossconf

  85. @_zzak Ruby #rossconf Reporting Security Issues

  86. @_zzak Ruby #rossconf Security Issues 1. Email security@ruby-lang.org 2. Responsible

    disclosure 3. Include Proof-of-Concept 4. Affected Rubies (i.e.: 1.9.3+)
  87. @_zzak Ruby #rossconf Patch Development

  88. @_zzak Ruby #rossconf Step 1: Install dependencies

  89. @_zzak Ruby #rossconf Install dependencies 1. A compiler (gcc, clang)

    2. autoconf 3. bison 4. Existing ruby 5. git or svn
  90. @_zzak Ruby #rossconf git vs. svn

  91. @_zzak Ruby #rossconf You are free to use git

  92. @_zzak Ruby #rossconf ruby-core still uses svn

  93. @_zzak Ruby #rossconf If you want to be a committer

  94. @_zzak Ruby #rossconf If you want to be a committer

    use svn or git+svn
  95. @_zzak Ruby #rossconf Step 2: Get the source

  96. @_zzak Ruby #rossconf Get the source git  clone  git://github.com/ruby/ruby.git  

    cd  ruby
  97. @_zzak Ruby #rossconf Step 3: Compiling

  98. @_zzak Ruby #rossconf autoconf  &&  \   mkdir  build  &&

     \   cd  build  &&  \   ../configure  \   -­‐-­‐prefix="${HOME}/.rubies/ruby-­‐dev  \   -­‐-­‐with-­‐openssl-­‐dir="`brew  -­‐-­‐prefix  openssl`"  \   #  ...  other  configure  options  &&  \   make  &&  make  install Compiling
  99. @_zzak Ruby #rossconf autoconf  &&  \   mkdir  build  &&

     \   cd  build  &&  \   ../configure  \   -­‐-­‐prefix="${HOME}/.rubies/ruby-­‐dev  \   -­‐-­‐with-­‐openssl-­‐dir="`brew  -­‐-­‐prefix  openssl`"  \   #  ...  other  configure  options  &&  \   make  &&  make  install Compiling
  100. @_zzak Ruby #rossconf autoconf  &&  \   mkdir  build  &&

     \   cd  build  &&  \   ../configure  \   -­‐-­‐prefix="${HOME}/.rubies/ruby-­‐dev  \   -­‐-­‐with-­‐openssl-­‐dir="`brew  -­‐-­‐prefix  openssl`"  \   #  ...  other  configure  options  &&  \   make  &&  make  install Compiling
  101. @_zzak Ruby #rossconf autoconf  &&  \   mkdir  build  &&

     \   cd  build  &&  \   ../configure  \   -­‐-­‐prefix="${HOME}/.rubies/ruby-­‐dev  \   -­‐-­‐with-­‐openssl-­‐dir="`brew  -­‐-­‐prefix  openssl`"  \   #  ...  other  configure  options  &&  \   make  &&  make  install Compiling
  102. @_zzak Ruby #rossconf autoconf  &&  \   mkdir  build  &&

     \   cd  build  &&  \   ../configure  \   -­‐-­‐prefix="${HOME}/.rubies/ruby-­‐dev  \   -­‐-­‐with-­‐openssl-­‐dir="`brew  -­‐-­‐prefix  openssl`"  \   #  ...  other  configure  options  &&  \   make  &&  make  install Compiling
  103. @_zzak Ruby #rossconf autoconf  &&  \   mkdir  build  &&

     \   cd  build  &&  \   ../configure  \   -­‐-­‐prefix="${HOME}/.rubies/ruby-­‐dev  \   -­‐-­‐with-­‐openssl-­‐dir="`brew  -­‐-­‐prefix  openssl`"  \   #  ...  other  configure  options  &&  \   make  &&  make  install Compiling Don't Use Apple's OpenSSL
  104. @_zzak Ruby #rossconf Step 4: Running Tests

  105. @_zzak Ruby #rossconf 1. Compiler tests Running Tests make  test

    2. All tests make  test-­‐all make  test-­‐all  TESTS=drb/test_drb.rb 3. All tests
  106. @_zzak Ruby #rossconf 1. Compiler tests Running Tests make  test

    2. All tests make  test-­‐all make  test-­‐all  TESTS=drb/test_drb.rb 3. All tests Use relative PATH from build dir
  107. @_zzak Ruby #rossconf Step 5: Your First Patch

  108. @_zzak Ruby #rossconf

  109. @_zzak Ruby #rossconf

  110. @_zzak Ruby #rossconf

  111. @_zzak Ruby #rossconf Summary 1. PRs on github.com/ruby 2. Larger

    discussions need ticket 3. Coding style Do As Others Do™ 4. Don't worry about ChangeLogs
  112. @_zzak Ruby #rossconf How to Submit

  113. @_zzak Ruby #rossconf Push your changes to github* *because diff

    is hard
  114. @_zzak Ruby #rossconf Give us the .patch URL

  115. @_zzak Ruby #rossconf Github .patch URL

  116. @_zzak Ruby #rossconf OR

  117. @_zzak Ruby #rossconf Save it

  118. @_zzak Ruby #rossconf Upload your patch here

  119. @_zzak Ruby #rossconf BONUS ROUND

  120. @_zzak Ruby #rossconf ....

  121. @_zzak Ruby #rossconf OpenSSL

  122. @_zzak Ruby #rossconf OpenSSL

  123. @_zzak Ruby #rossconf Issue Triage

  124. @_zzak Ruby #rossconf a.k.a. Please Help ⚠ ⚠

  125. @_zzak Ruby #rossconf

  126. @_zzak Ruby #rossconf

  127. @_zzak Ruby #rossconf

  128. @_zzak Ruby #rossconf

  129. @_zzak Ruby #rossconf 70 open issues

  130. @_zzak Ruby #rossconf

  131. @_zzak Ruby #rossconf

  132. @_zzak Ruby #rossconf

  133. @_zzak Ruby #rossconf

  134. @_zzak Ruby #rossconf

  135. @_zzak Ruby #rossconf

  136. @_zzak Ruby #rossconf

  137. @_zzak Ruby #rossconf

  138. @_zzak Ruby #rossconf

  139. @_zzak Ruby #rossconf

  140. @_zzak Ruby #rossconf

  141. @_zzak Ruby #rossconf History Lesson

  142. @_zzak Ruby #rossconf

  143. @_zzak Ruby #rossconf

  144. @_zzak Ruby #rossconf Changing Defaults...

  145. @_zzak Ruby #rossconf

  146. @_zzak Ruby #rossconf Slippery Slope ⚠⚠⚠ ⚠⚠⚠

  147. @_zzak Ruby #rossconf Leave the hard decisions

  148. @_zzak Ruby #rossconf Leave the hard decisions ...to me

  149. @_zzak Ruby #rossconf Leave the hard decisions ...to me

  150. @_zzak Ruby #rossconf Sweet Spot

  151. @_zzak Ruby #rossconf 1. Verify existing issues 2. Write tests

    3. Documentation 4. Use it
  152. @_zzak Ruby #rossconf 1. Verify existing issues 2. Write tests

    3. Documentation 4. Use it
  153. @_zzak Ruby #rossconf

  154. @_zzak Ruby #rossconf

  155. @_zzak Ruby #rossconf gem  'openssl',  github:  'ruby/openssl' Gemfile

  156. @_zzak Ruby #rossconf Try Your App and Report Any Issues

  157. @_zzak Ruby #rossconf Report Any Issues

  158. @_zzak Ruby #rossconf Docker

  159. @_zzak Ruby #rossconf FROM  zzak/ruby-­‐openssl-­‐docker

  160. @_zzak Ruby #rossconf zzak/ruby-openssl-docker

  161. @_zzak Ruby #rossconf zzak/ruby-openssl-docker

  162. @_zzak Ruby #rossconf openssl/docker-compose.yml

  163. @_zzak Ruby #rossconf 1. Mount openssl source 2. Setup environment

    3. Compile gem Docker setup
  164. @_zzak Ruby #rossconf Compile OpenSSL* *the library

  165. @_zzak Ruby #rossconf Compile OpenSSL* *the library install path

  166. @_zzak Ruby #rossconf Compile Ruby

  167. @_zzak Ruby #rossconf Compile Ruby For each version of ossl

  168. @_zzak Ruby #rossconf Compile Ruby Rubies install path

  169. @_zzak Ruby #rossconf Compile Ruby Ruby version ossl version

  170. @_zzak Ruby #rossconf Entrypoint

  171. @_zzak Ruby #rossconf With Your App

  172. @_zzak Ruby #rossconf

  173. @_zzak Ruby #rossconf $ rails generate scaffold post title body:text

    published:boolean
  174. @_zzak Ruby #rossconf Vendor openssl gem in git submodule

  175. @_zzak Ruby #rossconf git submodule add https://github.com/ruby/openssl vendor/openssl Vendor openssl

    gem
  176. @_zzak Ruby #rossconf Gemfile

  177. @_zzak Ruby #rossconf docker-compose.yml

  178. @_zzak Ruby #rossconf docker-compose.yml openssl test dir

  179. @_zzak Ruby #rossconf docker-compose.yml your app

  180. @_zzak Ruby #rossconf docker-compose.yml entrypoint after init

  181. @_zzak Ruby #rossconf What about dependencies?

  182. @_zzak Ruby #rossconf Gemfile

  183. @_zzak Ruby #rossconf Dockerfile

  184. @_zzak Ruby #rossconf Now use it

  185. @_zzak Ruby #rossconf $ docker-compose run build

  186. @_zzak Ruby #rossconf

  187. @_zzak Ruby #rossconf $ docker-compose run test

  188. @_zzak Ruby #rossconf $ docker-compose run test

  189. @_zzak Ruby #rossconf $ docker-compose run test vendored openssl gem

  190. @_zzak Ruby #rossconf $ docker-compose run test

  191. @_zzak Ruby #rossconf Wrap up

  192. @_zzak Ruby #rossconf Wrap up Redmine for bugs and features

  193. @_zzak Ruby #rossconf Wrap up Committers use svn or git+svn

  194. @_zzak Ruby #rossconf Wrap up You can use git and

    github for contributing
  195. @_zzak Ruby #rossconf Wrap up Validating issues helps maintainers

  196. @_zzak Ruby #rossconf Wrap up Help test the latest Ruby

    with your app
  197. @_zzak Ruby #rossconf Wrap up Report any bugs

  198. @_zzak Ruby #rossconf Wrap up Patches welcome

  199. @_zzak Ruby #rossconf May the Ruby be with you...

  200. @_zzak Ruby #rossconf Thank you!!!!! Thank you!!!!!