Displaying 18 results from an estimated 18 matches for "fnm_noescape".
2014 Apr 26
2
[supermin] Be smarter about finding suitable kernel images
...el debug host_cpu copy_kernel kernel =
copy_or_symlink_file copy_kernel kernel_file kernel;
kernel_name, kernel_version
-and kernel_filter patt is_arm all_files =
+and kernel_filter patterns is_arm all_files =
let files =
List.filter
- (fun filename -> fnmatch patt filename [FNM_NOESCAPE]) all_files in
+ (fun filename ->
+ List.exists
+ (fun patt -> fnmatch patt filename [FNM_NOESCAPE]) patterns
+ ) all_files in
let files =
List.filter (fun filename -> find filename "xen" = -1) files in
let files =
@@ -110,15 +121,16 @@ and ke...
2014 Apr 28
2
Re: [supermin] Be smarter about finding suitable kernel images
* Richard W.M. Jones:
> On Sat, Apr 26, 2014 at 02:27:07PM +0200, Hilko Bengen wrote:
>> ---
>> src/kernel.ml | 43 ++++++++++++++++++++++++++++---------------
>> 1 file changed, 28 insertions(+), 15 deletions(-)
>>
>> diff --git a/src/kernel.ml b/src/kernel.ml
>> index ed5aea3..436b1b0 100644
>> --- a/src/kernel.ml
>> +++ b/src/kernel.ml
2016 Dec 14
1
Re: [PATCH v2 3/4] sysprep: Add a new operation to remove editor backup files (RHBZ#1401320).
...when not (is_reg mode) -> ()
> + | dir, Some filename, _ ->
> + (* Check the filename against all of the globs, and if it
> + * matches any then delete it.
> + *)
> + let matching glob = fnmatch glob filename [FNM_NOESCAPE] in
> + if List.exists matching globs then (
Considering the current globs are basically filename suffixes, wouldn't
it be easier (and possibly faster too) to just check for them?
let suffixes = [ ".bak"; "~" ] in
...
if List.exists (String.is_suff...
2016 Dec 14
6
[PATCH v2 0/4] sysprep: Remove various backup files.
In v2:
- The backup-files operation now operates on a conservative whitelist
of filesystems, so it won't touch anything in /usr. Consequently
it also runs much more quickly, about 4 seconds on the barebones
virt-builder fedora-25 image.
- Call Gc.compact () in visit_tests.
- Added documentation to fnmatch.mli.
2017 Feb 22
4
[PATCH 0/3] v2v: vCenter: Remove proxy environment variables
Fix for:
https://bugzilla.redhat.com/show_bug.cgi?id=1354507
Main explanation is in patch #3.
Rich.
2016 Dec 14
4
[PATCH 0/4] sysprep: Remove various backup files.
https://bugzilla.redhat.com/show_bug.cgi?id=1401320
This series contains two new operations.
The second -- and least controversial -- is "passwd-backups" which
removes files such as /etc/passwd-, /etc/shadow- and so on.
The first one ("backup-files") searches the whole guest filesystem for
any regular file which looks like an editor backup file, such as "*~"
and
2014 Jun 03
2
Re: libguestfs supermin error
Hi Rich
But there is no src/kernel.ml file on my ubuntu powerpc to which the
above patch is reffering.
I have installed supermin as supermin_5.1.8-2_powerpc.deb debian package.
Thanks
On Tue, Jun 3, 2014 at 7:16 PM, Richard W.M. Jones <rjones@redhat.com>
wrote:
> On Tue, Jun 03, 2014 at 06:55:49PM +0530, abhishek jain wrote:
> > supermin: failed to find a suitable kernel
2016 Dec 14
5
[PATCH v3 0/5] sysprep: Remove various backup files.
v3:
- Split out test for "unix-like" guest OSes into separate commit.
- Add guestfish --format=qcow2 to the test (x2).
Rich.
2014 Jun 04
2
Re: libguestfs supermin error
...copy_or_symlink_file copy_kernel kernel_file kernel;
> kernel_name, kernel_version
>
> and kernel_filter patterns is_powerpc all_files =
> let files =
> List.filter
> (fun filename ->
> List.exists
> (fun patt -> fnmatch patt filename [FNM_NOESCAPE]) patterns
> ) all_files in
> let files =
> List.filter (fun filename -> find filename "xen" = -1) files in
> let files =
> if not is_powerpc then files
> else (
> List.filter (fun filename ->
> find filename "lpae&qu...
2016 Dec 14
0
[PATCH v2 3/4] sysprep: Add a new operation to remove editor backup files (RHBZ#1401320).
...| _, Some _, mode when not (is_reg mode) -> ()
+ | dir, Some filename, _ ->
+ (* Check the filename against all of the globs, and if it
+ * matches any then delete it.
+ *)
+ let matching glob = fnmatch glob filename [FNM_NOESCAPE] in
+ if List.exists matching globs then (
+ let path = full_path dir (Some filename) in
+ g#rm_f path
+ )
+ )
+ )
+ ) fses
+
+let op = {
+ defaults with
+ name = "backup-files";
+ enabled_by_default = true;
+...
2007 Oct 21
0
Taking a stab at a pure Ruby Dir.glob
...a3.h a4.rb/,
base(MyDir.glob(''foo/**/a*'')))
assert_equal([], MyDir.glob(''**/x*''))
end
def test_glob_flags
assert_nothing_raised{ MyDir.glob("*", File::FNM_DOTMATCH) }
assert_nothing_raised{ MyDir.glob("*", File::FNM_NOESCAPE) }
assert_nothing_raised{ MyDir.glob("*", File::FNM_PATHNAME) }
assert_nothing_raised{ MyDir.glob("*", File::FNM_CASEFOLD) }
end
def test_glob_expected_errors
assert_raises(TypeError){ MyDir.glob("*", "*") }
end
def tear...
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
...re (lstat file.ft_source_path); true
+ with Unix_error (err, fn, _) ->
+ try ignore (lstat file.ft_path); true
+ with Unix_error (err, fn, _) -> false
) files in
if debug >= 1 then
@@ -139,9 +137,9 @@ let rec build debug
else (
let fn_flags = [FNM_NOESCAPE] in
List.filter (
- fun path ->
+ fun file ->
List.for_all (
- fun pattern -> not (fnmatch pattern path fn_flags)
+ fun pattern -> not (fnmatch pattern file.ft_path fn_flags)
) appliance.excludefiles
) files
)...
2010 Mar 11
2
[PATCH FOR DISCUSSION ONLY] Rewrite libguestfs-supermin-helper in C.
...39; && hostcpu[3] == '6' &&
+ hostcpu[4] == '\0')
+ patt = "vmlinuz-*.i?86*";
+ else {
+ snprintf (tmp, sizeof tmp, "vmlinuz-*.%s*", hostcpu);
+ patt = tmp;
+ }
+ char **candidates;
+ candidates = filter_fnmatch (all_files, patt, FNM_NOESCAPE);
+ candidates = filter_notmatching_substring (candidates, "xen");
+
+ if (candidates[0] == NULL) {
+ /* In original: ls -1dvr /boot/vmlinuz-* 2>/dev/null | grep -v xen */
+ patt = "vmlinuz-*";
+ candidates = filter_fnmatch (all_files, patt, FNM_NOESCAPE);
+ can...
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...if (!patt)
- error (EXIT_FAILURE, 0, "%s: line %zu: invalid pattern\n(is this file a supermin appliance hostfiles file?)",
- hostfiles_file, i+1);
- *patt++ = '\0';
-
- char **files = read_dir (dirname);
- files = filter_fnmatch (files, patt, FNM_NOESCAPE);
-
- /* Add matching files. */
- for (j = 0; files[j] != NULL; ++j) {
- char *tmp = xasprintf ("%s/%s", dirname, files[j]);
-
- if (verbose >= 2)
- fprintf (stderr, "including host file %s (matches %s)\n", tmp, patt);
-
- writer->wr...
2013 Sep 06
2
[PATCH supermin 0/2] helper: Implement device trees.
This two-part patch for supermin implements device trees (for ARM).
The first patch introduces a more rational way to handle command line
arguments in 'supermin-helper'. See the commit message for details.
The old style is still supported for compatibility.
The second patch adds an extra supermin-helper --dtb parameter
specifying a wildcard. A device tree file which matches the
2016 Dec 07
5
[PATCH 0/3] Miscellaneous improvements to supermin.
Document what each module does, using *.mli files.
Remove the --dtb option, it's obsolete.
Rename modules according to their purpose.
Rich.