Commit Graph

103 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
95de3f6c50 golang: Fix bindings for golang 1.16.
See https://blog.golang.org/go116-module-changes
2021-04-08 12:55:19 +01:00
Richard W.M. Jones
bfd0886765 golang: Fix path to include/guestfs.h.
Thanks: Martin Kletzander
Fixes: commit 75abec1f70
2020-10-06 15:26:14 +01:00
Richard W.M. Jones
bf61bf7355 build: Allow OCaml programs using libguestfs to be compiled against build dir.
You have to use:
  ../libguestfs/run ./configure
  ../libguestfs/run make

Use of the second ../libguestfs/run against make is unfortunate but I
believe it's unavoidable due to the way that ocamlfind works.
2020-03-12 10:08:23 +00:00
Richard W.M. Jones
e33b3c83a0 build: Allow C programs using libguestfs to be compiled against build dir.
We use a similar trick to libvirt to allow external C programs that
use libguestfs to be compiled against the built (but not installed)
libguestfs with:

  ../libguestfs/run ./configure
  make

What actually happens is we have a second pkg-config file
(lib/local/libguestfs.pc) which points to the locally built
libguestfs.  The ./run script sets up PKG_CONFIG_PATH to point to this
directory.  Assuming that ./configure is using pkg-config/pkgconf and
not some other half-baked solution it will pick up the libguestfs.pc
file from here which will set CFLAGS and LIBS appropriately.
2020-03-12 10:05:39 +00:00
Richard W.M. Jones
0e17236d7d Update copyright dates to 2020. 2020-03-06 19:32:32 +00:00
Richard W.M. Jones
85c99edec1 v2v: Remove virt-v2v.
It has moved to a new repository:
https://github.com/libguestfs/virt-v2v
2019-11-13 12:49:55 +00:00
Tomáš Golembiovský
644a6e4637 build: define CGO_CFLAGS_ALLOW with -U option we need
cgo does not allow arbitrary CFLAGS to be used. Instead it contains a
list of flags (safelist) that are allowed to be passed to the compiler.
Sadly -U option (introduced in commit d8d8c856a1) is not among them.

See: https://github.com/golang/go/issues/23672

Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
2019-10-07 22:08:49 +01:00
Pino Toscano
dea9636c59 Remove remaining virt-p2v bits
Remove (almost) all the remaining bits related to virt-p2v.
2019-09-10 17:52:16 +02:00
Hiroyuki_Katsura
3bbd00c83e Rust bindings: Add Rust bindings
This patch includes Actions and their tests. Missing:

- Events
- Examples

Rust bindings: Add create / close functions

Rust bindings: Add 4 bindings tests

Rust bindings: Add generator of structs

Rust bindings: Add generator of structs for optional arguments

Rust bindings: Add generator of function signatures

Rust bindings: Complete actions

Rust bindings: Fix memory management

Rust bindings: Add bindtests

Rust bindings: Add additional 4 bindings tests

Rust bindings: Format test files

Rust bindings: Incorporate bindings to build system
2019-07-29 10:28:31 +01: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
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
f161c9ea57 Rename src/ to lib/ 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
Hilko Bengen
eecb1d8177 run.in: Quote contents of @VAR@ substitutions 2016-10-27 21:35:57 +02:00
Richard W.M. Jones
eb364b15eb build: ./run is documented in guestfs-building(1), not README. 2016-04-09 21:11:14 +01:00
Richard W.M. Jones
085815ce10 build: Describe how to set up check-valgrind rules correctly.
Since we enabled parallel tests, you can no longer run tests
under valgrind merely by doing:

  TESTS_ENVIRONMENT = $(top_builddir)/run --test $(VG)
  check-valgrind:
      $(MAKE) check VG="@VG@"

The reason is that the parallel tests framework doesn't run
``$(TESTS_ENVIRONMENT) <test>''.  It inserts some other processes in
between the environment and the test, so you end up valgrinding some
unrelated process (currently the 'env' program).

In run.in, remove out of date documentation for using $(VG).
In guestfs-hacking(1), document how to do it properly.
2016-02-22 17:55:13 +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
c0a781ed9a build: Drop serial_tests.
Use (implicitly) parallel tests on new enough automake.  The tests run
a bit quicker with this change.  On my laptop, I measured 27 mins down
to 18 mins.

