Archive:Using CVS FAQ for package maintainers

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
m (1 revision(s))
m
 
(13 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 +
[[Category:Package maintainers archive]][[Category:FAQ]]
 +
 
== Fedora Package Collection CVS FAQ ==
 
== Fedora Package Collection CVS FAQ ==
  
Line 16: Line 18:
 
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 29:
 
'''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 36:
 
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 46:
 
make build
 
make build
 
</pre>
 
</pre>
 
  
 
=== How to add new packages? ===
 
=== How to add new packages? ===
  
Please refer to the [[PackageMaintainers/NewPackageProcess| NewPackageProcess]] and the 'Import of complete src.rpm packages' section above.
+
Please refer to the [[new package process for existing contributors]] 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 to have new branches added? ===
  
 +
Refer to [[CVS_admin_requests#Package_Change_Requests_for_existing_packages| CVS Admin Requests]].
  
 
=== How do I remove a branch I no longer want or need? ===
 
=== 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.
+
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.
 
+
  
 
=== How do I make changes to an older branch? ===
 
=== How do I make changes to an older branch? ===
Line 82: Line 83:
 
=== How to request builds? ===
 
=== 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]] .
+
For fedora, detailed information about the build system is at [[PackageMaintainers/UsingKoji| UsingKoji]] . For EPEL, you can refer to [[PackageMaintainers/BuildRequests| BuildRequests]] .
  
 
=== I have an account but I am unable to connect to CVS via ssh ===
 
=== I have an account but I am unable to connect to CVS via ssh ===
Line 90: Line 91:
 
=== I ran <code>make tag</code> without checking in my files, how do I revert so I can check them in? ===
 
=== 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:
+
As long as you have not built the package you have the option to run:
  
 
<pre>
 
<pre>
TAG_OPTS=-F make tag or make force-tag
+
TAG_OPTS=-F make tag  
 
</pre>
 
</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.
+
* Note:  this is a dangerous command if misused only do it if you really know what your doing and you have checked everything at least twice.
 +
 
 +
If your not sure ask in #fedora-devel or #fedora-admin or 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? ===
 
=== How do I update/import a new branch directory? ===
Line 125: Line 128:
  
 
=== Expired Certificates (Error 255 or OpenSSL.SSL.Error) ===
 
=== Expired Certificates (Error 255 or OpenSSL.SSL.Error) ===
* If you get this error:
+
 
 +
If you get this error:
  
 
<pre>
 
<pre>
Line 134: Line 138:
 
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.
 
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:
+
You may need to rerun <code>fedora-packager-setup</code>
<pre>
+
fedora-packager-setup
+
</pre>
+
 
from the <code>fedora-packager</code> package, especially if you get the error:
 
from the <code>fedora-packager</code> package, especially if you get the error:
 
<pre>
 
<pre>
Line 143: Line 144:
 
]alert certificate expired'), ('SSL routines', 'SSL3_WRITE_BYTES', 'ssl
 
]alert certificate expired'), ('SSL routines', 'SSL3_WRITE_BYTES', 'ssl
 
handshake failure')  
 
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>
 
</pre>

Latest revision as of 11:13, 30 December 2012


Contents

[edit] Fedora Package Collection CVS FAQ

This FAQ is still work in progress.



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

See UpdatingPackageHowTo .

[edit] 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

[edit] How to add new packages?

Please refer to the new package process for existing contributors and the 'Import of complete src.rpm packages' section above.

[edit] How to have new branches added?

Refer to CVS Admin Requests.

[edit] How do I remove a branch I no longer want or need?

Simply use the cvs remove command. Do not list this on the CVS Admin Requests page; that page is only for CVS administrative actions.

[edit] 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


[edit] How to request builds?

For fedora, detailed information about the build system is at UsingKoji . For EPEL, you can refer to BuildRequests .

[edit] 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.

[edit] I ran make tag without checking in my files, how do I revert so I can check them in?

As long as you have not built the package you have the option to run:

TAG_OPTS=-F make tag 
  • Note: this is a dangerous command if misused only do it if you really know what your doing and you have checked everything at least twice.

If your not sure ask in #fedora-devel or #fedora-admin or simply increase the Release version in your spec file, commit the changes, and run make tag normally.

[edit] 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.

[edit] 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

[edit] 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') 

Remove your ~/.fedora-server*ca.cert and rerun fedora-packager-setup if you get the error:

Error: [('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate
verify failed')]