[PATCH] appliance: exclude pkg-config, doc-base, and reportbug stuff
by Pino Toscano
Exclude the arch-independent pkg-config files (no pkg-config available
in the appliance).
Exclude also the doc-base and reportbug files, typically found in Debian
systems.
---
appliance/excludefiles.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/appliance/excludefiles.in b/appliance/excludefiles.in
index c107268..a2745b0 100644
--- a/appliance/excludefiles.in
+++ b/appliance/excludefiles.in
@@ -27,8 +27,11 @@ dnl The right kernel modules are added back by supermin.
-/usr/share/gnome/help/*
-/usr/share/cracklib/*
-/usr/share/i18n/*
+-/usr/share/pkgconfig/*
dnl For Debian:
-/usr/share/lintian/*
-/usr/share/initramfs-tools/*
+-/usr/share/doc-base/*
+-/usr/share/bug/*
-/etc/initramfs-tools/*
--
1.9.0
10 years, 7 months
[PATCH] builder: better handle some index parsing errors
by Pino Toscano
Add a new lexer token, unused in the grammar, for the unknown lines in
index files; this should allow to better handle such kind of parsing
errors, removing the need to exit() directly (and leave things in an
unclean state).
---
builder/index-parse.y | 1 +
builder/index-scan.l | 5 +----
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/builder/index-parse.y b/builder/index-parse.y
index f08a683..310870d 100644
--- a/builder/index-parse.y
+++ b/builder/index-parse.y
@@ -78,6 +78,7 @@ typedef void *yyscan_t;
%token EMPTY_LINE
%token PGP_PROLOGUE
%token PGP_EPILOGUE
+%token UNKNOWN_LINE
%type <section> sections section
%type <field> fields field
diff --git a/builder/index-scan.l b/builder/index-scan.l
index 073d85f..e3fe377 100644
--- a/builder/index-scan.l
+++ b/builder/index-scan.l
@@ -29,8 +29,6 @@
#define YY_EXTRA_TYPE struct parse_context *
#define YY_USER_ACTION yylloc->first_line = yylloc->last_line = yylineno;
-extern void yyerror (YYLTYPE * yylloc, yyscan_t scanner, struct parse_context *context, const char *msg);
-
%}
%option nounput
@@ -110,8 +108,7 @@ extern void yyerror (YYLTYPE * yylloc, yyscan_t scanner, struct parse_context *c
/* anything else is an error */
. {
- yyerror (yylloc, yyscanner, yyextra, "unexpected character in input");
- exit (EXIT_FAILURE);
+ return UNKNOWN_LINE;
}
%%
--
1.9.0
10 years, 7 months
[PATCH] src/launch: improve the addition of the no-hpet option
by Pino Toscano
Since HPET is specific to x86, we can safely add it its option only on
x86 and x86_64 when creating the libvirt XML (no more hitting the
launching failures due to that on other architectures).
Regarding the direct qemu launch, since qemu 1.1 (which is our current
minimum) "-ho-hpet" appears in the help only where actually supported,
so we could just checking for it and adding it only if present. This
should fix the architecture issues on this backend as well.
---
src/launch-direct.c | 12 +++---------
src/launch-libvirt.c | 6 ++++--
2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/src/launch-direct.c b/src/launch-direct.c
index 37bf144..bb06c9e 100644
--- a/src/launch-direct.c
+++ b/src/launch-direct.c
@@ -471,15 +471,9 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
/* These are recommended settings, see RHBZ#1053847. */
ADD_CMDLINE ("-rtc");
ADD_CMDLINE ("driftfix=slew");
-#if !defined(__arm__) && !defined(__aarch64__) && !defined(__powerpc__)
- /* qemu-system-arm and qemu-system-ppc64 advertises the -no-hpet option
- * but if you try to use it, it usefully says:
- * "Option no-hpet not supported for this target".
- * Cheers qemu developers. How many years have we been asking for
- * capabilities? Could be 3 or 4 years, I forget.
- */
- ADD_CMDLINE ("-no-hpet");
-#endif
+ if (qemu_supports (g, data, "-no-hpet")) {
+ ADD_CMDLINE ("-no-hpet");
+ }
if (data->qemu_version_major < 1 ||
(data->qemu_version_major == 1 && data->qemu_version_minor <= 2))
ADD_CMDLINE ("-no-kvm-pit-reinjection");
diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
index 8899b1b..4eba851 100644
--- a/src/launch-libvirt.c
+++ b/src/launch-libvirt.c
@@ -1042,9 +1042,11 @@ construct_libvirt_xml_cpu (guestfs_h *g,
} end_element ();
/* libvirt has a bug (RHBZ#1066145) where it adds the -no-hpet
- * flag on ARM & ppc64.
+ * flag on ARM & ppc64 (and possibly any architecture).
+ * Since hpet is specific to x86 & x86_64 anyway, just add it only
+ * for those architectures.
*/
-#if !defined(__arm__) && !defined(__aarch64__) && !defined(__powerpc__)
+#if defined(__i386__) || defined(__x86_64__)
start_element ("timer") {
attribute ("name", "hpet");
attribute ("present", "no");
--
1.9.0
10 years, 7 months