From Fedora Project Wiki

(Note .cvsignore copying)
(update instructions for git change)
Line 21: Line 21:
'''Step 8:''' Checkout the CVS module (details [http://fedoraproject.org/wiki/PackageMaintainers/Join#Check_out_the_module here] )
'''Step 8:''' Checkout the CVS module (details [http://fedoraproject.org/wiki/PackageMaintainers/Join#Check_out_the_module here] )
* Once you have the CVS module, checkout your module from CVS
* Once you have the CVS module, checkout your module from CVS
* It is probably a good idea to make a "cvs" toplevel directory, then check-out your files inside of that.
* It is probably a good idea to make a "git" toplevel directory, then check-out your files inside of that.
* If your package is named foobar, this is done with: fedora-cvs foobar
* If your package is named foobar, this is done with: fedpkg clone foobar
* You should now have a directory named foobar/ on your system with devel/, F-7/ and FC-6/ subdirectories (assuming you requested branches for F-7 and FC-6)
'''Step 9:''' Import your srpm
'''Step 9:''' Import your srpm
* Then you can import the approved SRPM into devel/ by running <code>./common/cvs-import.sh -m "Initial import (#nnnnnn)." nameofmy.src.rpm</code> (where nnnnnn is your Bugzilla package review bug number).
* Then you can import the approved SRPM into devel/ by running <code> fedpkg import libfoo-x.x.x.src.rpm; git commit -p -m "Initial import (#nnnnnn)."</code> (where nnnnnn is your Bugzilla package review bug number).
* Obviously, replace nameofmy.src.rpm with the full path to your approved SRPM.
* Obviously, replace nameofmy.src.rpm with the full path to your approved SRPM.
* You should see it upload the sources, and finish successfully. If you didn't set up ssh-agent it will ask often for your ssh-key passphrase. This is normal.
* You should see it upload the sources, and finish successfully. If you didn't set up ssh-agent it will ask often for your ssh-key passphrase. This is normal.
* Now run cvs update to get the final versions in your devel/ directory.
* Now run git pull to get the final versions in your devel/ directory.
'''Step 10:''' You can now import the package to your branches too
'''Step 10:''' You can now import the package to your branches too
* The quickest way to do this is to copy the sources file, .cvsignore file, .spec file and any patches from devel/ to each branch. Also check if the Makefile exists and copy it if necessary. After that, <code>cvs add</code> all copied files and commit them with: <code>cvs commit</code>
* The quickest way to do this is to copy the sources file, .gitignore file, .spec file and any patches from master to each branch. Also check if the Makefile exists and copy it if necessary. After that, <code>git add</code> all copied files and commit them with: <code>git commit -p </code>
'''Step 11:''' Tag your branches (branches are FC-5, FC-6, devel ...)
* When you're happy with the source, commit on each branch. use fedpkg switch-branch and git merge.  
* Before a branch can be built in the Fedora Package buildsystem, the files in that branch must be tagged in CVS.
'''Step 11:''' Request builds
* When you're happy with the source, commit on each branch, go into the branch directory (e.g. cd F-7/) and run: <code>make tag</code>
* For each branch that you'd like to request a build for, switch using fedpkg switch-branch and run: <code>fedpkg build</code>
* You should see it tag the branch with the version and release from the spec file.
* You need to tag all the branches that you want to build.
* If you only imported the srpm, you do not need to tag as cvs-import.sh will do it for you.
'''Step 12:''' Request builds
* For each tagged branch that you'd like to request a build for, go into the branch directory (e.g. cd F-7/) and run: <code>make build</code>
* If everything goes well, it should queue up your branch for building, the package will cleanly build, and you're done!
* If everything goes well, it should queue up your branch for building, the package will cleanly build, and you're done!
* If it fails to build, the buildsystem will send you an email to report the failure and link you to the logs. Commit any needed changes to cvs, bump the spec release number, retag the branch, and request a new build.
* If it fails to build, the buildsystem will send you an email to report the failure and link you to the logs. Commit any needed changes to git, bump the spec release number and request a new build.
'''Step 13:''' Close the bugzilla ticket (assuming that the package built successfully)
'''Step 12:''' Close the bugzilla ticket (assuming that the package built successfully)
* You should close it as NEXTRELEASE.
* You should close it as NEXTRELEASE.
'''Step 14:''' If this package will be built for any version of Fedora that is already released please submit it for inclusion in the 'fedora-updates' repository for those versions of Fedora. See [[PackageMaintainers/UpdatingPackageHowTo#Submit_your_update_to_Bodhi|submitting your update to bodhi]]  for more details.<BR>
'''Step 13:''' If this package will be built for any version of Fedora that is already released please submit it for inclusion in the 'fedora-updates' repository for those versions of Fedora. See [[PackageMaintainers/UpdatingPackageHowTo#Submit_your_update_to_Bodhi|submitting your update to bodhi]]  for more details.<BR>
'''Step 15:''' Add the package to the [[PackageMaintainers/CompsXml|comps file(s)]] if appropriate.
'''Step 14:''' Add the package to the [[PackageMaintainers/CompsXml|comps file(s)]] if appropriate.


We know that this process can be as clear as mud sometimes, we're always trying to make it better. If you run into any problems, or have any questions, please ask on fedora-devel-list. <BR>
We know that this process can be as clear as mud sometimes, we're always trying to make it better. If you run into any problems, or have any questions, please ask on fedora-devel-list. <BR>

Revision as of 09:16, 4 August 2010

Contributors only!
This document is for existing Contributors only. If you do not already have a Fedora account or if this is your first Fedora package, you must follow the process documented in PackageMaintainers/Join.

This is a short version of the PackageMaintainers/Join document, streamlined to show how existing contributors can make new packages.

Step 1: Read the Packaging Guidelines and Package Naming Guidelines . Really. Be comfortable with them.
Step 2: Make a package.

Step 3: Upload your SRPM and SPEC files onto the internet somewhere.

Step 4: Make sure you have a bugzilla account at bugzilla.redhat.com
Step 5: Fill out this form: https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=extras-review

  • Make sure you put the name of the package in the Review Summary field, along with a very brief summary of what it is
  • Make sure that you put the URL paths for the SPEC file and the SRPM file in the Review Description
  • Put a description of your package (usually, this can be the same thing as what you put in the spec %description) in Review Description
  • The review process is described in detail here: Package Review Guidelines

Step 6: Watch the bugzilla report for your first package (you created this in step 5). Fix any blockers that the reviewer(s) point out.
Step 7: When the package is approved by the reviewer, request a CVS module and branches with the CVSAdminProcedure .
Step 8: Checkout the CVS module (details here )

  • Once you have the CVS module, checkout your module from CVS
  • It is probably a good idea to make a "git" toplevel directory, then check-out your files inside of that.
  • If your package is named foobar, this is done with: fedpkg clone foobar

Step 9: Import your srpm

  • Then you can import the approved SRPM into devel/ by running fedpkg import libfoo-x.x.x.src.rpm; git commit -p -m "Initial import (#nnnnnn)." (where nnnnnn is your Bugzilla package review bug number).
  • Obviously, replace nameofmy.src.rpm with the full path to your approved SRPM.
  • You should see it upload the sources, and finish successfully. If you didn't set up ssh-agent it will ask often for your ssh-key passphrase. This is normal.
  • Now run git pull to get the final versions in your devel/ directory.

Step 10: You can now import the package to your branches too

  • The quickest way to do this is to copy the sources file, .gitignore file, .spec file and any patches from master to each branch. Also check if the Makefile exists and copy it if necessary. After that, git add all copied files and commit them with: git commit -p
  • When you're happy with the source, commit on each branch. use fedpkg switch-branch and git merge.

Step 11: Request builds

  • For each branch that you'd like to request a build for, switch using fedpkg switch-branch and run: fedpkg build
  • If everything goes well, it should queue up your branch for building, the package will cleanly build, and you're done!
  • If it fails to build, the buildsystem will send you an email to report the failure and link you to the logs. Commit any needed changes to git, bump the spec release number and request a new build.

Step 12: Close the bugzilla ticket (assuming that the package built successfully)

  • You should close it as NEXTRELEASE.

Step 13: If this package will be built for any version of Fedora that is already released please submit it for inclusion in the 'fedora-updates' repository for those versions of Fedora. See submitting your update to bodhi for more details.
Step 14: Add the package to the comps file(s) if appropriate.

We know that this process can be as clear as mud sometimes, we're always trying to make it better. If you run into any problems, or have any questions, please ask on fedora-devel-list.
https://www.redhat.com/mailman/listinfo/fedora-devel-list/

There is a helpful CVS FAQ which also includes instructions for making new releases.