]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
import: don't create sparse tar archives 998/head
authorVincent Batts <vbatts@hashbangbash.com>
Thu, 20 Aug 2015 17:56:19 +0000 (13:56 -0400)
committerVincent Batts <vbatts@hashbangbash.com>
Thu, 20 Aug 2015 17:56:19 +0000 (13:56 -0400)
Sparse archives are good for files like utmp/wtmp and journals, but it
is still expenseive in having to read the files twice to archive them.
Additionally there is a supportability issue as GNU sparse archives are
not supported by many archive libraries and tooling.

src/import/import-common.c

index 950c7b4acd6b185f86206b208932685a69a64aa4..d8a3bbc2498f96220358bbcb513e0ceee86ab018 100644 (file)
@@ -210,7 +210,7 @@ int import_fork_tar_c(const char *path, pid_t *ret) {
                 if (r < 0)
                         log_error_errno(r, "Failed to drop capabilities, ignoring: %m");
 
-                execlp("tar", "tar", "--sparse", "-C", path, "-c", ".", NULL);
+                execlp("tar", "tar", "-C", path, "-c", ".", NULL);
                 log_error_errno(errno, "Failed to execute tar: %m");
                 _exit(EXIT_FAILURE);
         }