- Give the whole entry to file_copy, not just the
destination. This will allow file_copy to work
with local excludes.
- Pluck entry.destination out immediately, to keep
code changes minimal.
- Document the parameters.
- list_excludes() turns the extra mounts from global storage
into --exclude parameters for rsync; it doesn't do anything
with the destination parameter.
- while here rename to something more descriptive
- it's ok if item one creates directories where item two will write,
so don't check for existence of all directories on start-up.
Reported by ArcoLinux.
FIXES: #1252
This adds to the *machineid* module (which generates random UUIDs
for DBus and systemd) another key to configure generation of
a urandom pool in the target from the entropy in the host system.
- Improve documentation of the settings
- If sysconfigSetup is true, **only** setup sysconfig and ignore
the rest. This seems to be consistent with existing openSUSE-
derivative distro's, which set displaymanagers to something
nonsensical.
- the *mount* module inserts a rootMountPoint without trailing /
into global storage, so we can't assume that here. On the other
hand, the paths passed in to the Worker functions are absolute
paths -- adjust the tests to follow that.
- The code in Workers.cpp assumes that rootMountPoint ends in a /
so that it can have filenames appended easily; make the tests
fit that assumption, but still need to check that it is so in
production.
- refactor running the command into a helper function,
to deal with the regular if-command-failed-then-complain pattern.
- mark parameters as unused.
- move distinction about kind of DBus file up into the MachineIdJob
and remove the enum that marked it.
- Testing some of the functionality that's been added just now:
- copyfile fails, buggy implementation
- poolsize fails, buggy implementation
- removefile not tested
- read-urandom or copy-existing-file are implemented
- fairly chatty on failure
- needs tests (probably the implementation should be moved to
a separate file and unit-tested)
- keep the rootMountPoint and the path-with-random-data separate
instead of concatenating them at the beginning. Then we can
use the "clean" names also within the host system.
- this could be named isValid() instead, but basically the idea
is that this code makes sense:
JobResult r = do_thing();
if ( !r ) { /* Error happened! */ return r; }
/* Carry on .. */
- remove existing files for each kind of random-generation
that is enabled. There's a helper function for the case that
Cala is no longer setuid and needs help to remove those files
from the target (e.g. a setuid helper).
FIXES#1181FIXES#1188
You can now copy single files from the source image to the target.
You can now copy directories from the source image to the target.
- Just use the existing rsync code, which can do both
files and directory trees.
- The existing code assumed we were always copying directories.
Now double-check beforehand.