bugQuilt - Bugs: bug #63001, save and restore file permissions...

 
 

bug #63001: save and restore file permissions when creating new files in a patch

Submitter:  None
Submitted:  Sat 03 Sep 2022 03:53:37 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Wont Fix
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 20 Jun 2024 04:24:26 PM UTC, comment #3: 

Closing as won't fix. We can revisit if GNU diff ever supports generating git-style patches.

Jean Delvare <khali>
Group administrator
Tue 11 Apr 2023 11:47:40 AM UTC, comment #2: 

Note: if your user has an unusual umask and you basically need to manually set standard permissions for every new file being created by a patch because of that, you might as well add a "umask" command in ~/.quiltrc to set a standard umask automatically before running any quilt command.

Jean Delvare <khali>
Group administrator
Tue 11 Apr 2023 11:41:54 AM UTC, comment #1: 

Quilt is relying on diff and patch to generate and apply the changes, respectively. The only way to save and restore file permissions is to use diff and patch utilities which support that.

The only patch file format which supports storing file permissions is the git-style patch format. GNU patch knows how to process the file permissions information contained in such patches already, so if you import a git-generated patch in quilt and never refresh it, file permissions will be handled gracefully (assuming you use a recent enough version of GNU patch).

GNU diff, on the other hand, is still not able to generate this patch format. This feature was added to the to-do list one month ago, so this might eventually happen. When this happens, it will be possible to add support to quilt with minimal effort.

Permissions are already restored on "pop" independently of the patch format or the diff and patch utilities, as "pop" restores the original files from a backup and the backup operation does already preserve file permissions.

I can't see how a generic hook for a custom post-push or post-pop script would be convenient here. You would have to write custom code for every patch which creates a file with non-standard permissions. You can already interleave quilt and other shell commands for the same result.

Jean Delvare <khali>
Group administrator
Sat 03 Sep 2022 03:53:37 AM UTC, original submission:  

or there should be a hook for a custom script when a patch is pushed or pulled to do the same.

Since recreating a file is a common step on popping and pushing a patch, file permissions should be storable and restored by quilt

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by khali (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-06-20 khali StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code