-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi,
from the commit message: f4d367a6 dropped the check if the bind target exists and added "--no-clobber" to the cp call. For directories this does not work as desired: cp checks per (recursive) file instead of once for the specified directory. This leads to strange behavior. For example if /test is configured as bind-dir and the template contains a file /test/foo, you can edit /test/foo in a AppVM but if you delete it it will be readded. So this patch readds the check if the target dir already exists. @Patrick: CC'ing you to ensure that I didn't miss a use case. Side note: The mount will fail if the target is a file and the source a dir or vice versa. But this was already the case before f4d367a6. HW42 -----BEGIN PGP SIGNATURE----- iQIsBAEBCgAWBQJXxhkeDxxodzQyQGlwc3Vtai5kZQAKCRDkrMknimRoFknpEACl Vm/t7guEAA2+ojIJCIZvy2nv9Dpj4uHLfj+4S6788HpRaJcyXEXtGZb5sRJeEQ12 4glodpUe/8fGI6ZtzHxt2GOCLEEImCaBc29GHr/s2QwkURUyxSe7hfSCC3dKg9tW Ma7hbuEmh6KFLx9U9YV0AL/2FJOQ1J4XN3QCrommcn3IwGEvOU4APGgAtPf/Hn9t Ms4prb9sYdvTmt4AS5BCz5EiGIz21zH4dAjrGBTupC8STw+oMJNSKjaLpizUeYCc a6f6A7DwU8fD1MR4s8T/K4fqBNB5gdTyJGZMgflJVGtu2FiVt273NZ+l9m0ELExR id4Cat17I9OuM7p/MD4kfnhgTX0OfmMHerR8WlgwZRoX7if3DMFmx+q1aaof7+1D F8Ey68vkS8Jq8rZylCqIwkLdqC/Fu4rxIW86d6ckpdSRPPIhIHoyesMndJQzb/At IddWIyDkZtqq/0gIHsRSbDXDfOwNQeW/1J+/VFY0YKJkFTcaMyaBE7BCWM3YqqJl OMuZ8bqIY+5QoqXYkp8ZEBTFJiJ6a0MVtQzBQbujEw4QxODJfmmyU2KJwdvTFZf5 832lk6S9zxjKwEX6LwoIsYPeoFx87VXCtVo7cn5FtagMNUMaN9vOtMFbitKxEsTJ WekYO6QB2iK3MrdrxPeMCcA2aIM1gm1MA66o3IqKKQ== =Jajh -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "qubes-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-devel/b2bcfcf1-63eb-e3c0-bebc-00b2c2bdcaa5%40ipsumj.de. For more options, visit https://groups.google.com/d/optout.
>From 25809d20559efe85623c90b85b1d83b34440aa74 Mon Sep 17 00:00:00 2001 From: HW42 <[email protected]> Date: Sun, 28 Aug 2016 18:35:03 +0200 Subject: [PATCH] bind-dirs: copy from ro only if bind target doesn't exists f4d367a6 dropped the check if the bind target exists and added "--no-clobber" to the cp call. For directories this does not work as desired: cp checks per (recursive) file instead of once for the specified directory. --- vm-systemd/bind-dirs.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vm-systemd/bind-dirs.sh b/vm-systemd/bind-dirs.sh index 70745c1..c364e8c 100755 --- a/vm-systemd/bind-dirs.sh +++ b/vm-systemd/bind-dirs.sh @@ -95,7 +95,9 @@ bind_dirs() { # Initially copy over data directories to /rw if rw directory does not exist. if [ -d "$fso_ro" ] || [ -f "$fso_ro" ]; then - cp --verbose --no-clobber --archive --recursive --parents "$fso_ro" "$rw_dest_dir" + if ! [ -d "$fso_rw" -o -f "$fso_rw" ]; then + cp --verbose --archive --recursive --parents "$fso_ro" "$rw_dest_dir" + fi else true "$fso_ro is neither a directory nor a file or does not exist, skipping." continue -- 2.9.3
0001-bind-dirs-copy-from-ro-only-if-bind-target-doesn-t-e.patch.sig
Description: PGP signature
