18c2ecf20Sopenharmony_ciNOTE: 28c2ecf20Sopenharmony_ciThis is a version of Documentation/process/howto.rst translated into Japanese. 38c2ecf20Sopenharmony_ciThis document is maintained by Tsugikazu Shibata <tshibata@ab.jp.nec.com> 48c2ecf20Sopenharmony_ciIf you find any difference between this document and the original file or 58c2ecf20Sopenharmony_cia problem with the translation, please contact the maintainer of this file. 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciPlease also note that the purpose of this file is to be easier to 88c2ecf20Sopenharmony_ciread for non English (read: Japanese) speakers and is not intended as 98c2ecf20Sopenharmony_cia fork. So if you have any comments or updates for this file, please 108c2ecf20Sopenharmony_citry to update the original English file first. 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci---------------------------------- 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ciこの文書は、 158c2ecf20Sopenharmony_ciDocumentation/process/howto.rst 168c2ecf20Sopenharmony_ciの和訳です。 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci翻訳者: Tsugikazu Shibata <tshibata@ab.jp.nec.com> 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci---------------------------------- 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ciLinux カーネル開発のやり方 238c2ecf20Sopenharmony_ci========================== 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ciこれは上のトピック( Linux カーネル開発のやり方)の重要な事柄を網羅した 268c2ecf20Sopenharmony_ciドキュメントです。ここには Linux カーネル開発者になるための方法とLinux 278c2ecf20Sopenharmony_ciカーネル開発コミュニティと共に活動するやり方を学ぶ方法が含まれています。 288c2ecf20Sopenharmony_ciカーネルプログラミングに関する技術的な項目に関することは何も含めないよ 298c2ecf20Sopenharmony_ciうにしていますが、カーネル開発者となるための正しい方向に向かう手助けに 308c2ecf20Sopenharmony_ciなります。 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ciもし、このドキュメントのどこかが古くなっていた場合には、このドキュメント 338c2ecf20Sopenharmony_ciの最後にリストしたメンテナにパッチを送ってください。 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ciはじめに 368c2ecf20Sopenharmony_ci--------- 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ciあなたは Linux カーネルの開発者になる方法を学びたいのでしょうか? そ 398c2ecf20Sopenharmony_ciれとも上司から「このデバイスの Linux ドライバを書くように」と言われた 408c2ecf20Sopenharmony_ciのかもしれません。この文書の目的は、あなたが踏むべき手順と、コミュニティ 418c2ecf20Sopenharmony_ciと一緒にうまく働くヒントを書き下すことで、あなたが知るべき全てのことを 428c2ecf20Sopenharmony_ci教えることです。また、このコミュニティがなぜ今うまくまわっているのかと 438c2ecf20Sopenharmony_ciいう理由も説明しようと試みています。 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ciカーネルは少量のアーキテクチャ依存部分がアセンブリ言語で書かれている以 468c2ecf20Sopenharmony_ci外の大部分は C 言語で書かれています。C言語をよく理解していることはカー 478c2ecf20Sopenharmony_ciネル開発に必要です。低レベルのアーキテクチャ開発をするのでなければ、 488c2ecf20Sopenharmony_ci(どんなアーキテクチャでも)アセンブリ(訳注: 言語)は必要ありません。以下 498c2ecf20Sopenharmony_ciの本は、C 言語の十分な知識や何年もの経験に取って代わるものではありませ 508c2ecf20Sopenharmony_ciんが、少なくともリファレンスとしては良い本です。 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci - "The C Programming Language" by Kernighan and Ritchie [Prentice Hall] 538c2ecf20Sopenharmony_ci - 『プログラミング言語C第2版』(B.W. カーニハン/D.M. リッチー著 石田晴久訳) [共立出版] 548c2ecf20Sopenharmony_ci - "Practical C Programming" by Steve Oualline [O'Reilly] 558c2ecf20Sopenharmony_ci - 『C実践プログラミング第3版』(Steve Oualline著 望月康司監訳 谷口功訳) [オライリージャパン] 568c2ecf20Sopenharmony_ci - "C: A Reference Manual" by Harbison and Steele [Prentice Hall] 578c2ecf20Sopenharmony_ci - 『新・詳説 C 言語 H&S リファレンス』 (サミュエル P ハービソン/ガイ L スティール共著 斉藤 信男監訳)[ソフトバンク] 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ciカーネルは GNU C と GNU ツールチェインを使って書かれています。カーネル 608c2ecf20Sopenharmony_ciは ISO C89 仕様に準拠して書く一方で、標準には無い言語拡張を多く使って 618c2ecf20Sopenharmony_ciいます。カーネルは標準 C ライブラリに依存しない、C 言語非依存環境です。 628c2ecf20Sopenharmony_ciそのため、C の標準の中で使えないものもあります。特に任意の long long 638c2ecf20Sopenharmony_ciの除算や浮動小数点は使えません。カーネルがツールチェインや C 言語拡張 648c2ecf20Sopenharmony_ciに置いている前提がどうなっているのかわかりにくいことが時々あり、また、 658c2ecf20Sopenharmony_ci残念なことに決定的なリファレンスは存在しません。情報を得るには、gcc の 668c2ecf20Sopenharmony_ciinfo ページ( info gcc )を見てください。 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ciあなたは既存の開発コミュニティと一緒に作業する方法を学ぼうとしているこ 698c2ecf20Sopenharmony_ciとに思い出してください。そのコミュニティは、コーディング、スタイル、開 708c2ecf20Sopenharmony_ci発手順について高度な標準を持つ、多様な人の集まりです。地理的に分散した 718c2ecf20Sopenharmony_ci大規模なチームに対してもっともうまくいくとわかったことをベースにしなが 728c2ecf20Sopenharmony_ciら、これらの標準は長い時間をかけて築かれてきました。これらはきちんと文 738c2ecf20Sopenharmony_ci書化されていますから、事前にこれらの標準について事前にできるだけたくさ 748c2ecf20Sopenharmony_ciん学んでください。また皆があなたやあなたの会社のやり方に合わせてくれる 758c2ecf20Sopenharmony_ciと思わないでください。 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ci法的問題 788c2ecf20Sopenharmony_ci-------- 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ciLinux カーネルのソースコードは GPL ライセンスの下でリリースされていま 818c2ecf20Sopenharmony_ciす。ライセンスの詳細については、ソースツリーのメインディレクトリに存在 828c2ecf20Sopenharmony_ciする、COPYING のファイルを見てください。もしライセンスについてさらに質 838c2ecf20Sopenharmony_ci問があれば、Linux Kernel メーリングリストに質問するのではなく、どうぞ 848c2ecf20Sopenharmony_ci法律家に相談してください。メーリングリストの人達は法律家ではなく、法的 858c2ecf20Sopenharmony_ci問題については彼らの声明はあてにするべきではありません。 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ciGPL に関する共通の質問や回答については、以下を参照してください- 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci https://www.gnu.org/licenses/gpl-faq.html 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ciドキュメント 928c2ecf20Sopenharmony_ci------------ 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_ciLinux カーネルソースツリーは幅広い範囲のドキュメントを含んでおり、それ 958c2ecf20Sopenharmony_ciらはカーネルコミュニティと会話する方法を学ぶのに非常に貴重なものです。 968c2ecf20Sopenharmony_ci新しい機能がカーネルに追加される場合、その機能の使い方について説明した 978c2ecf20Sopenharmony_ci新しいドキュメントファイルも追加することを勧めます。 988c2ecf20Sopenharmony_ciカーネルの変更が、カーネルがユーザ空間に公開しているインターフェイスの 998c2ecf20Sopenharmony_ci変更を引き起こす場合、その変更を説明するマニュアルページのパッチや情報 1008c2ecf20Sopenharmony_ciをマニュアルページのメンテナ mtk.manpages@gmail.com に送り、CC を 1018c2ecf20Sopenharmony_cilinux-api@vger.kernel.org に送ることを勧めます。 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci以下はカーネルソースツリーに含まれている読んでおくべきファイルの一覧で 1048c2ecf20Sopenharmony_ciす- 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ci README 1078c2ecf20Sopenharmony_ci このファイルは Linuxカーネルの簡単な背景とカーネルを設定(訳注 1088c2ecf20Sopenharmony_ci configure )し、生成(訳注 build )するために必要なことは何かが書かれ 1098c2ecf20Sopenharmony_ci ています。 カーネルに関して初めての人はここからスタートすると良い 1108c2ecf20Sopenharmony_ci でしょう。 1118c2ecf20Sopenharmony_ci 1128c2ecf20Sopenharmony_ci :ref:`Documentation/process/changes.rst <changes>` 1138c2ecf20Sopenharmony_ci このファイルはカーネルをうまく生成(訳注 build )し、走らせるのに最 1148c2ecf20Sopenharmony_ci 小限のレベルで必要な数々のソフトウェアパッケージの一覧を示してい 1158c2ecf20Sopenharmony_ci ます。 1168c2ecf20Sopenharmony_ci 1178c2ecf20Sopenharmony_ci :ref:`Documentation/process/coding-style.rst <codingstyle>` 1188c2ecf20Sopenharmony_ci これは Linux カーネルのコーディングスタイルと背景にある理由を記述 1198c2ecf20Sopenharmony_ci しています。全ての新しいコードはこのドキュメントにあるガイドライン 1208c2ecf20Sopenharmony_ci に従っていることを期待されています。大部分のメンテナはこれらのルー 1218c2ecf20Sopenharmony_ci ルに従っているものだけを受け付け、多くの人は正しいスタイルのコード 1228c2ecf20Sopenharmony_ci だけをレビューします。 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ci :ref:`Documentation/process/submitting-patches.rst <codingstyle>` と :ref:`Documentation/process/submitting-drivers.rst <submittingdrivers>` 1258c2ecf20Sopenharmony_ci これらのファイルには、どうやってうまくパッチを作って投稿するかにつ 1268c2ecf20Sopenharmony_ci いて非常に詳しく書かれており、以下を含みます (これだけに限らない 1278c2ecf20Sopenharmony_ci けれども) 1288c2ecf20Sopenharmony_ci 1298c2ecf20Sopenharmony_ci - Email に含むこと 1308c2ecf20Sopenharmony_ci - Email の形式 1318c2ecf20Sopenharmony_ci - だれに送るか 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ci これらのルールに従えばうまくいくことを保証することではありません 1348c2ecf20Sopenharmony_ci が (すべてのパッチは内容とスタイルについて精査を受けるので)、 1358c2ecf20Sopenharmony_ci ルールに従わなければ間違いなくうまくいかないでしょう。 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_ci この他にパッチを作る方法についてのよくできた記述は- 1388c2ecf20Sopenharmony_ci 1398c2ecf20Sopenharmony_ci "The Perfect Patch" 1408c2ecf20Sopenharmony_ci http://www.ozlabs.org/~akpm/stuff/tpp.txt 1418c2ecf20Sopenharmony_ci "Linux kernel patch submission format" 1428c2ecf20Sopenharmony_ci https://web.archive.org/web/20180829112450/http://linux.yyz.us/patch-format.html 1438c2ecf20Sopenharmony_ci 1448c2ecf20Sopenharmony_ci :ref:`Documentation/process/stable-api-nonsense.rst <stable_api_nonsense>` 1458c2ecf20Sopenharmony_ci このファイルはカーネルの中に不変の API を持たないことにした意識的 1468c2ecf20Sopenharmony_ci な決断の背景にある理由について書かれています。以下のようなことを含 1478c2ecf20Sopenharmony_ci んでいます- 1488c2ecf20Sopenharmony_ci 1498c2ecf20Sopenharmony_ci - サブシステムとの間に層を作ること(コンパチビリティのため?) 1508c2ecf20Sopenharmony_ci - オペレーティングシステム間のドライバの移植性 1518c2ecf20Sopenharmony_ci - カーネルソースツリーの素早い変更を遅らせる(もしくは素早い変更を妨げる) 1528c2ecf20Sopenharmony_ci 1538c2ecf20Sopenharmony_ci このドキュメントは Linux 開発の思想を理解するのに非常に重要です。 1548c2ecf20Sopenharmony_ci そして、他のOSでの開発者が Linux に移る時にとても重要です。 1558c2ecf20Sopenharmony_ci 1568c2ecf20Sopenharmony_ci :ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>` 1578c2ecf20Sopenharmony_ci もし Linux カーネルでセキュリティ問題を発見したように思ったら、こ 1588c2ecf20Sopenharmony_ci のドキュメントのステップに従ってカーネル開発者に連絡し、問題解決を 1598c2ecf20Sopenharmony_ci 支援してください。 1608c2ecf20Sopenharmony_ci 1618c2ecf20Sopenharmony_ci :ref:`Documentation/process/management-style.rst <managementstyle>` 1628c2ecf20Sopenharmony_ci このドキュメントは Linux カーネルのメンテナ達がどう行動するか、 1638c2ecf20Sopenharmony_ci 彼らの手法の背景にある共有されている精神について記述しています。こ 1648c2ecf20Sopenharmony_ci れはカーネル開発の初心者なら(もしくは、単に興味があるだけの人でも) 1658c2ecf20Sopenharmony_ci 重要です。なぜならこのドキュメントは、カーネルメンテナ達の独特な 1668c2ecf20Sopenharmony_ci 行動についての多くの誤解や混乱を解消するからです。 1678c2ecf20Sopenharmony_ci 1688c2ecf20Sopenharmony_ci :ref:`Documentation/process/stable-kernel-rules.rst <stable_kernel_rules>` 1698c2ecf20Sopenharmony_ci このファイルはどのように stable カーネルのリリースが行われるかのルー 1708c2ecf20Sopenharmony_ci ルが記述されています。そしてこれらのリリースの中のどこかで変更を取 1718c2ecf20Sopenharmony_ci り入れてもらいたい場合に何をすれば良いかが示されています。 1728c2ecf20Sopenharmony_ci 1738c2ecf20Sopenharmony_ci :Ref:`Documentation/process/kernel-docs.rst <kernel_docs>` 1748c2ecf20Sopenharmony_ci カーネル開発に付随する外部ドキュメントのリストです。もしあなたが探 1758c2ecf20Sopenharmony_ci しているものがカーネル内のドキュメントでみつからなかった場合、この 1768c2ecf20Sopenharmony_ci リストをあたってみてください。 1778c2ecf20Sopenharmony_ci 1788c2ecf20Sopenharmony_ci :ref:`Documentation/process/applying-patches.rst <applying_patches>` 1798c2ecf20Sopenharmony_ci パッチとはなにか、パッチをどうやって様々なカーネルの開発ブランチに 1808c2ecf20Sopenharmony_ci 適用するのかについて正確に記述した良い入門書です。 1818c2ecf20Sopenharmony_ci 1828c2ecf20Sopenharmony_ciカーネルはソースコードそのものや、このファイルのようなリストラクチャー 1838c2ecf20Sopenharmony_ciドテキストマークアップ(ReST)から自動的に生成可能な多数のドキュメントを 1848c2ecf20Sopenharmony_ciもっています。これにはカーネル内APIの完全な記述や、正しくロックをかけ 1858c2ecf20Sopenharmony_ciるための規則などが含まれます。 1868c2ecf20Sopenharmony_ci 1878c2ecf20Sopenharmony_ciこれら全てのドキュメントを PDF や HTML で生成するには以下を実行します - :: 1888c2ecf20Sopenharmony_ci 1898c2ecf20Sopenharmony_ci make pdfdocs 1908c2ecf20Sopenharmony_ci make htmldocs 1918c2ecf20Sopenharmony_ci 1928c2ecf20Sopenharmony_ciそれぞれメインカーネルのソースディレクトリから実行します。 1938c2ecf20Sopenharmony_ci 1948c2ecf20Sopenharmony_ciReSTマークアップを使ったドキュメントは Documentation/outputに生成され 1958c2ecf20Sopenharmony_ciます。Latex とePub 形式で生成するには - :: 1968c2ecf20Sopenharmony_ci 1978c2ecf20Sopenharmony_ci make latexdocs 1988c2ecf20Sopenharmony_ci make epubdocs 1998c2ecf20Sopenharmony_ci 2008c2ecf20Sopenharmony_ciカーネル開発者になるには 2018c2ecf20Sopenharmony_ci------------------------ 2028c2ecf20Sopenharmony_ci 2038c2ecf20Sopenharmony_ciもしあなたが、Linux カーネル開発について何も知らないのならば、 2048c2ecf20Sopenharmony_ciKernelNewbies プロジェクトを見るべきです 2058c2ecf20Sopenharmony_ci 2068c2ecf20Sopenharmony_ci https://kernelnewbies.org 2078c2ecf20Sopenharmony_ci 2088c2ecf20Sopenharmony_ciこのサイトには役に立つメーリングリストがあり、基本的なカーネル開発に関 2098c2ecf20Sopenharmony_ciするほとんどどんな種類の質問もできます (既に回答されているようなことを 2108c2ecf20Sopenharmony_ci聞く前にまずはアーカイブを調べてください)。またここには、リアルタイム 2118c2ecf20Sopenharmony_ciで質問を聞くことができる IRC チャネルや、Linuxカーネルの開発に関して学 2128c2ecf20Sopenharmony_ciぶのに便利なたくさんの役に立つドキュメントがあります。 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_ciWeb サイトには、コードの構成、サブシステム、現在存在するプロジェクト 2158c2ecf20Sopenharmony_ci(ツリーにあるもの無いものの両方)の基本的な管理情報があります。ここには、 2168c2ecf20Sopenharmony_ciまた、カーネルのコンパイルのやり方やパッチの当て方などの間接的な基本情 2178c2ecf20Sopenharmony_ci報も記述されています。 2188c2ecf20Sopenharmony_ci 2198c2ecf20Sopenharmony_ciあなたがどこからスタートして良いかわからないが、Linux カーネル開発コミュ 2208c2ecf20Sopenharmony_ciニティに参加して何かすることをさがしているのであれば、Linux kernel 2218c2ecf20Sopenharmony_ciJanitor's プロジェクトにいけば良いでしょう - 2228c2ecf20Sopenharmony_ci 2238c2ecf20Sopenharmony_ci https://kernelnewbies.org/KernelJanitors 2248c2ecf20Sopenharmony_ci 2258c2ecf20Sopenharmony_ciここはそのようなスタートをするのにうってつけの場所です。ここには、 2268c2ecf20Sopenharmony_ciLinux カーネルソースツリーの中に含まれる、きれいにし、修正しなければな 2278c2ecf20Sopenharmony_ciらない、単純な問題のリストが記述されています。このプロジェクトに関わる 2288c2ecf20Sopenharmony_ci開発者と一緒に作業することで、あなたのパッチを Linuxカーネルツリーに入 2298c2ecf20Sopenharmony_ciれるための基礎を学ぶことができ、そしてもしあなたがまだアイディアを持っ 2308c2ecf20Sopenharmony_ciていない場合には、次にやる仕事の方向性が見えてくるかもしれません。 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ciもしあなたが、すでにひとまとまりコードを書いていて、カーネルツリーに入 2338c2ecf20Sopenharmony_ciれたいと思っていたり、それに関する適切な支援を求めたい場合、カーネルメ 2348c2ecf20Sopenharmony_ciンターズプロジェクトはそのような皆さんを助けるためにできました。ここに 2358c2ecf20Sopenharmony_ciはメーリングリストがあり、以下から参照できます - 2368c2ecf20Sopenharmony_ci 2378c2ecf20Sopenharmony_ci https://selenic.com/mailman/listinfo/kernel-mentors 2388c2ecf20Sopenharmony_ci 2398c2ecf20Sopenharmony_ci実際に Linux カーネルのコードについて修正を加える前に、どうやってその 2408c2ecf20Sopenharmony_ciコードが動作するのかを理解することが必要です。そのためには、特別なツー 2418c2ecf20Sopenharmony_ciルの助けを借りてでも、それを直接よく読むことが最良の方法です(ほとんど 2428c2ecf20Sopenharmony_ciのトリッキーな部分は十分にコメントしてありますから)。そういうツールで 2438c2ecf20Sopenharmony_ci特におすすめなのは、Linux クロスリファレンスプロジェクトです。これは、 2448c2ecf20Sopenharmony_ci自己参照方式で、索引がついた web 形式で、ソースコードを参照することが 2458c2ecf20Sopenharmony_ciできます。この最新の素晴しいカーネルコードのリポジトリは以下で見つかり 2468c2ecf20Sopenharmony_ciます - 2478c2ecf20Sopenharmony_ci 2488c2ecf20Sopenharmony_ci https://elixir.bootlin.com/ 2498c2ecf20Sopenharmony_ci 2508c2ecf20Sopenharmony_ci開発プロセス 2518c2ecf20Sopenharmony_ci------------ 2528c2ecf20Sopenharmony_ci 2538c2ecf20Sopenharmony_ciLinux カーネルの開発プロセスは現在幾つかの異なるメインカーネル「ブラン 2548c2ecf20Sopenharmony_ciチ」と多数のサブシステム毎のカーネルブランチから構成されます。これらの 2558c2ecf20Sopenharmony_ciブランチとは - 2568c2ecf20Sopenharmony_ci 2578c2ecf20Sopenharmony_ci - メインの 4.x カーネルツリー 2588c2ecf20Sopenharmony_ci - 4.x.y -stable カーネルツリー 2598c2ecf20Sopenharmony_ci - サブシステム毎のカーネルツリーとパッチ 2608c2ecf20Sopenharmony_ci - 統合テストのための 4.x -next カーネルツリー 2618c2ecf20Sopenharmony_ci 2628c2ecf20Sopenharmony_ci4.x カーネルツリー 2638c2ecf20Sopenharmony_ci~~~~~~~~~~~~~~~~~~ 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_ci4.x カーネルは Linus Torvalds によってメンテナンスされ、 2668c2ecf20Sopenharmony_cihttps://kernel.org の pub/linux/kernel/v4.x/ ディレクトリに存在します。 2678c2ecf20Sopenharmony_ciこの開発プロセスは以下のとおり - 2688c2ecf20Sopenharmony_ci 2698c2ecf20Sopenharmony_ci - 新しいカーネルがリリースされた直後に、2週間の特別期間が設けられ、 2708c2ecf20Sopenharmony_ci この期間中に、メンテナ達は Linus に大きな差分を送ることができます。 2718c2ecf20Sopenharmony_ci このような差分は通常 -next カーネルに数週間含まれてきたパッチです。 2728c2ecf20Sopenharmony_ci 大きな変更は git(カーネルのソース管理ツール、詳細は 2738c2ecf20Sopenharmony_ci http://git-scm.com/ 参照) を使って送るのが好ましいやり方ですが、パッ 2748c2ecf20Sopenharmony_ci チファイルの形式のまま送るのでも十分です。 2758c2ecf20Sopenharmony_ci - 2週間後、-rc1 カーネルがリリースされ、この後にはカーネル全体の安定 2768c2ecf20Sopenharmony_ci 性に影響をあたえるような新機能は含まない類のパッチしか取り込むこと 2778c2ecf20Sopenharmony_ci はできません。新しいドライバ(もしくはファイルシステム)のパッチは 2788c2ecf20Sopenharmony_ci -rc1 の後で受け付けられることもあることを覚えておいてください。な 2798c2ecf20Sopenharmony_ci ぜなら、変更が独立していて、追加されたコードの外の領域に影響を与え 2808c2ecf20Sopenharmony_ci ない限り、退行のリスクは無いからです。-rc1 がリリースされた後、 2818c2ecf20Sopenharmony_ci Linus へパッチを送付するのに git を使うこともできますが、パッチは 2828c2ecf20Sopenharmony_ci レビューのために、パブリックなメーリングリストへも同時に送る必要が 2838c2ecf20Sopenharmony_ci あります。 2848c2ecf20Sopenharmony_ci - 新しい -rc は Linus が、最新の git ツリーがテスト目的であれば十分 2858c2ecf20Sopenharmony_ci に安定した状態にあると判断したときにリリースされます。目標は毎週新 2868c2ecf20Sopenharmony_ci しい -rc カーネルをリリースすることです。 2878c2ecf20Sopenharmony_ci - このプロセスはカーネルが 「準備ができた」と考えられるまで継続しま 2888c2ecf20Sopenharmony_ci す。このプロセスはだいたい 6週間継続します。 2898c2ecf20Sopenharmony_ci 2908c2ecf20Sopenharmony_ciAndrew Morton が Linux-kernel メーリングリストにカーネルリリースについ 2918c2ecf20Sopenharmony_ciて書いたことをここで言っておくことは価値があります - 2928c2ecf20Sopenharmony_ci 2938c2ecf20Sopenharmony_ci *「カーネルがいつリリースされるかは誰も知りません。なぜなら、 2948c2ecf20Sopenharmony_ci これは現実に認識されたバグの状況によりリリースされるのであり、 2958c2ecf20Sopenharmony_ci 前もって決められた計画によってリリースされるものではないから 2968c2ecf20Sopenharmony_ci です。」* 2978c2ecf20Sopenharmony_ci 2988c2ecf20Sopenharmony_ci4.x.y -stable カーネルツリー 2998c2ecf20Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3008c2ecf20Sopenharmony_ci 3018c2ecf20Sopenharmony_ciバージョン番号が3つの数字に分かれているカーネルは -stable カーネルです。 3028c2ecf20Sopenharmony_ciこれには、4.x カーネルで見つかったセキュリティ問題や重大な後戻りに対す 3038c2ecf20Sopenharmony_ciる比較的小さい重要な修正が含まれます。 3048c2ecf20Sopenharmony_ci 3058c2ecf20Sopenharmony_ciこれは、開発/実験的バージョンのテストに協力することに興味が無く、最新 3068c2ecf20Sopenharmony_ciの安定したカーネルを使いたいユーザに推奨するブランチです。 3078c2ecf20Sopenharmony_ci 3088c2ecf20Sopenharmony_ciもし、4.x.y カーネルが存在しない場合には、番号が一番大きい 4.x が最新 3098c2ecf20Sopenharmony_ciの安定版カーネルです。 3108c2ecf20Sopenharmony_ci 3118c2ecf20Sopenharmony_ci4.x.y は "stable" チーム <stable@vger.kernel.org> でメンテされており、 3128c2ecf20Sopenharmony_ci必要に応じてリリースされます。通常のリリース期間は 2週間毎ですが、差 3138c2ecf20Sopenharmony_ciし迫った問題がなければもう少し長くなることもあります。セキュリティ関 3148c2ecf20Sopenharmony_ci連の問題の場合はこれに対してだいたいの場合、すぐにリリースがされます。 3158c2ecf20Sopenharmony_ci 3168c2ecf20Sopenharmony_ciカーネルツリーに入っている、 3178c2ecf20Sopenharmony_ciDocumentation/process/stable-kernel-rules.rst ファイルにはどのような種 3188c2ecf20Sopenharmony_ci類の変更が -stable ツリーに受け入れ可能か、またリリースプロセスがどう 3198c2ecf20Sopenharmony_ci動くかが記述されています。 3208c2ecf20Sopenharmony_ci 3218c2ecf20Sopenharmony_ciサブシステム毎のカーネルツリーとパッチ 3228c2ecf20Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3238c2ecf20Sopenharmony_ci 3248c2ecf20Sopenharmony_ciそれぞれのカーネルサブシステムのメンテナ達は --- そして多くのカーネル 3258c2ecf20Sopenharmony_ciサブシステムの開発者達も --- 各自の最新の開発状況をソースリポジトリに 3268c2ecf20Sopenharmony_ci公開しています。そのため、自分とは異なる領域のカーネルで何が起きている 3278c2ecf20Sopenharmony_ciかを他の人が見られるようになっています。開発が早く進んでいる領域では、 3288c2ecf20Sopenharmony_ci開発者は自身の投稿がどのサブシステムカーネルツリーを元にしているか質問 3298c2ecf20Sopenharmony_ciされるので、その投稿とすでに進行中の他の作業との衝突が避けられます。 3308c2ecf20Sopenharmony_ci 3318c2ecf20Sopenharmony_ci大部分のこれらのリポジトリは git ツリーです。しかしその他の SCM や 3328c2ecf20Sopenharmony_ciquilt シリーズとして公開されているパッチキューも使われています。これら 3338c2ecf20Sopenharmony_ciのサブシステムリポジトリのアドレスは MAINTAINERS ファイルにリストされ 3348c2ecf20Sopenharmony_ciています。これらの多くは https://git.kernel.org/ で参照することができま 3358c2ecf20Sopenharmony_ciす。 3368c2ecf20Sopenharmony_ci 3378c2ecf20Sopenharmony_ci提案されたパッチがこのようなサブシステムツリーにコミットされる前に、メー 3388c2ecf20Sopenharmony_ciリングリストで事前にレビューにかけられます(以下の対応するセクションを 3398c2ecf20Sopenharmony_ci参照)。いくつかのカーネルサブシステムでは、このレビューは patchworkと 3408c2ecf20Sopenharmony_ciいうツールによって追跡されます。Patchwork は web インターフェイスによっ 3418c2ecf20Sopenharmony_ciてパッチ投稿の表示、パッチへのコメント付けや改訂などができ、そしてメン 3428c2ecf20Sopenharmony_ciテナはパッチに対して、レビュー中、受付済み、拒否というようなマークをつ 3438c2ecf20Sopenharmony_ciけることができます。大部分のこれらの patchwork のサイトは 3448c2ecf20Sopenharmony_cihttps://patchwork.kernel.org/ でリストされています。 3458c2ecf20Sopenharmony_ci 3468c2ecf20Sopenharmony_ci統合テストのための 4.x -next カーネルツリー 3478c2ecf20Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3488c2ecf20Sopenharmony_ci 3498c2ecf20Sopenharmony_ciサブシステムツリーの更新内容がメインラインの 4.x ツリーにマージされる 3508c2ecf20Sopenharmony_ci前に、それらは統合テストされる必要があります。この目的のため、実質的に 3518c2ecf20Sopenharmony_ci全サブシステムツリーからほぼ毎日プルされてできる特別なテスト用のリポジ 3528c2ecf20Sopenharmony_ciトリが存在します- 3538c2ecf20Sopenharmony_ci 3548c2ecf20Sopenharmony_ci https://git.kernel.org/?p=linux/kernel/git/next/linux-next.git 3558c2ecf20Sopenharmony_ci 3568c2ecf20Sopenharmony_ciこのやり方によって、-next カーネルは次のマージ機会でどんなものがメイン 3578c2ecf20Sopenharmony_ciラインカーネルにマージされるか、おおまかなの展望を提供します。-next カー 3588c2ecf20Sopenharmony_ciネルの実行テストを行う冒険好きなテスターは大いに歓迎されます。 3598c2ecf20Sopenharmony_ci 3608c2ecf20Sopenharmony_ciバグレポート 3618c2ecf20Sopenharmony_ci------------- 3628c2ecf20Sopenharmony_ci 3638c2ecf20Sopenharmony_cihttps://bugzilla.kernel.org は Linux カーネル開発者がカーネルのバグを追跡する 3648c2ecf20Sopenharmony_ci場所です。ユーザは見つけたバグの全てをこのツールで報告すべきです。どう 3658c2ecf20Sopenharmony_cikernel bugzilla を使うかの詳細は、以下を参照してください - 3668c2ecf20Sopenharmony_ci 3678c2ecf20Sopenharmony_ci https://bugzilla.kernel.org/page.cgi?id=faq.html 3688c2ecf20Sopenharmony_ci 3698c2ecf20Sopenharmony_ciメインカーネルソースディレクトリにあるファイル 3708c2ecf20Sopenharmony_ciadmin-guide/reporting-bugs.rstはカーネルバグらしいものについてどうレポー 3718c2ecf20Sopenharmony_ciトするかの良いテンプレートであり、問題の追跡を助けるためにカーネル開発 3728c2ecf20Sopenharmony_ci者にとってどんな情報が必要なのかの詳細が書かれています。 3738c2ecf20Sopenharmony_ci 3748c2ecf20Sopenharmony_ciバグレポートの管理 3758c2ecf20Sopenharmony_ci------------------- 3768c2ecf20Sopenharmony_ci 3778c2ecf20Sopenharmony_ciあなたのハッキングのスキルを訓練する最高の方法のひとつに、他人がレポー 3788c2ecf20Sopenharmony_ciトしたバグを修正することがあります。あなたがカーネルをより安定化させる 3798c2ecf20Sopenharmony_ciこに寄与するということだけでなく、あなたは 現実の問題を修正することを 3808c2ecf20Sopenharmony_ci学び、自分のスキルも強化でき、また他の開発者があなたの存在に気がつきま 3818c2ecf20Sopenharmony_ciす。バグを修正することは、多くの開発者の中から自分が功績をあげる最善の 3828c2ecf20Sopenharmony_ci道です、なぜなら多くの人は他人のバグの修正に時間を浪費することを好まな 3838c2ecf20Sopenharmony_ciいからです。 3848c2ecf20Sopenharmony_ci 3858c2ecf20Sopenharmony_ciすでにレポートされたバグのために仕事をするためには、 3868c2ecf20Sopenharmony_cihttps://bugzilla.kernel.org に行ってください。もし今後のバグレポートに 3878c2ecf20Sopenharmony_ciついてアドバイスを受けたいのであれば、bugme-new メーリングリスト(新し 3888c2ecf20Sopenharmony_ciいバグレポートだけがここにメールされる) または bugme-janitor メーリン 3898c2ecf20Sopenharmony_ciグリスト(bugzilla の変更毎にここにメールされる)を購読できます。 3908c2ecf20Sopenharmony_ci 3918c2ecf20Sopenharmony_ci https://lists.linux-foundation.org/mailman/listinfo/bugme-new 3928c2ecf20Sopenharmony_ci 3938c2ecf20Sopenharmony_ci https://lists.linux-foundation.org/mailman/listinfo/bugme-janitors 3948c2ecf20Sopenharmony_ci 3958c2ecf20Sopenharmony_ciメーリングリスト 3968c2ecf20Sopenharmony_ci---------------- 3978c2ecf20Sopenharmony_ci 3988c2ecf20Sopenharmony_ci上のいくつかのドキュメントで述べていますが、コアカーネル開発者の大部分 3998c2ecf20Sopenharmony_ciは Linux kernel メーリングリストに参加しています。このリストの登録/脱 4008c2ecf20Sopenharmony_ci退の方法については以下を参照してください- 4018c2ecf20Sopenharmony_ci 4028c2ecf20Sopenharmony_ci http://vger.kernel.org/vger-lists.html#linux-kernel 4038c2ecf20Sopenharmony_ci 4048c2ecf20Sopenharmony_ciこのメーリングリストのアーカイブは web 上の多数の場所に存在します。こ 4058c2ecf20Sopenharmony_ciれらのアーカイブを探すにはサーチエンジンを使いましょう。例えば- 4068c2ecf20Sopenharmony_ci 4078c2ecf20Sopenharmony_ci http://dir.gmane.org/gmane.linux.kernel 4088c2ecf20Sopenharmony_ci 4098c2ecf20Sopenharmony_ciリストに投稿する前にすでにその話題がアーカイブに存在するかどうかを検索 4108c2ecf20Sopenharmony_ciすることを是非やってください。多数の事がすでに詳細に渡って議論されてお 4118c2ecf20Sopenharmony_ciり、アーカイブにのみ記録されています。 4128c2ecf20Sopenharmony_ci 4138c2ecf20Sopenharmony_ci大部分のカーネルサブシステムも自分の個別の開発を実施するメーリングリス 4148c2ecf20Sopenharmony_ciトを持っています。個々のグループがどんなリストを持っているかは、 4158c2ecf20Sopenharmony_ciMAINTAINERS ファイルにリストがありますので参照してください。 4168c2ecf20Sopenharmony_ci 4178c2ecf20Sopenharmony_ci多くのリストは kernel.org でホストされています。これらの情報は以下にあ 4188c2ecf20Sopenharmony_ciります - 4198c2ecf20Sopenharmony_ci 4208c2ecf20Sopenharmony_ci http://vger.kernel.org/vger-lists.html 4218c2ecf20Sopenharmony_ci 4228c2ecf20Sopenharmony_ciメーリングリストを使う場合、良い行動習慣に従うようにしましょう。少し安っ 4238c2ecf20Sopenharmony_ciぽいが、以下の URL は上のリスト(や他のリスト)で会話する場合のシンプル 4248c2ecf20Sopenharmony_ciなガイドラインを示しています - 4258c2ecf20Sopenharmony_ci 4268c2ecf20Sopenharmony_ci http://www.albion.com/netiquette/ 4278c2ecf20Sopenharmony_ci 4288c2ecf20Sopenharmony_ciもし複数の人があなたのメールに返事をした場合、CC: で受ける人のリストは 4298c2ecf20Sopenharmony_ciだいぶ多くなるでしょう。正当な理由がない限り、CC: リストから誰かを削除 4308c2ecf20Sopenharmony_ciをしないように、また、メーリングリストのアドレスだけにリプライすること 4318c2ecf20Sopenharmony_ciのないようにしましょう。1つは送信者から、もう1つはリストからのように、 4328c2ecf20Sopenharmony_ciメールを2回受けることになってもそれに慣れ、しゃれたメールヘッダーを追 4338c2ecf20Sopenharmony_ci加してこの状態を変えようとしないように。人々はそのようなことは好みませ 4348c2ecf20Sopenharmony_ciん。 4358c2ecf20Sopenharmony_ci 4368c2ecf20Sopenharmony_ci今までのメールでのやりとりとその間のあなたの発言はそのまま残し、 4378c2ecf20Sopenharmony_ci"John Kernelhacker wrote ...:" の行をあなたのリプライの先頭行にして、 4388c2ecf20Sopenharmony_ciメールの先頭でなく、各引用行の間にあなたの言いたいことを追加するべきで 4398c2ecf20Sopenharmony_ciす。 4408c2ecf20Sopenharmony_ci 4418c2ecf20Sopenharmony_ciもしパッチをメールに付ける場合は、 4428c2ecf20Sopenharmony_ciDocumentation/process/submitting-patches.rst に提示されているように、そ 4438c2ecf20Sopenharmony_ciれは プレーンな可読テキストにすることを忘れないようにしましょう。カー 4448c2ecf20Sopenharmony_ciネル開発者は 添付や圧縮したパッチを扱いたがりません。彼らはあなたのパッ 4458c2ecf20Sopenharmony_ciチの行毎にコメントを入れたいので、そうするしかありません。あなたのメー 4468c2ecf20Sopenharmony_ciルプログラムが空白やタブを圧縮しないように確認しましょう。最初の良いテ 4478c2ecf20Sopenharmony_ciストとしては、自分にメールを送ってみて、そのパッチを自分で当ててみるこ 4488c2ecf20Sopenharmony_ciとです。もしそれがうまく行かないなら、あなたのメールプログラムを直して 4498c2ecf20Sopenharmony_ciもらうか、正しく動くように変えるべきです。 4508c2ecf20Sopenharmony_ci 4518c2ecf20Sopenharmony_ci何をおいても、他の購読者に対する敬意を表すことを忘れないでください。 4528c2ecf20Sopenharmony_ci 4538c2ecf20Sopenharmony_ciコミュニティと共に働くこと 4548c2ecf20Sopenharmony_ci-------------------------- 4558c2ecf20Sopenharmony_ci 4568c2ecf20Sopenharmony_ciカーネルコミュニティのゴールは可能なかぎり最高のカーネルを提供すること 4578c2ecf20Sopenharmony_ciです。あなたがパッチを受け入れてもらうために投稿した場合、それは、技術 4588c2ecf20Sopenharmony_ci的メリットだけがレビューされます。その際、あなたは何を予想すべきでしょ 4598c2ecf20Sopenharmony_ciうか? 4608c2ecf20Sopenharmony_ci 4618c2ecf20Sopenharmony_ci - 批判 4628c2ecf20Sopenharmony_ci - コメント 4638c2ecf20Sopenharmony_ci - 変更の要求 4648c2ecf20Sopenharmony_ci - パッチの正当性の証明要求 4658c2ecf20Sopenharmony_ci - 沈黙 4668c2ecf20Sopenharmony_ci 4678c2ecf20Sopenharmony_ci思い出してください、これはあなたのパッチをカーネルに入れる話です。あな 4688c2ecf20Sopenharmony_ciたは、あなたのパッチに対する批判とコメントを受け入れるべきで、それらを 4698c2ecf20Sopenharmony_ci技術的レベルで評価して、パッチを再作成するか、なぜそれらの変更をすべき 4708c2ecf20Sopenharmony_ciでないかを明確で簡潔な理由の説明を提供してください。もし、あなたのパッ 4718c2ecf20Sopenharmony_ciチに何も反応がない場合、たまにはメールの山に埋もれて見逃され、あなたの 4728c2ecf20Sopenharmony_ci投稿が忘れられてしまうこともあるので、数日待って再度投稿してください。 4738c2ecf20Sopenharmony_ci 4748c2ecf20Sopenharmony_ciあなたがやるべきでないことは? 4758c2ecf20Sopenharmony_ci 4768c2ecf20Sopenharmony_ci - 質問なしにあなたのパッチが受け入れられると想像すること 4778c2ecf20Sopenharmony_ci - 守りに入ること 4788c2ecf20Sopenharmony_ci - コメントを無視すること 4798c2ecf20Sopenharmony_ci - 要求された変更を何もしないでパッチを出し直すこと 4808c2ecf20Sopenharmony_ci 4818c2ecf20Sopenharmony_ci可能な限り最高の技術的解決を求めているコミュニティでは、パッチがどのく 4828c2ecf20Sopenharmony_ciらい有益なのかについては常に異なる意見があります。あなたは協調的である 4838c2ecf20Sopenharmony_ciべきですし、また、あなたのアイディアをカーネルに対してうまく合わせるよ 4848c2ecf20Sopenharmony_ciうにすることが望まれています。もしくは、最低限あなたのアイディアがそれ 4858c2ecf20Sopenharmony_ciだけの価値があるとすすんで証明するようにしなければなりません。 4868c2ecf20Sopenharmony_ci正しい解決に向かって進もうという意志がある限り、間違うことがあっても許 4878c2ecf20Sopenharmony_ci容されることを忘れないでください。 4888c2ecf20Sopenharmony_ci 4898c2ecf20Sopenharmony_ciあなたの最初のパッチに単に 1ダースもの修正を求めるリストの返答になるこ 4908c2ecf20Sopenharmony_ciとも普通のことです。これはあなたのパッチが受け入れられないということで 4918c2ecf20Sopenharmony_ciは **ありません**、そしてあなた自身に反対することを意味するのでも **あ 4928c2ecf20Sopenharmony_ciりません**。単に自分のパッチに対して指摘された問題を全て修正して再送す 4938c2ecf20Sopenharmony_ciれば良いのです。 4948c2ecf20Sopenharmony_ci 4958c2ecf20Sopenharmony_ci 4968c2ecf20Sopenharmony_ciカーネルコミュニティと企業組織のちがい 4978c2ecf20Sopenharmony_ci----------------------------------------------------------------- 4988c2ecf20Sopenharmony_ci 4998c2ecf20Sopenharmony_ciカーネルコミュニティは大部分の伝統的な会社の開発環境とは異ったやり方で 5008c2ecf20Sopenharmony_ci動いています。以下は問題を避けるためにできると良いことのリストです。 5018c2ecf20Sopenharmony_ci 5028c2ecf20Sopenharmony_ci あなたの提案する変更について言うときのうまい言い方 - 5038c2ecf20Sopenharmony_ci 5048c2ecf20Sopenharmony_ci - "これは複数の問題を解決します" 5058c2ecf20Sopenharmony_ci - "これは2000行のコードを削除します" 5068c2ecf20Sopenharmony_ci - "以下のパッチは、私が言おうとしていることを説明するものです" 5078c2ecf20Sopenharmony_ci - "私はこれを5つの異なるアーキテクチャでテストしたのですが..." 5088c2ecf20Sopenharmony_ci - "以下は一連の小さなパッチ群ですが..." 5098c2ecf20Sopenharmony_ci - "これは典型的なマシンでの性能を向上させます..." 5108c2ecf20Sopenharmony_ci 5118c2ecf20Sopenharmony_ci やめた方が良い悪い言い方 - 5128c2ecf20Sopenharmony_ci 5138c2ecf20Sopenharmony_ci - "このやり方で AIX/ptx/Solaris ではできたので、できるはずだ..." 5148c2ecf20Sopenharmony_ci - "私はこれを20年もの間やってきた、だから..." 5158c2ecf20Sopenharmony_ci - "これは私の会社が金儲けをするために必要だ" 5168c2ecf20Sopenharmony_ci - "これは我々のエンタープライズ向け商品ラインのためである" 5178c2ecf20Sopenharmony_ci - "これは私が自分のアイディアを記述した、1000ページの設計資料である" 5188c2ecf20Sopenharmony_ci - "私はこれについて、6ケ月作業している..." 5198c2ecf20Sopenharmony_ci - "以下は ... に関する5000行のパッチです" 5208c2ecf20Sopenharmony_ci - "私は現在のぐちゃぐちゃを全部書き直した、それが以下です..." 5218c2ecf20Sopenharmony_ci - "私は〆切がある、そのためこのパッチは今すぐ適用される必要がある" 5228c2ecf20Sopenharmony_ci 5238c2ecf20Sopenharmony_ciカーネルコミュニティが大部分の伝統的なソフトウェアエンジニアリングの労 5248c2ecf20Sopenharmony_ci働環境と異なるもう一つの点は、やりとりに顔を合わせないということです。 5258c2ecf20Sopenharmony_ciemail と irc を第一のコミュニケーションの形とする一つの利点は、性別や 5268c2ecf20Sopenharmony_ci民族の差別がないことです。Linux カーネルの職場環境は女性や少数民族を受 5278c2ecf20Sopenharmony_ci容します。なぜなら、email アドレスによってのみあなたが認識されるからで 5288c2ecf20Sopenharmony_ciす。 5298c2ecf20Sopenharmony_ci国際的な側面からも活動領域を均等にするようにします。なぜならば、あなた 5308c2ecf20Sopenharmony_ciは人の名前で性別を想像できないからです。ある男性が アンドレアという名 5318c2ecf20Sopenharmony_ci前で、女性の名前は パット かもしれません (訳注 Andrea は米国では女性、 5328c2ecf20Sopenharmony_ciそれ以外(欧州など)では男性名として使われることが多い。同様に、Pat は 5338c2ecf20Sopenharmony_ciPatricia (主に女性名)や Patrick (主に男性名)の略称)。 5348c2ecf20Sopenharmony_ciLinux カーネルの活動をして、意見を表明したことがある大部分の女性は、前 5358c2ecf20Sopenharmony_ci向きな経験をもっています。 5368c2ecf20Sopenharmony_ci 5378c2ecf20Sopenharmony_ci言葉の壁は英語が得意でない一部の人には問題になります。メーリングリスト 5388c2ecf20Sopenharmony_ciの中で、きちんとアイディアを交換するには、相当うまく英語を操れる必要が 5398c2ecf20Sopenharmony_ciあることもあります。そのため、自分のメールを送る前に英語で意味が通じて 5408c2ecf20Sopenharmony_ciいるかをチェックすることをお薦めします。 5418c2ecf20Sopenharmony_ci 5428c2ecf20Sopenharmony_ci変更を分割する 5438c2ecf20Sopenharmony_ci-------------- 5448c2ecf20Sopenharmony_ci 5458c2ecf20Sopenharmony_ciLinux カーネルコミュニティは、一度に大量のコードの塊を喜んで受容するこ 5468c2ecf20Sopenharmony_ciとはありません。変更は正確に説明される必要があり、議論され、小さい、個 5478c2ecf20Sopenharmony_ci別の部分に分割する必要があります。これはこれまで多くの会社がやり慣れて 5488c2ecf20Sopenharmony_ciきたことと全く正反対のことです。あなたのプロポーザルは、開発プロセスのと 5498c2ecf20Sopenharmony_ciても早い段階から紹介されるべきです。そうすれば あなたは自分のやってい 5508c2ecf20Sopenharmony_ciることにフィードバックを得られます。これは、コミュニティからみれば、あ 5518c2ecf20Sopenharmony_ciなたが彼らと一緒にやっているように感じられ、単にあなたの提案する機能の 5528c2ecf20Sopenharmony_ciゴミ捨て場として使っているのではない、と感じられるでしょう。 5538c2ecf20Sopenharmony_ciしかし、一度に 50 もの email をメーリングリストに送りつけるようなことは 5548c2ecf20Sopenharmony_ciやってはいけません、あなたのパッチ群はいつもどんな時でもそれよりは小さ 5558c2ecf20Sopenharmony_ciくなければなりません。 5568c2ecf20Sopenharmony_ci 5578c2ecf20Sopenharmony_ciパッチを分割する理由は以下 - 5588c2ecf20Sopenharmony_ci 5598c2ecf20Sopenharmony_ci1) 小さいパッチはあなたのパッチが適用される見込みを大きくします、カー 5608c2ecf20Sopenharmony_ci ネルの人達はパッチが正しいかどうかを確認する時間や労力をかけないか 5618c2ecf20Sopenharmony_ci らです。5行のパッチはメンテナがたった1秒見るだけで適用できます。 5628c2ecf20Sopenharmony_ci しかし、500行のパッチは、正しいことをレビューするのに数時間かかるか 5638c2ecf20Sopenharmony_ci もしれません(時間はパッチのサイズなどにより指数関数に比例してかかり 5648c2ecf20Sopenharmony_ci ます) 5658c2ecf20Sopenharmony_ci 5668c2ecf20Sopenharmony_ci 小さいパッチは何かあったときにデバッグもとても簡単になります。パッ 5678c2ecf20Sopenharmony_ci チを1個1個取り除くのは、とても大きなパッチを当てた後に(かつ、何かお 5688c2ecf20Sopenharmony_ci かしくなった後で)解剖するのに比べればとても簡単です。 5698c2ecf20Sopenharmony_ci 5708c2ecf20Sopenharmony_ci2) 小さいパッチを送るだけでなく、送るまえに、書き直して、シンプルにす 5718c2ecf20Sopenharmony_ci る(もしくは、単に順番を変えるだけでも)ことも、とても重要です。 5728c2ecf20Sopenharmony_ci 5738c2ecf20Sopenharmony_ci以下はカーネル開発者の Al Viro のたとえ話です - 5748c2ecf20Sopenharmony_ci 5758c2ecf20Sopenharmony_ci *"生徒の数学の宿題を採点する先生のことを考えてみてください、 5768c2ecf20Sopenharmony_ci 先生は生徒が解に到達するまでの試行錯誤を見たいとは思わないでし 5778c2ecf20Sopenharmony_ci ょう。先生は簡潔な最高の解を見たいのです。良い生徒はこれを知っ 5788c2ecf20Sopenharmony_ci ており、そして最終解の前の中間作業を提出することは決してないの 5798c2ecf20Sopenharmony_ci です* 5808c2ecf20Sopenharmony_ci 5818c2ecf20Sopenharmony_ci *カーネル開発でもこれは同じです。メンテナ達とレビューア達は、 5828c2ecf20Sopenharmony_ci 問題を解決する解の背後になる思考プロセスを見たいとは思いません。 5838c2ecf20Sopenharmony_ci 彼らは単純であざやかな解決方法を見たいのです。"* 5848c2ecf20Sopenharmony_ci 5858c2ecf20Sopenharmony_ciあざやかな解を説明するのと、コミュニティと共に仕事をし、未解決の仕事を 5868c2ecf20Sopenharmony_ci議論することのバランスをキープするのは難しいかもしれません。ですから、 5878c2ecf20Sopenharmony_ci開発プロセスの早期段階で改善のためのフィードバックをもらうようにするの 5888c2ecf20Sopenharmony_ciも良いですが、変更点を小さい部分に分割して全体ではまだ完成していない仕 5898c2ecf20Sopenharmony_ci事を(部分的に)取り込んでもらえるようにすることも良いことです。 5908c2ecf20Sopenharmony_ci 5918c2ecf20Sopenharmony_ciまた、でき上がっていないものや、"将来直す" ようなパッチを、本流に含め 5928c2ecf20Sopenharmony_ciてもらうように送っても、それは受け付けられないことを理解してください。 5938c2ecf20Sopenharmony_ci 5948c2ecf20Sopenharmony_ciあなたの変更を正当化する 5958c2ecf20Sopenharmony_ci------------------------ 5968c2ecf20Sopenharmony_ci 5978c2ecf20Sopenharmony_ciあなたのパッチを分割するのと同時に、なぜその変更を追加しなければならな 5988c2ecf20Sopenharmony_ciいかを Linux コミュニティに知らせることはとても重要です。新機能は必要 5998c2ecf20Sopenharmony_ci性と有用性で正当化されなければなりません。 6008c2ecf20Sopenharmony_ci 6018c2ecf20Sopenharmony_ciあなたの変更を説明する 6028c2ecf20Sopenharmony_ci---------------------- 6038c2ecf20Sopenharmony_ci 6048c2ecf20Sopenharmony_ciあなたのパッチを送付する場合には、メールの中のテキストで何を言うかにつ 6058c2ecf20Sopenharmony_ciいて、特別に注意を払ってください。この情報はパッチの ChangeLog に使わ 6068c2ecf20Sopenharmony_ciれ、いつも皆がみられるように保管されます。これは次のような項目を含め、 6078c2ecf20Sopenharmony_ciパッチを完全に記述するべきです - 6088c2ecf20Sopenharmony_ci 6098c2ecf20Sopenharmony_ci - なぜ変更が必要か 6108c2ecf20Sopenharmony_ci - パッチ全体の設計アプローチ 6118c2ecf20Sopenharmony_ci - 実装の詳細 6128c2ecf20Sopenharmony_ci - テスト結果 6138c2ecf20Sopenharmony_ci 6148c2ecf20Sopenharmony_ciこれについて全てがどのようにあるべきかについての詳細は、以下のドキュメ 6158c2ecf20Sopenharmony_ciントの ChangeLog セクションを見てください - 6168c2ecf20Sopenharmony_ci 6178c2ecf20Sopenharmony_ci "The Perfect Patch" 6188c2ecf20Sopenharmony_ci http://www.ozlabs.org/~akpm/stuff/tpp.txt 6198c2ecf20Sopenharmony_ci 6208c2ecf20Sopenharmony_ciこれらはどれも、実行することが時にはとても困難です。これらの例を完璧に 6218c2ecf20Sopenharmony_ci実施するには数年かかるかもしれません。これは継続的な改善のプロセスであ 6228c2ecf20Sopenharmony_ciり、多くの忍耐と決意を必要とするものです。でも諦めないで、実現は可能で 6238c2ecf20Sopenharmony_ciす。多数の人がすでにできていますし、彼らも最初はあなたと同じところから 6248c2ecf20Sopenharmony_ciスタートしたのですから。 6258c2ecf20Sopenharmony_ci 6268c2ecf20Sopenharmony_ci 6278c2ecf20Sopenharmony_ci 6288c2ecf20Sopenharmony_ci 6298c2ecf20Sopenharmony_ci---------- 6308c2ecf20Sopenharmony_ci 6318c2ecf20Sopenharmony_ciPaolo Ciarrocchi に感謝、彼は彼の書いた "Development Process" 6328c2ecf20Sopenharmony_ci(https://lwn.net/Articles/94386/) セクションをこのテキストの原型にする 6338c2ecf20Sopenharmony_ciことを許可してくれました。Rundy Dunlap と Gerrit Huizenga はメーリング 6348c2ecf20Sopenharmony_ciリストでやるべきこととやってはいけないことのリストを提供してくれました。 6358c2ecf20Sopenharmony_ci以下の人々のレビュー、コメント、貢献に感謝。 6368c2ecf20Sopenharmony_ciPat Mochel, Hanna Linder, Randy Dunlap, Kay Sievers, 6378c2ecf20Sopenharmony_ciVojtech Pavlik, Jan Kara, Josh Boyer, Kees Cook, Andrew Morton, Andi 6388c2ecf20Sopenharmony_ciKleen, Vadim Lobanov, Jesper Juhl, Adrian Bunk, Keri Harris, Frans Pop, 6398c2ecf20Sopenharmony_ciDavid A. Wheeler, Junio Hamano, Michael Kerrisk, と Alex Shepard 6408c2ecf20Sopenharmony_ci彼らの支援なしでは、このドキュメントはできなかったでしょう。 6418c2ecf20Sopenharmony_ci 6428c2ecf20Sopenharmony_ci 6438c2ecf20Sopenharmony_ci 6448c2ecf20Sopenharmony_ciMaintainer: Greg Kroah-Hartman <greg@kroah.com> 645