How to do a release for Fail2Ban¶
Preparation¶
Check distribution patches and see if they can be included
Check distribution outstanding bugs
https://github.com/fail2ban/fail2ban/issues?sort=updated&state=open
http://bugs.debian.org/cgi-bin/pkgreport.cgi?dist=unstable;package=fail2ban
http://bugs.sabayon.org/buglist.cgi?quicksearch=net-analyzer%2Ffail2ban
https://bugs.archlinux.org/?project=5&cat%5B%5D=33&string=fail2ban
http://www.freebsd.org/cgi/query-pr-summary.cgi?text=fail2ban
https://build.opensuse.org/package/requests/openSUSE:Factory/fail2ban
Make sure the tests pass:
./fail2ban-testcases-all
Ensure the version is correct in:
./fail2ban/version.py
top of ChangeLog
README.md
Ensure the MANIFEST is complete
ad-hoc bash script to run in a clean clone:
find -type f | grep -v -e ‘.git’ -e ‘/doc/’ -e MANIFEST | sed -e ‘s,^./,,g’ | while read f; do grep -ne “^$f$” MANIFEST >/dev/null || echo “$f” ; done
or an alternative for comparison with previous release
git diff 0.10.0 | grep -B2 ‘index 0000000..’ | grep -B1 ‘new file mode’ | sed -n -e ‘/^diff /s,.* b/,,gp’ >> MANIFEST sort MANIFEST | uniq | sponge MANIFEST
Run:
python setup.py sdist
Look for errors like:
'testcases/files/logs/mysqld.log' not a regular file -- skipping
Which indicates that testcases/files/logs/mysqld.log has been moved or is a directory:
tar -C /tmp -jxf dist/fail2ban-0.9.6.tar.bz2
clean up current directory:
diff -rul --exclude \*.pyc . /tmp/fail2ban-0.10.0/
Only differences should be files that you don’t want distributed.
Ensure the tests work from the tarball:
cd /tmp/fail2ban-0.9.6/ && bin/fail2ban-testcases
Add/finalize the corresponding entry in the ChangeLog
To generate a list of committers use e.g.:
git shortlog -sn 0.10.0.. | sed -e 's,^[ 0-9\t]*,,g' | tr '\n' '\|' | sed -e 's:|:, :g'
Ensure the top of the ChangeLog has the right version and current date.
Ensure the top entry of the ChangeLog has the right version and current date.
Update man pages:
(cd man ; ./generate-man ) git commit -m 'DOC/ENH: update man pages for release' man/*
Cleanout TODO file with the finished stuff
Prepare source and rpm binary distributions:
python setup.py sdist
Broken for now: python setup.py bdist_rpm
Broken for now: python setup.py upload
Tag the release by using a signed (and annotated) tag. Cut/paste release ChangeLog entry as tag annotation:
git tag -s 0.10.0
Pre Release¶
Provide a release sample to distributors
Arch Linux:
Debian: Yaroslav Halchenko <debian@onerussian.com>
FreeBSD: Christoph Theis theis@gmx.at>
Fedora: Axel Thimm <Axel.Thimm@atrpms.net>
Gentoo: netmon@gentoo.org
openSUSE: Stephan Kulow <coolo@suse.com>
Mac Ports: @Malbrouck on github (gh-49)
Mageia:
And potentially to the fail2ban-users email list.
Wait for feedback from distributors
Prepare a release notice https://github.com/fail2ban/fail2ban/releases/new
Upload the source/binaries from the dist directory and tag the release using the URL
Upload source/binaries to sourceforge http://sourceforge.net/projects/fail2ban/
Run the following and update the wiki with output:
python -c 'import fail2ban.protocol; fail2ban.protocol.printWiki()'
Update:
http://www.fail2ban.org/wiki/index.php?title=Template:Fail2ban_Versions&action=edit
http://www.fail2ban.org/wiki/index.php?title=Template:Fail2ban_News&action=edit * move old bits to http://www.fail2ban.org/wiki/index.php?title=Template:Fail2ban_OldNews&action=edit
http://www.fail2ban.org/wiki/index.php/Requirements (Check requirement)
See if any filters are upgraded: http://www.fail2ban.org/wiki/index.php/Special:AllPages
Email users and development list of release
notify distributors
Post Release¶
Add the following to the top of the ChangeLog:
ver. 0.10.0 (2016/XX/XXX) - wanna-be-released
-----------
### Fixes
### New Features
### Enhancements
Alter the git shortlog command in the previous section to refer to the just released version.
and adjust fail2ban/version.py to carry .dev0 suffix to signal a version under development.