diff options
author | Sam Whited | 2018-12-13 09:49:32 -0600 |
---|---|---|
committer | Sam Whited | 2018-12-13 10:01:02 -0600 |
commit | 93b8421c2f8a44e89a56a3d36afb5c3a58ea0b39 (patch) | |
tree | 09f72ac45235141282acb957e83b829d3534f2e6 /gitea.install | |
parent | 4b1df37b692a138c111c11505bd542d125d9bfca (diff) | |
download | aur-93b8421c2f8a44e89a56a3d36afb5c3a58ea0b39.tar.gz |
Use gitea user
Also fix a minor issue where dependencies that had changed weren't being
picked up because an existing go.mod file created by a previous build of
the package was cached.
Diffstat (limited to 'gitea.install')
-rw-r--r-- | gitea.install | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gitea.install b/gitea.install new file mode 100644 index 000000000000..08c702f5b133 --- /dev/null +++ b/gitea.install @@ -0,0 +1,30 @@ +post_upgrade() { + if [ $(vercmp $2 1.6.1-1) -lt 0 ] ; then + cat << EOF + +gitea now uses its own user/group instead of the git ones. +Ownership of /var/lib/gitea tree has been changed accordingly. +You need to update your /etc/gitea/app.ini file to change the +RUN_USER variable at the top. + +Next step is fixing the SSH configuration. If you have: + AllowUsers git +in /etc/ssh/sshd_config, you need to change that to gitea. +Then restart sshd.service. +You will need to tell all your users that they have to change +git@ to gitea@ in their repos clones using git remote set-url. + +If you use a PostgreSQL DB upon Unix socket, you need to fix +your [database] configuration and switch USER to gitea. +Then, you need to change it also in /var/lib/data/pg_hba.conf. +Finally, as postgres user, run psql and inside it type: + ALTER USER git RENAME TO gitea; + \q +Then restart postgresql.service. + +In all cases, you then need to reload systemd units and +restart gitea.service. + +EOF + fi +} |