From c51b3410a6a93aae56d7cc4ee93ba7098da8d63e Mon Sep 17 00:00:00 2001
From: Alexey Pustovalov <alexey.pustovalov@zabbix.com>
Date: Sun, 8 Dec 2024 02:35:19 +0900
Subject: [PATCH] Removed orphaned commands

---
 Dockerfiles/build-mysql/ol/Dockerfile       | 4 ----
 Dockerfiles/build-pgsql/centos/Dockerfile   | 4 ----
 Dockerfiles/build-pgsql/ol/Dockerfile       | 4 ----
 Dockerfiles/build-sqlite3/centos/Dockerfile | 4 ----
 Dockerfiles/build-sqlite3/ol/Dockerfile     | 4 ----
 5 files changed, 20 deletions(-)

diff --git a/Dockerfiles/build-mysql/ol/Dockerfile b/Dockerfiles/build-mysql/ol/Dockerfile
index 3d026fbd7..6e481af1c 100644
--- a/Dockerfiles/build-mysql/ol/Dockerfile
+++ b/Dockerfiles/build-mysql/ol/Dockerfile
@@ -137,7 +137,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
     git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \
     cd /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb && \
     cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mongodb && \
@@ -145,7 +144,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     cd /tmp/ && \
     git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \
     cd /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql && \
     cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/postgresql && \
@@ -153,7 +151,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     cd /tmp/ && \
     git -c advice.detachedHead=false clone ${MSSQL_PLUGIN_SOURCES} --branch ${MSSQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \
     cd /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql && \
     cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mssql && \
@@ -161,7 +158,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     cd /tmp/ && \
     git -c advice.detachedHead=false clone ${EMBER_PLUS_PLUGIN_SOURCES} --branch ${EMBER_PLUS_PLUGIN_VERSION} --depth 1 --single-branch /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \
     cd /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \
     cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \
diff --git a/Dockerfiles/build-pgsql/centos/Dockerfile b/Dockerfiles/build-pgsql/centos/Dockerfile
index b70323e9c..9ec2b43fd 100644
--- a/Dockerfiles/build-pgsql/centos/Dockerfile
+++ b/Dockerfiles/build-pgsql/centos/Dockerfile
@@ -141,7 +141,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
     git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \
     cd /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb && \
     cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mongodb && \
@@ -149,7 +148,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     cd /tmp/ && \
     git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \
     cd /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql && \
     cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/postgresql && \
@@ -157,7 +155,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     cd /tmp/ && \
     git -c advice.detachedHead=false clone ${MSSQL_PLUGIN_SOURCES} --branch ${MSSQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \
     cd /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql && \
     cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mssql && \
@@ -165,7 +162,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     cd /tmp/ && \
     git -c advice.detachedHead=false clone ${EMBER_PLUS_PLUGIN_SOURCES} --branch ${EMBER_PLUS_PLUGIN_VERSION} --depth 1 --single-branch /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \
     cd /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \
     cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \
diff --git a/Dockerfiles/build-pgsql/ol/Dockerfile b/Dockerfiles/build-pgsql/ol/Dockerfile
index 268a0b9c8..31fdac093 100644
--- a/Dockerfiles/build-pgsql/ol/Dockerfile
+++ b/Dockerfiles/build-pgsql/ol/Dockerfile
@@ -142,7 +142,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
     git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \
     cd /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb && \
     cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mongodb && \
@@ -150,7 +149,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     cd /tmp/ && \
     git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \
     cd /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql && \
     cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/postgresql && \
@@ -158,7 +156,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     cd /tmp/ && \
     git -c advice.detachedHead=false clone ${MSSQL_PLUGIN_SOURCES} --branch ${MSSQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \
     cd /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql && \
     cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mssql && \
@@ -166,7 +163,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     cd /tmp/ && \
     git -c advice.detachedHead=false clone ${EMBER_PLUS_PLUGIN_SOURCES} --branch ${EMBER_PLUS_PLUGIN_VERSION} --depth 1 --single-branch /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \
     cd /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \
     cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \
diff --git a/Dockerfiles/build-sqlite3/centos/Dockerfile b/Dockerfiles/build-sqlite3/centos/Dockerfile
index 268397788..d994e03ff 100644
--- a/Dockerfiles/build-sqlite3/centos/Dockerfile
+++ b/Dockerfiles/build-sqlite3/centos/Dockerfile
@@ -114,7 +114,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
     git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \
     cd /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb && \
     cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mongodb && \
@@ -122,7 +121,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     cd /tmp/ && \
     git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \
     cd /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql && \
     cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/postgresql && \
@@ -130,7 +128,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     cd /tmp/ && \
     git -c advice.detachedHead=false clone ${MSSQL_PLUGIN_SOURCES} --branch ${MSSQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \
     cd /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql && \
     cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mssql && \
@@ -138,7 +135,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     cd /tmp/ && \
     git -c advice.detachedHead=false clone ${EMBER_PLUS_PLUGIN_SOURCES} --branch ${EMBER_PLUS_PLUGIN_VERSION} --depth 1 --single-branch /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \
     cd /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \
     cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \
diff --git a/Dockerfiles/build-sqlite3/ol/Dockerfile b/Dockerfiles/build-sqlite3/ol/Dockerfile
index 51351c9ce..08095ee16 100644
--- a/Dockerfiles/build-sqlite3/ol/Dockerfile
+++ b/Dockerfiles/build-sqlite3/ol/Dockerfile
@@ -114,7 +114,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
     git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \
     cd /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb && \
     cp /tmp/mongodb-plugin-${MONGODB_PLUGIN_VERSION}/zabbix-agent2-plugin-mongodb ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mongodb && \
@@ -122,7 +121,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     cd /tmp/ && \
     git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \
     cd /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql && \
     cp /tmp/postgresql-plugin-${POSTGRESQL_PLUGIN_VERSION}/zabbix-agent2-plugin-postgresql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/postgresql && \
@@ -130,7 +128,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     cd /tmp/ && \
     git -c advice.detachedHead=false clone ${MSSQL_PLUGIN_SOURCES} --branch ${MSSQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \
     cd /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql && \
     cp /tmp/mssql-plugin-${MSSQL_PLUGIN_VERSION}/zabbix-agent2-plugin-mssql ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/mssql && \
@@ -138,7 +135,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
     cd /tmp/ && \
     git -c advice.detachedHead=false clone ${EMBER_PLUS_PLUGIN_SOURCES} --branch ${EMBER_PLUS_PLUGIN_VERSION} --depth 1 --single-branch /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \
     cd /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION} && \
-    sed -i 's/go 1.2[0-9]/go 1.21/g' go.mod && \
     make && \
     strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \
     cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \