78 Commits

Author SHA1 Message Date
Richard W.M. Jones
72cfaff5c5 Update copyright dates for 2025
Automated using this command:

perl -pi.bak -e 's/(20[012][0-9])-20[12][01234]/$1-2025/g' `git ls-files`
2025-02-16 17:00:46 +00:00
Richard W.M. Jones
e2c7bddf10 Update copyright dates for 2023
Run this command across the source:

  perl -pi.bak -e 's/(20[012][0-9])-20[12][012]/$1-2023/g' `git ls-files`

and remove changes to po{,-docs}/*.po{,t} (these will be regenerated
later when we run 'make dist').
2023-02-07 10:50:48 +00: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
0e17236d7d Update copyright dates to 2020. 2020-03-06 19:32:32 +00:00
Richard W.M. Jones
05d4fcb64d Update copyright dates for 2019.
This command run over the source:

perl -pi.bak -e 's/(20[01][0-9])-2018/$1-2019/g' `git ls-files`
2019-01-08 11:58:30 +00:00
Richard W.M. Jones
56f1e6cecd java: Link with gnulib to resolve missing hash_free symbol. 2018-08-28 22:24:46 +01:00
Pino Toscano
662dc5d0bf java: support OpenJDK 10+
Starting OpenJDK 10, the 'javah' utility is no more provided [1], and
its functionality is provided by 'javac' itself.  Hence, do not error
out on missing 'javah', and store whether it was found; in case it is
not, then:
1) assume 'javac' has the -h parameter to generate the C header, and
   make use of it
2) tell the buildsystem that com_redhat_et_libguestfs_GuestFS.h depends
   on the JAR, since the the header is generated at the step (1)

[1] https://bugs.java.com/view_bug.do?bug_id=JDK-8182758
2018-05-06 23:35:50 +02:00
Richard W.M. Jones
212762c593 Update copyright dates for 2018.
Run the following command over the source:

  perl -pi.bak -e 's/(20[01][0-9])-2017/$1-2018/g' `git ls-files`
2018-01-04 15:30:10 +00:00
Richard W.M. Jones
5efebd8c7e utils: Split out structs cleanups and printing into common/structs.
These won't be used by the daemon, so interferes with us using
common/utils in the daemon, so they are moved to a different library.
2017-07-10 17:01:59 +01:00
Pino Toscano
eeacc86a10 java: link libguestfs_jni against libutils
The JNI library uses CLEANUP_FREE macros, whose functions are built in
the internal libutils.  Currently, trying to use functions that use
CLEANUP_FREE variables will cause the java execution to stop with a
symbol lookup error (for guestfs_int_cleanup_free).
2017-03-03 16:36:26 +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
Pino Toscano
55bf7de97c Update copyright dates for 2017
Run the following command over the source:

  perl -pi.bak -e 's/(20[01][0-9])-2016/$1-2017/g' `git ls-files`

(Thanks Rich for the perl snippet, as used in past years.)
2017-01-03 16:48:21 +01:00
Richard W.M. Jones
76eee79a65 java: Split up large Java extension into smaller C files. 2016-09-02 23:14:08 +01: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
Pino Toscano
5991ce1c2a build: add silent rules for jar 2016-08-18 13:00:27 +02:00
Pino Toscano
0b94c4d3bb build: add simple custom silent rules for automake
Add makefile variables to enable silent rules for simple command
invocations, such as ocamlc, ocamlopt, javac, and erlc.

This reduces the log output when building with silent rules, still
showing the full command lines otherwise.
2016-08-04 16:18:33 +02:00
Richard W.M. Jones
2a48a6591f java: Stop using the safe_malloc, etc. functions. 2016-02-05 13:16:22 +00:00
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
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
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
c5800dc97d Update copyright dates for 2015. 2015-01-17 09:08:15 +00:00
Richard W.M. Jones
29440e2fbc java: Complete test suite. 2014-03-08 12:47:44 +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
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
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
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
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
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
7a691e6665 java: Set '-encoding utf8' for javac and javadoc commands. 2012-07-23 15:24:07 +01:00
Richard W.M. Jones
7f519bdc06 java: JAVAC_FLAGS -> EXTRA_JAVAC_FLAGS.
This is just a rename.
2012-07-23 15:18:12 +01:00
Richard W.M. Jones
8439e97f76 java: Use run --tests for tests.
Java-specific environment variables are set in the run script.
2012-06-28 13:40:33 +01:00
Richard W.M. Jones
50aa9533e4 build: Define builddir and abs_srcdir when they are missing.
RHEL 5-era autoconf did not define these, so define them manually
when they are missing.

Define builddir as '.'  The scripts require this.  It won't work
in the srcdir != builddir case, but we don't care about that for
RHEL 5.

This commit also moves the builddir / abs_srcdir variable setting
above the include of subdir-rules.mk, in case that include uses
these variables.

Useful script:

  for f in $(find -name Makefile.am | xargs fgrep '$(abs_srcdir)' -l) ; do
    if ! grep -q '^abs_srcdir' $f; then
      echo missing in $f
    fi
  done
2012-06-18 15:32:47 +01:00