Merge branch 'v1.9' into add-fail2ban

This commit is contained in:
Josué Tille 2019-09-07 11:08:46 +02:00
commit 21a71f78a7
No known key found for this signature in database
GPG Key ID: 716A6C99B04194EF
14 changed files with 70 additions and 17 deletions

View File

@ -2,6 +2,7 @@
APP_NAME = Gitea APP_NAME = Gitea
RUN_USER = __APP__ RUN_USER = __APP__
RUN_MODE = prod RUN_MODE = prod
[database] [database]
DB_TYPE = mysql DB_TYPE = mysql
HOST = 127.0.0.1:3306 HOST = 127.0.0.1:3306
@ -10,9 +11,12 @@ USER = __DB_USER__
PASSWD = __DB_PASSWORD__ PASSWD = __DB_PASSWORD__
SSL_MODE = disable SSL_MODE = disable
PATH = data/gitea.db PATH = data/gitea.db
LOG_SQL = false
[repository] [repository]
ROOT = __REPOS_PATH__ ROOT = __REPOS_PATH__
FORCE_PRIVATE = false FORCE_PRIVATE = false
[server] [server]
DOMAIN = __DOMAIN__ DOMAIN = __DOMAIN__
HTTP_PORT = __PORT__ HTTP_PORT = __PORT__
@ -22,11 +26,13 @@ SSH_PORT = __SSH_PORT_
OFFLINE_MODE = false OFFLINE_MODE = false
APP_DATA_PATH = __DATA_PATH__ APP_DATA_PATH = __DATA_PATH__
LANDING_PAGE = explore LANDING_PAGE = explore
[mailer] [mailer]
ENABLED = true ENABLED = true
HOST = 127.0.0.1:25 HOST = 127.0.0.1:25
FROM = "Gitea" <gitea-noreply@__DOMAIN__> FROM = "Gitea" <gitea-noreply@__DOMAIN__>
SKIP_VERIFY = true SKIP_VERIFY = true
[service] [service]
REGISTER_EMAIL_CONFIRM = false REGISTER_EMAIL_CONFIRM = false
ENABLE_NOTIFY_MAIL = true ENABLE_NOTIFY_MAIL = true
@ -35,16 +41,33 @@ ENABLE_CAPTCHA = false
REQUIRE_SIGNIN_VIEW = false REQUIRE_SIGNIN_VIEW = false
ENABLE_REVERSE_PROXY_AUTHENTICATION = false ENABLE_REVERSE_PROXY_AUTHENTICATION = false
ENABLE_REVERSE_PROXY_AUTO_REGISTERATION = false ENABLE_REVERSE_PROXY_AUTO_REGISTERATION = false
[picture] [picture]
AVATAR_UPLOAD_PATH = __DATA_PATH__/avatars AVATAR_UPLOAD_PATH = __DATA_PATH__/avatars
[attachment] [attachment]
PATH = __DATA_PATH__/attachments PATH = __DATA_PATH__/attachments
[session] [session]
PROVIDER = memory PROVIDER = memory
[log] [log]
MODE = file MODE = file
LEVEL = Warn LEVEL = Info
ROOT_PATH = /var/log/__APP__ ROOT_PATH = /var/log/__APP__
REDIRECT_MACARON_LOG= true
MACARON = file
ROUTER_LOG_LEVEL = Warn
ROUTER = file
ENABLE_ACCESS_LOG = Warn
ACCESS = file
ENABLE_XORM_LOG = Warn
XORM = file
[security] [security]
INSTALL_LOCK = true INSTALL_LOCK = true
SECRET_KEY = __KEY__ SECRET_KEY = __KEY__

View File

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.2/gitea-1.8.2-linux-arm-6 SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.9.0/gitea-1.9.0-linux-arm-6
SOURCE_SUM=38ab6c0ac42e87370238c2482432420ff509b5a03d964712a984d4d603bb4c97 SOURCE_SUM=f2dff72ee94dd1c1bd2c067470469470ea079c47c07e862995cb85dc877ca389
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FILENAME=gitea SOURCE_FILENAME=gitea
SOURCE_EXTRACT=false SOURCE_EXTRACT=false

5
conf/source/arm_1.8.src Normal file
View File

