From Fedora Project Wiki
m (internal link cleaning)
 
(62 intermediate revisions by one other user not shown)
Line 23: Line 23:
=== 閱讀規約 ===
=== 閱讀規約 ===


若你還不知道如何建立 RPM 軟體包,請參考 [[How_to_create_a_GNU_Hello_RPM_package]] 教程,或是另一份更深入且有更多細節的  [[how to create an RPM package]]。
若你還不知道如何建立 RPM 軟體包,請參考 [[How_to_create_a_GNU_Hello_RPM_package/zh-tw]] 教程,或是另一份更深入且有更多細節的  [[how to create an RPM package/zh-tw]]。


請閱讀 [[Packaging:Guidelines|  打包規約]] 與 [[Packaging:NamingGuidelines|  軟體包命名規約]]。
請閱讀 [[Packaging:Guidelines|  打包規約]] 與 [[Packaging:NamingGuidelines|  軟體包命名規約]]。
Line 41: Line 41:
=== 建立 Fedora 帳號 ===
=== 建立 Fedora 帳號 ===


Create an account in the [[Infrastructure/AccountSystem |Fedora Account System]] (this is ''not'' the same as the bugzilla account)
[[Infrastructure/AccountSystem |Fedora Account System]] 中建立帳號 (這「不是」bugzilla 帳號)


# Visit the account system home: https://admin.fedoraproject.org/accounts/
# 請先造訪帳號系統主頁: https://admin.fedoraproject.org/accounts/
# Click on 'New account' and fill in the blanks.  Note that the email you give should be the same as the one you gave bugzilla.  This allows the system to link privileges between the two accounts.
# 點按「New account」,並填入對應資料。注意,你給的電子郵件應該要與 bugzilla 上申請的郵件相同。這樣系統才可以將相關權力在兩帳號之間相互連接起來。
# After you create your account, please be sure to sign the CLA (if you click on the "My Account" link in the top right, you should see CLA: CLA Done).
# 在你建立帳號之後,請確認有簽署 CLA (若您點按右上方的「My Account」連結,應該可以看到 CLA: CLA Done)。CLA 是 Contributors License Agreement,代表你身為一位貢獻者,對於本專案相關授權協議同意之書。
# You will also need to upload a public RSA SSH key. You need to use the matching private key to access Fedora machines via SSH.  You can read more about this [[Cryptography | here]].
# 你也需要上傳一份公開的 RSA SSH 金鑰。你需要使用相對應的私人金鑰以透過 SSH 存取 Fedora 機器。你可以前往 [[Cryptography | 此處]] 閱讀其他相關資料。


=== 參與重要郵遞清單 ===
=== 參與重要郵遞清單 ===


You must join the fedora {{fplist|devel-announce}} mailing list. It is a low traffic announcements only list, where important development information is posted.
你必須訂閱 fedora {{fplist|devel-announce}} 郵遞清單。這是個低流量的郵遞清單,僅供發布消息之用,重要的開發資訊都會張貼到這裡。


You can join the fedora {{fplist|devel}} mailing list, where discussions about the development of Fedora are held. This is a high traffic mailing list.
你可以訂閱 fedora {{fplist|devel}} 郵遞清單,Fedora 的主要開發討論都在這裡。這是高流量的郵遞清單。


You can also consider joining the {{fplist|package-announce}} mailing list -- The commits mailing list gets notifications on all commits in any package in the Fedora repository. This is a very high traffic mailing list. The Fedora package database sends commit mails for packages you (co-)maintain.
你可以考慮訂閱 {{fplist|package-announce}} 郵遞清單 -- 本郵遞清單提供 Fedora 軟體庫中任何軟體包相關的所有提交通知。這是超高流量的郵遞清單。當你是軟體包的維護者 (或共同維護者) 時,若有提交動作,Fedora 軟體包資料庫便會寄送郵件給你。


Another mailing list you might consider (at least to view the archives) is {{fplist|packaging}}. This is the mailing list of the [[Packaging/Committee | Fedora Packaging Committee]], who determine the official packaging guidelines for Fedora projects.
另一個你可以考慮 (至少看看過去的封存內容) 的郵遞清單是 {{fplist|packaging}}。這是 [[Packaging/Committee | Fedora 打包委員會]] 的郵遞清單,他們訂立了 Fedora 專案的官方打包規約。


=== 確認你想要打包的軟體授權方式適當 ===
=== 確認你想要打包的軟體是否適當 ===


