From Fedora Project Wiki
No edit summary
(sync en)
(75 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{autolang}}
{{autolang}}


= 贡献中的角色 =
= 贡献角色 =
{{admon/tip|Contributing roles|下面是对贡献角色的建议,只有您的想像力为您设限。}}
{{admon/tip|贡献角色|以下内容仅仅是建议,最终您以何种身份参与软件包维护,完全取决于您自身的能力。}}


{|class="nobordersplz"
{|class="nobordersplz"
Line 8: Line 8:
|
|
[[Image:Join_OSDeveloper.png]]<BR>
[[Image:Join_OSDeveloper.png]]<BR>
[[Join#OS_Developer|OS Developer]]
[[Join#OS_Developer|OS 开发者]]
|}
|}


= How to join the Fedora Package Collection Maintainers? =
= 如何成为 Fedora 软件包仓库维护人员? =
 
So, you have decided to become a package maintainer in the Fedora Project?  This guide will lead you through your first package submission.


嗯,您已经决定好了要加入了? 本指南会引领您一步一步完成您的第一个软件包维护任务。


[[file:fedora-submit-package.png|750x214px]]
[[file:fedora-submit-package.png|750x214px]]


== Becoming a Fedora Package Collection Maintainer ==
== 成为 Fedora 软件包仓库维护人员 ==


=== Read the Guidelines ===
=== 请先完成以下要求 ===


If you don't know how to create an RPM package, refer to the tutorial at [[A Short RPM Tutorial]] or the more advanced and much more detailed  [[how to create an RPM package]].
如果您还不知道如何构建一个 RPM 包,请先查阅以下帮助: [[How_to_create_a_GNU_Hello_RPM_package/zh-cn|如何制作一个 GNU Hello World 软件包]] 或者更加详细的 [[how to create an RPM package/zh-cn|如何制作 RPM 包]]


Read the [[Packaging:Guidelines| Packaging Guidelines]] and [[Packaging:NamingGuidelines| Package Naming Guidelines]] .
阅读 [[Packaging:Guidelines|打包规定]] [[Packaging:NamingGuidelines|软件包命名规定]]


You need to be thoroughly familiar with these.  They govern all package submissions.  If you have questions, ask on the [https://admin.fedoraproject.org/mailman/listinfo/packaging Fedora Packaging List] .
您需要十分熟悉以上内容,因为它们包含了许多十分有用的信息。当然,如果您有其它疑问,欢迎到 {{fplist|Packaging}} 邮件列表提问。


=== Create a Bugzilla Account ===
=== 创建您的 Bugzilla 账户 ===


Make sure you have an account in [https://bugzilla.redhat.com/ Red Hat Bugzilla] .
请确保您有一个 [https://bugzilla.redhat.com/ Bugzilla] 账户。


The email address that you use for your bugzilla account should be the same email address as you use in the [[#Get_a_Fedora_Account| Fedora Account System]] for all things related to Fedora Packaging.
您的 Bugzilla 帐户注册时填写的邮箱应该与您在 [[#Get_a_Fedora_Account| Fedora 账户系统]] 中的用户所对应的邮箱地址保持一致。


{{admon/important|Do not use your @fedoraproject.org address|You should not use your @fedoraproject.org email address in Bugzilla, because you will not get your bugzilla privileges once you are sponsored. If you want to use your @fedoraproject.org address, you might try to request at the [https://fedorahosted.org/fedora-infrastructure/ Fedora Infrastructure Ticket System] for an administrator to manually override the bugzilla address connected with your Fedora Account.}}
{{admon/important|请不要使用您专用的 @fedoraproject.org 地址|您不应该在 Bugzilla 中使用您的专用 @fedoraproject.org 邮箱地址。因为这样会导致您无法激活您的 Bugzilla 账户。如果您执意使用,请在 [https://fedorahosted.org/fedora-infrastructure/ Fedora 基础设施客服系统] 请求管理员手动连接 Bugzilla 到您的 Fedora 帐户。}}


=== Join the important Mailing Lists ===
{{Anchor|GetAFedoraAccount}}


You must join the fedora [https://admin.fedoraproject.org/mailman/listinfo/devel-announce devel-announce@lists.fedoraproject.org]  mailing list. It is a low traffic announcements only list, where important development information is posted.
=== 创建一个 Fedora 帐户 ===


You can join the fedora [https://admin.fedoraproject.org/mailman/listinfo/devel devel@lists.fedoraproject.org] mailing list, where discussions about the development of Fedora are held. This is a high traffic mailing list.
首先在 [[Infrastructure/AccountSystem |Fedora 账户系统]] 新建您的个人账户。(注意,此账户与 Bugzilla 账户不同)


You can also consider joining the [https://admin.fedoraproject.org/mailman/listinfo/package-announce package-announce@lists.fedoraproject.org]  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.
# 访问: https://admin.fedoraproject.org/accounts/
# 点击 'New account' 然后填写必填信息。注意,email 需要与 bugzilla 相同。这允许系统在两个帐户之间链接权限。
# 创建帐号后,请签署 CLA (点击顶部的 "My Account" 链接,您可以看到 CLA: CLA Done)
# 接着,您还需要上传 RSA SSH 公钥。您需要使用匹配的私钥通过 SSH 访问 Fedora 的机器。更多信息请参考 [[Cryptography | 这里]]。


Another mailing list you might consider (at least to view the archives) is
{{Anchor|GetSponsored}}
[https://admin.fedoraproject.org/mailman/listinfo/packaging packaging@lists.fedoraproject.org].
This is the mailing list of the [[Packaging/Committee | Fedora Packaging Committee]],
who determine the official packaging guidelines for Fedora projects.


=== Ensure your package is suitable ===
=== 订阅几个重要的邮件列表 ===


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.
您必须订阅 {{fplist|devel-announce}} 邮件列表。尽管这只是一个专为发布声明而设的低流量邮件列表,但是许多重要的开发信息都会在这里发布。


* Search the [https://admin.fedoraproject.org/pkgdb/ Fedora Package Database] for packages already in the repository.
您也可以订阅 {{fplist|devel}} 邮件列表,这是个有关 Fedora 开发的讨论邮件列表,不过请注意流量比较大。
* Search in the [http://fedoraproject.org/PackageReviewStatus/ Review Tracker] for packages under review.
* Also check the [[PackageMaintainers/RetiredPackages | retired package]] list.
* Be aware of [[forbidden items]].


=== Read Other Submissions ===
您也可以考虑订阅 {{fplist|package-announce}} 邮件列表。当软件仓库的软件有变动的时候,邮件列表会有提示。本列表流量十分高,因为每次软件包的改动都会触发系统发送邮件。


Read some other package submissions to learn about packaging and gain familiarity with the process and requirements.
当然,查看以前的存档,请订阅 {{fplist|packaging}} 邮件列表,这是 [[Packaging/Committee | Fedora 打包委员会]] 的专用邮件列表。委员们决定有关 Fedora 的软件规定。


One way of doing this is to join the [https://admin.fedoraproject.org/mailman/listinfo/package-review  package-review@lists.fedoraproject.org mailing list] ;
=== 确保您的软件包适合 Fedora 项目 ===
all comments on Fedora package reviews are sent to this (read-only from your point of view) list.


=== Make a Package ===
{{admon/note||注意这里有许多种加入打包者用户组的方式,而不只是通过提交一个新的软件包。请查阅 [[How_to_get_sponsored_into_the_packager_group| 如何得到赞助]] 页面了解更多。}}


* If you don't know how to create an RPM package, see the [[How to create an RPM package]].
您提交的软件包可以是任意种类的开源自由软件,当然最重要的是在我们的源里面尚未被收录。在创建您的软件包之前,请确保该软件包不在软件仓库中且尚未处于被审核状态(意思是这个软件的软件包之前有人已经制作好了,正在提请官方审核)。
* Make sure that your package meets the [[Packaging:Guidelines|  Packaging Guidelines]]  and [[Packaging:NamingGuidelines|  PackageNamingGuidelines]] .
* Be aware of the [[Packaging:ReviewGuidelines| Package Review Guidelines]]  (they will be used during the package review).


=== Upload Your Package ===
因此请一定完成以下 4 步,然后再考虑提交:


Upload your SRPM and SPEC files onto the Internet somewhere. This can be anywhere accessible by a URL.
* 搜索 [https://admin.fedoraproject.org/pkgdb/ Fedora 软件包数据库],以便了解您要提交的软件包是否已经存在。
If you have already got a Fedora Account then you can use your storage at [http://fedorapeople.org http://fedorapeople.org] for this.
* 搜索 [http://fedoraproject.org/PackageReviewStatus/ Review Tracker](审核跟踪器),以便了解哪些软件包正处于被审核状态。
* 检查 [[Deprecated_packages | 已废弃的软件包]] 列表。
* 留意 [[forbidden items|禁止提交的软件包]]


{{Anchor|CreateYourReviewRequest}}
=== 理解您的责任 ===


=== Create Your Review Request ===
Fedora 项目收录的软件包需要被经常维护。尤其是软件有安全更新时,更需要您不断地维护。作为一名 Fedora 项目的软件包维护人员,您需要明确自己的 [[Package_maintainer_responsibilities |职责]] 。我们鼓励您成为一个或多个软件包的 [[Policy_for_encouraging_comaintainers_of_packages |副维护人员]] ,当您需要帮助时,请在 Fedora 社区的有关开发的邮件列表中寻找答案。


Fill out this form: https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=fedora-review.
=== 参阅其他意见 ===


* Before submitting your request, be sure there’s no a previous request for the same package.
看看其他人提交的软件包,以便学习打包技术并熟悉相关流程。
* 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.
* Upload the spec file and SRPM to a public website. If you need hosting space, please make a note of it in your ticket submission and someone will take care of you. If you are a Fedora package maintainer already, you can make use of http://fedorapeople.org
* 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. Also, explain that this is your first package and you need a sponsor.


{{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).}}
小提示,您可以订阅 {{fplist|package-review}} 邮件列表,所有有关软件包审核的修改都会发送至该列表。


The review process is described in detail on the [[Package Review Process| Package Review Process]]  page.
=== 配置 Git ===


{{Anchor|WatchForFeedback}}
您必须先配置好您系统上的 Git,主要是您的个人信息:


=== Inform Upstream ===
<pre>
git config --global user.name "您的姓名"
git config --global user.email "您的电子邮件地址"
</pre>
   
请您尽量使用真实信息。


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 a 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.
=== 安装开发者客户端工具 ===


=== Watch for Feedback ===
欲为 Fedora 和 [[EPEL]] 构建软件包,您需要使用 [[Using_the_Koji_build_system|Koji]]。


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.
{{package|fedora-packager}} 软件包提供相关工具帮助您为 Fedora 打包;它包含所有有关打包的必要工具。以 root 权限安装:
dnf install fedora-packager


{{Anchor|GetAFedoraAccount}}
安装完成后,请以打包用户的身份(绝对不要使用 root) [[Using_the_Koji_build_system#Fedora_Account_System_.28FAS2.29_Setup|来设置证书及 Koji 客户端]]:
=== Get a Fedora Account ===
fedora-packager-setup


Create an account in the [[Infrastructure/AccountSystem |Fedora Account System]] (this is ''not'' just a bugzilla account)
{{admon/tip|Kerberos|为了使用 Koji 需要您有一个 Kerberos ticket。获取票据,请使用 kinit yourfasid@FEDORAPROJECT.ORG。注意,域区分大小写。}}


# Visit the account system home: https://admin.fedoraproject.org/accounts/
现在,你可以使用 "koji" 构建系统来尝试编译你的 RPM 包了,它甚至能够为你没有的平台或 Fedora 版本构建软件包。注意,在你的包被批准之前,你绝对应该尝试使用 Koji 进行构建测试。使用以下命令开始一个完整的(scratch)构建测试:
# Click on 'New account' and fill in the blanks.
  koji build --scratch TARGET SRPM
# 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)<br>'''Note:''' Red Hat employees should apply for <code>cla_redhat</code> instead. From the Account System, Apply for a New Group, put <code>cla_redhat</code> in the group field, and click Apply.  Then ask TomCallaway to approve you.
# Also you need to upload a public RSA SSH key. You need to use the matching private key to access Fedora machines via SSH


{{Anchor|GetSponsored}}
解释:
* TARGET 表示发行版关键字,例如 f22 (Fedora 22)。你可以运行 "koji list-targets" 来查看所有构建目标。如果要为下一个稳定版(rawhide)进行构建,切记''不要''使用 "dist-rawhide",要使用 "fX"(X表示最新稳定或 release 分支)。
* 注意,你需要提供源码 RPM 包(以.src.rpm结尾)的''路径'',而'''不是'''URL。(如果只有 spec 文件,需使用 <code>rpmbuild --nodeps -bs SPECFILE</code> 创建新的 SRPM)。


=== Install the Client Tools (Koji) ===
你的 koji 构建项目,只依赖 TARGET 发行版软件源中的软件包。因此,如果你的软件包依赖 [[Bodhi | Bodhi]] 中还未发布的新包,则不能使用 koji 进行构建。你''可以''使用 koji 为 rawhide(下一个预发行版)进行构建,即使它依赖其他新包,只要这些包已为 "rawhide" 构建即可。如果你需要对一个没有稳定发布的软件进行构建,你需要向 https://fedorahosted.org/rel-eng/newticket 发送通知,并要求添加该包为 buildroot。对于 EPEL 打包者,你必须使用 ''EPEL'' 组件向正确的人发送请求。
To build Packages for the Fedora Collection or [[EPEL]], you need [[Using_the_Koji_build_system|Koji]].
You'll also need to generate a client side certificate at the [https://admin.fedoraproject.org/accounts/user/gencert Fedora Account System] and save the file in <code>~/.fedora.cert</code>, where <code>fedpkg</code> will look for it by default.


{{admon/tip|Certificate Expiration|Your certificate will expire after 6 months. Then you have to request another one. Also every time you request a new certificate, the old one is invalidated and cannot be used anymore.}}
通过以下命令查看 koji 帮助:
koji --help            # 通用选项的帮助
koji --help-commands  # 列出 koji 子命令
koji COMMAND --help    # 查看子命令的帮助


The <code>fedora-packager</code> package provides tools to help you setup and work with fedora, therefore install it:
更多关于使用 Koji 的信息,请参考 [[Using the Koji build system|使用 Koji 构建系统]]。
<code>
yum install fedora-packager
</code>


After installation run it as your user to setup your koji configuration:
=== 制作一个软件包 ===
<code>
fedora-packager-setup
</code>
{{admon/tip|Certificate update|You will have to rerun <code>fedora-packager-setup</code> every time you update your Fedora certificate.}}


You can now use "koji" to try to build your RPM packages on platforms (e.g., PPC) or distributions you don't have.  Note that you can test out builds ("scratch" builds) even when your package hasn't been approved and you don't have a sponsor.  A simple way to do a scratch build using koji is to do this at the command line:
* 如果您不知道如何构建 RPM 包,请移步这里:[[How to create an RPM package/zh-cn|如何制作 RPM 包]] 。
koji build --arch-override=PLATFORM --scratch TARGET path_to_source_RPM
* 确保您的软件包符合 [[Packaging:Guidelines| 打包规定]] 和 [[Packaging:NamingGuidelines| 软件包命名规定]] 。
Where:
* 留意 [[Packaging:ReviewGuidelines| 软件包审核规定]] (日后审核时需要)。
* TARGET is a distribution keyword such as dist-f9 (for Fedora 9).  You can run "koji list-targets" to see all targets.  To build for the next release (rawhide), ''don't'' use "dist-rawhide" - use "dist-fX" where X is one more than the latest stable release.
* 确保您的软件包可被构建。这的确很重要,因为相当数量的审核请求有这个问题。
* PLATFORM is a platform keyword such as i386 (32-bit), x86_64, ppc, or ppc64. You can omit --arch-override=PLATFORM, in which case koji will do test builds on all the architectures the spec file says the package supports.
* 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).


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
=== 上传您制作的软件包 ===
update, you can file a ticket with rel-eng at: https://fedorahosted.org/rel-eng/newticket and request that that package be
上传您制作的源代码 RPM 包和与之相匹配的 SPEC 配置文件到互联网的任意位置上。请确保其可以通过地址访问,而不要使用网盘或者是赚钱网址来完成。
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:
如果您想要创建一个私有源,请考虑使用 [http://copr.fedoraproject.org Copr]。它是一个轻量级构建系统,可以由您上传的 SRPM 创建源。您可以使用此 Copr 空间为审阅者提供您的 src.rpm 和 spec。
koji --help            # General help
koji --help-commands  # list of koji commands
koji COMMAND --help    # help on command COMMAND


[[Using_the_Koji_build_system]] has more information about using Koji.
如果您已经加入社区项目组,您可以使用位于 [http://fedorapeople.org http://fedorapeople.org] 的空间来存放。如果您刚刚注册账号,请签署 CLA,并访问 [http://fedorahosted.org/packager-sponsors the sponsors trac instance] 提交一个 "Initial package hosting request" 支持单,以获得 fedorapeople 的访问权限。


=== Get Sponsored ===
{{Anchor|CreateYourReviewRequest}}
=== 申请审核 ===


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.
您需要首先点击该链接创建一个支持单:https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=fedora-review.


See [[how to get sponsored into the packager group]] for more information on the process of becoming sponsored.
* 在您提交审核请求前,确保没有相同的包被请求。[http://fedoraproject.org/PackageReviewStatus/ 软件包审核进度跟踪器] 有很方便的搜索功能。
* 确保 '''软件包''' (除去版本号和 release) 在 '<code>Review Summary</code>' 栏目中已包含一个关于该包的'''简要介绍'''。
* 在 '<code>Review Description</code>' 栏中添加该包的 '''description'''(通常与 %description 一致)。包括 '''SRPM''' 和 '''SPEC''' 的 '''URLs'''。
* 在审核请求中注明这是您的第一个软件包,同时您需要担保人。包含越多的信息越好。如果您参与过其它软件包的审核工作,请附上相应链接。如果您是上游开发者,也请注明。
* 链接一个成功的 koji 构建是为您的审核通过加分的好方法。


{{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 |确保在 '<code>Review Description</code>' 中注明这是您的第一个软件包,您需要一位担保人(sponsor)。Fedora 软件仓库中,所有新的贡献者都必须被担保人担保。很多担保人可能会通过 [https://bugzilla.redhat.com/bugzilla/showdependencytree.cgi?id&#61;FE-NEEDSPONSOR 这个链接] 来查看哪些审核需要担保。你可以通过编辑你的审核请求 bug,并在 <code>FE-NEEDSPONSOR</code> 填写 '<code>Bug </code>''xyz''<code> blocks</code>' 栏(''xyz''是你的审核请求 bug 编号)。}}


Your sponsor can add you to the packager group. You should receive email confirmation of your sponsorship.
具体我们是如何审核您制作的软件包的,请访问 [[Package Review Process/zh-cn|软件包审核流程]] 介绍页面。


=== Add Package to Source Code Management (SCM) system and Set Owner ===
{{Anchor|WatchForFeedback}}
=== 通知上游开发者 ===
Fedora 项目 [[Staying_close_to_upstream_projects |与上游项目保持紧密联系]]。通知上游项目开发者也是您打包工作的一部分。您可以通过向开发者发送一封邮件介绍一下您自己和当前软件包的审核进度来完成。您这么做也为日后反馈提供一个沟通的渠道。这些上游开发者通常很愿意看到自己的软件成为 Fedora 的一部分,他们或许也会通知您已知的 Bug 和未来的开发计划等等。


Follow [[Package SCM admin requests]] to get a module for your new package and branches for recent releases.
=== 介绍自己 ===
当一位新人加入 Feodra 软件包维护项目时,我们需要您在 devel 邮件列表介绍一下您自己。请先访问 {{fplist|devel}} ,然后加入订阅。我们需要您这么做的主要目的是建立大家之间的信任,当然这也有助于大家了解您,以及增加您的软件包被审核成功的几率。


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.
我们这么做还为了打破匿名氛围,并且培养一个项目内的真实世界。您不必透露自己的个人隐私。我们的目标只是建立成员间的友谊。项目成员沟通时,至少要使用真实姓名。


=== Check out the module ===
自我介绍信格式:


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.
邮件主题: Self Introduction: 您的姓名


{{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".}}
正文: 您想些什么都可以,建议附上您的 GPG 密钥代码。


Now you are ready to checkout your module from the SCM:
=== 留意用户反馈 ===
<pre>
fedpkg clone -B <packagename>
</pre>


Where <code><packagename></code> should be replaced with the name of your package.
初次加入请注意 Bugzilla 的报告。一旦有用户反馈,您会收到相关邮件。尽可能修复用户提出的 Bug 。


You should now have a directory named after your package with a subdirectory for each branch (the -B option creates these subdirectories).
{{Anchor|GetAFedoraAccount}}


{{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 CVS 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/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]).}}
当审核者批准了您的审核时(APPROVED),您还必须被担保人担保,以检查/构建你的软件包。担保这项工作的目的是为了确保您对 RPM 的理解认识已经十分透彻。


<!-- this doesn't work with fedpkg and git, can't supply multiple module names
查看 [[how to get sponsored into the packager group|如何获取被担保资格]] 以了解更多有关被担保的信息。


You can use fedora-cvs with many modules at the same time.  To checkout from cvs run fedora-cvs {module names separated by spaces}, for example:
{{Admon/warning | 新打包者的第一个被批准的软件包必须由担保人亲自审批,之后的审核可以由任何包维护者参与。非正式的审核,任何人都可以参与。}}
<pre>
fedora-cvs konversation mysql-gui-tools snort
</pre>
-->


=== Import, Commit, and Build Your Package ===
您的担保人可以添加您至 packager 组中。通常您会收到确认邮件。


Now that you've checked out your (empty) package module with fedpkg,
=== 添加软件包至源代码管理系统(SCM)并设置所有者 ===
cd into the module's master branch:
cd MODULE_NAME/master


Run fedpkg to import the contents of the SRPM into the SCM:
如果您成为一个新的软件包的主要维护人,而不是是副维护人,请登录 pkgdb [ https://admin.fedoraproject.org/pkgdb/ ] 点击 'request new package' 并填写所需信息(对于 "Ticket number or URL" 字段,粘贴您的 Bugzilla 请求的 URL,然后按 "Sync" 按钮自动填充以下两个字段)。该请求将由管理员审核并处理,通常在 24 小时内完成。


fedpkg import PATH_TO_SRPM
{{Admon/important | 如果您在提交表单时遇到类似 'User "<username>" is not in the packager group' 的错误,这意味着您的帐户尚未在 pkgdb 中更新。请等待一个小时左右的时间,使服务完成更新。}}
# Review Changes, press 'q' to stop; Revert with: git reset --hard HEAD
fedpkg commit -p -m "Initial import (#XXXXXX)."
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.
这将用于在所有者数据库中设置正确的记录,用于访问构建包,bugzilla 和其他功能。此步骤将在版本库中为您的软件包创建一个新模块,其中包含每个发布的分支。


This imports into, commits, and builds only the '''master''' (rawhide)  branch. 
=== 签出软件包模块 ===


If the commit fails with this kind of message:
您现在''可以''签出模块了。我们建议您新建一个目录专门用来处理这些打包工作,这样所有文件都在一个目录内,方便您的工作。还有,请执行 ssh-add,这样就不用每次输入密码短语来解锁密钥密码了。
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
Then you don't have the necessary rights to modify that package branch;
view https://admin.fedoraproject.org/pkgdb/acls/name/PACKAGE_NAME
to request those rights.


<!--
{{Admon/tip | 在任何 SCM 操作前,运行 <code>ssh-add</code> 可以避免您重复的输入密码。每次会话只需要执行 <code>ssh-add</code> 一次,它会记录密码直到注销或重启。如果 <code>ssh-add</code> 报告 "Could not open a connection to your authentication agent.",在新 shell 下执行 <code>exec ssh-agent bash</code>。}}
{{Admon/caution|the rest of this section is not yet updated to use the new 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 '''F-9''', e.g.:
  ./common/cvs-import.sh -b F-9 PATH_TO_SRPM


从 SCM 签出版本库:
<pre>
fedpkg clone 您维护的软件包名
</pre>


The cvs-import.sh program will respond with:
Checking out module: 'NAME'
You may see errors like this several times, these can be ignored:
buffer_get_ret: trying to get more bytes 129 than in buffer 34
buffer_get_string_ret: buffer_get failed
buffer_get_bignum2_ret: invalid bignum
key_from_blob: can't read rsa key
key_read: key_from_blob AA....  failed
But among them you should see:
Unpacking source package: NAME....src.rpm...
Along with a list of the source files in the source package,
followed by checking and uploading of the files.


)
{{Admon/caution | 如果此步骤失败,确认你的 ssh 私钥 (<code>~/.ssh/id_rsa</code>) 权限为 0400。您可能需要等待 1 小时,确保你要求的新 git 模块已被批准获得写入权限。确认你的公钥已在 [[Account_System|Fedora Account System]] 登记。公钥上传后,也需要等待一段时间来生效。}}


Then, you'll see "If you want to make any changes before committing, please press Ctrl-C.
{{Admon/important| 注意 fedpkg 不会自动为新的 git 版本库设置用户配置。确保在第一次提交前,设置全局或局部用户配置(查看[[Git_Quickref#Configure_your_global_git_settings|配置全局 git 设置]])。}}
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
{{Admon/important| 注意:如果您不是 packager 组的成员,您会收到 "permission denied" 错误提示。可使用 <code>-a</code> 参数以匿名身份进行克隆操作。}}
  :wq
and press 'Enter' again to finish the import.


-->
===  测试您制作的软件包 ===


=== Update Your Branches (if desired) ===
请参考 [[Using_Mock_to_test_package_builds]] 和 [[Using_the_Koji_build_system#Scratch_Builds]] 以了解更多信息。注意 Mock 使用您的本地环境构建,而 Koji 则使用 Fedora 在线构建系统构建。


Branches are <code>f</code># (formerly <code>F-</code># and before that <code>FC-</code>#), <code>master</code>, etc.  So ''f13'' is the branch for Fedora 13.
=== 导入、提交并构建您的软件包 ===


To update a branch directory first, cd into that branch, e.g.:
现在您已经使用 fedpkg 签出您的软件包模块(可能是空的),cd 进入模块主分支:
  <code>cd ../f13/</code>
  cd 软件包名


<!-- Found in https://bugzilla.redhat.com/show_bug.cgi?id=452559 -->
运行 fedpkg 将 SRPM 导入 SCM:
Your local directory may not have exactly the right versions of the files, so first run:
  fedpkg import SRPM路径
<pre>
  git pull
</pre>


Then import and commit each of these other branches, in the same way as with the master:
fedpkg import PATH_TO_SRPM
  # Review Changes, press 'q' to stop; Revert with: git reset --hard HEAD
  # Review Changes, press 'q' to stop; Revert with: git reset --hard HEAD
  fedpkg commit -p -m "Initial import (#XXXXXX)."
  git commit -m "Initial import (#XXXXXX)."
git push
  fedpkg build
  fedpkg build


{{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.}}
显然,将<code>SRPM路径</code>替换为已批准 SRPM 的完整路径,<code>XXXXXX</code> 是审核请求的 Bugzilla 编号。
{{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"}}
 
If everything goes well, it should queue up your branch for building, the package will cleanly build, and you're done!
这将导入所有 commit 内容并仅针对 '''master''' ([[Releases/Rawhide|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/package/软件包名 请求权限。
 
关于 Fedora 包维护系统的更多信息,请查看 [[Package maintenance guide]]。
 
=== 更新软件包分支(如果需要) ===
 
分支通常这样命名 <code>f</code># (之前为 <code>F-</code>#)。曾经使用 <code>FC-</code>#), <code>master</code> 等等。所以 ''f{{FedoraVersion}}'' 是 Fedora {{FedoraVersion}} 的分支。


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 cvs, bump the SPEC release number, and request a new build.
首先切换至一个分支:
fedpkg switch-branch BRANCH (例如:f{{FedoraVersion}})


=== Submit Package as Update in Bodhi ===
从 master 主分支合并初始 commit,在分支内创建一个相同的 commit:
git merge master


The Fedora update system called Bodhi is used for pushing updates, classifying packages etc.
推送修改至服务器:
Do not submit "master" (aka rawhide) packages via bodhi.
git push


You can push an update using Bodhi via the command line using this in each branch:
构建软件包:
<pre>
  fedpkg build
  fedpkg update
</pre>


You can also use "bodhi" command directly as described in the [[Bodhi_Guide|Bodhi Guide]].
如果有其他分支,重复执行 "切换至一个分支" 并导入/提交每个分支。


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.
{{Admon/warning | 请确保在为任何其他分支推送更新前,已为 rawhide (master) 分支进行构建!否则,这些更新将继承至 rawhide,这肯定不是你想要的。}}
{{Admon/warning | 同步到构建服务器需要一段的时间。因此,有时您可能需要 1 个小时才能执行 "fedpkg build" 访问构建服务。}}
如果所有事情都没有问题,那么您的分支就已经加入构建队列,软件包将会被干净的构建,然后就大功告成了!


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>.fc9. If completion doesn't work, just enter the package build name yourself.
如果构建失败,构建系统将会发送一封邮件给您,报告失败的缘由,并显示相关日志。您需要提交修改,更新 SPEC 文件的版本号,并重新请求新的构建。


For new packages, choose "newpackage" as the "type" of update.
=== 在 Bodhi 中提交软件包更新 ===


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.
Fedora 更新系统名为 Bodhi ,它被用于推送更新,给软件包分类等等。请不要通过 bodhi 提交 Rawhide (master 分支) 软件包。


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.
您可以通过以下命令,使用 Bodhi 为每个分支推送更新:
fedpkg update


For new packages, add a copy of the package's description in the "Notes" section, so end users will know what the package is.
您也可以直接使用 "bodhi" 命令来完成,详见 [[Bodhi_Guide|Bodhi 介绍手册]]。


Here is the [[Bodhi_Guide|Bodhi Guide]] and
您还可以使用 [https://admin.fedoraproject.org/updates/new/ Bodhi 页面] 为每个 Fedora 版本提交更新。
[[Infrastructure/UpdatesSystem/Bodhi-info-DRAFT|more information on 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 提交更新后,您的软件包就已进入队列。一段时间后,管理员会检查队列并推送至相关的源中。


=== Make the package available in "comps" files ===
查看 [[Package_update_HOWTO|更新提交指南]] 获得更多信息。


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]] for more info.
=== 使软件包在 "comps" 中可见 ===


=== Watch for updates ===
编辑 "comps" 文件,可以将软件包加入 dnf 包组。查看 [[PackageMaintainers/CompsXml|如何使用和编辑 comps.xml 包组配置文件]] 获得更多信息。


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]]
=== 等待源最后更新 ===


== Getting Help  ==
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 [https://admin.fedoraproject.org/mailman/listinfo/devel devel@lists.fedoraproject.org]  mailing list or in #fedora-devel on [http://freenode.net/ freenode] . See the [[Communicate]]  page for details.
== 获取帮助 ==


The Fedora Mentors Project has people willing to help new contributors in their packaging efforts. See the [[Mentors]]  page for more information.
我们也知道这项工作有时候真的很让人头疼,但是我们一直尝试把它做得更好。如果您陷入问题的怪圈中,请到 {{fplist|devel}} 邮件列表或者位于 freenode.net 的 IRC 频道 {{fpchat|#fedora-devel}} 提问。


See also [[using git FAQ for package maintainers]].
Fedora 担保人项目将会有许多人帮助您来参与到打包中。[[Mentors|担保人项目页面]] 有更多信息供您参考。
您也可以查阅 [[using git FAQ for package maintainers|打包者 Git 使用说明]]


== Getting a new package into Fedora Package Collection for existing maintainers  ==
== 已经是打包者了? ==


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/zh-cn|指南]]


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

Revision as of 16:01, 4 February 2017

贡献角色

Idea.png
贡献角色
以下内容仅仅是建议,最终您以何种身份参与软件包维护,完全取决于您自身的能力。

Join OSDeveloper.png
OS 开发者

如何成为 Fedora 软件包仓库维护人员?

嗯,您已经决定好了要加入了? 本指南会引领您一步一步完成您的第一个软件包维护任务。

Fedora-submit-package.png

成为 Fedora 软件包仓库维护人员

请先完成以下要求

如果您还不知道如何构建一个 RPM 包,请先查阅以下帮助: 如何制作一个 GNU Hello World 软件包 或者更加详细的 如何制作 RPM 包

阅读 打包规定软件包命名规定

您需要十分熟悉以上内容,因为它们包含了许多十分有用的信息。当然,如果您有其它疑问,欢迎到 Packaging 邮件列表提问。

创建您的 Bugzilla 账户

请确保您有一个 Bugzilla 账户。

您的 Bugzilla 帐户注册时填写的邮箱应该与您在 Fedora 账户系统 中的用户所对应的邮箱地址保持一致。

Important.png
请不要使用您专用的 @fedoraproject.org 地址
您不应该在 Bugzilla 中使用您的专用 @fedoraproject.org 邮箱地址。因为这样会导致您无法激活您的 Bugzilla 账户。如果您执意使用,请在 Fedora 基础设施客服系统 请求管理员手动连接 Bugzilla 到您的 Fedora 帐户。

创建一个 Fedora 帐户

首先在 Fedora 账户系统 新建您的个人账户。(注意,此账户与 Bugzilla 账户不同)

  1. 访问: https://admin.fedoraproject.org/accounts/
  2. 点击 'New account' 然后填写必填信息。注意,email 需要与 bugzilla 相同。这允许系统在两个帐户之间链接权限。
  3. 创建帐号后,请签署 CLA (点击顶部的 "My Account" 链接,您可以看到 CLA: CLA Done)。
  4. 接着,您还需要上传 RSA SSH 公钥。您需要使用匹配的私钥通过 SSH 访问 Fedora 的机器。更多信息请参考 这里

订阅几个重要的邮件列表

您必须订阅 devel-announce 邮件列表。尽管这只是一个专为发布声明而设的低流量邮件列表,但是许多重要的开发信息都会在这里发布。

您也可以订阅 devel 邮件列表,这是个有关 Fedora 开发的讨论邮件列表,不过请注意流量比较大。

您也可以考虑订阅 package-announce 邮件列表。当软件仓库的软件有变动的时候,邮件列表会有提示。本列表流量十分高,因为每次软件包的改动都会触发系统发送邮件。

当然,查看以前的存档,请订阅 packaging 邮件列表,这是 Fedora 打包委员会 的专用邮件列表。委员们决定有关 Fedora 的软件规定。

确保您的软件包适合 Fedora 项目

Note.png
注意这里有许多种加入打包者用户组的方式,而不只是通过提交一个新的软件包。请查阅 如何得到赞助 页面了解更多。

您提交的软件包可以是任意种类的开源自由软件,当然最重要的是在我们的源里面尚未被收录。在创建您的软件包之前,请确保该软件包不在软件仓库中且尚未处于被审核状态(意思是这个软件的软件包之前有人已经制作好了,正在提请官方审核)。

因此请一定完成以下 4 步,然后再考虑提交:

理解您的责任

Fedora 项目收录的软件包需要被经常维护。尤其是软件有安全更新时,更需要您不断地维护。作为一名 Fedora 项目的软件包维护人员,您需要明确自己的 职责 。我们鼓励您成为一个或多个软件包的 副维护人员 ,当您需要帮助时,请在 Fedora 社区的有关开发的邮件列表中寻找答案。

参阅其他意见

看看其他人提交的软件包,以便学习打包技术并熟悉相关流程。

小提示,您可以订阅 package-review 邮件列表,所有有关软件包审核的修改都会发送至该列表。

配置 Git

您必须先配置好您系统上的 Git,主要是您的个人信息:

git config --global user.name "您的姓名"
git config --global user.email "您的电子邮件地址"

请您尽量使用真实信息。

安装开发者客户端工具

欲为 Fedora 和 EPEL 构建软件包,您需要使用 Koji

Package-x-generic-16.pngfedora-packager 软件包提供相关工具帮助您为 Fedora 打包;它包含所有有关打包的必要工具。以 root 权限安装:

dnf install fedora-packager

安装完成后,请以打包用户的身份(绝对不要使用 root) 来设置证书及 Koji 客户端

fedora-packager-setup
Idea.png
Kerberos
为了使用 Koji 需要您有一个 Kerberos ticket。获取票据,请使用 kinit yourfasid@FEDORAPROJECT.ORG。注意,域区分大小写。

现在,你可以使用 "koji" 构建系统来尝试编译你的 RPM 包了,它甚至能够为你没有的平台或 Fedora 版本构建软件包。注意,在你的包被批准之前,你绝对应该尝试使用 Koji 进行构建测试。使用以下命令开始一个完整的(scratch)构建测试:

koji build --scratch TARGET SRPM

解释:

  • TARGET 表示发行版关键字,例如 f22 (Fedora 22)。你可以运行 "koji list-targets" 来查看所有构建目标。如果要为下一个稳定版(rawhide)进行构建,切记不要使用 "dist-rawhide",要使用 "fX"(X表示最新稳定或 release 分支)。
  • 注意,你需要提供源码 RPM 包(以.src.rpm结尾)的路径,而不是URL。(如果只有 spec 文件,需使用 rpmbuild --nodeps -bs SPECFILE 创建新的 SRPM)。

你的 koji 构建项目,只依赖 TARGET 发行版软件源中的软件包。因此,如果你的软件包依赖 Bodhi 中还未发布的新包,则不能使用 koji 进行构建。你可以使用 koji 为 rawhide(下一个预发行版)进行构建,即使它依赖其他新包,只要这些包已为 "rawhide" 构建即可。如果你需要对一个没有稳定发布的软件进行构建,你需要向 https://fedorahosted.org/rel-eng/newticket 发送通知,并要求添加该包为 buildroot。对于 EPEL 打包者,你必须使用 EPEL 组件向正确的人发送请求。

通过以下命令查看 koji 帮助:

koji --help            # 通用选项的帮助
koji --help-commands   # 列出 koji 子命令
koji COMMAND --help    # 查看子命令的帮助

更多关于使用 Koji 的信息,请参考 使用 Koji 构建系统

制作一个软件包

上传您制作的软件包

上传您制作的源代码 RPM 包和与之相匹配的 SPEC 配置文件到互联网的任意位置上。请确保其可以通过地址访问,而不要使用网盘或者是赚钱网址来完成。

如果您想要创建一个私有源,请考虑使用 Copr。它是一个轻量级构建系统,可以由您上传的 SRPM 创建源。您可以使用此 Copr 空间为审阅者提供您的 src.rpm 和 spec。

如果您已经加入社区项目组,您可以使用位于 http://fedorapeople.org 的空间来存放。如果您刚刚注册账号,请签署 CLA,并访问 the sponsors trac instance 提交一个 "Initial package hosting request" 支持单,以获得 fedorapeople 的访问权限。

申请审核

您需要首先点击该链接创建一个支持单:https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=fedora-review.

  • 在您提交审核请求前,确保没有相同的包被请求。软件包审核进度跟踪器 有很方便的搜索功能。
  • 确保 软件包 (除去版本号和 release) 在 'Review Summary' 栏目中已包含一个关于该包的简要介绍
  • 在 'Review Description' 栏中添加该包的 description(通常与 %description 一致)。包括 SRPMSPECURLs
  • 在审核请求中注明这是您的第一个软件包,同时您需要担保人。包含越多的信息越好。如果您参与过其它软件包的审核工作,请附上相应链接。如果您是上游开发者,也请注明。
  • 链接一个成功的 koji 构建是为您的审核通过加分的好方法。
Warning.png
确保在 'Review Description' 中注明这是您的第一个软件包,您需要一位担保人(sponsor)。Fedora 软件仓库中,所有新的贡献者都必须被担保人担保。很多担保人可能会通过 这个链接 来查看哪些审核需要担保。你可以通过编辑你的审核请求 bug,并在 FE-NEEDSPONSOR 填写 'Bug xyz blocks' 栏(xyz是你的审核请求 bug 编号)。

具体我们是如何审核您制作的软件包的,请访问 软件包审核流程 介绍页面。

通知上游开发者

Fedora 项目 与上游项目保持紧密联系。通知上游项目开发者也是您打包工作的一部分。您可以通过向开发者发送一封邮件介绍一下您自己和当前软件包的审核进度来完成。您这么做也为日后反馈提供一个沟通的渠道。这些上游开发者通常很愿意看到自己的软件成为 Fedora 的一部分,他们或许也会通知您已知的 Bug 和未来的开发计划等等。

介绍自己

当一位新人加入 Feodra 软件包维护项目时,我们需要您在 devel 邮件列表介绍一下您自己。请先访问 devel ,然后加入订阅。我们需要您这么做的主要目的是建立大家之间的信任,当然这也有助于大家了解您,以及增加您的软件包被审核成功的几率。

我们这么做还为了打破匿名氛围,并且培养一个项目内的真实世界。您不必透露自己的个人隐私。我们的目标只是建立成员间的友谊。项目成员沟通时,至少要使用真实姓名。

自我介绍信格式:

邮件主题: Self Introduction: 您的姓名

正文: 您想些什么都可以,建议附上您的 GPG 密钥代码。

留意用户反馈

初次加入请注意 Bugzilla 的报告。一旦有用户反馈,您会收到相关邮件。尽可能修复用户提出的 Bug 。

得到担保

当审核者批准了您的审核时(APPROVED),您还必须被担保人担保,以检查/构建你的软件包。担保这项工作的目的是为了确保您对 RPM 的理解认识已经十分透彻。

查看 如何获取被担保资格 以了解更多有关被担保的信息。

Warning.png
新打包者的第一个被批准的软件包必须由担保人亲自审批,之后的审核可以由任何包维护者参与。非正式的审核,任何人都可以参与。

您的担保人可以添加您至 packager 组中。通常您会收到确认邮件。

添加软件包至源代码管理系统(SCM)并设置所有者

如果您成为一个新的软件包的主要维护人,而不是是副维护人,请登录 pkgdb [ https://admin.fedoraproject.org/pkgdb/ ] 点击 'request new package' 并填写所需信息(对于 "Ticket number or URL" 字段,粘贴您的 Bugzilla 请求的 URL,然后按 "Sync" 按钮自动填充以下两个字段)。该请求将由管理员审核并处理,通常在 24 小时内完成。

Important.png
如果您在提交表单时遇到类似 'User "<username>" is not in the packager group' 的错误,这意味着您的帐户尚未在 pkgdb 中更新。请等待一个小时左右的时间,使服务完成更新。

这将用于在所有者数据库中设置正确的记录,用于访问构建包,bugzilla 和其他功能。此步骤将在版本库中为您的软件包创建一个新模块,其中包含每个发布的分支。

签出软件包模块

您现在可以签出模块了。我们建议您新建一个目录专门用来处理这些打包工作,这样所有文件都在一个目录内,方便您的工作。还有,请执行 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 您维护的软件包名


Stop (medium size).png
如果此步骤失败,确认你的 ssh 私钥 (~/.ssh/id_rsa) 权限为 0400。您可能需要等待 1 小时,确保你要求的新 git 模块已被批准获得写入权限。确认你的公钥已在 Fedora Account System 登记。公钥上传后,也需要等待一段时间来生效。
Important.png
注意 fedpkg 不会自动为新的 git 版本库设置用户配置。确保在第一次提交前,设置全局或局部用户配置(查看配置全局 git 设置)。
Important.png
注意:如果您不是 packager 组的成员,您会收到 "permission denied" 错误提示。可使用 -a 参数以匿名身份进行克隆操作。

测试您制作的软件包

请参考 Using_Mock_to_test_package_buildsUsing_the_Koji_build_system#Scratch_Builds 以了解更多信息。注意 Mock 使用您的本地环境构建,而 Koji 则使用 Fedora 在线构建系统构建。

导入、提交并构建您的软件包

现在您已经使用 fedpkg 签出您的软件包模块(可能是空的),cd 进入模块主分支:

cd 软件包名

运行 fedpkg 将 SRPM 导入 SCM:

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

显然,将SRPM路径替换为已批准 SRPM 的完整路径,XXXXXX 是审核请求的 Bugzilla 编号。

这将导入所有 commit 内容并仅针对 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/package/软件包名 请求权限。

关于 Fedora 包维护系统的更多信息,请查看 Package maintenance guide

更新软件包分支(如果需要)

分支通常这样命名 f# (之前为 F-#)。曾经使用 FC-#), master 等等。所以 f39 是 Fedora 39 的分支。

首先切换至一个分支:

fedpkg switch-branch BRANCH (例如:f39)

从 master 主分支合并初始 commit,在分支内创建一个相同的 commit:

git merge master

推送修改至服务器:

git push

构建软件包:

fedpkg build

如果有其他分支,重复执行 "切换至一个分支" 并导入/提交每个分支。

Warning.png
请确保在为任何其他分支推送更新前,已为 rawhide (master) 分支进行构建!否则,这些更新将继承至 rawhide,这肯定不是你想要的。
Warning.png
同步到构建服务器需要一段的时间。因此,有时您可能需要 1 个小时才能执行 "fedpkg build" 访问构建服务。

如果所有事情都没有问题,那么您的分支就已经加入构建队列,软件包将会被干净的构建,然后就大功告成了!

如果构建失败,构建系统将会发送一封邮件给您,报告失败的缘由,并显示相关日志。您需要提交修改,更新 SPEC 文件的版本号,并重新请求新的构建。

在 Bodhi 中提交软件包更新

Fedora 更新系统名为 Bodhi ,它被用于推送更新,给软件包分类等等。请不要通过 bodhi 提交 Rawhide (master 分支) 软件包。

您可以通过以下命令,使用 Bodhi 为每个分支推送更新:

fedpkg update

您也可以直接使用 "bodhi" 命令来完成,详见 Bodhi 介绍手册

您还可以使用 Bodhi 页面 为每个 Fedora 版本提交更新。

在您通过 bodhi 提交更新后,您的软件包就已进入队列。一段时间后,管理员会检查队列并推送至相关的源中。

查看 更新提交指南 获得更多信息。

使软件包在 "comps" 中可见

编辑 "comps" 文件,可以将软件包加入 dnf 包组。查看 如何使用和编辑 comps.xml 包组配置文件 获得更多信息。

等待源最后更新

Fedora 有相关可用的基础设施,用于监控上游项目的版本更新。请参阅 Upstream Release Monitoring 以了解更多。阅读 Package update HOWTO 了解我们如何处理软件包更新。

获取帮助

我们也知道这项工作有时候真的很让人头疼,但是我们一直尝试把它做得更好。如果您陷入问题的怪圈中,请到 devel 邮件列表或者位于 freenode.net 的 IRC 频道 #fedora-devel[?] 提问。

Fedora 担保人项目将会有许多人帮助您来参与到打包中。担保人项目页面 有更多信息供您参考。 您也可以查阅 打包者 Git 使用说明

已经是打包者了?

如果您已经参与维护 Fedora 软件包,并且想要维护其他包,请查阅该 指南