@ -0,0 +1,5 @@
SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.3/gitea-1.8.3-linux-arm-6
SOURCE_SUM=920b74ec10be323e5dc684fe3b5c3b157bf6f1d6cca0ee1c4f9693f766d1574d
SOURCE_SUM_PRG=sha256sum
SOURCE_FILENAME=gitea
SOURCE_EXTRACT=false

View File

@ -1,8 +1,8 @@
# The armv7 build is brocken # The armv7 build is brocken
# See : https://github.com/go-gitea/gitea/issues/6700 # See : https://github.com/go-gitea/gitea/issues/6700
# Use temporary the armv6 binary # Use temporary the armv6 binary
SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.2/gitea-1.8.2-linux-arm-6 SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.9.0/gitea-1.9.0-linux-arm-6
SOURCE_SUM=38ab6c0ac42e87370238c2482432420ff509b5a03d964712a984d4d603bb4c97 SOURCE_SUM=f2dff72ee94dd1c1bd2c067470469470ea079c47c07e862995cb85dc877ca389
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FILENAME=gitea SOURCE_FILENAME=gitea
SOURCE_EXTRACT=false SOURCE_EXTRACT=false

View File

@ -0,0 +1,8 @@
# The armv7 build is brocken
# See : https://github.com/go-gitea/gitea/issues/6700
# Use temporary the armv6 binary
SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.3/gitea-1.8.3-linux-arm-6
SOURCE_SUM=920b74ec10be323e5dc684fe3b5c3b157bf6f1d6cca0ee1c4f9693f766d1574d
SOURCE_SUM_PRG=sha256sum
SOURCE_FILENAME=gitea
SOURCE_EXTRACT=false

View File

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.2/gitea-1.8.2-linux-386 SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.9.0/gitea-1.9.0-linux-386
SOURCE_SUM=762ab39855958f61165a1332a34d2a227f527acdc3bf60aa91c5a3e4e4e906ce SOURCE_SUM=861125e85b95a90bb84279641ad60ee3c9570dd8b0d134d8419812ba7571af71
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FILENAME=gitea SOURCE_FILENAME=gitea
SOURCE_EXTRACT=false SOURCE_EXTRACT=false

5
conf/source/i386_1.8.src Normal file
View File

@ -0,0 +1,5 @@
SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.3/gitea-1.8.3-linux-386
SOURCE_SUM=e58f4a88b01a4880f97ae32a92e869d978a434a9a876c6a3f4e4a5721e8c4bd6
SOURCE_SUM_PRG=sha256sum
SOURCE_FILENAME=gitea
SOURCE_EXTRACT=false

View File

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.2/gitea-1.8.2-linux-amd64 SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.9.0/gitea-1.9.0-linux-amd64
SOURCE_SUM=a843f2fe526b62ad1e698b80f6193d8c42a3920b35542de014af44d1eb998141 SOURCE_SUM=8a2e02cee40086effd99058054af8fb1eee9344fad865e0c7292107833da78cc
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FILENAME=gitea SOURCE_FILENAME=gitea
SOURCE_EXTRACT=false SOURCE_EXTRACT=false

View File

@ -0,0 +1,5 @@
SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.3/gitea-1.8.3-linux-amd64
SOURCE_SUM=7bb28b21cce4bdf0a24e6f6b21c064afa56d84904052dd55afdf59c419d49988
SOURCE_SUM_PRG=sha256sum
SOURCE_FILENAME=gitea
SOURCE_EXTRACT=false

View File

