Richard W.M. Jones | 4 Aug 23:38 2015
Picon

[PATCH] customize: Make dnf upgrade to the latest versions of packages.

I discovered that 'dnf upgrade' doesn't actually upgrade to the latest
versions of packages unless you also supply the '--best' flag.

This also changes update -> upgrade, since apparently 'dnf update'
is deprecated.
---
 customize/customize_run.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/customize/customize_run.ml b/customize/customize_run.ml
index bce0aca..828c711 100644
--- a/customize/customize_run.ml
+++ b/customize/customize_run.ml
 <at>  <at>  -123,7 +123,7  <at>  <at>  exec >>%s 2>&1
         apt-get $apt_opts upgrade
       "
     | "dnf" ->
-      sprintf "dnf -y update"
+      sprintf "dnf -y --best upgrade"
     | "pisi" ->
       sprintf "pisi upgrade"
     | "pacman" ->
--

-- 
2.5.0
Richard W.M. Jones | 4 Aug 21:15 2015
Picon

[PATCH] automake: Admit defeat and use 'subdir-objects'.

Because this 'feature' is broken (since 2013):

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928

we have to replace all instances of $(top_srcdir) in *_SOURCES lines
with a relative path.  According to what I read, this shouldn't break
split builds, but I didn't test it.

The only things automake moans about now are:

* Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE
([^ \t=:+{}]+)}/ at /usr/bin/automake line 3936.

  - This is another bug in automake

* autoreconf: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION

  - This is a feature, not a bug.
---
 .gitignore                    |  1 +
 builder/Makefile.am           | 14 +++++++-------
 configure.ac                  |  2 +-
 customize/Makefile.am         |  8 ++++----
 dib/Makefile.am               |  2 +-
 get-kernel/Makefile.am        |  4 ++--
 mllib/Makefile.am             |  4 ++--
 resize/Makefile.am            | 10 +++++-----
 sparsify/Makefile.am          |  4 ++--
 sysprep/Makefile.am           | 12 ++++++------
 tests/mount-local/Makefile.am |  4 ++--
(Continue reading)

Richard W.M. Jones | 4 Aug 15:19 2015
Picon

[PATCH v3 01/16] tests: Introduce test harness for running tests.

Since v2:

 - Add perl tests.

 - Reworked and fixed the tests for virt-builder.

 - Some further minor bug fixes.
Richard W.M. Jones | 31 Jul 17:13 2015
Picon

[PATCH v2 00/14] tests: Introduce test harness for running tests.

This is a more complete patch to add the test harness.

The only parts missing now are the language bindings (except OCaml).
The language bindings need a bit more thought.  At the moment most
language binding tests are done through some sort of shell script like
perl/run-perl-tests which either runs each test itself or uses some
language-specific machinary to run each test.  The problem with that
is the test harness should be running individual tests, otherwise we
cannot parallelize them, nor run fast-only tests.  That won't work
however until the test harness knows how to run language tests, which
it doesn't at the moment (except for OCaml).

In any case, this is now ready for review, and maybe inclusion
upstream.

Rich.
Philip KP LI | 29 Jul 03:12 2015
Picon

Redhat v2v


Hi,

I am looking for the package, virt-v2v, for Redhat 7 to convert virtual
machines under Xen in Redhat 5 to KVM.  But, can't find it from the 7 and
neither from the public websites.   Why wasn’t virt-v2v included with 7
from the get-go?

And, pls also advise for the downloading sites if possible.

Regards,
Philip
Li

____________________________________________________________________________________________________________ 

This e-mail message (together with any attachments) is for the designated recipient only. 
It may contain information that is privileged for the designated recipient.  
If you are not the intended recipient, you are hereby notified that any use, retention, disclosure,
copying, 
printing, forwarding or dissemination of the message is strictly prohibited. 
If you have received the message in error, please erase all copies of the message (including attachments) 
from your system and notify the sender immediately.
____________________________________________________________________________________________________________

_______________________________________________
Libguestfs mailing list
Libguestfs <at> redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
Raghu | 29 Jul 15:02 2015
Picon

restrict access to host from guestfish

Hi Richard,

guestfish shell has an ability to execute commands on the host such as
!mkdir local
tgz-out /remote local/remote-data.tar.gz

What is the best way to restrict access to host from guestfish ?

For instance,
- Allow readonly access to host.. i.e., !ls is allowed
but dont allow !rm or !mkdir

- commands such as tgz-out, or copy-out should be able to access just /tmp, but nothing else in host filesystem

Appreciate your guidance on this,

Thanks
Raghu




_______________________________________________
Libguestfs mailing list
Libguestfs <at> redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
Richard W.M. Jones | 29 Jul 14:42 2015
Picon

Re: \n didn't lead to a new line while using remote model

