util-linux: Update to 2.26

This commit is contained in:
Alexpux
2015-03-08 16:19:17 +03:00
parent e5668617c1
commit 754fcadcf8
4 changed files with 4 additions and 74 deletions

View File

@@ -1,18 +0,0 @@
diff -Naur origsrc/util-linux-2.25.1/lib/ttyutils.c src/util-linux-2.25.1/lib/ttyutils.c
--- origsrc/util-linux-2.25.1/lib/ttyutils.c 2013-09-18 08:50:12.671263500 -0500
+++ src/util-linux-2.25.1/lib/ttyutils.c 2014-11-16 17:25:14.277411500 -0600
@@ -22,10 +22,14 @@
#ifdef TIOCGSIZE
if (ioctl (STDIN_FILENO, TIOCGSIZE, &t_win) == 0)
return t_win.ts_cols;
+ if (ioctl (STDOUT_FILENO, TIOCGSIZE, &t_win) == 0)
+ return t_win.ts_cols;
#endif
#ifdef TIOCGWINSZ
if (ioctl (STDIN_FILENO, TIOCGWINSZ, &w_win) == 0)
return w_win.ws_col;
+ if (ioctl (STDOUT_FILENO, TIOCGWINSZ, &w_win) == 0)
+ return w_win.ws_col;
#endif
cp = getenv("COLUMNS");
if (cp) {

View File

@@ -1,16 +0,0 @@
--- origsrc/util-linux-2.25.1/disk-utils/cfdisk.c 2014-09-03 02:50:42.185957900 -0500
+++ src/util-linux-2.25.1/disk-utils/cfdisk.c 2014-10-22 19:09:20.709249100 -0500
@@ -199,10 +199,11 @@ static void resize(void)
if (ioctl(fileno(stdout), TIOCGWINSZ, &ws) != -1
&& ws.ws_row && ws.ws_col) {
- LINES = ws.ws_row;
- COLS = ws.ws_col;
#if HAVE_RESIZETERM
resizeterm(ws.ws_row, ws.ws_col);
+#else
+ LINES = ws.ws_row;
+ COLS = ws.ws_col;
#endif
clearok(stdscr, TRUE);
}

View File

@@ -1,27 +0,0 @@
newlib scanf(3) does not support 'm'
--- origsrc/util-linux-2.25.1/lib/colors.c 2014-09-03 02:50:42.187957900 -0500
+++ src/util-linux-2.25.1/lib/colors.c 2014-10-22 17:25:41.257979100 -0500
@@ -561,7 +561,8 @@ static int colors_read_schemes(struct ul
}
while (fgets(buf, sizeof(buf), f)) {
- char *cn = NULL, *seq = NULL;
+ char *cn = malloc (sizeof(buf) + 1);
+ char *seq = malloc (sizeof(buf) + 1);
char *p = strchr(buf, '\n');
if (!p) {
@@ -577,9 +578,9 @@ static int colors_read_schemes(struct ul
if (*p == '\0' || *p == '#')
continue;
- rc = sscanf(p, UL_SCNsA" " /* name */
- UL_SCNsA, /* color */
- &cn, &seq);
+ rc = sscanf(p, "%s " /* name */
+ "%s", /* color */
+ cn, seq);
if (rc == 2 && cn && seq)
rc = colors_add_scheme(cc, cn, seq); /* set rc=0 on success */
if (rc) {

View File

@@ -1,14 +1,14 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
pkgname=("util-linux" "libutil-linux" "libutil-linux-devel")
pkgver=2.25.1
pkgrel=4
pkgver=2.26
pkgrel=1
pkgdesc="Miscellaneous system utilities for Linux"
arch=('i686' 'x86_64')
license=('GPL3')
url="http://www.kernel.org/pub/linux/utils/util-linux/"
makedepends=('gettext-devel' 'libiconv-devel' 'ncurses-devel' 'libcrypt-devel' 'libtool' 'patch')
source=(ftp://ftp.kernel.org/pub/linux/utils/$pkgname/v${pkgver%.*}/$pkgname-$pkgver.tar.xz
source=(ftp://ftp.kernel.org/pub/linux/utils/$pkgname/v${pkgver}/$pkgname-$pkgver.tar.xz
2.24.2-agetty.patch
2.24.2-libblkid-topology.patch
2.24.2-libintl.patch
@@ -16,11 +16,8 @@ source=(ftp://ftp.kernel.org/pub/linux/utils/$pkgname/v${pkgver%.*}/$pkgname-$pk
2.25.1-cygwin-include.patch
2.25.1-ipc-utils.patch
2.25.1-lslogins.patch
2.25.1-ncurses-reentrant.patch
2.25.1-scanf-ms.patch
2.25.1-get_terminal_width.patch
2.25.1-relocate-sbin-to-usr-bin.patch)
md5sums=('2ff36a8f8ede70f66c5ad0fb09e40e79'
md5sums=('912c550a4e5c47c0ce9abd0733fa9a64'
'7bfa7a252cf44b70d489580dead33b4a'
'4a6a486f374d90985ca4d636c6305b51'
'db24717018176a3375860059b70478c8'
@@ -28,9 +25,6 @@ md5sums=('2ff36a8f8ede70f66c5ad0fb09e40e79'
'ed3c35e3f4a9f89e248d1d108a0b5b94'
'a8fd1f4a8821e9f2aebf4679d2d9d355'
'b3c5b5275ceb07c2b3637700e21c8322'
'feaa429e437a28d73c0a07d4c0359757'
'9a66b65aee60df39ff6e7c7e06bc6a8c'
'6e3a5043d221352f8a6cbb28d216a247'
'99d791175a775e32ac7bee401d5b4a41')
prepare() {
@@ -42,10 +36,7 @@ prepare() {
patch -p2 -i $srcdir/2.25.1-cygwin-include.patch
patch -p2 -i $srcdir/2.25.1-ipc-utils.patch
patch -p2 -i $srcdir/2.25.1-lslogins.patch
patch -p2 -i $srcdir/2.25.1-ncurses-reentrant.patch
patch -p2 -i $srcdir/2.25.1-scanf-ms.patch
patch -p1 -i $srcdir/2.24.2-msysize.patch
patch -p2 -i $srcdir/2.25.1-get_terminal_width.patch
patch -p1 -i $srcdir/2.25.1-relocate-sbin-to-usr-bin.patch
autoreconf -fi
}