DragonFlyBSD bugtracker: Issueshttps://bugs.dragonflybsd.org/https://bugs.dragonflybsd.org/favicon.ico?16293952082017-09-27T22:09:28ZDragonFlyBSD bugtracker
Redmine DragonFlyBSD - Submit #3067 (Closed): cpdup: multiple bug fixes regarding file flagshttps://bugs.dragonflybsd.org/issues/30672017-09-27T22:09:28Zasomers
<p>I've posted patches for two bug fixes for cpdup to the bug tracker.<br />The first fixes handling of the UF_ARCHIVE file flag for destination<br />filesystems that support it. It's mostly relevant for downstream<br />consumers of cpdup like FreeBSD. The second fixes deleting<br />directories that have certain file flags set. It's relevant for<br />Dragonfly and all cpdup consumers. Could somebody please review these<br />patches?</p>
<p><a class="external" href="https://bugs.dragonflybsd.org/issues/2987">https://bugs.dragonflybsd.org/issues/2987</a><br /><a class="external" href="https://bugs.dragonflybsd.org/issues/2988">https://bugs.dragonflybsd.org/issues/2988</a></p>
<p>-Alan</p> DragonFlyBSD - Submit #2988 (Closed): cpdup should ignore UF_ARCHIVE when deciding whether to cop...https://bugs.dragonflybsd.org/issues/29882017-03-24T22:47:52Zasomers
<p>On operating systems that support it (including Illumos, FreeBSD, and Windows), the UF_ARCHIVE flag means that a file needs to be archived. Filesystems that support this flag (including msdosfs and ZFS) will set it automatically when the file is created.</p>
<p>When deciding whether to copy a file, cpdup should ignore the UF_ARCHIVE file flag. If that flag is supported by the destination file system but it's cleared on a source file, then multiple invocations of cpdup would all copy the source file because its flags wouldn't match. OTOH, if the destination filesystem doesn't support UF_ARCHIVE, then there's no point in cpdup setting it.</p>
<p>Steps to reproduce, using ZFS on FreeBSD:<br />$ mkdir src dst<br />$ touch src/foo<br />$ chflags 0 src/foo<br />$ cpdup -v src dst<br />dst/foo copy-ok<br />$ cpdup -v src dst<br />dst/foo copy-ok</p> DragonFlyBSD - Bug #2987 (Closed): cpdup should retry rmdir after chflagshttps://bugs.dragonflybsd.org/issues/29872017-03-24T21:59:51Zasomers
<p>If cpdup fails to remove an ordinary file, it will try clearing file flags and attempt to remove it again. However, cpdup doesn't currently do that for directories.</p>
<p>Steps to reproduce:<br />dfly46# mkdir src dst<br />dfly46# mkdir dst/dir<br />dfly46# touch dst/file<br />dfly46# chflags schg dst/dir dst/file<br />dfly46# cpdup src dst<br />remove dst/dir (Yes/No) [No]? y<br />remove dst/file (Yes/No) [No]? y<br />dst/dir rmdir failed: Operation not permitted</p>