Commit Graph

22 Commits

Author SHA1 Message Date
Lennart Poettering dc2c282b6a import: rename download code from "import" to "pull"
That way we can call the code for local container/VM imports "import"
without confusion.
2015-03-05 00:59:37 +01:00
Lennart Poettering 26166c88e0 importd: automatically grow /var/lib/machines/ loopback filesystem during downloads
If /var/lib/machines is mounted as btrfs loopback file system in
/var/lib/machines.raw with this change we automatically grow the file
system as it fills up. After each 10M we write to it during imports, we
check the free disk space, and if the fill level grows beyond 66% we
increase the size of the file system to 3x the fill level (thus lowering
it to 33%).
2015-03-03 00:13:12 +01:00
Lennart Poettering 63c372cb9d util: rework strappenda(), and rename it strjoina()
After all it is now much more like strjoin() than strappend(). At the
same time, add support for NULL sentinels, even if they are normally not
necessary.
2015-02-03 02:05:59 +01:00
Lennart Poettering 7079cfeffb importd: when listing transfers, show progress percentage
With this change the pull protocol implementation processes will pass
progress data to importd which then passes this information on via the
bus. We use sd_notify() as generic transport for this communication,
making importd listen to them, while matching the incoming messages to
the right transfer.
2015-01-23 01:17:55 +01:00
Lennart Poettering 3d7415f43f import: introduce new mini-daemon systemd-importd, and make machinectl a client to it
The old "systemd-import" binary is now an internal tool. We still use it
as asynchronous backend for systemd-importd. Since the import tool might
require some IO and CPU resources (due to qcow2 explosion, and
decompression), and because we might want to run it with more minimal
priviliges we still keep it around as the worker binary to execute as
child process of importd.

machinectl now has verbs for pulling down images, cancelling them and
listing them.
2015-01-22 04:02:07 +01:00
Lennart Poettering 8b71fce8c2 import: minor cleanups for the tar and raw importers 2015-01-21 20:05:31 +01:00
Lennart Poettering 98c3800184 import: make verification code generic, in preparation for using it pull-tar 2015-01-21 04:03:54 +01:00
Lennart Poettering 3576d6315f import: add image verification using gpg
This also adds an initial keyring for the verification, that contains
Ubuntu's and Fedora's key. We should probably add more entries sooner or
later.
2015-01-21 04:03:54 +01:00
Lennart Poettering 8f6950587a import: make image verification optional 2015-01-20 20:40:44 +01:00
Lennart Poettering 85dbc41dc6 import: add a simple scheme for validating the SHA256 sums of downloaded raw files 2015-01-20 15:06:58 +01:00
Lennart Poettering 0d6e763b48 import: port pull-raw to helper tools implemented for pull-tar
This allows us to reuse a lot more code, and simplify pull-raw
drastically.
2015-01-20 15:06:58 +01:00
Lennart Poettering 56ebfaf1ca import: add support for pulling raw tar balls as containers
Ubuntu provides their cloud images optionally as tarball, hence also
support downloading those.
2015-01-20 15:06:58 +01:00
Lennart Poettering a2e0337875 util: make http url validity checks more generic, and move them to util.c 2015-01-20 15:06:58 +01:00
Lennart Poettering ec5cb56ee1 import: clarify when we are unpacking the qcow2 device 2015-01-19 20:24:10 +01:00
Lennart Poettering 0716faad4a import: make sure don't leak the LZMA context 2015-01-19 20:24:10 +01:00
Lennart Poettering 1e20b41187 import: when downloading raw files, show simple progress reports 2015-01-19 20:24:09 +01:00
Lennart Poettering 2f64ba0e6e import: simplify the code a bit 2015-01-19 20:24:09 +01:00
Lennart Poettering ff6a74609b import-raw: when downloading raw images, generate sparse files if we can 2015-01-19 20:24:09 +01:00
Lennart Poettering 47bc4fd86d import-raw: set NOCOW flag on all raw images we create 2015-01-19 20:24:09 +01:00
Lennart Poettering edce2aed3a import: support importing qcow2 images
With this change the import tool will now unpack qcow2 images into
normal raw disk images, suitable for usage with nspawn.

This allows has the benefit of also allowing importing Ubuntu Cloud
images for usage with nspawn.
2015-01-16 20:09:33 +01:00
Lennart Poettering 49bb233bb7 import: support downloading .xz compressed images
That way we can download fedora cloud raw images as-is and decompress
them on-the-fly.
2015-01-16 20:09:33 +01:00
Lennart Poettering aceac2f0b6 import: rename "gpt" disk image type to "raw"
After all, nspawn can now dissect MBR partition levels, too, hence
".gpt" appears a misnomer. Moreover, the the .raw suffix for these files
is already pretty popular (the Fedora disk images use it for example),
hence sounds like an OK scheme to adopt.
2015-01-15 01:47:21 +01:00
Renamed from src/import/import-gpt.c (Browse further)