Commit Graph

174 Commits

Author SHA1 Message Date
Richard W.M. Jones
307c83177c Update copyright dates for 2016.
Run the following command over the source:

  perl -pi.bak -e 's/(20[01][0-9])-2015/$1-2016/g' `git ls-files`
2016-01-02 21:19:51 +00:00
Richard W.M. Jones
a2edda266e build: Make 'make clean' remove more files.
Remove man pages and other pages which 'make clean' did not remove
before.

To evaluate which pages could be removed, I did a full build and
check, and then ran 'make clean' followed by 'git clean -xdf'.  By
examining the output of the git clean command I could see which files
were being missed.

Files that are _not_ removed by make clean or make distclean:

 - generator-built files

 - Makefile, Makefile.in, .deps, .depend

 - any ./configure output files (maybe they should be?)
2015-11-03 13:53:37 +00:00
Richard W.M. Jones
47b095b928 website: Put website into a separate directory.
Move the random set of HTML files we build from html/ into
the website/ directory.

Also in the website/ directory, put the index.html file from
http://libguestfs.org, which was previously not under version control.
It is generated from index.html.in so we can automatically add the
current version and release date.

Also in the website/ directory, put various CSS file, images, etc.
which are required by the website and were also previously not under
version control.

Change the 'make website' rule to 'make maintainer-upload-website'.
As the name suggests, it is only useful for the maintainer, and will
fail with an error for anyone else.
2015-10-31 17:09:29 +00:00
Richard W.M. Jones
538c5d5eb7 java: Only build the tests when running 'make check'.
Make the tests 'check_DATA' so they only get built when running the
tests.
2015-09-30 13:33:39 +01:00
Richard W.M. Jones
533901409e pod: Use F<> for filenames instead of C<>.
Done using a sequence of regular expressions like this:

  perl -pi.bak -e 's{C</}{F</}g' `git ls-files \*.pod` generator/actions.ml
  perl -pi.bak -e 's{C<C:\\}{F<C:\\}g' `git ls-files \*.pod` generator/actions.ml
  [etc]

and then tediously checking every change by hand.
2015-06-15 15:42:46 +01:00
Hu Tao
f265371868 New API: btfs_scrub_status
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-02-16 18:05:30 +00:00
Hu Tao
88dbae4cbf New API: btrfs_balance_status
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-02-16 18:05:30 +00:00
Pino Toscano
4905d6eb95 Revert "java: Turn off doclint to prevent errors on JDK 8"
The errors will be fixed for good, together will other small javadoc
improvements.

