From Fedora Project Wiki

(No useful content here, erasing everything since I cannot just delete the page)
Tag: Blanking
 
(13 intermediate revisions by 9 users not shown)
Line 1: Line 1:
== Fedora Package Collection CVS FAQ ==


This FAQ is still work in progress.
=== How do I update an existing package in CVS? (recommended way) ===
See [[PackageMaintainers/UpdatingPackageHowTo| UpdatingPackageHowTo]] .
=== Import of complete src.rpm packages ===
As an alternative to the recomended way [[PackageMaintainers/UpdatingPackageHowTo| UpdatingPackageHowTo]] , you can also import complete src.rpm packages to update an existing package, using a similar procedure than the initial package import.
The '''common''' directory in CVS, which is replicated in every module directory, contains a '''cvs-import.sh''' script. This script 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 CVS, 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>
./common/cvs-import.sh ~/rpm/SRPMS/foo-1.0-2.src.rpm
./common/cvs-import.sh -b FC-3 -m "import Joe's update" ~/bar-2.1-1.src.rpm
</pre>
See "cvs-import.sh --help" for the options it understands. It can also update modules in branch directories other than the default "devel".
Be careful, since cvs-import.sh can also create non-existing cvs modules in "devel" branch on-the-fly. According to current policies, the creation of new modules needs approval.
Also be aware that if you cvs-import.sh a single src.rpm to multiple branches, you run into problems with cvs 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.
'''Example for this method'''
{{admon/tip|Blind spots|Warning! This way may look much easier, but it not recommended because you can't check the changes that you have made against the version in cvs before you commit them. People have accidentally overwritten other packages with this method. Please make yourself familar with above description please.}}
<pre>
export CVSROOT=:ext:USERNAME@cvs.fedoraproject.org:/cvs/pkgs
export CVS_RSH=ssh
cvs co foo
cd foo/devel
# you should checkout a new srpm in case someone else modified something in the cvs after your last update
make srpm
# <install the resulting srpm with the usual commands and modify it>
# commit your changes:
cd foo/common
./cvs-import.sh -b <branch_name> -m "foo updated to 0.0.2" ~/rpmbuild/SRPM/<package_name>-<version>-<release>.src.rpm
cd ../<branch_name>
cvs up
make build
</pre>
=== How to add new packages? ===
Please refer to the [[PackageMaintainers/NewPackageProcess| NewPackageProcess]]  and the 'Import of complete src.rpm packages' section above.
=== How to import new packages on older branches? ===
Currently, the cvs-import.sh script can only create new modules in CVS in the "devel" directory. Due to this it is currently not possible to import completely new packages (i.e. packages which have not been stored in CVS before) with cvs-import.sh on branches other than "devel", simply because the other branch directories don't exist and won't be created by the script. But there is a way around it, which requires manual intervention. To request the creation of a new branch directory other than "devel" (e.g. FC-5), first import your package with cvs-import.sh in order to create the new module in CVS in the "devel" directory. Then edit [[PackageMaintainers/CVSAdminProcedure| CVSAdminProcedure]]  and add your package name together with the branches you want.
=== How do I remove a branch I no longer want or need? ===
Simply use the <code>cvs remove</code> command.  Do not list this on the [[PackageMaintainers/CVSAdminProcedure| CVSAdminProcedure]]  page; that page is only for CVS administrative actions.
=== How do I make changes to an older branch? ===
Here is the scenario: you've build your package successfully on the FC-5 branch, but there is a problem keeping your package from building on FC-4.
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.
See
https://www.redhat.com/archives/fedora-extras-list/2006-May/msg00083.html
=== How to request builds? ===
For fedora 7 and above, detailed information about the build system is at [[PackageMaintainers/UsingKoji| UsingKoji]] . For previous versions, you can refer to [[PackageMaintainers/BuildRequests| BuildRequests]] .
=== I have an account but I am unable to connect to CVS via ssh ===
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.
=== I ran <code>make tag</code> without checking in my files, how do I revert so I can check them in? ===
If you are aware of the consequences of what you're doing, run:
<pre>
TAG_OPTS=-F make tag or make force-tag
</pre>
If you still run into problems, simply increase the '''Release''' version in your spec file, commit the changes, and run <code>make tag</code> normally.
=== How do I update/import a new branch directory? ===
If a new branch is created on the server side, <code>cvs update</code> will not pull the new directory. Instead, you have to use <code>cvs update -d</code>.
== Hints ==
* For a list of Makefile targets, see [[PackageMaintainers/Makefile| Makefile]]  or run
<pre>
make help
</pre>
* Set the '''WORKDIR''' environment variable to point to a directory, in which the various "make" commands will run rpmbuild and store built rpms. Then make extensive use of e.g. "make i386" and "make srpm" to test your package prior to a CVS commit.
----
* After cvs commit of a new package version or release, run '''make tag''' in your working copy to add a symbolic tag to this particular version of your package. With these cvs tags you can check out a specific version of your package easily any time. For instance:
<pre>
cvs co -r fedora-rpmdevtools-1_0-2 fedora-rpmdevtools
</pre>
The automated build system for Fedora Package Collection requires such tags in order to be able to fulfill build requests.
----
* Use '''make clog''' to extract the last spec changelog entry and store it in a local "clog" file. Include this file as the cvs commit log message.  This can be done with the following commands:
<pre>
make clog
cvs commit -F clog
</pre>
=== Expired Certificates (Error 255 or OpenSSL.SSL.Error) ===
* If you get this error:
<pre>
ERROR: could not check remote file status
make: *** [upload]  Error 255
</pre>
this usually means that your client certificate (~/.fedora.cert) has expired, so you need to head over to [https://admin.fedoraproject.org/accounts/ the account system]  and retrieve a new one.
You may need to rerun:
<pre>
fedora-packager-setup
</pre>
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>

Latest revision as of 20:14, 2 October 2021