bugQuilt - Bugs: bug #21109, chmod 000 is bad for rsync

 
 

bug #21109: chmod 000 is bad for rsync

Submitted by:  None
Submitted on:  Tue 18 Sep 2007 02:15:01 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Wont Fix
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 19 Sep 2007 08:19:26 PM UTC, comment #5:

backup-files is mostly used for restoring files in quilt pop. In the common case, when pushing patches, patch's --backup option creates the backup files.

Andreas Gruenbacher <agruen>
Project Administrator
Wed 19 Sep 2007 08:10:22 PM UTC, comment #4:

What do you mean with "after the fact"? AFAICT, backup-files doesn't really run patch to create the backup files. If it does, then I agree quilt really isn't the right place to fix this.

Alexandre Oliva <oliva>
Wed 19 Sep 2007 04:27:21 PM UTC, comment #3:

That sounds more acceptable, even though I really dislike fixing things up after the fact.

Andreas Gruenbacher <agruen>
Project Administrator
Wed 19 Sep 2007 02:49:36 PM UTC, comment #2:

Aha, thanks, I didn't realize this behavior was inherited/mimicked from patch.

But then, since this behavior is duplicated in backup-files, and since changing the mode of the empty backup file doesn't really change the behavior of quilt in any way, would you perhaps consider a patch that made the mode of empty backup files configurable from .quiltrc and/or environment variables?

Thanks,

Alexandre Oliva <oliva>
Tue 18 Sep 2007 11:26:19 PM UTC, comment #1:

backup-files simply does the same as GNU patch, which uses backup files with a mode of 0 to indicate file creates. This doesn't make a whole lot of sense, but it does allow to tell file creates from file modifications from the backup files. Here is a test case that shows the difference:

$ cat > foo.diff
< --- /dev/null
< +++ foo
< @@ -0,0 +1 @@
< +foo

$ patch --backup < foo.diff

> patching file foo


$ ls -l foo.orig | awk '{print $1}'

> ----------


$ rm -f foo foo.orig
$ touch foo
$ patch --backup < foo.diff
$ ls -l foo.orig | awk '{print $1}'

> -rw-r--r--


I don't think the GNU patch maintainers will fix this behavior, sorry.

Andreas Gruenbacher <agruen>
Project Administrator
Tue 18 Sep 2007 02:15:01 PM UTC, original submission:

I can't easily keep quilt-patched source trees in sync among multiple machines because the "backup" files for files added by patches are created with mode 000. rsync (and quite possibly other backup tools) fails to detect zero-sized files before attempting to open them for reading, yielding:
rsync: failed to open "/l/tmp/build/gcc/trunk/.pc/gcc-debug-assignments-tree.patch/gcc/debug-type.h", continuing: Permission denied (13)
and then
rsync error: some files could not be transferred (code 23) at main.c(977) [sender=2.6.9]
which causes files removed in the source to not be removed in the destination (and here comes the reliability problems).

I've noticed that changing these files to mode 400 works around this problem, and doesn't appear to cause any problems on its own. Would you please consider making this change to the backup-files program?

Thanks,

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by oliva (Posted a comment)
  • -unavailable- added by agruen (Posted a comment)
  • -unavailable- added by oliva (Sorry, I didn't mean to post this anonymously.)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 18 Sep 2007 11:26:19 PM UTCagruenStatusNone=>Wont Fix
      Open/ClosedOpen=>Closed
    Tue 18 Sep 2007 02:16:30 PM UTColivaCarbon-Copy-=>Added oliva

    Back to the top


    Powered by Savane 3.1-cleanup1