Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37765164
en ru br
Репозитории ALT

Группа :: Система/Основа
Пакет: vzstat

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: vzstat-7.0.25.patch
Скачать


 .gear/rules      |  2 ++
 .gear/tags/list  |  1 +
 Makefile         |  4 ++--
 man/vzstat.8     |  2 +-
 src/vzparsecpu.c |  2 ++
 src/vzstat.c     |  4 ++--
 vzstat.spec      | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 68 insertions(+), 5 deletions(-)
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 0000000..26340af
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,2 @@
+tar: v@version@:.
+diff: v@version@:. . name=@name@-@version@.patch
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 0000000..aed69df
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1 @@
+3c42dea37fafaca5891c9deaf9bbfea1301c1fd7 v7.0.25
diff --git a/Makefile b/Makefile
index 18b80e0..b626132 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@ export INSTALL    =  install
 export INSTALLBIN =  $(INSTALL) --mode a=rx --strip
 export INSTALLMAN =  $(INSTALL) --mode a=r
 export INSTALLCONF =  $(INSTALL) --mode 0644
-export CONFDIR    =  $(DESTDIR)/etc
+export CONFDIR    =  $(DESTDIR)/etc/vz
 
 UPROG      =                # -> USRBINDIR
 SPROG      =  src/vzstat # -> SBINDIR
@@ -19,7 +19,7 @@ CONF       =  etc/vzstat.conf
 
 export CC         =  gcc #-ggdb # this gets compiling and linking :-)
 export OPT        =  -O3
-export CFLAGS     =  $(shell echo $$CFLAGS) -D_GNU_SOURCE $(OPT) -I$(shell pwd) -Wall -Wextra -Werror -Wno-missing-field-initializers -Wno-format-truncation
+export CFLAGS     =  $(shell echo $$CFLAGS) -D_GNU_SOURCE $(OPT) -I$(shell pwd) -Wall -Wextra -Werror -Wno-missing-field-initializers -Wno-format-truncation -Wno-error=stringop-truncation -Wno-stringop-truncation
 
 export LDFLAGS    =  $(shell echo $$LDFLAGS) -Wl,-warn-common #-s	recommended for ELF systems
 
diff --git a/man/vzstat.8 b/man/vzstat.8
index 6fe9c59..97d846b 100644
--- a/man/vzstat.8
+++ b/man/vzstat.8
@@ -601,7 +601,7 @@ Sort by memory latency
 .RE
 
 .SH @CMD_NAME_CAPS@ CONFIGURATION FILES
-The \fB@CMD_NAME@\fP configuration file is located in \fI/etc/vzstat.conf\fP.
+The \fB@CMD_NAME@\fP configuration file is located in \fI/etc/vz/vzstat.conf\fP.
 The parameter values in this file are highlighting thresholds for the
 corresponding monitoring parameters. If the current value exceeds the warning
 level, the parameter is shown in yellow. If the value exceeds the error
diff --git a/src/vzparsecpu.c b/src/vzparsecpu.c
index 2873b19..71f04f3 100644
--- a/src/vzparsecpu.c
+++ b/src/vzparsecpu.c
@@ -306,11 +306,13 @@ int parse_ub_line(char *line)
 		if (res != 1) return 0;
 		s++;
 		strncpy(last_ve_uuid, ve_uuid, sizeof(last_ve_uuid) - 1);
+		last_ve_uuid[sizeof(last_ve_uuid) - 1] = '\0';
 	}
 	else
 	{
 		s = line;
 		strncpy(ve_uuid, last_ve_uuid, sizeof(ve_uuid) - 1);
+		ve_uuid[sizeof(ve_uuid) - 1] = '\0';
 	}
 
 	/* now parse everything else */
diff --git a/src/vzstat.c b/src/vzstat.c
index 1e300c9..3f5ae4f 100644
--- a/src/vzstat.c
+++ b/src/vzstat.c
@@ -564,7 +564,7 @@ int *get_field_set(int *set)
 	}
 	return set;
 }
-#define CONFIG	"/etc/vzstat.conf"
+#define CONFIG	"/etc/vz/vzstat.conf"
 #define FILTER_MAX_CTID 20
 int veids_specified = 0;
 char *veids[FILTER_MAX_CTID];
@@ -3089,7 +3089,7 @@ void _printe(char *fmt, ...)
 	if (gen_text_output)
 		vprintf(fmt, ap);
 	else
-		vwprintw(stdscr, fmt, ap);
+		vw_printw(stdscr, fmt, ap);
 	va_end(ap);
 }
 
diff --git a/vzstat.spec b/vzstat.spec
new file mode 100644
index 0000000..cf63399
--- /dev/null
+++ b/vzstat.spec
@@ -0,0 +1,58 @@
+
+Name: vzstat
+Version: 7.0.25
+Release: alt2
+Summary: vzstat utility for node monitoring
+
+Group: System/Base
+License: GPLv2+
+Url: https://src.openvz.org/projects/OVZ/repos/vzstat
+Source: %name-%version.tar
+Patch: %name-%version.patch
+ExclusiveArch: x86_64
+
+BuildRequires: libvzctl-devel
+BuildRequires: libncurses-devel
+BuildRequires: libuuid-devel
+BuildRequires: kernel-headers-ovz-el7 >= 3.10.0
+
+%description
+This package contains statistic monitoring utility for OpenVZ HW node.
+
+%prep
+%setup
+%patch -p1
+
+%build
+%make_build
+
+%install
+%makeinstall_std MANDIR="%_mandir"
+
+%files
+%_sbindir/%name
+%config(noreplace) %_sysconfdir/vz/%name.conf
+%_man8dir/%name.*
+%doc README.md COPYING
+
+%changelog
+* Tue Mar 30 2021 Andrew A. Vasilyev <andy@altlinux.org> 7.0.25-alt2
+- fix FTBFS
+
+* Wed Jul 01 2020 Andrew A. Vasilyev <andy@altlinux.org> 7.0.25-alt1
+- 7.0.25
+
+* Fri Feb 07 2020 Andrew A. Vasilyev <andy@altlinux.org> 7.0.24-alt1
+- 7.0.24
+
+* Mon Dec 02 2019 Andrew A. Vasilyev <andy@altlinux.org> 7.0.21-alt1
+- 7.0.21
+- fix Licence
+- suppress stringop-truncation error
+
+* Mon Sep 16 2019 Andrew A. Vasilyev <andy@altlinux.org> 7.0.20-alt1
+- 7.0.20
+
+* Sun Nov 04 2018 Alexey Shabalin <shaba@altlinux.org> 7.0.19-alt1
+- initial packaging
+
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin