]> TLD Linux GIT Repositories - packages/zabbix.git/commitdiff
- updated to 7.0.6
authorMarcin Krol <hawk@tld-linux.org>
Mon, 9 Dec 2024 17:37:19 +0000 (18:37 +0100)
committerMarcin Krol <hawk@tld-linux.org>
Mon, 9 Dec 2024 17:37:19 +0000 (18:37 +0100)
agent2.patch
always_compile_ipc.patch
go.patch
sqlite3_dbname.patch
tld.patch
zabbix.spec

index bf67519fdb41c7e2e947cec7964b764da3c4905f..bdb7fd19d2ddd1421585cebbea20aeaebb761e32 100644 (file)
@@ -1,7 +1,7 @@
-diff -ur zabbix-6.0.33.orig/src/go/cmd/zabbix_agent2/zabbix_agent2.go zabbix-6.0.33/src/go/cmd/zabbix_agent2/zabbix_agent2.go
---- zabbix-6.0.33.orig/src/go/cmd/zabbix_agent2/zabbix_agent2.go       2024-08-16 22:41:12.270404367 +0200
-+++ zabbix-6.0.33/src/go/cmd/zabbix_agent2/zabbix_agent2.go    2024-08-16 22:41:24.782633257 +0200
-@@ -645,7 +645,7 @@
+diff -ur zabbix-7.0.6.orig/src/go/cmd/zabbix_agent2/zabbix_agent2.go zabbix-7.0.6/src/go/cmd/zabbix_agent2/zabbix_agent2.go
+--- zabbix-7.0.6.orig/src/go/cmd/zabbix_agent2/zabbix_agent2.go        2024-12-10 12:22:49.427410715 +0100
++++ zabbix-7.0.6/src/go/cmd/zabbix_agent2/zabbix_agent2.go     2024-12-10 12:24:02.008246701 +0100
+@@ -541,7 +541,7 @@
                                Shorthand:   "f",
                                Description: "Run Zabbix agent in foreground",
                        },
@@ -9,4 +9,4 @@ diff -ur zabbix-6.0.33.orig/src/go/cmd/zabbix_agent2/zabbix_agent2.go zabbix-6.0
 +                      Default: false,
                        Dest:    &args.foreground,
                },
-               &zbxflag.StringFlag{
+               &zbxflag.BoolFlag{
index 456111bb7b0ca853876706b0dff5b0047a9a0df6..24f2c965e11f26c430681f0fcbb75ecfeb79c4b1 100644 (file)
@@ -1,7 +1,7 @@
-diff -ur zabbix-6.0.33.orig/configure.ac zabbix-6.0.33/configure.ac
---- zabbix-6.0.33.orig/configure.ac    2024-08-16 22:40:40.081815563 +0200
-+++ zabbix-6.0.33/configure.ac 2024-08-16 22:40:54.118072316 +0200
-@@ -1542,7 +1542,7 @@
+diff -ur zabbix-7.0.6.orig/configure.ac zabbix-7.0.6/configure.ac
+--- zabbix-7.0.6.orig/configure.ac     2024-12-10 12:22:14.815012054 +0100
++++ zabbix-7.0.6/configure.ac  2024-12-10 12:22:33.803230757 +0100
+@@ -1550,7 +1550,7 @@
  AM_CONDITIONAL(HAVE_SSH2, [test "x$have_ssh" = "xyes (libssh2)"])
  
  dnl Check if Zabbix internal IPC services are used
index 7bd7477898ec49da5bcf223d2f6d0e0cc14f4fc1..b5b300056dea9f20c8f28f8eaa9b80a4e9ab0bd7 100644 (file)
--- a/go.patch
+++ b/go.patch
@@ -1,36 +1,20 @@
-diff -ur zabbix-6.0.30.orig/src/go/Makefile.am zabbix-6.0.30/src/go/Makefile.am
---- zabbix-6.0.30.orig/src/go/Makefile.am      2024-06-13 13:35:04.929039431 +0200
-+++ zabbix-6.0.30/src/go/Makefile.am   2024-06-13 14:02:09.087986478 +0200
-@@ -49,10 +49,10 @@
- all: build
- golang.zabbix.com/agent2/cmd/zabbix_agent2:
--      CGO_CFLAGS="${CGO_CFLAGS}" CGO_LDFLAGS="${CGO_LDFLAGS}" go build -tags="${AGENT_GOTAGS}" -ldflags="${AGENT_GOLDFLAGS}" -o bin golang.zabbix.com/agent2/cmd/zabbix_agent2
-+      CGO_CFLAGS="${CGO_CFLAGS}" CGO_LDFLAGS="${CGO_LDFLAGS}" go build -mod=vendor -tags="${AGENT_GOTAGS}" -ldflags="${AGENT_GOLDFLAGS}" -o bin golang.zabbix.com/agent2/cmd/zabbix_agent2
- golang.zabbix.com/agent2/cmd/zabbix_web_service:
--      go build -ldflags="${WEBSERVICE_GOLDFLAGS}" -o bin golang.zabbix.com/agent2/cmd/zabbix_web_service
-+      go build -mod=vendor -ldflags="${WEBSERVICE_GOLDFLAGS}" -o bin golang.zabbix.com/agent2/cmd/zabbix_web_service
- build: ${TARGETS}
-@@ -73,8 +73,8 @@
-       -rm -f sbom-zws.xml
- install-golang.zabbix.com/agent2/cmd/zabbix_agent2:
--      CGO_CFLAGS="${CGO_CFLAGS}" CGO_LDFLAGS="${CGO_LDFLAGS}" GOBIN=${GOBIN} \
--              go install -ldflags="${AGENT_GOLDFLAGS}" ${TARGETS}
-+      CGO_CFLAGS="${CGO_CFLAGS}" CGO_LDFLAGS="${CGO_LDFLAGS}" GOBIN=${DESTDIR}${GOBIN} \
-+              go install -mod=vendor -ldflags="${AGENT_GOLDFLAGS}" ${TARGETS}
-       $(MKDIR_P) "$(DESTDIR)$(AGENT2_CONFIG_PLUGINS_PATH)"
-       test -f "$(DESTDIR)$(AGENT2_CONFIG_FILE)" || cp "conf/zabbix_agent2.conf" "$(DESTDIR)$(AGENT2_CONFIG_FILE)"
-       for cfg in conf/zabbix_agent2.d/plugins.d/*.conf; do \
-@@ -83,7 +83,7 @@
-       done
- install-golang.zabbix.com/agent2/cmd/zabbix_web_service:
--      GOBIN=${GOBIN} go install -ldflags="${WEBSERVICE_GOLDFLAGS}" golang.zabbix.com/agent2/cmd/zabbix_web_service
-+      GOBIN=${DESTDIR}${GOBIN} go install -mod=vendor -ldflags="${WEBSERVICE_GOLDFLAGS}" golang.zabbix.com/agent2/cmd/zabbix_web_service
- install-exec-local: ${INSTALL_TARGETS}
+diff -ur zabbix-7.0.6.orig/src/go/Makefile.am zabbix-7.0.6/src/go/Makefile.am
+--- zabbix-7.0.6.orig/src/go/Makefile.am       2024-12-10 12:24:34.084616158 +0100
++++ zabbix-7.0.6/src/go/Makefile.am    2024-12-10 12:28:09.071092386 +0100
+@@ -49,14 +49,14 @@
+ bin/zabbix_agent2: FORCE
+       CGO_CFLAGS="${CGO_CFLAGS}" CGO_LDFLAGS="${CGO_LDFLAGS}" \
+-              $(GO) build \
++              $(GO) build -mod=vendor \
+               -tags="${AGENT_GOTAGS}" \
+               -ldflags="${AGENT_GOLDFLAGS}" \
+               -o bin \
+               golang.zabbix.com/agent2/cmd/zabbix_agent2
+ bin/zabbix_web_service: FORCE
+-      $(GO) build \
++      $(GO) build -mod=vendor \
+       -ldflags="${WEBSERVICE_GOLDFLAGS}" \
+       -o bin \
+       golang.zabbix.com/agent2/cmd/zabbix_web_service
index b29ae734899bc0dce7033de45ae1aac32ca8a617..113f6c4ed90c9b547b969cb5a9d39a7140ffb9f9 100644 (file)
@@ -1,7 +1,7 @@
-diff -ur zabbix-6.0.33.orig/conf/zabbix_proxy.conf zabbix-6.0.33/conf/zabbix_proxy.conf
---- zabbix-6.0.33.orig/conf/zabbix_proxy.conf  2024-08-16 22:29:35.641660778 +0200
-+++ zabbix-6.0.33/conf/zabbix_proxy.conf       2024-08-16 22:29:51.057943061 +0200
-@@ -153,6 +153,7 @@
+diff -ur zabbix-7.0.6.orig/conf/zabbix_proxy.conf zabbix-7.0.6/conf/zabbix_proxy.conf
+--- zabbix-7.0.6.orig/conf/zabbix_proxy.conf   2024-12-10 12:17:18.747601117 +0100
++++ zabbix-7.0.6/conf/zabbix_proxy.conf        2024-12-10 12:17:42.211871784 +0100
+@@ -155,6 +155,7 @@
  ### Option: DBName
  #     Database name.
  #     For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
@@ -9,26 +9,41 @@ diff -ur zabbix-6.0.33.orig/conf/zabbix_proxy.conf zabbix-6.0.33/conf/zabbix_pro
  #     If the Net Service Name connection method is used to connect to Oracle database, specify the service name from
  #     the tnsnames.ora file or set to empty string; also see the TWO_TASK environment variable if DBName is set to
  #     empty string.
-Only in zabbix-6.0.33/conf: zabbix_proxy.conf.rej
-diff -ur zabbix-6.0.33.orig/src/libs/zbxdb/db.c zabbix-6.0.33/src/libs/zbxdb/db.c
---- zabbix-6.0.33.orig/src/libs/zbxdb/db.c     2024-08-16 22:29:35.765663048 +0200
-+++ zabbix-6.0.33/src/libs/zbxdb/db.c  2024-08-16 22:39:37.540671497 +0200
-@@ -444,6 +444,7 @@
+diff -ur zabbix-7.0.6.orig/src/libs/zbxdb/db.c zabbix-7.0.6/src/libs/zbxdb/db.c
+--- zabbix-7.0.6.orig/src/libs/zbxdb/db.c      2024-12-10 12:17:18.787601578 +0100
++++ zabbix-7.0.6/src/libs/zbxdb/db.c   2024-12-10 12:21:21.482397768 +0100
+@@ -436,7 +436,7 @@
+       const char      *values[ZBX_DB_MAX_PARAMS + 1];
        unsigned int    i = 0;
  #elif defined(HAVE_SQLITE3)
-       char            *p, *path = NULL;
-+      char            dbname_buf[1024];
+-      char            *p, *path = NULL;
++      char            *p, *path = NULL, *dbpath = NULL;;
  #endif
  
- #ifndef HAVE_MYSQL
-@@ -888,6 +889,10 @@
-       ZBX_UNUSED(cipher);
-       ZBX_UNUSED(cipher_13);
-       ZBX_UNUSED(read_only_recoverable);
-+      if (!strchr(dbname, '/') && !strchr(dbname, ':')) {
-+              zbx_snprintf(dbname_buf, sizeof(dbname_buf), "/var/lib/zabbix/%s.db", dbname);
-+              dbname = dbname_buf;
+       /* Allow executing statements during a connection initialization. Make sure to mark transaction as failed. */
+@@ -851,10 +851,15 @@
+       ZBX_PG_READ_ONLY_RECOVERABLE = cfg->read_only_recoverable;
+ out:
+ #elif defined(HAVE_SQLITE3)
++      if (!strchr(cfg->config_dbname, '/') && !strchr(cfg->config_dbname, ':')) {
++              dbpath = zbx_dsprintf(NULL, "/var/lib/zabbix/%s.db", cfg->config_dbname);
++      } else {
++              dbpath = zbx_strdup(NULL, cfg->config_dbname);
 +      }
  #ifdef HAVE_FUNCTION_SQLITE3_OPEN_V2
-       if (SQLITE_OK != sqlite3_open_v2(dbname, &conn, SQLITE_OPEN_READWRITE, NULL))
+-      if (SQLITE_OK != sqlite3_open_v2(cfg->config_dbname, &conn, SQLITE_OPEN_READWRITE, NULL))
++      if (SQLITE_OK != sqlite3_open_v2(dbpath, &conn, SQLITE_OPEN_READWRITE, NULL))
  #else
+-      if (SQLITE_OK != sqlite3_open(cfg->config_dbname, &conn))
++      if (SQLITE_OK != sqlite3_open(dbpath, &conn))
+ #endif
+       {
+               zbx_db_errlog(ERR_Z3001, 0, sqlite3_errmsg(conn), cfg->config_dbname);
+@@ -895,6 +900,7 @@
+       zbx_free(path);
+ out:
++      zbx_free(dbpath);
+ #endif        /* HAVE_SQLITE3 */
+       if (ZBX_DB_OK != ret)
+               zbx_db_close_basic();
index 19571ce35e3cbebe74811429f347deb0f8ebfe54..431bbb5cdc1ed4ff5267ec72bacfa9f6bfd7b3ed 100644 (file)
--- a/tld.patch
+++ b/tld.patch
@@ -1,6 +1,6 @@
-diff -ur zabbix-6.0.33.orig/conf/zabbix_agentd.conf zabbix-6.0.33/conf/zabbix_agentd.conf
---- zabbix-6.0.33.orig/conf/zabbix_agentd.conf 2024-08-16 22:28:36.880584826 +0200
-+++ zabbix-6.0.33/conf/zabbix_agentd.conf      2024-08-16 22:28:57.060954342 +0200
+diff -ur zabbix-7.0.6.orig/conf/zabbix_agentd.conf zabbix-7.0.6/conf/zabbix_agentd.conf
+--- zabbix-7.0.6.orig/conf/zabbix_agentd.conf  2024-12-10 12:00:50.196197734 +0100
++++ zabbix-7.0.6/conf/zabbix_agentd.conf       2024-12-10 12:02:03.545043839 +0100
 @@ -8,7 +8,7 @@
  #
  # Mandatory: no
@@ -19,7 +19,7 @@ diff -ur zabbix-6.0.33.orig/conf/zabbix_agentd.conf zabbix-6.0.33/conf/zabbix_ag
  
  ### Option: LogFileSize
  #     Maximum size of log file in MB.
-@@ -309,15 +309,12 @@
+@@ -319,15 +319,12 @@
  
  ### Option: Include
  #     You may include individual files or all files in a directory in the configuration file.
@@ -36,9 +36,9 @@ diff -ur zabbix-6.0.33.orig/conf/zabbix_agentd.conf zabbix-6.0.33/conf/zabbix_ag
  
  ####### USER-DEFINED MONITORED PARAMETERS #######
  
-diff -ur zabbix-6.0.33.orig/conf/zabbix_proxy.conf zabbix-6.0.33/conf/zabbix_proxy.conf
---- zabbix-6.0.33.orig/conf/zabbix_proxy.conf  2024-08-16 22:28:36.880584826 +0200
-+++ zabbix-6.0.33/conf/zabbix_proxy.conf       2024-08-16 22:28:57.064954415 +0200
+diff -ur zabbix-7.0.6.orig/conf/zabbix_proxy.conf zabbix-7.0.6/conf/zabbix_proxy.conf
+--- zabbix-7.0.6.orig/conf/zabbix_proxy.conf   2024-12-10 12:00:50.196197734 +0100
++++ zabbix-7.0.6/conf/zabbix_proxy.conf        2024-12-10 12:02:03.545043839 +0100
 @@ -81,7 +81,7 @@
  # Default:
  # LogFile=
@@ -57,7 +57,7 @@ diff -ur zabbix-6.0.33.orig/conf/zabbix_proxy.conf zabbix-6.0.33/conf/zabbix_pro
  
  ### Option: SocketDir
  #     IPC socket directory.
-@@ -605,15 +605,12 @@
+@@ -667,15 +667,12 @@
  
  ### Option: Include
  #     You may include individual files or all files in a directory in the configuration file.
@@ -74,9 +74,9 @@ diff -ur zabbix-6.0.33.orig/conf/zabbix_proxy.conf zabbix-6.0.33/conf/zabbix_pro
  
  ### Option: SSLCertLocation
  #     Location of SSL client certificates.
-diff -ur zabbix-6.0.33.orig/conf/zabbix_server.conf zabbix-6.0.33/conf/zabbix_server.conf
---- zabbix-6.0.33.orig/conf/zabbix_server.conf 2024-08-16 22:28:36.880584826 +0200
-+++ zabbix-6.0.33/conf/zabbix_server.conf      2024-08-16 22:28:57.064954415 +0200
+diff -ur zabbix-7.0.6.orig/conf/zabbix_server.conf zabbix-7.0.6/conf/zabbix_server.conf
+--- zabbix-7.0.6.orig/conf/zabbix_server.conf  2024-12-10 12:00:50.196197734 +0100
++++ zabbix-7.0.6/conf/zabbix_server.conf       2024-12-10 12:02:03.545043839 +0100
 @@ -35,7 +35,7 @@
  # Default:
  # LogFile=
@@ -95,7 +95,7 @@ diff -ur zabbix-6.0.33.orig/conf/zabbix_server.conf zabbix-6.0.33/conf/zabbix_se
  
  ### Option: SocketDir
  #     IPC socket directory.
-@@ -654,15 +654,12 @@
+@@ -698,15 +698,12 @@
  
  ### Option: Include
  #     You may include individual files or all files in a directory in the configuration file.
@@ -112,21 +112,21 @@ diff -ur zabbix-6.0.33.orig/conf/zabbix_server.conf zabbix-6.0.33/conf/zabbix_se
  
  ### Option: SSLCertLocation
  #     Location of SSL client certificates.
-diff -ur zabbix-6.0.33.orig/src/go/cmd/zabbix_web_service/config.go zabbix-6.0.33/src/go/cmd/zabbix_web_service/config.go
---- zabbix-6.0.33.orig/src/go/cmd/zabbix_web_service/config.go 2024-08-16 22:28:37.140589587 +0200
-+++ zabbix-6.0.33/src/go/cmd/zabbix_web_service/config.go      2024-08-16 22:28:57.064954415 +0200
-@@ -25,7 +25,7 @@
+diff -ur zabbix-7.0.6.orig/src/go/cmd/zabbix_web_service/config.go zabbix-7.0.6/src/go/cmd/zabbix_web_service/config.go
+--- zabbix-7.0.6.orig/src/go/cmd/zabbix_web_service/config.go  2024-12-10 12:00:50.420200318 +0100
++++ zabbix-7.0.6/src/go/cmd/zabbix_web_service/config.go       2024-12-10 12:02:03.545043839 +0100
+@@ -20,7 +20,7 @@
        ListenPort          string `conf:"optional,range=1024:32767,default=10053"`
        AllowedIP           string `conf:"optional"`
        LogType             string `conf:"optional,default=file"`
 -      LogFile             string `conf:"optional,default=/tmp/zabbix_web_service.log"`
 +      LogFile             string `conf:"optional,default=/var/log/zabbix/zabbix_web_service.log"`
        LogFileSize         int    `conf:"optional,range=0:1024,default=1"`
-       Timeout             int    `conf:"optional,range=1:30,default=3"`
+       Timeout             int    `conf:"optional,range=1:30,default=10"`
        DebugLevel          int    `conf:"range=0:5,default=3"`
-diff -ur zabbix-6.0.33.orig/src/go/conf/mock_server.conf zabbix-6.0.33/src/go/conf/mock_server.conf
---- zabbix-6.0.33.orig/src/go/conf/mock_server.conf    2024-08-16 22:28:37.156589880 +0200
-+++ zabbix-6.0.33/src/go/conf/mock_server.conf 2024-08-16 22:28:57.064954415 +0200
+diff -ur zabbix-7.0.6.orig/src/go/conf/mock_server.conf zabbix-7.0.6/src/go/conf/mock_server.conf
+--- zabbix-7.0.6.orig/src/go/conf/mock_server.conf     2024-12-10 12:00:50.436200502 +0100
++++ zabbix-7.0.6/src/go/conf/mock_server.conf  2024-12-10 12:02:03.545043839 +0100
 @@ -18,7 +18,7 @@
  # Default:
  # LogFile=
@@ -136,9 +136,9 @@ diff -ur zabbix-6.0.33.orig/src/go/conf/mock_server.conf zabbix-6.0.33/src/go/co
  
  ### Option: DebugLevel
  #     Specifies debug level:
-diff -ur zabbix-6.0.33.orig/src/go/conf/zabbix_agent2.conf zabbix-6.0.33/src/go/conf/zabbix_agent2.conf
---- zabbix-6.0.33.orig/src/go/conf/zabbix_agent2.conf  2024-08-16 22:28:37.156589880 +0200
-+++ zabbix-6.0.33/src/go/conf/zabbix_agent2.conf       2024-08-16 22:28:57.064954415 +0200
+diff -ur zabbix-7.0.6.orig/src/go/conf/zabbix_agent2.conf zabbix-7.0.6/src/go/conf/zabbix_agent2.conf
+--- zabbix-7.0.6.orig/src/go/conf/zabbix_agent2.conf   2024-12-10 12:00:50.436200502 +0100
++++ zabbix-7.0.6/src/go/conf/zabbix_agent2.conf        2024-12-10 12:09:28.638178189 +0100
 @@ -8,7 +8,7 @@
  #
  # Mandatory: no
@@ -157,7 +157,7 @@ diff -ur zabbix-6.0.33.orig/src/go/conf/zabbix_agent2.conf zabbix-6.0.33/src/go/
  
  ### Option: LogFileSize
  #     Maximum size of log file in MB.
-@@ -272,9 +272,7 @@
+@@ -282,9 +282,7 @@
  # Default:
  # Include=
  
@@ -168,15 +168,18 @@ diff -ur zabbix-6.0.33.orig/src/go/conf/zabbix_agent2.conf zabbix-6.0.33/src/go/
  
  ### Option:PluginTimeout
  #     Timeout for connections with external plugins.
-@@ -477,4 +475,4 @@
+@@ -487,7 +485,7 @@
  # ForceActiveChecksOnStart=0
  
  # Include configuration files for plugins
 -Include=./zabbix_agent2.d/plugins.d/*.conf
 +Include=/etc/zabbix/zabbix_agent2.d/plugins.d/*.conf
-diff -ur zabbix-6.0.33.orig/src/go/conf/zabbix_web_service.conf zabbix-6.0.33/src/go/conf/zabbix_web_service.conf
---- zabbix-6.0.33.orig/src/go/conf/zabbix_web_service.conf     2024-08-16 22:28:37.156589880 +0200
-+++ zabbix-6.0.33/src/go/conf/zabbix_web_service.conf  2024-08-16 22:28:57.064954415 +0200
+ ####### For advanced users - TLS ciphersuite selection criteria #######
+diff -ur zabbix-7.0.6.orig/src/go/conf/zabbix_web_service.conf zabbix-7.0.6/src/go/conf/zabbix_web_service.conf
+--- zabbix-7.0.6.orig/src/go/conf/zabbix_web_service.conf      2024-12-10 12:00:50.436200502 +0100
++++ zabbix-7.0.6/src/go/conf/zabbix_web_service.conf   2024-12-10 12:02:03.545043839 +0100
 @@ -18,7 +18,7 @@
  #
  # Mandatory: yes, if LogType is set to file, otherwise no
@@ -186,10 +189,10 @@ diff -ur zabbix-6.0.33.orig/src/go/conf/zabbix_web_service.conf zabbix-6.0.33/sr
  
  ### Option: LogFileSize
  #     Maximum size of log file in MB.
-diff -ur zabbix-6.0.33.orig/src/go/internal/agent/options_nix.go zabbix-6.0.33/src/go/internal/agent/options_nix.go
---- zabbix-6.0.33.orig/src/go/internal/agent/options_nix.go    2024-08-16 22:28:37.040587756 +0200
-+++ zabbix-6.0.33/src/go/internal/agent/options_nix.go 2024-08-16 22:28:57.064954415 +0200
-@@ -24,7 +24,7 @@
+diff -ur zabbix-7.0.6.orig/src/go/internal/agent/options_nix.go zabbix-7.0.6/src/go/internal/agent/options_nix.go
+--- zabbix-7.0.6.orig/src/go/internal/agent/options_nix.go     2024-12-10 12:00:50.276198656 +0100
++++ zabbix-7.0.6/src/go/internal/agent/options_nix.go  2024-12-10 12:02:03.549043886 +0100
+@@ -19,7 +19,7 @@
  
  type AgentOptions struct {
        LogType                  string   `conf:"optional,default=file"`
@@ -198,10 +201,10 @@ diff -ur zabbix-6.0.33.orig/src/go/internal/agent/options_nix.go zabbix-6.0.33/s
        LogFileSize              int      `conf:"optional,range=0:1024,default=1"`
        DebugLevel               int      `conf:"optional,range=0:5,default=3"`
        PidFile                  string   `conf:"optional"`
-diff -ur zabbix-6.0.33.orig/src/go/pkg/pidfile/pidfile_nix.go zabbix-6.0.33/src/go/pkg/pidfile/pidfile_nix.go
---- zabbix-6.0.33.orig/src/go/pkg/pidfile/pidfile_nix.go       2024-08-16 22:28:37.140589587 +0200
-+++ zabbix-6.0.33/src/go/pkg/pidfile/pidfile_nix.go    2024-08-16 22:28:57.064954415 +0200
-@@ -31,7 +31,7 @@
+diff -ur zabbix-7.0.6.orig/src/go/pkg/pidfile/pidfile_nix.go zabbix-7.0.6/src/go/pkg/pidfile/pidfile_nix.go
+--- zabbix-7.0.6.orig/src/go/pkg/pidfile/pidfile_nix.go        2024-12-10 12:00:50.412200225 +0100
++++ zabbix-7.0.6/src/go/pkg/pidfile/pidfile_nix.go     2024-12-10 12:02:03.549043886 +0100
+@@ -26,7 +26,7 @@
  
  func createPidFile(pid int, path string) (file *os.File, err error) {
        if path == "" {
@@ -210,21 +213,21 @@ diff -ur zabbix-6.0.33.orig/src/go/pkg/pidfile/pidfile_nix.go zabbix-6.0.33/src/
        }
  
        flockT := syscall.Flock_t{
-diff -ur zabbix-6.0.33.orig/src/zabbix_agent/zabbix_agentd.c zabbix-6.0.33/src/zabbix_agent/zabbix_agentd.c
---- zabbix-6.0.33.orig/src/zabbix_agent/zabbix_agentd.c        2024-08-16 22:28:37.036587683 +0200
-+++ zabbix-6.0.33/src/zabbix_agent/zabbix_agentd.c     2024-08-16 22:28:57.064954415 +0200
-@@ -609,7 +609,7 @@
-               CONFIG_LOAD_MODULE_PATH = zbx_strdup(CONFIG_LOAD_MODULE_PATH, DEFAULT_LOAD_MODULE_PATH);
-       if (NULL == CONFIG_PID_FILE)
--              CONFIG_PID_FILE = (char *)"/tmp/zabbix_agentd.pid";
-+              CONFIG_PID_FILE = (char *)"/var/run/zabbix/zabbix_agentd.pid";
+diff -ur zabbix-7.0.6.orig/src/zabbix_agent/zabbix_agentd.c zabbix-7.0.6/src/zabbix_agent/zabbix_agentd.c
+--- zabbix-7.0.6.orig/src/zabbix_agent/zabbix_agentd.c 2024-12-10 12:00:50.272198610 +0100
++++ zabbix-7.0.6/src/zabbix_agent/zabbix_agentd.c      2024-12-10 12:08:32.585531605 +0100
+@@ -695,7 +695,7 @@
+               config_load_module_path = zbx_strdup(config_load_module_path, DEFAULT_LOAD_MODULE_PATH);
+       if (NULL == config_pid_file)
+-              config_pid_file = (char *)"/tmp/zabbix_agentd.pid";
++              config_pid_file = (char *)"/var/run/zabbix/zabbix_agentd.pid";
  #endif
-       if (NULL == CONFIG_LOG_TYPE_STR)
-               CONFIG_LOG_TYPE_STR = zbx_strdup(CONFIG_LOG_TYPE_STR, ZBX_OPTION_LOGTYPE_FILE);
-diff -ur zabbix-6.0.33.orig/src/zabbix_java/lib/logback.xml zabbix-6.0.33/src/zabbix_java/lib/logback.xml
---- zabbix-6.0.33.orig/src/zabbix_java/lib/logback.xml 2024-08-16 22:28:36.988586803 +0200
-+++ zabbix-6.0.33/src/zabbix_java/lib/logback.xml      2024-08-16 22:28:57.064954415 +0200
+       if (NULL == log_file_cfg.log_type_str)
+               log_file_cfg.log_type_str = zbx_strdup(log_file_cfg.log_type_str, ZBX_OPTION_LOGTYPE_FILE);
+diff -ur zabbix-7.0.6.orig/src/zabbix_java/lib/logback.xml zabbix-7.0.6/src/zabbix_java/lib/logback.xml
+--- zabbix-7.0.6.orig/src/zabbix_java/lib/logback.xml  2024-12-10 12:00:50.212197918 +0100
++++ zabbix-7.0.6/src/zabbix_java/lib/logback.xml       2024-12-10 12:02:03.549043886 +0100
 @@ -2,10 +2,10 @@
  
        <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
@@ -238,9 +241,9 @@ diff -ur zabbix-6.0.33.orig/src/zabbix_java/lib/logback.xml zabbix-6.0.33/src/za
                        <minIndex>1</minIndex>
                        <maxIndex>3</maxIndex>
                </rollingPolicy>
-diff -ur zabbix-6.0.33.orig/src/zabbix_java/settings.sh zabbix-6.0.33/src/zabbix_java/settings.sh
---- zabbix-6.0.33.orig/src/zabbix_java/settings.sh     2024-08-16 22:28:36.992586877 +0200
-+++ zabbix-6.0.33/src/zabbix_java/settings.sh  2024-08-16 22:28:57.064954415 +0200
+diff -ur zabbix-7.0.6.orig/src/zabbix_java/settings.sh zabbix-7.0.6/src/zabbix_java/settings.sh
+--- zabbix-7.0.6.orig/src/zabbix_java/settings.sh      2024-12-10 12:00:50.212197918 +0100
++++ zabbix-7.0.6/src/zabbix_java/settings.sh   2024-12-10 12:02:03.549043886 +0100
 @@ -24,7 +24,7 @@
  # Default:
  # PID_FILE=
@@ -250,34 +253,34 @@ diff -ur zabbix-6.0.33.orig/src/zabbix_java/settings.sh zabbix-6.0.33/src/zabbix
  
  ### Option: zabbix.startPollers
  #     Number of worker threads to start.
-diff -ur zabbix-6.0.33.orig/src/zabbix_proxy/proxy.c zabbix-6.0.33/src/zabbix_proxy/proxy.c
---- zabbix-6.0.33.orig/src/zabbix_proxy/proxy.c        2024-08-16 22:28:37.036587683 +0200
-+++ zabbix-6.0.33/src/zabbix_proxy/proxy.c     2024-08-16 22:28:57.064954415 +0200
-@@ -524,7 +524,7 @@
-               CONFIG_SNMPTRAP_FILE = zbx_strdup(CONFIG_SNMPTRAP_FILE, "/tmp/zabbix_traps.tmp");
-       if (NULL == CONFIG_PID_FILE)
--              CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/tmp/zabbix_proxy.pid");
-+              CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/var/run/zabbix/zabbix_proxy.pid");
-       if (NULL == CONFIG_TMPDIR)
-               CONFIG_TMPDIR = zbx_strdup(CONFIG_TMPDIR, "/tmp");
-diff -ur zabbix-6.0.33.orig/src/zabbix_server/server.c zabbix-6.0.33/src/zabbix_server/server.c
---- zabbix-6.0.33.orig/src/zabbix_server/server.c      2024-08-16 22:28:37.028587536 +0200
-+++ zabbix-6.0.33/src/zabbix_server/server.c   2024-08-16 22:28:57.064954415 +0200
-@@ -589,7 +589,7 @@
-               CONFIG_SNMPTRAP_FILE = zbx_strdup(CONFIG_SNMPTRAP_FILE, "/tmp/zabbix_traps.tmp");
-       if (NULL == CONFIG_PID_FILE)
--              CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/tmp/zabbix_server.pid");
-+              CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/var/run/zabbix/zabbix_server.pid");
-       if (NULL == CONFIG_ALERT_SCRIPTS_PATH)
-               CONFIG_ALERT_SCRIPTS_PATH = zbx_strdup(CONFIG_ALERT_SCRIPTS_PATH, DEFAULT_ALERT_SCRIPTS_PATH);
-diff -ur zabbix-6.0.33.orig/ui/include/classes/core/CConfigFile.php zabbix-6.0.33/ui/include/classes/core/CConfigFile.php
---- zabbix-6.0.33.orig/ui/include/classes/core/CConfigFile.php 2024-08-16 22:28:36.816583654 +0200
-+++ zabbix-6.0.33/ui/include/classes/core/CConfigFile.php      2024-08-16 22:28:57.064954415 +0200
-@@ -25,7 +25,7 @@
+diff -ur zabbix-7.0.6.orig/src/zabbix_proxy/proxy.c zabbix-7.0.6/src/zabbix_proxy/proxy.c
+--- zabbix-7.0.6.orig/src/zabbix_proxy/proxy.c 2024-12-10 12:00:50.276198656 +0100
++++ zabbix-7.0.6/src/zabbix_proxy/proxy.c      2024-12-10 12:02:52.397607378 +0100
+@@ -544,7 +544,7 @@
+               zbx_config_snmptrap_file = zbx_strdup(zbx_config_snmptrap_file, "/tmp/zabbix_traps.tmp");
+       if (NULL == zbx_config_pid_file)
+-              zbx_config_pid_file = zbx_strdup(zbx_config_pid_file, "/tmp/zabbix_proxy.pid");
++              zbx_config_pid_file = zbx_strdup(zbx_config_pid_file, "/var/run/zabbix/zabbix_proxy.pid");
+       if (NULL == zbx_config_tmpdir)
+               zbx_config_tmpdir = zbx_strdup(zbx_config_tmpdir, "/tmp");
+diff -ur zabbix-7.0.6.orig/src/zabbix_server/server.c zabbix-7.0.6/src/zabbix_server/server.c
+--- zabbix-7.0.6.orig/src/zabbix_server/server.c       2024-12-10 12:00:50.264198518 +0100
++++ zabbix-7.0.6/src/zabbix_server/server.c    2024-12-10 12:11:11.387363440 +0100
+@@ -644,7 +644,7 @@
+               zbx_config_snmptrap_file = zbx_strdup(zbx_config_snmptrap_file, "/tmp/zabbix_traps.tmp");
+       if (NULL == zbx_config_pid_file)
+-              zbx_config_pid_file = zbx_strdup(zbx_config_pid_file, "/tmp/zabbix_server.pid");
++              zbx_config_pid_file = zbx_strdup(zbx_config_pid_file, "/var/run/zabbix/zabbix_server.pid");
+       if (NULL == zbx_config_alert_scripts_path)
+               zbx_config_alert_scripts_path = zbx_strdup(zbx_config_alert_scripts_path, DEFAULT_ALERT_SCRIPTS_PATH);
+diff -ur zabbix-7.0.6.orig/ui/include/classes/core/CConfigFile.php zabbix-7.0.6/ui/include/classes/core/CConfigFile.php
+--- zabbix-7.0.6.orig/ui/include/classes/core/CConfigFile.php  2024-12-10 12:00:50.032195842 +0100
++++ zabbix-7.0.6/ui/include/classes/core/CConfigFile.php       2024-12-10 12:02:03.549043886 +0100
+@@ -20,7 +20,7 @@
        const CONFIG_ERROR = 2;
        const CONFIG_VAULT_ERROR = 3;
  
@@ -286,10 +289,10 @@ diff -ur zabbix-6.0.33.orig/ui/include/classes/core/CConfigFile.php zabbix-6.0.3
  
        private static $supported_db_types = [
                ZBX_DB_MYSQL => true,
-diff -ur zabbix-6.0.33.orig/ui/include/classes/core/ZBase.php zabbix-6.0.33/ui/include/classes/core/ZBase.php
---- zabbix-6.0.33.orig/ui/include/classes/core/ZBase.php       2024-08-16 22:28:36.816583654 +0200
-+++ zabbix-6.0.33/ui/include/classes/core/ZBase.php    2024-08-16 22:28:57.064954415 +0200
-@@ -380,7 +380,7 @@
+diff -ur zabbix-7.0.6.orig/ui/include/classes/core/ZBase.php zabbix-7.0.6/ui/include/classes/core/ZBase.php
+--- zabbix-7.0.6.orig/ui/include/classes/core/ZBase.php        2024-12-10 12:00:50.032195842 +0100
++++ zabbix-7.0.6/ui/include/classes/core/ZBase.php     2024-12-10 12:12:16.044109281 +0100
+@@ -392,7 +392,7 @@
         * @throws Exception
         */
        protected function setMaintenanceMode() {
@@ -298,32 +301,50 @@ diff -ur zabbix-6.0.33.orig/ui/include/classes/core/ZBase.php zabbix-6.0.33/ui/i
  
                if (defined('ZBX_DENY_GUI_ACCESS')) {
                        if (!isset($ZBX_GUI_ACCESS_IP_RANGE) || !in_array(CWebUser::getIp(), $ZBX_GUI_ACCESS_IP_RANGE)) {
-@@ -393,7 +393,7 @@
+@@ -405,7 +405,7 @@
         * Load zabbix config file.
         */
-       protected function loadConfigFile() {
--              $configFile = $this->getRootDir().CConfigFile::CONFIG_FILE_PATH;
-+              $configFile = CConfigFile::CONFIG_FILE_PATH;
+       protected function loadConfigFile(): void {
+-              $configFile = $this->root_dir.CConfigFile::CONFIG_FILE_PATH;
++              $configFile = $this->CConfigFile::CONFIG_FILE_PATH;
                $config = new CConfigFile($configFile);
-               $this->config = $config->load();
-       }
-diff -ur zabbix-6.0.33.orig/ui/include/classes/setup/CSetupWizard.php zabbix-6.0.33/ui/include/classes/setup/CSetupWizard.php
---- zabbix-6.0.33.orig/ui/include/classes/setup/CSetupWizard.php       2024-08-16 22:28:36.792583215 +0200
-+++ zabbix-6.0.33/ui/include/classes/setup/CSetupWizard.php    2024-08-16 22:28:57.064954415 +0200
-@@ -273,7 +273,7 @@
+diff -ur zabbix-7.0.6.orig/ui/include/classes/setup/CSetupWizard.php zabbix-7.0.6/ui/include/classes/setup/CSetupWizard.php
+--- zabbix-7.0.6.orig/ui/include/classes/setup/CSetupWizard.php        2024-12-10 12:00:50.004195519 +0100
++++ zabbix-7.0.6/ui/include/classes/setup/CSetupWizard.php     2024-12-10 12:14:52.725916691 +0100
+@@ -117,7 +117,7 @@
+                       }
+               }
+               elseif ($this->getStep() == self::STAGE_DB_CONNECTION) {
+-                      $config = new CConfigFile(APP::getRootDir().CConfigFile::CONFIG_FILE_PATH);
++                      $config = new CConfigFile(CConfigFile::CONFIG_FILE_PATH);
+                       $input = [
+                               'DB_TYPE' => getRequest('type', $this->getConfig('DB_TYPE')),
+@@ -343,7 +343,7 @@
                                // make zabbix.conf.php downloadable
                                header('Content-Type: application/x-httpd-php');
                                header('Content-Disposition: attachment; filename="'.basename(CConfigFile::CONFIG_FILE_PATH).'"');
--                              $config = new CConfigFile(APP::getInstance()->getRootDir().CConfigFile::CONFIG_FILE_PATH);
+-                              $config = new CConfigFile(APP::getRootDir().CConfigFile::CONFIG_FILE_PATH);
 +                              $config = new CConfigFile(CConfigFile::CONFIG_FILE_PATH);
                                $config->config = [
                                        'DB' => [
                                                'TYPE' => $this->getConfig('DB_TYPE'),
-@@ -825,7 +825,7 @@
+@@ -544,7 +544,7 @@
+               $DB['TYPE'] = $this->getConfig('DB_TYPE', key(CFrontendSetup::getSupportedDatabases()));
+               $db_warning = _('Support for Oracle DB is deprecated since Zabbix 7.0 and will be removed in future versions.');
+-              $config = new CConfigFile(APP::getRootDir().CConfigFile::CONFIG_FILE_PATH);
++              $config = new CConfigFile(CConfigFile::CONFIG_FILE_PATH);
+               $table = (new CFormList())
+                       ->addItem([
+@@ -1048,7 +1048,7 @@
  
                $this->setConfig('ZBX_CONFIG_FILE_CORRECT', true);
  
--              $config_file_name = APP::getInstance()->getRootDir().CConfigFile::CONFIG_FILE_PATH;
+-              $config_file_name = APP::getRootDir().CConfigFile::CONFIG_FILE_PATH;
 +              $config_file_name = CConfigFile::CONFIG_FILE_PATH;
                $config = new CConfigFile($config_file_name);
                $config->config = [
index f611c05d0c218efe563c28b97d2e8176232e4ea1..d0f2d01e5ef06b1a3639e276ff5d048e6218ebdb 100644 (file)
 Summary:       Zabbix - network monitoring software
 Summary(pl.UTF-8):     Zabbix - oprogramowanie do monitorowania sieci
 Name:          zabbix
-Version:       6.0.36
+Version:       7.0.6
 Release:       1
 License:       GPL v2+
 Group:         Networking/Utilities
-Source0:       https://cdn.zabbix.com/zabbix/sources/stable/6.0/%{name}-%{version}.tar.gz
-# Source0-md5: b56e1bc0ff5df75e46d6ae73b7dbc20a
+Source0:       https://cdn.zabbix.com/zabbix/sources/stable/7.0/%{name}-%{version}.tar.gz
+# Source0-md5: 1068ff3dbc445cf00468958f3e600136
 Source1:       %{name}-apache.conf
 Source2:       %{name}_agentd.init
 Source3:       %{name}_server.init