Permalink
Commits on Aug 14, 2017
  1. configure: Further split blocks of text in the script output.

    Commit 0a94cae added useful
    headings to parts of the configure script.  This refactors
    the code by adding a common macro (‘HEADING’), and also changes
    the output so it's clearer at a glance:
    
      --- Checking for Haskell ---
      checking for ghc... (cached) ghc
    
      --- Checking for PHP ---
      checking for php... (cached) php
      checking for phpize... (cached) phpize
    rwmjones committed Aug 12, 2017
  2. v2v: Mention update-crypto-policies in documentation.

    Modern ssh and RHEL 5 sshd are not always interoperable, requiring
    enabling legacy crypto policies on the converion server (ssh client).
    
    Thanks: Nikos Mavrogiannopoulos, Jakub Jelen.
    rwmjones committed Aug 14, 2017
Commits on Aug 9, 2017
  1. valgrind: Ignore everything allocated through caml_stat_alloc.

    As the name suggests, caml_stat* functions are used for allocating
    static blocks.  The OCaml runtime doesn't bother freeing any of these
    on exit.  OCaml 4.05 allocates caml_executable_name this way, a newly
    seen global variable.  We might as well just ignore everything
    allocated this way.
    
    Further information here:
    
      https://github.com/ocaml/ocaml/blob/e7cf3b18467d930a33f378dab9bc8482fa35d43b/byterun/caml/memory.h#L66
    rwmjones committed Aug 9, 2017
  2. Version 1.37.21.

    rwmjones committed Aug 9, 2017
  3. build: Add a common script for generating OCaml dependencies correctly.

    These are generated in many different ways in the various
    subdirectories, and sometimes not generated correctly.  Introduce a
    script to do this in one place, and hopefully correctly.
    
    This is mostly simple refactoring, but I got rid of a couple of
    things:
    
    (1) The ‘make depend’ rule doesn't appear to be needed.  automake (or
    make?)  seems to rebuild the ‘.depend’ file automatically just because
    it is included.
    
    (2) I got rid of the hairy path rewriting sed expression.  Possibly
    that is needed for srcdir != builddir.
    rwmjones committed Aug 8, 2017
Commits on Aug 8, 2017
  1. daemon: lvm: Pass device parameter of lvm_canonical_lv_name as PlainS…

    …tring.
    
    All sorts of strings might be passed here hoping to make them
    canonical LV names.  We cannot be sure that the strings passed will be
    devices which exist in the appliance.
    rwmjones committed Aug 3, 2017
  2. tests: discard: Remove dubious use of "/dev/urandom" as a Device para…

    …meter.
    
    This API docs don't state that this is permitted.
    rwmjones committed Aug 3, 2017
  3. daemon: Refine check for Device and Dev_or_Path parameters (RHBZ#1477…

    …623).
    
    For Device parameters we expect a block device name.  However we were
    only testing for "/dev/..." and so chardevs (from the appliance) could
    be passed here, resulting in strange effects.  This adds a function
    is_device_parameter which tests for a valid block device name.
    
    For Dev_or_Path parameters much the same, except we can also use the
    is_device_parameter function elsewhere in the daemon to distinguish if
    we were called with a device or path parameter.  Previously we used a
    simple test if the path begins with "/dev/...".
    
    Reported by Mathieu Tarral.
    rwmjones committed Aug 3, 2017
  4. daemon: Deduplicate some utility functions.

    The following functions were previously reimplemented in OCaml.  This
    commit replaces them with calls to the C functions:
    
     - is_root_device
     - prog_exists
     - udev_settle
    
    plus the internal get_verbose_flag function.
    
    However note that we cannot do this for every utility function.  In
    particular the C function must not call any reply* functions.
    rwmjones committed Aug 3, 2017
  5. daemon: Move utility functions to a separate file.

    This allows us to share certain utility functions with OCaml code.
    rwmjones committed Aug 3, 2017
Commits on Aug 3, 2017
  1. Version 1.37.20.

    rwmjones committed Aug 3, 2017
  2. daemon: Restore PCRE regular expressions in OCaml code.

    When parts of the daemon were previously converted to OCaml, the
    previous PCRE regexps were converted to Str regexps.  Restore the
    original PCRE regexps.
    
    There was also one case where an original call to glob(3) was replaced
    by a Str regexp, and this is replaced by a PCRE regexp (although it is
    in fact identical in this instance).
    
    This updates commit b48da89
    and commit eeda6ed
    and commit 2ca0fa7.
    rwmjones committed Aug 1, 2017
  3. common: Add a lightweight OCaml binding for PCRE.

    This uses the gnulib TLS macros.
    rwmjones committed Aug 1, 2017
Commits on Aug 2, 2017
Commits on Aug 1, 2017
Commits on Jul 31, 2017
  1. daemon: ntfs: fix name of the ntfs-3g.probe tool in one other place.

    Fixes commit 381c8b6, which forgot to
    add the dash in the name.
    
    See also commit ef53cd5 which fixed
    the same thing elsewhere.
    rwmjones committed Jul 31, 2017
Commits on Jul 29, 2017
Commits on Jul 27, 2017
  1. Version 1.37.19.

    rwmjones committed Jul 27, 2017
  2. daemon: Reimplement ‘part_get_parttype’, ‘part_get_gpt_type’, ‘part_g…

    …et_gpt_guid’ APIs in OCaml.
    rwmjones committed Jun 15, 2017
  3. daemon: Reimplement ‘findfs_uuid’ and ‘findfs_label’ APIs in OCaml.

    This also reimplements the lv_canonical function in OCaml.  We cannot
    call the original C function because it calls reply_with_perror which
    would break the OCaml bindings.
    rwmjones committed Jun 4, 2017
  4. daemon: Reimplement ‘list_filesystems’ API in the daemon, in OCaml.

    Move the list_filesystems API into the daemon, reimplementing it in
    OCaml.  Since this API makes many other API calls, it runs a lot
    faster in the daemon.
    rwmjones committed Jun 4, 2017
  5. daemon: Reimplement ‘file_architecture’ API in OCaml.

    The previously library-side ‘file_architecture’ API is reimplemented
    in the daemon, in OCaml.
    
    There are some significant differences compared to the C
    implementation:
    
     - The C code used libmagic.  That is replaced by calling the ‘file’
       command (because that is simpler than using the library).
    
     - The C code had extra cases to deal with compressed files.  This is
       not necessary since the ‘file’ command supports the ‘-z’ option
       which transparently looks inside compressed content (this is a
       consequence of the change above).
    
    This commit demonstrates a number of techniques which will be useful
    for moving inspection code to the daemon:
    
     - Moving an API from the C library to the OCaml daemon.
    
     - Calling from one OCaml API inside the daemon to another (from
       ‘Filearch.file_architecture’ to ‘File.file’).  This can be done and
       is done with C daemon APIs but correct reply_with_error handling is
       more difficult in C.
    
     - Use of Str for regular expression matching within the appliance.
    rwmjones committed Jun 3, 2017