From Fedora Project Wiki

(add "Could not parse object" build problem.)
(redirect to the new package maintenance guide which subsumes this and the 'how to use git' page)
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:
fedpkg import ~/rpm/SRPMS/foo-1.0-2.src.rpm
fedpkg import -b f14 ~/bar-2.1-1.src.rpm
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.}}
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
=== 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.
Name:    foo
Version: 1.0
Release: 1%{?dist}
Name:    foo
Version: 1.0
Release: 1%{?dist}.1
Then tag and build as usual.
Refer to 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://.
=== 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:
fedpkg clog
fedpkg commit -F clog
Or the shorter version:
fedpkg commit -c
=== Expired Certificates (Error 255 or OpenSSL.SSL.Error) ===
This error usually means that your client certificate (~/.fedora.cert) has expired, so you need to run fedora-cert to get 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:
<class 'OpenSSL.SSL.Error'>: [('SSL routines', 'SSL3_READ_BYTES', 'sslv3
]alert certificate expired'), ('SSL routines', 'SSL3_WRITE_BYTES', 'ssl
handshake failure')
Remove your ~/.fedora-server*ca.cert and rerun <code>fedora-packager-setup</code> if you get the error:
Error: [('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate
verify failed')]
=== Build Error (Error running GIT command ) ===
This error indicates that the checkout part of the build process was unable to retrieve the git tag remotely that is committed locally. The error would be similar to:
<pre> -> FAILED: BuildError: Error
running GIT command "git reset --hard
0b5ed5d06268924f1c545174dc57e15e951a8ff6", see checkout.log for details
Checkout.log, available on will end with:
fatal: Could not parse object '0b5ed5d06268924f1c545174dc57e15e951a8ff6'.
In this case, check whether local changes have been committed:
git show HEAD | head -n 1
, and if so, also push your locally committed changes to the Fedora git repository
fedpkg push
before attempting the build
fedpkg build
[[Category:Package Maintainers]][[Category:FAQ]]

Latest revision as of 13:22, 25 September 2014