OPTGROUP_SD_JOURNAL_NOT_AVAILABLE
by Olaf Hering
Current master fails to build if certain systemd functionality is not
available at build time, daemon/journal.c has
OPTGROUP_SD_JOURNAL_NOT_AVAILABLE at the end of the file. Is this a
typo, what should be done in that case?
11 years, 3 months
missing chdir before chroot in guestfsd
by Olaf Hering
daemon.c does just a chroot, without chdir. The result is that pwd does not
work correctly (it causes fs/dcache.c:prepend_unreachable() to add the
unreachable string). A workaround is to add "cd /" before each sh command.
><fs> mount /dev/sda2 /
><fs> sh "cd / ; chroot / ; /bin/pwd"
/
><fs> sh "/bin/pwd"
(unreachable)/
><fs> sh "cd / ; /bin/pwd"
/
This untested change may fix it.
===================
--- libguestfs-1.20.10.orig/daemon/guestfsd.c
+++ libguestfs-1.20.10/daemon/guestfsd.c
@@ -879,7 +879,11 @@ commandrvf (char **stdoutput, char **std
close (stdin_fd[PIPE_READ]);
close (stdin_fd[PIPE_WRITE]);
- if (chroot (sysroot) == -1) {
+ if (chdir (sysroot) == -1) {
+ perror ("chdir");
+ _exit (EXIT_FAILURE);
+ }
+ if (chroot (".") == -1) {
perror ("chroot");
_exit (EXIT_FAILURE);
}
Olaf
11 years, 3 months
Re: [Libguestfs] [dev] Supermin on mageia
by Joseph Wang
FYI, I just posted two pull requests on libguestfs/supermin
One adds urpmi support. The other adds xz support to supermin.
On Fri, Aug 16, 2013 at 3:58 PM, Richard W.M. Jones <rjones(a)redhat.com>wrote:
> On Fri, Aug 16, 2013 at 02:07:40PM +0800, Joseph Wang wrote:
> > /etc/rc.d/init.d is required but the problem is the /etc/init.d symlink,
> > which doesn't seem to be needed. Precreating the directories should
> work,
> > but it didn't for me, but I got around this problem by just not creating
> > /etc/init.d
> >
> > My problem right now is to have supermin recognized xz modules. I've
> been
> > working on that.
>
> This is the bit you need to modify:
>
> https://github.com/libguestfs/supermin/blob/master/helper/init.c#L263
>
> You can post patches on the libguestfs(a)redhat.com mailing list.
>
> Rich.
>
> --
> Richard Jones, Virtualization Group, Red Hat
> http://people.redhat.com/~rjones
> libguestfs lets you edit virtual machines. Supports shell scripting,
> bindings from many languages. http://libguestfs.org
>
11 years, 3 months
Re: [Libguestfs] Supermin on mageia
by Richard W.M. Jones
On Thu, Aug 15, 2013 at 09:18:51PM +0800, Joseph Wang wrote:
> Thanks. I'll take a look. One other question. Does supermin support
> kernel modules that are compressed with .xz format? It's seems
> straightforward to add.
Actually no; it does support gz. As you say, it would not be
hard to add it.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
11 years, 3 months
Re: [Libguestfs] Supermin on mageia
by Richard W.M. Jones
On Thu, Aug 15, 2013 at 08:18:08PM +0800, Joseph Wang wrote:
> Thanks, but that didn't seem to work. supermin-helper is seeing the file,
> but I'm still getting the same error when it hits the symlink. I'm tryig
> to get it to work by just excluding /etc/init.d from the hostfile
Add multiple -v -v -v options to the supermin-helper command line see
where it's running into trouble. It certainly ought to work if you
create the right directory name beforehand ...
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
11 years, 3 months