mirror of
https://framagit.org/YunoHost-Apps/gitea_ynh.git
synced 2024-12-22 17:45:05 +01:00
Merge branch 'testing' into 'master'
Testing Closes #15 See merge request YunoHost-Apps/gitea_ynh!21
This commit is contained in:
commit
592339ace9
@ -1,7 +1,7 @@
|
||||
image: python:3.5-jessie
|
||||
image: python:3.5-alpine
|
||||
test:
|
||||
script:
|
||||
- apt-get update
|
||||
- apt-get install git
|
||||
- apk update
|
||||
- apk add git
|
||||
- git clone https://github.com/YunoHost/package_linter
|
||||
- python package_linter/package_linter.py .
|
||||
- python package_linter/package_linter.py .
|
||||
|
@ -12,9 +12,6 @@
|
||||
setup_private=1
|
||||
setup_public=1
|
||||
upgrade=1
|
||||
upgrade=1 from_commit=aa075b2051ffad7b0b6fef3a9c767376d5bdbfab
|
||||
upgrade=1 from_commit=1cbec051e1171de5a8ed1e850eb4fb3506114da5
|
||||
upgrade=1 from_commit=5a706ed246392c1ce39c47a648cb93e2996e80d3
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
incorrect_path=0
|
||||
@ -31,11 +28,4 @@
|
||||
Level 7=auto
|
||||
Level 8=0
|
||||
Level 9=0
|
||||
Level 10=0
|
||||
;;; Upgrade options
|
||||
; commit=aa075b2051ffad7b0b6fef3a9c767376d5bdbfab
|
||||
name=Before multi_instance and refactoring
|
||||
; commit=1cbec051e1171de5a8ed1e850eb4fb3506114da5
|
||||
name=From V0.10.18
|
||||
; commit=5a706ed246392c1ce39c47a648cb93e2996e80d3
|
||||
name=The oldest package
|
||||
Level 10=0
|
@ -33,8 +33,8 @@ ENABLE_NOTIFY_MAIL = true
|
||||
DISABLE_REGISTRATION = true
|
||||
ENABLE_CAPTCHA = false
|
||||
REQUIRE_SIGNIN_VIEW = false
|
||||
ENABLE_REVERSE_PROXY_AUTHENTICATION = true
|
||||
ENABLE_REVERSE_PROXY_AUTO_REGISTERATION = true
|
||||
ENABLE_REVERSE_PROXY_AUTHENTICATION = false
|
||||
ENABLE_REVERSE_PROXY_AUTO_REGISTERATION = false
|
||||
[picture]
|
||||
AVATAR_UPLOAD_PATH = __DATA_PATH__/avatars
|
||||
[attachment]
|
||||
|
@ -1,10 +1,11 @@
|
||||
SOURCE_URL=https://dl.gitea.io/gitea/1.4.2/gitea-1.4.2-linux-arm-6
|
||||
SOURCE_SUM=b6064e06ce1158600fe41bb5c3747d0ed46e3d9a345e4f08758390d67d4e6d5e
|
||||
SOURCE_URL=https://rafi59.codelib.re/git/attachments/e147665b-5547-4401-bb90-3f8f2eacdb30
|
||||
SOURCE_SUM=951fe16e5aacf578d39fb0da0b9c0b0d93cadb27fd733b3838a12964ca9669b7
|
||||
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
||||
# default: sha256
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
# (Optional) Archive format
|
||||
# default: tar.gz
|
||||
SOURCE_FORMAT=zip
|
||||
# (Optional) Put false if sources are directly in the archive root
|
||||
# default: true
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_IN_SUBDIR=false
|
||||
|
@ -1,10 +1,11 @@
|
||||
SOURCE_URL=https://dl.gitea.io/gitea/1.4.2/gitea-1.4.2-linux-386
|
||||
SOURCE_SUM=41df8e27b740af7d3eb4e563c744208102927aa8d2ad98bd4be5f97380ba1c81
|
||||
SOURCE_URL=https://rafi59.codelib.re/git/attachments/9ac42714-14fb-4ab6-ad84-d91e51777070
|
||||
SOURCE_SUM=68103f9dc86abf379717ac754f30b44b0512ac60906e12839dcd1b580012ebfb
|
||||
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
||||
# default: sha256
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
# (Optional) Archive format
|
||||
# default: tar.gz
|
||||
SOURCE_FORMAT=zip
|
||||
# (Optional) Put false if sources are directly in the archive root
|
||||
# default: true
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_IN_SUBDIR=false
|
||||
|
@ -1,11 +1,11 @@
|
||||
SOURCE_URL=https://dl.gitea.io/gitea/1.4.2/gitea-1.4.2-linux-amd64
|
||||
SOURCE_SUM=c843d462b5edb0d64572b148a0e814e41d069d196c3b3ee491449225e1c39d7d
|
||||
SOURCE_URL=https://rafi59.codelib.re/git/attachments/c54bf3d7-1837-4129-82f7-1ea1aee48cf2
|
||||
SOURCE_SUM=2f914fe40a5d337e29ddcd69dd97cba60c1373f5bcece0d4fecff86b0705eb58
|
||||
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
||||
# default: sha256
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
# (Optional) Archive format
|
||||
# default: tar.gz
|
||||
SOURCE_FORMAT=bin
|
||||
SOURCE_FORMAT=zip
|
||||
# (Optional) Put false if sources are directly in the archive root
|
||||
# default: true
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_IN_SUBDIR=false
|
||||
|
@ -79,3 +79,6 @@ set_permission() {
|
||||
chmod u=rwX,g=rX,o= "/home/$app"
|
||||
chmod u=rwX,g=rX,o= "/var/log/$app"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -69,9 +69,9 @@ fi
|
||||
|
||||
config_nginx
|
||||
|
||||
# Update gogs config
|
||||
config_gogs
|
||||
# Update gitea config
|
||||
config_gitea
|
||||
|
||||
# RELOAD services
|
||||
ynh_check_starting "INFO] Listen: http://0.0.0.0:" "/var/log/$app/gogs.log"
|
||||
ynh_check_starting "INFO] Listen: http://0.0.0.0:" "/var/log/$app/gitea.log"
|
||||
sleep 1
|
@ -112,4 +112,5 @@ ynh_use_logrotate "/var/log/$app"
|
||||
|
||||
# Reload services
|
||||
# ynh_check_starting "Serving [::]:$port with pid" "/var/log/$app/gitea.log"
|
||||
systemctl restart gitea
|
||||
sleep 20
|
||||
systemctl start gitea
|
||||
|
@ -58,9 +58,10 @@ set_permission
|
||||
# Configure logrotate
|
||||
ynh_use_logrotate "/var/log/$app"
|
||||
|
||||
# Add Gogs to YunoHost's monitored services
|
||||
# Add gitea to YunoHost's monitored services
|
||||
yunohost service add "$app" --log /var/log/"$app"/"$app".log
|
||||
|
||||
# Reload services
|
||||
systemctl reload nginx.service
|
||||
# ynh_check_starting "INFO] Listen: http://0.0.0.0:" "/var/log/$app/gogs.log"
|
||||
sleep 20
|
||||
systemctl start gitea
|
@ -52,28 +52,28 @@ then
|
||||
fi
|
||||
|
||||
# handle upgrade from old package installation
|
||||
# this test that /etc/gogs exist since this was used in the old package
|
||||
# this test that /etc/gitea exist since this was used in the old package
|
||||
# but not in the new
|
||||
# this code will be removed in the future
|
||||
if [ -d "/etc/gogs" ]
|
||||
if [ -d "/etc/gitea" ]
|
||||
then
|
||||
# create needed directories if not already created
|
||||
create_dir
|
||||
|
||||
# move repositories to new dir
|
||||
old_repo_path=$(ynh_app_setting_get "$app" repopath)
|
||||
mv "${old_repo_path:-/home/yunohost.app/gogs}"/* "$REPO_PATH" || true # Avoid if the directory is empty
|
||||
mv "${old_repo_path:-/home/yunohost.app/gitea}"/* "$REPO_PATH" || true # Avoid if the directory is empty
|
||||
# cleanup old dir and conf
|
||||
ynh_secure_remove /opt/gogs
|
||||
ynh_secure_remove /etc/gogs
|
||||
ynh_secure_remove /opt/gogs_src
|
||||
ynh_secure_remove /opt/gitea
|
||||
ynh_secure_remove /etc/gitea
|
||||
ynh_secure_remove /opt/gitea_src
|
||||
|
||||
# create needed directories if not already created
|
||||
create_dir
|
||||
fi
|
||||
# end of old package upgrade
|
||||
|
||||
# test if user gogs is locked because of an old installation of the package.
|
||||
# test if user gitea is locked because of an old installation of the package.
|
||||
# if it's blocked, unlock it to allow ssh usage with git
|
||||
if [[ $(grep "$app" /etc/shadow | cut -d: -f2) == '!' ]]
|
||||
then
|
||||
@ -85,13 +85,13 @@ fi
|
||||
#=================================================
|
||||
|
||||
# Clean template to fix issue : https://github.com/gogits/gogs/issues/4585
|
||||
ynh_secure_remove "/opt/gogs/templates"
|
||||
ynh_secure_remove "/opt/gitea/templates"
|
||||
|
||||
# Install Gogs
|
||||
# Install gitea
|
||||
ynh_setup_source $final_path $architecture
|
||||
|
||||
# Configure gogs with app.ini file
|
||||
config_gogs
|
||||
# Configure gitea with app.ini file
|
||||
config_gitea
|
||||
|
||||
# Configure init script
|
||||
ynh_add_systemd_config
|
||||
@ -107,4 +107,6 @@ config_nginx
|
||||
set_permission
|
||||
|
||||
# Reload services
|
||||
# ynh_check_starting "INFO] Listen: http://0.0.0.0:" "/var/log/$app/gogs.log"
|
||||
# ynh_check_starting "INFO] Listen: http://0.0.0.0:" "/var/log/$app/gitea.log"
|
||||
sleep 20
|
||||
systemctl restart gitea
|
||||
|
Loading…
Reference in New Issue
Block a user