As the Cython bindings build to a binary module, backwards compatibility with
older librbd ABIs at runtime is not possible, so depend on at least the same
version (or newer).
Signed-off-by: Hector Martin <marcan@marcan.st>
To support more than one set of local-* rules, break them out into
sub-rules referenced by appending to variables. This will be used
when introducing the Cython-based librbd bindings that rely on
setup.py
Signed-off-by: Hector Martin <marcan@marcan.st>
To prepare for the migration of rbd.py to Cython, add Cython as a package
dependency and have the configure script look for it.
Also adds Cython as a dependency for admin/build-doc, and changes the
virtualenv to allow usage of system packages (to avoid having to compile
Cython inside the virtualenv).
With contributions by Josh Durgin <jdurgin@redhat.com>
Signed-off-by: Hector Martin <marcan@marcan.st>
This is what autotools does with AC_FUNC_STRERROR_R bit. It takes us
from
$ monmaptool --print nonexistant
monmaptool: monmap file nonexistant
monmaptool: couldn't open nonexistant: (2)
to
$ monmaptool --print nonexistant
monmaptool: monmap file nonexistant
monmaptool: couldn't open nonexistant: (2) No such file or directory
on cmake - otherwise we end up using GNU-specific version as if it was
the POSIX version.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
The INSTALL file has obsolete and misleading instructions to compile
from sources (-pg actually fails at link time). Replace with links to
the online installation and build from source documentations.
Signed-off-by: Loic Dachary <loic@dachary.org>
Since xlist clear method invoked below is enough to disassociate the xlist
item from the xlist, so the remove_myself() call in the destructor is safe
to invoke since it's already been removed from the list.
Signed-off-by: Haomai Wang <haomai@xsky.com>
The code has a catch clause for that, but it was being rendered useless
by the preceding
if (command_spec.size() > matching_spec->size())
positional_options.add(at::POSITIONAL_ARGUMENTS.c_str(), -1);
which names all (both expected and extraneous) positional arguments.
Change it to name only expected arguments, deriving the number of
expected arguments from the length of positional_opts vector, supplied
by each action. This works for all actions except "feature enable" and
"feature disable" which are specified as multitoken, so keep on passing
in -1 for those.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Don't append an extra newline after program_options-generated errors,
like "unrecognised option" or "the argument for option is invalid".
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Fixup the exit code - the old CLI tried to differentiate between CLI
errors and action errors by returning EXIT_FAILURE in the former case.
Also remove a test that relied on a special case check in the old CLI.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>