Backport gogs fix
Problems
- When we push some big commit by http, we get an error because nginx don't accept a big request.
- When we install gitea, there are no shell (with the actuall helper). So pushing by ssh might have a bug.
- In private mode we are not allowed to use http for git because every url is protected by http.
- The change-url script contain a lot of not really usefull code.
- The URL is not normalized in the install script. We could a some issue with that.
- The upstream binary have a armv6 and armv7. Using the armv7 binary for the processor of this generation could improve the performance.
- Using a "sleep 20" at the end of each script to avoid the CI request too quickly is not really efficient and is not guaranteed.
- Gitea might not generate a good url (for git) if the ssh port is customized.
- Gitea store the "INTERNAL_TOKEN" value in the main config. For more information see https://github.com/go-gitea/gitea/issues/3246
Solutions
- Change the max body size for nginx.
- Define a shell when we create a new user for gitea.
- Just allow the URL used by for git by http.
- Simplify the change-url script.
- Normalize the URL in the install script too.
- Add a specific source for armv7.
- Add the new helper "systemd_action" witch give the possibility to mange the start of the service.
- Get the ssh port from the ssh config and set in the gitea config.
- Temporarily store the checksum for the main config when gitea is already stared and has updated the config file.
PR status
- Code finished
- Most of fix have been tested and come from the gogs package