| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
There's no need to have the appliance filename contain the
repository name it was built from, and this change gives
downstream users more freedom to mix and match libraries
and appliances if they want to.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The appliance was being completely rebuilt every time guestfsd was updated. This
was because make.sh depended on guestfsd, which it had to do because it
called update.sh to install guestfsd.
This fix removes the call to update.sh in make.sh, and therefore the dependency
on guestfsd. The Makefile already includes a rule to run update.sh when guestfsd
is updated, so this was unnecessary.
|
|
|
|
|
|
| |
This is a workaround until
https://bugzilla.redhat.com/show_bug.cgi?id=630583
is fixed (bug in Linux 2.6.36).
|
| |
|
|
|
|
|
| |
It seems that linux-image (ie. the kernel) is omitted in some
versions of the base packages.
|
|
|
|
|
| |
If it's a symlink then the succeeding mount commnd will fail.
Remove it and make a /proc directory.
|
|
|
|
|
| |
It's useful to see what files are in /dev subdirectories
at boot, eg. for looking at virtio-serial ports.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When guestfsd exits, or the user exits the virt-rescue shell, the init script
exits which causes the kernel to panic. This isn't really a functional issue, as
all useful work is done by this point. However, it does cause virt-rescue to
display an unsightly error message.
This patch causes the appliance to power off cleanly before the init script
exits. Note it actually does a reboot rather than a poweroff. This is because
ACPI is disabled in the appliance, meaning poweroff doesn't work, but qemu is
configured not to restart on reboot.
|
|
|
|
|
|
|
|
| |
Core files are not reliably written to disk if guestfsd dumps core. This patch
makes libguestfs do the same appliance cleanup for guestfsd and virt-rescue,
which seems to fix the matter.
It also removes a redundant sleep and additional sync when exiting virt-rescue.
|
|
|
|
| |
Don't print them because no one's listening ...
|
|
|
|
| |
This haven't been used -- and haven't worked -- for a long time.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for opening LUKS-encrypted disks, via
three new APIs:
luks_open: Create a mapping for an encrypted disk.
luks_open_ro: Same, but read-only mapping.
luks_close: Close a mapping.
A typical guestfish session using this functionality looks
like this:
$ guestfish --ro -a encrypted.img
><fs> run
><fs> list-devices
/dev/vda
><fs> list-partitions
/dev/vda1
/dev/vda2
><fs> vfs-type /dev/vda2
crypto_LUKS
><fs> luks-open /dev/vda2 luksdev
Enter key or passphrase ("key"):
><fs> vgscan
><fs> vg-activate-all true
><fs> pvs
/dev/dm-0
><fs> vgs
vg_f13x64encrypted
><fs> lvs
/dev/vg_f13x64encrypted/lv_root
/dev/vg_f13x64encrypted/lv_swap
><fs> mount /dev/vg_f13x64encrypted/lv_root /
><fs> ll /
total 132
dr-xr-xr-x. 24 root root 4096 Jul 21 12:01 .
dr-xr-xr-x 20 root root 0 Jul 21 20:06 ..
drwx------. 3 root root 4096 Jul 21 11:59 .dbus
drwx------. 2 root root 4096 Jul 21 12:00 .pulse
-rw-------. 1 root root 256 Jul 21 12:00 .pulse-cookie
dr-xr-xr-x. 2 root root 4096 May 13 03:03 bin
NOT included in this patch:
- An easier way to use this from guestfish.
- Ability to create LUKS devices.
- Ability to change LUKS keys on existing devices.
- Direct access to the /dev/mapper device (eg. if it contains
anything apart from VGs).
|
|
|
|
| |
See: http://lists.fedoraproject.org/pipermail/devel/2010-June/137953.html
|
| |
|
|
|
|
|
|
|
|
|
| |
In my limited tests, this seems to make a small but noticable
difference, improving the performance of some straightforward
read operations by a little over 10%.
For more information see:
http://kbase.redhat.com/faq/docs/DOC-5428
|
| |
|
| |
|
|
|
|
|
| |
This updates commit a34fadf900625f1f7359ecf3ca760820ffa20815,
removing this now non-existent script from EXTRA_DIST.
|
|
|
|
|
|
|
|
|
| |
On Ubuntu, /etc/init.d/udev is a symlink to an upstart file,
but running that causes the appliance to hang.
Therefore detect if this is a symlink and fall through to the
direct start of udevd. This shouldn't affect Debian because the
file is not a symlink on standard Debian.
|
|
|
|
|
|
|
| |
fuse-utils (a dependency of these) cannot be installed under
debirf because it does something with the system udevd which is
not permitted. Seems to be a bug either in fakeroot or in the
post install scripts for fuse-utils.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For distros using 'yum', packages which cannot be found are just
ignored. This allows us to include for example 'e4fsprogs' on the
list even though that only exists on RHEL 5.
However for Debian-derived distros, missing packages would cause
apt to fail. This was particularly a problem when building Ubuntu
since it doesn't have as complete a list of packages, and the list
changed a lot between releases.
This commit adds a check first for missing packages, ignoring those
and thus acting more like 'yum'.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Since changing to use link local address
(commit fbf29976b33a69c64dc7847c54454bf2cfa5fde6)
we have included an incorrect resolv.conf file in the appliance
which points to the old (qemu) DNS server. This commit changes
to use the new DNS server.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
loop is sometimes a module, for example on RHEL 5.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
We set it on the kernel command line, then get it out from
there when the rescue appliance boots.
|
| |
|
|
|
|
|
|
| |
Change the appliance so PATH includes common directories. Thus
we don't need to hard-code paths to binaries (eg. "/sbin/fdisk")
everywhere.
|
| |
|
|
|
|
|
|
| |
Since we disabled running new-kernel-pkg in febootstrap, this
has meant that the normal appliance has not had a modules.dep
file. (Supermin was unaffected by this).
|
|
|
|
|
| |
virt-rescue lacks an editor. Add vim-minimal (Fedora)
or vim-tiny (Debian) to make up for this omission.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libguestfs-supermin-helper was previously a shell script. Although
we had steadily optimized it, there were a number of intractable
hot spots:
(1) cpio still reads input files in 512 byte chunks; this is *very*
pessimal behaviour, particularly when SELinux is enabled.
(2) the hostfiles globbing was done very inefficiently by the shell,
with the shell rereading the same directory over and over again.
This is a rewrite of this shell script in C. It is approximately
3 times faster without SELinux, and has an even greater speed difference
with SELinux.
The main features are:
(a) It never frees memory, making it simpler. The program is designed
to run and exit in sub-second times, so this is acceptable.
(b) It caches directory reads, making the globbing of host files much
faster (measured this as ~ 4 x speed up).
(c) It doesn't use external cpio, but instead contains code to write
newc format cpio files, which is all that the kernel can read. Unlike
cpio, this code uses large buffers for reads and writes.
(d) Ignores missing or unreadable hostfiles, whereas cpio gave a
warning.
(e) Checks all return values from system calls.
(f) With --verbose flag, it will print messages timing itself.
This passes all tests.
Updated with feedback from Jim Meyering.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ntfs-3g project keeps bumping their soname, and this causes
dependency problems for the Fedora package. The root of the problem
is we depend on /lib/libntfs-3g.so.<N>, but if <N> keeps bumping,
the dependency keeps breaking.
This commit changes the hostfiles (and hence dependency) to be on
/lib/libntfs-3g.so.* instead. The downside to this is we could end
up pulling more files into the appliance than are strictly required,
but it will fix the Fedora packaging problems being felt by the
Fedora maintainer of ntfs-3g.
After applying this commit, the change to hostfiles looks like this:
@@ -1489,7 +1489,7 @@
./lib/libpam_misc.so.0
./lib/libdmraid.so
./lib/libidn.so.11
-./lib/libntfs-3g.so.74
+./lib/libntfs-3g.so.*
./lib/libext2fs.so.2.*
./lib/libpam.so.0
./lib/libsepol.so.1
@@ -1520,7 +1520,6 @@
./lib/libnss_files-*.so
./lib/libgio-2.0.so.0
./lib/libpam_misc.so.0.*
-./lib/libntfs-3g.so.74.*
./lib/libanl.so.1
./lib/libdevmapper-event-lvm2.so.2.*
./lib/libpthread.so.0
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 457fccae1b665347 was not a complete fix, in that it
didn't work properly on RHEL 5 era bash (3.2.x). For example:
file=libntfs-3g.so.74
[[ "$file" =~ ^lib(.*)\.so\.([0-9]+)\. ]] && \
echo "lib${BASH_REMATCH[1]}.so.${BASH_REMATCH[2]}.*"
would on those old shells print:
libntfs-3g.so.7.*
It seems the final \. was being treated as a plain period (ie.
match anything).
The only way to work around this incompatibility is to assign the
patterns to variables and match on those, ie:
p='^lib(.*)\.so\.([0-9]+)\.'
[[ "$file" =~ $p ]] && ...
This works in both old and new shells.
|
|
|
|
|
|
|
|
|
|
| |
Bash changed how the =~ operator worked, see bash FAQ question
E14 http://tiswww.case.edu/php/chet/bash/FAQ and
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487387#25
(RHBZ#566511).
This also stops stray "builddir" (yum database) files being
incorporated into supermin hostfiles in Koji (RHBZ#566512).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hi,
attached patch should make:
http://git.debian.org/?p=pkg-libvirt/libguestfs.git;a=blob;f=debian/patches/0003-appliance-Use-service-udev-start-instead-of-running-.patch;h=c9e6b8489807d4fb1247cb6a8b6f9799bad2a09e;hb=d3a21b5b6850fc3c6e7903d0f5cafa3eb4197d49
http://git.debian.org/?p=pkg-libvirt/libguestfs.git;a=blob;f=debian/patches/0004-Ubuntu-Prefer-starting-udev-by-hand-instead-of-using.patch;h=64b65a971b186e6ab1c9351e94b46d6f5aa242e0;hb=d3a21b5b6850fc3c6e7903d0f5cafa3eb4197d49
superflous. If there's an init script it uses 'service' or falls back to
calling the init script directly if it isn't there, otherwise it starts
udev directly. Tested on Debian only so far. The patch is based on
Rich's above two patches.
Cheers,
-- Guido
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Tue, 23 Feb 2010 18:49:34 +0100
Subject: [PATCH] Check for service and use it if it's there
Based on Richard's two patches for the Ubuntu build.
|
| |
|
| |
|
|
|
|
|
|
| |
Because this file contains the GCC version and a date, it frequently
changes on the host. Create a special case so that this file is
matched using a wildcard for the version/date part of the name.
|