Просмотр исходного кода

Merge branch 'testing' into master

Alexandre Aubin 7 месяцев назад
Родитель
Сommit
20e32eee07
6 измененных файлов с 20 добавлено и 9 удалено
  1. 1 1
      README.md
  2. 1 1
      conf/etc_zabbix_zabbix_agentd.d_yunohost.sh
  3. 3 3
      manifest.toml
  4. 2 2
      scripts/install
  5. 12 0
      scripts/upgrade
  6. 1 2
      tests.toml

+ 1 - 1
README.md

@@ -11,7 +11,7 @@ It shall NOT be edited by hand.
 Monitoring tool for diverse IT components, including networks, servers, VMs and cloud services
 Monitoring tool for diverse IT components, including networks, servers, VMs and cloud services
 
 
 [![🌐 Official app website](https://img.shields.io/badge/Official_app_website-darkgreen?style=for-the-badge)](https://www.zabbix.com)
 [![🌐 Official app website](https://img.shields.io/badge/Official_app_website-darkgreen?style=for-the-badge)](https://www.zabbix.com)
-[![Version: 6.4~ynh1](https://img.shields.io/badge/Version-6.4~ynh1-rgba(0,150,0,1)?style=for-the-badge)](https://ci-apps.yunohost.org/ci/apps/zabbix/)
+[![Version: 7.0~ynh1](https://img.shields.io/badge/Version-7.0~ynh1-rgba(0,150,0,1)?style=for-the-badge)](https://ci-apps.yunohost.org/ci/apps/zabbix/)
 
 
 <div align="center">
 <div align="center">
 <a href="https://apps.yunohost.org/app/zabbix"><img height="100px" src="https://github.com/YunoHost/yunohost-artwork/raw/refs/heads/main/badges/neopossum-badges/badge_more_info_on_the_appstore.svg"/></a>
 <a href="https://apps.yunohost.org/app/zabbix"><img height="100px" src="https://github.com/YunoHost/yunohost-artwork/raw/refs/heads/main/badges/neopossum-badges/badge_more_info_on_the_appstore.svg"/></a>

+ 1 - 1
conf/etc_zabbix_zabbix_agentd.d_yunohost.sh

@@ -15,7 +15,7 @@ if [ "$1" == "yunohost.domains.discover" ] ;then
 fi
 fi
 
 
 if [ "$1" == "yunohost.domain.cert" ] ;then
 if [ "$1" == "yunohost.domain.cert" ] ;then
-	$yunobin domain cert-status "$2" --output-as plain --full| awk '/#/{ next;} {printf "%s;",$0} END {print ""}'
+	$yunobin domain cert status "$2" --output-as plain --full| awk '/#/{ next;} {printf "%s;",$0} END {print ""}'
 fi
 fi
 
 
 if [ "$1" == "yunohost.services.discover" ] ;then
 if [ "$1" == "yunohost.services.discover" ] ;then

+ 3 - 3
manifest.toml

@@ -7,7 +7,7 @@ name = "Zabbix"
 description.en = "Monitoring tool for diverse IT components, including networks, servers, VMs and cloud services"
 description.en = "Monitoring tool for diverse IT components, including networks, servers, VMs and cloud services"
 description.fr = "Outil pour monitorer des réseaux, des serveurs, des VMs et autres services en ligne"
 description.fr = "Outil pour monitorer des réseaux, des serveurs, des VMs et autres services en ligne"
 
 
-version = "6.4~ynh1"
+version = "7.0~ynh1"
 
 
 maintainers = []
 maintainers = []
 
 
@@ -19,7 +19,7 @@ code = "https://github.com/zabbix/zabbix"
 cpe = "cpe:2.3:a:zabbix:zabbix"
 cpe = "cpe:2.3:a:zabbix:zabbix"
 
 
 [integration]
 [integration]
-yunohost = ">= 11.2.30"
+yunohost = ">= 12.0.0"
 architectures = ["amd64"]
 architectures = ["amd64"]
 multi_instance = false
 multi_instance = false
 
 
@@ -78,7 +78,7 @@ ram.runtime = "200M"
     ]
     ]
 
 
     [resources.apt.extras.zabbix]
     [resources.apt.extras.zabbix]
-    repo = "deb https://repo.zabbix.com/zabbix/6.4/debian __YNH_DEBIAN_VERSION__ main"
+    repo = "deb https://repo.zabbix.com/zabbix/7.0/debian __YNH_DEBIAN_VERSION__ main"
     key = "https://repo.zabbix.com/zabbix-official-repo.key"
     key = "https://repo.zabbix.com/zabbix-official-repo.key"
     packages = [
     packages = [
         "zabbix-server-mysql",
         "zabbix-server-mysql",

+ 2 - 2
scripts/install

@@ -92,7 +92,7 @@ python3 -m venv /usr/share/zabbix-cli
 ynh_print_info --message="Creating ldap zabbix user"
 ynh_print_info --message="Creating ldap zabbix user"
 yunohost user create "$zabbix_username" --fullname "${zabbix_username//_}" --domain "$domain" --password "$zabbix_password" -q 0
 yunohost user create "$zabbix_username" --fullname "${zabbix_username//_}" --domain "$domain" --password "$zabbix_password" -q 0
 ynh_add_config --template="zabbix-cli_default.toml" --destination="/usr/share/zabbix-cli/zabbix-cli.toml"
 ynh_add_config --template="zabbix-cli_default.toml" --destination="/usr/share/zabbix-cli/zabbix-cli.toml"
-/usr/share/zabbix-cli/bin/zabbix-cli --config /usr/share/zabbix-cli/zabbix-cli.toml create_user $zabbix_username --firstname $zabbix_username --lastname $zabbix_username --passwd $zabbix_password --role superadmin --groups 7
+/usr/share/zabbix-cli/bin/zabbix-cli --config "/usr/share/zabbix-cli/zabbix-cli.toml" create_user "$zabbix_username" --firstname "$zabbix_username" --lastname "$zabbix_username" --passwd "$zabbix_password" --role superadmin --groups 7
 ynh_add_config --template="zabbix-cli.toml" --destination="/usr/share/zabbix-cli/zabbix-cli.toml"
 ynh_add_config --template="zabbix-cli.toml" --destination="/usr/share/zabbix-cli/zabbix-cli.toml"
 ynh_secure_remove --file="/usr/share/zabbix-cli/.zabbix-cli_auth_token"
 ynh_secure_remove --file="/usr/share/zabbix-cli/.zabbix-cli_auth_token"
 
 
@@ -108,7 +108,7 @@ $mysqlconn -e "UPDATE \`config\` SET \`authentication_type\` = '1', \`ldap_auth_
 ynh_print_info --message="Creating admin user"
 ynh_print_info --message="Creating admin user"
 lastname=$(ynh_user_get_info "$admin" lastname)
 lastname=$(ynh_user_get_info "$admin" lastname)
 firstname=$(ynh_user_get_info "$admin" firstname)
 firstname=$(ynh_user_get_info "$admin" firstname)
-/usr/share/zabbix-cli/bin/zabbix-cli --config /usr/share/zabbix-cli/zabbix-cli.toml create_user $admin --firstname $firstname --lastname $lastname --role superadmin --groups 7
+/usr/share/zabbix-cli/bin/zabbix-cli --config /usr/share/zabbix-cli/zabbix-cli.toml create_user "$admin" --firstname "$firstname" --lastname "$lastname" --role superadmin --groups 7
 
 
 # users creation
 # users creation
 ynh_print_info --message="Creating all users"
 ynh_print_info --message="Creating all users"

+ 12 - 0
scripts/upgrade

@@ -7,6 +7,18 @@
 source _common.sh
 source _common.sh
 source /usr/share/yunohost/helpers
 source /usr/share/yunohost/helpers
 
 
+
+#=================================================
+# ENSURE DOWNWARD COMPATIBILITY
+#=================================================
+ynh_script_progression "Ensuring downward compatibility..."
+
+
+if  ynh_compare_current_package_version --comparison lt --version 6.0~ynh2; then
+    ynh_die --message="la version minimum requise pour cette version est la 6.0~ynh2, il n’est plus possible de faire une mise à jour/restauration de base de données depuis une version inférieure à la 6.0~ynh2 (commit 2ee2da0e3e8c95e90d78e234bcf2193869d115f8"
+fi
+
+
 #=================================================
 #=================================================
 # STOP SYSTEMD SERVICE
 # STOP SYSTEMD SERVICE
 #=================================================
 #=================================================

+ 1 - 2
tests.toml

@@ -18,6 +18,5 @@ test_format = 1.0
     # Commits to test upgrade from
     # Commits to test upgrade from
     # -------------------------------
     # -------------------------------
 
 
-    test_upgrade_from.8f8961c239f890069c867e40005db98465add0c9.name = "5.0.20~ynh2"
-    test_upgrade_from.2791ab29129baca48685277ce82ef763058b10cf.name = "5.0.41~ynh3"
     test_upgrade_from.2ee2da0e3e8c95e90d78e234bcf2193869d115f8.name = "6.0~ynh2"
     test_upgrade_from.2ee2da0e3e8c95e90d78e234bcf2193869d115f8.name = "6.0~ynh2"
+    test_upgrade_from.058508f95dd6b1f38bfd2808d7b5d6259656881f.name = "6.4~ynh1"