2.40-0.1: upgrade to v2.40-rc1
This commit is contained in:
parent
c9ce0bbf54
commit
bac574c283
1
.gitignore
vendored
1
.gitignore
vendored
@ -94,3 +94,4 @@
|
||||
/util-linux-2.39.1.tar.xz
|
||||
/util-linux-2.39.2.tar.xz
|
||||
/util-linux-2.39.3.tar.xz
|
||||
/util-linux-2.40-rc1.tar.xz
|
||||
|
@ -1,69 +0,0 @@
|
||||
From bb525b59190e3b40b2424f4f1febc22ca9c6b9f3 Mon Sep 17 00:00:00 2001
|
||||
From: Karel Zak <kzak@redhat.com>
|
||||
Date: Thu, 18 Jan 2024 13:09:24 +0100
|
||||
Subject: [PATCH] libsmartcols: fix columns reduction
|
||||
|
||||
* reduce_to_68() does not care if subtract from column width is
|
||||
possible (and width is size_t)
|
||||
|
||||
* improve some calculations with 'double'
|
||||
|
||||
Fixes: https://github.com/util-linux/util-linux/issues/2563
|
||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||
---
|
||||
libsmartcols/src/calculate.c | 16 +++++++++++-----
|
||||
1 file changed, 11 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/libsmartcols/src/calculate.c b/libsmartcols/src/calculate.c
|
||||
index e9db3b299..84198da3b 100644
|
||||
--- a/libsmartcols/src/calculate.c
|
||||
+++ b/libsmartcols/src/calculate.c
|
||||
@@ -118,7 +118,7 @@ static void count_column_deviation(struct libscols_table *tb, struct libscols_co
|
||||
}
|
||||
|
||||
if (n)
|
||||
- st->width_avg = sum / n;
|
||||
+ st->width_avg = (double) sum / (double) n;
|
||||
|
||||
/* count deviation */
|
||||
if (n > 1) {
|
||||
@@ -133,7 +133,7 @@ static void count_column_deviation(struct libscols_table *tb, struct libscols_co
|
||||
st->width_sqr_sum += diff * diff; /* aka pow(x, 2) */
|
||||
}
|
||||
|
||||
- variance = st->width_sqr_sum / (n - 1);
|
||||
+ variance = st->width_sqr_sum / (double) (n - 1);
|
||||
st->width_deviation = sqrtroot(variance);
|
||||
}
|
||||
|
||||
@@ -240,8 +240,8 @@ static int cmp_deviation(struct list_head *a, struct list_head *b,
|
||||
struct libscols_column *ca = list_entry(a, struct libscols_column, cl_columns);
|
||||
struct libscols_column *cb = list_entry(b, struct libscols_column, cl_columns);
|
||||
|
||||
- double xa = ca->wstat.width_avg + (3*ca->wstat.width_deviation);
|
||||
- double xb = cb->wstat.width_avg + (3*cb->wstat.width_deviation);
|
||||
+ double xa = ca->wstat.width_avg + (3.0 * ca->wstat.width_deviation);
|
||||
+ double xb = cb->wstat.width_avg + (3.0 * cb->wstat.width_deviation);
|
||||
|
||||
return cmp_numbers(xa, xb);
|
||||
}
|
||||
@@ -280,9 +280,15 @@ static void reduce_to_68(struct libscols_column *cl, size_t wanted)
|
||||
if (st->width_deviation < 1.0)
|
||||
return;
|
||||
|
||||
- new = st->width_avg + st->width_deviation;
|
||||
+ new = (size_t) (st->width_avg + st->width_deviation);
|
||||
+
|
||||
if (new < st->width_min)
|
||||
new = st->width_min;
|
||||
+ else if (new > st->width_max)
|
||||
+ new = st->width_max;
|
||||
+
|
||||
+ if (new >= cl->width)
|
||||
+ return;
|
||||
|
||||
if (cl->width - new > wanted)
|
||||
cl->width -= wanted;
|
||||
--
|
||||
2.43.0
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (util-linux-2.39.3.tar.xz) = a2de1672f06ca5d2d431db1265a8499808770c3781019ec4a3a40170df4685826d8e3ca120841dcc5df4681ca8c935a993317bd0dc70465b21bf8e0efef65afa
|
||||
SHA512 (util-linux-2.40-rc1.tar.xz) = ba307c4686c7989c1d563f19ca6a1c06c237de2fe063a51e28aaefee7a1afab49deb94abd80b4263c2d671f791798112b287dc3f1b3d73d755119e01883aaeb0
|
||||
|
@ -1,13 +1,13 @@
|
||||
### Header
|
||||
Summary: Collection of basic system utilities
|
||||
Name: util-linux
|
||||
Version: 2.39.3
|
||||
Release: 4%{?dist}
|
||||
Version: 2.40
|
||||
Release: 0.1%{?dist}
|
||||
License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain
|
||||
URL: https://en.wikipedia.org/wiki/Util-linux
|
||||
|
||||
### Macros
|
||||
%global upstream_version %{version}
|
||||
%global upstream_version %{version}-rc1
|
||||
%global upstream_major %(eval echo %{version} | sed -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/')
|
||||
|
||||
%global compldir %{_datadir}/bash-completion/completions/
|
||||
@ -97,8 +97,6 @@ Patch0: login-lastlog-create.patch
|
||||
# Add `/run/motd.d` to the hardcoded MOTD_FILE
|
||||
# https://github.com/coreos/console-login-helper-messages/issues/60
|
||||
Patch1: login-default-motd-file.patch
|
||||
# 2258501 - dnf5 unusable with libsmartcols
|
||||
Patch2: libsmartcols-fix-columns-reduction.patch
|
||||
|
||||
%description
|
||||
The util-linux package contains a large variety of low-level system
|
||||
@ -309,6 +307,7 @@ export DAEMON_LDFLAGS="$SUID_LDFLAGS"
|
||||
--disable-silent-rules \
|
||||
--disable-bfs \
|
||||
--disable-pg \
|
||||
--disable-liblastlog2 \
|
||||
--enable-chfn-chsh \
|
||||
--enable-usrdir-path \
|
||||
--enable-write \
|
||||
@ -505,6 +504,8 @@ fi
|
||||
%{_bindir}/colrm
|
||||
%{_bindir}/column
|
||||
%{_bindir}/eject
|
||||
%{_bindir}/enosys
|
||||
%{_bindir}/exch
|
||||
%{_bindir}/fallocate
|
||||
%{_bindir}/fincore
|
||||
%{_bindir}/fadvise
|
||||
@ -517,6 +518,7 @@ fi
|
||||
%{_bindir}/look
|
||||
%{_bindir}/lsblk
|
||||
%{_bindir}/lscpu
|
||||
%{_bindir}/lsclocks
|
||||
%{_bindir}/lsfd
|
||||
%{_bindir}/lsipc
|
||||
%{_bindir}/lsirq
|
||||
@ -535,6 +537,7 @@ fi
|
||||
%{_bindir}/scriptlive
|
||||
%{_bindir}/scriptreplay
|
||||
%{_bindir}/setarch
|
||||
%{_bindir}/setpgid
|
||||
%{_bindir}/setpriv
|
||||
%{_bindir}/setterm
|
||||
%{_bindir}/uclampset
|
||||
@ -555,7 +558,9 @@ fi
|
||||
%{_mandir}/man1/colrm.1*
|
||||
%{_mandir}/man1/column.1*
|
||||
%{_mandir}/man1/eject.1*
|
||||
%{_mandir}/man1/fadvise.1.*
|
||||
%{_mandir}/man1/enosys.1*
|
||||
%{_mandir}/man1/exch.1*
|
||||
%{_mandir}/man1/fadvise.1*
|
||||
%{_mandir}/man1/fallocate.1*
|
||||
%{_mandir}/man1/fincore.1*
|
||||
%{_mandir}/man1/getopt.1*
|
||||
@ -566,6 +571,7 @@ fi
|
||||
%{_mandir}/man1/login.1*
|
||||
%{_mandir}/man1/look.1*
|
||||
%{_mandir}/man1/lscpu.1*
|
||||
%{_mandir}/man1/lsclocks.1*
|
||||
%{_mandir}/man1/lsfd.1*
|
||||
%{_mandir}/man1/lsipc.1*
|
||||
%{_mandir}/man1/lsirq.1*
|
||||
@ -582,6 +588,7 @@ fi
|
||||
%{_mandir}/man1/script.1*
|
||||
%{_mandir}/man1/scriptlive.1*
|
||||
%{_mandir}/man1/scriptreplay.1*
|
||||
%{_mandir}/man1/setpgid.1*
|
||||
%{_mandir}/man1/setpriv.1*
|
||||
%{_mandir}/man1/setterm.1*
|
||||
%{_mandir}/man1/su.1*
|
||||
@ -595,6 +602,7 @@ fi
|
||||
%{_mandir}/man1/whereis.1*
|
||||
%{_mandir}/man1/write.1*
|
||||
%{_mandir}/man5/fstab.5*
|
||||
%{_mandir}/man5/scols-filter.5*
|
||||
%{_mandir}/man5/terminal-colors.d.5*
|
||||
%{_mandir}/man8/addpart.8*
|
||||
%{_mandir}/man8/blkdiscard.8*
|
||||
@ -672,6 +680,8 @@ fi
|
||||
%{compldir}/ctrlaltdel
|
||||
%{compldir}/delpart
|
||||
%{compldir}/eject
|
||||
%{compldir}/enosys
|
||||
%{compldir}/exch
|
||||
%{compldir}/fadvise
|
||||
%{compldir}/fallocate
|
||||
%{compldir}/fdisk
|
||||
@ -691,6 +701,7 @@ fi
|
||||
%{compldir}/look
|
||||
%{compldir}/lsblk
|
||||
%{compldir}/lscpu
|
||||
%{compldir}/lsclocks
|
||||
%{compldir}/lsipc
|
||||
%{compldir}/lsirq
|
||||
%{compldir}/lslocks
|
||||
@ -718,6 +729,7 @@ fi
|
||||
%{compldir}/scriptreplay
|
||||
%{compldir}/setarch
|
||||
%{compldir}/setpriv
|
||||
%{compldir}/setpgid
|
||||
%{compldir}/setterm
|
||||
%{compldir}/su
|
||||
%{compldir}/swaplabel
|
||||
@ -932,6 +944,10 @@ fi
|
||||
%files -n util-linux-i18n -f %{name}.lang
|
||||
|
||||
%changelog
|
||||
* Fri Feb 2 2024 Karel Zak <kzak@redhat.com> - 2.40-0.1
|
||||
- upgrade to v2.40-rc1
|
||||
- add setpgid, enosys, exch and lsclocks commands
|
||||
|
||||
* Thu Jan 25 2024 Karel Zak <kzak@redhat.com> - 2.39.3-4
|
||||
- improve fix for #2256391 (util-linux-i18n conflicts)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user