summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2023-03-30 09:30:19 +0100
committerSimon McVittie <smcv@debian.org>2023-03-30 10:56:12 +0100
commit208fe0ab9db2a5815ab4b30f616a91c1909c67f2 (patch)
tree3a62a0b0bdc7ba3218e1f4dba525d3215d939eb3
parentbe40a49490396cff0355ece6f1880c44b0a33ab5 (diff)
ikisite backup: Create the bundle as the site's user
Newer versions of git refuse to act on a repository not owned by the current uid. Bug-Debian: https://bugs.debian.org/1033692 Signed-off-by: Simon McVittie <smcv@debian.org> Forwarded: https://ikiwiki-hosting.branchable.com/bugs/ikisite_backup_fails_on_Debian_12___40__git_2.39.2__41__/ Gbp-Pq: Name ikisite-backup-Create-the-bundle-as-the-site-s-user.patch
-rwxr-xr-xikisite4
1 files changed, 3 insertions, 1 deletions
diff --git a/ikisite b/ikisite
index 4663fd9..88a3def 100755
--- a/ikisite
+++ b/ikisite
@@ -214,7 +214,9 @@ sub backup {
# will either see the new or old refs, and not no refs.
# Also, this relies on git writing objects before
# updating the refs to point to them.
- shell("git", "bundle", "create", $dump, "--all");
+ runas(username($hostname), sub {
+ shell("git", "bundle", "create", $dump, "--all");
+ });
# git bundle does not preserve git's config file,
# so that will be backed up separately.
push @tobackup, repository($hostname)."/config";