search for: st_kind

Displaying 20 results from an estimated 70 matches for "st_kind".

2016 Aug 31
0
[PATCH 2/2] Use os-release to detect the distro
...0644 --- a/src/dpkg.ml +++ b/src/dpkg.ml @@ -28,7 +28,8 @@ let dpkg_detect () = Config.dpkg_query <> "no" && Config.dpkg_divert <> "no" && Config.apt_get <> "no" && - try (stat "/etc/debian_version").st_kind = S_REG with Unix_error _ -> false + (List.mem (Os_release.get_id ()) [ "debian"; "ubuntu" ] || + try (stat "/etc/debian_version").st_kind = S_REG with Unix_error _ -> false) let dpkg_primary_arch = ref "" let settings = ref no_settings diff...
2016 Aug 31
8
[PATCH 0/2] supermin: use /etc/os-release
Hi, let's make supermin use /etc/os-release as primary source instead of the various release files in /etc; apparently distros (e.g. openSUSE) are starting removing them. Thanks, Pino Toscano (2): Add simple handling of /etc/os-release Use os-release to detect the distro src/Makefile.am | 3 +++ src/dpkg.ml | 3 ++- src/os_release.ml | 78
2014 Mar 08
9
supermin and dpkg-divert
While trying to run libguestfs tests after building with "--enable-appliance --with-supermin-extra-options=--use-installed", I ran into a peculiar error message in the c-api test: ,---- | libguestfs: error: strings: /abssymlink: strings: error while loading | shared libraries: libbfd-2.24-multiarch.so: cannot open shared object | file: No such file or directory `---- The problem here
2014 Mar 13
3
[supermin 1/3] Recognize dpkg-divert
--- configure.ac | 1 + src/config.ml.in | 1 + src/dpkg.ml | 1 + 3 files changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 2141540..99ea913 100644 --- a/configure.ac +++ b/configure.ac @@ -92,6 +92,7 @@ AC_PATH_PROG(APT_GET,[apt-get],[no]) AC_PATH_PROG(DPKG,[dpkg],[no]) AC_PATH_PROG(DPKG_DEB,[dpkg-deb],[no]) AC_PATH_PROG(DPKG_QUERY,[dpkg-query],[no])
2014 Mar 10
3
[supermin 3/3] Use the file tuple up to the point where files are copied into the filesystem / chroot
...) in if debug >= 1 then @@ -326,7 +326,9 @@ and isalnum = function * symlink. *) and munge files = - let files = List.sort compare files in + let paths = + List.sort compare + (List.map (fun file -> file.ft_path) files) in let rec stat_is_dir dir = try (stat dir).st_kind = S_DIR with Unix_error _ -> false @@ -336,7 +338,7 @@ and munge files = in let insert_dir, dir_seen = - let h = Hashtbl.create (List.length files) in + let h = Hashtbl.create (List.length paths) in let insert_dir dir = Hashtbl.replace h dir true in let dir_seen dir = Has...
2016 Sep 05
2
[supermin][PATCH] Fix rpm/zypper detection on openSUSE Tumbleweed
...@@ -39,7 +39,10 @@ let fedora_detect () =  let opensuse_detect () =    Config.rpm <> "no" && Config.rpm2cpio <> "no" && rpm_is_available () &&      Config.zypper <> "no" && -    try (stat "/etc/SuSE-release").st_kind = S_REG with Unix_error _ -> false +    try +      (stat "/etc/SuSE-release").st_kind = S_REG || +      (stat "/etc/SUSE-brand").st_kind = S_REG +    with Unix_error _ -> false    let mageia_detect () =    Config.rpm <> "no" && Config.rpm2cpio <&...
2014 Mar 10
2
[supermin 2/3] Add file.source_path, no functional changes
...| 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/dpkg.ml b/src/dpkg.ml index c28354a..5a650b8 100644 --- a/src/dpkg.ml +++ b/src/dpkg.ml @@ -166,7 +166,8 @@ let dpkg_get_all_files pkgs = let config = try string_prefix "/etc/" path && (lstat path).st_kind = S_REG with Unix_error _ -> false in - { ft_path = path; ft_config = config } + let cmd = sprintf "%s --truename %s" Config.dpkg_divert path in + { ft_path = path; ft_source_path = path; ft_config = config } ) lines let dpkg_download_all_packages pkgs dir = diff...
2014 Mar 15
4
[supermin 1/2] chroot: Fix corner case introduced with dpkg-divert support
...( fun file -> try - let path = file.ft_source_path in + let path = if file_exists file.ft_source_path + then file.ft_source_path + else file.ft_path in let st = lstat path in let opath = outputdir // file.ft_path in match st.st_kind with @@ -68,7 +70,10 @@ let build_chroot debug files outputdir = (* Second pass: fix up directory permissions in reverse. *) let dirs = filter_map ( fun file -> - let st = lstat file.ft_source_path in + let path = + if file_exists file.ft_source_path then file.ft_sour...
2018 Oct 01
2
[supermin PATCH] rpm: support openSUSE Leap 15
...t;no" && - (List.mem (Os_release.get_id ()) [ "opensuse"; "sled"; "sles" ] || + (List.mem (Os_release.get_id ()) [ "opensuse-leap"; "opensuse"; "sled"; "sles" ] || try (stat "/etc/SuSE-release").st_kind = S_REG with Unix_error _ -> false) let mageia_detect () = diff --git a/tests/test-harder.sh b/tests/test-harder.sh index cfa448a..54362de 100755 --- a/tests/test-harder.sh +++ b/tests/test-harder.sh @@ -29,7 +29,7 @@ if [ -f /etc/os-release ]; then distro=$(. /etc/os-release &&...
2018 Oct 02
1
[supermin PATCH] rpm: generalize openSUSE support
...ase.get_id ()) [ "opensuse-leap"; "opensuse"; "sled"; "sles" ] || + (List.mem (Os_release.get_id ()) [ "sled"; "sles" ] || + string_prefix "opensuse" (Os_release.get_id ()) || try (stat "/etc/SuSE-release").st_kind = S_REG with Unix_error _ -> false) let mageia_detect () = diff --git a/tests/test-harder.sh b/tests/test-harder.sh index 54362de..c827f13 100755 --- a/tests/test-harder.sh +++ b/tests/test-harder.sh @@ -29,7 +29,7 @@ if [ -f /etc/os-release ]; then distro=$(. /etc/os-release &&...
2011 Sep 12
1
[PATCH] febootstrap: Use contents of installed Debian packages instead of downloading and unpacking them.
...s objects such as + "package diverts others to: /path/to/..." *) + let lines = List.filter ( + fun l -> l.[0] = '/' && l.[1] != '.' + ) lines in + let files = List.map ( + fun path -> + let statbuf = lstat path in + let is_dir = statbuf.st_kind = S_DIR in + let config = statbuf.st_kind = S_REG && string_prefix "/etc/" path in + let mode = statbuf.st_perm in + (path, { ft_dir = is_dir; ft_config = config; ft_mode = mode; + ft_ghost = false; ft_size = statbuf.st_size }) + ) lines in + files + +let d...
2015 Aug 10
0
[PATCH 3/4] v2v: copy virtio drivers without guestfs handle leak
...gt; "not-client" - | Vwd_any_variant -> "any") - vwd.vwd_os_arch - vwd.vwd_extension - vwd.vwd_original_source - -let find_virtio_win_drivers virtio_win = - let is_regular_file path = (* NB: follows symlinks. *) - try (Unix.stat path).Unix.st_kind = Unix.S_REG - with Unix.Unix_error _ -> false - in - - let files = - if is_directory virtio_win then ( - let cmd = sprintf "cd %s && find -type f" (quote virtio_win) in - let paths = external_command cmd in - List.map ( - fun path -> -...
2016 Oct 31
0
[PATCH 4/4] rpm: mageia: prefer dnf over urpmi
...Config.fakeroot <> "no" && + ((Config.urpmi <> "no" && Config.fakeroot <> "no") || Config.dnf <> "no") && (Os_release.get_id () = "mageia" || try (stat "/etc/mageia-release").st_kind = S_REG with Unix_error _ -> false) @@ -389,7 +388,10 @@ and opensuse_download_all_packages pkgs dir = and mageia_download_all_packages pkgs dir = let tdir = !settings.tmpdir // string_random8 () in - mageia_download_all_packages_with_urpmi pkgs dir tdir; + if Config.dnf <> &quot...
2017 Sep 01
0
[supermin][PATCH] os-release: use ID_LIKE as a fallback for SUSE detection
...p; rpm_is_available () && Config.zypper <> "no" && (List.mem (Os_release.get_id ()) [ "opensuse"; "sled"; "sles" ] || + List.mem "suse" (Os_release.get_id_like ()) || try (stat "/etc/SuSE-release").st_kind = S_REG with Unix_error _ -> false) let mageia_detect () = -- 2.13.2
2017 Sep 01
0
[supermin][PATCH v2] os-release: use ID_LIKE as a fallback for SUSE detection
...p; rpm_is_available () && Config.zypper <> "no" && (List.mem (Os_release.get_id ()) [ "opensuse"; "sled"; "sles" ] || + List.mem "suse" (Os_release.get_id_like ()) || try (stat "/etc/SuSE-release").st_kind = S_REG with Unix_error _ -> false) let mageia_detect () = -- 2.13.2
2018 Oct 01
0
Re: [supermin PATCH] rpm: support openSUSE Leap 15
...;& > - (List.mem (Os_release.get_id ()) [ "opensuse"; "sled"; "sles" ] || > + (List.mem (Os_release.get_id ()) [ "opensuse-leap"; "opensuse"; "sled"; "sles" ] || > try (stat "/etc/SuSE-release").st_kind = S_REG with Unix_error _ -> false) > > let mageia_detect () = > diff --git a/tests/test-harder.sh b/tests/test-harder.sh > index cfa448a..54362de 100755 > --- a/tests/test-harder.sh > +++ b/tests/test-harder.sh > @@ -29,7 +29,7 @@ if [ -f /etc/os-release ]; then >...
2015 Oct 13
2
[PATCH v2 2/4] v2v: copy virtio drivers without guestfs handle leak
...: vwd_os_variant; - vwd_os_arch : string; (* Architecture, eg "i386", "x86_64". *) - vwd_extension : string; (* File extension (lowercase), eg. "sys" "inf"*) +let is_regular_file path = (* NB: follows symlinks. *) + try (Unix.stat path).Unix.st_kind = Unix.S_REG + with Unix.Unix_error _ -> false - (* Original source of file (for debugging only). *) - vwd_original_source : string; -} -and vwd_os_variant = Vwd_client | Vwd_not_client | Vwd_any_variant - -let print_virtio_win_driver_file vwd = - printf "%s [%d,%d,%s,%s,%s] from %s\n...
2014 Jun 13
3
[PATCH 0/2] sparsify: Add --tmp option to allow specifying temporary directory or block device.
The first patch is just some simple refactoring. See the second patch for a description of the new virt-sparsify --tmp option. I tested this using a loopback device as my temporary block device, and it seems to work fine for me. Federico .. this needs a BZ :-) Rich.
2017 Aug 03
14
[PATCH supermin 0/9] kernel: Multiple fixes to handling of kernels (RHBZ#1477758).
This patch series fixes several problems in the way that supermin handles kernels. The most pressing problem is that supermin doesn't handle bogus vmlinuz files which aren't actual kernels. Along the way there is a lot of clean up. The patches look much better if you view them with ‘-w’. This series will require plenty of time to be tested in Fedora, especially on non-x86 arches.
2015 Aug 10
15
[PATCH 0/4] v2v: simplify driver copying from virtio-win iso
Libguestfs supports passing an ISO image as a source of virtio windows drivers to v2v. That support, however, looks too heavy-weight: in order to access those drivers, a separate guestfs handle is created (and thus a new emulator process is started), which runs until v2v completes. This series attempts to make it simpler and lighter-weight, by making the relevant code more local, and by