[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pkgsrc/doc/guide/files/components.xml: 1.41 -> 1.42



以下のページの更新をしました。ツッコミをお願いします。

pkgsrc/doc/guide/files/components.xml: 1.41 -> 1.42
> revision 1.42
> date: 2011/02/02 10:25:36;  author: wiz;  state: Exp;  lines: +16 -12
> Document that patch file names should contain the path and file name.
> E.g. for lib/bar/foo_bar.c the patch file name should be
> patch-lib_bar_foo__bar.c
> The previous convention is still mentioned.
> 
> While here, give more good hints about how to handle patches:
> * always add comments
> * when sent upstream, note bug reporting URL

金曜日までに異議がなければ、 commit します。

更新後の訳の全文は
  http://www.na.rim.or.jp/%7Ekano/tmp/docs/pkgsrc/components.xml
  http://www.na.rim.or.jp/%7Ekano/tmp/docs/pkgsrc/components.html
に置いてあります。

以下、訳と原文それぞれの新旧の差分です。

--- components.xml.orig	2011-02-03 22:39:58.000000000 +0900
+++ components.xml	2011-02-03 22:39:58.000000000 +0900
@@ -1,6 +1,6 @@
-<!-- $NetBSD: components.xml,v 1.41 2010/06/07 16:06:58 tnn Exp $ -->
+<!-- $NetBSD: components.xml,v 1.42 2011/02/02 10:25:36 wiz Exp $ -->
 <!-- Based on english version: -->
-<!-- NetBSD: components.xml,v 1.41 2010/06/07 16:06:58 tnn Exp   -->
+<!-- NetBSD: components.xml,v 1.42 2011/02/02 10:25:36 wiz Exp   -->
 
 <chapter id="components"> <?dbhtml filename="components.html"?>
 <title>パッケージコンポーネント - ファイル、ディレクトリー、およびコンテンツ</title>
@@ -229,8 +229,7 @@
   以下にファイルが展開された後に、展開されたファイルに対して、
   このパッチファイルが<ulink
   url="http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_13_03">アルファベット
-  順</ulink>で適用されます。つまり<filename>patch-aa</filename>は
-  <filename>patch-ab</filename> などより前に適用されます。</para>
+  順</ulink>で適用されます。</para>
 
 <sect2 id="components.patch.structure">
 <title>個々のパッチファイルの構造</title>
@@ -250,10 +249,6 @@
 
   <itemizedlist>
 
-  <listitem><para>シェルスクリプト中の &man.test.1; 用の <literal>==</literal>
-  演算子を <literal>=</literal> に置き換えるパッチは、
-  よくあるものなので、一切コメントを書く必要はありません。</para></listitem>
-
   <listitem><para>一般に知られている脆弱性に対するパッチには、
   その脆弱性の ID (CAN, CVE) を記すようにします。</para></listitem>
 
@@ -263,7 +258,7 @@
 
   </itemizedlist>
 
-  <para>以上のほか、あらゆる事例において、
+  <para>あらゆる事例において、
   そのアプリケーションのコードを理解している開発者がパッチを利用できるようにするため、
   パッチにはコメントを書くようにします。上流の開発者に対しては特に注意が必要です。
   たいていの場合、私たちの将来の作業を減らすために、
@@ -286,9 +281,8 @@
   <command>pkgvi</command>を使って、元のファイルを<filename>filename.orig</filename>の名前でバックアップしておくだ
   けです。この方法でパッケージをアップグレードした場合、<command>patchdiff</command>を使って、新
   しいパッチと既存のパッチを簡単に比較することができます。
-  使用したいパッチまたは更新したいパッチを、
-  <filename>work/.newpatches</filename> ディレクトリーから
-  <filename>patches/</filename> にコピーします。</para>
+  <filename>patches</filename> 以下のファイルは新しいファイルに置き換えられますので、
+  変更点が適切かどうかをしっかり確認してください。</para>
 
   <para>パッケージを作り終えたとき、忘れずに<command>make
   makepatchsum</command>コマンドでパッチファ
@@ -304,7 +298,13 @@
   通常は、将来のバージョンでパッチを削除することができるようになります。</para>
 
   <para>パッチファイルのファイル名は、通常は
-  <filename>patch-<replaceable>[a-z][a-z]</replaceable></filename> という形式です。</para>
+  <filename>patch-<replaceable>path_to_file__with__underscores.c</replaceable></filename> という形式です。
+  多くのパッケージでは、以前使われていた
+  <filename>patch-<replaceable>[a-z][a-z]</replaceable></filename> という形式をまだ使っていますが、
+  パッチを新たに作る場合は、ファイル名を含んだ形式にしてください。<filename
+  role="pkg">pkgtools/pkgdiff</filename> に含まれている
+  <command>mkpatches</command> は、
+  パッチファイルのファイル名を自動で処理します。</para>
 
 </sect2>
 <sect2 id="components.patches.sources">
@@ -483,6 +483,9 @@
       さほど労力を割かずに将来の変更ができるようにするということが、
       <emphasis>特に重要</emphasis>です。</para>
 
+      <para>フィードバックをしたら、上流のバグレポートの URL を
+      パッチのコメントに追加してください。</para>
+
       <para>フリーソフトウェアの理念をサポートして下さい。</para>
 
     </sect2>
Index: components.xml
===================================================================
RCS file: /cvsroot/pkgsrc/doc/guide/files/components.xml,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- components.xml	7 Jun 2010 16:06:58 -0000	1.41
+++ components.xml	2 Feb 2011 10:25:36 -0000	1.42
@@ -1,4 +1,4 @@
-<!-- $NetBSD: components.xml,v 1.41 2010/06/07 16:06:58 tnn Exp $ -->
+<!-- $NetBSD: components.xml,v 1.42 2011/02/02 10:25:36 wiz Exp $ -->
 
 <chapter id="components"> <?dbhtml filename="components.html"?>
 <title>Package components - files, directories and contents</title>
@@ -228,8 +228,7 @@
   applied to the files in <varname>WRKSRC</varname> directory after
   extracting them, in <ulink
   url="http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_13_03">alphabetic
-  order</ulink>, so <filename>patch-aa</filename> is applied before
-  <filename>patch-ab</filename>, etc.</para>
+  order</ulink>.</para>
 
 <sect2 id="components.patch.structure">
 <title>Structure of a single patch file</title>
@@ -250,10 +249,6 @@
 
   <itemizedlist>
 
-  <listitem><para>Patches that replace the <literal>==</literal>
-  operator for &man.test.1; with <literal>=</literal> in shell scripts
-  are so common that they don't need a comment at all.</para></listitem>
-
   <listitem><para>Patches for commonly known vulnerabilities should
   mention the vulnerability ID (CAN, CVE).</para></listitem>
 
@@ -263,7 +258,7 @@
 
   </itemizedlist>
 
-  <para>In all other cases, the patch should be commented so that any
+  <para>In all, the patch should be commented so that any
   developer who knows the code of the application can make some use of
   the patch. Special care should be taken for the upstream developers,
   since we generally want that they accept our patches, so we have less
@@ -288,9 +283,9 @@
   using <command>pkgvi</command> again from the same package. If
   you upgrade a package this way, you can easily compare the new
   set of patches with the previously existing one with
-  <command>patchdiff</command>. Copy the patches you want to use
-  or update from the <filename>work/.newpatches</filename>
-  directory to <filename>patches/</filename>.</para>
+  <command>patchdiff</command>. The files in <filename>patches</filename>
+  are replaced by new files, so carefully check if you want to take all
+  the changes.</para>
 
   <para>When you have finished a package, remember to generate
   the checksums for the patch files by using the <command>make
@@ -305,7 +300,13 @@
   version.</para>
 
   <para>The file names of the patch files are usually of the form
-  <filename>patch-<replaceable>[a-z][a-z]</replaceable></filename>.</para>
+  <filename>patch-<replaceable>path_to_file__with__underscores.c</replaceable></filename>.
+  Many packages still use the previous convention
+  <filename>patch-<replaceable>[a-z][a-z]</replaceable></filename>,
+  but new patches should be of the form containing the filename.
+  <command>mkpatches</command> included in <filename
+  role="pkg">pkgtools/pkgdiff</filename> takes care of the name
+  automatically.</para>
 
 </sect2>
 <sect2 id="components.patches.sources">
@@ -483,6 +484,9 @@
       the packages in pkgsrc are kept simple and thus further changes
       can be done without much hassle.</para>
 
+      <para>When you have done this, please add a URL to the upstream
+      bug report to the patch comment.</para>
+
       <para>Support the idea of free software!</para>
 
     </sect2>