public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Keep patch file permissions in mklog
@ 2014-05-31  7:47 Tom de Vries
  2014-08-01  4:21 ` Yury Gribov
  0 siblings, 1 reply; 18+ messages in thread
From: Tom de Vries @ 2014-05-31  7:47 UTC (permalink / raw)
  To: Geoff Keating; +Cc: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 522 bytes --]

Geoff,

Currently, mklog resets the permissions on a patch file:
...
$ touch tmp.patch
$ ls -la tmp.patch
-rw-rw-r-- 1 vries vries 0 mei 31 09:17 tmp.patch
$ ./contrib/mklog tmp.patch
$ ls -la tmp.patch
-rw------- 1 vries vries 59 mei 31 09:17 tmp.patch
$
...

This patch fixes that:
...
$ rm tmp.patch
$ touch tmp.patch
$ ls -la tmp.patch
-rw-rw-r-- 1 vries vries 0 mei 31 09:41 tmp.patch
$ ./contrib/mklog tmp.patch
$ ls -la tmp.patch
-rw-rw-r-- 1 vries vries 59 mei 31 09:41 tmp.patch
...

OK for trunk?

Thanks,
- Tom

[-- Attachment #2: 0001-mklog-permissions-fix.patch --]
[-- Type: text/x-patch, Size: 538 bytes --]

2014-05-31  Tom de Vries  <tom@codesourcery.com>

	* mklog: Keep permissions on patch file.

diff --git a/contrib/mklog b/contrib/mklog
index fb489b0..d6f3556 100755
--- a/contrib/mklog
+++ b/contrib/mklog
@@ -264,7 +264,7 @@ foreach my $clname (keys %cl_entries) {
 }
 
 # Concatenate the ChangeLog template and the original .diff file.
-system ("cat $diff >>$temp && mv $temp $diff") == 0
+system ("cat $diff >>$temp && cat $temp >$diff && rm $temp") == 0
     or die "Could not add the ChangeLog entry to $diff";
 
 exit 0;
-- 
1.9.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-09-19 21:47 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-31  7:47 [PATCH] Keep patch file permissions in mklog Tom de Vries
2014-08-01  4:21 ` Yury Gribov
2014-08-01  6:52   ` Tom de Vries
2014-08-01  7:18     ` Yury Gribov
2014-08-02 19:23       ` Tom de Vries
2014-08-04  6:45         ` Yury Gribov
2014-08-04  8:15           ` Tom de Vries
2014-08-04 11:50             ` Yury Gribov
2014-08-04 13:37               ` Segher Boessenkool
2014-08-11  7:23               ` Tom de Vries
2014-08-11  8:18                 ` Yury Gribov
2014-08-11  9:11                   ` Tom de Vries
2014-08-11 17:29                     ` Segher Boessenkool
2014-09-18 14:56             ` [PATCH][PING] " Yury Gribov
2014-09-18 17:46               ` Diego Novillo
2014-09-19 10:42                 ` Tom de Vries
2014-09-19 12:35                   ` Segher Boessenkool
2014-09-19 21:47                   ` Diego Novillo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).