
s=master
#b=unstable
v=$v-rc1

OR

x=4.1
m=1
rc=-rc2

r=$x.$m
s=$x-testing
#b=$x-testing
v=$r$rc

t=$r$rc
OR
t=RELEASE-$r


# FIRSTLY
#  - check (for point releases, but not RCs) all XSAs have been applied (Lars)
#
* check, even for point releases
*  http://logs.test-lab.xenproject.org/osstest/results/all-branch-statuses.txt


# QEMU

  git checkout $s
  git show # should show appropriate intended commit
  git-tag -u 'Xen.org Xen tree code signing' -m "Xen $v" xen-$v

  git-push xenbits.xen.org:/home/xen/git/qemu-xen-traditional.git $s:stable-$x xen-$v

# consider making tag in minios, and updating xen.git Config.mk
  git checkout SOMETHING
  git show # should show appropriate intended commit
  git-tag -u 'xen tree' -s -m "Xen $r$rc" xen-$t
  git push xen@xenbits.xen.org:/home/xen/git/mini-os.git xen-$t

* Also tag upstream qemu tree (Stefano)
  git checkout SOMETHING
  git show # should show appropriate intended commit
  git tag -u 'xen tree' -s -m "Xen $r$rc" qemu-xen-$v 
  git push osstest@xenbits.xen.org:/home/xen/git/qemu-xen.git qemu-xen-$v

* consider bumping sonames of shlibs

* change xen-unstable README. The banner (generated using figlet) should say:
    - "Xen 4.5" in releases and on stable branches
    - "Xen 4.5-unstable" on unstable
    - "Xen 4.5-rc" for release candidate

* change xen-unstable Config.mk
#   QEMU_UPSTREAM_REVISION,
#   QEMU_TRADITIONAL_REVISION
#   MINIOS_UPSTREAM_REVISION
#     (drop any references to the specific commits, e.g. date or title)
* change SUPPORT.md heading version number; -unstable or -rc tag
*     (empty in stable branches after .0 release).
* SUPPORT.md: insert correct version number in release-notes link
* CHANGELOG.md: set section heading to delete UNRELEASED and add date;
#               in unstable branches set to X.Y.0 and RELEASE-X.YY.0
* change xen-unstable xen/Makefile XEN_EXTRAVERSION
# if main version number has changed (eg 4.7 -> 4.8) rerun ./autogen.sh
* rerun ./autogen.sh to update version number in configure
#    - XEN_EXTRAVERSION should be as follows
#      `.0-rc$(XEN_VENDORVERSION)'       during freeze, first rc onwards (including staging, before branching)
#      `-unstable$(XEN_VENDORVERSION)'   unstable aka unfrozen staging (or unstable branch, after branching)
#      `.0$(XEN_VENDORVERSION)'          actual release of Xen X.Y.0 (aka first actual release of Xen X.Y)
#      `.Z$(XEN_VENDORVERSION)'          actual release of Xen X.Y.Z (stable point realase)
#      `.Z-pre$(XEN_VENDORVERSION)'      stable branch, after release of Z-1
#
#    - turn off debug on stable branches, if not already done
#           - tools/Rules.mk
#                 debug ?= n
#           - xen/Kconfig.debug
#                 config DEBUG
#                     default n

* tag xen-unstable

# In xen.git
  git-fetch origin
  git-checkout staging-$x
  git-pull
  git-show # should show commit updating version to right version
  git-tag -u 'xen tree' -s -m "Xen $r$rc" $t
  git-push origin $t
  git-push origin staging-$x
##  hg tag <tag_name> ; hg sign -k "Xen tree" <tag_name>



HANDLING TAG GENERATED BY RELEASE MANAGER

   fetch the tag into my tree
   make the tarball (RELEASE TARBALL, below)
   test build (see below)
   website (see below)
   merge tag into staging and push to staging
   maybe force push into master
   definitely push tag to xenbits
        git-push origin $t




RELEASE TARBALL

   for 4.5 and later, use tarball target
       git checkout $t
       git clean -xdff
       # export http_proxy=http://localhost:3128/
       ./configure
       make src-tarball-release   # must be used for actual releases
       make src-tarball           # uses git-describe (best for RCs)
        # ^find some way to add git-cache-proxy to this (done in ~iwj/.gitconfig)
       mkdir /volatile/iwj/website-thing/xen.org/oss-xen/release/$v
       mv dist/xen-$v.tar.gz /volatile/iwj/website-thing/xen.org/oss-xen/release/$v/.

       # website-thing/xen.org is cvs -d mail.xenproject.org:/home/downloads-cvs/cvs-repos co xen.org
	cd /volatile/iwj/website-thing/xen.org

# test build
                cd /volatile/iwj/d
                mkdir build
                cd build
                tar zxf /volatile/iwj/website-thing/xen.org/oss-xen/release/$v/xen-$v.tar.gz
#                rsync -a --delete xen-$v build/
                cd xen-$v
                export http_proxy=http://localhost:3128/
                (./configure && make -j4 KERNELS='' && echo ok.) 2>&1 | tee ../log.$v       # post 4.2

# [[ test build amd64 ]]

	cvs add -kb oss-xen/release/$v/

        cd oss-xen/release/$v
        gpg --digest-algo=SHA256 --detach-sign -u 'xen tree' xen-$v.tar.gz
	cvs add -kb xen-$v.tar.gz
        cvs add -kb xen-$v.tar.gz.sig
        cd ../../..

	cvs ci -m $v

        ssh downloads-cvs@mail.xenproject.org
	cd /data/downloads.xenproject.org/xen.org
	cvs -q up -d
	# should show something like
	#   U oss-xen/release/4.8.0-rc2/xen-4.8.0-rc2.tar.gz
	#   U oss-xen/release/4.8.0-rc2/xen-4.8.0-rc2.tar.gz.sig

After a .0 release, update XEN_EXTRAVERSION again (to .1-pre, see above).

After a .0 release,
Update new stable tree's MAINTAINERS to contain correct info for this
stable branch: usually, copy text from previous
staging-$ov:MAINTAINERS section "Stable Release Maintenance"
into new staging-$v, deleting what's there.
  git cat-file blob origin/staging-$ov:MAINTAINERS >MAINTAINERS
and review the changes, commiting ONLY THE RELEVANT ONES

Notify release manager of completion

