rabbit-slide-kenhys-tokyodebian-debexpo-20201121 2020.11.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 793c7915ab0075fed3df1b57eb496ab3615f505e9345f4bd50071ab7d4047fb2
4
+ data.tar.gz: 212312ad3ddbac3a6becd69d19f6fd99972a326b41ebda96a6cd0ef5ed8cac47
5
+ SHA512:
6
+ metadata.gz: 2a8fa009c5f7069311f4a8813cc453b7788dc8fe4b3f9b08d89eb4d826e2051bc83e5f1c38d1dcb2d137a077b431acf24c59dc6e5b87419f9f6b7d294f2328d3
7
+ data.tar.gz: 7757e8df0494e6cd759b09613e6acaaa01fa4b5eea62d00ff5be0d0d70217d8e23ac4ca5d4c26ee360459cc5ad84509af7e266b4b6b0e92fa36df3364cebbbcb
data/.rabbit ADDED
@@ -0,0 +1 @@
1
+ --size=1024,768 tokyodebian-debexpo-20201121.md
@@ -0,0 +1,14 @@
1
+ # Tokyo Debian debexpo 20201121
2
+
3
+ ## How to show
4
+
5
+ % rabbit
6
+
7
+ ## How to install
8
+
9
+ % gem install rabbit-slide-kenhys-tokyodebian-debexpo-20201121
10
+
11
+ ## How to create PDF
12
+
13
+ % rake pdf
14
+
@@ -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("rabbit-theme-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,25 @@
1
+ ---
2
+ id: tokyodebian-debexpo-20201121
3
+ base_name: tokyodebian-debexpo-20201121
4
+ tags:
5
+ - rabbit
6
+ - debexpo
7
+ - mentors.debian.net
8
+ presentation_date: 2020-11-21
9
+ presentation_start_time:
10
+ presentation_end_time:
11
+ slideshare_id:
12
+ version: 2020.11.21.1
13
+ licenses:
14
+ - CC-BY-SA-4.0
15
+ slideshare_id: kenhys
16
+ speaker_deck_id:
17
+ vimeo_id:
18
+ youtube_id:
19
+ author:
20
+ markup_language: :md
21
+ name: Kentaro Hayashi
22
+ email: kenhys@gmail.com
23
+ rubygems_user: kenhys
24
+ slideshare_user:
25
+ speaker_deck_user:
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,5 @@
1
+ @default_font = "Ubuntu"
2
+ @monospace_font = "Ubuntu"
3
+ include_theme("debian")
4
+ @slide_show_span = 1300
5
+ @slide_show_loop = true
@@ -0,0 +1,308 @@
1
+ # debexpo(mentors.d.n)をハックするには
2
+
3
+ subtitle
4
+ : (2020年版)
5
+
6
+ author
7
+ : Kentaro Hayashi
8
+
9
+ institution
10
+ : ClearCode Inc.
11
+
12
+ content-source
13
+ : 2020年11月 東京エリア・関西合同Debian勉強会
14
+
15
+ allotted-time
16
+ : 15m
17
+
18
+ theme
19
+ : .
20
+
21
+ # お知らせ: スライドは公開済みです
22
+
23
+ * この資料はRabbit Slide Showで閲覧できます
24
+ * debexpo(mentors.d.n)をハックするには(2020年版)
25
+ * <https://slide.rabbit-shocker.org/authors/kenhys/tokyodebian-debexpo-20201121/>
26
+
27
+
28
+ # プロフィール
29
+
30
+ ![](images/profile.png){:relative-height="40"}
31
+
32
+ * ひよこDebian Developer (@kenhys) 2020/09-
33
+ * トラックポイント(ソフトドーム派)
34
+
35
+ # 本日の内容
36
+
37
+ * mentors.debian.netについて
38
+ * 前に発表したときから変わったこと
39
+ * 開発環境のつくりかた
40
+ * まとめ
41
+
42
+ # mentors.debian.netとは
43
+
44
+ * コントリビューターとスポンサーをつなぐサイト
45
+ * 一時的なアップロード先として使える
46
+ * RFSの雛形も用意してくれる
47
+ * パッケージのチェック結果をWebで確認できる
48
+
49
+ # 前回からのあらすじ(2016-06-25)
50
+
51
+ * debexpoをハックするには
52
+ * 東京Debian勉強会 140回
53
+ * mentors.d.nの残念なところをどうにかしようとした話
54
+ * <https://slide.rabbit-shocker.org/authors/kenhys/tokyodebian-debexpo-20160625/>
55
+
56
+ # その後の主な動き
57
+
58
+ * GitHubからSalsaへ移行した
59
+ * Python2からPython3に移行した
60
+ * PylonsからDjangoへ移行した
61
+ * メッセージの国際化対応(フランス語)
62
+
63
+ # 開発環境を構築するには
64
+
65
+ * 必要なものをインストール
66
+ * ホストの設定を追加する
67
+ * サーバーを起動する
68
+ * ワーカーを起動する
69
+
70
+ # 必要なものをインストール
71
+
72
+ ```sh
73
+ $ git clone https://salsa.debian.org/mentors.debian.net-team/debexpo.git
74
+ $ cd debexpo
75
+ $ python3 setup.py build
76
+ $ python3 setup.py install
77
+ $ python3 setup.py develop
78
+ $ python3 manage.py migrate
79
+ $ python3 manage.py collectstatic --no-input --clear
80
+ ```
81
+
82
+ * パッケージでいれるかvirtualenv使うかはお好みで
83
+
84
+ # ホストの設定を追加する
85
+
86
+ ```sh
87
+ diff --git a/debexpo/settings/develop.py b/debexpo/settings/develop.py
88
+ index 7b7121b7..3e8c2cbc 100644
89
+ --- a/debexpo/settings/develop.py
90
+ +++ b/debexpo/settings/develop.py
91
+ @@ -35,7 +35,7 @@ SECRET_KEY = 'DoNotUseThisKeyInProductionEnvironment'
92
+ # SECURITY WARNING: don't run with debug turned on in production!
93
+ DEBUG = True
94
+
95
+ -ALLOWED_HOSTS = []
96
+ +ALLOWED_HOSTS = ["*"]
97
+ ```
98
+ * これをしておかないとdputできない
99
+
100
+ # サーバーを起動する
101
+
102
+
103
+ ```sh
104
+ $ python3 manage.py runserver 0.0.0.0:8000
105
+ ```
106
+
107
+ * 他のホストからアクセスしないなら0.0.0.0:8000は不要
108
+ * 依存関係を嫌ってVMを立てたときは忘れずに
109
+
110
+ # ワーカーを起動する
111
+
112
+ ```sh
113
+ $ celery --app debexpo worker --beat
114
+ ```
115
+
116
+ * バックグラウンドジョブを走らせる
117
+ * 例:パッケージをインポートする
118
+
119
+ # ワーカーが正常に起動できると
120
+
121
+
122
+ ```sh
123
+ $ celery --app debexpo inspect registered
124
+ -> celery@buster: OK
125
+ * debexpo.accounts.tasks.CleanupAccounts
126
+ * debexpo.importer.tasks.importer
127
+ * debexpo.packages.tasks.remove_old_uploads
128
+ * debexpo.packages.tasks.remove_uploaded_packages
129
+ * debexpo.repository.tasks.remove_from_repository
130
+ ```
131
+
132
+ # アップロードする前に
133
+
134
+ ```sh
135
+ [debexpo]
136
+ fqdn = localhost:8000
137
+ incoming = /upload
138
+ method = http
139
+ allow_unsigned_uploads = 0
140
+ ```
141
+
142
+ * `~/.dput.cf` に設定を追加する
143
+
144
+ # アカウントを作成する
145
+
146
+ * サインインのリンクを踏む
147
+ * フォームへアカウントの情報を入力する
148
+ * mboxを参照してアクティベート
149
+ * GPGの鍵を登録する
150
+
151
+ # サインインのリンクを踏む
152
+
153
+ ![](images/signin-debexpo.png)
154
+
155
+ * 画面右上のSign me upをクリックする
156
+
157
+ # フォームへアカウントの情報を入力する
158
+
159
+ ![](images/signup-form-debexpo.png)
160
+
161
+ * 名前とメールアドレスを入力する
162
+
163
+ # mboxを参照してアクティベート
164
+
165
+ ```sh
166
+ $ find data/mbox/
167
+ data/mbox/
168
+ data/mbox/20201107-082449-140269976552592.log
169
+ ```
170
+
171
+ * メールの内容がmbox以下に作成される
172
+
173
+ # アカウントのアクティベート
174
+
175
+ ```sh
176
+ Content-Type: text/plain; charset="utf-8"
177
+ MIME-Version: 1.0
178
+ Content-Transfer-Encoding: 7bit
179
+ Subject: Next step: Confirm your email address
180
+ From: debexpo <support@example.org>
181
+ To: kenhys@gmail.com
182
+ Date: Sat, 07 Nov 2020 08:24:49 -0000
183
+ Message-ID: <160473748915.1139.18222488963671024124@localhost>
184
+
185
+ Hello,
186
+
187
+ Please activate your account by visiting the following address
188
+ in your web-browser:
189
+
190
+ http://192.168.121.172:8000/accounts/reset/MQ/5le-acd00fdca7302c8dee26/
191
+
192
+ If you didn't create an account on debexpo,
193
+ you can safely ignore this email.
194
+
195
+ Thanks,
196
+ ```
197
+
198
+ # GPGの鍵を登録する
199
+
200
+ ```sh
201
+ gpg --export --export-options export-minimal --armor keyid
202
+ ```
203
+
204
+ * フォームに上記の結果を貼り付けて登録する
205
+
206
+ # パッケージをアップロードする
207
+
208
+ ```sh
209
+ $ dput debexpo xxx.changes
210
+ ```
211
+
212
+ * パッケージに署名するのを忘れずに
213
+
214
+ # 明示的にインポートするには
215
+
216
+ ```sh
217
+ $ celery --app debexpo call debexpo.importer.tasks.importer
218
+ ```
219
+
220
+ * すぐにインポートしたいときに使う
221
+
222
+ # 最近やったこと
223
+
224
+ * すでにDebianにはいっているかどうか区別できるようにする
225
+ * <https://salsa.debian.org/mentors.debian.net-team/debexpo/-/merge_requests/167>
226
+
227
+ # 修正画面イメージ
228
+
229
+ ![](images/packages-list.png){:relative-width="90"}
230
+
231
+ # Packages listの関連ファイル
232
+
233
+ ```sh
234
+ % find debexpo/packages/
235
+ debexpo/packages/
236
+ debexpo/packages/serializers.py
237
+ debexpo/packages/views.py
238
+ debexpo/packages/__init__.py
239
+ debexpo/packages/migrations
240
+ debexpo/packages/migrations/0001_initial.py
241
+ debexpo/packages/migrations/__init__.py
242
+ debexpo/packages/apps.py
243
+ debexpo/packages/tasks.py
244
+ debexpo/packages/templates
245
+ debexpo/packages/templates/package.html
246
+ debexpo/packages/templates/packages.html
247
+ debexpo/packages/templates/packages-list.html
248
+ debexpo/packages/templates/email-upload-removed.html
249
+ debexpo/packages/models.py
250
+ ```
251
+
252
+ # Packages listの関連スキーマ
253
+
254
+ ```sh
255
+ sqlite3 db.sqlite3
256
+ SQLite version 3.27.2 2019-02-25 16:06:06
257
+ Enter ".help" for usage hints.
258
+ sqlite> .schema packages_package
259
+ CREATE TABLE IF NOT EXISTS "packages_package" (
260
+ "id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
261
+ "name" varchar(100) NOT NULL UNIQUE,
262
+ "needs_sponsor" bool NOT NULL,
263
+ "in_debian" bool NOT NULL);
264
+ ```
265
+
266
+ # Packages listのviewを修正
267
+
268
+ ```sh
269
+ diff --git a/debexpo/packages/templates/packages-list.html b/debexpo/packages/templates/packages-list.html
270
+ index 263f8e50..299b84f0 100644
271
+ --- a/debexpo/packages/templates/packages-list.html
272
+ +++ b/debexpo/packages/templates/packages-list.html
273
+ @@ -7,10 +7,11 @@
274
+ <table width="100%">
275
+ <tr>
276
+ <th width="15%">{% trans 'Package' %}</th>
277
+ - <th width="40%">{% trans 'Description' %}</th>
278
+ + <th width="30%">{% trans 'Description' %}</th>
279
+ <th width="20%">{% trans 'Version' %}</th>
280
+ <th width="15%">{% trans 'Uploader' %}</th>
281
+ <th width="10%">{% trans 'Needs a sponsor?' %}</th>
282
+ + <th width="10%">{% trans 'Already in Debian' %}</th>
283
+ </tr>
284
+
285
+ {% for pkg in group.packages %}
286
+ @@ -32,6 +33,13 @@
287
+ {% trans 'No' %}
288
+ {% endif %}
289
+ </td>
290
+ + <td class="lines">
291
+ + {% if pkg.in_debian %}
292
+ + {% trans 'Yes' %}
293
+ + {% else %}
294
+ + {% trans 'No' %}
295
+ + {% endif %}
296
+ + </td>
297
+ </tr>
298
+ {% endfor %}
299
+ </table>
300
+ ```
301
+
302
+ # まとめ
303
+
304
+ * mentors.d.nは継続的に開発が続いているよ
305
+ * DjangoアプリなのでPythonな人はいじりやすいかも
306
+ * 解決したいissueがいっぱいあるよ
307
+ * <https://salsa.debian.org/mentors.debian.net-team/debexpo/-/issues>
308
+ * 気になるところがあればぜひフィードバックしよう
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rabbit-slide-kenhys-tokyodebian-debexpo-20201121
3
+ version: !ruby/object:Gem::Version
4
+ version: 2020.11.21.1
5
+ platform: ruby
6
+ authors:
7
+ - Kentaro Hayashi
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-11-07 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: ''
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/debexpo-issues.png
39
+ - images/debexpo-slide-title-2016.png
40
+ - images/packages-list.png
41
+ - images/profile.png
42
+ - images/signin-debexpo.png
43
+ - images/signup-form-debexpo.png
44
+ - pdf/tokyodebian-debexpo-20201121-tokyodebian-debexpo-20201121.pdf
45
+ - theme.rb
46
+ - tokyodebian-debexpo-20201121.md
47
+ homepage: https://slide.rabbit-shocker.org/authors/kenhys/tokyodebian-debexpo-20201121/
48
+ licenses:
49
+ - CC-BY-SA-4.0
50
+ metadata: {}
51
+ post_install_message:
52
+ rdoc_options: []
53
+ require_paths:
54
+ - lib
55
+ required_ruby_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ requirements: []
66
+ rubygems_version: 3.1.4
67
+ signing_key:
68
+ specification_version: 4
69
+ summary: Tokyo Debian debexpo 20201121
70
+ test_files: []