iptables-optimizer version 0.9.13
As testing is fun, the shunit2 tests have been improved. Additionally it is checked now, if the tests are run as real root or in a fakeroot or user environment. This is checked before the first test is run. If they are not run by real root, all real tests are skipped for now:
hans@jhc ~/devel/opti debian/sid $ fakeroot bash iptables-optimizer-tests.sh test_Needs_to_run_as_root ASSERT:[42] expecting-real-root expected:<0> but was:<2> test_AutoApply_Not_Present test_AutoApply_Not_Ready test_AutoApply_Ready test_AutoApply_Execute test_AutoApply_Execute_fails_due_to_immutable test_Modprobe_NetFilter test_Good_iptables_save_without_log test_Good_iptables_save_simple_log test_Run_python_part_without_log test_Run_python_part_simple_log test_Run_python_part_verb_log_all_chains test_Run_python_part_verb_log_in_out_chains test_Bad_iptables_save test_Correct_iptables_restore test_Faulty_iptables_restore Ran 16 tests. FAILED (failures=1,skipped=20) hans@jhc ~/devel/opti debian/sid $ hans@jhc ~/devel/opti debian/sid $ su root@jhc:/home/hans/devel/opti# bash iptables-optimizer-tests.sh test_Needs_to_run_as_root test_AutoApply_Not_Present test_AutoApply_Not_Ready test_AutoApply_Ready test_AutoApply_Execute test_AutoApply_Execute_fails_due_to_immutable test_Modprobe_NetFilter test_Good_iptables_save_without_log test_Good_iptables_save_simple_log test_Run_python_part_without_log test_Run_python_part_simple_log test_Run_python_part_verb_log_all_chains test_Run_python_part_verb_log_in_out_chains test_Bad_iptables_save test_Correct_iptables_restore test_Faulty_iptables_restore Ran 16 tests. OK root@jhc:/home/hans/devel/opti# exit hans@jhc ~/devel/opti debian/sid $
After Guido has given another talk about his git buildpackage at the last FSFE-Fellowship-meeting (2015-01-12), the master branch is configured as upstream now, the debian/sid branch as default debian branch. git-pbuilder is used by default, which invokes cowbuilder. So all these details no longer need to be mentioned on the command line invocation of the package build command:
hans@jhc ~/devel/opti debian/sid $ gbp buildpackage --git-tag --git-retag ... ... big bunch of output, may be read later from ../iptables-optimizer_0.9.13_amd64.build ... hans@jhc ~/devel/opti debian/sid $ ls -ltr ../*0.9.13* -rw-r--r-- 1 hans hans 81684 Jan 16 22:42 ../iptables-optimizer_0.9.13.tar.xz -rw-r--r-- 1 hans hans 798 Jan 16 22:42 ../iptables-optimizer_0.9.13.dsc -rw-r--r-- 1 hans hans 14174 Jan 16 22:43 ../iptables-optimizer_0.9.13_all.deb -rw-r--r-- 1 hans hans 91516 Jan 16 22:43 ../iptables-optimizer-doc_0.9.13_all.deb -rw-r--r-- 1 hans hans 1827 Jan 16 22:43 ../iptables-optimizer_0.9.13_amd64.changes -rw-r--r-- 1 hans hans 46048 Jan 16 22:43 ../iptables-optimizer_0.9.13_amd64.build hans@jhc ~/devel/opti debian/sid $
Using '--git-tag --git-retag' does the release tagging in the git repository on the fly:
hans@jhc ~/devel/opti debian/sid $ git log --oneline --decorate f828f0b (HEAD, tag: debian/0.9.13, origin/debian/sid, debian/sid) changelog was done by: gbp dch -R --auto c7045a8 version now set to 0.9.13 67d74fe (origin/master, origin/HEAD, master) ID checks for root summarized to REAL_ID, all tests affected 33f92f4 shunit2 test added to check real root vs. fakeroot 6540e16 (tag: debian/0.9.12) missing cloud-sptheme-common added -Build-Depends ... hans@jhc ~/devel/opti debian/sid $
The '--git-retag' is neccessary, if the tag already exists. All configuration for gbp buildpackage is done in ~/.gbb.conf like this:
[DEFAULT] # tell git-buildpackage howto clean the source tree cleaner = fakeroot debian/rules clean # this is how we invoke pbuilder, arguments passed to git-buildpackage will be # passed to dpkg-buildpackge in the chroot builder = /usr/bin/git-pbuilder # sign-tags = True keyid = 0x005ea2e3cff5a06f # debian-branch = debian/sid upstream-branch = master upstream-tag = v%(version)s [buildpackage] postbuild = lintian $GBP_CHANGES_FILE cleaner = /bin/true pbuilder = True [dch] meta = True id-length = 7 full = True git-author = True multimaint-merge = True # EoF
Of course, you need to initialize cowbuilder before starting with gbp buildpackage:
hans@jhc ~/devel/opti debian/sid $ DIST=jessie git-pbuilder create ... hans@jhc ~/devel/opti debian/sid $
This creates a cowbuilder base image in /var/cache/pbuilder/base-jessie.cow/. It is used as a chrooted build environment on each gbp buildpackage invocation... One of its big advantages over dpkg-buildpackage is to verify the build-dependancies. If something is missing, the build process will fail. The error messages show you the reason. It's great!
The github iptables-optimizer repository is updated, prebuild debian and rpm packages are waiting for your downloads.
Your comments are welcome!