search for: parse_release_fil

Displaying 20 results from an estimated 29 matches for "parse_release_fil".

Did you mean: parse_release_file
2013 Jun 14
3
[PATCH 0/2] Fix inspection of Fedora guests (RHBZ#974489).
Here is a preliminary fix for this bug. I'm running the test suite on this now. Rich.
2013 Dec 20
1
[PATCH] inspect: fix detection of newer CirrOS versions (RHBZ#1045450).
...fs *fs) return -1; } + /* CirrOS versions providing a own version file. + */ + else if (guestfs_is_file_opts (g, "/etc/cirros/version", + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { + fs->distro = OS_DISTRO_CIRROS; + + if (parse_release_file (g, fs, "/etc/cirros/version") == -1) + return -1; + + if (guestfs___parse_major_minor (g, fs) == -1) + return -1; + } /* Buildroot (http://buildroot.net) is an embedded Linux distro * toolkit. It is used by specific distros such as Cirros. */ -- 1.8.3.1
2015 May 29
1
[PATCH] inspection: fix CentOS 7 detection
...nux_root (guestfs_h *g, struct inspect_fs *fs) fs->minor_version = 0; } } + else if (guestfs_is_file_opts (g, "/etc/centos-release", + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { + fs->distro = OS_DISTRO_CENTOS; + + if (parse_release_file (g, fs, "/etc/centos-release") == -1) + return -1; + + if (match2 (g, fs->product_name, re_centos_old, &major, &minor) || + match2 (g, fs->product_name, re_centos, &major, &minor)) { + fs->major_version = guestfs_int_parse_unsigned_int (g...
2015 Sep 08
1
[PATCH] inspect: recognize the Frugalware distribution
...s *fs) if (guestfs_int_parse_major_minor (g, fs) == -1) return -1; } + else if (guestfs_is_file_opts (g, "/etc/frugalware-release", + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { + fs->distro = OS_DISTRO_FRUGALWARE; + + if (parse_release_file (g, fs, "/etc/frugalware-release") == -1) + return -1; + + if (match2 (g, fs->product_name, re_frugalware, &major, &minor)) { + fs->major_version = guestfs_int_parse_unsigned_int (g, major); + free (major); + if (fs->major_version == -1) { +...
2016 May 18
0
[PATCH 2/2] inspect: switch to version struct for os major/minor version
...(fs->version.v_major == -1) return -1; - fs->minor_version = 0; + fs->version.v_minor = 0; } } else if (guestfs_is_file_opts (g, "/etc/altlinux-release", @@ -562,18 +530,9 @@ guestfs_int_check_linux_root (guestfs_h *g, struct inspect_fs *fs) if (parse_release_file (g, fs, "/etc/altlinux-release") == -1) return -1; - if (match2 (g, fs->product_name, re_altlinux, &major, &minor)) { - fs->major_version = guestfs_int_parse_unsigned_int (g, major); - free (major); - if (fs->major_version == -1) { - fre...
2016 May 17
3
[PATCH 0/2] src: introduce an helper version struct
Hi, this adds an helper version struct, and uses it in the backends (for the libvirt and qemu versions) and inspection code. This also moves common code to that, so it is not repeated in many places. This should help with the small refactoring proposed with https://www.redhat.com/archives/libguestfs/2016-May/msg00070.html Thanks, Pino Toscano (2): src: start unifying version handling
2016 May 18
3
[PATCH v2 0/2] src: introduce an helper version struct
Hi, this adds an helper version struct, and uses it in the backends (for the libvirt and qemu versions) and inspection code. This also moves common code to that, so it is not repeated in many places. This should help with the small refactoring proposed with https://www.redhat.com/archives/libguestfs/2016-May/msg00070.html Thanks, Pino Toscano (2): src: start unifying version handling
2014 Sep 22
1
[PATCH] inspect: basic Minix support
...Minix root. */ +int +guestfs___check_minix_root (guestfs_h *g, struct inspect_fs *fs) +{ + fs->type = OS_TYPE_MINIX; + + if (guestfs_is_file_opts (g, "/etc/version", + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { + char *major, *minor; + if (parse_release_file (g, fs, "/etc/version") == -1) + return -1; + + if (match2 (g, fs->product_name, re_minix, &major, &minor)) { + fs->major_version = guestfs___parse_unsigned_int (g, major); + free (major); + if (fs->major_version == -1) { + free (minor); +...
2015 Sep 09
2
[PATCH] inspect: try to use /etc/os-release on Linux guests
...and version. --- src/inspect-fs-unix.c | 143 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index 65ab8ef..19975a7 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -141,6 +141,140 @@ parse_release_file (guestfs_h *g, struct inspect_fs *fs, return 0; } +/* Parse a os-release file. + * + * Only few fields are parsed, falling back to the usual detection if we + * cannot read all of them. + * + * For the format of os-release, see also: + * http://www.freedesktop.org/software/systemd/man/os-rel...
2015 Aug 25
2
[PATCH 1/2] inspect: recognize the ALT Linux distribution
...root (guestfs_h *g, struct inspect_fs *fs) fs->minor_version = 0; } } + else if (guestfs_is_file_opts (g, "/etc/altlinux-release", + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { + fs->distro = OS_DISTRO_ALTLINUX; + + if (parse_release_file (g, fs, "/etc/altlinux-release") == -1) + return -1; + + if (match2 (g, fs->product_name, re_altlinux, &major, &minor)) { + fs->major_version = guestfs_int_parse_unsigned_int (g, major); + free (major); + if (fs->major_version == -1) { + fre...
2011 Oct 13
9
[PATCH 1/9] Partially fix --disable-erlang
From: Michael Scherer <misc at zarb.org> Without this, configure will always enable erlang, no matter what argument are passed. Now, we can disable it, even if configure still need the erlang compiler for some obscure reason. --- configure.ac | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 337a3ed..e0bed2f 100644 ---
2014 Dec 02
0
[PATCH 2/5] inspect_os: Add support for detecting OpenBSD
...uct inspect_fs *fs) +{ + if (guestfs_is_file_opts (g, "/etc/motd", + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { + CLEANUP_FREE char *major = NULL, *minor = NULL; + + /* The first line of this file gets automatically updated at boot. */ + if (parse_release_file (g, fs, "/etc/motd") == -1) + return -1; + + if (match2 (g, fs->product_name, re_openbsd, &major, &minor)) { + fs->type = OS_TYPE_OPENBSD; + fs->distro = OS_DISTRO_OPENBSD; + + /* Before the first boot, the first line will look like this: + *...
2015 Aug 12
2
[PATCH 1/2] inspect: recognize the Alpine Linux distribution
..._fs *fs) if (guestfs_int_parse_major_minor (g, fs) == -1) return -1; } + else if (guestfs_is_file_opts (g, "/etc/alpine-release", + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { + fs->distro = OS_DISTRO_ALPINE_LINUX; + + if (parse_release_file (g, fs, "/etc/alpine-release") == -1) + return -1; + + if (guestfs_int_parse_major_minor (g, fs) == -1) + return -1; + } skip_release_checks:; diff --git a/src/inspect-fs.c b/src/inspect-fs.c index 073ae57..94c5bb9 100644 --- a/src/inspect-fs.c +++ b/src/inspect-fs.c...
2014 Dec 03
1
[PATCH 1/4] inspect_os: Add support for detecting OpenBSD
...uct inspect_fs *fs) +{ + if (guestfs_is_file_opts (g, "/etc/motd", + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { + CLEANUP_FREE char *major = NULL, *minor = NULL; + + /* The first line of this file gets automatically updated at boot. */ + if (parse_release_file (g, fs, "/etc/motd") == -1) + return -1; + + if (match2 (g, fs->product_name, re_openbsd, &major, &minor)) { + fs->type = OS_TYPE_OPENBSD; + fs->distro = OS_DISTRO_OPENBSD; + + /* Before the first boot, the first line will look like this: + *...
2015 Jun 02
1
[PATCH 2/3] inspection: Add support for CoreOS
...inspect_fs *fs); /* inspect-fs-windows.c */ extern char *guestfs_int_case_sensitive_path_silently (guestfs_h *g, const char *); diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index 2abbf24..ff50b2a 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -160,11 +160,16 @@ parse_release_file (guestfs_h *g, struct inspect_fs *fs, * DISTRIB_CODENAME=Henry_Farman * DISTRIB_DESCRIPTION="Mandriva Linux 2010.1" * Mandriva also has a normal release file called /etc/mandriva-release. + * + * CoreOS has a /etc/lsb-release link to /usr/share/coreos/lsb-release containing: +...
2015 May 29
2
[PATCH 2/3] inspection: Add support for CoreOS
...inspect_fs *fs); /* inspect-fs-windows.c */ extern char *guestfs_int_case_sensitive_path_silently (guestfs_h *g, const char *); diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index 2abbf24..ff50b2a 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -160,11 +160,16 @@ parse_release_file (guestfs_h *g, struct inspect_fs *fs, * DISTRIB_CODENAME=Henry_Farman * DISTRIB_DESCRIPTION="Mandriva Linux 2010.1" * Mandriva also has a normal release file called /etc/mandriva-release. + * + * CoreOS has a /etc/lsb-release link to /usr/share/coreos/lsb-release containing: +...
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.