All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix ioemu build
@ 2009-08-06 22:04 Christian Tramnitz
  2009-08-06 22:30 ` Keir Fraser
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Tramnitz @ 2009-08-06 22:04 UTC (permalink / raw)
  To: xen-devel

Hello,

apparently the xen-setup script in ioemu tries to delete non-existant 
files which currently causes gentoo live-ebuilds to fail (I can't patch 
because the ioemu tree is being dynamically populated using git).

Anyway checking for the existence of a file before actually deleting it 
shouldn't really hurt...

This lives as patch in funtoo for a while, but as mentioned before 
patching doesnt work with live ebuilds so I'd prefer this to be fixed in 
ioemu.


Thanks,
    Christian



--- tools/ioemu-dir/xen-setup~ 2009-01-05 11:36:22.000000000 +0000
+++ tools/ioemu-dir/xen-setup 2009-03-11 13:08:51.000000000 +0000
@@ -3,9 +3,9 @@

  # git-clean -x -d && ./xen-setup && make prefix=/usr 
CMDLINE_CFLAGS='-O0 -g' -j4 && make install DESTDIR=`pwd`/dist/ 
prefix=/usr && rsync -a --stats --delete . thule:shadow/qemu-iwj.git/ && 
rsync -a --stats dist/. root@thule:/

-rm -f $target/Makefile
-rm -f $target/config.mak
-rm -f config-host.mak
+[[ -f $target/Makefile ]] && rm -f $target/Makefile
+[[ -f $target/config.mak ]] && rm -f $target/config.mak
+[[ -f config-host.mak ]] && rm -f config-host.mak

  if test -f config-host.h; then mv config-host.h config-host.h~; fi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix ioemu build
  2009-08-06 22:04 [PATCH] fix ioemu build Christian Tramnitz
@ 2009-08-06 22:30 ` Keir Fraser
  2009-08-06 22:44   ` Christian Tramnitz
  0 siblings, 1 reply; 4+ messages in thread
From: Keir Fraser @ 2009-08-06 22:30 UTC (permalink / raw)
  To: Christian Tramnitz, xen-devel@lists.xensource.com

On 06/08/2009 23:04, "Christian Tramnitz" <chris.ace@gmx.net> wrote:

> apparently the xen-setup script in ioemu tries to delete non-existant
> files which currently causes gentoo live-ebuilds to fail (I can't patch
> because the ioemu tree is being dynamically populated using git).
> 
> Anyway checking for the existence of a file before actually deleting it
> shouldn't really hurt...

But... 'rm -f' doesn't fail when the file doesn't exist?

 -- Keir

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix ioemu build
  2009-08-06 22:30 ` Keir Fraser
@ 2009-08-06 22:44   ` Christian Tramnitz
  2009-08-10 15:06     ` Ian Jackson
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Tramnitz @ 2009-08-06 22:44 UTC (permalink / raw)
  To: xen-devel

Keir Fraser wrote:
>> Anyway checking for the existence of a file before actually deleting it
>> shouldn't really hurt...
> 
> But... 'rm -f' doesn't fail when the file doesn't exist?

It doesn't, but under circumstances this is escaping the sandbox and 
generating an access violation.
This was initially reported for 3.3.1 as gentoo bug and fixed with this 
patch. Now I'm trying to get the live ebuilds working but patching is 
not an option there...

Details are available here:
http://bugs.gentoo.org/262124

Not really sure if this only manifests itself in the gentoo build 
environment, but since other places in xen-setup check for the existence 
of the file before doing sth with it, I don't think it would hurt to apply.


Btw, the path in my patch was wrong, I guess it should be 
qemu-xen-unstable instead of ioemu-dir.


Best regards,
   Christian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: [PATCH] fix ioemu build
  2009-08-06 22:44   ` Christian Tramnitz
@ 2009-08-10 15:06     ` Ian Jackson
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2009-08-10 15:06 UTC (permalink / raw)
  To: Christian Tramnitz; +Cc: xen-devel

Christian Tramnitz writes ("[Xen-devel] Re: [PATCH] fix ioemu build"):
> Keir Fraser wrote:
> > But... 'rm -f' doesn't fail when the file doesn't exist?
> 
> It doesn't, but under circumstances this is escaping the sandbox and 
> generating an access violation.

Err, what ?  What sandbox ?  Some kind of special Gentoo build
environment ?

> Details are available here:
> http://bugs.gentoo.org/262124

This shows this error message:
 ACCESS DENIED  unlinkat:     /Makefile

That appears to suggest that it's trying to delete /Makefile, rather
than some more sensible path.  Is that really what's going on ?  In
which case the problem is that it's accessing the wrong paths, not
that rm -f isn't working.  Perhaps some source directory variable
isn't being set properly ?

I suggest you investigate in that direction.  If you get stuck let me
know and I'll take a look myself.

> Not really sure if this only manifests itself in the gentoo build 
> environment, but since other places in xen-setup check for the existence 
> of the file before doing sth with it, I don't think it would hurt to apply.

The patch is definitely wrong.

Ian.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-10 15:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-06 22:04 [PATCH] fix ioemu build Christian Tramnitz
2009-08-06 22:30 ` Keir Fraser
2009-08-06 22:44   ` Christian Tramnitz
2009-08-10 15:06     ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.