rabbit-slide-kenhys-tokyodebian-debexpo-20160625 2016.06.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +7 -0
  2. data/.rabbit +1 -0
  3. data/README.md +24 -0
  4. data/Rakefile +17 -0
  5. data/config.yaml +23 -0
  6. data/images/alioth-debexpo-313593-request.png +0 -0
  7. data/images/broken-ci-since-8month-ago.png +0 -0
  8. data/images/computer_trackpoint_classicdome.png +0 -0
  9. data/images/computer_trackpoint_softdome.png +0 -0
  10. data/images/computer_trackpoint_softrim.png +0 -0
  11. data/images/debexpo-dmup.png +0 -0
  12. data/images/debexpo-investigate-rfs-template-link.png +0 -0
  13. data/images/debexpo-mascot-zoom.png +0 -0
  14. data/images/debexpo-on-localhost.png +0 -0
  15. data/images/debexpo-package-list.png +0 -0
  16. data/images/debexpo-pr32-use-latest-wheezy.png +0 -0
  17. data/images/debexpo-pr34-incoming-directory.png +0 -0
  18. data/images/debexpo-pr35-paulproteus.png +0 -0
  19. data/images/debexpo-pr35.png +0 -0
  20. data/images/debexpo-pr37-drop-py26.png +0 -0
  21. data/images/debexpo-pr38-broken-ci.png +0 -0
  22. data/images/debexpo-pr39-skip-gpg.png +0 -0
  23. data/images/debexpo-sign-me-up.png +0 -0
  24. data/images/find-a-debexpo-bug.png +0 -0
  25. data/images/irasutoya.png +0 -0
  26. data/images/last-change-on-alioth.png +0 -0
  27. data/images/last-change-on-github.png +0 -0
  28. data/images/mentors.d.n.png +0 -0
  29. data/images/openlogo-nd-50.png +0 -0
  30. data/images/openlogo-nd-75.png +0 -0
  31. data/images/qa-information.png +0 -0
  32. data/images/rfs-template-fill-in1.png +0 -0
  33. data/images/rfs-template-fill-in2.png +0 -0
  34. data/images/rfs-template-fill-in3.png +0 -0
  35. data/images/rfs-template-fill-in4.png +0 -0
  36. data/images/rfs-template-fill-in5.png +0 -0
  37. data/images/rfs-template-pithole.png +0 -0
  38. data/images/rfs-template-pithole2.png +0 -0
  39. data/images/rfs-template-pithole3.png +0 -0
  40. data/images/source-code-and-bugs.png +0 -0
  41. data/images/track-points.png +0 -0
  42. data/images/update-dmup.png +0 -0
  43. data/images/update-verification.png +0 -0
  44. data/images/view-rfs-template.png +0 -0
  45. data/pdf/tokyodebian-debexpo-20160625-tokyodebian-debexpo-20160625.pdf +0 -0
  46. data/theme.rb +2 -0
  47. data/tokyodebian-debexpo-20160625.rab +1025 -0
  48. metadata +104 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7b12410639cbb9641a29f3ea0222695b5506fd9b
