# Work in progress...

A note on mock versions: 

  There are now two main branches to be aware of:
  	- mock-1.0 (pre-F13 and EPEL5)
	- mock-1.1+ (F-13+ and EPEL6+)
  In the upstream git tree, mock-1.0 is tracked on the branch origin/mock-1.0,
  while mock-1.1+ is in the master branch. Please be careful when
  updating the various distro to use the correct branch and version
  number when generating tarfiles for RPM generation.

Note that we've now switched over to using git for the package
repositories (as opposed to the old CVS repositories). To make use of
the new format, you must install the fedora-packager package and clone
the mock package repository:

    $ sudo yum install fedora-packager
    $ fedpkg clone mock
    $ mv mock mock-fedora.git

The last step is not strictly required, but I do it to keep from
confusing the package repository with the upstream (source) repository

=====================================================================

Release checklist overview:

   1) upstream git tree: 
      - update remote
      - merge into work
      - checkin
      - tag
      - merge work into master
      - push
      - upload tarballs
   2) koji git tree: 
      - checkin new source tarball in master
      - checkin and push new specfile
      - tag and build
      - for each release: 
      	- merge master
	- push
	- build
   3) bodhi: schedule release

=====================================================================
For a mock 1.1+ release

In the upstream git tree:

   0) change to the local master
      $ git checkout master
   1) fetch git remotes and fast-forward your local master
      $ git remote update
      $ git merge origin/master
   2) create a branch from master (e.g. 'prerelease') and switch to it
      $ git checkout -b work master
   3) merge any remote updates for specific fixes
      $ git merge jkeating/updates-for-clark
   4) merge any local branch work and reolve any conflicts
      $ git merge frooble-changes
   5) update configure.ac with new version info (don't commit yet)
   6) update the %changelog section of mock.spec.in (still don't commit)
   7) run 'autogen.sh' to update autoconf files
   8) run 'configure' to generate Makefile and mock.spec
   9) run 'make rpm' to generate binary RPM and propagate version
      changes (Note this also generates a tar file for use later).
  10) verify that tests/runtests.sh uses a supported config file
      (e.g. released fedora minus one). If not, edit and commit
  11) run 'make check' and fix any reported failures until it passes
      $ sh autogen.sh && ./configure && make rpm && make chekc
  12) check in any changes required to fix test failures (still don't
      commit configure.ac and mock.spec.in)
  13) remove ChangeLog and AUTHORS
  14) run 'make dist' to generate ChangeLog and AUTHORS files and
      regenerate tar file
  15) commit configure.ac and mock.spec.in with a version bump
      message: 
     $ git commit -m 'version bump' configure.ac
  16) tag the git tree:
     $ git tag -u <your key> mock-<version>
  17) checkout master and merge your work directory:
      $ git checkout master
      $ git merge work
  18) push to main git repo (only from master branch):
     $ git push origin master
     $ git push origin tag mock-<version>
  19) copy tarball to fedorahosted:
     $ scp mock-<version>.tar.gz fedorahosted.org:mock


In the fedora git (koji) tree

   1) cd to the previously cloned mock package repository
       $ cd ../mock-fedora.git
   2) change to the master branch:
       $ fedpkg switch-branch master
       	     or
       $ git checkout master
   3) upload the new source tarball from the upstream git tree
       $ fedpkg new-sources ../mock.git/mock-<version>.tar.gz
   4) copy in the new specfile that matches the tarball
       $ cp ../mock.git/mock.spec .
   5) commit and push the new sources
       $ fedpkg commit --clog --push
   6) initiate a koji build
       $ fedpkg build --nowait
   7) switch branches to the latest released fedora
       $ fedpkg switch-branch f17
              or
       $ git checkout f17
   8) merge master into the current release
       $ git merge master
      if there are conflicts, resolve and commit
   9) push changes back to origin
       $ fedpkg push
   10) initiate a build for the branch
       $ fedpkg build --nowait
   11) repeat steps 8 and 9 for all supported fedora releases and EPEL releases
      (e.g. f16, el6)

Once the builds finish (successfully) you should push the just built
packages to their respective testing repositories. This can be done
either with the Bodhi WebUI at
https://admin.fedoraproject.org/updates/ or if there are no other
package dependencies, using the 'fedpkg update' command. 
Note that you do not need to do this for the master (rawhide) branch
since it automatically gets pushed to testing.  




