Linus Torvalds [off-list ref] writes:
On Sun, 22 Apr 2007, Randal L. Schwartz wrote:
quoted
is this known? transient?
Junio seems to have tightened his permissions on kernel.org, and as a
result the most recent pack is unreadable by anybody but him (I'm not sure
if such private files even get mirrored out - but even if they do, they
will get mirrored out with the same tight permissions and won't be
readable).
That's not *me* per-se, it's Nico ;-).
Anybody who runs the new pack-objects that has been cooking in
'next' would get this.
I think this patch minimally fixes it, but some existing tests
(e.g. t5300) assume that pack/idx are writable which makes them
break.
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index c72e07a..4eb88e8 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -1783,11 +1783,17 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
write_index_file(last_obj_offset, object_list_sha1);
snprintf(tmpname, sizeof(tmpname), "%s-%s.pack",
base_name, sha1_to_hex(object_list_sha1));
+ if (chmod(pack_tmp_name, 0444))
+ die("unable to make temporary pack file readable: %s",
+ strerror(errno));
if (rename(pack_tmp_name, tmpname))
die("unable to rename temporary pack file: %s",
strerror(errno));
snprintf(tmpname, sizeof(tmpname), "%s-%s.idx",
base_name, sha1_to_hex(object_list_sha1));
+ if (chmod(idx_tmp_name, 0444))
+ die("unable to make temporary index file readable: %s",
+ strerror(errno));
if (rename(idx_tmp_name, tmpname))
die("unable to rename temporary index file: %s",
strerror(errno));