4
+ data.tar.gz: 41418532de3587ceb798ad0785f680b1bc3231c0
5
+ SHA512:
6
+ metadata.gz: 44f4b3b10e33c5d4b328d22065a30eecebbd2918100a69bae4ecd063d7d0009684e6ed36e83e9a6b6cf6270b8dc9568716204f982910344dfd46d78aa299aeca
7
+ data.tar.gz: dc145c42f919608d3e82e0feb77c04bc33ac3ecc297114e759a25d5a2f1d6d67dee98132b7790b4c212e00d1d9e8a619ea27eed72e8963efbf51eb8925ddc6a4
data/.rabbit ADDED
@@ -0,0 +1 @@
1
+ tokyodebian-debexpo-20160625.rab
@@ -0,0 +1,24 @@
1
+ # debexpo(mentors.d.n)をハックするには
2
+
3
+ 2016年6月25日に渋谷dotsで開催された、東京Debian勉強会の発表資料です。
4
+
5
+ ## 作者向け
6
+
7
+ ### 表示
8
+
9
+ rake
10
+
11
+ ### 公開
12
+
13
+ rake publish
14
+
15
+ ## 閲覧者向け
16
+
17
+ ### インストール
18
+
19
+ gem install rabbit-slide-kenhys-tokyodebian-debexpo-20160625
20
+
21
+ ### 表示
22
+
23
+ rabbit rabbit-slide-kenhys-tokyodebian-debexpo-20160625.gem
24
+
@@ -0,0 +1,17 @@
1
+ require "rabbit/task/slide"
2
+
3
+ # Edit ./config.yaml to customize meta data
4
+
5
+ spec = nil
6
+ Rabbit::Task::Slide.new do |task|
7
+ spec = task.spec
8
+ # spec.files += Dir.glob("doc/**/*.*")
9
+ # spec.files -= Dir.glob("private/**/*.*")
10
+ # spec.add_runtime_dependency("YOUR THEME")
11
+ end
12
+
13
+ desc "Tag #{spec.version}"
14
+ task :tag do
15
+ sh("git", "tag", "-a", spec.version.to_s, "-m", "Publish #{spec.version}")
16
+ sh("git", "push", "--tags")
17
+ end
@@ -0,0 +1,23 @@
1
+ ---
2
+ id: tokyodebian-debexpo-20160625
3
+ base_name: tokyodebian-debexpo-20160625
4
+ tags:
5
+ - rabbit
6
+ - debian
7
+ - debexpo
8
+ presentation_date: 2016-06-25
9
+ version: 2016.06.25
10
+ licenses:
11
+ - CC-BY-SA-4.0
12
+ slideshare_id: tokyodebian-debexpo-20160625
13
+ speaker_deck_id:
14
+ ustream_id:
15
+ vimeo_id:
16
+ youtube_id:
17
+ author:
18
+ markup_language: :rd
19
+ name: Kentaro Hayashi
20
+ email: kenhys@gmail.com
21
+ rubygems_user: kenhys
22
+ slideshare_user: kenhys
23
+ speaker_deck_user:
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,2 @@
1
+ include_theme("debian")
2
+
@@ -0,0 +1,1025 @@
1
+ = debexpoを\nハックするには
2
+
3
+ : subtitle
4
+ How to hack mentors.d.n
5
+ : author
6
+ Kentaro Hayashi
7
+ : institution
8
+ ClearCode Inc.
9
+ : content-source
10
+ TokyoDebian, 140th
11
+ : date
12
+ 2016-06-25
13
+ : allotted-time
14
+ 40m
15
+ : theme
16
+ .
17
+
18
+ = 自己紹介(1)
19
+
20
+ # image
21
+ # relative-height = 40
22
+ # src = https://pbs.twimg.com/profile_images/2290018079/cvcy12slbeva80jboxzf_400x400.png
23
+
24
+ * Twitter/GitHub: @kenhys
25
+ * 所属: ((*トラックポイント・ソフトドーム派*))
26
+
27
+ = 自己紹介(2)
28
+
29
+ # image
30
+ # relative-height = 60
31
+ # src = images/track-points.png
32
+
33
+ * トラックポイント・ソフトドーム派
34
+
35
+ = 参考画像の出典
36
+
37
+ # image
38
+ # relative-height = 80
39
+ # src = images/irasutoya.png
40
+
41
+ * http://www.irasutoya.com/
42
+
43
+ = 閑話休題
44
+
45
+ そろそろ本題へ
46
+
47
+ = 今日の話
48
+
49
+ * debexpoとは?
50
+
51
+ * なぜdebexpoをハックする必要が?
52
+
53
+ * どうやってハックしたのか?
54
+
55
+ = 今日の話
56
+
57
+ * ((*debexpoとは?*))
58
+
59
+ * なぜdebexpoをハックする必要が?
60
+
61
+ * どうやってハックしたのか?
62
+
63
+ = debexpoとは?
64
+
65
+ * mentors.d.nを支えるウェブアプリケーション
66
+
67
+ * リポジトリ名がdebexpo
68
+
69
+ = mentors.d.nとは?
70
+
71
+ # image
72
+ # relative-height = 80
73
+ # src = images/mentors.d.n.png
74
+
75
+ * http://mentors.debian.net
76
+
77
+ = debexpoの由来
78
+
79
+ # blockquote
80
+ # title = https://workaround.org/project/debexpo
81
+ The new project was called "debexpo" because it was supposed to become an ((*expo*))sition for ((*Deb*))ian packages.
82
+
83
+ = ゆるキャラも
84
+
85
+ # image
86
+ # relative-height = 80
87
+ # src = images/debexpo-mascot-zoom.png
88
+
89
+ * 名前は不明。知っていたら教えてください。
90
+
91
+ = debexpo概要
92
+
93
+ * Python製
94
+ * Pylonsフレームワーク採用
95
+ * テンプレートエンジンはMako
96
+
97
+ = Pylons\n(('note:http://www.pylonsproject.org/'))
98
+
99
+ * Railsっぽいフレームワーク
100
+ * 2011年にメンテナンスモード入り
101
+ * 後継はPyramidに
102
+
103
+ = debexpoの歴史(1)
104
+
105
+ * 2003年
106
+ * 最初はPerlで書かれていた
107
+ * その後、Pythonで書き直し
108
+
109
+ = debexpoの歴史(2)
110
+
111
+ * 2008年
112
+ * Google SoCで開発が進む
113
+ * 2009-2010年
114
+ * http://expo.debian.net/ 運用開始
115
+ * 2011年 そしてmentors.d.nへ
116
+
117
+
118
+ = debexpoの役割
119
+
120
+ * ITP,RFSのためのアップロード先
121
+ * non-DDはパッケージを直接アップロードできない
122
+ * スポンサーが必要
123
+
124
+ = ITP,RFSのおさらい
125
+
126
+ mentors.d.nの使いかた ITP編/RFS編
127
+
128
+ = mentors.d.nの\n使いかた ITP編(1)
129
+
130
+ * パッケージをDebianにもっていきたい
131
+ * ITPのメールをsubmit@bugs.d.oへ
132
+ * パッケージをmentors.d.nにdput
133
+
134
+ = mentors.d.nの\n使いかた ITP編(2)
135
+
136
+ * RFSのメールをsubmit@bugs.d.oへ
137
+ * レビュー & 修正 & dput
138
+ * DDによるupload
139
+
140
+ = mentors.d.nの\n使いかた RFS編(1)
141
+
142
+ * upstreamの新リリース
143
+ * 追従してパッケージをdput
144
+ * RFSのメールをsubmit@bugs.d.oへ
145
+
146
+ = mentors.d.nの\n使いかた RFS編(2)
147
+
148
+ * レビュー & 修正 & dput
149
+ * DDによるupload
150
+
151
+ = mentors.d.nオススメ
152
+
153
+ * パッケージのチェックもしてくれる
154
+ * RFSのテンプレートも生成してくれる
155
+
156
+ = mentors.d.nオススメ
157
+
158
+ * ((*パッケージのチェックもしてくれる*))
159
+ * RFSのテンプレートも生成してくれる
160
+
161
+ = チェック結果がみれる
162
+
163
+ # image
164
+ # relative-height = 80
165
+ # src = images/qa-information.png
166
+
167
+ * lintianの警告とか
168
+
169
+ = mentors.d.nオススメ
170
+
171
+ * パッケージのチェックもしてくれる
172
+ * ((*RFSのテンプレートも生成してくれる*))
173
+
174
+ = RFSのテンプレート生成
175
+
176
+ # image
177
+ # relative-height = 80
178
+ # src = images/view-rfs-template.png
179
+
180
+ * あとはメールするだけ(※)
181
+
182
+ = 今日の話
183
+
184
+ * debexpoとは?
185
+
186
+ * ((*なぜdebexpoをハックする必要が?*))
187
+
188
+ * どうやってハックしたのか?
189
+
190
+ = mentors.d.nが\nオススメな理由
191
+
192
+ = (再)mentors.d.nが\nオススメな理由
193
+
194
+ * RFSテンプレート生成
195
+ * あとはメールを出すだけ
196
+
197
+ = (再)mentors.d.nが\nオススメな理由
198
+
199
+ * RFSテンプレート生成
200
+ * あとはメールを出すだけ
201
+ * ((*と言ったが、あれは嘘だ*))
202
+
203
+ = 論より証拠
204
+
205
+ 実際のRFS templateをお見せしよう
206
+
207
+ = 証拠物件(1)
208
+
209
+ # image
210
+ # relative-height = 80
211
+ # src = images/rfs-template-pithole.png
212
+
213
+ * [fill in]の文字がちらほら
214
+
215
+ = 証拠物件(2)
216
+
217
+ # image
218
+ # relative-height = 70
219
+ # src = images/rfs-template-pithole2.png
220
+
221
+ * ほかにも穴埋めが必要
222
+
223
+
224
+ = 編集すべき箇所
225
+
226
+ * いくつかあるので紹介
227
+
228
+ = 編集すべき箇所(1)
229
+
230
+ # image
231
+ # relative-width = 100
232
+ # src = images/rfs-template-fill-in1.png
233
+
234
+ * Subject:に種別を書け
235
+
236
+ = 編集すべき箇所(2)
237
+
238
+ # image
239
+ # relative-width = 100
240
+ # src = images/rfs-template-fill-in2.png
241
+
242
+ * Severity:を書け
243
+
244
+ = 編集すべき箇所(3)
245
+
246
+ # image
247
+ # relative-width = 100
248
+ # src = images/rfs-template-fill-in3.png
249
+
250
+ * Upstream,URL,License:を書け
251
+
252
+ = 編集すべき箇所(4)
253
+
254
+ # image
255
+ # relative-width = 100
256
+ # src = images/rfs-template-fill-in4.png
257
+
258
+ * Changelogを書け
259
+
260
+ = これで終わり?
261
+
262
+ = 編集すべき箇所(5)
263
+
264
+ # image
265
+ # relative-width = 100
266
+ # src = images/rfs-template-fill-in5.png
267
+
268
+ * さりげなく埋めこまれたhelloとexample.com
269
+
270
+ = これでメールが出せる
271
+
272
+ = 先頭に埋めこまれた\nスペース2つ
273
+
274
+ # image
275
+ # relative-width = 100
276
+ # src = images/rfs-template-pithole3.png
277
+
278
+ * コマンドメールであることを思いだそう
279
+ * (('wait'))((*もちろんエラーになります*))
280
+
281
+ = Q. なぜdebexpoを\nハックするのか?
282
+
283
+ * A. RFSテンプレートの残念っぷりをどうにかしたい
284
+
285
+ = 同じ思いの人はいた
286
+
287
+ # image
288
+ # relative-width = 100
289
+ # src = images/alioth-debexpo-313593-request.png
290
+
291
+ * Aliothのtrackerで4年も前に通った道
292
+
293
+ = 今日の話
294
+
295
+ * debexpoとは?
296
+
297
+ * なぜdebexpoをハックする必要が?
298
+
299
+ * ((*どうやってハックしたのか?*))
300
+
301
+ = あらすじ
302
+
303
+ * upstream探し
304
+ * ドキュメント探し
305
+ * まずは動かしてみる
306
+ * あたりをつけて修正
307
+ * そしてPRへ
308
+
309
+ = 特別なことは何も
310
+
311
+ よくあるフリーソフトウェアの修正
312
+
313
+ = あらすじ
314
+
315
+ * ((*upstream探し*))
316
+ * ドキュメント探し
317
+ * まずは動かしてみる
318
+ * あたりをつけて修正
319
+ * そしてPRへ
320
+
321
+ = upstream探し(1)
322
+
323
+ # image
324
+ # relative-width = 100
325
+ # src = images/source-code-and-bugs.png
326
+
327
+ * mentors.d.n下部にリンクがきちんとある
328
+ * aliothをみればいいとわかる
329
+
330
+ = upstream探し(2)
331
+
332
+ # image
333
+ # relative-height = 80
334
+ # src = images/last-change-on-alioth.png
335
+
336
+ * 最近はコミットがない
337
+
338
+ = ちょっと不安に
339
+
340
+ * よく使われているならそこそこメンテされているイメージ
341
+ * 実際にはそうでもなかった
342
+
343
+ = upstream探し(3)
344
+
345
+ # image
346
+ # relative-height = 70
347
+ # src = images/last-change-on-github.png
348
+
349
+ * GitHubのほうが実は新しい
350
+ * (('tag:x-small'))https://github.com/debexpo/debexpo
351
+
352
+
353
+ = upstream探し(4)
354
+
355
+ * aliothがmaster
356
+ * https://alioth.debian.org/projects/debexpo/
357
+ * GitHubのをマージという運用
358
+
359
+ = あらすじ
360
+
361
+ * upstream探し
362
+ * ((*ドキュメント探し*))
363
+ * まずは動かしてみる
364
+ * あたりをつけて修正
365
+ * そしてPRへ
366
+
367
+ = ドキュメント探し
368
+
369
+ * docs/*にドキュメントが整備
370
+ * docs/installing.rstを参照
371
+ * リンク先が404なこともあるので注意
372
+
373
+ = あらすじ
374
+
375
+ * upstream探し
376
+ * ドキュメント探し
377
+ * ((*まずは動かしてみる*))
378
+ * あたりをつけて修正
379
+ * そしてPRへ
380
+
381
+ = まずは動かしてみる
382
+
383
+ * セットアップ方法は3種
384
+
385
+ * 既存システムにインストール
386
+ * virtualenvでインストール
387
+ * VirtualBoxでインストール
388
+
389
+ = まずはVirtualBoxで
390
+
391
+ * 環境を分けたいのでVirtualBoxを選択
392
+
393
+ = Vagrantfileがアレ
394
+
395
+ # Every Vagrant virtual environment requires a box to build off of.
396
+ config.vm.box = "chef/debian-7.6"
397
+
398
+ * Debian 7.6 (2014年7月12日)?
399
+ * Debian 7.10でてるよ?
400
+
401
+ = vagrant upしてみると
402
+
403
+ % vagrant up
404
+ Bringing machine 'default' up with 'virtualbox' provider...
405
+ ==> default: Box 'chef/debian-7.6' could not be found. Attempting to find and install...
406
+ default: Box Provider: virtualbox
407
+ default: Box Version: >= 0
408
+ The box 'chef/debian-7.6' could not be found or
409
+ could not be accessed in the remote catalog. If this is a private
410
+ box on HashiCorp's Atlas, please verify you're logged in via
411
+ `vagrant login`. Also, please double-check the name. The expanded
412
+ URL and error message are shown below:
413
+
414
+ URL: ["https://atlas.hashicorp.com/chef/debian-7.6"]
415
+ Error: The requested URL returned error: 404 Not Found
416
+
417
+ * boxが見つからなくてコケる
418
+
419
+ = PR#32で修正
420
+
421
+ # image
422
+ # relative-width = 100
423
+ # src = images/debexpo-pr32-use-latest-wheezy.png
424
+
425
+ * Bento projectに移行していたせいだった
426
+
427
+ = 起動してログインするまで
428
+
429
+ $ vagrant up --provision
430
+ $ vagrant ssh
431
+
432
+ * よくあるやりかた
433
+
434
+ = vagrant sshして\nサーバーを起動
435
+
436
+ $ cd debexpo
437
+ $ . venv/bin/activate
438
+ $ paster serve development.ini
439
+
440
+ = 5000ポートでサーバー起動
441
+
442
+ # image
443
+ # relative-height = 80
444
+ # src = images/debexpo-on-localhost.png
445
+
446
+ * ブラウザでアクセス可能に
447
+
448
+ = ユーザーの追加(1)
449
+
450
+ * 方法は2つある
451
+
452
+ * ブラウザ経由で追加
453
+ * JSONで追加
454
+
455
+ = ユーザーの追加(2)
456
+
457
+ # image
458
+ # relative-height = 80
459
+ # src = images/debexpo-sign-me-up.png
460
+
461
+ * ブラウザ経由で追加
462
+
463
+ = ユーザーの追加(3)
464
+
465
+ * JSONで追加するなら
466
+
467
+ # enscript javascript
468
+ {
469
+ "realname":"Hayashi Kentaro",
470
+ "password":"password",
471
+ "email":"hayashi@clear-code.com"
472
+ }
473
+
474
+ = ユーザーの追加(4)
475
+
476
+ * 追加用のスクリプトを利用
477
+
478
+ $ python ./bin/user_importer.py \
479
+ -i development.ini -u user.json
480
+
481
+ = アカウントの有効化
482
+
483
+ * verification (ログインに必要)
484
+ * dmup (アップロードに必要)
485
+
486
+ = verificationの設定
487
+
488
+ # image
489
+ # relative-width = 90
490
+ # src = images/update-verification.png
491
+
492
+ * verificationを空にする
493
+ * メールの確認をバイパス
494
+
495
+ = DMUP?
496
+
497
+ # image
498
+ # relative-width = 50
499
+ # src = images/debexpo-dmup.png
500
+
501
+ * マシン使用ポリシーのこと
502
+
503
+ = dmupの設定
504
+
505
+ # image
506
+ # relative-width = 90
507
+ # src = images/update-dmup.png
508
+
509
+ * dmupフィールドを更新
510
+ * 同意したことにする
511
+
512
+ = .dput.cfの設定をする
513
+
514
+ [debexpo]
515
+ fqdn = localhost:5000
516
+ incoming = /upload/kenhys@gmail.com/password
517
+ method = http
518
+ allow_unsigned_uploads = 0
519
+
520
+ * アップロードの準備をする
521
+
522
+ = 試しにパッケージを\nアップロード
523
+
524
+ Uploading to debexpo (via http to localhost:5000):
525
+ Uploading groonga_6.0.2-1.dsc:
526
+ Upload failed: 500 Internal Server Error
527
+
528
+ * ((*500 Internal Server Error*))
529
+
530
+ = さっそくバグを踏む
531
+
532
+ # image
533
+ # relative-width = 90
534
+ # src = images/find-a-debexpo-bug.png
535
+
536
+ * あるべきディレクトリがないというオチ
537
+
538
+ = PR#34で修正
539
+
540
+ # image
541
+ # relative-width = 100
542
+ # src = images/debexpo-pr34-incoming-directory.png
543
+
544
+ * ちゃんとディレクトリを作る
545
+
546
+ = PR出して気づいた怖い話
547
+
548
+ # image
549
+ # relative-width = 100
550
+ # src = images/broken-ci-since-8month-ago.png
551
+
552
+ * 最後にテストが通ったの((*8ヶ月前*))
553
+
554
+ = なぜか?
555
+
556
+ * Travis-CIの環境の変化
557
+ * しばらくコミットされてないので誰も気づかない
558
+
559
+ = PR#38で修正
560
+
561
+ # image
562
+ # relative-width = 100
563
+ # src = images/debexpo-pr38-broken-ci.png
564
+
565
+ * テストが通るように
566
+
567
+ = PR#37で修正
568
+
569
+ # image
570
+ # relative-width = 100
571
+ # src = images/debexpo-pr37-drop-py26.png
572
+
573
+ * Python2.6でCIはもういいんじゃ
574
+
575
+ = パッケージのとりこみ
576
+
577
+ $ ./bin/debexpo_importer.py \
578
+ -c /tmp/debexpo/growl-for-linux_0.8.5-1_source.changes \
579
+ -i development.ini --skip-gpg-check --skip-email
580
+
581
+ * インポートスクリプト実行
582
+
583
+ = とりこみできずに\nTraceback
584
+
585
+ Traceback (most recent call last):
586
+ File "./bin/debexpo_importer.py", line 60, in
587
+ i.main()
588
+ File "/home/vagrant/debexpo/debexpo/importer/importer.py", line 473, in main
589
+ gpg = get_gnupg()
590
+ File "/home/vagrant/debexpo/debexpo/lib/utils.py", line 119, in get_gnupg
591
+ return gnupg.GnuPG(config['debexpo.gpg_path'],
592
+ File "/home/vagrant/debexpo/venv/local/lib/python2.7/site-packages/paste/registry.py", line 146, in getitem
593
+ return self._current_obj()[key]
594
+ KeyError: 'debexpo.gpg_path'
595
+
596
+ = PR#39で修正
597
+
598
+ # image
599
+ # relative-width = 100
600
+ # src = images/debexpo-pr39-skip-gpg.png
601
+
602
+ * オプションを正しく解釈するように
603
+
604
+ = パッケージリスト
605
+
606
+ # image
607
+ # relative-width = 80
608
+ # src = images/debexpo-package-list.png
609
+
610
+ * リストアップされるように
611
+
612
+ = あらすじ
613
+
614
+ * upstream探し
615
+ * ドキュメント探し
616
+ * まずは動かしてみる
617
+ * ((*あたりをつけて修正*))
618
+ * そしてPRへ
619
+
620
+ = ディレクトリ構成
621
+
622
+ config
623
+ controllers
624
+ cronjobs
625
+ importer
626
+ i18n
627
+ lib
628
+ model
629
+ plugins
630
+ public
631
+ templates
632
+ tests
633
+
634
+ = 手がかりはURL
635
+
636
+ # image
637
+ # relative-height = 80
638
+ # src = images/debexpo-investigate-rfs-template-link.png
639
+
640
+ * 知りたいのはこのリンク
641
+
642
+ = こんなリンク先
643
+
644
+ * http://localhost:5000/sponsors/rfs-howto/xxxx
645
+
646
+ = コントローラを探す
647
+
648
+ # enscript python
649
+ def rfs_howto(self, packagename = None):
650
+
651
+
652
+ c.package = None
653
+ c.package_dir = None
654
+ if packagename:
655
+ package = meta.session.query(Package)
656
+ .filter_by(name=packagename).first()
657
+ if package:
658
+ c.package = package
659
+ c.package_dir = get_package_dir(package.name)
660
+
661
+ return render('/sponsor/rfs_howto.mako')
662
+
663
+ * controllers/sponsor.py
664
+
665
+ = テンプレートを見る
666
+
667
+ Package: sponsorship-requests
668
+ Severity: normal [important for RC bugs, wishlist for new packages]
669
+
670
+ Dear mentors,
671
+
672
+ %if c.package:
673
+ I am looking for a sponsor for my package "${ c.package.name }"
674
+ %else:
675
+ I am looking for a sponsor for my package "hello":
676
+ %endif
677
+
678
+ * templates/sponsor/rfs_howto.mako
679
+
680
+ = やりたいこと
681
+
682
+ * RFSテンプレートから
683
+ * [fill in]撲滅
684
+ * mailto:リンクの生成
685
+
686
+ = 当初の目論見
687
+
688
+ * ${ c.package.name }とかあるぞ
689
+ * テンプレートを書き換えればいいのでは?
690
+
691
+ = 無理でした
692
+
693
+ = なぜか?
694
+
695
+ * 必要なメタ情報を保持していない
696
+ * 持ってないものは表示できない orz...
697
+ * ないならかき集めればいいじゃない
698
+
699
+ = 収集するにはどうすればいいか
700
+
701
+ * インポートの処理の流れを把握する
702
+ * どのタイミングで収集すべきか知る
703
+ * 不足している情報は何かを知る
704
+
705
+ = インポート処理の流れ(1)
706
+
707
+ * dputでmentors.d.nへアップロード
708
+ * インポート前処理
709
+ * パッケージのインポート処理
710
+
711
+ = インポート処理の流れ(2)
712
+
713
+ * もう少し詳しく言うと
714
+
715
+ * dputしたファイルは/tmp/debexpo/pubへ保存
716
+ * インポート前処理で/tmp/debexpoヘ移動
717
+ * orig.tar.gzがなかったりするとrejectメール
718
+
719
+ = インポート処理の流れ(3)
720
+
721
+ * もう少し詳しく言うと
722
+ * インポート処理で/tmp/debexpo/filesへ移動
723
+ * /tmp/debexpo/files以下
724
+ * pool
725
+ * dist
726
+ * git
727
+
728
+ = 収集すべきデータは?
729
+
730
+ * 現状、メタ情報はどう保持されているのかを把握する
731
+ * テーブルを覗いてみよう
732
+
733
+ = 主要なテーブル
734
+
735
+ * 主なものは3つ
736
+ * packages
737
+ * package_versions
738
+ * package_info
739
+
740
+ = packagesテーブル
741
+
742
+ * パッケージのマスターテーブル
743
+ * 名前や説明などのメタ情報を保持
744
+
745
+ = packagesテーブル
746
+
747
+ # enscript sql
748
+ sqlite> .schema packages
749
+ CREATE TABLE packages (
750
+ id INTEGER NOT NULL,
751
+ name TEXT NOT NULL,
752
+ user_id INTEGER,
753
+ description TEXT,
754
+ watch_counter INTEGER,
755
+ download_counter INTEGER,
756
+ needs_sponsor INTEGER NOT NULL,
757
+ PRIMARY KEY (id),
758
+ FOREIGN KEY(user_id) REFERENCES users (id)
759
+ );
760
+
761
+ = package_versions\nテーブル
762
+
763
+ * パッケージの版管理
764
+ * 何度もアップロードすると増加
765
+
766
+ = package_versions\nテーブル
767
+
768
+ # enscript sql
769
+ sqlite> .schema package_versions
770
+ CREATE TABLE package_versions (
771
+ id INTEGER NOT NULL,
772
+ package_id INTEGER,
773
+ version TEXT NOT NULL,
774
+ maintainer TEXT NOT NULL,
775
+ section TEXT NOT NULL,
776
+ distribution TEXT NOT NULL,
777
+ qa_status INTEGER NOT NULL,
778
+ component TEXT NOT NULL,
779
+ priority TEXT,
780
+ closes TEXT,
781
+ uploaded DATETIME NOT NULL,
782
+ PRIMARY KEY (id),
783
+ FOREIGN KEY(package_id) REFERENCES packages (id)
784
+ );
785
+
786
+ = package_infoテーブル
787
+
788
+ * プラグインの適用結果を管理
789
+ * メタ情報を保持
790
+
791
+ = package_infoテーブル
792
+
793
+ # enscript sql
794
+ sqlite> .schema package_info
795
+ CREATE TABLE package_info (
796
+ id INTEGER NOT NULL,
797
+ package_version_id INTEGER,
798
+ from_plugin VARCHAR(200) NOT NULL,
799
+ outcome VARCHAR(200) NOT NULL,
800
+ data TEXT,
801
+ severity INTEGER NOT NULL,
802
+ PRIMARY KEY (id),
803
+ FOREIGN KEY(package_version_id) REFERENCES package_versions (id)
804
+ );
805
+
806
+ = package_infoテーブル
807
+
808
+ * from_plugin
809
+ * どのプラグインか
810
+ * outcome
811
+ * 説明文(エラーメッセージ)
812
+ * data
813
+ * JSONデータ
814
+
815
+ = package_infoの例
816
+
817
+ # enscript sql
818
+ sqlite> select * from package_info;
819
+ 1|1|native|Package is not native|{"native": false}|1
820
+ 2|1|maintaineremail|"Maintainer" email is the same as the uploader|{
821
+ "user-email": "hayashi@clear-code.com",
822
+ "uploader-emails": [],
823
+ "maintainer-email": "hayashi@clear-code.com",
824
+ "user-is-maintainer": true
825
+ }|1
826
+ 3|1|debianqa|Package is already in Debian|{
827
+ "nmu": false,
828
+ "in-debian": true,
829
+ "is-debian-maintainer": true
830
+ }|1
831
+
832
+ = やりたいこと
833
+
834
+ * RFSテンプレートから
835
+ * [fill in]撲滅
836
+ * mailto:リンクの生成
837
+
838
+ = 修正方針
839
+
840
+ * プラグインで追加のメタ情報を収集
841
+ * メール用のテンプレート追加
842
+ * 詳細ページでメタ情報を表示しつつmailto:リンク生成
843
+
844
+ = プラグイン?
845
+
846
+ * debexpoはプラグインで機能拡張する
847
+ * パッケージのチェックもプラグインを組み合わせて実現
848
+
849
+ = プラグインの作り方
850
+
851
+ * docs/writing_plugins.rst
852
+
853
+ = プラグインの雛形
854
+
855
+ # enscript python
856
+ class FooPlugin(BasePlugin):
857
+
858
+ def test_xxx(self):
859
+ self.passed(outcome, data, severity)
860
+ or
861
+ self.failed(outcome, data, severity)
862
+ plugin = FooPlugin
863
+
864
+ * debexpo/plugins/foo.py
865
+
866
+ = プラグインいろいろ
867
+
868
+ % wc -l debexpo/plugins/*.py
869
+ 99 debexpo/plugins/buildsystem.py
870
+ 67 debexpo/plugins/changeslist.py
871
+ 141 debexpo/plugins/closedbugs.py
872
+ 85 debexpo/plugins/controlfields.py
873
+ 185 debexpo/plugins/debianqa.py
874
+ 85 debexpo/plugins/diffclean.py
875
+ 63 debexpo/plugins/distribution.py
876
+ 123 debexpo/plugins/getorigtarball.py
877
+ 116 debexpo/plugins/lintian.py
878
+ 100 debexpo/plugins/maintaineremail.py
879
+ 69 debexpo/plugins/native.py
880
+ 77 debexpo/plugins/notuploader.py
881
+ 86 debexpo/plugins/removepackage.py
882
+ 60 debexpo/plugins/ubuntuversion.py
883
+ 110 debexpo/plugins/watchfile.py
884
+
885
+ = プラグインの適用方法
886
+
887
+ * 設定ファイル(.ini)で制御
888
+ * インポート前処理
889
+ * QA処理
890
+ * Debian入りした時
891
+ * インポート処理後
892
+
893
+ = プラグインを設定(1)
894
+
895
+ * debexpo.plugins.post_upload
896
+ * インポート前処理で適用
897
+ * getorigtarballプラグイン
898
+
899
+ = プラグインを設定(2)
900
+
901
+ * debexpo.plugins.qa
902
+ * QA処理で適用
903
+ * lintianプラグイン
904
+
905
+ = プラグインを設定(3)
906
+
907
+ * debexpo.plugins.post_upload_to_debian
908
+ * パッケージがDebian入りしたときに適用
909
+ * removepackageプラグイン
910
+
911
+ = プラグインを設定(4)
912
+
913
+ * debexpo.plugins.post_successful_upload
914
+ * インポート処理後に適用
915
+ * changeslistプラグイン
916
+
917
+ = プラグインの書きかた
918
+
919
+ なんとなくわかったのでいざ実践へ
920
+
921
+ = やったこと
922
+
923
+ * プラグインの処理を実装
924
+ * プラグインを適用
925
+ * mailto用テンプレート追加
926
+ * rfstemplateのデータを表示
927
+
928
+ = プラグインの処理を実装
929
+
930
+ * debexpo/plugins/rfstemplate.pyを実装
931
+ * 実質100行ないくらい
932
+ * debian/changelogやdebian/controlから抽出
933
+ * deb822, copyrightモジュールを活用
934
+
935
+ = プラグインを適用
936
+
937
+ debexpo.plugins.qa = ... rfstemplate ...
938
+
939
+ * development.iniに設定
940
+
941
+ = mailto用テンプレート追加
942
+
943
+ %if c.rfstemplate:
944
+ Upstream Author : ${ c.rfstemplate['upstream-author'] }
945
+ * URL : ${ c.rfstemplate['upstream-url'] }
946
+ * License : ${ c.rfstemplate['upstream-license'] }
947
+ %else:
948
+ Upstream Author : [fill in name and email of upstream]
949
+ * URL : [fill in URL of upstreams web site]
950
+ * License : [fill in]
951
+ %endif
952
+
953
+ * debexpo/templates/sponsor/rfs_template.mako
954
+
955
+ = rfstemplateの\nデータを表示
956
+
957
+ # enscript python
958
+ if latest:
959
+ rfstemplate = meta.session.query(PackageInfo)
960
+ .filter_by(package_version_id=latest.id)
961
+ .filter_by(from_plugin='rfstemplate').first()
962
+ if rfstemplate:
963
+ c.rfstemplate = json.loads(rfstemplate.data)
964
+ c.mailbody = render('/sponsor/rfs_template.mako')
965
+ return render('/sponsor/rfs_howto.mako')
966
+
967
+ * debexpo/controllers/sponsor.py
968
+
969
+ = 実際にデモ
970
+
971
+ = 成果物をPR#35で出した
972
+
973
+ # image
974
+ # relative-width = 60
975
+ # src = images/debexpo-pr35.png
976
+
977
+ (('tag:x-small'))https://github.com/debexpo/debexpo/pull/35
978
+
979
+ = PR#35の経過(1)
980
+
981
+ * May 4
982
+ * @olasdさんから好意的な反応
983
+ * May 14
984
+ * どうなった?とつついてみるも反応なし
985
+
986
+ = PR#35の経過(2)
987
+
988
+ * May 21
989
+ * Debian勉強会でまだマージされてない話をする
990
+ * あれやこれやでしばし放置
991
+
992
+ = PR#35の経過(3)
993
+
994
+ * June 19
995
+ * @paulproteusさんをつついてみる
996
+ * June 19
997
+ * 20日にみれるかもと@paulproteusさんから反応あり
998
+
999
+ = PR#35の経過(4)
1000
+
1001
+ # image
1002
+ # relative-width = 100
1003
+ # src = images/debexpo-pr35-paulproteus.png
1004
+
1005
+ * どうもDebConf16待ち
1006
+
1007
+ = まとめ
1008
+
1009
+ * debexpoとはmentors.d.nのこと
1010
+ * RFSテンプレートが残念だったので改善した
1011
+ * そのうちマージされる(多分)ので乞御期待
1012
+
1013
+ = 補足
1014
+
1015
+ * マージへ向けた懸念事項
1016
+ * mentors.d.nは運用環境がwheezyらしい
1017
+ * wheezyのままならrejectされるかも
1018
+ * 実装したプラグインがwheezyでは動かない(0.1.23以降が必要)
1019
+ * wheezyではpython-debianが古い(0.1.21)
1020
+ * jessieなら0.1.27なので動作する
1021
+
1022
+ = 会場からのフィードバック
1023
+
1024
+ * メールのリンクをもっと目立たせたほうがよいのでは
1025
+ * => その通りなので直しておきたい
metadata ADDED
@@ -0,0 +1,104 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rabbit-slide-kenhys-tokyodebian-debexpo-20160625
3
+ version: !ruby/object:Gem::Version
4
+ version: 2016.06.25
5
+ platform: ruby
6
+ authors:
7
+ - Kentaro Hayashi
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-06-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rabbit
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.0.2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 2.0.2
27
+ description: 2016年6月25日に渋谷dotsで開催された、東京Debian勉強会の発表資料です。
28
+ email:
29
+ - kenhys@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".rabbit"
35
+ - README.md
36
+ - Rakefile
37
+ - config.yaml
38
+ - images/alioth-debexpo-313593-request.png
39
+ - images/broken-ci-since-8month-ago.png
40
+ - images/computer_trackpoint_classicdome.png
41
+ - images/computer_trackpoint_softdome.png
42
+ - images/computer_trackpoint_softrim.png
43
+ - images/debexpo-dmup.png
44
+ - images/debexpo-investigate-rfs-template-link.png
45
+ - images/debexpo-mascot-zoom.png
46
+ - images/debexpo-on-localhost.png
47
+ - images/debexpo-package-list.png
48
+ - images/debexpo-pr32-use-latest-wheezy.png
49
+ - images/debexpo-pr34-incoming-directory.png
50
+ - images/debexpo-pr35-paulproteus.png
51
+ - images/debexpo-pr35.png
52
+ - images/debexpo-pr37-drop-py26.png
53
+ - images/debexpo-pr38-broken-ci.png
54
+ - images/debexpo-pr39-skip-gpg.png
55
+ - images/debexpo-sign-me-up.png
56
+ - images/find-a-debexpo-bug.png
57
+ - images/irasutoya.png
58
+ - images/last-change-on-alioth.png
59
+ - images/last-change-on-github.png
60
+ - images/mentors.d.n.png
61
+ - images/openlogo-nd-50.png
62
+ - images/openlogo-nd-75.png
63
+ - images/qa-information.png
64
+ - images/rfs-template-fill-in1.png
65
+ - images/rfs-template-fill-in2.png
66
+ - images/rfs-template-fill-in3.png
67
+ - images/rfs-template-fill-in4.png
68
+ - images/rfs-template-fill-in5.png
69
+ - images/rfs-template-pithole.png
70
+ - images/rfs-template-pithole2.png
71
+ - images/rfs-template-pithole3.png
72
+ - images/source-code-and-bugs.png
73
+ - images/track-points.png
74
+ - images/update-dmup.png
75
+ - images/update-verification.png
76
+ - images/view-rfs-template.png
77
+ - pdf/tokyodebian-debexpo-20160625-tokyodebian-debexpo-20160625.pdf
78
+ - theme.rb
79
+ - tokyodebian-debexpo-20160625.rab
80
+ homepage: http://slide.rabbit-shocker.org/authors/kenhys/tokyodebian-debexpo-20160625/
81
+ licenses:
82
+ - CC-BY-SA-4.0
83
+ metadata: {}
84
+ post_install_message:
85
+ rdoc_options: []
86
+ require_paths:
87
+ - lib
88
+ required_ruby_version: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ requirements: []
99
+ rubyforge_project:
100
+ rubygems_version: 2.5.1
101
+ signing_key:
102
+ specification_version: 4
103
+ summary: debexpo(mentors.d.n)をハックするには
104
+ test_files: []