From Fedora Project Wiki

(EPEL uses Koji; rm the old link.)
(redirect to the new package maintenance guide which subsumes this and the 'how to use git' page)
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
=== How do I update an existing package? ===
#REDIRECT [[Package maintenance guide]]
 
Refer to [[Package_update_HOWTO |How to update a package]].
 
=== How do I import a SRPM package? ===
 
As an alternative, you can import a complete SRPM (.src.rpm) package to update an existing package, using a similar procedure to the initial package import.
 
The ''fedpkg'' tool (from the {{package|fedora-packager}} package) can commit entire src.rpm contents in one step. It uploads new tarballs into lookaside cache, updates a working copy of the last version found in git, and commits all changes. In case you prepare your update packages in an ordinary rpmbuild tree, you can use the script to import a finished update src.rpm in one step. Examples:
<pre>
fedpkg import ~/rpm/SRPMS/foo-1.0-2.src.rpm
fedpkg import -b f14 ~/bar-2.1-1.src.rpm
</pre>
Run the command <tt>fedpkg import --help</tt> for the options it understands. It can also update modules in branch directories other than the default ''master''.
 
Be careful, since ''fedpkg'' can also create non-existing git modules in the ''master'' branch on-the-fly. According to current policies, the creation of new modules needs approval. '''(Changed names here only -- is this accurate? --[[User:Pfrields|pfrields]] 21:33, 31 July 2010 (UTC))'''
 
<!-- Also be aware that if you ''fedpkg import'' a single src.rpm to multiple branches, you run into problems with tags, which cannot be the same for different branches. You will need to avoid tag collision yourself and e.g. add the %{dist} macro to your spec file after import and then run "make tag" manually for every branch you imported to. --><!-- I'm pretty sure this no longer applies, since we no longer manually tag using fedpkg/git. [pfrields, 2010-07-31] -->
 
==== Example for this method ====
 
{{admon/tip|Blind spots|Warning! This way may look easier, but it's not recommended because you can't check the changes that you have made against the version in git before you commit them. People have accidentally overwritten other packages with this method. Please make yourself familiar with above description please.}}
 
<pre>
fedpkg clone foo
cd foo
# You're on the master branch right now.
fedpkg srpm
# <install the resulting srpm with the usual commands and modify it>
# commit your changes:
cd foo
fedpkg import -b <branch_name> ~/rpmbuild/SRPM/<package_name>-<version>-<release>.src.rpm
fedpkg switch-branch <branch_name>
git pull
fedpkg build
</pre>
 
{{admon/tip|Bug on packages with just a "master" branch|Warning! There's currently a bug in ''fedpkg'' which prevents importing/uploading new sources if all you have is a "master" branch, with no "f-N" branches.  The symptoms are
<pre>
Traceback (most recent call last):
  File "/usr/bin/fedpkg", line 1062, in <module>
    args.command(args)
  File "/usr/bin/fedpkg", line 483, in import_srpm
    mymodule = pyfedpkg.PackageModule(args.path)
  File "/usr/lib/python2.6/site-packages/pyfedpkg/__init__.py", line 857, in
__init__
    self.distval = self._findmasterbranch()
  File "/usr/lib/python2.6/site-packages/pyfedpkg/__init__.py", line 807, in
_findmasterbranch
    return(int(fedoras[-1].strip('f')) + 1)
IndexError: list index out of range
</pre>
See bug 619979 for more information, and a workaround.}}
 
=== How do I add a new package? ===
 
Please refer to the [[new package process for existing contributors]] and the 'Import of complete src.rpm packages' section above.
 
=== How do I add a new branch? ===
 
Refer to [[Package_SCM_admin_requests#Package_Change_Requests_for_existing_packages| Package SCM Admin Requests]].
 
=== How do I remove a branch? ===
 
<!-- Simply use the <code>cvs remove</code> command.  Do not list this on the [[CVS_admin_requests| CVS Admin Requests]]  page; that page is only for CVS administrative actions. -->
'''(Would this use ''git branch -d''? --[[User:Pfrields|pfrields]] 21:33, 31 July 2010 (UTC))'''
 
=== How do I make changes to an older branch? ===
 
Here is the scenario: you've build your package successfully on the ''f14'' branch, but there is a problem keeping your package from building on ''f13''.
 
Solution: make your changes in the branch and then add a digit to the very right of the release tag. There is no need to change the release in the other branches. This allows upgrades to work smoothly if the user upgrades to a newer release of Fedora.
 
<pre>
Name:    foo
Version: 1.0
Release: 1%{?dist}
 
Name:    foo
Version: 1.0
Release: 1%{?dist}.1
</pre>
 
Then tag and build as usual.
 
Refer to https://www.redhat.com/archives/fedora-extras-list/2006-May/msg00083.html for more information.
 
=== How do I request a build? ===
 
Use the ''fedpkg build'' command.
 
Detailed information about the Fedora build system is at [[Using the Koji build system]].
 
=== I have an account but I can't connect to git via ssh ===
 
The ''fedpkg'' tool clones repositories using the ssh:// protocol, so this should not be a problem normally.  If you cloned using the ''git'' utility itself, check the {{filename|.git/config}} file to ensure the remote repository is being accessed via an ssh:// protocol, and not git://.
 
Please write to accounts at fedora.redhat.com and include all details.  There has not been any IP address ACL anymore for months now, so your problem is likely a client configuration issue, private/public key mismatch, or some network problem. '''(Is this still needed? --[[User:Pfrields|pfrields]] 21:33, 31 July 2010 (UTC))'''
 
=== How do I update/import a new branch? ===
If a new branch is created on the server side, <code>git pull</code> should be able to pull the new branch.
 
== Hints ==
 
=== Reusing the changelog ===
 
* Use ''fedpkg clog'' to extract the last spec changelog entry and store it in a local "clog" file. Include this file as the git commit log message.  This can be done with the following commands:
<pre>
fedpkg clog
fedpkg commit -F clog
</pre>
 
=== Expired Certificates (Error 255 or OpenSSL.SSL.Error) ===
 
This error usually means that your client certificate (~/.fedora.cert) has expired, so you need to visit [https://admin.fedoraproject.org/accounts/ the account system]  and retrieve a new one.
 
You may need to rerun <code>fedora-packager-setup</code>
from the <code>fedora-packager</code> package, especially if you get the error:
<pre>
<class 'OpenSSL.SSL.Error'>: [('SSL routines', 'SSL3_READ_BYTES', 'sslv3
]alert certificate expired'), ('SSL routines', 'SSL3_WRITE_BYTES', 'ssl
handshake failure')
</pre>
 
Remove your ~/.fedora-server*ca.cert and rerun <code>fedora-packager-setup</code> if you get the error:
<pre>
Error: [('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate
verify failed')]
</pre>
 
[[Category:Package Maintainers]][[Category:FAQ]]

Revision as of 13:22, 25 September 2014