mirror of
https://framagit.org/YunoHost-Apps/gitea_ynh.git
synced 2024-11-21 18:41:35 +01:00
Merge branch 'v1.11.4' into 'testing'
V1.11.4 See merge request YunoHost-Apps/gitea_ynh!57
This commit is contained in:
commit
64989e5760
@ -12,7 +12,7 @@ Overview
|
|||||||
|
|
||||||
Gitea is a fork of Gogs a self-hosted Git service written in Go. Alternative to Github.
|
Gitea is a fork of Gogs a self-hosted Git service written in Go. Alternative to Github.
|
||||||
|
|
||||||
**Shipped version:** 1.11.3
|
**Shipped version:** 1.11.4
|
||||||
|
|
||||||
Screenshots
|
Screenshots
|
||||||
-----------
|
-----------
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
INSERT INTO `__APP__`.`login_source` (`id`, `type`, `name`, `is_actived`, `cfg`, `created_unix`, `updated_unix`) VALUES
|
INSERT INTO `__APP__`.`login_source`
|
||||||
('1', '2', 'Yunohost LDAP', '1', '{"Name":"Yunohost LDAP","Host":"localhost","Port":389,"UseSSL":false,"BindDN":"","BindPassword":"","UserBase":"ou=users,dc=yunohost,dc=org","AttributeName":"givenName","AttributeSurname":"sn","AttributeMail":"mail","Filter":"(uid=%s)","AdminFilter":"(uid=__ADMIN__)","Enabled":true}', '1464014433', '1464015955')
|
(`id`, `type`, `name`, `is_actived`, `cfg`, `created_unix`, `updated_unix`)
|
||||||
ON DUPLICATE KEY UPDATE cfg='{"Name":"Yunohost LDAP","Host":"localhost","Port":389,"UseSSL":false,"BindDN":"","BindPassword":"","UserBase":"ou=users,dc=yunohost,dc=org","AttributeName":"givenName","AttributeSurname":"sn","AttributeMail":"mail","Filter":"(uid=%s)","AdminFilter":"(uid=__ADMIN__)","Enabled":true}'
|
VALUES
|
||||||
|
('1', '2', 'Yunohost LDAP', '1', '{"Name":"Yunohost LDAP","Host":"localhost","Port":389,"UseSSL":false,"BindDN":"","BindPassword":"","UserBase":"ou=users,dc=yunohost,dc=org","AttributeName":"givenName","AttributeSurname":"sn","AttributeMail":"mail","Filter":"(&(uid=%s)(objectClass=posixAccount)(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org))","AdminFilter":"(permission=cn=__APP__.admin,ou=permission,dc=yunohost,dc=org)","Enabled":true}', '1464014433', '1464015955')
|
||||||
|
ON DUPLICATE KEY
|
||||||
|
UPDATE cfg='{"Name":"Yunohost LDAP","Host":"localhost","Port":389,"UseSSL":false,"BindDN":"","BindPassword":"","UserBase":"ou=users,dc=yunohost,dc=org","AttributeName":"givenName","AttributeSurname":"sn","AttributeMail":"mail","Filter":"(&(uid=%s)(objectClass=posixAccount)(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org))","AdminFilter":"(permission=cn=__APP__.admin,ou=permission,dc=yunohost,dc=org)","Enabled":true}';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.11.3/gitea-1.11.3-linux-arm-6
|
SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.11.4/gitea-1.11.4-linux-arm-6
|
||||||
SOURCE_SUM=578180011bc0f08208dcf6222d6e9c524efc1b2a5e62ef0858f3e8a742106c8a
|
SOURCE_SUM=402db838819576b9ca8f0b5cdd5d624acb06b70a4440324710c9f48e3730ab02
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FILENAME=gitea
|
SOURCE_FILENAME=gitea
|
||||||
SOURCE_EXTRACT=false
|
SOURCE_EXTRACT=false
|
||||||
|
@ -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.11.3/gitea-1.11.3-linux-arm-6
|
SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.11.4/gitea-1.11.4-linux-arm-6
|
||||||
SOURCE_SUM=578180011bc0f08208dcf6222d6e9c524efc1b2a5e62ef0858f3e8a742106c8a
|
SOURCE_SUM=402db838819576b9ca8f0b5cdd5d624acb06b70a4440324710c9f48e3730ab02
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FILENAME=gitea
|
SOURCE_FILENAME=gitea
|
||||||
SOURCE_EXTRACT=false
|
SOURCE_EXTRACT=false
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.11.3/gitea-1.11.3-linux-386
|
SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.11.4/gitea-1.11.4-linux-386
|
||||||
SOURCE_SUM=9b85e8615a68424bb4621f9430c440955394c385969d2e86d94796373992d229
|
SOURCE_SUM=d37fdd1ab43d861650198aba8b850e7bf121dac4a03e61fb38bf463eba01f53a
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FILENAME=gitea
|
SOURCE_FILENAME=gitea
|
||||||
SOURCE_EXTRACT=false
|
SOURCE_EXTRACT=false
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.11.3/gitea-1.11.3-linux-amd64
|
SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.11.4/gitea-1.11.4-linux-amd64
|
||||||
SOURCE_SUM=bd4d3d4f2d3998ebd1fecc1e8fc09971bc822aa8437a72b7131bee6b944f5d51
|
SOURCE_SUM=4408c781069c36cbb1b5923ae924e67ceee661ba9c9bd6c73cd7408c9cd62af6
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FILENAME=gitea
|
SOURCE_FILENAME=gitea
|
||||||
SOURCE_EXTRACT=false
|
SOURCE_EXTRACT=false
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
},
|
},
|
||||||
"url": "http://gitea.io",
|
"url": "http://gitea.io",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "1.11.3~ynh1",
|
"version": "1.11.4~ynh1",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": "rafi59",
|
"name": "rafi59",
|
||||||
"email": "rafi59_dev@srvmaison.fr.nf"
|
"email": "rafi59_dev@srvmaison.fr.nf"
|
||||||
@ -20,7 +20,7 @@
|
|||||||
"mysql"
|
"mysql"
|
||||||
],
|
],
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 3.6.4"
|
"yunohost": ">= 3.7.0.6"
|
||||||
},
|
},
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"install" : [
|
"install" : [
|
||||||
|
@ -87,10 +87,8 @@ set_permission() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set_access_settings() {
|
set_access_settings() {
|
||||||
if [ "$is_public" = '1' ]
|
if [ "$is_public" == '1' ];
|
||||||
then
|
then
|
||||||
ynh_app_setting_set --app $app --key unprotected_uris --value "/"
|
ynh_permission_update --permission "main" --add "visitors"
|
||||||
else
|
|
||||||
ynh_app_setting_delete --app $app --key skipped_regex
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ config_gitea
|
|||||||
|
|
||||||
# RELOAD services
|
# RELOAD services
|
||||||
ynh_script_progression --message="Starting services..."
|
ynh_script_progression --message="Starting services..."
|
||||||
ynh_systemd_action -l "Starting new server: tcp:127.0.0.1:" -p "/var/log/$app/gitea.log" -t 10
|
ynh_systemd_action -l "Starting new server: tcp:127.0.0.1:" -p "/var/log/$app/gitea.log" -t 10 -a restart
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
# Store the checksum with the 'INTERNAL_TOKEN' value.
|
# Store the checksum with the 'INTERNAL_TOKEN' value.
|
||||||
|
@ -237,6 +237,9 @@ ynh_handle_app_migration () {
|
|||||||
new_label=$(echo $new_app_id | cut -c1 | tr [:lower:] [:upper:])$(echo $new_app_id | cut -c2-)
|
new_label=$(echo $new_app_id | cut -c1 | tr [:lower:] [:upper:])$(echo $new_app_id | cut -c2-)
|
||||||
ynh_app_setting_set $new_app label $new_label
|
ynh_app_setting_set $new_app label $new_label
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
yunohost tools shell -c "from yunohost.permission import permission_delete; permission_delete('$old_app.main', force=True, sync_perm=False)"
|
||||||
|
yunohost tools shell -c "from yunohost.permission import permission_create; permission_create('$new_app.main', url='/' , sync_perm=True)"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MOVE FILES TO THE NEW DESTINATION
|
# MOVE FILES TO THE NEW DESTINATION
|
||||||
@ -327,7 +330,6 @@ ynh_handle_app_migration () {
|
|||||||
|
|
||||||
app=$new_app
|
app=$new_app
|
||||||
|
|
||||||
|
|
||||||
# Set migration_process to 1 to inform that an upgrade has been made
|
# Set migration_process to 1 to inform that an upgrade has been made
|
||||||
migration_process=1
|
migration_process=1
|
||||||
fi
|
fi
|
||||||
|
@ -90,14 +90,13 @@ ynh_script_progression --message="Configuring application, step 2/2..."
|
|||||||
# Start gitea for building mysql tables
|
# Start gitea for building mysql tables
|
||||||
systemctl start "$app".service
|
systemctl start "$app".service
|
||||||
|
|
||||||
# Wait till login_source mysql table is created
|
# Wait untill login_source mysql table is created
|
||||||
while ! $(ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" <<< "SELECT * FROM login_source;" &>/dev/null)
|
while ! $(ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" <<< "SELECT * FROM login_source;" &>/dev/null)
|
||||||
do
|
do
|
||||||
sleep 2
|
sleep 2
|
||||||
done
|
done
|
||||||
|
|
||||||
# Add ldap config
|
# Add ldap config
|
||||||
ynh_replace_string --match_string "__ADMIN__" --replace_string "$admin" --target_file ../conf/login_source.sql
|
|
||||||
ynh_replace_string --match_string "__APP__" --replace_string "$app" --target_file ../conf/login_source.sql
|
ynh_replace_string --match_string "__APP__" --replace_string "$app" --target_file ../conf/login_source.sql
|
||||||
ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" < ../conf/login_source.sql
|
ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" < ../conf/login_source.sql
|
||||||
|
|
||||||
@ -113,6 +112,10 @@ ynh_add_fail2ban_config --logpath "/var/log/$app/gitea.log" --failregex ".*Faile
|
|||||||
ynh_script_progression --message="Protecting directory"
|
ynh_script_progression --message="Protecting directory"
|
||||||
set_access_settings
|
set_access_settings
|
||||||
|
|
||||||
|
# Create permission
|
||||||
|
ynh_script_progression --message="Configuring permissions"
|
||||||
|
ynh_permission_create --permission="admin" --allowed=$admin
|
||||||
|
|
||||||
# Add gitea to YunoHost's monitored services
|
# Add gitea to YunoHost's monitored services
|
||||||
ynh_script_progression --message="Register gitea service..."
|
ynh_script_progression --message="Register gitea service..."
|
||||||
yunohost service add "$app" --log "/var/log/$app/gitea.log"
|
yunohost service add "$app" --log "/var/log/$app/gitea.log"
|
||||||
|
@ -65,7 +65,6 @@ if [[ $migration_process -eq 1 ]]; then
|
|||||||
ynh_secure_remove --file=$final_path/custom/conf/auth.d
|
ynh_secure_remove --file=$final_path/custom/conf/auth.d
|
||||||
|
|
||||||
# Restore authentication from SQL database
|
# Restore authentication from SQL database
|
||||||
ynh_replace_string --match_string __ADMIN__ --replace_string "$admin" --target_file ../conf/login_source.sql
|
|
||||||
ynh_replace_string --match_string __APP__ --replace_string "$app" --target_file ../conf/login_source.sql
|
ynh_replace_string --match_string __APP__ --replace_string "$app" --target_file ../conf/login_source.sql
|
||||||
ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" < ../conf/login_source.sql
|
ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" < ../conf/login_source.sql
|
||||||
|
|
||||||
@ -189,6 +188,20 @@ ynh_add_fail2ban_config --logpath "/var/log/$app/gitea.log" --failregex ".*Faile
|
|||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
# Set all permissions
|
||||||
|
ynh_script_progression --message="Update permission..."
|
||||||
|
if ! ynh_permission_exists --permission admin; then
|
||||||
|
ynh_app_setting_delete --app $app --key unprotected_uris
|
||||||
|
ynh_permission_create --permission 'admin' --allowed "$admin"
|
||||||
|
# Update ldap config
|
||||||
|
ynh_replace_string --match_string "__APP__" --replace_string "$app" --target_file ../conf/login_source.sql
|
||||||
|
ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" < ../conf/login_source.sql
|
||||||
|
fi
|
||||||
|
if [ "$is_public" == '1' ];
|
||||||
|
then
|
||||||
|
ynh_permission_update --permission "main" --add "visitors"
|
||||||
|
fi
|
||||||
|
|
||||||
# Set permissions
|
# Set permissions
|
||||||
ynh_script_progression --message="Protecting directory"
|
ynh_script_progression --message="Protecting directory"
|
||||||
set_permission
|
set_permission
|
||||||
|
Loading…
Reference in New Issue
Block a user