From ad88f6d199ad33715645b7eae5881ab3a489a1fb Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Wed, 18 Sep 2024 12:19:25 -0700 Subject: libpiny/lib/Piny/Repo.pm: add $GIT_DIR/incoming/ as required by recent versions of git --- libpiny/lib/Piny/Repo.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'libpiny/lib/Piny') diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index c4ec47a..d213168 100644 --- a/libpiny/lib/Piny/Repo.pm +++ b/libpiny/lib/Piny/Repo.pm @@ -262,6 +262,10 @@ sub rebuild_git { }; }; + unless( -d $s->path . "/incoming" ) { + mkdir( $s->path . "/incoming" ) or die "Could not mkdir incoming: $!"; + }; + unless( -d $s->path . "/snowflakes" ) { mkdir( $s->path . "/snowflakes" ) or die "Could not mkdir snowflakes: $!"; }; @@ -301,10 +305,10 @@ sub rebuild_git { }; # FIXME: we should verify we are not breaking someone else's object hardlinks with these chmod or chown operations - system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/objects " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/snowflakes -type d -print0 | /usr/bin/xargs -0 /bin/chmod $dirperm" ) and die "Could not chmod shared git resources!"; + system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/objects " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/incoming " . $s->path . "/snowflakes -type d -print0 | /usr/bin/xargs -0 /bin/chmod $dirperm" ) and die "Could not chmod shared git resources!"; system( "/usr/bin/find " . $s->path . "/objects " . "-type f -print0 | /usr/bin/xargs -0 --no-run-if-empty /bin/chmod $immutablefileperm" ) and die "Could not chmod shared git resources!"; # most files are either immutable or replaced at link level - system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/snowflakes -type f -print0 | /usr/bin/xargs -0 /bin/chmod $fileperm" ) and die "Could not chmod shared git resources!"; # most files are either immutable or replaced at link level - system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/objects " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/snowflakes -print0 | /usr/bin/xargs -0 /bin/chgrp " . $s->group->name ) and die "Could not chgrp shared git resources!"; + system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/incoming " . $s->path . "/snowflakes -type f -print0 | /usr/bin/xargs -0 /bin/chmod $fileperm" ) and die "Could not chmod shared git resources!"; # most files are either immutable or replaced at link level + system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/objects " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/incoming " . $s->path . "/snowflakes -print0 | /usr/bin/xargs -0 /bin/chgrp " . $s->group->name ) and die "Could not chgrp shared git resources!"; $ENV{"GIT_DIR"} = $s->path; system( "/usr/bin/git", "config", "gitweb.owner", $s->owner->email->address ) and die "Could not git config gitweb.owner!"; -- cgit v1.2.3