This reverts commit 8940b03658.
2015-02-11 15:02:56 +01:00
Margaret Lewicka
8940b03658 java: Turn off doclint to prevent errors on JDK 8
On JDK 8, doclint is enabled by default with strict validation of HTML
tags, which causes the build to fail. See
http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html
2015-02-11 13:49:47 +00:00
Richard W.M. Jones
9d9ef2960c Version 1.29.20. 2015-01-17 11:45:31 +00:00
Richard W.M. Jones
c5800dc97d Update copyright dates for 2015. 2015-01-17 09:08:15 +00:00
Hu Tao
2b7f7810ed New API: btrfs_qgroup_show
btrfs_qgroup_show shows all qgroups on a btrfs filesystem.

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
2014-12-15 16:22:46 +00:00
Richard W.M. Jones
8664337cc3 New APIs: Implement stat calls that return nanosecond timestamps (RHBZ#1144891).
The existing APIs guestfs_stat, guestfs_lstat and guestfs_lstatlist
return a stat structure that contains atime, mtime and ctime fields
that store only the timestamp in seconds.

Modern filesystems can store timestamps down to nanosecond
granularity, and the ordinary glibc stat(2) wrapper will return these
in "hidden" stat fields:

  struct timespec st_atim;            /* Time of last access.  */
  struct timespec st_mtim;            /* Time of last modification.  */
  struct timespec st_ctim;            /* Time of last status change.  */

with the following macros defined for backwards compatibility:

  #define st_atime st_atim.tv_sec
  #define st_mtime st_mtim.tv_sec
  #define st_ctime st_ctim.tv_sec

It is not possible to redefine guestfs_stat to return a longer struct
guestfs_stat with room for the extra nanosecond fields, because that
would break the ABI of guestfs_lstatlist as it returns an array
containing consecutive stat structs (not pointers).  Changing the
return type of guestfs_stat would break API.  Changing the generator
to support symbol versioning is judged to be too intrusive.

Therefore this adds a new struct (guestfs_statns) and new APIs:

  guestfs_statns
  guestfs_lstatns
  guestfs_lstatnslist

which return the new struct (or array of structs in the last case).

The old APIs may of course still be used, forever, but are deprecated
and shouldn't be used in new programs.

Because virt tools are compiled with -DGUESTFS_WARN_DEPRECATED=1, I
have updated all the places calling the deprecated functions.  This
has revealed some areas for improvement: in particular virt-diff and
virt-ls could be changed to print the nanosecond fields.

FUSE now returns nanoseconds in stat calls where available, fixing
https://bugzilla.redhat.com/show_bug.cgi?id=1144891

Notes about the implementation:

- guestfs_internal_lstatlist has been removed and replaced by
  guestfs_internal_lstatnslist.  As the former was an internal API no
  one should have been calling it, or indeed can call it unless they
  start defining their own header files.

- guestfs_stat and guestfs_lstat have been changed into library-side
  functions.  They, along with guestfs_lstatlist, are now implemented
  as wrappers around the new functions which just throw away the
  nanosecond fields.
2014-09-22 15:47:48 +01:00
Richard W.M. Jones
c4dc70f8c4 podwrapper: Remove =encoding from input files and add it back in podwrapper.
This changes podwrapper so that the input (POD) files should not
contain an =encoding directive.  However they must be UTF-8.
Podwrapper then adds the '=encoding utf8' directive back during final
generation.

This in particular avoids problems with nested =encoding directives in
fragments.  These break POD, and are undesirable anyway.
2014-03-20 13:47:19 +00:00
Richard W.M. Jones
29440e2fbc java: Complete test suite. 2014-03-08 12:47:44 +00:00
Richard W.M. Jones
6fa9e5dac7 java: Document how to compile and run Java programs. 2014-03-08 12:29:00 +00:00
Richard W.M. Jones
2b3131cf40 java: Document how to use optional parameters in the guestfs-java(3) man page. 2014-03-08 12:13:46 +00:00
Richard W.M. Jones
1ba2e3e14a java: Add regression test for RStruct/RStructList (RHBZ#1073906). 2014-03-07 15:53:59 +00:00
Richard W.M. Jones
6aa64ee3a3 java: run: Add java/.libs to LD_LIBRARY_PATH so JVM finds the right JNI file. 2014-03-07 15:53:59 +00:00
Richard W.M. Jones
2954541fdd java: Avoid warnings in the tests and examples.
Avoid warnings about missing serial version, and fix a warning about
raw types.
2014-02-13 17:48:23 +00:00
Richard W.M. Jones
6c971faecf Update copyright dates for 2014. 2014-01-02 16:53:34 +00:00
Richard W.M. Jones
f59a404568 Revert "java: Remove version number from the jar file (RHBZ#1022184)."
This reverts commit 7330ccd288.

See comment in https://bugzilla.redhat.com/1022184
2013-10-22 17:56:11 +01:00
Richard W.M. Jones
7330ccd288 java: Remove version number from the jar file (RHBZ#1022184). 2013-10-22 17:44:33 +01:00
Richard W.M. Jones
d9008e141c build: Add missing EXTRA_DIST files. 2013-10-14 18:21:54 +01:00
Richard W.M. Jones
92e1864913 events: Add a warning event and direct all warning messages through it.
This also causes warnings to be printed even in non-verbose mode,
which is useful.
2013-10-11 15:34:23 +01:00
Richard W.M. Jones
532117de29 javadoc: Install javadoc in $(datadir)/javadoc/libguestfs (without -java-$(version)).
Apparently this is the normal place for javadoc, and not
where we installed it before.
2013-08-28 18:45:14 +01:00
Richard W.M. Jones
14fabcd88e tests: Use new guestfs_add_drive_scratch API where possible in tests.
Replaces code such as:

  fd = open "test1.img"
  ftruncate fd, size
  close fd
  g.add_drive "test1.img"

with the shorter and simpler:

  g.add_drive_scratch size
2013-07-20 16:31:42 +01:00
Richard W.M. Jones
06f2c1ad70 golang: Add examples and guestfs-golang(3) man page. 2013-07-04 15:48:47 +01:00
Richard W.M. Jones
8f504539f2 java: Fix typo in comment. 2013-07-04 13:11:45 +01:00
Richard W.M. Jones
667b303c9a java: Fix comment in test script. 2013-07-01 15:27:22 +01:00
Richard W.M. Jones
49bdaabc7d build: Add common-rules.mk, common rules for all Makefiles.
This file is mainly a central place to:

 - include localenv if it exists, and

 - define the RHEL 5 backwards compatibility macros, instead of
   spreading them over every other file.
2013-06-04 12:41:11 +01:00
Richard W.M. Jones
02fbf566e8 java: Standardize Java test numbering. 2013-05-01 08:38:40 +01:00
Richard W.M. Jones
a1e51676fd Remove many uses of $(builddir).
"$(builddir)" is always "."

Therefore most uses of $(builddir) are suspect and should be
removed or replaced with "."
2013-04-25 12:22:31 +01:00
Richard W.M. Jones
aab50b9c50 java: Allow source directory to be prepended by make.
Fix for separated builds.
2013-04-25 12:22:31 +01:00
Richard W.M. Jones
1d252d7149 java: Bindtests.java is generated in the source directory.
Fix for separated builds.
2013-04-25 12:22:31 +01:00
Richard W.M. Jones
88271bab7c configure: Make sure that certain build directories exist.
When builddir != srcdir, this ensures that certain build directories
which might not exist are created by configure.
2013-04-25 12:22:31 +01:00
Richard W.M. Jones
6fa1177b0a java: Make test cases depend on jar file.
This fixes parallel builds.  The error you would have seen was:

  error: error reading libguestfs-1.21.25.jar; zip file is empty
2013-04-01 20:29:17 +01:00
Richard W.M. Jones
1a2e03c323 java: 'make clean' should remove whole api/ directory.
This directory (containing HTML documentation) can be removed
completely when making clean.  CLEANFILES cannot recursively remove a
directory, so use a clean-local rule instead.
2013-04-01 20:28:16 +01:00
Richard W.M. Jones
f55a2dbf29 java: Make bindtests depend on jar file so parallel builds work.
This fixes commit c36ced5e21.
2013-03-29 22:02:46 +00:00
Richard W.M. Jones
c50cde67cc java: Format CLEANFILES rule. 2013-03-28 20:24:25 +00:00
Richard W.M. Jones
c36ced5e21 java: Enable parallel builds.
This reverts commit 89404ec0ba.
2013-03-28 20:20:09 +00:00
Richard W.M. Jones
09c4f94c9d build: Separate out *_CPPFLAGS from *_CFLAGS.
This is pretty pointless.
2013-02-11 21:36:27 +00:00
Richard W.M. Jones
0d18a8b407 Update copyright dates for 2013. 2013-02-02 13:56:19 +00:00
Matthew Booth
27b995c841 Make internal-only functions and structures private
Certain functions are intended to be internal only, but we currently
export them anyway. This change moves them into a separate section of
guestfs.h protected by a GUESTFS_PRIVATE variable. This change also
enables private structs, but doesn't implement any.

This change only affects the C api. Language bindings aren't affected,
but probably should be in the future.
2013-01-30 17:27:01 +00:00
Richard W.M. Jones
0d2d26d8e7 java: Implement the event API. 2013-01-15 18:40:17 +00:00
Richard W.M. Jones
05a67bcc25 java: Change synopsis in man page to show use of add_drive. 2013-01-15 18:40:16 +00:00
Richard W.M. Jones
7d89baa3e9 java: Tidy up javadoc. 2013-01-15 18:40:16 +00:00
Richard W.M. Jones
20e23ab2a3 Update copyright dates for 2013.
On generated files in git and README.
2013-01-15 18:40:16 +00:00
Richard W.M. Jones
62e775c350 Change the handling of private functions, safe_malloc etc.
Rename guestfs_safe_malloc et al to guestfs___safe_malloc etc.

To use the private functions, code now has to define
-DGUESTFS_PRIVATE_FUNCTIONS=1.  This will make it easier for us in
future to work out which programs are using these functions and to
minimize both the number of programs and the functions they are
calling.

Note that the Perl, Python, OCaml, Ruby and Java bindings use
guestfs_safe_* calls.  None of the other bindings do.  This is a bug
(in the bindings using those functions): these functions will call the
out of memory callback on failure.  This function defaults to abort(),
and since this happens from a language binding, there is no way to
change this default.
2012-12-15 19:41:29 +00:00
Richard W.M. Jones
ff8bfd3e92 Add Lua bindings.
These are relatively complete, although only lightly tested.  Missing:

 - events
 - last_errno
 - user_cancel
2012-11-17 20:02:42 +00:00