[Swan-dev] building rpm target and using namespaces based testing
paul at nohats.ca
Fri Sep 20 23:57:14 UTC 2019
I just pushed a change to "make rpm" that auto builds an rpm. Depending
on fedora or centos/rhel/foobar it will pick up the right spec file in
Stock rpms should now be able to run namespace tests without modifications.
This was based on Antony's kvm-target.mk work, which I left in the tree
untouched for now, until Antony can confirm it is no longer needed for
him. Then it can be removed along with packaging/fedora/libreswan-testing.spec.in
There is some Makefile.inc.local handling in Antony's version that does not translate
to rpmbuilding that hardcodes various features based on distro. But I
don't think anything from there is still needed and was done mostly to
ack the INITSYSTEM stuff?
I can see it might be useful to select the "devel" build, maybe using
"make rpm-devel" that will then run rpmbuild --define with_development=1
to get a version with full debug and electric fence.
I did not port over the support for RPM_BUILD_CLEAN in "make rpm"
because it breaks the subsequent build by deleting the source files
(ikev*fax.bz2) when done.
I'm thinking we might want to rename the "make install-testing-rpm-dep"
into something easier to remember, as I don't think it is a good idea to
run this as dependency for "make rpm" as it tries to install and update
many rpms :)
To run namespace tests on your local fedora/centos/rhel clone, it should work by doing:
1) install the libreswan rpm.
You can install your distro's libreswan package (if >= 3.30) or create
one from the git tree using:
# if you installed in /usr/local, clean that up first
# rm -rf /usr/local/libexec/ipsec /usr/local/sbin
# install the resulting rpm, eg:
sudo rpm -Uhv /home/paul/RPMS/x86_64/libreswan-3.28-0.rc827_gc9aa82b8a6_master.x86_64.rpm
Now it should be possible to run a namespace based test (not all tests are supported yet!)
Thanks to Antony for his work on this!
More information about the Swan-dev