diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-02-19 13:03:39 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-02-20 15:42:06 +0000 |
commit | d71ff3eaa4a55b32659e165efe4b78149ef240cb (patch) | |
tree | 0d89f7495dd2704d28d9d090f261c352a2675e02 /tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc | |
parent | f5723961ef7fc9c71222e8b45e0de39e7f15e90e (diff) | |
download | tbdiff-d71ff3eaa4a55b32659e165efe4b78149ef240cb.tar.gz |
Modify the way to use 'patch' in 'baserock-system-config-sync'.
baserock-sytem-config-sync:
Changes here are caused by a bug found in GNU patch
managing the permissions of the files when using the
patch command like:
patch <file_to_apply_patch> -t -o <output_file>
To reproduce the bug:
echo foo > file1
echo bar > file2
diff -u file1 file2 | patch 1 -t -o file3
ls -l
You can check that the permissions of 'file3' are different
than the permissions of 'file1' or 'file2'.
To avoid the bug, this patch changes the way we are using
patch, using it as following:
patch <file_to_apply_patch> -t
Since the output file is not specified, the output file will
be the file in which we want to apply the patch. And
due we cannot specify the output file, we are copying
the file to the destination directory, and then applying
the patch there.
As a consequence of changing the way of using patch, now
'patch' generates an extra file when patching fails. This
file is added in the test suite also in this commit.
Diffstat (limited to 'tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc')
-rw-r--r-- | tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file7.orig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file7.orig b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file7.orig new file mode 100644 index 0000000..93c46eb --- /dev/null +++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file7.orig @@ -0,0 +1,2 @@ +whereami=v1,vu,v2 +version=v2 |