FreeBSD Bugzilla – Attachment 239403 Details for
Bug 268886
Port handbook, quick-port chapter translate
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
The format-patch of quick-port chapter
0001-quick-port-chapter-translate.patch (text/plain), 13.24 KB, created by
Wang Yan Hao
on 2023-01-11 12:51:07 UTC
(
hide
)
Description:
The format-patch of quick-port chapter
Filename:
MIME Type:
Creator:
Wang Yan Hao
Created:
2023-01-11 12:51:07 UTC
Size:
13.24 KB
patch
obsolete
>From 0d813adcead066429bff724475a532010c9fb60a Mon Sep 17 00:00:00 2001 >From: Wang-Yan-Hao <comi126konsu@gmail.com> >Date: Wed, 11 Jan 2023 12:39:20 +0000 >Subject: [PATCH] quick-port chapter translate > >--- > .../quick-porting/_index.adoc | 123 ++++++++++++------ > 1 file changed, 85 insertions(+), 38 deletions(-) > >diff --git a/documentation/content/zh-tw/books/porters-handbook/quick-porting/_index.adoc b/documentation/content/zh-tw/books/porters-handbook/quick-porting/_index.adoc >index bdab09bdc5..75a896289d 100644 >--- a/documentation/content/zh-tw/books/porters-handbook/quick-porting/_index.adoc >+++ b/documentation/content/zh-tw/books/porters-handbook/quick-porting/_index.adoc >@@ -56,7 +56,7 @@ endif::[] > > [NOTE] > ==== >-It is recommended to set the `DEVELOPER` man:make[1] variable in [.filename]#/etc/make.conf# before getting into porting. >+å¨ porting ä¹åï¼å»ºè°å¨ [.filename]#/etc/make.conf# è¨å® `DEVELOPER` man:make[1] è®æ¸ã > > [source,shell] > .... >@@ -64,7 +64,7 @@ It is recommended to set the `DEVELOPER` man:make[1] variable in [.filename]#/et > # echo DEVELOPER=yes >> /etc/make.conf > .... > >-This setting enables the "developer mode" that displays deprecation warnings and activates some further quality checks on calling `make`. >+éåè¨å®éåäº "developer mode" ï¼é¡¯ç¤ºå·²æ£ç¨è¦å並å¨ä½¿ç¨ `make` æ檢æ¥å質ã > ==== > > [[porting-makefile]] >@@ -87,12 +87,7 @@ COMMENT= Cat chasing a mouse all over the screen > .include <bsd.port.mk> > .... > >-[NOTE] >-==== >-In some cases, the [.filename]#Makefile# of an existing port may contain additional lines in the header, such as the name of the port and the date it was created. This additional information has been declared obsolete, and is being phased out. >-==== >- >-å¯ï¼å¤§è´å°±æ¯é樣ï¼ççä½ å·²ç¶é ç¥å¤å°äºå¢ï¼ çå° `$FreeBSD: head/zh_TW.UTF-8/books/porters-handbook/book.xml 48496 2016-03-29 01:37:53Z kevlo $` éä¸è¡ç話ï¼å¥æ³å¤ªå¤ ï¼ç¶è©² port æ£å¼é²å ¥ port tree æï¼ Subversion å°±æèªåè½æçºç¸éå串åã æééé»çç´°ç¯é¨ä»½ï¼å¯ä»¥åé± <<porting-samplem,sample Makefile>> ç« ç¯ã >+å試äºè§£æ¤æªæ¡ï¼æééé»çç´°ç¯é¨ä»½ï¼å¯ä»¥åé± crossref:porting-samplem[porting-samplem,sample Makefile] ç« ç¯ã > > [[porting-desc]] > == æ°å¯«èªªææª >@@ -107,29 +102,17 @@ In some cases, the [.filename]#Makefile# of an existing port may contain additio > [NOTE] > ==== > è«æ³¨æï¼éæª_çµé_ã該è»é«ç說ææåãææ¯ãå¦ä½ç·¨è¯ã使ç¨è©² port ç說æãï¼ _è¥æ¯å¾è©²è»é«ç [.filename]#README# æ manpage ç´æ¥è¤è£½éä¾ç話ï¼è«æ³¨æ_ãä»å常常ä¸æ¯æ£ç¢ºç port æè¿°ææ¯æ ¼å¼ä¸¦ä¸é©åãä¾å¦ï¼manpageæå°é½ç©ºç½ï¼éç¨monospaceååä¾çæç¹å¥ç³ç³ã >-==== > >-A well-written [.filename]#pkg-descr# describes the port completely enough that users would not have to consult the documentation or visit the website to understand what the software does, how it can be useful, or what particularly nice features it has. Mentioning certain requirements like a graphical toolkit, heavy dependencies, runtime environment, or implementation languages help users decide whether this port will work for them. >+å¦ä¸æ¹é¢ï¼ [.filename]#pkg-descr# çå §å®¹å¿ é æ¯ crossref:makefiles[makefile-comment,COMMENT line from the Makefile] éè¦è©³ç´°ï¼è¦è½è©³ç´°è§£éæ¤ port ç¸éçå §å®¹ã >+==== > >-Include a URL to the official WWW homepage. Prepend _one_ of the websites (pick the most common one) with `WWW:` (followed by single space) so that automated tools will work correctly. If the URI is the root of the website or directory, it must be terminated with a slash. >+ä¸åè¯å¥½ç [.filename]#pkg-descr# å¯ä»¥è®ä½¿ç¨è æ¸ æ¥çäºè§£è»é«çåè½èç¡é æ¥è©¢æ件æè 訪å網ç«ï¼æåç¹å®çéæ±åæ¯åå½¢å·¥å ·ãä¾è³´ãå·è¡çç°å¢è·å¯¦ä½çèªè¨ï¼è½å¤§å¤§ç幫å©ä½¿ç¨è äºè§£éå port æ¯æ麼éä½çã > > [NOTE] > ==== >-If the listed webpage for a port is not available, try to search the Internet first to see if the official site moved, was renamed, or is hosted elsewhere. >+éå»å¨ #pkg-descr# æ件æå¾ä¸è¡å¼å ¥ç URL å·²ç¶ç§»å° [.filename]#Makefile# 裡é¢äºã > ==== > >-éæ¯ [.filename]#pkg-descr# å §å®¹çä¾å ï¼ >- >-[.programlisting] >-.... >-This is a port of oneko, in which a cat chases a poor mouse all over >-the screen. >- : >-(etc.) >- >-WWW: http://www.oneko.org/ >-.... >- > [[porting-pkg-plist]] > === [.filename]#pkg-plist# > >@@ -174,15 +157,23 @@ PLIST_FILES= bin/oneko \ > > [NOTE] > ==== >-Usage of `PLIST_FILES` should not be abused. When looking for the origin of a file, people usually try to grep through the [.filename]#pkg-plist# files in the ports tree. Listing files in `PLIST_FILES` in the [.filename]#Makefile# makes that search more difficult. >+`PLIST_FILES` ç使ç¨ä¸æ該被濫ç¨ï¼äººåé常ééå¨ ports tree ç [.filename]#pkg-plist# æ件ä¾äºè§£ port ï¼å¨ [.filename]#Makefile# ä¸ä½¿ç¨ `PLIST_FILES` æè¿°æå¢å æå°çé£åº¦ã > ==== > > [TIP] > ==== >-If a port needs to create an empty directory, or creates directories outside of [.filename]#${PREFIX}# during installation, refer to crossref:plist[plist-dir-cleaning, Cleaning Up Empty Directories] for more information. >+å¦æ port éè¦åµå»ºç©ºçç®éï¼æè å®è£æå¨ [.filename]#${PREFIX}# ä¹å¤åµå»ºç®éï¼è«åè crossref:plist[plist-dir-cleaning, Cleaning Up Empty Directories] ä¾ç²å¾æ´å¤è³è¨ã >+==== >+ >+[TIP] > ==== >+å çº `PLIST_FILES` æ¯ man:make[1] çè®æ¸ï¼ä»»ä½å¨æ¤æ¢ç®ç sapce é½å¿ é 被å¼å ¥ãèä¾ä¾èªªï¼å¦æä½¿ç¨ man:pkg-create[8] å crossref:plist[plist-keywords, Expanding Package List with Keywords] æè¿°çééµåï¼ä»¥ä¸çæ¢ç®å¿ é 被å¼å ¥ã > >-ç¶èï¼ä½¿ç¨éåæ¹æ³ååº port çæªæ¡åç®éæ¯å¿ é ä»åºä»£å¹ï¼ ä¸è½ä½¿ç¨ man:pkg-create[8] å crossref:plist[plist-keywords, Expanding Package List with Keywords] æè¿°çééµåã å æ¤ï¼éæå é©ç¨æ¼è¼ç°¡å®ç port ï¼ä»¥åç°¡å該 port çä½æ³ã æ¤å¤ï¼éæéæä¸å好èï¼å¯ä»¥æ¸å° ports collection çæ´é«æªæ¡ç¸½æ¸ã æ以ï¼å¨èæ ®æ¯å¦è¦ç¨ [.filename]#pkg-plist# ä¹åï¼ å¯ä»¥å æé éåæ¿ä»£æ¹æ¡ççã >+[.programlisting] >+.... >+PLIST_FILES= "@sample ${ETCDIR}/oneko.conf.sample" >+.... >+==== > > å¾é¢æä»ç´¹å°å¦ä½éç¨ [.filename]#pkg-plist#ã `PLIST_FILES` éäºæ巧以å æcrossref:plist[plist,æ´è¤éççæ³]ã > >@@ -198,10 +189,10 @@ If a port needs to create an empty directory, or creates directories outside of > > * è¥è©² port æ²è£çæ±è¥¿ï¼ä¸è¦åå¨ [.filename]#pkg-plist# å §ã > * è¥è©² port æè£çæ±è¥¿ï¼è«åå¿ åå¨ [.filename]#pkg-plist# å §ã >-* The port can be installed using the `install` target. This verifies that the install script works correctly. >-* The port can be deinstalled properly using the `deinstall` target. This verifies that the deinstall script works correctly. >-* The port does not access network resources after the `fetch` target. This is important for package builders, such as package:ports-mgmt/poudriere[]. >-* Make sure that `make package` can be run as a normal user (that is, not as `root`). If that fails, `NEED_ROOT=yes` must be added to the port [.filename]#Makefile#. >+* port å¯ä»¥éé `install` ä¾å®è£ï¼éå¯ä»¥ç¢ºä¿å®è£ç script æ¯æ£å¸¸éä½çã >+* port å¯ä»¥éé `uninstall` ä¾ç§»é¤ï¼éå¯ä»¥ç¢ºä¿å®è£ç script æ¯æ£å¸¸éä½çã >+* port åªæå¨ `featch` ç®æ¨ææè½ä½¿ç¨ç¶²è·¯ï¼éå° package builders å¾éè¦ï¼åæ¯ package:ports-mgmt/poudriere[]. >+* ç¢ºä¿ `make package` å¯ä»¥è¢«ä¸è¬ä½¿ç¨è å·è¡ (ä¹å°±æ¯èªªï¼é `root` 使ç¨è )ï¼å¦æä¸è¿°å·è¡å¤±æï¼è»é«å¾å¯è½éè¦ä¿®æ¹ï¼è«åè crossref:uses[uses-fakeroot,`fakeroot`] å crossref:uses[uses-uidfix,`uidfix`]ã > > [.procedure] > ==== >@@ -218,32 +209,88 @@ If a port needs to create an empty directory, or creates directories outside of > > 確èªå¨ä»»ä½é段é½æ²æä»»ä½è¦ååºç¾ã > >-Thorough automated testing can be done with package:ports-mgmt/tinderbox[] or package:ports-mgmt/poudriere[] from the Ports Collection. These applications maintain `jails` where all of the steps shown above can be tested without affecting the state of the host system. >+å¯ä»¥éé package:ports-mgmt/tinderbox[] æè Ports Collection ç package:ports-mgmt/poudriere[] å·¥å ·ä¾å®æèªåå測試ï¼åè crossref:testing[testing-poudriere,Poudriere] ç²å¾æ´å¤çè³è¨ã她ç¶è· `jails` ï¼å¯ä»¥å¨ä¸å½±é¿ç³»çµ±çæ æ³ä¸å·è¡ä¸è¿°ææç測試ã > > [[porting-portlint]] > == 以 `portlint` ä¾ä½æª¢æ¥ Port > > è«ç¨ `portlint` ä¾æª¢æ¥è©² port æ¯å¦æéµå¾ªæåçè¦åã package:ports-mgmt/portlint[] æ¯ ports collection çå ¶ä¸ä¸åå¥ä»¶ã å®ä¸»è¦å¯ä»¥ç¨ä¾æª¢é© <<porting-samplem,Makefile>> å §å®¹æ¯å¦æ£ç¢ºä»¥å <<porting-pkgname,package>> æ¯å¦ææ£ç¢ºå½åã > >+[IMPORTANT] >+==== >+ä¸è¦ç²ç®çç¸ä¿¡ `portlint` ç輸åºï¼ä»æ¯ä¸å static lint å·¥å ·ï¼ä¸¦ä¸æå¯è½æåºé¯ã >+==== >+ > [[porting-submitting]] > == æ交æ°ç Port > > æ交æ°ç Port åï¼è«é±è® <<porting-dads,DOs and DON'Ts>> ç« ç¯ã > >-ç¾å¨ä½ å¾é«èçµæ¼æé åº port ä¾åï¼å¯ä¸å©ä¸è¦åçå°±æ¯æå®æ£å¼æ¾å° FreeBSD ports tree å §ï¼æè½è®æ¯å人é½è½å享使ç¨éå portã æåä¸éè¦ [.filename]#work# ç®éææ¯æªåå [.filename]#pkgname.tgz# ç package ï¼è«ç¾å¨åªé¤ä»åã >+ç¾å¨ä½ å¾é«èçµæ¼æé åº port ä¾åï¼å¯ä¸å©ä¸è¦åçå°±æ¯æå®æ£å¼æ¾å° FreeBSD ports tree å §ï¼æè½è®æ¯å人é½è½å享使ç¨éå portã > >-Next, build the man:shar[1] file. Assuming the port is called `oneko`, `cd` to the directory above where the `oneko` directory is located, and then type: `shar find oneko > oneko.shar` >+[IMPORTANT] >+==== >+æåä¸éè¦ [.filename]#work# ç®éææ¯æªåå [.filename]#pkgname.tgz# ç package ï¼è«ç¾å¨åªé¤ä»åã >+==== > >-To submit [.filename]#oneko.shar#, use the https://bugs.freebsd.org/submit/[bug submit form] (category `Ports Tree`). Add a short description of the program to the Description field of the PR (perhaps a short version of `COMMENT`), and do not forget to add [.filename]#oneko.shar# as an attachment. >+ä¸ä¸æ¥ï¼åµå»ºä¸å man:patch[1] ï¼ä¸åæ件ï¼åè¨æ¤ port å«å `oneko` 並ä¸å±¬æ¼ `games` é¡å¥ã > >-[NOTE] >+[[porting-submitting-diff]] >+.çºæ°ç Port åµå»º [.filename]#.diff# >+[example] > ==== >-Giving a good description in the summary of the problem report makes the work of port committers a lot easier. We prefer something like "New port: _category_/_portname__short description of the port_" for new ports. Using this scheme makes it easier and faster to begin the work of committing the new port. >+éé `git add .` å å ¥ææçæªæ¡ï¼ç¶å¾éé `git diff` ä¾æª¢æ¥ä¸åèï¼å¦ä¸ã >+ >+[source,shell] >+.... >+% git add . >+% git diff --staged >+.... >+ >+確ä¿ææéè¦çæªæ¡é½è¢«å¼å ¥äºï¼å°æ´æ¹æ交å°ä½ æ¬å°åæ¯ä¸¦ä½¿ç¨ `git format-patch` ç¢ç patchã >+ >+[source,shell] >+.... >+% git commit >+% git format-patch origin/main >+.... >+ >+ä½¿ç¨ `git format-patch` ç¢çç patch æå å«ä½è 以åé»åéµä»¶ï¼è®å ¶ä»éç¼è æ´å®¹æä½¿ç¨ (with `git am`) 以å給äºåé¥ã >+ >+ >+[IMPORTANT] >+**** >+çºäºè®éç¼è æ´å®¹æå¨ä»åç ports tree 使ç¨æ¤ patch ï¼è«åºæ¼ä½ ç ports tree ä¾ç¢ç [.filename]#.diff# ã >+**** >+ > ==== > >-å次強調ä¸é»ï¼_ä¸å¿ éä¸åå§ source ç distfile ï¼ä¹å°±æ¯ [.filename]#work# ç®éã åæï¼ä¹ä¸å¿ éä¸ `make package` æç¢çç package_ãæ°ç port è«ä½¿ç¨ man:shar[1] ï¼ä¸è¦ç¨ man:diff[1] ã >+éé https://bugs.freebsd.org/submit/[bug submission form] 繳交 [.filename]#oneko.diff# ãä½¿ç¨ "Ports & Packages" ç¢åå "Individual Port(s)" çµä»¶ï¼ç¶å¾è·èé裡çæå¸èµ°ï¼å¨ PR çæè¿°æ¬ä½ (ä¹è¨±æ¯è¼çç `COMMENT` ) å å ¥ç°¡ççæè¿°ï¼ä¸¦ä¸è¨å¾å¨é件ä¸å å ¥ [.filename]#oneko.diff# ã >+ >+[NOTE] >+==== >+å¨åé¡åå ±ç³»çµ±ä¸çµ¦ä¸å好ç總çµå¯ä»¥è® port éç¼è æ´è¼é¬çèçæ¤ port ï¼æåé æçæè¿°å½¢å¼çº "[NEW PORT] _category/portname short description of the port_" ï¼ä½¿ç¨æ¤å½¢å¼è½è®æåæ´å¿«çé¨å±¬æ°ç port ã >+==== > > éåº port ä¹å¾ï¼è«èå¿çåä½³é³ã ææåå¯è½éè¦çå幾天æå¹¾åææéï¼ææå¨ FreeBSD ports tree ä¸æ£å¼åºç¾ã çå¾ ä¸ç port PR æ¸ å®å¯ä»¥å¨ http://www.FreeBSD.org/cgi/query-pr-summary.cgi?category=ports[] æ¥é±ã > >+å¨æå°è¡¨å®ä¸é¸æ _Open_ and _Ports & Packages_ ä¾ç²å¾ _open_ port PRs çæ¸ å®ã >+ > å¨çéæ°ç port ä¹å¾ï¼å¦æéè¦ç話ï¼æåæåè¦æ¨ï¼ç¶å¾æå°å®æäº¤å° port tree ã æ¨ç大åæ被åå¨ extref:{contributors}[Additional FreeBSD Contributors, contrib-additional] å表ä¸ï¼ä»¥åå ¶ä»æªæ¡ä¸ã > >+ä¹å¯ä»¥éé man:shar[1] æªæ¡ä¾æ交 port ï¼è«ä½¿ç¨ä¹å `oneko` port çä¾åã >+ >+.çºæ°ç Port åµå»º [.filename]#.shar# >+[[porting-submitting-shar]] >+[example] >+==== >+åå¾ port æå¨çç®éï¼ä½¿ç¨ `tar`åµå»º shar archive: >+ >+[source,shell] >+.... >+% cd .. >+% tar cf oneko.shar --format shar oneko >+.... >+==== >+ >+å¯ä»¥ä½¿ç¨è·æ交 [.filename]#oneko.diff# ä¸æ¨£çæ¹å¼ä¾æ交 [.filename]#oneko.shar# ã >\ No newline at end of file >-- >2.37.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 268886
: 239403