From f44aed6bd67c1e87d2539e05051450c0d4f433cf Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 2 Aug 2022 20:12:55 +0000 Subject: [PATCH] Auto sync2gitlab import of procps-ng-3.3.15-8.el8.src.rpm --- ...ps-ng-3.3.15-sysctl-config-dir-order.patch | 96 ++++++++++++ ...s-ng-3.3.15-vmstat-omit-first-report.patch | 147 ++++++++++++++++++ procps-ng.spec | 10 +- 3 files changed, 252 insertions(+), 1 deletion(-) create mode 100644 procps-ng-3.3.15-sysctl-config-dir-order.patch create mode 100644 procps-ng-3.3.15-vmstat-omit-first-report.patch diff --git a/procps-ng-3.3.15-sysctl-config-dir-order.patch b/procps-ng-3.3.15-sysctl-config-dir-order.patch new file mode 100644 index 0000000..3e0bf97 --- /dev/null +++ b/procps-ng-3.3.15-sysctl-config-dir-order.patch @@ -0,0 +1,96 @@ +diff -up ./NEWS.ori ./NEWS +diff -up ./sysctl.8.ori ./sysctl.8 +--- ./sysctl.8.ori 2018-03-03 07:59:18.064843718 +0100 ++++ ./sysctl.8 2022-07-29 16:33:02.906648974 +0200 +@@ -6,7 +6,7 @@ + .\" but WITHOUT ANY WARRANTY; without even the implied warranty of + .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + .\" GNU General Public License for more details." +-.TH SYSCTL "8" "2018-02-19" "procps-ng" "System Administration" ++.TH SYSCTL "8" "2020-02-27" "procps-ng" "System Administration" + .SH NAME + sysctl \- configure kernel parameters at runtime + .SH SYNOPSIS +@@ -81,10 +81,10 @@ directories in the following list in giv + Once a file of a given filename is loaded, any file of the same name + in subsequent directories is ignored. + .br +-/run/sysctl.d/*.conf +-.br + /etc/sysctl.d/*.conf + .br ++/run/sysctl.d/*.conf ++.br + /usr/local/lib/sysctl.d/*.conf + .br + /usr/lib/sysctl.d/*.conf +@@ -152,6 +152,16 @@ echo 256 > /proc/sys/net/ipv6/neigh/eth0 + .SH FILES + .I /proc/sys + .br ++.I /etc/sysctl.d/*.conf ++.br ++.I /run/sysctl.d/*.conf ++.br ++.I /usr/local/lib/sysctl.d/*.conf ++.br ++.I /usr/lib/sysctl.d/*.conf ++.br ++.I /lib/sysctl.d/*.conf ++.br + .I /etc/sysctl.conf + .SH SEE ALSO + .BR sysctl.conf (5) +diff -up ./sysctl.conf.5.ori ./sysctl.conf.5 +--- ./sysctl.conf.5.ori 2017-12-22 05:13:14.771653252 +0100 ++++ ./sysctl.conf.5 2022-07-29 16:33:02.907648980 +0200 +@@ -51,22 +51,22 @@ to list all possible parameters. The des + .RE + .PP + .SH FILES +-.TP +-/run/sysctl.d/*.conf +-.TQ +-/etc/sysctl.d/*.conf +-.TQ +-/usr/local/lib/sysctl.d/*.conf +-.TQ +-/usr/lib/sysctl.d/*.conf +-.TQ +-/lib/sysctl.d/*.conf +-.TQ +-/etc/sysctl.conf ++.I /etc/sysctl.d/*.conf ++.br ++.I /run/sysctl.d/*.conf ++.br ++.I /usr/local/lib/sysctl.d/*.conf ++.br ++.I /usr/lib/sysctl.d/*.conf ++.br ++.I /lib/sysctl.d/*.conf ++.br ++.I /etc/sysctl.conf ++ + The paths where +-sysctl ++.B sysctl + preload files usually exist. See also +-sysctl ++.B sysctl + option + .IR \-\-system . + .SH SEE ALSO +diff -up ./sysctl.c.ori ./sysctl.c +--- ./sysctl.c.ori 2018-05-17 13:23:41.574213737 +0200 ++++ ./sysctl.c 2022-07-29 16:33:02.907648980 +0200 +@@ -614,8 +614,8 @@ static int PreloadSystem(void) + { + unsigned di, i; + const char *dirs[] = { +- "/run/sysctl.d", + "/etc/sysctl.d", ++ "/run/sysctl.d", + "/usr/local/lib/sysctl.d", + "/usr/lib/sysctl.d", + "/lib/sysctl.d", diff --git a/procps-ng-3.3.15-vmstat-omit-first-report.patch b/procps-ng-3.3.15-vmstat-omit-first-report.patch new file mode 100644 index 0000000..87e5b65 --- /dev/null +++ b/procps-ng-3.3.15-vmstat-omit-first-report.patch @@ -0,0 +1,147 @@ +diff --git a/vmstat.8 b/vmstat.8 +index fa0938c..fd1078f 100644 +--- a/vmstat.8 ++++ b/vmstat.8 +@@ -87,6 +87,9 @@ Display version information and exit. + .TP + \fB\-h\fR, \fB\-\-help\fR + Display help and exit. ++.TP ++\fB\-y\fR, \fB\-\-no-first\fR ++Omits first report with statistics since system boot. + .PD + .SH "FIELD DESCRIPTION FOR VM MODE" + .SS +diff --git a/vmstat.c b/vmstat.c +index f2aa2f4..07496cd 100644 +--- a/vmstat.c ++++ b/vmstat.c +@@ -75,6 +75,9 @@ static int a_option; + /* "-w" means "wide output" */ + static int w_option; + ++/* "-y" means "skip first output" */ ++static int y_option; ++ + /* "-t" means "show timestamp" */ + static int t_option; + +@@ -104,6 +107,7 @@ static void __attribute__ ((__noreturn__)) + fputs(_(" -S, --unit define display unit\n"), out); + fputs(_(" -w, --wide wide output\n"), out); + fputs(_(" -t, --timestamp show timestamp\n"), out); ++ fputs(_(" -y, --no-first skips first line of output\n"), out); + fputs(USAGE_SEPARATOR, out); + fputs(USAGE_HELP, out); + fputs(USAGE_VERSION, out); +@@ -304,43 +308,47 @@ static void new_format(void) + cpu_zzz, pgpgin, pgpgout, pswpin, pswpout, intr, ctxt, &running, + &blocked, &dummy_1, &dummy_2); + +- if (t_option) { +- (void) time( &the_time ); +- tm_ptr = localtime( &the_time ); +- strftime(timebuf, sizeof(timebuf), "%Y-%m-%d %H:%M:%S", tm_ptr); +- } ++ if (y_option == 0) { ++ if (t_option) { ++ (void) time( &the_time ); ++ tm_ptr = localtime( &the_time ); ++ strftime(timebuf, sizeof(timebuf), "%Y-%m-%d %H:%M:%S", tm_ptr); ++ } + +- duse = *cpu_use + *cpu_nic; +- dsys = *cpu_sys + *cpu_xxx + *cpu_yyy; +- didl = *cpu_idl; +- diow = *cpu_iow; +- dstl = *cpu_zzz; +- Div = duse + dsys + didl + diow + dstl; +- if (!Div) Div = 1, didl = 1; +- divo2 = Div / 2UL; +- printf(w_option ? wide_format : format, +- running, blocked, +- unitConvert(kb_swap_used), unitConvert(kb_main_free), +- unitConvert(a_option?kb_inactive:kb_main_buffers), +- unitConvert(a_option?kb_active:kb_main_cached), +- (unsigned)( (unitConvert(*pswpin * kb_per_page) * hz + divo2) / Div ), +- (unsigned)( (unitConvert(*pswpout * kb_per_page) * hz + divo2) / Div ), +- (unsigned)( (*pgpgin * hz + divo2) / Div ), +- (unsigned)( (*pgpgout * hz + divo2) / Div ), +- (unsigned)( (*intr * hz + divo2) / Div ), +- (unsigned)( (*ctxt * hz + divo2) / Div ), +- (unsigned)( (100*duse + divo2) / Div ), +- (unsigned)( (100*dsys + divo2) / Div ), +- (unsigned)( (100*didl + divo2) / Div ), +- (unsigned)( (100*diow + divo2) / Div ), +- (unsigned)( (100*dstl + divo2) / Div ) +- ); ++ duse = *cpu_use + *cpu_nic; ++ dsys = *cpu_sys + *cpu_xxx + *cpu_yyy; ++ didl = *cpu_idl; ++ diow = *cpu_iow; ++ dstl = *cpu_zzz; ++ Div = duse + dsys + didl + diow + dstl; ++ if (!Div) Div = 1, didl = 1; ++ divo2 = Div / 2UL; ++ printf(w_option ? wide_format : format, ++ running, blocked, ++ unitConvert(kb_swap_used), unitConvert(kb_main_free), ++ unitConvert(a_option?kb_inactive:kb_main_buffers), ++ unitConvert(a_option?kb_active:kb_main_cached), ++ (unsigned)( (unitConvert(*pswpin * kb_per_page) * hz + divo2) / Div ), ++ (unsigned)( (unitConvert(*pswpout * kb_per_page) * hz + divo2) / Div ), ++ (unsigned)( (*pgpgin * hz + divo2) / Div ), ++ (unsigned)( (*pgpgout * hz + divo2) / Div ), ++ (unsigned)( (*intr * hz + divo2) / Div ), ++ (unsigned)( (*ctxt * hz + divo2) / Div ), ++ (unsigned)( (100*duse + divo2) / Div ), ++ (unsigned)( (100*dsys + divo2) / Div ), ++ (unsigned)( (100*didl + divo2) / Div ), ++ (unsigned)( (100*diow + divo2) / Div ), ++ (unsigned)( (100*dstl + divo2) / Div ) ++ ); + +- if (t_option) { +- printf(" %s", timebuf); +- } ++ if (t_option) { ++ printf(" %s", timebuf); ++ } + +- printf("\n"); ++ printf("\n"); ++ } ++ else ++ num_updates++; + + /* main loop */ + for (i = 1; infinite_updates || i < num_updates; i++) { +@@ -865,6 +873,7 @@ int main(int argc, char *argv[]) + {"timestamp", no_argument, NULL, 't'}, + {"help", no_argument, NULL, 'h'}, + {"version", no_argument, NULL, 'V'}, ++ {"no-first", no_argument, NULL, 'y'}, + {NULL, 0, NULL, 0} + }; + +@@ -877,7 +886,7 @@ int main(int argc, char *argv[]) + atexit(close_stdout); + + while ((c = +- getopt_long(argc, argv, "afmnsdDp:S:wthV", longopts, ++ getopt_long(argc, argv, "afmnsdDp:S:wthVy", longopts, + NULL)) != EOF) + switch (c) { + case 'V': +@@ -946,6 +955,11 @@ int main(int argc, char *argv[]) + case 't': + t_option = 1; + break; ++ case 'y': ++ /* Don't display stats since system restart */ ++ y_option = 1; ++ break; ++ + default: + /* no other aguments defined yet. */ + usage(stderr); diff --git a/procps-ng.spec b/procps-ng.spec index 189cb30..623ee8d 100644 --- a/procps-ng.spec +++ b/procps-ng.spec @@ -4,7 +4,7 @@ Summary: System and process monitoring utilities Name: procps-ng Version: 3.3.15 -Release: 7%{?dist} +Release: 8%{?dist} License: GPL+ and GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ Group: Applications/System URL: https://sourceforge.net/projects/procps-ng/ @@ -22,6 +22,8 @@ Patch3: procps-ng-3.3.15-vmstat-watch-manpage.patch Patch4: procps-ng-3.3.15-pidof-kernel-workers-option.patch Patch5: procps-ng-3.3.15-pidof-separator-option-backport.patch Patch6: procps-ng-3.3.15-uptime-pretty-mod.patch +Patch7: procps-ng-3.3.15-vmstat-omit-first-report.patch +Patch8: procps-ng-3.3.15-sysctl-config-dir-order.patch BuildRequires: ncurses-devel BuildRequires: libtool @@ -164,6 +166,12 @@ ln -s %{_bindir}/pidof %{buildroot}%{_sbindir}/pidof %files i18n -f %{name}.lang %changelog +* Wed Jul 20 2022 Jan Rybar - 3.3.15-8 +- vmstat: added -y option to omit first report +- Resolves: rhbz#2027350 +- sysctl: backport config directory order, align with systemd +- Resolves: rhbz#2111915 + * Wed Mar 23 2022 Jan Rybar - 3.3.15-7 - uptime: human readable data not shown if 364 days up - Resolves: rhbz#1772999