Displaying 20 results from an estimated 21 matches for "read_package".
2017 Feb 24
0
[PATCH v2 3/3] inspect: read more fields for RPM packages
...rpm_name (guestfs_h *g,
#define RPMTAG_RELEASE 1002
#define RPMTAG_EPOCH 1003
#define RPMTAG_ARCH 1022
+#define RPMTAG_URL 1020
+#define RPMTAG_SUMMARY 1004
+#define RPMTAG_DESCRIPTION 1005
static char *
get_rpm_header_tag (guestfs_h *g, const unsigned char *header_start,
@@ -329,7 +332,8 @@ read_package (guestfs_h *g,
struct read_package_data *data = datav;
struct rpm_name nkey, *entry;
CLEANUP_FREE char *version = NULL, *release = NULL,
- *epoch_str = NULL, *arch = NULL;
+ *epoch_str = NULL, *arch = NULL, *url = NULL, *summary = NULL,
+ *description = NULL;
int32_t epoch;...
2017 Feb 23
2
[PATCH 1/3] inspect: add source and summary to internal add_application
...ch, const char *install_path, const char *publisher, const char *url, const char *source, const char *summary, const char *description);
static void sort_applications (struct guestfs_application2_list *);
/* The deprecated guestfs_inspect_list_applications call, which is now
@@ -369,7 +369,7 @@ read_package (guestfs_h *g,
/* Add the application and what we know. */
if (version && release)
add_application (g, data->apps, entry->name, "", epoch, version, release,
- arch ? arch : "", "", "", "", "");...
2018 Feb 15
3
[PATCH v2 0/2] inspect: basic UTF-8 encoding for rpm
This needs Richard's patch:
https://www.redhat.com/archives/libguestfs/2018-February/msg00099.html
Diff to v1:
* factorized the UTF-8 conversion functions
* small style fixes
Cédric Bosdonnat (2):
common: extract UTF-8 conversion function
inspector: rpm summary and description may not be utf-8
common/utils/guestfs-utils.h | 1 +
common/utils/libxml2-utils.c
2018 Feb 15
0
[PATCH v2 2/2] inspector: rpm summary and description may not be utf-8
...e
* header format, see:
- * http://www.rpm.org/max-rpm/s1-rpm-file-format-rpm-file-format.html#S2-RPM-FILE-FORMAT-HEADER
+ * http://rpm.org/devel_doc/file_format.html#24-header-format
*/
/* The minimum header size that makes sense here is 24 bytes. Four
@@ -301,6 +303,20 @@ struct read_package_data {
struct guestfs_application2_list *apps;
};
+static char *
+to_utf8 (guestfs_h *g, char *input)
+{
+ char *out = NULL;
+
+ out = guestfs_int_string_to_utf8 (input, "UTF-8");
+ if (!out) {
+ out = guestfs_int_string_to_utf8 (input, "ISO-8859-1");
+ perrorf (g...
2018 Feb 28
0
[PATCH v3 2/2] inspector: rpm summary and description may not be utf-8
...e
* header format, see:
- * http://www.rpm.org/max-rpm/s1-rpm-file-format-rpm-file-format.html#S2-RPM-FILE-FORMAT-HEADER
+ * http://rpm.org/devel_doc/file_format.html#24-header-format
*/
/* The minimum header size that makes sense here is 24 bytes. Four
@@ -301,6 +303,20 @@ struct read_package_data {
struct guestfs_application2_list *apps;
};
+static char *
+to_utf8 (guestfs_h *g, char *input)
+{
+ char *out = NULL;
+
+ out = guestfs_int_string_to_utf8 (input, "UTF-8");
+ if (!out) {
+ out = guestfs_int_string_to_utf8 (input, "ISO-8859-1");
+ perrorf (g...
2017 Feb 24
3
[PATCH v2 1/3] inspect: add source and summary to internal add_application
...ch, const char *install_path, const char *publisher, const char *url, const char *source, const char *summary, const char *description);
static void sort_applications (struct guestfs_application2_list *);
/* The deprecated guestfs_inspect_list_applications call, which is now
@@ -369,7 +369,7 @@ read_package (guestfs_h *g,
/* Add the application and what we know. */
if (version && release)
add_application (g, data->apps, entry->name, "", epoch, version, release,
- arch ? arch : "", "", "", "", "");...
2018 Feb 14
1
[PATCH] inspector: rpm summary and description may not be utf-8
...e
* header format, see:
- * http://www.rpm.org/max-rpm/s1-rpm-file-format-rpm-file-format.html#S2-RPM-FILE-FORMAT-HEADER
+ * http://rpm.org/devel_doc/file_format.html#24-header-format
*/
/* The minimum header size that makes sense here is 24 bytes. Four
@@ -301,6 +302,66 @@ struct read_package_data {
struct guestfs_application2_list *apps;
};
+static char *
+to_utf8 (guestfs_h *g, char *input)
+{
+ iconv_t cd_utf8_utf8 = (iconv_t)(-1);
+ iconv_t cd_utf8_latin1 = (iconv_t)(-1);
+ size_t in_left, out_left, res;
+ char *in_ptr;
+ char *out_ptr;
+ char *output = NULL;
+ char *re...
2018 Feb 28
2
[PATCH v3 0/2] inspect: basic UTF-8 encoding for rpm
Diff to v2:
* inlined local_string_to_utf8
Cédric Bosdonnat (2):
common: extract UTF-8 conversion function
inspector: rpm summary and description may not be utf-8
common/utils/guestfs-utils.h | 11 +++++
common/utils/libxml2-utils.c | 69 +--------------------------
common/utils/utils.c | 64 +++++++++++++++++++++++++
2012 Oct 15
1
[PATCH for discussion] lib: update inspect_list_applications to return app_arch
Here's a partially implemented fix for RHBZ#859949. Seeing as this is
my first libguestfs patch, I'd like some other eyeballs on it to make
sure I've not done anything completely crazy.
If the rpm case looks ok, I'll update the deb and windows cases
if/where applicable.
2012 Oct 29
1
[PATCH] lib: update inspect_list_applications to return all installed RPMs (RHBZ#859885)
...ields);
+
+ while (cursor < store && cursor < header_start + header_len) {
+ if (be32toh (*(uint32_t *) cursor) == tag){
+ offset = be32toh(*(uint32_t *) (cursor + 8));
+ return safe_strdup(g, store + offset);
+ }
+ cursor += 16;
+ }
+
+ return NULL;
+}
+
struct read_package_data {
struct rpm_names_list *list;
struct guestfs_application_list *apps;
@@ -194,16 +230,13 @@ read_package (guestfs_h *g,
{
struct read_package_data *data = datav;
struct rpm_name nkey, *entry;
- char *p;
- size_t len;
- ssize_t max;
- char *nul_name_nul, *version, *release;
+...
2012 Nov 01
2
[PATCH 0/2] New inspect_list_applications2 API
Here's the new API method and update to virt-inspector. I still need
to implement app_arch for debian and windows (if applicable), for now
they just return empty strings.
2013 Jan 25
4
[PATCH 0/3] Use __attribute__((cleanup(...)))
This patch series changes a small part of the library to use
__attribute__((cleanup(...))) to automatically free memory when
pointers go out of the current scope.
In general terms this seems to be a small win although you do have to
use it carefully. For functions where you can completely get rid of
the "exit code paths", it can simplify things. For a good example,
see the
2012 Nov 01
4
[PATCH v2 0/3] New inspect_list_applications2 API
Here's the new API method and update to virt-inspector. I still need
to implement app_arch for debian and windows (if applicable), for now
they just return empty strings.
New in v2: incorporated feedback from v1, also added patch #3 which
updates the documentation where it references the deprecated API.
Take it or leave it.
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers.
These aren't valid for global names in C++.
(http://stackoverflow.com/a/228797)
These large but completely mechanical patches change the illegal
identifiers to legal ones.
Rich.
2017 Jul 21
10
[PATCH v10 00/10] Reimplement inspection in the daemon.
v9 was here:
https://www.redhat.com/archives/libguestfs/2017-July/msg00139.html
This depends on these three series (the first two being single minor
patches):
https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html
https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html
https://www.redhat.com/archives/libguestfs/2017-July/msg00215.html
There is no substantive change. I
2017 Jul 17
12
[PATCH v9 00/11] Reimplement inspection in the daemon.
This depends on the patch series
"[PATCH 00/27] Reimplement many daemon APIs in OCaml."
(https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html)
v8 was posted here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00274.html
v9:
- I split up the mega-patch into a more reviewable series of
smaller, incremental patches.
There are some other changes vs v8, but
2017 Aug 09
16
[PATCH v12 00/11] Reimplement inspection in the daemon.
This fixes almost everything. Note that it adds an extra commit which
fixes the whole utf8/iconv business.
It's probably better to list what isn't fixed:
(1) I didn't leave the osinfo code around because I'm still haven't
looked too closely at virt-builder-repository. Can't we just fetch
this code from the git history when we need it?
(2) I didn't change the way
2017 Jul 31
16
[PATCH v11 00/10] Reimplement inspection in the daemon.
v10: https://www.redhat.com/archives/libguestfs/2017-July/msg00245.html
No actual change here, but I rebased and retested. Also this series
now does not depend on any other patch series since everything else
needed is upstream.
Rich.
2017 Jun 19
29
[PATCH v7 00/29] Reimplement inspection in the daemon.
v6 was posted here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00103.html
and this requires the utilities refactoring posted here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00169.html
Inspection is now complete[*], although not very well tested. I'm
intending to compare the output of many guests using old & new
virt-inspector to see if I can find any
2017 Jun 15
45
[PATCH v6 00/41] Refactor utilities, reimplement inspection in the daemon.
v5:
https://www.redhat.com/archives/libguestfs/2017-June/msg00065.html
Since v5, this now implements inspection almost completely for Linux
and Windows guests.
Rich.