search for: ft_path

Displaying 14 results from an estimated 14 matches for "ft_path".

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
...s(+), 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 debug *) le...
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
2
Re: [supermin 3/3] Use the file tuple up to the point where files are copied into the filesystem / chroot
...ink about this diff? Cheers, -Hilko diff --git a/src/build.ml b/src/build.ml index 9225184..0e2893d 100644 --- a/src/build.ml +++ b/src/build.ml @@ -345,21 +346,21 @@ and munge files = let rec loop = function | [] -> [] - | "/" :: rest -> + | root :: rest when root.ft_path = "/" -> (* This is just to avoid a corner-case in subsequent rules. *) loop rest - | dir :: rest when stat_is_dir dir && dir_seen dir -> + | dir :: rest when stat_is_dir dir.ft_path && dir_seen dir.ft_path -> dir :: loop rest - |...
2014 Mar 10
2
[supermin 2/3] Add file.source_path, no functional changes
...ff --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 --git a/src/package_handler.ml b/src/package_handler.ml ind...
2014 Mar 15
4
[supermin 1/2] chroot: Fix corner case introduced with dpkg-divert support
...--- a/src/chroot.ml +++ b/src/chroot.ml @@ -26,7 +26,9 @@ let build_chroot debug files outputdir = List.iter ( 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...
2015 May 04
1
[PATCH] build: remove unreadable files after filtering
....length files); - (* Remove files from the list which don't exist on the host or are - * unreadable to us. - *) - let files = - List.filter ( - fun file -> - try ignore (lstat file.ft_source_path); true - with Unix_error _ -> - try ignore (lstat file.ft_path); true - with Unix_error _ -> false - ) files in - - if debug >= 1 then - printf "supermin: build: %d files, after removing unreadable files\n%!" - (List.length files); - (* Remove excludefiles from the list. Notes: (1) The current * implementation does...
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
...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 - with Sys_e...
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 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
2015 Dec 02
4
[PATCH 0/3] supermin: add --include-packagelist
Hi, to ease debugging issues with appliances (e.g. when used in libguestfs), using --include-packagelist will add a file containing the list of all the packages used. Thanks, Pino Toscano (3): ext2: add ext2fs_chmod and ext2fs_chown chroot: factor out file copy code Add --include-packagelist src/build.ml | 42 +++++++++++++++++++++++++------ src/chroot.ml | 29
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
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...printf "supermin: build: %d packages, including dependencies\n%!" + (PackageSet.cardinal packages); + + (* List the files in each package. *) + let files = + PackageSet.fold ( + fun pkg files -> + let fs = ph.ph_get_files pkg in + let fs = List.map (fun { ft_path = path } -> path) fs in + fs :: files + ) packages [] in + let files = List.flatten files in + + if debug >= 1 then + printf "supermin: build: %d files\n%!" (List.length files); + + (* Remove files from the list which don't exist on the host or are + * unreadab...