[PATCH v2 1/2] builder: add opensuse images sources
by Cédric Bosdonnat
---
builder/Makefile.am | 3 ++-
builder/opensuse.conf.in | 3 +++
builder/opensuse.gpg | 21 +++++++++++++++++++++
configure.ac | 1 +
4 files changed, 27 insertions(+), 1 deletion(-)
create mode 100644 builder/opensuse.conf.in
create mode 100644 builder/opensuse.gpg
diff --git a/builder/Makefile.am b/builder/Makefile.am
index 4bed54c..e8f8dfb 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
@@ -315,7 +315,8 @@ DISTCLEANFILES = .depend
# virt-builder's default repository
repoconfdir = $(sysconfdir)/xdg/virt-builder/repos.d
-repoconf_DATA = libguestfs.conf libguestfs.gpg
+repoconf_DATA = libguestfs.conf libguestfs.gpg \
+ opensuse.conf opensuse.gpg
install-exec-hook:
$(LN_S) xdg/virt-builder $(DESTDIR)$(sysconfdir)/virt-builder
diff --git a/builder/opensuse.conf.in b/builder/opensuse.conf.in
new file mode 100644
index 0000000..80db267
--- /dev/null
+++ b/builder/opensuse.conf.in
@@ -0,0 +1,3 @@
+[opensuse.org]
+uri=http://download.opensuse.org/repositories/Virtualization:/virt-builder-images/images/index
+gpgkey=file://@SYSCONFDIR@/xdg/virt-builder/repos.d/opensuse.gpg
diff --git a/builder/opensuse.gpg b/builder/opensuse.gpg
new file mode 100644
index 0000000..001376f
--- /dev/null
+++ b/builder/opensuse.gpg
@@ -0,0 +1,21 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.5 (GNU/Linux)
+
+mQENBFImAl0BCACkjaXGvVLHBGTVXVP0khtpUVHqFvCRtaIIMHaX/5oTr3nyehDQ
+Ex9VLsSRcNa0QxtnCHFRQzjWWqe+i6pBginnSjucgmjnIKyJsF4l6R+rwAiinHQX
+C4s6Lqg/wH9xDPRBrMYFqlc/7MVf0Glhk1+lAxgQjolMt+5AbbrWlBbwc/i+++zl
+ES3MaeH8aiwup/ogjhmk0SbCQQ/ib21p3XWBwx2oz/KM6Voq9tKDvMczjzNRY3ZT
+6Di3FsUSKI7kgljiNiuN+675YwqEqxWEJgdE5a7Zb67giH1Ik08b5wQiF5jSAICD
+DxW7/ibWBvZJnqhqQT2xJpLC5VaJqwkN8o83ABEBAAG0PlZpcnR1YWxpemF0aW9u
+IE9CUyBQcm9qZWN0IDxWaXJ0dWFsaXphdGlvbkBidWlsZC5vcGVuc3VzZS5vcmc+
+iQE7BBMBAgAmBQJSJgJdAhsDBQkEHrAABgsJCAcDAgQVAggDBBYCAwECHgECF4AA
+CgkQoZP7tXIXT8ITnwf3SVUUoVjVLFCjhIxdet8BL011cJDwr9TwKEQfq4Ybsq5L
+5Y1/Zk86rTzrVOZrODLwNRIC3fMuegZV5f85KMggXu37Di+UvX+dQW9v1hte+hAT
++gsqb60kOnE/Yacgkb6D3xIzRudAB2q/xfvHl/hgfn416yGI8NvntT7n4Hk9wT28
+9JSFkun0uaessg77aXlAdsqHwdugm9hELeva89OoYoiZ4d9r4ScTMSj0UkNgnh7g
+CyIScZHYqiiOeosUtAX9u1PyUFfFsg9s5snfud7aF48EfXU0RTtZAGKtG4GPDv3q
+bYc5TJ2pQzs9y5Bk/jAMR/QQw8CKglBsn1cjYkKViEYEExECAAYFAlImAl0ACgkQ
+OzARt2udZSO5yACgr6Ei7QZ+PAmg4Mr5db+4M3aepAEAniU33RaTKBCGkwQi6kHr
+4VaII2/E
+=l8DH
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/configure.ac b/configure.ac
index 86ed4a4..98a39c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1734,6 +1734,7 @@ AC_CONFIG_FILES([Makefile
bash/Makefile
builder/Makefile
builder/libguestfs.conf
+ builder/opensuse.conf
builder/test-config/virt-builder/repos.d/test-index.conf
builder/test-simplestreams/virt-builder/repos.d/cirros.conf
builder/test-website/virt-builder/repos.d/libguestfs.conf
--
2.1.4
9 years, 1 month
[PATCH 1/2] copy-in: print tar stderr when it fails
by Pino Toscano
Get also the fd for the tar subprocess, and drain and print its content
if the tar invocation fails.
---
src/copy-in-out.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 61 insertions(+), 4 deletions(-)
diff --git a/src/copy-in-out.c b/src/copy-in-out.c
index dc9e7b7..0dd8cd3 100644
--- a/src/copy-in-out.c
+++ b/src/copy-in-out.c
@@ -34,17 +34,19 @@
#include "guestfs-internal-actions.h"
static int split_path (guestfs_h *g, char *buf, size_t buf_size, const char *path, const char **dirname, const char **basename);
+static int drain_fd (guestfs_h *g, int fd, char **ret);
int
guestfs_impl_copy_in (guestfs_h *g, const char *localpath, const char *remotedir)
{
CLEANUP_CMD_CLOSE struct command *cmd = guestfs_int_new_command (g);
- int fd;
+ int fd, err_fd;
int r;
char fdbuf[64];
size_t buf_len = strlen (localpath) + 1;
char buf[buf_len];
const char *dirname, *basename;
+ CLEANUP_FREE char *tar_buf = NULL;
int remote_is_dir = guestfs_is_dir (g, remotedir);
if (remote_is_dir == -1)
@@ -67,7 +69,7 @@ guestfs_impl_copy_in (guestfs_h *g, const char *localpath, const char *remotedir
guestfs_int_cmd_add_arg (cmd, "-");
guestfs_int_cmd_add_arg (cmd, basename);
- r = guestfs_int_cmd_run_async (cmd, NULL, NULL, &fd, NULL);
+ r = guestfs_int_cmd_run_async (cmd, NULL, NULL, &fd, &err_fd);
if (r == -1)
return -1;
@@ -81,10 +83,20 @@ guestfs_impl_copy_in (guestfs_h *g, const char *localpath, const char *remotedir
}
r = guestfs_int_cmd_wait (cmd);
- if (r == -1)
+ if (r == -1) {
+ if (drain_fd (g, err_fd, &tar_buf) == 0) {
+ close (err_fd);
+ error (g, _("tar command failed: %s"), tar_buf);
+ }
return -1;
- if (!(WIFEXITED (r) && WEXITSTATUS (r) == 0))
+ }
+ if (!(WIFEXITED (r) && WEXITSTATUS (r) == 0)) {
+ if (drain_fd (g, err_fd, &tar_buf) == 0) {
+ close (err_fd);
+ error (g, _("tar command failed with %d: %s"), WEXITSTATUS (r), tar_buf);
+ }
return -1;
+ }
return 0;
}
@@ -248,3 +260,48 @@ split_path (guestfs_h *g, char *buf, size_t buf_size,
return 0;
}
+
+static int
+drain_fd (guestfs_h *g, int fd, char **ret)
+{
+ char *data = NULL;
+ size_t size = 0;
+ size_t n = 0;
+ size_t left = 0;
+ ssize_t r;
+
+ while (1) {
+ size_t to_read;
+ if (left > 0) {
+ to_read = left;
+ } else {
+ to_read = 1024;
+ size += to_read;
+ data = safe_realloc (g, data, size);
+ }
+ r = read (fd, &data[n], to_read);
+ if (r == -1) {
+ perrorf (g, _("drain_fd: read"));
+ free (data);
+ close (fd);
+ return -1;
+ }
+ if (r == 0)
+ break;
+ n += r;
+ left = 1024 - r;
+ }
+
+ if (close (fd) == -1) {
+ perrorf (g, _("drain_fd: close"));
+ free (data);
+ return -1;
+ }
+
+ data[n] = 0;
+ if (n > 0 && data[n-1] == '\n')
+ data[n-1] = 0;
+
+ *ret = data;
+ return 0;
+}
--
2.1.0
9 years, 1 month
[PATCH 0/7] copy-in/copy-out: Capture errors from tar subprocess (RHBZ#1267032).
by Richard W.M. Jones
Commits 3c27f3d91e1566854747bbe844186783fc84f3a8 and
1b6f0daa9ae7fcc94e389232d0c397816cda973d added an internal API for
running commands asynchronously. It is only used by the copy-in and
copy-out APIs.
Unfortunately this made the command code very complex: it was almost
impossible to redirect stderr to a file, and there were a lot of
long-range dependencies through the file. It was also buggy: it set
up stderr of the child process pointing pipe, but never read from the
pipe, so if the stderr output of the child process was sufficiently
large then libguestfs would deadlock (possibly this can be triggered
from a malicious filesystem too).
This patch series first reverts these commits, then adds a simpler way
to run a child process without waiting (modelled on popen()), allows
stderr errors to be captured, then reimplements copy-in/copy-out using
these new internal APIs.
Note that the patch series breaks bisection, but I can't really think
of a clearer way to reorganize it that would preserve bisection.
Rich.
9 years, 1 month
Build of supermin 5 on Ubuntu 14.04 LTS
by johnny@johnnypumphandle.com
The latest Ubuntu distribution of libguestfs for Ubuntu 14.04
includes supermin 4.
guestfish seems to gag.
Apparently, I need supermin 5 to make things work.
So I downloaded supermin_5.1.9.orig.tar.gz. I unzipped to a source folder /usr/local/src
Then I attempted to build from source using ./configure
I received this error:
config.status: error: cannot find input file: `src/supermin-link.sh.in’
Sort of a noob at compiling from source, can anyone give me a workaround?
here's the output stream ....
design@BLFLIP:/usr/local/src$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for Minix Amsterdam compiler... no
checking for ar... ar
checking for ranlib... ranlib
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for function prototypes... yes
checking whether gcc -std=gnu99 and cc understand -c and -o together... yes
checking for unistd.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking for sys/stat.h... (cached) yes
checking sys/vfs.h usability... yes
checking sys/vfs.h presence... yes
checking for sys/vfs.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for stdint.h... (cached) yes
checking for _set_invalid_parameter_handler... no
checking for fchdir... yes
checking for fdopendir... yes
checking for fcntl... yes
checking for symlink... yes
checking for mempcpy... yes
checking for openat... yes
checking for fstatfs... yes
checking for getdtablesize... yes
checking for gettimeofday... yes
checking for lstat... yes
checking for mprotect... yes
checking for strdup... yes
checking for pipe... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether the preprocessor supports include_next... yes
checking whether system header files limit the line length... no
checking whether // is distinct from /... no
checking for complete errno.h... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... yes
checking whether fchdir is declared... yes
checking for working fcntl.h... yes
checking for pid_t... yes
checking for mode_t... yes
checking for promoted mode_t type... mode_t
checking whether stat file-mode macros are broken... no
checking for nlink_t... yes
checking whether fchmodat is declared without a macro... yes
checking whether fstat is declared without a macro... yes
checking whether fstatat is declared without a macro... yes
checking whether futimens is declared without a macro... yes
checking whether lchmod is declared without a macro... yes
checking whether lstat is declared without a macro... yes
checking whether mkdirat is declared without a macro... yes
checking whether mkfifo is declared without a macro... yes
checking whether mkfifoat is declared without a macro... yes
checking whether mknod is declared without a macro... yes
checking whether mknodat is declared without a macro... yes
checking whether stat is declared without a macro... yes
checking whether utimensat is declared without a macro... yes
checking whether lstat correctly handles trailing slash... yes
checking whether getcwd (NULL, 0) allocates memory for result... yes
checking for getcwd with POSIX signature... yes
checking for C/C++ restrict keyword... __restrict
checking for struct timeval... yes
checking for wide-enough struct timeval.tv_sec member... yes
checking whether gettimeofday is declared without a macro... yes
checking whether malloc, realloc, calloc are POSIX compliant... yes
checking for mmap... yes
checking for MAP_ANONYMOUS... yes
checking whether memchr works... yes
checking whether memrchr is declared... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for wchar_t... yes
checking for unsigned long long int... yes
checking for long long int... yes
checking whether stdint.h conforms to C99... yes
checking whether strdup is declared... yes
checking whether strerror(0) succeeds... yes
checking whether ffsl is declared without a macro... yes
checking whether ffsll is declared without a macro... yes
checking whether memmem is declared without a macro... yes
checking whether mempcpy is declared without a macro... yes
checking whether memrchr is declared without a macro... yes
checking whether rawmemchr is declared without a macro... yes
checking whether stpcpy is declared without a macro... yes
checking whether stpncpy is declared without a macro... yes
checking whether strchrnul is declared without a macro... yes
checking whether strdup is declared without a macro... yes
checking whether strncat is declared without a macro... yes
checking whether strndup is declared without a macro... yes
checking whether strnlen is declared without a macro... yes
checking whether strpbrk is declared without a macro... yes
checking whether strsep is declared without a macro... yes
checking whether strcasestr is declared without a macro... yes
checking whether strtok_r is declared without a macro... yes
checking whether strerror_r is declared without a macro... yes
checking whether strsignal is declared without a macro... yes
checking whether strverscmp is declared without a macro... yes
checking for struct timespec in ... yes
checking whether this system has an arbitrary file name length limit... yes
checking for closedir... yes
checking for d_ino member in directory struct... yes
checking for d_type member in directory struct... yes
checking whether alphasort is declared without a macro... yes
checking whether closedir is declared without a macro... yes
checking whether dirfd is declared without a macro... yes
checking whether fdopendir is declared without a macro... yes
checking whether opendir is declared without a macro... yes
checking whether readdir is declared without a macro... yes
checking whether rewinddir is declared without a macro... yes
checking whether scandir is declared without a macro... yes
checking for dirfd... yes
checking whether dirfd is declared... (cached) yes
checking whether dirfd is a macro... no
checking whether // is distinct from /... (cached) no
checking whether dup2 works... yes
checking for error_at_line... yes
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check
checking whether fcntl is declared without a macro... yes
checking whether openat is declared without a macro... yes
checking whether fdopendir is declared... (cached) yes
checking whether fdopendir works... yes
checking for struct statfs.f_type... yes
checking whether getdtablesize works... yes
checking whether gettimeofday clobbers localtime buffer... no
checking for gettimeofday with POSIX signature... almost
checking for mempcpy... (cached) yes
checking for memrchr... yes
checking whether open recognizes a trailing slash... yes
checking for opendir... yes
checking for readdir... yes
checking for ssize_t... yes
checking whether stat handles trailing slashes on directories... yes
checking whether stat handles trailing slashes on files... yes
checking whether NULL can be used in arbitrary expressions... yes
checking whether dprintf is declared without a macro... yes
checking whether fpurge is declared without a macro... no
checking whether fseeko is declared without a macro... yes
checking whether ftello is declared without a macro... yes
checking whether getdelim is declared without a macro... yes
checking whether getline is declared without a macro... yes
checking whether gets is declared without a macro... no
checking whether pclose is declared without a macro... yes
checking whether popen is declared without a macro... yes
checking whether renameat is declared without a macro... yes
checking whether snprintf is declared without a macro... yes
checking whether tmpfile is declared without a macro... yes
checking whether vdprintf is declared without a macro... yes
checking whether vsnprintf is declared without a macro... yes
checking whether _Exit is declared without a macro... yes
checking whether atoll is declared without a macro... yes
checking whether canonicalize_file_name is declared without a macro... yes
checking whether getloadavg is declared without a macro... yes
checking whether getsubopt is declared without a macro... yes
checking whether grantpt is declared without a macro... yes
checking whether initstate is declared without a macro... yes
checking whether initstate_r is declared without a macro... yes
checking whether mkdtemp is declared without a macro... yes
checking whether mkostemp is declared without a macro... yes
checking whether mkostemps is declared without a macro... yes
checking whether mkstemp is declared without a macro... yes
checking whether mkstemps is declared without a macro... yes
checking whether posix_openpt is declared without a macro... yes
checking whether ptsname is declared without a macro... yes
checking whether ptsname_r is declared without a macro... yes
checking whether random is declared without a macro... yes
checking whether random_r is declared without a macro... yes
checking whether realpath is declared without a macro... yes
checking whether rpmatch is declared without a macro... yes
checking whether secure_getenv is declared without a macro... yes
checking whether setenv is declared without a macro... yes
checking whether setstate is declared without a macro... yes
checking whether setstate_r is declared without a macro... yes
checking whether srandom is declared without a macro... yes
checking whether srandom_r is declared without a macro... yes
checking whether strtod is declared without a macro... yes
checking whether strtoll is declared without a macro... yes
checking whether strtoull is declared without a macro... yes
checking whether unlockpt is declared without a macro... yes
checking whether unsetenv is declared without a macro... yes
checking for working strerror function... yes
checking for nlink_t... (cached) yes
checking whether fchmodat is declared without a macro... (cached) yes
checking whether fstat is declared without a macro... (cached) yes
checking whether fstatat is declared without a macro... (cached) yes
checking whether futimens is declared without a macro... (cached) yes
checking whether lchmod is declared without a macro... (cached) yes
checking whether lstat is declared without a macro... (cached) yes
checking whether mkdirat is declared without a macro... (cached) yes
checking whether mkfifo is declared without a macro... (cached) yes
checking whether mkfifoat is declared without a macro... (cached) yes
checking whether mknod is declared without a macro... (cached) yes
checking whether mknodat is declared without a macro... (cached) yes
checking whether stat is declared without a macro... (cached) yes
checking whether utimensat is declared without a macro... (cached) yes
checking whether chdir is declared without a macro... yes
checking whether chown is declared without a macro... yes
checking whether dup is declared without a macro... yes
checking whether dup2 is declared without a macro... yes
checking whether dup3 is declared without a macro... yes
checking whether environ is declared without a macro... yes
checking whether euidaccess is declared without a macro... yes
checking whether faccessat is declared without a macro... yes
checking whether fchdir is declared without a macro... yes
checking whether fchownat is declared without a macro... yes
checking whether fdatasync is declared without a macro... yes
checking whether fsync is declared without a macro... yes
checking whether ftruncate is declared without a macro... yes
checking whether getcwd is declared without a macro... yes
checking whether getdomainname is declared without a macro... yes
checking whether getdtablesize is declared without a macro... yes
checking whether getgroups is declared without a macro... yes
checking whether gethostname is declared without a macro... yes
checking whether getlogin is declared without a macro... yes
checking whether getlogin_r is declared without a macro... yes
checking whether getpagesize is declared without a macro... yes
checking whether getusershell is declared without a macro... yes
checking whether setusershell is declared without a macro... yes
checking whether endusershell is declared without a macro... yes
checking whether group_member is declared without a macro... yes
checking whether isatty is declared without a macro... yes
checking whether lchown is declared without a macro... yes
checking whether link is declared without a macro... yes
checking whether linkat is declared without a macro... yes
checking whether lseek is declared without a macro... yes
checking whether pipe is declared without a macro... yes
checking whether pipe2 is declared without a macro... yes
checking whether pread is declared without a macro... yes
checking whether pwrite is declared without a macro... yes
checking whether readlink is declared without a macro... yes
checking whether readlinkat is declared without a macro... yes
checking whether rmdir is declared without a macro... yes
checking whether sethostname is declared without a macro... yes
checking whether sleep is declared without a macro... yes
checking whether symlink is declared without a macro... yes
checking whether symlinkat is declared without a macro... yes
checking whether ttyname_r is declared without a macro... yes
checking whether unlink is declared without a macro... yes
checking whether unlinkat is declared without a macro... yes
checking whether usleep is declared without a macro... yes
checking for special C compiler options needed for large files... (cached) no
checking for _FILE_OFFSET_BITS value needed for large files... (cached) no
checking for a sed that does not truncate output... /bin/sed
checking for ocamlc... ocamlc
OCaml version is 4.01.0
OCaml library path is /usr/lib/ocaml
checking for ocamlopt... ocamlopt
checking for ocamlc.opt... no
checking for ocamlopt.opt... no
checking for ocaml... ocaml
checking for ocamldep... ocamldep
checking for ocamlmktop... ocamlmktop
checking for ocamlmklib... ocamlmklib
checking for ocamldoc... ocamldoc
checking for ocamlbuild... ocamlbuild
checking for ocamlfind... ocamlfind
checking for perldoc... perldoc
checking for rpm... no
checking for rpm2cpio... no
checking for yumdownloader... no
checking for zypper... no
checking for urpmi... no
checking for apt-get... /usr/bin/apt-get
checking for dpkg... /usr/bin/dpkg
checking for dpkg-deb... /usr/bin/dpkg-deb
checking for dpkg-query... /usr/bin/dpkg-query
checking for dpkg-divert... /usr/bin/dpkg-divert
checking for pacman-g2... no
checking for pacman... no
checking for pactree... no
checking for makepkg... no
checking for fakeroot... /usr/bin/fakeroot
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for gzopen in -lz... yes
checking for gzip static library... yes
checking lzma.h usability... yes
checking lzma.h presence... yes
checking for lzma.h... yes
checking for lzma_code in -llzma... yes
checking for xz static library... yes
checking for mke2fs... /sbin/mke2fs
checking /sbin/mke2fs -t or -T... -t
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for EXT2FS... yes
checking for COM_ERR... yes
checking for ext2fs_close2... yes
checking for gawk... gawk
checking for cpio... /bin/cpio
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: error: cannot find input file: `src/supermin-link.sh.in'
Also config.status file was generated ... follows below ....
#! /bin/bash
# Generated by configure.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.
debug=false
ac_cs_recheck=false
ac_cs_silent=false
SHELL=${CONFIG_SHELL-/bin/bash}
export SHELL
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
esac
fi
as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
&& (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='print -r --'
as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='printf %s\n'
as_echo_n='printf %s'
else
if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
as_echo_n='/usr/ucb/echo -n'
else
as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
as_echo_n_body='eval
arg=$1;
case $arg in #(
*"$as_nl"*)
expr "X$arg" : "X\\(.*\\)$as_nl";
arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
esac;
expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
'
export as_echo_n_body
as_echo_n='sh -c $as_echo_n_body as_echo'
fi
export as_echo_body
as_echo='sh -c $as_echo_body as_echo'
fi
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
PATH_SEPARATOR=';'
}
fi
# IFS
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
IFS=$as_save_IFS
;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
$as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there. '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
&& ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
$as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
$as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
return $1
} # as_fn_set_status
# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
set +e
as_fn_set_status $1
exit $1
} # as_fn_exit
# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
{ eval $1=; unset $1;}
}
as_unset=as_fn_unset
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
else
as_fn_append ()
{
eval $1=\$$1\$2
}
fi # as_fn_append
# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
else
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
}
fi # as_fn_arith
if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
as_dirname=dirname
else
as_dirname=false
fi
as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
}
/^X\/\(\/\/\)$/{
s//\1/
q
}
/^X\/\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
case `echo 'xy\c'` in
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
xy) ECHO_C='\c';;
*) echo `echo ksh88 bug on AIX 6.1` > /dev/null
ECHO_T=' ';;
esac;;
*)
ECHO_N='-n';;
esac
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -pR'
fi
else
as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{
case $as_dir in #(
-*) as_dir=./$as_dir;;
esac
test -d "$as_dir" || eval $as_mkdir_p || {
as_dirs=
while :; do
case $as_dir in #(
*\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
} || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
test -f "$1" && test -x "$1"
} # as_fn_executable_p
as_test_x='test -x'
as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
exec 6>&1
## ----------------------------------- ##
## Main body of $CONFIG_STATUS script. ##
## ----------------------------------- ##
# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by supermin $as_me 5.1.9, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
CONFIG_LINKS = $CONFIG_LINKS
CONFIG_COMMANDS = $CONFIG_COMMANDS
$ $0 $@
on `(hostname || uname -n) 2>/dev/null | sed 1q`
"
# Files that config.status was made for.
config_files=" src/supermin-link.sh Makefile examples/Makefile lib/Makefile src/config.ml src/Makefile tests/Makefile"
config_headers=" config.h"
config_commands=" depfiles"
ac_cs_usage="\
\`$as_me' instantiates files and other configuration actions
from templates according to the current configuration. Unless the files
and actions are specified as TAGs, all are instantiated by default.
Usage: $0 [OPTION]... [TAG]...
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
--config print configuration, then exit
-q, --quiet, --silent
do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
instantiate the configuration header FILE
Configuration files:
$config_files
Configuration headers:
$config_headers
Configuration commands:
$config_commands
Report bugs to the package provider."
ac_cs_config=""
ac_cs_version="\
supermin config.status 5.1.9
configured by ./configure, generated by GNU Autoconf 2.69,
with options \"$ac_cs_config\"
Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
ac_pwd='/usr/local/src'
srcdir='.'
INSTALL='/usr/bin/install -c'
MKDIR_P='/bin/mkdir -p'
AWK='gawk'
test -n "$AWK" || AWK=awk
# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
case $1 in
--*=?*)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
--*=)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=
ac_shift=:
;;
*)
ac_option=$1
ac_optarg=$2
ac_shift=shift
;;
esac
case $ac_option in
# Handling of the options.
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
$as_echo "$ac_cs_version"; exit ;;
--config | --confi | --conf | --con | --co | --c )
$as_echo "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
'') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
--header | --heade | --head | --hea )
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
-*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
ac_need_defaults=false ;;
esac
shift
done
ac_configure_extra_args=
if $ac_cs_silent; then
exec 6>/dev/null
ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
if $ac_cs_recheck; then
set X /bin/bash './configure' $ac_configure_extra_args --no-create --no-recursion
shift
$as_echo "running CONFIG_SHELL=/bin/bash $*" >&6
CONFIG_SHELL='/bin/bash'
export CONFIG_SHELL
exec "$@"
fi
exec 5>>config.log
{
echo
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' "$ac_tmp/subs1.awk" &&
cat >>"$ac_tmp/subs1.awk" >"$ac_tmp/subs1.awk" &1; then
sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
cat
fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
|| as_fn_error $? "could not setup config files machinery" "$LINENO" 5
fi # test -n "$CONFIG_FILES"
# Set up the scripts for CONFIG_HEADERS section.
# No need to generate them if there are no CONFIG_HEADERS.
# This happens for instance with `./config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
cat >"$ac_tmp/defines.awk"
9 years, 1 month
Re: [Libguestfs] [libguestfs] v2v: Mention ovftool in the man page as a way to create OVA files.
by Richard W.M. Jones
On Fri, Sep 25, 2015 at 08:23:04AM -0700, angystardust wrote:
> Hi Richard,
>
> i'm glad to see the suggestion i gave to the RH support in the
> official documentation! :smile:
>
> You can also point to a vCenter by using this syntax:
>
> `ovftool --noSSLVerify vi://[USER]:[PASSWORD]@[VCENTER-HOST]/[DATACENTER-NAME]/vm/[VM-NAME] /path/to/file.ova`
>
> For an Active Directory-aware authentication, you have to express the @ character in the form of its ascii hex-code (that's to say %5C):
> `ovftool --noSSLVerify vi://[DOMAIN]%5C[USER]:[PASSWORD]@[VCENTER-HOST]/[DATACENTER-NAME]/vm/[VM-NAME] /path/to/file.ova`
>
> For ex.:
> `ovftool --noSSLVerify vi://EXAMPLE%5Cuser:password@vcenter.example.local/DATACENTER/vm/V2V-RHEL5 /mnt/export/V2V-RHEL5.ova`
>
> Hope this helps other people to save time instead of spending it on
> Google. Thanks for your hard work and keep on rockin'.
Thanks - I will update the documentation further.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
9 years, 2 months
ANNOUNCE: libguestfs & virt-v2v & virt-p2v RHEL 7.2 preview packages available
by Richard W.M. Jones
[The subject line isn't strictly correct, as virt-p2v packages aren't
available right now, but will be shortly]
If you are running RHEL 7.1 then you may be interested in trying out
the newer RHEL 7.2 preview versions of:
- libguestfs
- virt-v2v (Technical Preview in RHEL 7.1, Supported in RHEL 7.2)
- virt-p2v (Technical Preview in RHEL 7.2)
To install the preview repository, copy the attached file into
/etc/yum.repos.d/
Then use this command to update virt-v2v:
yum install virt-v2v libguestfs-tools-c libguestfs-xfs
To convert Windows guests you'll also need libguestfs-winsupport which
is finally available in RHN (V2VWIN channel) or you can get it from
http://people.redhat.com/~rjones/libguestfs-winsupport/
Please note these packages are *not* supported by Red Hat. If you
find bugs, please file them using the link below:
https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%...
To downgrade back to the RHEL 7.1 supported packages, delete
/etc/yum.repos.d/libguestfs-RHEL-7.2-preview.repo , uninstall
libguestfs, then reinstall libguestfs from RHN.
I have not tested these packages on CentOS 7.1, but they will probably
work there too, and if they don't then let me know.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
9 years, 2 months
Change to how the Fedora package is tested
by Richard W.M. Jones
I added this commit last week:
https://github.com/libguestfs/libguestfs/commit/f2540d68e4e62c8cf90ac501b...
which allows installed libguestfs to be tested using the test suite
included in the sources.
Starting with Fedora Rawhide version 1.31.7-2, I'm going to disable
the tests that happen during the Fedora (Koji) build, except for the
basic kernel/qemu/libvirt/appliance sanity check.
Instead, testing will now happen after the package has been built.
Initially that'll just happen by me downloading the built package to
my Rawhide test machine, and running the 'make installcheck' tests.
But eventually I want to create some kind of infrastructure for this,
triggered automatically when a Koji build completes.
One upshot of this is that libguestfs will take a lot less time to
build in Koji, with build times expected to go down from ~2 hours to
~20 minutes.
If you want to run the tests yourself, then:
(1) Download all the RPMs corresponding to the built package.
(2) Install the binary RPMs.
(3) Run 'rpmbuild -rc *.src.rpm' to unpack the source RPM, %prep and
%build it.
(4) In the builddir, run:
$ make installcheck
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
9 years, 2 months
[PATCH] configure: Require OCaml if we need to run the generator.
by Richard W.M. Jones
When building from git, you need OCaml to compile the generator to
build the generated files. Previously configure didn't detect that
situation, resulting in failed builds. This commit causes the
configure script to error out if the generated files are not present
and OCaml is not installed.
Note that you can still build without OCaml, if you get the generated
files from somewhere else. The source tarballs distributed on the
website contain the generated files.
---
configure.ac | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/configure.ac b/configure.ac
index 8ff6ce5..31cabc2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1117,6 +1117,15 @@ AM_CONDITIONAL([HAVE_OCAMLOPT],
AM_CONDITIONAL([HAVE_OCAMLDOC],
[test "x$OCAMLDOC" != "xno"])
+dnl OCaml is required if we need to run the generator.
+AS_IF([test "x$OCAMLC" = "xno"],[
+ AS_IF([! test -f $srcdir/src/guestfs_protocol.x],[
+ AC_MSG_FAILURE([OCaml compiler is required to build from git.
+If you don't have OCaml available, you should build from a
+tarball from http://libguestfs.org/download])
+ ])
+])
+
AS_IF([test "x$OCAMLC" != "xno"],[
dnl Check for <caml/unixsupport.h> header.
old_CPPFLAGS="$CPPFLAGS"
--
2.5.0
9 years, 2 months
Wrong deficit calculation in virt-resize.
by Maxim Perevedentsev
Hello guys!
I tried to shrink a partition when resizing an image using virt-resize.
The numbers and result are weird.
================BEFORE================
><fs> blockdev-getsize64 /dev/sdc
4294967296
><fs> part-list /dev/sdc
[0] = {
part_num: 1
part_start: 65536
part_end: 2193555455
part_size: 2193489920
}
[1] = {
part_num: 2
part_start: 2193555456
part_end: 4294967295
part_size: 2101411840
}
><fs> list-filesystems
/dev/sdc1: ext3
/dev/sdc2: ntfs
So I have two parititons up to image end, and 64k block at the start.
I wanted to shrink the last partition by 1MB (for test, yeah). I shrank
the filesystem by 1MB but virt-resize refused to resize to 4095MB image
requesting ~2MB more (the numbers you can see in log attached). So I had
to shrink the filesystem by 4MB from original:
><fs> debug sh 'ntfsresize -f --info /dev/sdc2'
...
Cluster size : 4096 bytes
Current volume size: 2097213952 bytes (2098 MB)
Current device size: 2101411840 bytes (2102 MB)
...
===============AFTER==================
Now virt-resize succeeded. But the deficit miscalculation gave its result.
><fs> blockdev-getsize64 /dev/sda
4293918720
><fs> part-list /dev/sda
[0] = {
part_num: 1
part_start: 65536
part_end: 2193555455
part_size: 2193489920
}
[1] = {
part_num: 2
part_start: 2193555456
part_end: 4291690495
part_size: 2098135040
}
So I have 2228225 bytes after last partition empty.
><fs> debug sh 'ntfsresize -f --info /dev/sda2'
Current volume size: 2098131456 bytes (2099 MB)
Current device size: 2098135040 bytes (2099 MB)
FS is ok, it fills the partition.
========================================
I looked at resize.ml and saw complex calculations of GPT header/end,
alignment overhead and so on.
I wondered whether virt-resize would create GPT on new image, but it
didnt. Everything remained as before except empty space at the end.
So the question is: is there a bug with deficit calculation or do I miss
anything?
--
Your sincerely,
Maxim Perevedentsev
9 years, 2 months