34 Commits

Author SHA1 Message Date
Richard W.M. Jones
a57f6b8e2c gobject: Mark the gobject bindings as deprecated
They will be removed in libguestfs 1.58 (the next but one version).
Currently they don't actually compile.  The larger problem is that
they don't handle 64 bit quantities properly (using floats instead),
meaning that any disk size or offset above a certain size will be
improperly passed through the API, usually rounded to the nearest
53 bits.
2025-06-10 11:57:55 +01:00
Richard W.M. Jones
75abec1f70 include: Move lib/guestfs.h to include/guestfs.h
This brings libguestfs into line with other projects which have a
separate include/ directory for the public header.

It's also the case that <guestfs.h> has never particularly belonged in
the lib/ subdirectory.  Some tools add -Ilib/ but they only need
<guestfs.h> and not any other headers from that directory, and
separating out the public header allows us to clean those up.  This is
certainly the case for examples, and some language bindings and some
tests.

In future I'm hopeful we can use this as the basis to tease out other
dependencies, as a prelude to separating them out from the repo.
2020-09-21 18:38:28 +01:00
Richard W.M. Jones
c3dd3f51a6 lua, perl: Use thread-safe strerror_r instead of strerror (RHBZ#1536763). 2018-01-22 17:52:46 +00:00
Richard W.M. Jones
f30b2065a2 gobject: Add outline guestfs-gobject(3) manual page.
Since we removed gtk doc, we might as well replace it with a
manual page explaining the basics of how to run gjs.
2017-07-10 17:03:19 +01:00
Richard W.M. Jones
f161c9ea57 Rename src/ to lib/ 2017-01-26 15:05:46 +00:00
Richard W.M. Jones
b53cec584d lib: Move utilities to new directory common/utils.
Just code motion.

This commit makes it clearer what is a utility and what is part of the
library.  It also makes it clear that we should rename:

  guestfs-internal-frontend.h -> utils.h
  guestfs-internal-frontend-cleanups.h -> cleanups.h (?)

but this commit does not make that change.
2017-01-26 15:05:46 +00:00
Richard W.M. Jones
76c0a67d30 build: Add common CLEANFILES and DISTCLEANFILES to common-rules.mk.
By adding common CLEANFILES and DISTCLEANFILES variables to
common-rules.mk, we can remove these from most other Makefiles, and
also clean files more consistently.

Note that bin_PROGRAMS are already cleaned by 'make clean', so I
removed cases where these were unnecessarily added to CLEANFILES.
2016-08-25 16:54:34 +01:00
Richard W.M. Jones
dd7be596f5 tests: Remove bogus use of $(VG). 2016-02-22 17:55:13 +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
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
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
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
27e6347b75 lua: Use guestfs___free_string_list instead of custom-coded version. 2013-02-20 22:18: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
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
2434a86da4 lua: tests: If $LUA is not set, set it to 'lua' instead of '/usr/bin/lua'. 2012-12-18 08:55:06 +00:00
Richard W.M. Jones
3f88f88c80 lua: Fix misapplied patch.
This fixes commit 5b70120293.
2012-12-18 08:53:34 +00:00
Hilko Bengen
5b70120293 lua: Use correct binary for tests 2012-12-17 22:24:53 +01:00
Hilko Bengen
05103cc693 lua: Use pkg-config to determine Lua version, parameters 2012-12-17 22:24:52 +01:00
Richard W.M. Jones
12905a9bbb lua: valgrinding Lua code doesn't work.
See comment.
2012-11-20 18:31:45 +00:00
Richard W.M. Jones
1f98450995 lua: Attach __tostring functions exceptions.
This includes a test.
2012-11-20 17:32:37 +00:00
Richard W.M. Jones
ca488a6d7b lua: Various fixes to the bindings (thanks Jerome Vuarand).
See http://article.gmane.org/gmane.comp.lang.lua.general/95065

Note that this is incompatible with existing code.  You
have to do:

  local G = require "guestfs"
  local g = G.create ()

ie. give the module your own name ("G" in that example).
2012-11-20 16:34:23 +00:00
Richard W.M. Jones
7f1f7dd44f lua: Add bindtests. 2012-11-20 14:11:47 +00:00
Richard W.M. Jones
fdfdc883fc lua: Document Guestfs.event_all. 2012-11-19 18:19:29 +00:00
Richard W.M. Jones
e866ee7c79 erlang, lua: Fix links in man pages. 2012-11-19 18:16:08 +00:00
Richard W.M. Jones
556fc92e8a lua: Test globals in Guestfs.* namespace. 2012-11-19 17:13:14 +00:00
Richard W.M. Jones
bc03a48c71 lua: Add global Guestfs.event_all (list of all events). 2012-11-19 17:11:27 +00:00
Richard W.M. Jones
f77ddb9e11 lua: Various fixes and enhancements:
- add support for events (with test)
- test progress messages
- update documentation to describe events
- refactor handle closing code
- refactor error code
- use 'assert' in test code instead of 'if ... then error end'
2012-11-19 14:01:40 +00:00
Richard W.M. Jones
6e5916e0f4 lua: examples: Boolean true shouldn't have quotes around it. 2012-11-18 19:24:20 +00:00
Richard W.M. Jones
6483c506b9 lua: Add another test to prove that the handles are really independent. 2012-11-18 16:45:44 +00:00
Richard W.M. Jones
4ba8b5a00d lua: Add some missing features.
- Remove default error handler.
- User cancel.
- Add the errno to the object which is thrown on error.

Still no events.
2012-11-17 21:28:43 +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