Proposal to start tagging releases in git with v<VERSION>
by Richard W.M. Jones
For historical reasons that don't really matter now, we currently
tag all releases with just the version number, eg:
commit 6b48977cb7100e4f214b189052d4f0bf61523d11 (HEAD -> master, tag: 1.33.26, origin/master, origin/HEAD)
Author: Richard W.M. Jones <rjones(a)redhat.com>
Date: Tue May 3 14:49:59 2016 +0100
Version 1.33.26.
Of course this isn't the way that git versions are normally tagged.
The normal convention is to use "v<VERSION>" (eg. "v1.33.26").
I propose that I start tagging new releases this way (see the patch
below). This shouldn't be controversial.
The question is should I tag new releases with the "old style" tags?
I'd prefer not to. Should I go back and add "v<VERSION>" tags to all
the old releases? Again, I'd prefer not to, but could do that if
anyone thinks it's necessary.
Rich.
>From fe9493a5a0dd34d5f3ffc1f5dbe76a8724011225 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones(a)redhat.com>
Date: Tue, 3 May 2016 21:25:54 +0100
Subject: [PATCH] Tag versions with "v<VERSION>" instead of just the version
number.
This is the normal convention used for tagging git releases.
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index f4520c8..cef9129 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -524,7 +524,7 @@ maintainer-commit:
# Tag HEAD with current version (only for maintainer).
maintainer-tag:
- git tag -a $(VERSION) -m "Version $(VERSION) ($(BRANCH_TYPE))" -f
+ git tag -a "v$(VERSION)" -m "Version $(VERSION) ($(BRANCH_TYPE))" -f
# Maintainer only: check EXTRA_DIST rule is complete.
# (Note you must have done 'make dist')
--
2.7.4
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
8 years, 6 months
[PATCH 1/2] inspection: Set package manager to "unknown" if parsing major version failed (RHBZ#1332025).
by Richard W.M. Jones
In cases where parsing the release file failed and so we have an
obviously incorrect major version number, don't try to infer the
package manager from the major version number.
In the bug report, parsing the /etc/redhat-release file of a CentOS
7.1 guest failed, so major version was set to 0, and the package
manager was inferred as "up2date". virt-customize then failed with a
peculiar error:
virt-customize: sorry, don't know how to use --install with the 'up2date' package manager
Instead this sets it to "unknown" which will cause virt-customize to
fail with:
virt-customize: --install is not supported for this guest operating system
which is (only very slightly) better.
Problem reported by novegin on IRC.
---
src/inspect-fs.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/inspect-fs.c b/src/inspect-fs.c
index 0714ae1..7f7d5d1 100644
--- a/src/inspect-fs.c
+++ b/src/inspect-fs.c
@@ -531,8 +531,11 @@ guestfs_int_check_package_management (guestfs_h *g, struct inspect_fs *fs)
guestfs_is_file_opts (g, "/usr/bin/dnf",
GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0)
fs->package_management = OS_PACKAGE_MANAGEMENT_DNF;
- else
+ else if (fs->major_version >= 1)
fs->package_management = OS_PACKAGE_MANAGEMENT_YUM;
+ else
+ /* Probably parsing the release file failed, see RHBZ#1332025. */
+ fs->package_management = OS_PACKAGE_MANAGEMENT_UNKNOWN;
break;
case OS_DISTRO_REDHAT_BASED:
@@ -542,8 +545,11 @@ guestfs_int_check_package_management (guestfs_h *g, struct inspect_fs *fs)
case OS_DISTRO_ORACLE_LINUX:
if (fs->major_version >= 5)
fs->package_management = OS_PACKAGE_MANAGEMENT_YUM;
- else
+ else if (fs->major_version >= 2)
fs->package_management = OS_PACKAGE_MANAGEMENT_UP2DATE;
+ else
+ /* Probably parsing the release file failed, see RHBZ#1332025. */
+ fs->package_management = OS_PACKAGE_MANAGEMENT_UNKNOWN;
break;
case OS_DISTRO_DEBIAN:
--
2.7.4
8 years, 6 months
[PATCH 0/8] python: PEP 8 fixes
by Pino Toscano
Hi,
this series cleans up the Python sources, either static or generated,
including also tests, to make them PEP 8 compliant; see
https://www.python.org/dev/peps/pep-0008/ and tools like pep8.
Almost all the issues reported by pep8 are fixed, reducing the issues
from 3818 to 7.
The changes should have no effect on the actual code, while it will
help Python users with consistency with other Python code.
Thanks,
Pino Toscano (8):
python: PEP 8: adapt whitespaces in lines
python: PEP 8: adapt empty lines
python: PEP 8: remove trailing semicolons
python: PEP 8: break compound statements
python: PEP 8: avoid too long lines
python: PEP 8: miscellaneous indentation fixes
python: PEP 8: avoid whitespace-only lines in docstrings
python: PEP 8: miscellaneous coding fixes
generator/bindtests.ml | 12 ++--
generator/python.ml | 146 ++++++++++++++++++++++++++-------------
generator/python.mli | 8 +++
python/examples/create_disk.py | 36 +++++-----
python/examples/inspect_vm.py | 42 +++++------
python/setup.py.in | 69 +++++++++---------
python/t/test010Load.py | 5 +-
python/t/test070OptArgs.py | 23 +++---
python/t/test080Version.py | 25 +++----
python/t/test090RetValues.py | 142 ++++++++++++++++++-------------------
python/t/test100Launch.py | 25 +++----
python/t/test410CloseEvent.py | 18 ++---
python/t/test420LogMessages.py | 30 ++++----
python/t/test800ExplicitClose.py | 30 ++++----
python/t/test810RHBZ811650.py | 17 ++---
python/t/test820RHBZ912499.py | 58 ++++++++--------
python/t/test910Libvirt.py | 17 ++---
python/t/tests_helper.py | 30 ++++----
tests/http/test-http.py | 143 +++++++++++++++++++-------------------
19 files changed, 473 insertions(+), 403 deletions(-)
--
2.5.5
8 years, 6 months
[PATCH] customize: remove "core" from description of --update
by Pino Toscano
--update invokes a distribution update, updating all the installed
packages and not just some "core" ones.
---
customize/customize_run.ml | 2 +-
generator/customize.ml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/customize/customize_run.ml b/customize/customize_run.ml
index 82c4edd..83e70a6 100644
--- a/customize/customize_run.ml
+++ b/customize/customize_run.ml
@@ -320,7 +320,7 @@ exec >>%s 2>&1
g#touch path
| `Update ->
- message (f_"Updating core packages");
+ message (f_"Updating packages");
let cmd = guest_update_command () in
do_run ~display:cmd cmd
diff --git a/generator/customize.ml b/generator/customize.ml
index 55ee252..3d3f978 100644
--- a/generator/customize.ml
+++ b/generator/customize.ml
@@ -427,7 +427,7 @@ This command performs a L<touch(1)>-like operation on C<FILE>.";
{ op_name = "update";
op_type = Unit;
op_discrim = "`Update";
- op_shortdesc = "Update core packages";
+ op_shortdesc = "Update packages";
op_pod_longdesc = "\
Do the equivalent of C<yum update>, C<apt-get upgrade>, or whatever
command is required to update the packages already installed in the
--
2.5.5
8 years, 6 months
[PATCH] mllib: add "internal" to the description of --{short, long}-options
by Pino Toscano
The Arg module of OCaml does not support hiding options from the --help
output: hence, mark --short-options and --long-options as internal
options, since we need them only for the bash completion scripts.
---
mllib/common_utils.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 3d6eb94..db8a298 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -575,8 +575,8 @@ let set_standard_options argspec =
let set_debug_gc () =
at_exit (fun () -> Gc.compact()) in
let argspec = [
- "--short-options", Arg.Unit display_short_options, " " ^ s_"List short options";
- "--long-options", Arg.Unit display_long_options, " " ^ s_"List long options";
+ "--short-options", Arg.Unit display_short_options, " " ^ s_"List short options (internal)";
+ "--long-options", Arg.Unit display_long_options, " " ^ s_"List long options (internal)";
"-V", Arg.Unit print_version_and_exit,
" " ^ s_"Display version and exit";
"--version", Arg.Unit print_version_and_exit,
--
2.5.5
8 years, 6 months
[PATCH 1/2] Revert "php: Fix the tests ... again."
by Richard W.M. Jones
This reverts commit 0d69eab98f0bd5dd2d218ce5adcafdeb13f9d90d.
---
php/run-php-tests.sh | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/php/run-php-tests.sh b/php/run-php-tests.sh
index 80758bd..e5cfc0d 100755
--- a/php/run-php-tests.sh
+++ b/php/run-php-tests.sh
@@ -28,13 +28,10 @@ cd extension
# won't get passed down to the script. Furthermore, setting debug or
# trace isn't very useful anyway because the PHP test script mixes
# stdout and stderr together and compares this to the expected output,
-# so you'd just get failures for every test.
-#
-# So there is no good way to debug libguestfs failures in PHP tests,
-# but if an individual test fails and you want to find out more, you
-# can comment out the following two 'unset' statements. The tests
-# will definitely fail if you do this, but you will be able to see the
-# debug output in the '*.out' files.
+# so you'd just get failures for every test. So there is no good way
+# to debug libguestfs failures in PHP tests, but if an individual test
+# fails locally then you can edit the guestfs_php_*.phpt.in and
+# uncomment the putenv statement, then look at the output.
unset LIBGUESTFS_DEBUG
unset LIBGUESTFS_TRACE
@@ -47,8 +44,4 @@ printenv | grep -E '^(LIBGUESTFS|LIBVIRT|LIBVIRTD|VIRTLOCKD|LD|MALLOC)_' >> env
TESTS=$(echo tests/guestfs_*.phpt)
echo TESTS: $TESTS
-${MAKE:-make} test \
- TESTS="$TESTS" \
- TEST_PHP_EXECUTABLE="$PWD/php-for-tests.sh" \
- REPORT_EXIT_STATUS=1 \
- TEST_TIMEOUT=300
+${MAKE:-make} test TESTS="$TESTS" PHP_EXECUTABLE="$PWD/php-for-tests.sh" REPORT_EXIT_STATUS=1 TEST_TIMEOUT=300
--
2.7.4
8 years, 6 months
[PATCH v6 0/5] New API: filesystem_walk
by Matteo Cafasso
v6:
- added metadata reallocation flag in tsk_flags
Certain filesystems separate file name structures and metadata ones.
Therefore, deleted entries with file name structures in an
unallocated state might point to metadata structures which have been
reallocated to new files. A flag set to 1 is generally an indication
that the information gathered from the metadata structure (file size
and file type) might refer to a different file.
It might make sense to expose the constant values to the user so he/she
can use them for bitwise comparison. Yet I have not found any example
within the code so I preferred to stick to the suggestion to simply
document the values.
Patch ready for review. Code available at:
https://github.com/noxdafox/libguestfs/tree/filesystem_walk
Matteo Cafasso (5):
generator: Added tsk_dirent struct
configure: Added libtsk compile-time check
New API: internal_filesystem_walk
New API: filesystem_walk
lib: Added filesystem_walk command tests
daemon/Makefile.am | 4 +-
daemon/tsk.c | 249 ++++++++++++++++++++++++++++++++++++++
docs/guestfs-building.pod | 4 +
generator/actions.ml | 117 ++++++++++++++++++
generator/structs.ml | 13 ++
m4/guestfs_daemon.m4 | 8 ++
src/MAX_PROC_NR | 2 +-
src/Makefile.am | 1 +
src/tsk.c | 123 +++++++++++++++++++
tests/tsk/Makefile.am | 3 +-
tests/tsk/test-filesystem-walk.sh | 64 ++++++++++
11 files changed, 585 insertions(+), 3 deletions(-)
create mode 100644 daemon/tsk.c
create mode 100644 src/tsk.c
create mode 100755 tests/tsk/test-filesystem-walk.sh
--
2.8.1
8 years, 6 months