From Fedora Project Wiki

m (1 revision(s))
Line 16: Line 16:
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:
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>
<pre>
./cvs-import.sh ~/rpm/SRPMS/foo-1.0-2.src.rpm
./common/cvs-import.sh ~/rpm/SRPMS/foo-1.0-2.src.rpm
./cvs-import.sh -b FC-3 -m "import Joe's update" ~/bar-2.1-1.src.rpm
./common/cvs-import.sh -b FC-3 -m "import Joe's update" ~/bar-2.1-1.src.rpm
</pre>
</pre>
See "cvs-import.sh --help" for the options it understands. It can also update modules in branch directories other than the default "devel".
See "cvs-import.sh --help" for the options it understands. It can also update modules in branch directories other than the default "devel".
Line 27: Line 27:
'''Example for this method'''
'''Example for this method'''


{{Template:Tip}} 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 accidentally overwrote other packages with this method. Please make yourself familar with above description please.
{{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>
<pre>
Line 34: Line 34:
cvs co foo
cvs co foo
cd foo/devel
cd foo/devel
# you should checkout a new srpm in case someone else modified something in the cvs after your last update
make srpm
make srpm
# <install the resulting srpm with the usual commands and modify it>
# commit your changes:
cd foo/common
cd foo/common
./cvs-import.sh -b <branch_name> -m "foo updated to 0.0.2" ~/rpmbuild/SRPM/<package_name>-<version>-<release>.src.rpm
./cvs-import.sh -b <branch_name> -m "foo updated to 0.0.2" ~/rpmbuild/SRPM/<package_name>-<version>-<release>.src.rpm
Line 41: Line 44:
make build
make build
</pre>
</pre>


=== How to add new packages? ===
=== How to add new packages? ===

Revision as of 00:04, 29 May 2008

Fedora Package Collection CVS FAQ

This FAQ is still work in progress.



How do I update an existing package in CVS? (recommended way)

See UpdatingPackageHowTo .

Import of complete src.rpm packages

As an alternative to the recomended way 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:

./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

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

Idea.png
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.
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

How to add new packages?

Please refer to the 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 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 cvs remove command. Do not list this on the 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.

Name:    foo
Version: 1.0
Release: 1%{?dist}

Name:    foo
Version: 1.0
Release: 1%{?dist}.1

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 UsingKoji . For previous versions, you can refer to 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 make tag 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:

TAG_OPTS=-F make tag or make force-tag

If you still run into problems, simply increase the Release version in your spec file, commit the changes, and run make tag normally.

How do I update/import a new branch directory?

If a new branch is created on the server side, cvs update will not pull the new directory. Instead, you have to use cvs update -d.

Hints

  • For a list of Makefile targets, see Makefile or run
make help
  • 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:
cvs co -r fedora-rpmdevtools-1_0-2 fedora-rpmdevtools

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:
make clog
cvs commit -F clog

Expired Certificates (Error 255 or OpenSSL.SSL.Error)

  • If you get this error:
ERROR: could not check remote file status
make: *** [upload]  Error 255

this usually means that your client certificate (~/.fedora.cert) has expired, so you need to head over to the account system and retrieve a new one.

You may need to rerun:

fedora-packager-setup

from the fedora-packager 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')