forked from pool/util-linux
Accepting request 210834 from Base:System
- Update to util-linux-2.24 + Release highlights (2.24) fdisk(8): * the code has been completely refactored and moved to libfdisk (the library does not have a stable API yet) * user interface has been unified for all label types and it supports colors * GPT disk UUID, partition UUID and partition name modification is supported now pylibmount: * this new library provides PYTHON BINDINGS for libmount; use --with-python[=2|3] to enable the bindings last(1) and lastb(1): * the NEW IMPLEMENTATION has been merged from sysvinit to util-linux and extended; now it supports command line options --present, --since, and --time-format * use --enable-deprecated-last to enable the old util-linux last(1) implementation swapon(8): * the option --discard= and fstab mount option discard= allow to explicitly specify 'pages' or 'once' discard policy. If no policy is selected, the default behavior is to enable both. See swapon.8 man page for more details. libblkid and blkid(8): * supports LOGUUID= for external logs (e.g. extN and XFS) * generates a pseudo PARTUUID= for MBR partitions (based on MBR Id, Linux kernel supports the same concept for root= command line option) agetty(8): * supportes new issue file \S escape code to read information OBS-URL: https://build.opensuse.org/request/show/210834 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=173
This commit is contained in:
parent
f51635d702
commit
4efd0700ac
@ -1,77 +0,0 @@
|
|||||||
From 90a0e97c7be9da39fd54600228e006b98667ad56 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Tue, 18 Jun 2013 12:24:28 +0200
|
|
||||||
Subject: [PATCH 1/2] eject: Check host_status and driver_status when using
|
|
||||||
SG_IO.
|
|
||||||
|
|
||||||
Based on Suse patch, originally from
|
|
||||||
Anna Bernathova <anicka@suse.cz>, May 2008
|
|
||||||
|
|
||||||
SG_IO completion status is weird but still well defined. You'll need
|
|
||||||
to check both host_status, driver_status and status to determine that
|
|
||||||
a command actually succeeded. -- Tejun Heo, May 2008
|
|
||||||
|
|
||||||
Note that we also need to check driver_status and sense_buffer to
|
|
||||||
detect situation when there is no medium. It's valid request to call
|
|
||||||
eject(8) for device with no medium.
|
|
||||||
|
|
||||||
References: https://bugzilla.novell.com/show_bug.cgi?id=358033
|
|
||||||
Signed-off-by: Anna Bernathova <anicka@suse.cz>
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
sys-utils/eject.c | 24 +++++++++++++++++++++---
|
|
||||||
1 file changed, 21 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/sys-utils/eject.c b/sys-utils/eject.c
|
|
||||||
index 4ec69e7..f98f227 100644
|
|
||||||
--- a/sys-utils/eject.c
|
|
||||||
+++ b/sys-utils/eject.c
|
|
||||||
@@ -53,6 +53,14 @@
|
|
||||||
#include "pathnames.h"
|
|
||||||
#include "sysfs.h"
|
|
||||||
|
|
||||||
+/*
|
|
||||||
+ * sg_io_hdr_t driver_status -- see kernel include/scsi/scsi.h
|
|
||||||
+ */
|
|
||||||
+#ifndef DRIVER_SENSE
|
|
||||||
+# define DRIVER_SENSE 0x08
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+
|
|
||||||
#define EJECT_DEFAULT_DEVICE "/dev/cdrom"
|
|
||||||
|
|
||||||
|
|
||||||
@@ -604,17 +612,27 @@ static int eject_scsi(int fd)
|
|
||||||
|
|
||||||
io_hdr.cmdp = allowRmBlk;
|
|
||||||
status = ioctl(fd, SG_IO, (void *)&io_hdr);
|
|
||||||
- if (status < 0)
|
|
||||||
+ if (status < 0 || io_hdr.host_status || io_hdr.driver_status)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
io_hdr.cmdp = startStop1Blk;
|
|
||||||
status = ioctl(fd, SG_IO, (void *)&io_hdr);
|
|
||||||
- if (status < 0)
|
|
||||||
+ if (status < 0 || io_hdr.host_status)
|
|
||||||
+ return 0;
|
|
||||||
+
|
|
||||||
+ /* Ignore errors when there is not medium -- in this case driver sense
|
|
||||||
+ * buffer sets MEDIUM NOT PRESENT (3a) bit. For more details see:
|
|
||||||
+ * http://www.tldp.org/HOWTO/archived/SCSI-Programming-HOWTO/SCSI-Programming-HOWTO-22.html#sec-sensecodes
|
|
||||||
+ * -- kzak Jun 2013
|
|
||||||
+ */
|
|
||||||
+ if (io_hdr.driver_status != 0 &&
|
|
||||||
+ !(io_hdr.driver_status == DRIVER_SENSE && io_hdr.sbp &&
|
|
||||||
+ io_hdr.sbp[12] == 0x3a))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
io_hdr.cmdp = startStop2Blk;
|
|
||||||
status = ioctl(fd, SG_IO, (void *)&io_hdr);
|
|
||||||
- if (status < 0)
|
|
||||||
+ if (status < 0 || io_hdr.host_status || io_hdr.driver_status)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* force kernel to reread partition table when new disc inserted */
|
|
||||||
--
|
|
||||||
1.8.1.4
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
--- util-linux-2.23.1/fdisks/Makemodule.am
|
|
||||||
+++ util-linux-2.23.1/fdisks/Makemodule.am 2013-06-05 09:58:30.753439465 +0000
|
|
||||||
@@ -79,6 +79,9 @@ endif
|
|
||||||
if HAVE_SLANG
|
|
||||||
cfdisk_LDADD += -lslang
|
|
||||||
else
|
|
||||||
+if HAVE_TINFO
|
|
||||||
+cfdisk_LDADD += -ltinfo
|
|
||||||
+endif
|
|
||||||
if HAVE_NCURSES
|
|
||||||
cfdisk_LDADD += @NCURSES_LIBS@
|
|
||||||
endif
|
|
@ -1,27 +0,0 @@
|
|||||||
From c36407293d63d428af176097527df89d623bc74f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Thu, 1 Aug 2013 16:00:21 +0200
|
|
||||||
Subject: [PATCH] more: check for buffer size when write multibyte char
|
|
||||||
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
text-utils/more.c | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/text-utils/more.c b/text-utils/more.c
|
|
||||||
index 3377118..9af15b3 100644
|
|
||||||
--- a/text-utils/more.c
|
|
||||||
+++ b/text-utils/more.c
|
|
||||||
@@ -912,7 +912,8 @@ int get_line(register FILE *f, int *length)
|
|
||||||
Fseek(f, file_pos_bak);
|
|
||||||
break_flag = 1;
|
|
||||||
} else {
|
|
||||||
- for (i = 0; i < mbc_pos; i++)
|
|
||||||
+ for (i = 0; p < &Line[LineLen - 1] &&
|
|
||||||
+ i < mbc_pos; i++)
|
|
||||||
*p++ = mbc[i];
|
|
||||||
if (wc_width > 0)
|
|
||||||
column += wc_width;
|
|
||||||
--
|
|
||||||
1.8.4
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
From 1ef2db5a5672e09fa1337099b7d9d6ab61c19bdc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Thu, 1 Aug 2013 12:58:22 +0200
|
|
||||||
Subject: [PATCH] more: fix buffer overflow
|
|
||||||
|
|
||||||
The bug has been probably introduced by commit
|
|
||||||
1ac300932deab8dea2c43050921bbbdb36d62ff1.
|
|
||||||
|
|
||||||
Reported-by: "Dr. David Alan Gilbert" <dave@treblig.org>
|
|
||||||
References: https://bugzilla.novell.com/show_bug.cgi?id=829720
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
text-utils/more.c | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/text-utils/more.c b/text-utils/more.c
|
|
||||||
index 3bbeede..3377118 100644
|
|
||||||
--- a/text-utils/more.c
|
|
||||||
+++ b/text-utils/more.c
|
|
||||||
@@ -835,7 +835,8 @@ void prepare_line_buffer(void)
|
|
||||||
if (nsz < LINSIZ)
|
|
||||||
nsz = LINSIZ;
|
|
||||||
|
|
||||||
- nline = xrealloc(Line, nsz);
|
|
||||||
+ /* alloc nsz and extra space for \n\0 */
|
|
||||||
+ nline = xrealloc(Line, nsz + 2);
|
|
||||||
Line = nline;
|
|
||||||
LineLen = nsz;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
1.8.4
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
From 418cb4b3bb7a61aec62ebe91194f7722ea608842 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Thu, 1 Aug 2013 16:41:50 +0200
|
|
||||||
Subject: [PATCH] more: guarantee space for multibyte
|
|
||||||
|
|
||||||
.. to make the code more robust.
|
|
||||||
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
text-utils/more.c | 6 ++++++
|
|
||||||
1 file changed, 6 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/text-utils/more.c b/text-utils/more.c
|
|
||||||
index 9af15b3..ac35acc 100644
|
|
||||||
--- a/text-utils/more.c
|
|
||||||
+++ b/text-utils/more.c
|
|
||||||
@@ -1030,6 +1030,12 @@ int get_line(register FILE *f, int *length)
|
|
||||||
|
|
||||||
if (column >= Mcol && fold_opt)
|
|
||||||
break;
|
|
||||||
+#ifdef HAVE_WIDECHAR
|
|
||||||
+ if (use_mbc_buffer_flag == 0 && p >= &Line[LineLen - 1 - 4])
|
|
||||||
+ /* don't read another char if there is no space for
|
|
||||||
+ * whole multibyte sequence */
|
|
||||||
+ break;
|
|
||||||
+#endif
|
|
||||||
c = Getc(f);
|
|
||||||
}
|
|
||||||
if (column >= Mcol && Mcol > 0) {
|
|
||||||
--
|
|
||||||
1.8.4
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
|||||||
--- util-linux-2.23.1/fdisks/fdiskdoslabel.c
|
|
||||||
+++ util-linux-2.23.1/fdisks/fdiskdoslabel.c 2013-06-05 10:11:14.121939007 +0000
|
|
||||||
@@ -817,7 +817,7 @@ static void check_consistency(struct fdi
|
|
||||||
|
|
||||||
/* compute logical ending (c, h, s) */
|
|
||||||
long2chs(cxt, get_start_sect(p) + get_nr_sects(p) - 1, &lec, &leh, &les);
|
|
||||||
-
|
|
||||||
+#if 0
|
|
||||||
/* Same physical / logical beginning? */
|
|
||||||
if (cxt->geom.cylinders <= 1024 && (pbc != lbc || pbh != lbh || pbs != lbs)) {
|
|
||||||
printf(_("Partition %zd has different physical/logical "
|
|
||||||
@@ -833,7 +833,7 @@ static void check_consistency(struct fdi
|
|
||||||
printf(_(" phys=(%d, %d, %d) "), pec, peh, pes);
|
|
||||||
printf(_("logical=(%d, %d, %d)\n"),lec, leh, les);
|
|
||||||
}
|
|
||||||
-
|
|
||||||
+#endif
|
|
||||||
/* Ending on cylinder boundary? */
|
|
||||||
if (peh != (cxt->geom.heads - 1) || pes != cxt->geom.sectors) {
|
|
||||||
printf(_("Partition %zd does not end on cylinder boundary.\n"),
|
|
@ -1,17 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
Version: GnuPG v1.4.13 (GNU/Linux)
|
|
||||||
|
|
||||||
iQIcBAABAgAGBQJR+QNKAAoJEOS3HV7sOcKEUSUP/i4HacPa4Lpj6Ub7SmdLGnrn
|
|
||||||
Eakoy/USxaVIPNe600ER31mAPxa6HL/tJJWGN2V5PNakMWpLPjsgFaV5hoOVJqsX
|
|
||||||
qBGnL7W5OaovZWgEtj9d0aGv1sTzHqX+NfUhr6AkGTNiebwpRicDFBMW86mDp6E4
|
|
||||||
H/jlhv2LVvkd3wSOk8cq6OH0lP1P1T39WfEq3wqwQ+mTKV7ua4iYGQe2bNWhdY7B
|
|
||||||
F8vtg2VXj2ezU/BxxbMXEfFLiQmSPH6aXyUmniMYYEGlbl+6nz/v1HBDXcublVp9
|
|
||||||
2XJJxY8w2MrF46+zd3fIfT71LoqG4orlNk3F45zbnrsAGsnIuqv+0Kmisx2h6CKf
|
|
||||||
RQJkv9I3jwORpeg2LBhP6e9M/H7mdfVtl7wZ14JUqgc9hO1qG284K4wlSqevIzoc
|
|
||||||
BXf96IpckhPC2xNHj5jHlTX/bL3YTmjxRL5JhNTVP5MH5szsGy+S4UMj31oS8kjd
|
|
||||||
ppr+a48FineEbJpHIjg1MFiv1pVSV1W4EyJ9obA/4r4KcT5WrJKhU3wFvXr3VILg
|
|
||||||
RVXT6hlpka1gIsSes8JB2o4ludEKYQTFzqgzNIhNTMlHiIkx9a/3Bj77//W2w42m
|
|
||||||
XkAiOVHmJfqJAyWdFOFsWhVHmcr9fh84qdoTH/uc423V0euOQmUoSxDxvlrboeXb
|
|
||||||
cMXAXk+wHMHYHEV1H142
|
|
||||||
=bIui
|
|
||||||
-----END PGP SIGNATURE-----
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:7c4042bd91f621250d7b3b2f34e3b11921a32c7f080c149dcc0c7ce62a8a7cac
|
|
||||||
size 3383052
|
|
18
util-linux-2.24-fdisk_remove_bogus_warnings.patch
Normal file
18
util-linux-2.24-fdisk_remove_bogus_warnings.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
--- util-linux-2.24/libfdisk/src/dos.c.orig 2013-10-21 11:22:29.810014709 +0200
|
||||||
|
+++ util-linux-2.24/libfdisk/src/dos.c 2013-11-13 23:57:27.535962925 +0100
|
||||||
|
@@ -1107,6 +1107,7 @@
|
||||||
|
/* compute logical ending (c, h, s) */
|
||||||
|
long2chs(cxt, dos_partition_get_start(p) + dos_partition_get_size(p) - 1, &lec, &leh, &les);
|
||||||
|
|
||||||
|
+#if 0
|
||||||
|
/* Same physical / logical beginning? */
|
||||||
|
if (cxt->geom.cylinders <= 1024
|
||||||
|
&& (pbc != lbc || pbh != lbh || pbs != lbs)) {
|
||||||
|
@@ -1117,6 +1118,7 @@
|
||||||
|
pbc, pbh, pbs,
|
||||||
|
lbc, lbh, lbs);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* Same physical / logical ending? */
|
||||||
|
if (cxt->geom.cylinders <= 1024
|
17
util-linux-2.24.tar.sign
Normal file
17
util-linux-2.24.tar.sign
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
Version: GnuPG v1.4.15 (GNU/Linux)
|
||||||
|
|
||||||
|
iQIcBAABAgAGBQJSZS9lAAoJEOS3HV7sOcKEVVEP/25GXdItGSiajLPnWumK5QDl
|
||||||
|
eVMqhCtqnS7cR+WcOr3S11ngE2wpZyp63ednBrQnK+OZRNvyJaXTqqQ8+naYZ86G
|
||||||
|
gfK+EtnBOemuUS9yFSLEjseJvBJoRsSWSoJyA5w3id0exiLJiziAM/KTNKvzbPuK
|
||||||
|
QX09CtUDNWCFuV/wzYSa0Ur7MMk+dZkxb+e9gm0TKhaz4XMr4LXgv+nApTp6LVnO
|
||||||
|
6DMrFid7kuQrvXdZya04T7GSuev7sLslsiVzWlwVM+aD+jKBTqQeBarb39/vok6n
|
||||||
|
JlbJl1M8EwwIkwuLL+BoBsioNXBLRB/vhRcbiyx3DNY0n/1Glm+DqbgSmv+FMvgo
|
||||||
|
wmp1T+q/8uoTN2moi8TKeGMvt2rdf9VRAMBqeUwryqfCZKwAw/koQQmfCN/5oqtX
|
||||||
|
2uggYFaZPGgDS/ovoOads8Gee7NXkKLW81Yn7WtLUiDSkt4kyVYCaqhthGvkAUtG
|
||||||
|
Fun9UtIaPr7V80g2VyxHZqitzjJn8zIdsxvLalJsB7HarZKAg3CpvB1G7MZaKEle
|
||||||
|
lOn/oCoPWGvbAEOjl4t4M3mgjitfmhBwVmhjal3pY0Oq844s1km8z096Xb8oOzdN
|
||||||
|
g+TzWvfn5dQO+SEIAUv+t2FEIgRQH0e+wMk0dR8rVy4YmcjVwsyoNTQ3sV4lTDTy
|
||||||
|
o4LwYqKNU+uQ6EmDsnZ2
|
||||||
|
=6YN4
|
||||||
|
-----END PGP SIGNATURE-----
|
3
util-linux-2.24.tar.xz
Normal file
3
util-linux-2.24.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:30add9a8869cef9e5a76755214f074689b6294cea63f4569711faeb099aecc06
|
||||||
|
size 3531936
|
@ -1,3 +1,76 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 10 16:10:27 UTC 2013 - sweet_f_a@gmx.de
|
||||||
|
|
||||||
|
- Update to util-linux-2.24
|
||||||
|
+ Release highlights (2.24)
|
||||||
|
fdisk(8):
|
||||||
|
* the code has been completely refactored and moved to libfdisk
|
||||||
|
(the library does not have a stable API yet)
|
||||||
|
* user interface has been unified for all label types and it
|
||||||
|
supports colors
|
||||||
|
* GPT disk UUID, partition UUID and partition name modification
|
||||||
|
is supported now
|
||||||
|
pylibmount:
|
||||||
|
* this new library provides PYTHON BINDINGS for libmount;
|
||||||
|
use --with-python[=2|3] to enable the bindings
|
||||||
|
last(1) and lastb(1):
|
||||||
|
* the NEW IMPLEMENTATION has been merged from sysvinit to
|
||||||
|
util-linux and extended; now it supports command line options
|
||||||
|
--present, --since, and --time-format
|
||||||
|
* use --enable-deprecated-last to enable the old util-linux
|
||||||
|
last(1) implementation
|
||||||
|
swapon(8):
|
||||||
|
* the option --discard= and fstab mount option discard= allow
|
||||||
|
to explicitly specify 'pages' or 'once' discard policy. If no
|
||||||
|
policy is selected, the default behavior is to enable both.
|
||||||
|
See swapon.8 man page for more details.
|
||||||
|
libblkid and blkid(8):
|
||||||
|
* supports LOGUUID= for external logs (e.g. extN and XFS)
|
||||||
|
* generates a pseudo PARTUUID= for MBR partitions (based on MBR
|
||||||
|
Id, Linux kernel supports the same concept for root= command
|
||||||
|
line option)
|
||||||
|
agetty(8):
|
||||||
|
* supportes new issue file \S escape code to read information
|
||||||
|
from /etc/os-release
|
||||||
|
* the option -L allows to completely control CLOCAL flag
|
||||||
|
dmesg(1):
|
||||||
|
* supports new command line option --time-format to specify
|
||||||
|
time format
|
||||||
|
* supports new iso-8601 time format
|
||||||
|
hexdump(1):
|
||||||
|
* supports long options now
|
||||||
|
wall(1):
|
||||||
|
* the command is compatible with sysvinit implementation now
|
||||||
|
logger(1):
|
||||||
|
* supports new command line option --prio-prefix when logging
|
||||||
|
stdin
|
||||||
|
lscpu(1):
|
||||||
|
* allows to detect more hypervisor types and provides info
|
||||||
|
about Max and Min CPU Mhz
|
||||||
|
unshare(8):
|
||||||
|
* supports new command line options --fork and --mount-proc for
|
||||||
|
pid namespaces
|
||||||
|
wipefs(8):
|
||||||
|
* now wipes superblocks with incorrect checksums too
|
||||||
|
* supports new command line option --backup to backup erased
|
||||||
|
data to $HOME/wipefs-<devname>-<offset>.bak
|
||||||
|
nologin(8):
|
||||||
|
* this command has been merged into util-linux, the command
|
||||||
|
politely refuses a login.
|
||||||
|
- Removed following patches now upstream
|
||||||
|
* eject-scsi-check-host_status-and-driver_status.patch
|
||||||
|
* more-fix-buffer-overflow.patch
|
||||||
|
* more-check-for-buffer-size-when-write-multibyte-char.patch
|
||||||
|
* more-guarantee-space-for-multibyte.patch
|
||||||
|
- Removed following patch because now pkg-config does that
|
||||||
|
* fdisk-tinfo.patch
|
||||||
|
- Refreshed following patches with updating version string
|
||||||
|
* util-linux-2.23.1-fdisk_remove_bogus_warnings.patch
|
||||||
|
- Added enable_last condition in case we don't want to use the last
|
||||||
|
binary from sysvinit-tools in future
|
||||||
|
- Upstream moved getopt examples from datadir to docdir but we keep
|
||||||
|
the old location because we would need to fix the manpage first.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 29 13:46:21 UTC 2013 - werner@suse.de
|
Fri Nov 29 13:46:21 UTC 2013 - werner@suse.de
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
%bcond_without sysvinit_tools
|
%bcond_without sysvinit_tools
|
||||||
%bcond_without enable_su
|
%bcond_without enable_su
|
||||||
%bcond_without enable_eject
|
%bcond_without enable_eject
|
||||||
|
%bcond_with enable_last
|
||||||
|
|
||||||
Name: util-linux
|
Name: util-linux
|
||||||
BuildRequires: audit-devel
|
BuildRequires: audit-devel
|
||||||
@ -39,10 +40,14 @@ BuildRequires: ncurses-devel
|
|||||||
BuildRequires: pam-devel
|
BuildRequires: pam-devel
|
||||||
BuildRequires: pkg-config
|
BuildRequires: pkg-config
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
|
%if 0%{?suse_version} <= 1230
|
||||||
|
BuildRequires: pkgconfig(systemd)
|
||||||
|
%else
|
||||||
BuildRequires: systemd-rpm-macros
|
BuildRequires: systemd-rpm-macros
|
||||||
|
%endif
|
||||||
BuildRequires: utempter-devel
|
BuildRequires: utempter-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
Version: 2.23.2
|
Version: 2.24
|
||||||
Release: 0
|
Release: 0
|
||||||
# util-linux is a base package and uuidd pre-requiring pwdutils pulls
|
# util-linux is a base package and uuidd pre-requiring pwdutils pulls
|
||||||
# that into the core build cycle. pwdutils also pulls in the whole
|
# that into the core build cycle. pwdutils also pulls in the whole
|
||||||
@ -60,7 +65,7 @@ Recommends: %{name}-lang = %{version}
|
|||||||
Summary: A collection of basic system utilities
|
Summary: A collection of basic system utilities
|
||||||
License: GPL-2.0+
|
License: GPL-2.0+
|
||||||
Group: System/Base
|
Group: System/Base
|
||||||
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/%{name}-%{version}.tar.xz
|
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/%{name}-%{version}.tar.xz
|
||||||
Source1: util-linux-rpmlintrc
|
Source1: util-linux-rpmlintrc
|
||||||
# XXX: make nologin part of util-linux upstream
|
# XXX: make nologin part of util-linux upstream
|
||||||
Source2: nologin.c
|
Source2: nologin.c
|
||||||
@ -73,7 +78,7 @@ Source8: login.pamd
|
|||||||
Source9: remote.pamd
|
Source9: remote.pamd
|
||||||
Source10: su.pamd
|
Source10: su.pamd
|
||||||
Source11: su.default
|
Source11: su.default
|
||||||
Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/%{name}-%{version}.tar.sign
|
Source12: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/%{name}-%{version}.tar.sign
|
||||||
Source13: %{name}.keyring
|
Source13: %{name}.keyring
|
||||||
# TODO: split to separate package
|
# TODO: split to separate package
|
||||||
Source40: klogconsole.tar.bz2
|
Source40: klogconsole.tar.bz2
|
||||||
@ -93,19 +98,10 @@ Source51: blkid.conf
|
|||||||
## util-linux patches
|
## util-linux patches
|
||||||
##
|
##
|
||||||
# 241372 - remove legacy warnings from fdisk
|
# 241372 - remove legacy warnings from fdisk
|
||||||
Patch1: util-linux-2.23.1-fdisk_remove_bogus_warnings.patch
|
Patch1: util-linux-2.24-fdisk_remove_bogus_warnings.patch
|
||||||
Patch2: util-linux-2.23.1-eject-fpie.patch
|
Patch2: util-linux-2.23.1-eject-fpie.patch
|
||||||
Patch3: fdisk-tinfo.patch
|
|
||||||
# PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path
|
# PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path
|
||||||
Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff
|
Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff
|
||||||
# PATCH-FIX-UPSTREAM eject-scsi-check-host_status-and-driver_status.patch bnc358033 anicka@suse.cz -- Check eject host_status and driver_status when using SG_IO.
|
|
||||||
Patch5: eject-scsi-check-host_status-and-driver_status.patch
|
|
||||||
# PATCH-FIX-UPSTREAM more-fix-buffer-overflow.patch bnc839720 mgorse@suse.com -- More: Fix under-allocation of memory.
|
|
||||||
Patch6: more-fix-buffer-overflow.patch
|
|
||||||
# PATCH-FIX-UPSTREAM more-check-for-buffer-size-when-write-multibyte-char.patch bnc839720 mgorse@suse.com
|
|
||||||
Patch7: more-check-for-buffer-size-when-write-multibyte-char.patch
|
|
||||||
# PATCH-FIX-UPSTREAM more-guarantee-space-for-multibyte.patch bnc839720 mgorse@suse.com
|
|
||||||
Patch8: more-guarantee-space-for-multibyte.patch
|
|
||||||
# disable encryption
|
# disable encryption
|
||||||
Patch12: util-linux-2.23.1-noenc-suse.diff
|
Patch12: util-linux-2.23.1-noenc-suse.diff
|
||||||
# PATCH-FIX-UPSTREAM blkdiscard-BLKSSZGET-fills-in-an-int.patch tytso@mit.edu
|
# PATCH-FIX-UPSTREAM blkdiscard-BLKSSZGET-fills-in-an-int.patch tytso@mit.edu
|
||||||
@ -226,12 +222,7 @@ xzcat %{S:0} | %gpg_verify %{S:12} -
|
|||||||
%setup -q -n %{name}-%{version} -b 40
|
%setup -q -n %{name}-%{version} -b 40
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%patch5 -p1
|
|
||||||
%patch6 -p1
|
|
||||||
%patch7 -p1
|
|
||||||
%patch8 -p1
|
|
||||||
%patch12 -p1
|
%patch12 -p1
|
||||||
%patch13 -p1
|
%patch13 -p1
|
||||||
%patch14 -p0
|
%patch14 -p0
|
||||||
@ -273,6 +264,7 @@ autoreconf -fi
|
|||||||
export SUID_CFLAGS="-fpie"
|
export SUID_CFLAGS="-fpie"
|
||||||
export SUID_LDFLAGS="-pie"
|
export SUID_LDFLAGS="-pie"
|
||||||
%configure \
|
%configure \
|
||||||
|
--docdir=%{_docdir}/%{name} \
|
||||||
--with-audit \
|
--with-audit \
|
||||||
--with-gnu-ld \
|
--with-gnu-ld \
|
||||||
--with-ncurses \
|
--with-ncurses \
|
||||||
@ -288,6 +280,11 @@ export SUID_LDFLAGS="-pie"
|
|||||||
--enable-new-mount \
|
--enable-new-mount \
|
||||||
--enable-login-utils \
|
--enable-login-utils \
|
||||||
--enable-tunelp \
|
--enable-tunelp \
|
||||||
|
%if %{with enable_last}
|
||||||
|
--enable-last \
|
||||||
|
%else
|
||||||
|
--disable-last \
|
||||||
|
%endif
|
||||||
--enable-logger \
|
--enable-logger \
|
||||||
%if %{with enable_eject}
|
%if %{with enable_eject}
|
||||||
--enable-eject \
|
--enable-eject \
|
||||||
@ -320,6 +317,13 @@ make %{?_smp_mflags}
|
|||||||
%{__cc} -fwhole-program %{optflags} -o mkzimage_cmdline %{S:29}
|
%{__cc} -fwhole-program %{optflags} -o mkzimage_cmdline %{S:29}
|
||||||
%{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31}
|
%{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31}
|
||||||
|
|
||||||
|
%check
|
||||||
|
if ! make check; then
|
||||||
|
echo "cat test diffs:"
|
||||||
|
find tests/diff -type f | xargs -r cat
|
||||||
|
#exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}{%{_sysconfdir}/{init.d,pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}}
|
mkdir -p %{buildroot}{%{_sysconfdir}/{init.d,pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}}
|
||||||
mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid/
|
mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid/
|
||||||
@ -406,6 +410,9 @@ chmod 755 %{buildroot}%{_sbindir}/flushb
|
|||||||
install -m 644 $RPM_SOURCE_DIR%{_sysconfdir}.raw %{buildroot}%{_sysconfdir}/raw
|
install -m 644 $RPM_SOURCE_DIR%{_sysconfdir}.raw %{buildroot}%{_sysconfdir}/raw
|
||||||
install -m 755 $RPM_SOURCE_DIR/raw.init %{buildroot}%{_initddir}/raw
|
install -m 755 $RPM_SOURCE_DIR/raw.init %{buildroot}%{_initddir}/raw
|
||||||
ln -sf ../..%{_sysconfdir}/init.d/raw %{buildroot}%{_sbindir}/rcraw
|
ln -sf ../..%{_sysconfdir}/init.d/raw %{buildroot}%{_sbindir}/rcraw
|
||||||
|
# upstream moved getopt examples from datadir to docdir but we keep
|
||||||
|
# the old location because we would need to fix the manpage first
|
||||||
|
mv %{buildroot}%{_docdir}/%{name}/getopt %{buildroot}%{_datadir}/
|
||||||
# Stupid hack so we don't have a tcsh dependency
|
# Stupid hack so we don't have a tcsh dependency
|
||||||
chmod 644 %{buildroot}%{_datadir}/getopt/getopt*.tcsh
|
chmod 644 %{buildroot}%{_datadir}/getopt/getopt*.tcsh
|
||||||
# Following files we don't want to package, so remove them
|
# Following files we don't want to package, so remove them
|
||||||
@ -475,9 +482,6 @@ ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
%{fillup_and_insserv raw}
|
%{fillup_and_insserv raw}
|
||||||
%if 0%{?suse_version} <= 1130
|
|
||||||
%run_permissions
|
|
||||||
%else
|
|
||||||
%set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount
|
%set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount
|
||||||
%if %{with enable_su}
|
%if %{with enable_su}
|
||||||
%set_permissions %{_bindir}/su
|
%set_permissions %{_bindir}/su
|
||||||
@ -502,7 +506,6 @@ done
|
|||||||
%if %{with enable_eject}
|
%if %{with enable_eject}
|
||||||
%set_permissions %{_bindir}/eject
|
%set_permissions %{_bindir}/eject
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
# mount option 'code=' is now called 'codepage=' so change fstab
|
# mount option 'code=' is now called 'codepage=' so change fstab
|
||||||
if [ -f etc/fstab ]; then
|
if [ -f etc/fstab ]; then
|
||||||
@ -540,11 +543,7 @@ fi
|
|||||||
|
|
||||||
%post -n uuidd
|
%post -n uuidd
|
||||||
%{fillup_and_insserv -n uuidd}
|
%{fillup_and_insserv -n uuidd}
|
||||||
%if 0%{?suse_version} <= 1130
|
|
||||||
%run_permissions
|
|
||||||
%else
|
|
||||||
%set_permissions %{_sbindir}/uuidd
|
%set_permissions %{_sbindir}/uuidd
|
||||||
%endif
|
|
||||||
|
|
||||||
%postun -n uuidd
|
%postun -n uuidd
|
||||||
%{restart_on_update uuidd}
|
%{restart_on_update uuidd}
|
||||||
@ -631,8 +630,12 @@ fi
|
|||||||
%{_bindir}/su
|
%{_bindir}/su
|
||||||
%endif
|
%endif
|
||||||
%if %{with enable_eject}
|
%if %{with enable_eject}
|
||||||
|
%if 0%{?suse_version} <= 1310
|
||||||
|
%verify(not mode) %attr(4750,root,audio) %{_bindir}/eject
|
||||||
|
%else
|
||||||
%{_bindir}/eject
|
%{_bindir}/eject
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%{_bindir}/cal
|
%{_bindir}/cal
|
||||||
%{_bindir}/chrt
|
%{_bindir}/chrt
|
||||||
%{_bindir}/col
|
%{_bindir}/col
|
||||||
@ -650,6 +653,10 @@ fi
|
|||||||
%{_bindir}/ipcrm
|
%{_bindir}/ipcrm
|
||||||
%{_bindir}/ipcs
|
%{_bindir}/ipcs
|
||||||
%{_bindir}/isosize
|
%{_bindir}/isosize
|
||||||
|
%if %{with enable_last}
|
||||||
|
%{_bindir}/last
|
||||||
|
%{_bindir}/lastb
|
||||||
|
%endif
|
||||||
%{_bindir}/line
|
%{_bindir}/line
|
||||||
%{_bindir}/logger
|
%{_bindir}/logger
|
||||||
%{_bindir}/look
|
%{_bindir}/look
|
||||||
@ -746,6 +753,10 @@ fi
|
|||||||
%{_mandir}/man1/hexdump.1.gz
|
%{_mandir}/man1/hexdump.1.gz
|
||||||
%{_mandir}/man1/ipcrm.1.gz
|
%{_mandir}/man1/ipcrm.1.gz
|
||||||
%{_mandir}/man1/ipcs.1.gz
|
%{_mandir}/man1/ipcs.1.gz
|
||||||
|
%if %{with enable_last}
|
||||||
|
%{_mandir}/man1/last.1.gz
|
||||||
|
%{_mandir}/man1/lastb.1.gz
|
||||||
|
%endif
|
||||||
%{_mandir}/man1/line.1.gz
|
%{_mandir}/man1/line.1.gz
|
||||||
%{_mandir}/man1/logger.1.gz
|
%{_mandir}/man1/logger.1.gz
|
||||||
%{_mandir}/man1/login.1.gz
|
%{_mandir}/man1/login.1.gz
|
||||||
|
Loading…
Reference in New Issue
Block a user