From bac0089b008d4110d79e281292f6ca8341f13ba7 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 22 Jun 2024 03:42:19 +0200 Subject: [PATCH 01/14] Upgrade to v1.46.1 https://github.com/netdata/netdata/releases/tag/v1.46.1 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 90ed890..62f4d89 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "NetData" description.en = "Real-time performance and health monitoring" description.fr = "Monitoring serveur en temps reel" -version = "1.44.3~ynh1" +version = "1.46.1~ynh1" maintainers = ["JimboJoe"] @@ -49,8 +49,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/netdata/netdata/releases/download/v1.44.3/netdata-v1.44.3.tar.gz" - sha256 = "50df30a9aaf60d550eb8e607230d982827e04194f7df3eba0e83ff7919270ad2" + url = "https://github.com/netdata/netdata/releases/download/v1.46.1/netdata-v1.46.1.tar.gz" + sha256 = "e909a109e1d60bf9416a70f2bb0bbf668d75c75d7ca9ce0b59d88fc634266114" autoupdate.strategy = "latest_github_release" autoupdate.asset = "^netdata-v([0-9.]*)tar.gz$" From 387c82d46a5d249f4a8f6ac8fbbb8119d9b3d87d Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 22 Jun 2024 01:42:21 +0000 Subject: [PATCH 02/14] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e222452..2361b59 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ _netdata is **fast** and **efficient**, designed to permanently run on all syste disrupting their core function._ -**Shipped version:** 1.44.3~ynh1 +**Shipped version:** 1.46.1~ynh1 **Demo:** ## Documentation and resources diff --git a/README_es.md b/README_es.md index 8def4d7..dd07599 100644 --- a/README_es.md +++ b/README_es.md @@ -26,7 +26,7 @@ _netdata is **fast** and **efficient**, designed to permanently run on all syste disrupting their core function._ -**Versión actual:** 1.44.3~ynh1 +**Versión actual:** 1.46.1~ynh1 **Demo:** ## Documentaciones y recursos diff --git a/README_eu.md b/README_eu.md index d186da0..4a337a0 100644 --- a/README_eu.md +++ b/README_eu.md @@ -26,7 +26,7 @@ _netdata is **fast** and **efficient**, designed to permanently run on all syste disrupting their core function._ -**Paketatutako bertsioa:** 1.44.3~ynh1 +**Paketatutako bertsioa:** 1.46.1~ynh1 **Demoa:** ## Dokumentazioa eta baliabideak diff --git a/README_fr.md b/README_fr.md index 7e5e470..2d86047 100644 --- a/README_fr.md +++ b/README_fr.md @@ -26,7 +26,7 @@ _netdata is **fast** and **efficient**, designed to permanently run on all syste disrupting their core function._ -**Version incluse :** 1.44.3~ynh1 +**Version incluse :** 1.46.1~ynh1 **Démo :** ## Documentations et ressources diff --git a/README_gl.md b/README_gl.md index b05d22d..60552b6 100644 --- a/README_gl.md +++ b/README_gl.md @@ -26,7 +26,7 @@ _netdata is **fast** and **efficient**, designed to permanently run on all syste disrupting their core function._ -**Versión proporcionada:** 1.44.3~ynh1 +**Versión proporcionada:** 1.46.1~ynh1 **Demo:** ## Documentación e recursos diff --git a/README_zh_Hans.md b/README_zh_Hans.md index a798e6f..f0a39ae 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -26,7 +26,7 @@ _netdata is **fast** and **efficient**, designed to permanently run on all syste disrupting their core function._ -**分发版本:** 1.44.3~ynh1 +**分发版本:** 1.46.1~ynh1 **演示:** ## 文档与资源 From f1b88a641a0473557594459e227b94c7cc52fb73 Mon Sep 17 00:00:00 2001 From: Kayou Date: Wed, 3 Jul 2024 09:45:28 +0200 Subject: [PATCH 03/14] fix install --- scripts/install | 5 ++++- scripts/restore | 5 ++++- scripts/upgrade | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index b618e7f..31ba72f 100644 --- a/scripts/install +++ b/scripts/install @@ -28,7 +28,10 @@ tmplog=$(mktemp /tmp/netdata-updater-log-XXXXXX.log) pushd "$NETDATA_TMPDIR" # the installer.sh script will append "netdata" after the --install-prefix arg - ./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel >"$tmplog" 2>"$tmplog" || ynh_die "FAILED TO COMPILE/INSTALL NETDATA" + if !./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel > "$tmplog" 2>&1; then + tail -n50 $tmplog + ynh_die "FAILED TO COMPILE/INSTALL NETDATA" + fi popd # Specific configuration diff --git a/scripts/restore b/scripts/restore index ce3653a..b1c96d2 100644 --- a/scripts/restore +++ b/scripts/restore @@ -33,7 +33,10 @@ tmplog=$(mktemp /tmp/netdata-updater-log-XXXXXX.log) pushd "$NETDATA_TMPDIR" # the installer.sh script will append "netdata" after the --install-prefix arg - ./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel >"$tmplog" 2>"$tmplog" || ynh_die "FAILED TO COMPILE/INSTALL NETDATA" + if !./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel > "$tmplog" 2>&1; then + tail -n50 $tmplog + ynh_die "FAILED TO COMPILE/INSTALL NETDATA" + fi popd # Specific configuration diff --git a/scripts/upgrade b/scripts/upgrade index eb4a0d5..89f8bab 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,7 +38,10 @@ tmplog=$(mktemp /tmp/netdata-updater-log-XXXXXX.log) pushd "$NETDATA_TMPDIR" # the installer.sh script will append "netdata" after the --install-prefix arg - ./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud >"$tmplog" 2>"$tmplog" || ynh_die "FAILED TO COMPILE/INSTALL NETDATA" + if !./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel > "$tmplog" 2>&1; then + tail -n50 $tmplog + ynh_die "FAILED TO COMPILE/INSTALL NETDATA" + fi popd # Specific configuration From 1f914462b0e3f6395caaab99ca64e71caef6edef Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 3 Jul 2024 07:45:31 +0000 Subject: [PATCH 04/14] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2361b59..951e31f 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # NetData for YunoHost -[![Integration level](https://dash.yunohost.org/integration/netdata.svg)](https://dash.yunohost.org/appci/app/netdata) ![Working status](https://ci-apps.yunohost.org/ci/badges/netdata.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/netdata.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/netdata.svg)](https://ci-apps.yunohost.org/ci/apps/netdata/) ![Working status](https://ci-apps.yunohost.org/ci/badges/netdata.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/netdata.maintain.svg) [![Install NetData with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=netdata) diff --git a/README_es.md b/README_es.md index dd07599..7c13890 100644 --- a/README_es.md +++ b/README_es.md @@ -5,7 +5,7 @@ No se debe editar a mano. # NetData para Yunohost -[![Nivel de integración](https://dash.yunohost.org/integration/netdata.svg)](https://dash.yunohost.org/appci/app/netdata) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/netdata.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/netdata.maintain.svg) +[![Nivel de integración](https://dash.yunohost.org/integration/netdata.svg)](https://ci-apps.yunohost.org/ci/apps/netdata/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/netdata.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/netdata.maintain.svg) [![Instalar NetData con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=netdata) diff --git a/README_eu.md b/README_eu.md index 4a337a0..2b7f4a7 100644 --- a/README_eu.md +++ b/README_eu.md @@ -5,7 +5,7 @@ EZ editatu eskuz. # NetData YunoHost-erako -[![Integrazio maila](https://dash.yunohost.org/integration/netdata.svg)](https://dash.yunohost.org/appci/app/netdata) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/netdata.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/netdata.maintain.svg) +[![Integrazio maila](https://dash.yunohost.org/integration/netdata.svg)](https://ci-apps.yunohost.org/ci/apps/netdata/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/netdata.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/netdata.maintain.svg) [![Instalatu NetData YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=netdata) diff --git a/README_fr.md b/README_fr.md index 2d86047..d1dee80 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main. # NetData pour YunoHost -[![Niveau d’intégration](https://dash.yunohost.org/integration/netdata.svg)](https://dash.yunohost.org/appci/app/netdata) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/netdata.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/netdata.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/netdata.svg)](https://ci-apps.yunohost.org/ci/apps/netdata/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/netdata.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/netdata.maintain.svg) [![Installer NetData avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=netdata) diff --git a/README_gl.md b/README_gl.md index 60552b6..e325ec3 100644 --- a/README_gl.md +++ b/README_gl.md @@ -5,7 +5,7 @@ NON debe editarse manualmente. # NetData para YunoHost -[![Nivel de integración](https://dash.yunohost.org/integration/netdata.svg)](https://dash.yunohost.org/appci/app/netdata) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/netdata.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/netdata.maintain.svg) +[![Nivel de integración](https://dash.yunohost.org/integration/netdata.svg)](https://ci-apps.yunohost.org/ci/apps/netdata/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/netdata.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/netdata.maintain.svg) [![Instalar NetData con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=netdata) diff --git a/README_zh_Hans.md b/README_zh_Hans.md index f0a39ae..19b2adc 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -5,7 +5,7 @@ # YunoHost 上的 NetData -[![集成程度](https://dash.yunohost.org/integration/netdata.svg)](https://dash.yunohost.org/appci/app/netdata) ![工作状态](https://ci-apps.yunohost.org/ci/badges/netdata.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/netdata.maintain.svg) +[![集成程度](https://dash.yunohost.org/integration/netdata.svg)](https://ci-apps.yunohost.org/ci/apps/netdata/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/netdata.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/netdata.maintain.svg) [![使用 YunoHost 安装 NetData](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=netdata) From 61109608e7c75cef76ff592abad41e7d88614bd6 Mon Sep 17 00:00:00 2001 From: Kayou Date: Wed, 3 Jul 2024 09:55:13 +0200 Subject: [PATCH 05/14] oupsie --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 31ba72f..c8627de 100644 --- a/scripts/install +++ b/scripts/install @@ -28,7 +28,7 @@ tmplog=$(mktemp /tmp/netdata-updater-log-XXXXXX.log) pushd "$NETDATA_TMPDIR" # the installer.sh script will append "netdata" after the --install-prefix arg - if !./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel > "$tmplog" 2>&1; then + if ! ./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel > "$tmplog" 2>&1; then tail -n50 $tmplog ynh_die "FAILED TO COMPILE/INSTALL NETDATA" fi diff --git a/scripts/restore b/scripts/restore index b1c96d2..c4a8e81 100644 --- a/scripts/restore +++ b/scripts/restore @@ -33,7 +33,7 @@ tmplog=$(mktemp /tmp/netdata-updater-log-XXXXXX.log) pushd "$NETDATA_TMPDIR" # the installer.sh script will append "netdata" after the --install-prefix arg - if !./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel > "$tmplog" 2>&1; then + if ! ./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel > "$tmplog" 2>&1; then tail -n50 $tmplog ynh_die "FAILED TO COMPILE/INSTALL NETDATA" fi diff --git a/scripts/upgrade b/scripts/upgrade index 89f8bab..43c6b59 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,7 +38,7 @@ tmplog=$(mktemp /tmp/netdata-updater-log-XXXXXX.log) pushd "$NETDATA_TMPDIR" # the installer.sh script will append "netdata" after the --install-prefix arg - if !./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel > "$tmplog" 2>&1; then + if ! ./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel > "$tmplog" 2>&1; then tail -n50 $tmplog ynh_die "FAILED TO COMPILE/INSTALL NETDATA" fi From 65dc5ae2d975a59d70411ae77dca49517aa7bda6 Mon Sep 17 00:00:00 2001 From: Kayou Date: Wed, 3 Jul 2024 10:01:07 +0200 Subject: [PATCH 06/14] get logs in case of errors --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index c8627de..4f9d4da 100644 --- a/scripts/install +++ b/scripts/install @@ -29,7 +29,7 @@ tmplog=$(mktemp /tmp/netdata-updater-log-XXXXXX.log) pushd "$NETDATA_TMPDIR" # the installer.sh script will append "netdata" after the --install-prefix arg if ! ./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel > "$tmplog" 2>&1; then - tail -n50 $tmplog + cat $tmplog ynh_die "FAILED TO COMPILE/INSTALL NETDATA" fi popd diff --git a/scripts/restore b/scripts/restore index c4a8e81..d27d19d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -34,7 +34,7 @@ tmplog=$(mktemp /tmp/netdata-updater-log-XXXXXX.log) pushd "$NETDATA_TMPDIR" # the installer.sh script will append "netdata" after the --install-prefix arg if ! ./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel > "$tmplog" 2>&1; then - tail -n50 $tmplog + cat $tmplog ynh_die "FAILED TO COMPILE/INSTALL NETDATA" fi popd diff --git a/scripts/upgrade b/scripts/upgrade index 43c6b59..10d1a20 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,7 +39,7 @@ tmplog=$(mktemp /tmp/netdata-updater-log-XXXXXX.log) pushd "$NETDATA_TMPDIR" # the installer.sh script will append "netdata" after the --install-prefix arg if ! ./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel > "$tmplog" 2>&1; then - tail -n50 $tmplog + cat $tmplog ynh_die "FAILED TO COMPILE/INSTALL NETDATA" fi popd From b0ae8a8f014392e10f46efbce422a8fe1c26538d Mon Sep 17 00:00:00 2001 From: Kayou Date: Wed, 3 Jul 2024 10:20:24 +0200 Subject: [PATCH 07/14] add some deps --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 62f4d89..760eb3d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -62,4 +62,4 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "zlib1g-dev, uuid-dev, libmnl-dev, gcc, make, git, autoconf, autoconf-archive, autogen, automake, pkg-config, curl, jq, nodejs, python3-mysqldb, libipmimonitoring-dev, acl, python3-pymongo, libuv1-dev, liblz4-dev, libjudy-dev, libssl-dev, cmake" + packages = "zlib1g-dev, uuid-dev, libmnl-dev, gcc, bison, flex, make, git, autoconf, autoconf-archive, autogen, automake, pkg-config, curl, jq, nodejs, python3-mysqldb, libipmimonitoring-dev, acl, python3-pymongo, libuv1-dev, liblz4-dev, libjudy-dev, libssl-dev, cmake" From 4d58cb77bf412b6cf58eec20e5b427d7dbc8b29a Mon Sep 17 00:00:00 2001 From: Kayou Date: Wed, 3 Jul 2024 10:39:13 +0200 Subject: [PATCH 08/14] add g++ as deps --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 760eb3d..5a610f2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -62,4 +62,4 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "zlib1g-dev, uuid-dev, libmnl-dev, gcc, bison, flex, make, git, autoconf, autoconf-archive, autogen, automake, pkg-config, curl, jq, nodejs, python3-mysqldb, libipmimonitoring-dev, acl, python3-pymongo, libuv1-dev, liblz4-dev, libjudy-dev, libssl-dev, cmake" + packages = "zlib1g-dev, uuid-dev, libmnl-dev, gcc, g++, bison, flex, make, git, autoconf, autoconf-archive, autogen, automake, pkg-config, curl, jq, nodejs, python3-mysqldb, libipmimonitoring-dev, acl, python3-pymongo, libuv1-dev, liblz4-dev, libjudy-dev, libssl-dev, cmake" From ab228bcfdfa4bf28bd82425433506b8530768876 Mon Sep 17 00:00:00 2001 From: Kayou Date: Wed, 3 Jul 2024 10:50:21 +0200 Subject: [PATCH 09/14] add libelf-dev --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 5a610f2..c88cd06 100644 --- a/manifest.toml +++ b/manifest.toml @@ -62,4 +62,4 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "zlib1g-dev, uuid-dev, libmnl-dev, gcc, g++, bison, flex, make, git, autoconf, autoconf-archive, autogen, automake, pkg-config, curl, jq, nodejs, python3-mysqldb, libipmimonitoring-dev, acl, python3-pymongo, libuv1-dev, liblz4-dev, libjudy-dev, libssl-dev, cmake" + packages = "zlib1g-dev, uuid-dev, libmnl-dev, gcc, g++, bison, flex, make, git, autoconf, autoconf-archive, autogen, automake, pkg-config, curl, jq, nodejs, python3-mysqldb, libipmimonitoring-dev, acl, python3-pymongo, libuv1-dev, liblz4-dev, libjudy-dev, libssl-dev, libelf-dev, cmake" From d2c83589f363b1ef97248d15225a8daafc18a466 Mon Sep 17 00:00:00 2001 From: Kayou Date: Wed, 3 Jul 2024 11:07:55 +0200 Subject: [PATCH 10/14] add golang-go as deps --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index c88cd06..1adea77 100644 --- a/manifest.toml +++ b/manifest.toml @@ -62,4 +62,4 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "zlib1g-dev, uuid-dev, libmnl-dev, gcc, g++, bison, flex, make, git, autoconf, autoconf-archive, autogen, automake, pkg-config, curl, jq, nodejs, python3-mysqldb, libipmimonitoring-dev, acl, python3-pymongo, libuv1-dev, liblz4-dev, libjudy-dev, libssl-dev, libelf-dev, cmake" + packages = "zlib1g-dev, uuid-dev, libmnl-dev, gcc, g++, bison, flex, make, git, autoconf, autoconf-archive, autogen, automake, pkg-config, curl, jq, nodejs, python3-mysqldb, libipmimonitoring-dev, acl, python3-pymongo, libuv1-dev, liblz4-dev, libjudy-dev, libssl-dev, libelf-dev, cmake, golang-go" From 4875926f238def2c337bd98032f426522d306aeb Mon Sep 17 00:00:00 2001 From: Kayou Date: Wed, 3 Jul 2024 14:25:00 +0200 Subject: [PATCH 11/14] rework install/restore/upgrade scripts, add deps, add go as resources --- manifest.toml | 11 ++++++++++- scripts/install | 22 +++++++++++++--------- scripts/restore | 20 ++++++++++++-------- scripts/upgrade | 24 ++++++++++++++---------- 4 files changed, 49 insertions(+), 28 deletions(-) diff --git a/manifest.toml b/manifest.toml index 1adea77..88be750 100644 --- a/manifest.toml +++ b/manifest.toml @@ -53,6 +53,15 @@ ram.runtime = "50M" sha256 = "e909a109e1d60bf9416a70f2bb0bbf668d75c75d7ca9ce0b59d88fc634266114" autoupdate.strategy = "latest_github_release" autoupdate.asset = "^netdata-v([0-9.]*)tar.gz$" + [resources.sources.go] + amd64.url = "https://go.dev/dl/go1.22.4.linux-amd64.tar.gz" + amd64.sha256 = "ba79d4526102575196273416239cca418a651e049c2b099f3159db85e7bade7d" + i386.url = "https://go.dev/dl/go1.22.4.linux-386.tar.gz" + i386.sha256 = "47a2a8d249a91eb8605c33bceec63aedda0441a43eac47b4721e3975ff916cec" + arm64.url = "https://go.dev/dl/go1.22.4.linux-arm64.tar.gz" + arm64.sha256 = "a8e177c354d2e4a1b61020aca3562e27ea3e8f8247eca3170e3fa1e0c2f9e771" + armhf.url = "https://go.dev/dl/go1.21.5.linux-armv6l.tar.gz" + armhf.sha256 = "837f4bf4e22fcdf920ffeaa4abf3d02d1314e03725431065f4d44c46a01b42fe" [resources.system_user] @@ -62,4 +71,4 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "zlib1g-dev, uuid-dev, libmnl-dev, gcc, g++, bison, flex, make, git, autoconf, autoconf-archive, autogen, automake, pkg-config, curl, jq, nodejs, python3-mysqldb, libipmimonitoring-dev, acl, python3-pymongo, libuv1-dev, liblz4-dev, libjudy-dev, libssl-dev, libelf-dev, cmake, golang-go" + packages = "cmake, ninja-build, pkg-config, bison, flex, gcc, g++, git, libelf-dev, libssl-dev, liblz4-dev, zlib1g-dev, uuid-dev, libyaml-dev, libjson-c-dev, libuv1-dev" \ No newline at end of file diff --git a/scripts/install b/scripts/install index 4f9d4da..bf92c3f 100644 --- a/scripts/install +++ b/scripts/install @@ -15,25 +15,29 @@ source /usr/share/yunohost/helpers ynh_script_progression --message="Setting up source files..." --weight=11 # Download, check integrity, uncompress and patch the source from app.src -NETDATA_TMPDIR=$(mktemp -d) +NETDATA_TMPDIR="$install_dir/netdata_install" +mkdir -p $NETDATA_TMPDIR ynh_setup_source --dest_dir="$NETDATA_TMPDIR" +GO_TMPDIR="$install_dir/go_install" +mkdir -p $GO_TMPDIR +ynh_setup_source --source_id="go" --dest_dir="$GO_TMPDIR" #================================================= # BUILD #================================================= ynh_script_progression --message="Executing Netdata installer..." --weight=10 -# create a temporary file for the log -tmplog=$(mktemp /tmp/netdata-updater-log-XXXXXX.log) - +export PATH="$GO_TMPDIR/bin:$PATH" +export GOPATH="$GO_TMPDIR/go/" +export HOME=${HOME:-"/root/"} pushd "$NETDATA_TMPDIR" # the installer.sh script will append "netdata" after the --install-prefix arg - if ! ./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel > "$tmplog" 2>&1; then - cat $tmplog - ynh_die "FAILED TO COMPILE/INSTALL NETDATA" - fi + ynh_exec_warn_less ./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel popd +ynh_secure_remove --file=$NETDATA_TMPDIR +ynh_secure_remove --file=$GO_TMPDIR + # Specific configuration configure_netdata @@ -59,4 +63,4 @@ ynh_systemd_action --service_name="$app" --action="restart" --log_path="$install # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last +ynh_script_progression --message="Installation of $app completed" --last \ No newline at end of file diff --git a/scripts/restore b/scripts/restore index d27d19d..d26f6d3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -25,20 +25,24 @@ ynh_restore_file --origin_path="$install_dir/etc/netdata" ynh_script_progression --message="Reinstalling Netdata..." --weight=18 # Download, check integrity, uncompress and patch the source from app.src -NETDATA_TMPDIR=$(mktemp -d) +NETDATA_TMPDIR="$install_dir/netdata_install" +mkdir -p $NETDATA_TMPDIR ynh_setup_source --dest_dir="$NETDATA_TMPDIR" +GO_TMPDIR="$install_dir/go_install" +mkdir -p $GO_TMPDIR +ynh_setup_source --source_id="go" --dest_dir="$GO_TMPDIR" -# create a temporary file for the log -tmplog=$(mktemp /tmp/netdata-updater-log-XXXXXX.log) - +export PATH="$GO_TMPDIR/bin:$PATH" +export GOPATH="$GO_TMPDIR/go/" +export HOME=${HOME:-"/root/"} pushd "$NETDATA_TMPDIR" # the installer.sh script will append "netdata" after the --install-prefix arg - if ! ./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel > "$tmplog" 2>&1; then - cat $tmplog - ynh_die "FAILED TO COMPILE/INSTALL NETDATA" - fi + ynh_exec_warn_less ./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel popd +ynh_secure_remove --file=$NETDATA_TMPDIR +ynh_secure_remove --file=$GO_TMPDIR + # Specific configuration configure_netdata diff --git a/scripts/upgrade b/scripts/upgrade index 10d1a20..1109e6a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,8 +19,12 @@ ynh_script_progression --message="Upgrading source files..." --weight=18 #================================================= # Download, check integrity, uncompress and patch the source from app.src -NETDATA_TMPDIR=$(mktemp -d) -ynh_setup_source "$NETDATA_TMPDIR" +NETDATA_TMPDIR="$install_dir/netdata_install" +mkdir -p $NETDATA_TMPDIR +ynh_setup_source --dest_dir="$NETDATA_TMPDIR" +GO_TMPDIR="$install_dir/go_install" +mkdir -p $GO_TMPDIR +ynh_setup_source --source_id="go" --dest_dir="$GO_TMPDIR" #================================================= # SPECIFIC UPGRADE @@ -33,17 +37,17 @@ if [ -n "${pids}" ]; then kill -USR1 ${pids} fi -# create a temporary file for the log -tmplog=$(mktemp /tmp/netdata-updater-log-XXXXXX.log) - +export PATH="$GO_TMPDIR/bin:$PATH" +export GOPATH="$GO_TMPDIR/go/" +export HOME=${HOME:-"/root/"} pushd "$NETDATA_TMPDIR" - # the installer.sh script will append "netdata" after the --install-prefix arg - if ! ./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel > "$tmplog" 2>&1; then - cat $tmplog - ynh_die "FAILED TO COMPILE/INSTALL NETDATA" - fi + # the installer.sh script will append "netdata" after the --install-prefix arg + ynh_exec_warn_less ./netdata-installer.sh --install-prefix /var/www/ --dont-wait --disable-cloud --disable-telemetry --stable-channel popd +ynh_secure_remove --file=$NETDATA_TMPDIR +ynh_secure_remove --file=$GO_TMPDIR + # Specific configuration configure_netdata From 1481c0c62befbff6a79502315a61b67c0060350f Mon Sep 17 00:00:00 2001 From: Kayou Date: Wed, 3 Jul 2024 14:26:11 +0200 Subject: [PATCH 12/14] do not remove logs --- scripts/remove | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index 4d2ff58..e31963a 100644 --- a/scripts/remove +++ b/scripts/remove @@ -44,7 +44,6 @@ ynh_secure_remove "/usr/share/netdata" ynh_secure_remove "/usr/libexec/netdata" ynh_secure_remove "/var/lib/netdata" ynh_secure_remove "/var/cache/netdata" -ynh_secure_remove "/var/log/netdata" ynh_secure_remove "/etc/netdata" #================================================= From ad23d3be62a343a5358781323c6ad7acd0ef85eb Mon Sep 17 00:00:00 2001 From: Kayou Date: Wed, 3 Jul 2024 15:42:26 +0200 Subject: [PATCH 13/14] add mariadb-server as deps for bookworm --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 88be750..7d6df29 100644 --- a/manifest.toml +++ b/manifest.toml @@ -71,4 +71,4 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "cmake, ninja-build, pkg-config, bison, flex, gcc, g++, git, libelf-dev, libssl-dev, liblz4-dev, zlib1g-dev, uuid-dev, libyaml-dev, libjson-c-dev, libuv1-dev" \ No newline at end of file + packages = "cmake, ninja-build, pkg-config, bison, flex, gcc, g++, git, mariadb-server, libelf-dev, libssl-dev, liblz4-dev, zlib1g-dev, uuid-dev, libyaml-dev, libjson-c-dev, libuv1-dev" \ No newline at end of file From c0404337b5055613f8c329cbf7ddd24abd556826 Mon Sep 17 00:00:00 2001 From: Kayou Date: Wed, 3 Jul 2024 15:57:54 +0200 Subject: [PATCH 14/14] stop service during remove --- scripts/remove | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/remove b/scripts/remove index e31963a..a56bbd2 100644 --- a/scripts/remove +++ b/scripts/remove @@ -22,6 +22,8 @@ fi # Remove the dedicated NGINX config ynh_remove_nginx_config +ynh_systemd_action --service_name="$app" --action="stop" + #================================================= # UNINSTALLING NETDATA #=================================================