Commit Graph

31 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
677c721e85 Fix whitespace.
Because of previous automated commits, such as changing 'guestfs___'
-> 'guestfs_int_', several function calls no longer lined up with
their parameters, and some lines were too long.

The bulk of this commit was done using emacs batch mode and the
technique described here:

  http://www.cslab.pepperdine.edu/warford/BatchIndentationEmacs.html

The changes suggested by emacs were then reviewed by hand.
2015-10-05 14:28:33 +01:00
Richard W.M. Jones
d07b32e14f Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste.
2015-10-05 14:28:33 +01:00
Richard W.M. Jones
ccdbbc7fe4 Fix various -Wformat problems.
Updating gnulib has caused -Wformat-signedness to be enabled.  This
has revealed many problems in C format strings.  The fixes here fall
into the following main categories:

 - Using %d with an unsigned parameter.

 - %x and %o expect an unsigned argument.

 - uid_t and gid_t are unsigned on Linux.  The safe way to print these
   is to cast them to uintmax_t and then print them using the %ju
   modifier (see http://stackoverflow.com/a/1401581).

 - Using %d to print an enum.  Since enums may be either char or int,
   I fixed this by casting the enum to int.

 - strtol_error & lzma_ret are both unsigned types.
2015-07-02 16:08:44 +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
Richard W.M. Jones
bfbcc01403 Change guestfs___* to guestfs_int_*
libguestfs has used double and triple underscores in identifiers.
These aren't valid for global names in C++.

The first step is to replace all guestfs___* (3 underscores) with
guestfs_int_*.  We've used guestfs_int_* elsewhere already as a prefix
for internal identifiers.

This is an entirely mechanical change done using:
  git ls-files | xargs perl -pi.bak -e 's/guestfs___/guestfs_int_/g'

Reference: http://stackoverflow.com/a/228797
2015-02-14 18:46:04 +00:00
Richard W.M. Jones
5cafedaa45 lib: Change 'program_name' macro to avoid conflict with gnulib.
The gnulib 'error' module uses 'program_name'.  On some platforms --
but not Linux / glibc -- it references it as:

  extern char *program_name;

This means when you compile libguestfs on non-glibc (eg. Mac OS X)
gnulib requires 'program_name' as an external string reference, which
we don't provide.

This change doesn't define this string reference for gnulib, but it
does change the name of the macro we use to avoid conflicts if we
eventually need to export 'program_name' as a string.

Thanks: Margaret Lewicka
2015-02-07 16:30:28 +00:00
Pino Toscano
d7abf5c8f2 format, make-fs: specify the label on mkfs
If specified, pass the label for the new filesystem directly to the
mkfs (or mkfs_btrfs) call.

This saves one set_label call, mostly.
2015-01-19 16:47:53 +01:00
Richard W.M. Jones
c5800dc97d Update copyright dates for 2015. 2015-01-17 09:08:15 +00:00
Pino Toscano
b00adf3b78 tools: implement --short-options
Just like --long-options, it makes it possible to know which short
options are supported by each tool; this can help improving the bash
completion, for example.
2014-11-27 16:26:13 +01:00
Pino Toscano
a5426cce5f build: check for libintl, and use it
Look for libint/gettext and link to it; this properly detects whether
libint is part of libc.
2014-11-05 13:45:17 +01:00
Richard W.M. Jones
e85a976c5a tests: Don't use relative paths to binaries in tests.
All tests run under the ./run binary.  For a long time the ./run
binary has set the $PATH environment variable to contain all of the
directories with binaries in them.

Therefore there is no reason to use ../fish/guestfish instead of just
plain guestfish (and the same applies to other built binaries).
2014-09-17 17:31:50 +01:00
Pino Toscano
8ea6b3e03c make-fs: do not leak the fd from mkstemp 2014-07-28 17:27:30 +02:00
Pino Toscano
2fe93bda9f make-fs: respect libguestfs' temporary dir
Do not hardcode /tmp.
2014-07-28 17:24:02 +02:00
Pino Toscano
9c3ce6535c make-fs: use CLEANUP_FCLOSE 2014-07-26 18:24:52 +01:00
Richard W.M. Jones
a21dfc483c Fix some spelling mistakes and typos in documentation (RHBZ#1099284). 2014-05-20 10:45:33 +01:00
Richard W.M. Jones
ffffe71c16 build: Remove code coverage and code profiling options.
This reverts commit 5a2e320ec9.
2014-04-09 14:51:59 +01:00
Richard W.M. Jones
15b06d6100 make-fs: Close FILE* along error path.
Found by Coverity.
2014-03-28 14:01:19 +00:00
Richard W.M. Jones
410aae4b6f make-fs: Check for error return from guestfs_statvfs.
Found by Coverity.
2014-03-28 13:59:56 +00:00
Richard W.M. Jones
f42769f94b virt-make-fs: Fix typo in error string.
Thanks: Yuri Chornoivan
2014-03-23 12:09:01 +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
32cbd7ca0d make-fs: Remove warning from man page about lone --partition argument.
C's getopt_long has no problem with this.
2014-01-29 08:20:38 +00:00
Richard W.M. Jones
a8a655a859 make-fs: Ensure --partition (on its own) creates an MBR partition.
This fixes commit d3512deb67.
2014-01-29 08:20:38 +00:00
Richard W.M. Jones
90d3378778 make-fs: Refactor debug stats code.
Code motion, no functional change.
2014-01-29 08:20:38 +00:00
Richard W.M. Jones
5bf8c81d7d make-fs: Use an anonymous pipe instead of a named pipe.
The previous translation from Perl slavishly followed the Perl code a
bit too much and used a named pipe to communicate between the
uncompressing subprocess and libguestfs tar-in.  From C we can use an
anonymous pipe instead.

This updates commit d3512deb67.
2014-01-29 08:20:18 +00:00
Richard W.M. Jones
c86fcc0fd4 make-fs: Make check-valgrind do something. 2014-01-29 08:00:55 +00:00
Richard W.M. Jones
f5bc913434 make-fs: Run virt-make-fs in test from builddir, not srcdir. 2014-01-29 08:00:30 +00:00
Richard W.M. Jones
642cf4c5dc tests: Test --label and other options in virt-make-fs. 2014-01-28 21:02:11 +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