@ -9,7 +9,7 @@
}, },
"url": "http://gitea.io", "url": "http://gitea.io",
"license": "MIT", "license": "MIT",
"version": "1.8.0~ynh1", "version": "1.9.0~ynh1",
"maintainer": { "maintainer": {
"name": "rafi59", "name": "rafi59",
"email": "rafi59_dev@srvmaison.fr.nf" "email": "rafi59_dev@srvmaison.fr.nf"

View File

@ -26,6 +26,7 @@ dbpass=$(ynh_app_setting_get "$app" mysqlpwd)
admin=$(ynh_app_setting_get "$app" adminusername) admin=$(ynh_app_setting_get "$app" adminusername)
key=$(ynh_app_setting_get "$app" secret_key) key=$(ynh_app_setting_get "$app" secret_key)
port=$(ynh_app_setting_get "$app" web_port) port=$(ynh_app_setting_get "$app" web_port)
upstream_version=$(ynh_app_setting_get $app upstream_version)
#================================================= #=================================================
# STANDARD MODIFICATIONS # STANDARD MODIFICATIONS
@ -50,7 +51,7 @@ config_nginx
config_gitea config_gitea
# RELOAD services # RELOAD services
ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "systemd" -a restart ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "/var/log/$app/gitea.log" -a restart -t 10
sleep 1 sleep 1
# Store the checksum with the 'INTERNAL_TOKEN' value. # Store the checksum with the 'INTERNAL_TOKEN' value.

View File

@ -19,6 +19,7 @@ domain=$YNH_APP_ARG_DOMAIN
path_url=$(ynh_normalize_url_path $YNH_APP_ARG_PATH) path_url=$(ynh_normalize_url_path $YNH_APP_ARG_PATH)
admin=$YNH_APP_ARG_ADMIN admin=$YNH_APP_ARG_ADMIN
is_public=$YNH_APP_ARG_IS_PUBLIC is_public=$YNH_APP_ARG_IS_PUBLIC
upstream_version=$(ynh_app_upstream_version)
# Check domain/path availability # Check domain/path availability
ynh_webpath_available $domain $path_url || ynh_die "$domain is not available as domain, please use an other domain." ynh_webpath_available $domain $path_url || ynh_die "$domain is not available as domain, please use an other domain."
@ -110,16 +111,16 @@ ynh_add_fail2ban_config --logpath "/var/log/$app/gitea.log" --failregex ".*Faile
set_access_settings set_access_settings
# Add gitea to YunoHost's monitored services # Add gitea to YunoHost's monitored services
yunohost service add "$app" --log "/var/log/$app/$app.log" yunohost service add "$app" --log "/var/log/$app/gitea.log"
# Configure logrotate # Configure logrotate
ynh_use_logrotate "/var/log/$app" ynh_use_logrotate "/var/log/$app"
# Save Version # Save Version
ynh_app_setting_set $app upstream_version $(ynh_app_upstream_version) ynh_app_setting_set $app upstream_version $upstream_version
# Reload services # Reload services
ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "systemd" ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "/var/log/$app/gitea.log" -t 10
sleep 1 sleep 1
# Store the checksum with the 'INTERNAL_TOKEN' value. # Store the checksum with the 'INTERNAL_TOKEN' value.

View File

@ -20,6 +20,7 @@ path_url=$(ynh_app_setting_get "$app" path)
dbpass=$(ynh_app_setting_get "$app" mysqlpwd) dbpass=$(ynh_app_setting_get "$app" mysqlpwd)
admin=$(ynh_app_setting_get "$app" adminusername) admin=$(ynh_app_setting_get "$app" adminusername)
port=$(ynh_app_setting_get "$app" web_port) port=$(ynh_app_setting_get "$app" web_port)
upstream_version=$(ynh_app_setting_get $app upstream_version)
# Check domain/path availability with app helper # Check domain/path availability with app helper
ynh_webpath_available $domain $path_url || ynh_die "$domain is not available as domain, please use an other domain." ynh_webpath_available $domain $path_url || ynh_die "$domain is not available as domain, please use an other domain."
@ -68,9 +69,9 @@ set_permission
ynh_use_logrotate "/var/log/$app" ynh_use_logrotate "/var/log/$app"
# Add gitea to YunoHost's monitored services # Add gitea to YunoHost's monitored services
yunohost service add "$app" --log /var/log/"$app"/"$app".log yunohost service add "$app" --log /var/log/"$app"/gitea.log
# Reload services # Reload services
systemctl reload nginx.service systemctl reload nginx.service
ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "systemd" ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "/var/log/$app/gitea.log" -t 10
sleep 1 sleep 1

View File

@ -155,6 +155,10 @@ case $upstream_version in
ynh_setup_source $final_path source/${architecture}_1.7 ynh_setup_source $final_path source/${architecture}_1.7
restart_gitea restart_gitea
;& ;&
"1.7."* )
ynh_setup_source $final_path source/${architecture}_1.8
restart_gitea
;&
esac esac
# Install gitea source # Install gitea source
@ -177,7 +181,7 @@ ynh_app_setting_set $app upstream_version $(ynh_app_upstream_version)
set_access_settings set_access_settings
# Reload services # Reload services
ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "systemd" ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "/var/log/$app/gitea.log" -t 10
sleep 1 sleep 1
# Store the checksum with the 'INTERNAL_TOKEN' value. # Store the checksum with the 'INTERNAL_TOKEN' value.