Change the ./run function so that ./run --test no longer spools the
test output to a file.  That is not necessary when using parallel
tests, since the test harness does the same thing.

Note: This commit removes the $RUN_OUTPUT_FILE functionality.  We will
change the CI integration in a future commit so it uses the .trs and
.log files.
2015-11-06 16:11:44 +01:00
Richard W.M. Jones
8554dbbc03 Remove multiple hacks that only apply to RHEL 5.
We don't support RHEL 5 upstream (see the 'oldlinux' branch for a
version that works with RHEL 5).  Therefore remove a bunch of hacks
that were only needed on RHEL 5.
2015-10-05 14:32:28 +01:00
Pino Toscano
85fe0abdd0 New tool: virt-dib
virt-dib is a new tool to run the elements of diskimage-builder using
libguestfs.
2015-07-09 14:55:43 +02:00
Pino Toscano
1183809f4d (Almost) new tool: virt-get-kernel
Extract the guest kernel/ramdisk extraction from virt-builder into a
separate utility, so it can be used and improved without cluttering
virt-builder.

Currently it does what virt-builder --get-kernel did, adding also the
options for remote disks and libvirt access, much like other libguestfs
tools.

virt-builder --get-kernel now just spawns virt-get-kernel.
2015-06-15 18:07:03 +02:00
Richard W.M. Jones
cae7909f5e ./run: Use 'prepend' function to build paths.
Add a bash function 'prepend' for intelligently prepending elements to
paths.  eg:

  prepend PYTHONPATH "/foo"

would set PYTHONPATH to "/foo" or "/foo:<previous-contents-of-PYTHONPATH>"

Tested by:

(1) Building and testing libguestfs twice: first without libguestfs
installed as a system library, and then with it installed.

(2) Examining the output of './run printenv' by hand and comparing
environment variables to the expected values.
2015-02-13 10:26:22 +00:00
Margaret Lewicka
cc4baac815 run: Set DYLD_LIBRARY_PATH along with LD_LIBRARY_PATH
Mac OS X uses DYLD_LIBRARY_PATH rather than LD_LIBRARY_PATH.
2015-02-13 08:55:43 +00:00
Richard W.M. Jones
c5800dc97d Update copyright dates for 2015. 2015-01-17 09:08:15 +00:00
Pino Toscano
3de9fa7ba9 build: use $(SED) instead of sed when possible
Make use of the sed executable set at configure time.
2014-10-23 19:03:12 +02:00
Richard W.M. Jones
a7147ce9ff run: Add p2v to the PATH. 2014-09-16 08:38:05 +01:00
Richard W.M. Jones
0866d22381 p2v: Add scripts to make disk or kickstart-based P2V ISO.
Two scripts are added, replacing the make targets from the
previous commit:

virt-p2v-make-disk: Builds a virt-p2v disk or USB key using
virt-builder.

virt-p2v-make-kickstart: Builds a kickstart file (only) which can be
fed to livecd-creator or similar tools on Red Hat-derived distros.

Kickstart generation is slightly different: Instead of requiring the
downstream 'libguestfs-pvhelper' package, the kickstart now embeds the
virt-p2v binary(!) making it self-contained and downstream packaging
simpler.

In addition there are documentation changes.
2014-09-06 20:51:54 +01:00
Richard W.M. Jones
b6cb67d958 ./run: chcon the tmp directory in the builddir.
Not just some random tmp directory which happens to be in the
local directory.
2014-08-04 14:51:30 +01:00
Richard W.M. Jones
bcdbe6405c v2v: Add support for converting Windows guests.
This completes commit f296d34f3b.
2014-07-23 17:02:49 +01:00
Richard W.M. Jones
f296d34f3b v2v: Add partial support for converting Windows guests.
This is not yet complete.
2014-07-08 14:11:48 +01:00
Richard W.M. Jones
c62dbb8afd run: Add v2v/ subdirectory to $PATH. 2014-06-23 21:58:08 +01:00
Richard W.M. Jones
c5106511e0 build: Use AC_PROG_AWK to define the right awk to call.
We actually call plain 'awk' in many different scripts, but this
commit does not change all of those.
2014-05-17 11:49:13 +01:00
Richard W.M. Jones
87fcb4df03 Add customize subdirectory to ./run script.
This fixes commit 2b208d84db.
2014-03-25 22:09:14 +00:00
Pino Toscano
56efdb29bf tests: skip the output of test-virt-rescue.pl from RUN_OUTPUT_FILE
The output of test-virt-rescue.pl contains non-ASCII chars which give
troubles when being XSLT-transformed, so just avoid its output to leave
the rest of the resulting XML well-formed.
2014-03-14 13:52:09 +01:00
Pino Toscano
38fbda9d37 tests: provide a simple way to extract the tests data from run
If the RUN_OUTPUT_FILE environment variable is set, "run" will output
to the file indicated by that snippets of XML with the results and
outputs of the tests run.

