SQLite Archiver

Ticket Change Details
Login
Overview

Artifact ID: e1f31a787b340c3f3004e3ec72f9c3d311cee908
Ticket: f110f1f8a1f3fc2865f35d6b4621cf05a1630051
sqlarfs "ignores" files in directories not also in archive
User & Date: anonymous 2018-05-17 18:28:39
Changes

  1. foundin changed to: "4824e73896"
  2. icomment:
    Quick glance at fossil code suggests they ensure entries are created for parent directories of all files, but that's not the case with either the sqlar or "sqlite3 -A" tools.
    
    I'm suggesting this is a sqlarfs bug, since both the sqlar and "sqlite3 -A" tools seem to have code for handling this during extraction.
    
    Basically:
    
    * Create an SQlite Archive with a single file in it from some directory:
    $ mkdir -p dummy mntpt
    $ echo "foo" > dummy/bar
    $ sqlar sample.sar dummy/bar
    $ sqlar -l sample.sar
    dummy/bar
    $ sqlarfs ./sample.sar./mntpt
    (this runs in the foreground, so execute the following from a different shell)
    $ ls ./mntpt
    $ # should have shown 'dummy', with 'bar' in it!
    -------
    If instead the archive is created as so:
    $ sqlar works.sar dummy
    
    An entry for 'dummy' is created, and the file can be accessed when the archive is mounted with sqlarfs.
    
    ---------------------------
    
    As an aside, is there a reason to not require entries for all "intermediate" directories in the sqlite archive file "tree"? Just curious :).  Doing so would resolve this (of course) but also provides an answer for what permissions such directories should have (consider dummy/a and dummy/b with different permissions, etc.).  But since omitting these seems to be supported (or by design?), and since existing tooling makes it easy to craft archives without them, hopefully this can be resolved in sqlarfs.
    
    Thanks, LMK if there's anything else I can do to clarify or help with this!
    
  3. login: "anonymous"
  4. mimetype: "text/x-fossil-plain"
  5. private_contact changed to: "78013bbae6d989a6a55bfc09498b936a0bdb53a7"
  6. severity changed to: "Severe"
  7. status changed to: "Open"
  8. title changed to:
    sqlarfs "ignores" files in directories not also in archive
    
  9. type changed to: "Code_Defect"