From Fedora Project Wiki

(More updates)
(More updates)
Line 2: Line 2:


== Update {{filename|autoqa.spec}} ==
== Update {{filename|autoqa.spec}} ==
Once the decision has been made to release a new version of autoqa, the first step is to update the rpm {{filename|spec}} file with the newer version. Ideally,
Once the decision has been made to release a new version of autoqa, the first step is to update the rpm {{filename|spec}} file with the newer version.


# Checkout the ''master'' branch of autoqa <pre>git clone ssh://git.fedorahosted.org/git/autoqa.git && cd autoqa</pre>
# Checkout the ''master'' branch of autoqa <pre>git clone ssh://git.fedorahosted.org/git/autoqa.git && cd autoqa</pre>
# Edit {{filename|autoqa.spec}} by incrementing the <code>Version</code> and updating the <code>%changelog</code>
# Edit {{filename|autoqa.spec}} by incrementing the <code>Version</code> and updating the <code>%changelog</code>
# Locally commit the changes <pre>git commit autoqa.spec</pre>
# Locally commit the changes <pre>git commit autoqa.spec</pre>
# Push your changes to the remote git repository <pre> git push ssh://git.fedorahosted.org/git/autoqa.git master</pre>
# Push your changes to the remote git repository (requires [https://admin.fedoraproject.org/accounts/group/view/gitautoqa gitautoqa] membership) <pre> git push ssh://git.fedorahosted.org/git/autoqa.git master</pre>


== Cherry-pick and tag ==
== Cherry-pick and tag ==
Line 15: Line 15:
# Cherry pick the updated {{filename|autoqa.spec}} change <pre>git cherry-pick origin/master</pre>
# Cherry pick the updated {{filename|autoqa.spec}} change <pre>git cherry-pick origin/master</pre>
# Tag the release <pre>git tag vX.Y.X-1,2,3 stable</pre>
# Tag the release <pre>git tag vX.Y.X-1,2,3 stable</pre>
# Push your changes <pre>git push --tags ssh://git.fedorahosted.org/git/autoqa.git stable</pre>
# Push your changes (requires [https://admin.fedoraproject.org/accounts/group/view/gitautoqa gitautoqa] membership) <pre>git push --tags ssh://git.fedorahosted.org/git/autoqa.git stable</pre>


== Upload tarball ==
== Upload tarball ==
Line 29: Line 29:
# Build a source package from the current ''stable'' branch <pre>make srpm</pre>
# Build a source package from the current ''stable'' branch <pre>make srpm</pre>