Together with the run-xml-to-junit.sh (and its associated
run-xml-to-junit.xsl style sheet) it is possible to convert that output
file to a jUnit-like XML file, which could be used in CI systems.
2014-03-14 13:52:09 +01: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
Pino Toscano
6a5052a409 run: add the builddir of inspector to $PATH 2014-03-03 14:25:12 +01:00
Pino Toscano
f4990bef1c builder: switch sources to .conf files
Introduce and use simple .conf files to configure the sources of indexes
for virt-builder. The location of these files is in XDG_CONFIG_DIRS /
XDG_CONFIG_HOME, so it can be easily overridden.

There are three .conf(.in) files shipped with this commit:
- "test-index.conf.in" (in "test-config"), which points to the
  "test-index" index (used in tests only); the tests are adapted to
  point to the hierarchy containing this .conf
- "libguestfs.conf.in" (in "test-website"), which points to the local
  "index.asc" (i.e. the offline copy of the libguestfs.org index);
  run(.in) will point to the hierarchy providing this .conf
- "libguestfs.conf.in" (directly among the other sources), which points
  to the online "index.asc" and it is installed in sysconfdir, along
  with the key of this repository

The tests are adapted, other than to the different way to pick sources,
to the different output of --list, as "test-index" is not signed.
2014-02-27 09:59:56 +00:00
Richard W.M. Jones
d3512deb67 Rewrite virt-make-fs in C (originally Perl).
It should be very compatible with the Perl version.
2014-01-28 21:02:11 +00:00
Richard W.M. Jones
e3f72805d1 run: Actually use timeout --foreground option (RHBZ#1025269).
The following commit managed to not actually add the --foreground
option to the timeout command, just test for it.  Add it this time.

  commit 6814888774
  Author: Richard W.M. Jones <rjones@redhat.com>
  Date:   Thu Dec 19 08:21:53 2013 +0000

    run: Use timeout --foreground option.

    If timeout doesn't have this option (RHEL 6) don't use timeout at all.

    Attempt to fix RHBZ#1025269.
2014-01-28 21:02:11 +00:00
Richard W.M. Jones
6c971faecf Update copyright dates for 2014. 2014-01-02 16:53:34 +00:00
Richard W.M. Jones
6814888774 run: Use timeout --foreground option.
If timeout doesn't have this option (RHEL 6) don't use timeout at all.

Attempt to fix RHBZ#1025269.
2013-12-19 08:21:53 +00:00
Richard W.M. Jones
1ee879f3e5 New tool: virt-diff.
This tool can be used to show the differences between two
disk images.
2013-12-18 15:15:53 +00:00
Richard W.M. Jones
7113aee0b4 ./run: Disable timeouts in tests on RHEL 6.
Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1025269
2013-11-01 14:33:25 +00:00
Richard W.M. Jones
3b746ee796 ./run: Fix massive thinko in $PATH setting.
This fixes commit 76c20d761b.
2013-11-01 08:21:52 +00:00
Richard W.M. Jones
76c20d761b ./run: Adjust $PATH to include all libguestfs binaries.
Instead of typing:

  ./run ./fish/guestfish ...

you can now use:

  ./run guestfish ...

This is shorter, but there are also two good reasons for this change:
It never made any sense to run the system-installed guestfish (or
other) binary.  It would be unlikely to work.  Also binaries in
libguestfs should be able to call other binaries freely without adding
special exceptions (which we had before this change).
2013-10-26 20:23:22 +01: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