search for: ft_config

Displaying 16 results from an estimated 16 matches for "ft_config".

2014 Mar 10
2
[supermin 2/3] Add file.source_path, no functional changes
...pkg.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 --git a/src/package_handler.ml b/src/package_handler.ml index 10a9e3d..5aa27b...
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 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 10
3
[supermin 3/3] Use the file tuple up to the point where files are copied into the filesystem / chroot
...anged, 55 insertions(+), 25 deletions(-) diff --git a/src/build.ml b/src/build.ml index 9225184..205701b 100644 --- a/src/build.ml +++ b/src/build.ml @@ -106,11 +106,7 @@ let rec build debug *) let files = get_all_files packages in let files = - filter_map ( - function - | { ft_config = false; ft_path = path } -> Some path - | { ft_config = true } -> None - ) files in + List.filter (fun file -> not file.ft_config) files in if debug >= 1 then printf "supermin: build: %d files\n%!" (List.length files); @@ -120,9 +116,11 @@ let rec build d...
2018 Dec 03
4
[supermin PATCH 0/2] Create a really empty base.tar.gz
See patch #2 for more explanation. Pino Toscano (2): prepare: keep config_files available for longer prepare: create a really empty base.tar.gz with no config files src/mode_prepare.ml | 87 +++++++++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 35 deletions(-) -- 2.17.2
2018 Dec 03
0
[supermin PATCH 1/2] prepare: keep config_files available for longer
...y_kernel, format, host_cpu, * be missing either from the package or from the filesystem (the * latter case with --use-installed). *) - let files_from = - let config_files = - List.map ( - fun (_, files) -> - filter_map ( - function - | { ft_config = true; ft_path = path } -> Some path - | { ft_config = false } -> None - ) files - ) packages in - let config_files = List.flatten config_files in - - let config_files = List.filter ( - fun path -> - try close_in (open_in (dir // path)); true -...
2018 Dec 03
4
[supermin PATCH v2 0/3] Better handle no config files
This is a "merge" of two previous series: https://www.redhat.com/archives/libguestfs/2018-December/msg00015.html https://www.redhat.com/archives/libguestfs/2018-December/msg00020.html The goal is to handle better situations like: - empty file in the appliance directory - no config files available in the packages to include in an appliance Compared to the two series, the changes are: -
2014 Mar 13
2
Re: [supermin 3/3] Use the file tuple up to the point where files are copied into the filesystem / chroot
...an absolute path. *) let target = if String.length target < 1 || target.[0] <> '/' then @@ -367,24 +368,27 @@ and munge files = else target in if not (dir_seen target) then + let target = {ft_path = target; ft_source_path = target; ft_config = false} in loop (target :: dir :: rest) else dir :: loop rest - | dir :: rest when stat_is_dir dir -> - insert_dir dir; + | dir :: rest when stat_is_dir dir.ft_path -> + insert_dir dir.ft_path; (* Have we seen the parent? *) - let pare...
2013 Apr 11
1
[PATCH] remove leading tabs in zypp driver
...None (* ignore documentation *) else ( (* Skip unreadable files when called as non-root *) @@ -206,7 +206,7 @@ let rec zypp_rpm_list_files pkg = List.map (fun name -> name, { ft_dir = true; ft_ghost = false; ft_config = false; ft_mode = 0o40755; - ft_size = 0 }) dirs in + ft_size = 0 }) dirs in let devs = [ "/dev/null"; "/dev/full"; "/dev/zero"; "/dev/random"; "/dev/urandom"; "/dev/tty"; "...
2013 Apr 09
2
[PATCH 1/2] add run_shell helper
The new run_shell helper is a copy of run_python, and will be used by upcoming changes. Signed-off-by: Olaf Hering <olaf at aepfle.de> --- src/supermin_utils.ml | 9 +++++++++ src/supermin_utils.mli | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/src/supermin_utils.ml b/src/supermin_utils.ml index f98e09a..cb8a27e 100644 --- a/src/supermin_utils.ml +++ b/src/supermin_utils.ml
2013 Aug 19
5
[PATCH v2 0/3 supermin] URPMI & xz support.
Joseph, Please try my modified versions of these patches. These are compile-tested on Fedora and they don't break any existing functionality, but I don't have either urpmi nor a statically-linked xz so I cannot fully test them. I have also fixed detection of zlib (2/3). Rich.
2013 Apr 11
0
[PATCH] skip unreadable files in zypp_rpm_list_files
...x.R_OK]; false with + Unix_error _ -> eprintf "supermin: EPERM %s\n%!" filename; true) then None + else Some (filename, { ft_dir = mode land 0o40000 <> 0; ft_ghost = test_flag 'g'; ft_config = test_flag 'c'; ft_mode = mode; ft_size = size; }) + ) | _ -> eprintf "supermin: bad output from rpm command: '%s'" line; exit 1
2011 Sep 12
1
[PATCH] febootstrap: Use contents of installed Debian packages instead of downloading and unpacking them.
...nes 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 debian_list_files pkg = + if List.exists ((=) pkg) installed_pkgs then + debian_list_files_installed pkg + else + debian_list_files_downloaded pkg + (* Easy because we already un...
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
..._list pkgs = + List.fold_right PackageSet.add pkgs PackageSet.empty + +type settings = { + debug : int; + tmpdir : string; + packager_config : string option; +} + +let no_settings = + { debug = 0; tmpdir = "/nowhere"; packager_config = None; } + +type file = { + ft_path : string; + ft_config : bool; +} + +type package_handler = { + ph_detect : unit -> bool; + ph_init : settings -> unit; + ph_package_of_string : string -> package option; + ph_package_to_string : package -> string; + ph_package_name : package -> string; + ph_get_requires : package -> PackageSet.t;...
2014 Mar 15
5
A few easy dpkg optimizations for supermin
I have done some printf profiling and found that supermin's calls to dpkg for individual packages are quite expensive. Here are some patches that gather all information on demand where possible. On my Debian/unstable-based workstation at home, preparing a minimal appliance using $ ./supermin --use-installed --prepare bash -o supermin.d now takes ~3.5s (previously ~15s). Turning that
2014 Sep 17
4
[PATCH 0/2] supermin: use librpm for rpm support
Hi, this work makes supermin use the rpm library instead of invoking rpm directly. This, together with a needed refactoring of the dependency resolution, should help in make supermin faster on rpm-based systems. Surely the patches will still need polishing, especially for behaviours of newly added stuff, but at least it's a good starting point. Noting that you need rpm-devel on most of rpm