== Create updates ==
== Build for applicable releases ==
With a source RPM created, it's time to build updates for existing ''stable'' repositories.  This includes {{FedoraVersion|long|current}}, {{FedoraVersion|long|previous}} and, depending on the time of release, potentially {{FedoraVersion|long|previous2}}.
With a source RPM created, it's time to '''build''' updated packages for any existing ''stable'' repositories.  This includes {{FedoraVersion|long|current}}, {{FedoraVersion|long|previous}} and, depending on the time of release, potentially {{FedoraVersion|long|previous2}}. Traditionally, this step would be handled by running the {{command|koji build --tag dist-f{{FedoraVersionNumber|current}}-updates path/to/src.rpm}} command.  However, since {{package|autoqa}} is not yet packaged and available in Fedora repositories, updates are built locally using {{command|mock}}.
 
Traditionally, this step would be handled by running the {{command|koji build --tag dist-f{{FedoraVersionNumber|current}}-updates path/to/src.rpm}} command.  However, since {{package|autoqa}} is not yet packaged and available in Fedora repositories, [[Install_and_configure_AutoQA|a custom package repository]] is used to deliver updates.  This section describes building packages for different releases and updating the custom package repositories using {{command|mock}}.  For guidance on using {{command|mock}}, consult [[Using Mock to test package builds]].


# Prepare a mock chroot for the desired release.  In this example, we'll build for {{FedoraVersion|long|previous}} on x86_64 {{#tag:pre| mock -r fedora-{{FedoraVersionNumber|previous}}-x86_64 --init }}
# Build packages using mock for Fedora, specify version using <code>RELEASEVER</code> variable {{#tag:pre|make mock-fedora RELEASEVER={{FedoraVersionNumber|current}} }}  
# Using the source rpm previously created in step [[#Build_RPMs]], build a new package for {{FedoraVersion|long|previous}} {{#tag:pre| mock -r fedora-{{FedoraVersionNumber|previous}}-x86_64 --rebuild path/to/autoqa-X.Y.Z-1.2.3.src.rpm }}
# Repeat the build procedure for all desired releases
# Repeat for all desired releases


{{admon/note|Building for EPEL-5?|Due to changes in the [[Features/StrongerHashes|filedigest algorithm]], extra care is required when creating packages for [[EPEL|EPEL-5]].  Be sure to set the <code>_source_filedigest_algorithm</code> and <code>_binary_filedigest_algorithm</code> for any packages used when building for EPEL-5.  For convenience, a {{filename|Makefile}} target is available to create EPEL-5 compatible packages.
{{admon/note|Building for EPEL-5?|Due to changes in the [[Features/StrongerHashes|filedigest algorithm]], extra care is required when creating packages for [[EPEL|EPEL-5]].  Be sure to set the <code>_source_filedigest_algorithm</code> and <code>_binary_filedigest_algorithm</code> for any packages used when building for EPEL-5.  For convenience, a {{filename|Makefile}} target is available to create EPEL-5 compatible packages.
<pre>
<pre>
make srpm_md5
make mock-epel RELEASEVER=5
mock -r epel-5-x86_64 --rebuild path/to/autoqa-X.Y.Z-1.2.3.el5.src.rpm
</pre>
</pre>
}}
}}


== Deploy ==
== Create updates ==
Traditionally, this step would be handled by using the bodhi update tool (described in detail at [[Package_update_HOWTO#Working_with_packages_in_the_stable_branches]]).  However, since {{package|autoqa}} is not yet packaged and available in Fedora repositories, a [[Fedorapeople_Repos|a custom package repository]] is used to deliver updates.
With packages built, it's time to submit them as updates.  Traditionally, this step would be handled by using the [[Package_update_HOWTO#Working_with_packages_in_the_stable_branches|bodhi update tool]].  However, since {{package|autoqa}} is not yet packaged and available in official Fedora repositories, a [[Fedorapeople_Repos|a custom package repository]] is used to deliver updates.
 
# Mirror the repository locally <pre>rsync -avz fedorapeople.org:/srv/repos/fedora-qa/autoqa ~/public_html/ ; cd autoqa/</pre>
# Add locally built packages to the repositories <pre>./moving</pre>
#./move-pkgs.sh -r testing /var/lib/mock/*x86_64/result/*rpm
#./update-repos.sh fedora-*-testing  epel-5-testing


FIXME


[[Category:AutoQA]]
[[Category:AutoQA]]

Revision as of 15:44, 30 June 2011

This page describes the process for tagging, building and deploying a new version of autoqa. This page assumes a basic understanding of rpm spec file syntax and commands such as git, mock and yum.

Update autoqa.spec

Once the decision has been made to release a new version of autoqa, the first step is to update the rpm spec file with the newer version.

  1. Checkout the master branch of autoqa
    git clone ssh://git.fedorahosted.org/git/autoqa.git && cd autoqa
  2. Edit autoqa.spec by incrementing the Version and updating the %changelog
  3. Locally commit the changes
    git commit autoqa.spec
  4. Push your changes to the remote git repository (requires gitautoqa membership)
     git push ssh://git.fedorahosted.org/git/autoqa.git master

Cherry-pick and tag

Next, we'll cherry-pick the autoqa.spec change into the stable git branch and tag the release.

  1. Change to the stable branch
    git checkout -b stable origin/stable || git checkout stable
  2. Cherry pick the updated autoqa.spec change
    git cherry-pick origin/master
  3. Tag the release
    git tag vX.Y.X-1,2,3 stable
  4. Push your changes (requires gitautoqa membership)
    git push --tags ssh://git.fedorahosted.org/git/autoqa.git stable

Upload tarball

Like many projects, the appropriate method to release a new version is by tarball. Once you have tagged the release, upload a new tarball using the following commands.

  1. Change to the stable branch
    git checkout -b stable origin/stable || git checkout stable
  2. Upload a new release tarball
    make upload

Build a source RPM

With the tarball uploaded, it's time to package the new release as an RPM.

  1. Change to the stable branch
    git checkout -b stable origin/stable || git checkout stable
  2. Build a source package from the current stable branch
    make srpm

Build for applicable releases

With a source RPM created, it's time to build updated packages for any existing stable repositories. This includes Fedora 40, Fedora 39 and, depending on the time of release, potentially Fedora 38. Traditionally, this step would be handled by running the koji build --tag dist-f40-updates path/to/src.rpm command. However, since Package-x-generic-16.pngautoqa is not yet packaged and available in Fedora repositories, updates are built locally using mock.

  1. Build packages using mock for Fedora, specify version using RELEASEVER variable
    make mock-fedora RELEASEVER=40 
  2. Repeat the build procedure for all desired releases
Note.png
Building for EPEL-5?
Due to changes in the filedigest algorithm, extra care is required when creating packages for EPEL-5. Be sure to set the _source_filedigest_algorithm and _binary_filedigest_algorithm for any packages used when building for EPEL-5. For convenience, a Makefile target is available to create EPEL-5 compatible packages.
make mock-epel RELEASEVER=5

Create updates

With packages built, it's time to submit them as updates. Traditionally, this step would be handled by using the bodhi update tool. However, since Package-x-generic-16.pngautoqa is not yet packaged and available in official Fedora repositories, a a custom package repository is used to deliver updates.

  1. Mirror the repository locally
    rsync -avz fedorapeople.org:/srv/repos/fedora-qa/autoqa ~/public_html/ ; cd autoqa/
  2. Add locally built packages to the repositories
    ./moving
  3. ./move-pkgs.sh -r testing /var/lib/mock/*x86_64/result/*rpm
  4. ./update-repos.sh fedora-*-testing epel-5-testing