{{admon/note||Note that there's other methods for getting sponsored into the packager group than submitting a new package.  check the [[How_to_get_sponsored_into_the_packager_group| How to get sponsored page]] for more info.}}
{{admon/note||請注意,除了提交新軟體包的方式之外,還可以藉由其他方式獲得打包者群組的支助。請看看 [[How_to_get_sponsored_into_the_packager_group| 如何取得支助]] 了解更多相關資訊。}}


The package you are submitting can be of any free and open source project that is not already packaged in Fedora. Before creating your package, make sure that the software is not already in the Fedora repository, or waiting for review.
你打算提交的軟體包必須是 Fedora 中尚未打包的任何自由與開源軟體專案。在你建立出軟體包之前,請確認該軟體是否真的不在軟體庫中,又或者其實已經進到等候校閱的階段但尚未發布而已。


* Search the [https://apps.fedoraproject.org/packages/ Fedora packages] for packages already in the repository.
* 請搜尋 [https://apps.fedoraproject.org/packages/ Fedora packages] 來看看軟體包是否已經存在軟體庫中。
* Search in the [http://fedoraproject.org/PackageReviewStatus/ Review Tracker] for packages under review.
* 請搜尋 [http://fedoraproject.org/PackageReviewStatus/ Review Tracker] 來查看軟體包是否已進到校閱階段。
* Also check the [[Deprecated_packages | deprecated packages]] list.
* 請也檢查 [[Deprecated_packages | 棄用軟體包]] 清單。
* Be aware of [[forbidden items]].
* 請也特別注意 [[forbidden items | 禁用項目]] 涵蓋的範圍。


=== 瞭解你應負的責任 ===
=== 瞭解你應負的責任 ===


Software components included in Fedora needs to be maintained actively and bugs, especially security issues needs to be fixed in a timely manner.  As a Fedora package maintainer,  it is your primary [[Package_maintainer_responsibilities | responsibility]] to ensure this.  We encourage you to get [[Policy_for_encouraging_comaintainers_of_packages | co-maintainers]] and seek the help of the Fedora community via the development mailing list whenever needed. 
Fedora 納入的軟體組件都需要勤於維護,至於臭蟲,尤其是安全性議題相關的臭蟲更需要即時修正。身為一位 Fedora 軟體包維護員,你的首要 [[Package_maintainer_responsibilities | 責任]] 就是確保上述事情能確實施行。我們鼓勵你找一些 [[Policy_for_encouraging_comaintainers_of_packages | 共同維護員]] 來維護軟體包,並透過開發用郵遞清單適時尋求幫助。


=== 看看其他人提交的軟體包 ===
=== 看看其他人提交的軟體包 ===


Read some other package submissions to learn about packaging and gain familiarity with the process and requirements.
看看一些其他人提交的軟體包來學習打包,並對流程與要求更熟悉。


One way of doing this is to join the {{fplist|package-review}} mailing list;All comments on Fedora package reviews are sent to this (read-only from your point of view) list.
達成此事的方式之一就是參與 {{fplist|package-review}} 郵遞論壇;所有的 Fedora 軟體包校閱評註都會一併寄送到此 (從你的角度來看應該是唯讀) 清單。


=== 安裝客戶端工具 (Koji) 並設置你的憑證 ===
=== 安裝客戶端工具 (Koji) 並設置你的憑證 ===


To build Packages for the Fedora Collection or [[EPEL]] in the Fedora build system you need [[Using_the_Koji_build_system|Koji]].
若要為 Fedora Collection (Fedora 軟體集) 或是為 Fedora 建置系統中的 [[EPEL]] 建置軟體包,你需要採用 [[Using_the_Koji_build_system|Koji]]


The {{package|fedora-packager}} package provides tools to help you setup and work with fedora; it will bring in everything necessary for general packaging work.  Run the following as root:
{{package|fedora-packager}} 軟體包提供一些可幫助你設置好 fedora 上相關打包工作的工具;它會幫你帶入一般打包所需的每樣必備工具。請以 root 身份執行下列指令:
  yum install fedora-packager
  yum install fedora-packager


After installation run the following as your user (not root) to [[Using_the_Koji_build_system#Fedora_Account_System_.28FAS2.29_Setup|setup your certificates and koji client configuration]]:
在安裝後,請以一般使用者身份 (root) 執行下列指令以 [[Using_the_Koji_build_system#Fedora_Account_System_.28FAS2.29_Setup|設置你的憑證與與 koji 客戶端組態]]
  fedora-packager-setup
  fedora-packager-setup


{{admon/tip|Certificate Expiration|The certificate this generates will expire after 6 months. Then you have to request another one by re-running fedora-packager-setup. Also every time you request a new certificate, the old one is invalidated and cannot be used anymore.}}
{{admon/tip|憑證過期|這個動作所產生的憑證會在 6 個月後過期。接著你就必須再次執行 fedora-packager-setup 來申請另一個憑證。每次你申請新憑證時,舊的憑證就會變無效而無法再使用。}}


You can now use "koji" to try to build your RPM packages in the Fedora build system, even on platforms or Fedora versions you don't have.  Note that you can (and definitely should) test out builds ("scratch" builds) even before your package has been approved and you have been sponsored.  A simple way to do a scratch build using koji is to do this at the command line:
你現在可以使用「koji」來嘗試在 Fedora 建置系統上打造 RPM 軟體包,即使是你沒有的平臺或你沒有的 Fedora 版本,該系統都能打造出對應的軟體包。請注意,你可以 (而且絕對應該) 在軟體包被批准且被支助之前,先測試一下建置成果 (這裡指的是「scratch」建置版,也就是從最基本系統打造出的版本)
  koji build --scratch TARGET path_to_source_RPM
  koji build --scratch TARGET path_to_source_RPM
Where:
其中的
* TARGET is a distribution keyword such as f17 (for Fedora 17).  You can run "koji list-targets" to see all targets.  To build for the next release (rawhide), ''don't'' use "dist-rawhide" - use "fX" where X is one more than the latest stable or branched release.
* TARGET 是指散布版本關鍵字,例如 f17 (代表 Fedora 17)。你可以執行「koji list-targets」來查看所有可用的目標版本有哪些。若要為下個發行版本 (rawhide) 建置軟體包的話,請 ''不要'' 使用「dist-rawhide」 - 請改用「fX」,此處的 X 是代表最新穩定版再下一版,或是分支後的發行版。
* Note that you need to supply the ''path'' to the source RPM (which ends in .src.rpm), and '''not''' a URL.  (If you only have the spec file, use <code>rpmbuild --nodeps -bs SPECFILE</code> to create the new source RPM).
* 請注意,你需要提供前往源碼 RPM (檔名結尾為 .src.rpm) 的 ''路徑'',而路徑 '''不可以''' 是 URL。 (如果你只有 spec 檔,請使用 <code>rpmbuild --nodeps -bs SPECFILE</code> 來建立新的源碼 RPM)


Your koji builds can only depend on packages that are actually in the TARGET distribution repository.  Thus, you can't use koji to build for released distributions if your package depends on other new packages that Bodhi hasn't released yet.  You ''can'' use koji to build for rawhide (the next unreleased version), even if it depends on other new packages, as long as the other packages were built for the "rawhide" as described below.  If you need to build against a package that is not yet a stable released
你的 koji 軟體包建置僅可以依賴 TARGET 散布版軟體庫中實際擁有的軟體包。因此,若你的軟體包依賴 Bodhi 尚未發行的新軟體包的話,你就無法使用 koji 為發行的散布版建置軟體包。你''可以'' koji rawhide (下個還未發行的版本) 建置軟體包,即使它依賴其他新的軟體包,只要其他軟體包以下方描述方式為「rawhide」建置即可。如果你需要對尚未有穩定的發行更新的軟體包做建置,你可以提交一張請票,請票上加上 rel-eng https://fedorahosted.org/rel-eng/newticket ,並申請該軟體包加為 buildroot override (建置根基的凌駕之意)。至於 EPEL 中的軟體包,你必須使用 ''epel'' 作為 componet 才能讓請求發送給對的負責人。
update, you can file a ticket with rel-eng at: https://fedorahosted.org/rel-eng/newticket and request that that package be
added as a buildroot override. For packages in EPEL, you have to use the component ''epel'' to get the request to the right persons.


You can learn more about koji via:
你可以透過以下指令更深入瞭解 koji:
  koji --help            # General help
  koji --help            # 一般的幫助說明
  koji --help-commands  # list of koji commands
  koji --help-commands  # 列出 koji 指令
  koji COMMAND --help    # help on command COMMAND
  koji COMMAND --help    # 對於某 COMMAND 指令的幫助說明


[[Using the Koji build system]] has more information about using Koji.
[[Using the Koji build system]] 有更多 Koji 使用上的相關資訊。


=== 製作軟體包 ===
=== 製作軟體包 ===


* If you don't know how to create an RPM package, see the [[How to create an RPM package]].
* 如果你還不知道怎麼製作 RPM 軟體包,請見 [[How to create an RPM package]]
* Make sure that your package meets the [[Packaging:Guidelines|  Packaging Guidelines]] and [[Packaging:NamingGuidelines|  PackageNamingGuidelines]] .
* 請確認你的軟體包有符合 [[Packaging:Guidelines|  打包規約]] [[Packaging:NamingGuidelines|  軟體包命名規約]]
* Be aware of the [[Packaging:ReviewGuidelines| Package Review Guidelines]]  (they will be used during the package review).
* 請注意 [[Packaging:ReviewGuidelines| 軟體包校閱規約]]  (這些規則會在軟體包校閱時使用)
* Make sure your package builds.  This is surprisingly important, because a significant number of submissions don't.
* 請確認你的軟體包確實可以成功建置。這個要求非常基本,但似乎很多人忘記。這令人訝異地重要,因為很多人提交的成品竟然都無法成功建置。


=== 上傳你的軟體包 ===
=== 上傳你的軟體包 ===


Upload your SRPM and SPEC files onto the Internet somewhere so that others can retrieve them.  This can be anywhere accessible by a URL, but it is important that the files be directly accessible, not hidden behind some service that makes people wait to download things or redirects through advertising pages.
上傳你的 SRPM SPEC 檔案到網際網路上的某個地方,好讓他人可以擷取。存放位置可以是任何 URL 能存取的地方,但更重要的是你的檔案應該要可以直接存取,不要躲在某些服務的後方,讓大家還得等候倒數才能下載,又或者將他們重新導向至廣告頁面,那就太糟糕了。
If you are in at least one project group then you can use your storage at [http://fedorapeople.org http://fedorapeople.org] for this.  If you have not done anything with your account besides set it up and sign the CLA then you can request sufficient access to use fedorapeople space by visiting [http://fedorahosted.org/packager-sponsors the sponsors trac instance] and filing a ticket in the "Initial package hosting request" component.
如果你至少有參與一組專案群組,那麼你可以使用 [http://fedorapeople.org http://fedorapeople.org] 來儲放檔案。如果你的帳號除了設好還有簽署 CLA 之外沒做過其他更動,那麼你可以申請 fedorapeople 空間的存取權,請造訪 [http://fedorahosted.org/packager-sponsors 支助者 trac 實體],並針對「Initial package hosting request」元件提交一份請票。


{{Anchor|CreateYourReviewRequest}}
{{Anchor|CreateYourReviewRequest}}
=== 申請軟體包校閱 ===
=== 申請軟體包校閱 ===


Fill out this form: https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=fedora-review.
填打這份表格: https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=fedora-review


* Before submitting your request, be sure there’s not a previous request for the same package.  There is a convenient search box on the [http://fedoraproject.org/PackageReviewStatus/ package review status page].
* 在提交你的請求之前,請先確認這個軟體包是否沒有前人提交過申請。在 [http://fedoraproject.org/PackageReviewStatus/ 軟體包校閱狀態頁] 上有個方便的搜尋方塊可以使用。
* Make sure that you put the '''name of the package''' (excluding version and release numbers) in the '<code>Review Summary</code>' field, along with a very '''brief summary''' of what the package is.
* 請確認您在 '<code>Review Summary</code>' (校閱摘要) 欄位中有填入 '''軟體包名稱''' (不含版本與發行編號),以及說明該軟體包的非常 '''簡扼摘要'''
* Put a '''description''' of your package (usually, this can be the same thing as what you put in the spec %description) in the '<code>Review Description</code>' field.  Include the '''URLs''' to your '''SRPM''' and '''SPEC''' files.
* 在 '<code>Review Description</code>' 欄位中填入您軟體包的 '''說明描述''' (通常這可與你在 %description 區段所輸入的相同)。包括您 '''SRPM''' '''SPEC''' 檔案的 '''URL''' 連結。
* Explain in the ticket that this is your first package and you need a sponsor. Also include any information that may help prospective sponsors.  If you've been active in other review work, include links.  If you're the upstream maintainer, be sure to say so.
* 在您的請票中解釋說這是你打包的第一個軟體包,而且你還需要一位支助者 (This is my first package and I need a sponsor.)。接著請納入對那位未來可能成為你支助者的人來說有所幫助的任何相關資訊。如果你在其他校閱作業中有所作為,也請不吝加上相關連結。如果你正是軟體的上游維護者,請務必明說出來。
* For bonus points, include a link to a successful koji build so that everyone knows you did all of your homework.
* 如果想加分,請加上 koji 建置成功作業的連結,這樣大家都會知道你做完所有的功課了。


{{Admon/warning | Make sure that you mention in the '<code>Review Description</code>' field that this is your first package, and you are seeking a sponsor. In Fedora Package Collection, all new contributors must be sponsored. Some potential sponsors will look at the [https://bugzilla.redhat.com/bugzilla/showdependencytree.cgi?id&#61;FE-NEEDSPONSOR FE-NEEDSPONSOR] bug in bugzilla to find packages to review. You can add your package to this list by editing your review request bug and adding <code>FE-NEEDSPONSOR</code> in the '<code>Bug </code>''xyz''<code> blocks</code>' field (where ''xyz'' is the bug number for your review request).}}
{{Admon/warning | 請確認你在 '<code>Review Description</code>' 欄位中有提及這是你打包的第一個軟體包,而且你正在尋找支助者的幫助 (例如:This is my first package, and I am seeking a sponsor.)。在 Fedora Package Collection 中,所有新的貢獻者都必須有支助者在旁協助。有些可能現身的支助者會查看 bugzilla 中的 [https://bugzilla.redhat.com/bugzilla/showdependencytree.cgi?id&#61;FE-NEEDSPONSOR FE-NEEDSPONSOR] 臭蟲以查找可校閱的軟體包。你可以將你的軟體包加入這份清單中,你只要編輯你的校閱請求臭蟲回報,在 '<code>Bug </code>''xyz''<code> blocks</code>' 裡面加上 <code>FE-NEEDSPONSOR</code> (''xyz'' 是你那份校閱請求的臭蟲回報編號) 即可。}}


The review process is described in detail on the [[Package Review Process| Package Review Process]] page.
校閱程序詳細記載於 [[Package Review Process| 軟體包校閱程序]] 頁面上。


{{Anchor|WatchForFeedback}}
{{Anchor|WatchForFeedback}}
Line 139: Line 138:
=== 知會上游 ===
=== 知會上游 ===


Fedora as a project prefers to [[Staying_close_to_upstream_projects | stay close to upstream]]. Inform the developers that you are packaging the software. You can do that by sending them an email introducing yourself and pointing out the review request. This sets up the stage for future conversations. They will usually advertise the fact that their software is now part of Fedora or might want to inform you of important bugs in the existing release, future roadmaps etc.
Fedora 是偏愛 [[Staying_close_to_upstream_projects | 和上游緊密合作]] 的專案。請通知你打包的軟體的開發者你正在幫它打包。你可以透過寄送電子郵件來介紹你自己,並且指出校閱請求的連結。這樣一來就為將來的可能溝通鋪好路了。他們通常會特地宣傳他們的軟體現在成為 Fedora 中的一部分了;而且如果現在的發行版本有什麼重大的臭蟲需要修正、有什麼未來版本的規劃... 等重要消息時,他們可能會想要通知你。


=== 自我介紹 ===
=== 自我介紹 ===


When a new package maintainer joins the Fedora Project, we request that he/she introduces themselves on the Fedora Devel mailing list. To sign up for the list, visit the {{fplist|devel}} list's signup page . The primary purpose of this is to begin the process of building trust by learning about the package maintainer and increase the chances of your review request being processed sooner.
當一位軟體包新手維護者加入 Fedora 專案時,我們會要求他/她在 Fedora Devel 郵遞清單上自我介紹。若要註冊這個郵遞清單,請先造訪 {{fplist|devel}} 清單的註冊頁。此動作的主要用意是讓你可以熟悉其他軟體包維護者,並開始建立對你的信任,可讓你的校閱請求未來處理得更快一些。


The purpose of all this is to break anonymity and foster real-world community within the project. You are under no obligation to reveal personal secrets. The objective is to establish a level of trust with yourself and the other members of the project.
此清單的根本用途是要破除匿名性、促進專案社群真實互動,不過你並沒有義務揭開你的個人秘密。主要目標是要讓你與專案的其他成員之間建立出某種程度的信任。


Subject: Self Introduction
主旨:Self Introduction


Body:  Add any information you believe is applicable including past experience, a link to the review request you have filed and a brief description of yourself.  You can also post your GPG key information if you want to.
正文:可以加入任何你覺得有用處的相關資訊,像是過去的經驗、你提交的校閱請求連結、關於你自己的簡短描述。如果你希望的話,也可以張貼你的 GPG 金鑰資訊。


=== 持續關注別人給你的反饋 ===
=== 持續關注別人給你的反饋 ===


Watch the Bugzilla report for your first package. You should get notifications of changes by email. Fix any blockers that the reviewer(s) point out.
關注你第一個軟體包的 Bugzilla 回報。你應該會透過電子郵件收到通知。修正任何檢閱者指出的發行阻擋議題 (blocker,即未經修正則不應發行的阻擋關卡)


{{Anchor|GetSponsored}}
{{Anchor|GetSponsored}}
=== 取得他人支助 ===
=== 取得他人支助 ===


When the package is APPROVED by the reviewer, you must separately obtain member sponsorship in order to check in and build your package.  Sponsorship is not automatic and may require that you further participate in other ways in order to demonstrate your understanding of the packaging guidelines.  Key to becoming sponsored is to convince an existing sponsor-level member that you understand and follow the project's guidelines and processes.
一旦軟體包由校閱者 APPROVED (批准) 後,你必須另外取得成員支助才能檢入 (check in) 與建置 (build) 你的軟體包。「支助」(Sponsorship) 不是自動的,你可能需要以不同方式進一步參與來展現出你已經很明瞭打包規約了。被支助的關鍵是要說服現有的支助等級成員 (sponsor-level member) 你不僅了解更會遵守本專案的規約與流程。


See [[how to get sponsored into the packager group]] for more information on the process of becoming sponsored.
請見 [[how to get sponsored into the packager group | 如何取得支助以進入打包者群組]] 查看更多支助程序的資訊。


{{Admon/warning | Review and approval for the first package for new packagers '''must''' be done by registered sponsors. Subsequent reviews can be done by any package maintainer. Informal reviews can always be done by anyone interested.}}
{{Admon/warning | 新打包者的第一個軟體包其校閱與批准 '''必須''' 由註冊的支助者處理。後續的校閱則可由任何一位軟體包維護者處理。非正式的校閱則可由任何有興趣的人處理。}}


Your sponsor can add you to the packager group. You should receive email confirmation of your sponsorship.
你的支助者可以將你加入打包者群組中。你應該會收到你被支助的電子郵件通知。


=== 將軟體包加入源碼管理 (SCM, Source Code Management) 系統中並設定擁有者 ===
=== 將軟體包加入源碼管理 (SCM, Source Code Management) 系統中並設定擁有者 ===


If you are becoming a maintainer for a new package, instead of being a co-maintainer, follow [[Package SCM admin requests]] to get a module for your new package and branches for recent releases.
若你正打算成為新軟體包的維護者,而不是成為共同維護者,請跟隨 [[Package SCM admin requests | Package SCM 管理員請求]] 的指示,來取得您新軟體包與分支最近發行版本的模組。


This will be used to set up the proper records in the owners database, which is used for access to build the package, bugzilla population, and other features.  This step creates a module in the repository your new package, with branches for each requested distribution.
這用來在擁有者資料庫中設置適當的記錄,用來存取建置軟體包、bugzilla 情報狀態、其他功能等。這一步會在倉儲中建立你新軟體包的模組,以及每個請求的散布版本分支。


=== 檢出模組 ===
=== 檢出模組 ===


You ''could'' check out your module now, but before doing that, consider doing "mkdir ~/fedora-scm ; cd ~/fedora-scm" - that way, all your files are inside that.  Also, run ssh-add, so that you won't have to keep typing in your key password.
你現在 ''可以'' 檢出 (check out) 你的模組,但在那之前,請先考慮執行 "mkdir ~/fedora-scm ; cd ~/fedora-scm" - 這樣一來,你的所有檔案都會放在那裡。此外,也執行 ssh-add,那樣你就不需要每次都要打密碼。


{{Admon/tip | Running <code>ssh-add</code> before doing any SCM operations is a very good idea. It will save you from having to type your key password for every operation. You only have to run ssh-add once per session, it will remember it until you log out or reboot. If "ssh-add" reports "Could not open a connection to your authentication agent.", start a new shell under it using "exec ssh-agent bash".}}
{{Admon/tip | 在任何 SCM 操作之前先執行 <code>ssh-add</code> 會是個好習慣。它可以節省你每次操作都要輸入密碼的時間。每次的作業階段中,你只需要執行 ssh-add 一次,它會記住密碼直到你登出並重新開機。如果 "ssh-add" 回報說 "Could not open a connection to your authentication agent.";那麼開啟新的 shell,並在那裡使用 "exec ssh-agent bash"}}


Now you are ready to checkout your module from the SCM:
現在你已準備好從 SCM 檢出你的模組:
<pre>
<pre>
  fedpkg clone <packagename>
  fedpkg clone <packagename>
</pre>
</pre>


Where <code><packagename></code> should be replaced with the name of your package.
這裡的 <code><packagename></code> 應該替換成你軟體包的名稱。


{{Admon/caution | If this step fails, be sure your private ssh key (<code>~/.ssh/id_rsa</code>) mode is set to 0400. You might have to wait for up to an hour after your request for a new git module has been approved to get write access. Make sure your public key is the same as in the Fedora Accounts System (FAS). Key propagation may take an hour or so after uploading into FAS}}
{{Admon/caution | 如果這一步失敗了,請確認你的私人 ssh 金鑰 (<code>~/.ssh/id_rsa</code>) 模式有設為 0400。在你請求新的 git 模組後,到你被批准取得寫入權限的這段時間,你可能必須等候長達一個小時。請確認你的公開金鑰與 Fedora 帳號系統 (FAS) 中的相同。在上傳至 FAS 後,金鑰產生可能會花上一個小時左右}}


{{Admon/important| Note that fedpkg does not set the user config for your new git repo automatically. Make sure to have these set globally or locally in your new repo before you do your first commit (see [http://fedoraproject.org/wiki/Git_Quickref#Configure_your_global_git_settings Configure your global git settings]).}}
{{Admon/important| 注意,fedpkg 不會為你的新 git 倉儲自動設定使用者組態。請確認你在第一次提交之前,已在你的新倉儲中設好全域設定或區域設定 (請見 [[Git_Quickref#Configure_your_global_git_settings|Configure your global git settings]])}}
{{Admon/important| Note: If you are not a member of the fedora packager group, you will receive a "permission denied" error. Use the -a flag to clone anonymously. }}
{{Admon/important| 注意:如果你不是 fedora 打包者群組中的成員,你會收到 "permission denied" 錯誤。請使用 -a 旗標來匿名 clone。 }}


===  測試你的軟體包 ===
===  測試你的軟體包 ===


Refer to [[Using_Mock_to_test_package_builds]] and [[Using_the_Koji_build_system#Scratch_Builds]] for more information on testing your package.  Mock uses your local system while Koji command line tool uses the Fedora build system server. 
請參考 [[Using_Mock_to_test_package_builds]] 以及 [[Using_the_Koji_build_system#Scratch_Builds]] 瞭解更多測試軟體包的相關資訊。Mock 使用的是你的本地端系統,而 Koji 命令列工具則使用 Fedora 建置系統伺服器。


=== 匯入、提交、建置你的軟體包 ===
=== 匯入、提交、建置你的軟體包 ===


Now that you've checked out your (empty) package module with fedpkg,
現在你已用 fedpkg 檢出你的 (空白) 軟體包模組,
cd into the module's master branch:
cd 進入模組的主要分支 (master branch):
  cd <packagename>
  cd <packagename>
Run fedpkg to import the contents of the SRPM into the SCM:
執行 fedpkg SRPM 的內容匯入 SCM 中:
  fedpkg import PATH_TO_SRPM
  fedpkg import PATH_TO_SRPM


Line 207: Line 207:
  fedpkg build
  fedpkg build


Obviously, replace <code>PATH_TO_SRPM</code> with the full path (not URL) to your approved SRPM, and <code>XXXXXX</code> with the package review bug number.
很明顯,請把這裡的 <code>PATH_TO_SRPM</code> 換成你被批准的 SRPM 的完整路徑 (不是 URL),而 <code>XXXXXX</code> 則換成軟體包校閱的臭蟲回報編號。


This imports into, commits, and builds only the '''master''' (rawhide) branch. 
這只會匯入、提交、建置 '''master''' (rawhide) 主要分支。


If the commit fails with this kind of message:
如果提交失敗並傳回這類訊息:
  W access for why DENIED to YOUR_ACCOUNT
  W access for why DENIED to YOUR_ACCOUNT
  fatal: The remote end hung up unexpectedly
  fatal: The remote end hung up unexpectedly
  Could not push: Command '['git', 'push']' returned non-zero exit status 128
  Could not push: Command '['git', 'push']' returned non-zero exit status 128
Then you don't have the necessary rights to modify that package branch;
那麼你尚未擁有修改該軟體包分支的必須權利;
view https://admin.fedoraproject.org/pkgdb/acls/name/PACKAGE_NAME
請查看 https://admin.fedoraproject.org/pkgdb/acls/name/PACKAGE_NAME
to request those rights.
以請求相關權利。


<!--
<!--
{{Admon/caution|the rest of this section is not yet updated to use the new git SCM}}
{{Admon/caution|此小節的剩餘部分尚未更新以使用新的 git SCM}}


You will probably ''also'' want to do additional imports using the -b parameter, which will import the package into other distribution branches like '''f16''', e.g.:
你可能 '''' 會想要使用 -b 參數來作額外匯入,這會將軟體包匯入其他散布版本分支中,例如 '''f16'''
   fedpkg PATH_TO_SRPM
   fedpkg PATH_TO_SRPM


)
)


Then, you'll see "If you want to make any changes before committing, please press Ctrl-C.
接著,你會看見 "If you want to make any changes before committing, please press Ctrl-C.
Otherwise press Enter to proceed to commit."  Press Enter.
Otherwise press Enter to proceed to commit."  Press Enter.


Finally (if you haven't set up an other editor) vi will open up to let you edit the changelog. For the changelog, use the same format as the end of the .spec file. If you haven't used vi yet, after entering your changelog press 'Enter' and type
最後 (if you haven't set up an other editor) 會開啟 vi 讓你編輯 changelog。至於 changelog,請使用與 .spec 檔案結尾相同的格式。如果你尚未使用過 vi,在您輸入完 changelog 後按下 'Enter' 並輸入
   :wq
   :wq
and press 'Enter' again to finish the import.
再按下 'Enter' 一次完成匯入。


-->
-->
Line 238: Line 238:
=== 更新你的分支 (如果想要的話) ===
=== 更新你的分支 (如果想要的話) ===


Branches are <code>f</code># (formerly <code>F-</code># and before that <code>FC-</code>#), <code>master</code>, etc. So ''f{{FedoraVersion}}'' is the branch for Fedora {{FedoraVersion}}.
分支為 <code>f</code># (以往使用 <code>F-</code># ,更早則是用 <code>FC-</code>#)<code>master</code>... 等。而 ''f{{FedoraVersion}}'' 則代表 Fedora {{FedoraVersion}} 的分支版本。


To switch to a branch first:
若想要先切換為某分支:
  fedpkg switch-branch BRANCH (e.g. f{{FedoraVersion}})
  fedpkg switch-branch BRANCH (例如:f{{FedoraVersion}})


Merge the initial commit from master, creating an identical commit in the branch:
合併 master 主幹的初始提交,在分支中建立相同的提交:
  git merge master
  git merge master


Push the changes to the server:
將更動推送回去伺服器中:
  git push
  git push


Build the package:
建置軟體包:
  fedpkg build
  fedpkg build


If there is another branch to work with repeat "To switch to a branch" and import and commit to each branch
如果有另外一個你正在處理的分支,則請回到「若想要先切換為某分支」並重復動作來匯入、提交至各自分支中。


{{Admon/warning | Be sure that you build for rawhide (master) branch before pushing updates for any other branches! Otherwise, those updates will get inherited into rawhide, which is almost certainly not what you want.}}
{{Admon/warning | 請確認你在推送更新到任何其它分支之前,有先為 rawhide (master) 分支作建置!否則的話,這些更新會因繼承關係而進入 rawhide,這絕對不是你想要的結果。}}
{{Admon/warning | Sync to buildsys is an hourly thing. So, sometimes you might have to wait for an hour to get access of the build server to give "fedpkg build"}}
{{Admon/warning | 每隔 1 小時會與 buildsys 同步一次。所以,有時候你可能必須等候一個小時才能取得建置伺服器的存取權,才可下 "fedpkg build" 指令。}}
If everything goes well, it should queue up your branch for building, the package will cleanly build, and you're done!
如果事情發展得順利,它應該會將你的分支排入佇列中等候建置,軟體包在乾淨環境下建置,接著就完成啦!


If it fails to build, the build system will send you an email to report the failure and show you to the logs. Commit any needed changes to git, bump the SPEC release number, and request a new build.
如果建置失敗,建置系統會傳給你電子郵件回報失敗,並將記錄顯示給你看。就請提交任何所需的更動至 git,遞加 SPEC 的發行編號,接著提請新的建置。


=== Bodhi 提交軟體包更新 ===
=== Bodhi 提交軟體包更新 ===


The Fedora update system called Bodhi is used for pushing updates, classifying packages etc.
Fedora 更新系統稱為 Bodhi (即中文之菩提),用於推送更新、分類軟體包等。
Do not submit "master" (aka rawhide) packages via bodhi.
請不要透過 bodhi 提交「master」版的 (rawhide ) 軟體包。


You can push an update using Bodhi via the command line using this in each branch:
你可以透過下列指令使用 Bodhi 來推送任何 branch 分支中的更新:
<pre>
<pre>
  fedpkg update
  fedpkg update
</pre>
</pre>


You can also use "bodhi" command directly as described in the [[Bodhi_Guide|Bodhi Instruction]].
你也可以直接使用 "bodhi" 指令,指令記載於 [[Bodhi_Guide|Bodhi Instruction]] 中。


You can also use [https://admin.fedoraproject.org/updates/new/ the Web interface for Bodhi] to request enhancement updates for each released Fedora you are bringing a new package to.
你也可以使用 [https://admin.fedoraproject.org/updates/new/ Bodhi 的網頁介面] 來請求你想將新的補強性更新帶到哪個發行的 Fedora 版本中。


The first field asks for the name of the "Package". This field will auto-complete the package name found in the Koji build system, e.g. <package-name>-<version>-<release>.fc{{FedoraVersion}}. If completion doesn't work, just enter the package build name yourself.
第一個欄位會詢問你軟體包 "Package" 的名稱。這個欄位會自動從 Koji 建置系統中自動補完軟體包名稱,例如 <package-name>-<version>-<release>.fc{{FedoraVersion}}。如果補完功能沒有作用,請自行輸入軟體包建置名稱。


For new packages, choose "newpackage" as the "type" of update.
如果是新的軟體包,請選擇 "newpackage" (新軟體包) 作為更新的 "type" (類型)。


Put the "Request" as "testing" if you want to put the package through testing first, see [[QA| Fedora Quality Assurance]] . Put "stable" if you want to push the package directly to stable.
如果你想要先讓軟體包作測試用,請把 "Request" (請求) 設為 "testing" (測試),詳情請見 [[QA| Fedora 品質保證]]。如果你想要讓軟體包直接推入穩定版,則請設為 "stable" (穩定)。


For new packages, put the bug number of the package's Review Request in the "Bugs" field blank. Bodhi will automatically close it as NEXTRELEASE when it gets pushed to the requested update status.
對於新的軟體包,請將軟體包 "Bugs" 欄位中的 Review Request 臭蟲編號留空。當它推入所請求的更新狀態時,Bodhi 會自動將它以 NEXTRELEASE 狀態關閉。


For new packages, add a copy of the package's description in the "Notes" section, so end users will know what the package is.
對於新的軟體包,請在 "Notes" 區段中加入軟體包的描述說明副本,這樣一來終端使用者才會知道這個軟體包究竟是什麼。


Here is the [[Bodhi_Guide|Bodhi Instruction]].
這裡有份 [[Bodhi_Guide|Bodhi 使用指引]]


After you have submitted an upgrade through bodhi, your package is placed in a queue. Periodically, an administrator will check the queue and push all of the packages into the appropriate repositories.
當你透過 bodhi 提交一份升級之後,你的軟體包就會擺入佇列中。管理員會定期檢查佇列,並將所有的軟體包推入適當的軟體庫中。


=== 讓軟體包列在「comps」檔案中 ===
=== 讓軟體包列在「comps」檔案中 ===


If appropriate for the package, make it available in "comps" files so that it can be selected during installation and included in yum's package group operations.  See [[PackageMaintainers/CompsXml|How to use and edit comps.xml for package groups]] for more info.
如果軟體包適當,讓它列在「comps」檔案中,這樣一來就可以在安裝時選擇該軟體包,而且也可納入 yum 的軟體包群組操作中。請見 [[PackageMaintainers/CompsXml|How to use and edit comps.xml for package groups]] 以瞭解更多資訊。


=== 持續查看更新狀況 ===
=== 持續查看更新狀況 ===


Fedora has infrastructure available for monitoring new upstream releases of the software you are packaging. Refer to [[Upstream Release Monitoring]] for more details. Learn to handle updates by reading the [[Package update HOWTO]]
Fedora 有可用的基礎設施可監控你打包的軟體是否有新的上游發行版本。請參考 [[Upstream Release Monitoring|上游發行監控]] 瞭解更多細節資訊。若要學習如何處理更新,請閱讀 [[Package update HOWTO | 軟體包更新指南]]


== 取得幫助  ==
== 取得幫助  ==


We know that this process can be as clear as mud sometimes, and we're always trying to make it better. If you run into any problems, or have any questions, please ask on the {{fplist|devel}} mailing list or in {{fpchat|#fedora-devel}} on freenode.net.
我們了解這套流程有時可能讓你如入五里霧中,但我們總試著讓情況變得更好。如果你遇到任何問題,或是有任何疑問,請不要遲疑前往 {{fplist|devel}} 郵遞清單發問,或是上 freenode.net 的 {{fpchat|#fedora-devel}} 頻道上討論。


The Fedora Mentors Project has people willing to help new contributors in their packaging efforts. See the [[Mentors]] page for more information.
Fedora Mentors Project 中有許多願意幫助新手打包的導師。請查看 [[Mentors]] 頁面了解更多相關資訊。


See also [[using git FAQ for package maintainers]].
也請見 [[Using_git_FAQ_for_package_maintainers]]


== 若你已是維護者且還想要製作新的軟體包推入 Fedora 軟體包集合  ==
== 若你已是維護者且還想要製作新的軟體包推入 Fedora 軟體包集合  ==


If you already maintain a package in Fedora and want to maintain another, follow the [[new package process for existing contributors]] .
若你已有維護 Fedora 的軟體包,並且想要維護新的一個,請遵循 [[new package process for existing contributors|既有貢獻者的新軟體包流程]]


[[Category:Package Maintainers]] [[Category:Join]]
[[Category:Package Maintainers]] [[Category:Join]]

Latest revision as of 14:34, 18 September 2016

翻譯中...

貢獻角色

Idea.png
貢獻角色
這些只是貢獻角色上的建議而已,你可以做的不只這些。只有你的想像力可以綁住你!

Join OSDeveloper.png
OS 開發者

如何成為 Fedora 軟體包集合的維護者?

哦,你已決定要成為一位 Fedora 專案中的軟體包維護者?那麼本篇指引會帶你走過第一次提交軟體包的流程。

799px-Fedora-submit-package-zh-tw.png

成為一位 Fedora 軟體包集合的維護者

閱讀規約

若你還不知道如何建立 RPM 軟體包,請參考 How_to_create_a_GNU_Hello_RPM_package/zh-tw 教程,或是另一份更深入且有更多細節的 how to create an RPM package/zh-tw

請閱讀 打包規約 軟體包命名規約

你需要對這些規約仔細且澈底的熟悉,因為所有的軟體包都受這些規約規範。如果你有任何問題,請在 Fedora Packaging 郵遞清單上詢問。

建立 Bugzilla 帳號

請先確認你有 Red Hat Bugzilla 的帳號。

你在 bugzilla 帳號中使用的電子郵件位址應該要和你在 Fedora Account System 中使用的相同,而且任何與 Fedora 打包相關的事務都應該使用同個帳號。

Important.png
如果你已經有 @fedoraproject.org 電子郵件位址,請不要使用它!
你不應該在 Bugzilla 中使用你的 @fedoraproject.org 電子郵件。如果你用了該帳號,一旦得到他人的支助後便無法取得你的 bugzilla 特別權限。如果你真的很想使用你的 @fedoraproject.org 郵件位址,你大概得向 Fedora Infrastructure Ticket System 提出申請,請管理員手動用設定凌駕與你 Fedora 帳號連結的 bugzilla 電子信箱。

建立 Fedora 帳號

Fedora Account System 中建立帳號 (這「不是」bugzilla 帳號)

  1. 請先造訪帳號系統主頁: https://admin.fedoraproject.org/accounts/
  2. 點按「New account」,並填入對應資料。注意,你給的電子郵件應該要與 bugzilla 上申請的郵件相同。這樣系統才可以將相關權力在兩帳號之間相互連接起來。
  3. 在你建立帳號之後,請確認有簽署 CLA (若您點按右上方的「My Account」連結,應該可以看到 CLA: CLA Done)。CLA 是 Contributors License Agreement,代表你身為一位貢獻者,對於本專案相關授權協議同意之書。
  4. 你也需要上傳一份公開的 RSA SSH 金鑰。你需要使用相對應的私人金鑰以透過 SSH 存取 Fedora 機器。你可以前往 此處 閱讀其他相關資料。

參與重要郵遞清單

你必須訂閱 fedora devel-announce 郵遞清單。這是個低流量的郵遞清單,僅供發布消息之用,重要的開發資訊都會張貼到這裡。

你可以訂閱 fedora devel 郵遞清單,Fedora 的主要開發討論都在這裡。這是高流量的郵遞清單。

你可以考慮訂閱 package-announce 郵遞清單 -- 本郵遞清單提供 Fedora 軟體庫中任何軟體包相關的所有提交通知。這是超高流量的郵遞清單。當你是軟體包的維護者 (或共同維護者) 時,若有提交動作,Fedora 軟體包資料庫便會寄送郵件給你。

另一個你可以考慮 (至少看看過去的封存內容) 的郵遞清單是 packaging。這是 Fedora 打包委員會 的郵遞清單,他們訂立了 Fedora 專案的官方打包規約。

確認你想要打包的軟體是否適當

Note.png
請注意,除了提交新軟體包的方式之外,還可以藉由其他方式獲得打包者群組的支助。請看看 如何取得支助 了解更多相關資訊。

你打算提交的軟體包必須是 Fedora 中尚未打包的任何自由與開源軟體專案。在你建立出軟體包之前,請確認該軟體是否真的不在軟體庫中,又或者其實已經進到等候校閱的階段但尚未發布而已。

瞭解你應負的責任

Fedora 納入的軟體組件都需要勤於維護,至於臭蟲,尤其是安全性議題相關的臭蟲更需要即時修正。身為一位 Fedora 軟體包維護員,你的首要 責任 就是確保上述事情能確實施行。我們鼓勵你找一些 共同維護員 來維護軟體包,並透過開發用郵遞清單適時尋求幫助。

看看其他人提交的軟體包

看看一些其他人提交的軟體包來學習打包,並對流程與要求更熟悉。

達成此事的方式之一就是參與 package-review 郵遞論壇;所有的 Fedora 軟體包校閱評註都會一併寄送到此 (從你的角度來看應該是唯讀) 清單。

安裝客戶端工具 (Koji) 並設置你的憑證

若要為 Fedora Collection (Fedora 軟體集) 或是為 Fedora 建置系統中的 EPEL 建置軟體包,你需要採用 Koji

Package-x-generic-16.pngfedora-packager 軟體包提供一些可幫助你設置好 fedora 上相關打包工作的工具;它會幫你帶入一般打包所需的每樣必備工具。請以 root 身份執行下列指令:

yum install fedora-packager

在安裝後,請以一般使用者身份 (非 root) 執行下列指令以 設置你的憑證與與 koji 客戶端組態

fedora-packager-setup
Idea.png
憑證過期
這個動作所產生的憑證會在 6 個月後過期。接著你就必須再次執行 fedora-packager-setup 來申請另一個憑證。每次你申請新憑證時,舊的憑證就會變無效而無法再使用。

你現在可以使用「koji」來嘗試在 Fedora 建置系統上打造 RPM 軟體包,即使是你沒有的平臺或你沒有的 Fedora 版本,該系統都能打造出對應的軟體包。請注意,你可以 (而且絕對應該) 在軟體包被批准且被支助之前,先測試一下建置成果 (這裡指的是「scratch」建置版,也就是從最基本系統打造出的版本)。

koji build --scratch TARGET path_to_source_RPM

其中的

  • TARGET 是指散布版本關鍵字,例如 f17 (代表 Fedora 17)。你可以執行「koji list-targets」來查看所有可用的目標版本有哪些。若要為下個發行版本 (rawhide) 建置軟體包的話,請 不要 使用「dist-rawhide」 - 請改用「fX」,此處的 X 是代表最新穩定版再下一版,或是分支後的發行版。
  • 請注意,你需要提供前往源碼 RPM (檔名結尾為 .src.rpm) 的 路徑,而路徑 不可以 是 URL。 (如果你只有 spec 檔,請使用 rpmbuild --nodeps -bs SPECFILE 來建立新的源碼 RPM)。

你的 koji 軟體包建置僅可以依賴 TARGET 散布版軟體庫中實際擁有的軟體包。因此,若你的軟體包依賴 Bodhi 尚未發行的新軟體包的話,你就無法使用 koji 為發行的散布版建置軟體包。你可以 用 koji 為 rawhide (下個還未發行的版本) 建置軟體包,即使它依賴其他新的軟體包,只要其他軟體包以下方描述方式為「rawhide」建置即可。如果你需要對尚未有穩定的發行更新的軟體包做建置,你可以提交一張請票,請票上加上 rel-eng : https://fedorahosted.org/rel-eng/newticket ,並申請該軟體包加為 buildroot override (建置根基的凌駕之意)。至於 EPEL 中的軟體包,你必須使用 epel 作為 componet 才能讓請求發送給對的負責人。

你可以透過以下指令更深入瞭解 koji:

koji --help            # 一般的幫助說明
koji --help-commands   # 列出 koji 指令
koji COMMAND --help    # 對於某 COMMAND 指令的幫助說明

Using the Koji build system 有更多 Koji 使用上的相關資訊。

製作軟體包

  • 如果你還不知道怎麼製作 RPM 軟體包,請見 How to create an RPM package
  • 請確認你的軟體包有符合 打包規約 軟體包命名規約
  • 請注意 軟體包校閱規約 (這些規則會在軟體包校閱時使用)。
  • 請確認你的軟體包確實可以成功建置。這個要求非常基本,但似乎很多人忘記。這令人訝異地重要,因為很多人提交的成品竟然都無法成功建置。

上傳你的軟體包

上傳你的 SRPM 和 SPEC 檔案到網際網路上的某個地方,好讓他人可以擷取。存放位置可以是任何 URL 能存取的地方,但更重要的是你的檔案應該要可以直接存取,不要躲在某些服務的後方,讓大家還得等候倒數才能下載,又或者將他們重新導向至廣告頁面,那就太糟糕了。 如果你至少有參與一組專案群組,那麼你可以使用 http://fedorapeople.org 來儲放檔案。如果你的帳號除了設好還有簽署 CLA 之外沒做過其他更動,那麼你可以申請 fedorapeople 空間的存取權,請造訪 支助者 trac 實體,並針對「Initial package hosting request」元件提交一份請票。

申請軟體包校閱

填打這份表格: https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=fedora-review

  • 在提交你的請求之前,請先確認這個軟體包是否沒有前人提交過申請。在 軟體包校閱狀態頁 上有個方便的搜尋方塊可以使用。
  • 請確認您在 'Review Summary' (校閱摘要) 欄位中有填入 軟體包名稱 (不含版本與發行編號),以及說明該軟體包的非常 簡扼摘要
  • 在 'Review Description' 欄位中填入您軟體包的 說明描述 (通常這可與你在 %description 區段所輸入的相同)。包括您 SRPMSPEC 檔案的 URL 連結。
  • 在您的請票中解釋說這是你打包的第一個軟體包,而且你還需要一位支助者 (This is my first package and I need a sponsor.)。接著請納入對那位未來可能成為你支助者的人來說有所幫助的任何相關資訊。如果你在其他校閱作業中有所作為,也請不吝加上相關連結。如果你正是軟體的上游維護者,請務必明說出來。
  • 如果想加分,請加上 koji 建置成功作業的連結,這樣大家都會知道你做完所有的功課了。
Warning.png
請確認你在 'Review Description' 欄位中有提及這是你打包的第一個軟體包,而且你正在尋找支助者的幫助 (例如:This is my first package, and I am seeking a sponsor.)。在 Fedora Package Collection 中,所有新的貢獻者都必須有支助者在旁協助。有些可能現身的支助者會查看 bugzilla 中的 FE-NEEDSPONSOR 臭蟲以查找可校閱的軟體包。你可以將你的軟體包加入這份清單中,你只要編輯你的校閱請求臭蟲回報,在 'Bug xyz blocks' 裡面加上 FE-NEEDSPONSOR (xyz 是你那份校閱請求的臭蟲回報編號) 即可。

校閱程序詳細記載於 軟體包校閱程序 頁面上。

知會上游

Fedora 是偏愛 和上游緊密合作 的專案。請通知你打包的軟體的開發者你正在幫它打包。你可以透過寄送電子郵件來介紹你自己,並且指出校閱請求的連結。這樣一來就為將來的可能溝通鋪好路了。他們通常會特地宣傳他們的軟體現在成為 Fedora 中的一部分了;而且如果現在的發行版本有什麼重大的臭蟲需要修正、有什麼未來版本的規劃... 等重要消息時,他們可能會想要通知你。

自我介紹

當一位軟體包新手維護者加入 Fedora 專案時,我們會要求他/她在 Fedora 的 Devel 郵遞清單上自我介紹。若要註冊這個郵遞清單,請先造訪 devel 清單的註冊頁。此動作的主要用意是讓你可以熟悉其他軟體包維護者,並開始建立對你的信任,可讓你的校閱請求未來處理得更快一些。

此清單的根本用途是要破除匿名性、促進專案社群真實互動,不過你並沒有義務揭開你的個人秘密。主要目標是要讓你與專案的其他成員之間建立出某種程度的信任。

主旨:Self Introduction

正文:可以加入任何你覺得有用處的相關資訊,像是過去的經驗、你提交的校閱請求連結、關於你自己的簡短描述。如果你希望的話,也可以張貼你的 GPG 金鑰資訊。

持續關注別人給你的反饋

關注你第一個軟體包的 Bugzilla 回報。你應該會透過電子郵件收到通知。修正任何檢閱者指出的發行阻擋議題 (blocker,即未經修正則不應發行的阻擋關卡)。

取得他人支助

一旦軟體包由校閱者 APPROVED (批准) 後,你必須另外取得成員支助才能檢入 (check in) 與建置 (build) 你的軟體包。「支助」(Sponsorship) 不是自動的,你可能需要以不同方式進一步參與來展現出你已經很明瞭打包規約了。被支助的關鍵是要說服現有的支助等級成員 (sponsor-level member) 你不僅了解更會遵守本專案的規約與流程。

請見 如何取得支助以進入打包者群組 查看更多支助程序的資訊。

Warning.png
新打包者的第一個軟體包其校閱與批准 必須 由註冊的支助者處理。後續的校閱則可由任何一位軟體包維護者處理。非正式的校閱則可由任何有興趣的人處理。

你的支助者可以將你加入打包者群組中。你應該會收到你被支助的電子郵件通知。

將軟體包加入源碼管理 (SCM, Source Code Management) 系統中並設定擁有者

若你正打算成為新軟體包的維護者,而不是成為共同維護者,請跟隨 Package SCM 管理員請求 的指示,來取得您新軟體包與分支最近發行版本的模組。

這用來在擁有者資料庫中設置適當的記錄,用來存取建置軟體包、bugzilla 情報狀態、其他功能等。這一步會在倉儲中建立你新軟體包的模組,以及每個請求的散布版本分支。

檢出模組

你現在 可以 檢出 (check out) 你的模組,但在那之前,請先考慮執行 "mkdir ~/fedora-scm ; cd ~/fedora-scm" - 這樣一來,你的所有檔案都會放在那裡。此外,也執行 ssh-add,那樣你就不需要每次都要打密碼。

Idea.png
在任何 SCM 操作之前先執行 ssh-add 會是個好習慣。它可以節省你每次操作都要輸入密碼的時間。每次的作業階段中,你只需要執行 ssh-add 一次,它會記住密碼直到你登出並重新開機。如果 "ssh-add" 回報說 "Could not open a connection to your authentication agent.";那麼開啟新的 shell,並在那裡使用 "exec ssh-agent bash"。

現在你已準備好從 SCM 檢出你的模組:

 fedpkg clone <packagename>

這裡的 <packagename> 應該替換成你軟體包的名稱。

Stop (medium size).png
如果這一步失敗了,請確認你的私人 ssh 金鑰 (~/.ssh/id_rsa) 模式有設為 0400。在你請求新的 git 模組後,到你被批准取得寫入權限的這段時間,你可能必須等候長達一個小時。請確認你的公開金鑰與 Fedora 帳號系統 (FAS) 中的相同。在上傳至 FAS 後,金鑰產生可能會花上一個小時左右
Important.png
注意,fedpkg 不會為你的新 git 倉儲自動設定使用者組態。請確認你在第一次提交之前,已在你的新倉儲中設好全域設定或區域設定 (請見 Configure your global git settings)。
Important.png
注意:如果你不是 fedora 打包者群組中的成員,你會收到 "permission denied" 錯誤。請使用 -a 旗標來匿名 clone。

測試你的軟體包

請參考 Using_Mock_to_test_package_builds 以及 Using_the_Koji_build_system#Scratch_Builds 瞭解更多測試軟體包的相關資訊。Mock 使用的是你的本地端系統,而 Koji 命令列工具則使用 Fedora 建置系統伺服器。

匯入、提交、建置你的軟體包

現在你已用 fedpkg 檢出你的 (空白) 軟體包模組, cd 進入模組的主要分支 (master branch):

cd <packagename>

執行 fedpkg 將 SRPM 的內容匯入 SCM 中:

fedpkg import PATH_TO_SRPM
# Review Changes, press 'q' to stop; Revert with: git reset --hard HEAD
git commit -m "Initial import (#XXXXXX)."
git push
fedpkg build

很明顯,請把這裡的 PATH_TO_SRPM 換成你被批准的 SRPM 的完整路徑 (不是 URL),而 XXXXXX 則換成軟體包校閱的臭蟲回報編號。

這只會匯入、提交、建置 master (rawhide) 主要分支。

如果提交失敗並傳回這類訊息:

W access for why DENIED to YOUR_ACCOUNT
fatal: The remote end hung up unexpectedly
Could not push: Command '['git', 'push']' returned non-zero exit status 128

那麼你尚未擁有修改該軟體包分支的必須權利; 請查看 https://admin.fedoraproject.org/pkgdb/acls/name/PACKAGE_NAME 以請求相關權利。


更新你的分支 (如果想要的話)

分支為 f# (以往使用 F-# ,更早則是用 FC-#)、master... 等。而 f39 則代表 Fedora 39 的分支版本。

若想要先切換為某分支:

fedpkg switch-branch BRANCH (例如:f39)

合併 master 主幹的初始提交,在分支中建立相同的提交:

git merge master

將更動推送回去伺服器中:

git push

建置軟體包:

fedpkg build

如果有另外一個你正在處理的分支,則請回到「若想要先切換為某分支」並重復動作來匯入、提交至各自分支中。

Warning.png
請確認你在推送更新到任何其它分支之前,有先為 rawhide (master) 分支作建置!否則的話,這些更新會因繼承關係而進入 rawhide,這絕對不是你想要的結果。
Warning.png
每隔 1 小時會與 buildsys 同步一次。所以,有時候你可能必須等候一個小時才能取得建置伺服器的存取權,才可下 "fedpkg build" 指令。

如果事情發展得順利,它應該會將你的分支排入佇列中等候建置,軟體包在乾淨環境下建置,接著就完成啦!

如果建置失敗,建置系統會傳給你電子郵件回報失敗,並將記錄顯示給你看。就請提交任何所需的更動至 git,遞加 SPEC 的發行編號,接著提請新的建置。

用 Bodhi 提交軟體包更新

Fedora 更新系統稱為 Bodhi (即中文之菩提),用於推送更新、分類軟體包等。 請不要透過 bodhi 提交「master」版的 (即 rawhide 版) 軟體包。

你可以透過下列指令使用 Bodhi 來推送任何 branch 分支中的更新:

 fedpkg update

你也可以直接使用 "bodhi" 指令,指令記載於 Bodhi Instruction 中。

你也可以使用 Bodhi 的網頁介面 來請求你想將新的補強性更新帶到哪個發行的 Fedora 版本中。

第一個欄位會詢問你軟體包 "Package" 的名稱。這個欄位會自動從 Koji 建置系統中自動補完軟體包名稱,例如 <package-name>-<version>-<release>.fc39。如果補完功能沒有作用,請自行輸入軟體包建置名稱。

如果是新的軟體包,請選擇 "newpackage" (新軟體包) 作為更新的 "type" (類型)。

如果你想要先讓軟體包作測試用,請把 "Request" (請求) 設為 "testing" (測試),詳情請見 Fedora 品質保證。如果你想要讓軟體包直接推入穩定版,則請設為 "stable" (穩定)。

對於新的軟體包,請將軟體包 "Bugs" 欄位中的 Review Request 臭蟲編號留空。當它推入所請求的更新狀態時,Bodhi 會自動將它以 NEXTRELEASE 狀態關閉。

對於新的軟體包,請在 "Notes" 區段中加入軟體包的描述說明副本,這樣一來終端使用者才會知道這個軟體包究竟是什麼。

這裡有份 Bodhi 使用指引

當你透過 bodhi 提交一份升級之後,你的軟體包就會擺入佇列中。管理員會定期檢查佇列,並將所有的軟體包推入適當的軟體庫中。

讓軟體包列在「comps」檔案中

如果軟體包適當,讓它列在「comps」檔案中,這樣一來就可以在安裝時選擇該軟體包,而且也可納入 yum 的軟體包群組操作中。請見 How to use and edit comps.xml for package groups 以瞭解更多資訊。

持續查看更新狀況

Fedora 有可用的基礎設施可監控你打包的軟體是否有新的上游發行版本。請參考 上游發行監控 瞭解更多細節資訊。若要學習如何處理更新,請閱讀 軟體包更新指南

取得幫助

我們了解這套流程有時可能讓你如入五里霧中,但我們總試著讓情況變得更好。如果你遇到任何問題,或是有任何疑問,請不要遲疑前往 devel 郵遞清單發問,或是上 freenode.net 的 #fedora-devel[?] 頻道上討論。

Fedora Mentors Project 中有許多願意幫助新手打包的導師。請查看 Mentors 頁面了解更多相關資訊。

也請見 Using_git_FAQ_for_package_maintainers

若你已是維護者且還想要製作新的軟體包推入 Fedora 軟體包集合

若你已有維護 Fedora 的軟體包,並且想要維護新的一個,請遵循 既有貢獻者的新軟體包流程