Upgrading www/gitea to 1.2.0

Stefan Bethke stb at lassitu.de
Fri Oct 27 17:09:23 UTC 2017


Am 15.10.2017 um 09:52 schrieb Stefan Bethke <stb at lassitu.de>:
> 
> If you’r using the Gitea port, the update to 1.2.0 will require you to add a new INTERNAL_TOKEN key to the security section. See /usr/local/etc/gitea/conf/app.ini.sample for details. Gitea will not start until this key is added to the configuration.
> 
> Gitea will try to add this key itself, but will fail if the app.ini file is not writable by the gitea user, which is the default after installation.

Since a couple of people have run into this problem, here’s a bit more info:

Gitea has no daemon mode itself, so the port is using daemon(8) to run gitea as a daemon.  Also, gitea writes a lot of stuff to stdout while it’s running, even when you have configured logging through app.ini.  Up to and including version 1.2.1 of the port, stdout and stderr are thrown away by daemon(8).

If gitea fails to start up using the port (i. e. you’re running 'service gitea start‘ and it’s not running afterwards), and there’s no log output in /var/log/gitea, you need to start it in the foreground.  You can use this command line:

# /usr/bin/env -i 'GITEA_WORK_DIR=/usr/local/share/gitea' 'GITEA_CUSTOM=/usr/local/etc/gitea' 'HOME=/usr/local/git' 'PATH=/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin' 'USER=git' /usr/local/sbin/gitea web

(as a single line)

This should produce error messages.  If the error message says that Gitea cannot write the config file, it is trying to add variables to the config file; the only known instance so far is the new INTERNAL_TOKEN variable.  Either allow Gitea to write the config file, or use app.ini.sample as a guide on where to add the INTERNAL_TOKEN variable, and how to produce the token value.

I’ve just submitted port version 1.2.2 to Bugzilla (#223283).  The rc script there will log Giteas output to syslog.  In a default configuration, the output should show up in /var/log/debug.log.


HTH,
Stefan

--
Stefan Bethke <stb at lassitu.de>   Fon +49 151 14070811


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 529 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20171027/4e877c9b/attachment.sig>


More information about the freebsd-ports mailing list