git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: fetch failure from git2.kernel.org?

From
Junio C Hamano <junkio@cox.net>
Date
Apr 22, 2007, 18:26 UTC
Message-ID
<7virbonu4m.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<alpine.LFD.0.98.0704221050350.9964@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 9 quoted lines
> On Sun, 22 Apr 2007, Randal L. Schwartz wrote:
>> 
>> 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));
Previous: Linus Torvalds
Message 6 of 6 in “fetch failure from git2.kernel.org?”
  1. Randal L. SchwartzApr 22, 2007
  2. Alex RiesenApr 22, 2007
  3. Randal L. SchwartzApr 22, 2007
  4. Petr BaudisApr 22, 2007
  5. Linus TorvaldsApr 22, 2007
  6. Junio C HamanoApr 22, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.