On Wed, Jul 29, 2015 at 04:18:02PM +0800, Yu Liu wrote:
[...]
> Let's make an example:
> 
> #guestfish -a disk.img
> >run
> >mount /dev/sda1 /
> >write-append /a.txt "Hello\n"
> >write-append /a.txt "World\n"
> >cat /a.txt
> Hello
> World
> 
> >quit
> 
> Another try:
> eval `guestfish --listen`
> guestfish --remote add disk.img
> guestfish --remote run
> guestfish --remote mount /dev/sda1 /
> guestfish --remote write-append /a.txt "Hello\n"
> guestfish --remote write-append /a.txt "World\n"
> guestfish --remote cat /a.txt
> Hello\nWorld\n
> 
> #
> libguestfs-1.20.11-11.el6.x86_64

The problem is that \n is handled "specially" by guestfish when it is
reading the ><fs> command line, but not when it is parsing commands
sent via --remote.

The way to do this is:

$ guestfish --remote write /a.txt "hello
world"
$ guestfish --remote cat /a.txt
hello
world

Note that you have to actually press the [Return] key after "hello

Probably a better plan is to use something like python remoting:

https://rwmj.wordpress.com/2013/05/07/using-libguestfs-remotely-with-python-and-rpyc/#content

which will be more predictable.

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
Pino Toscano | 29 Jul 13:48 2015
Picon

[PATCH 1/2] sysprep: machine_id: simplify implementation

Instead of rm + touch, just truncate the file if existing.
In case there was no file previously, now nothing is created, as most
probably the system was fine even without it.

Also, turn the single path into a list, so more machine-id files can be
handled at once.
---
 sysprep/sysprep_operation_machine_id.ml | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/sysprep/sysprep_operation_machine_id.ml b/sysprep/sysprep_operation_machine_id.ml
index fbcc692..190ca5b 100644
--- a/sysprep/sysprep_operation_machine_id.ml
+++ b/sysprep/sysprep_operation_machine_id.ml
 <at>  <at>  -21,15 +21,12  <at>  <at>  open Common_gettext.Gettext

 module G = Guestfs

-let machine_id_perform g root side_effects =
+let machine_id_perform (g : Guestfs.guestfs) root side_effects =
   let typ = g#inspect_get_type root in
   if typ <> "windows" then (
-    let path = "/etc/machine-id" in
-    (try g#rm path with G.Error _ -> ());
-    (try
-       g#touch path;
-       side_effects#created_file ()
-     with G.Error _ -> ());
+    let paths = [ "/etc/machine-id"; ] in
+    let paths = List.filter g#is_file paths in
+    List.iter g#truncate paths
   )

 let op = {
--

-- 
2.1.0
Cédric Bosdonnat | 29 Jul 10:35 2015

[PATCH v2] appliance init: find NIC name for dhcpcd

dhcpcd requires an interface name as parameter to work. We are now
getting it from /proc/sys/net/ipv4/conf/ folder children. dhclient
on Debian also has the problem, thus use the guessed interface name
for it too.
---
 appliance/init | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/appliance/init b/appliance/init
index cca62e7..d5a428d 100755
--- a/appliance/init
+++ b/appliance/init
 <at>  <at>  -108,10 +108,11  <at>  <at>  ip addr add 127.0.0.1/8 brd + dev lo scope host
 ip link set dev lo up

 if test "$guestfs_network" = 1; then
+    iface=$(ls -I all -I default -I lo /proc/sys/net/ipv4/conf)
     if dhclient --version >/dev/null 2>&1; then
-        dhclient
+        dhclient $iface
     else
-        dhcpcd
+        dhcpcd $iface
     fi
 fi

--

-- 
2.1.4
Richard W.M. Jones | 28 Jul 19:24 2015
Picon

[PATCH 00/10] tests: Introduce test harness for running tests.

I should probably start by saying this patch series isn't ready for
review yet.

This patch series adds a test harness to libguestfs.  It allows us to
run the tests outside the ordinary 'make check' path in the build
tree.  In particular, you can use this to run tests when libguestfs
has been installed.  'make check' and the other 'make check-*' rules
still work.

The goals for this series is described in the commit message for
patch 01/10.

Back in Oct last year, I posted an earlier version of this patch
series.  I believe the last version of this series posted was this
one:

  https://www.redhat.com/archives/libguestfs/2014-October/msg00208.html

Rich.
Cédric Bosdonnat | 28 Jul 15:21 2015

[PATCH 0/2] Misc fixes

Here are two patches: one fixes the gpg-agent causing unmount to fail
after running dnf to install packages. The other ones fixes dhcpcd call
in the init program to provide it an interface name.

Cédric Bosdonnat (2):
  appliance init: find NIC name for dhcpcd
  Make sure gpg-agent is terminated before umount

 appliance/init             | 3 ++-
 customize/customize_run.ml | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

--

-- 
2.1.4

_______________________________________________
Libguestfs mailing list
Libguestfs <at> redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs

Gmane