gitea for Debian
---------------

The gitea package setup in port 3001 a self hosting service for git management, 
after install automatically browse to http://127.0.0.1:3001 follow install instructions
The firts user to register will be the admin user if you do not define it.

 Install, reinstall or/and purge

Gitea cannot use the debian dbconfig, so browse to http://127.0.0.1:3001 
to finish install process. When remove, gitea package will let config files 
still in gitea home, if reinstall just repeat.
When purge, all the settings and repositories will be deleted forever.

 Special install targets:

The default installation are set to /usr/lib/gitea, so the gitea binary 
will find all where was run, the daemon set WORKINGDIR to /var/lib/gitea .


 Daemon service and git repositories:

After installing this package, the daemon automatically will be enabled, 
can be disabled at /etc/default/gitea by setting GITEA_ENABLE=false ..
The gitea service by default looks into the directory /var/lib/git/gitearepos for
repositories. It expects to have read-write access, all the management will be
made by the gitea so the urls,repositories must setup and populate with gitea.

You cannot mix gitea repositories with other git software manager, 
due gitea manage own index for.

 * Default values

The app.ini default values was changes, the most notables changes are:
* The software user are not 'git', user are 'gitea'.
* The UNIX socket permission was fixed to 644 from insecure value
* The OFFLINE_MODE are set to true, so gravatar are locally only
* All the certificate files are under /var/lib/gitea/certs/
* Will searsh and put git repositories under /var/lib/git
* The prefered/default licence are the GPL v3
* All the file sizes for uploads/attachements are between 12 and 24 Mb
* All paths for file uploads/attachements are in /var/lib/gitea/data/
* Maximun upload number of files are 1 to 3
* The default db for gitea internal work are sqlite3 for easy setup
* Email feature are enabled and assumed localhost at port 25, no certs checks
* Session are file provider and stored at /var/lib/gitea/data/sessions
* Local Avatars due offline mode (but set to true) and in /var/lib/gitea/data/avatars
* There's file log apart of the daemon log, in /var/log/gitea as gitealog.log
* The Raw file render mode unless upstream will always set to false and disabled due security
The daemon script was changed as:
* Working directory are the installatin real directory at /usr/lib/gitea
* Default user and group are 'gitea'
* The daemon arguments to parse are ' web --config /etc/gitea/app.ini' as the custom ini file

Those values are according to the git Debian packages defaults.

GIT REPOS ROOT = /var/lib/git/gitearepos
LOCAL_COPY_PATH = /var/lib/gitea/tmp/local-repo
TEMP_PATH = /var/lib/gitea/data/tmp/uploads
ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/
CERT_FILE = /var/lib/gitea/data/certs/cert.pem
KEY_FILE = /var/lib/gitea/data/certs/key.pem
STATIC_ROOT_PATH = /usr/share/gitea
APP_DATA_PATH = /var/lib/gitea/data
PPROF_DATA_PATH = /var/lib/gitea/data/tmp/pprof
LFS_CONTENT_PATH = /var/lib/gitea/data/lfs
SQLITE DB PATH = /var/lib/gitea/data/gitea.db
ISSUE_INDEXER_PATH =  /var/lib/gitea/indexers/issues.bleve
ISSUE_INDEXER_QUEUE_DIR =  /var/lib/gitea/indexers/issues.queue
REPO_INDEXER_PATH =  /var/lib/gitea/indexers/repos.bleve
MAIL CERT_FILE = /var/lib/gitea/custom/mailer/cert.pem
MAIL KEY_FILE = /var/lib/gitea/custom/mailer/key.pem
PROVIDER_CONFIG = /var/lib/gitea/data/sessions
AVATAR_UPLOAD_PATH = /var/lib/gitea/data/avatars
REPOSITORY_AVATAR_UPLOAD_PATH = /var/lib/gitea/data/avatars
REPOSITORY_AVATAR_FALLBACK_IMAGE = /var/lib/gitea/data/img/favicon.png
PATH = /var/lib/gitea/data/attachments
MINIO_BASE_PATH = /var/lib/gitea/attachments/
LOG ROOT_PATH = /var/log/gitea


 * About PAM authentication

The gitea package have enabled pam feature, but if you want it to work with normal Linux passwords, 
implicts the user running gitea must have read access to /etc/shadow, this are a security risk.

 * About packagin sources and related runtime/build dependences

The gitea sources have build in more others go projects that must be packaged separated, 
so dependency of resulting package are only 'libc6 (>= 2.3.6~)' due the gitea sources 
depends on exactly versions in time of those sub projects.

Since gitea 1.6 web frontend need external online tools, due that, debian package 
only builds the backend, web frontend since 1.11 redistribute compiled web stats files.

 -- PICCORO Lenz McKAY <mckaygerhard@gmail.com>  Fri, 08 Sep 2017 07:32:51 -0400

