2.22.2-5: #902512, refresh patches

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2013-02-19 16:20:33 +01:00
parent 2a4e9f041e
commit cb9405c20e
6 changed files with 107 additions and 38 deletions

View File

@ -0,0 +1,64 @@
diff -up util-linux-2.22.2/libblkid/src/blkidP.h.kzak util-linux-2.22.2/libblkid/src/blkidP.h
--- util-linux-2.22.2/libblkid/src/blkidP.h.kzak 2012-12-12 21:04:47.902355093 +0100
+++ util-linux-2.22.2/libblkid/src/blkidP.h 2013-02-20 10:54:33.885606609 +0100
@@ -224,6 +224,9 @@ struct blkid_struct_probe
/* private per-probing flags */
#define BLKID_PROBE_FL_IGNORE_PT (1 << 1) /* ignore partition table */
+#define BLKID_PROBE_FL_IGNORE_BACKUP (1 << 2) /* ignore backup superblocks or PT */
+
+extern int blkid_probe_ignore_backup(blkid_probe pr);
extern blkid_probe blkid_clone_probe(blkid_probe parent);
extern blkid_probe blkid_probe_get_wholedisk_probe(blkid_probe pr);
diff -up util-linux-2.22.2/libblkid/src/probe.c.kzak util-linux-2.22.2/libblkid/src/probe.c
--- util-linux-2.22.2/libblkid/src/probe.c.kzak 2012-12-12 21:04:47.903355101 +0100
+++ util-linux-2.22.2/libblkid/src/probe.c 2013-02-20 11:02:48.525255696 +0100
@@ -810,6 +810,7 @@ int blkid_probe_get_idmag(blkid_probe pr
static inline void blkid_probe_start(blkid_probe pr)
{
if (pr) {
+ DBG(DEBUG_LOWPROBE, printf("%p: start probe\n", pr));
pr->cur_chain = NULL;
pr->prob_flags = 0;
blkid_probe_set_wiper(pr, 0, 0);
@@ -819,6 +820,7 @@ static inline void blkid_probe_start(blk
static inline void blkid_probe_end(blkid_probe pr)
{
if (pr) {
+ DBG(DEBUG_LOWPROBE, printf("%p: end probe\n", pr));
pr->cur_chain = NULL;
pr->prob_flags = 0;
blkid_probe_set_wiper(pr, 0, 0);
@@ -1057,6 +1059,8 @@ int blkid_do_safeprobe(blkid_probe pr)
blkid_probe_start(pr);
+ pr->prob_flags |= BLKID_PROBE_FL_IGNORE_BACKUP;
+
for (i = 0; i < BLKID_NCHAINS; i++) {
struct blkid_chain *chn;
@@ -1679,3 +1683,7 @@ void blkid_probe_use_wiper(blkid_probe p
}
}
+int blkid_probe_ignore_backup(blkid_probe pr)
+{
+ return pr && (pr->prob_flags & BLKID_PROBE_FL_IGNORE_BACKUP);
+}
diff -up util-linux-2.22.2/libblkid/src/superblocks/btrfs.c.kzak util-linux-2.22.2/libblkid/src/superblocks/btrfs.c
--- util-linux-2.22.2/libblkid/src/superblocks/btrfs.c.kzak 2013-02-20 10:54:03.422381876 +0100
+++ util-linux-2.22.2/libblkid/src/superblocks/btrfs.c 2013-02-20 10:54:33.886606616 +0100
@@ -63,6 +63,11 @@ static int probe_btrfs(blkid_probe pr, c
{
struct btrfs_super_block *bfs;
+ if (mag->kboff > 64 && blkid_probe_ignore_backup(pr)) {
+ DBG(DEBUG_LOWPROBE, printf("btrfs: found backup superblock, ignore\n"));
+ return 1;
+ }
+
bfs = blkid_probe_get_sb(pr, mag, struct btrfs_super_block);
if (!bfs)
return -1;

View File

@ -1,6 +1,6 @@
diff -up util-linux-2.20-rc1/disk-utils/fdformat.8.orig util-linux-2.20-rc1/disk-utils/fdformat.8
--- util-linux-2.20-rc1/disk-utils/fdformat.8.orig 2011-07-20 21:55:23.000000000 +0200
+++ util-linux-2.20-rc1/disk-utils/fdformat.8 2011-07-29 21:08:57.558601033 +0200
diff -up util-linux-2.22.2/disk-utils/fdformat.8.kzak util-linux-2.22.2/disk-utils/fdformat.8
--- util-linux-2.22.2/disk-utils/fdformat.8.kzak 2012-06-11 12:06:53.620195844 +0200
+++ util-linux-2.22.2/disk-utils/fdformat.8 2013-02-19 16:16:27.130214023 +0100
@@ -43,6 +43,11 @@ when a non-standard format is being used
autodetected earlier. In this case, use
.BR setfdprm (8)
@ -13,7 +13,7 @@ diff -up util-linux-2.20-rc1/disk-utils/fdformat.8.orig util-linux-2.20-rc1/disk
.SH OPTIONS
.TP
\fB\-n\fR, \fB\-\-no\-verify\fR
@@ -58,7 +63,8 @@ Display help and exit.
@@ -57,7 +62,8 @@ Display help and exit.
.BR fd (4),
.BR setfdprm (8),
.BR mkfs (8),

View File

@ -1,10 +1,10 @@
diff -up util-linux-2.21-rc1/sys-utils/ipcs.c.kzak util-linux-2.21-rc1/sys-utils/ipcs.c
--- util-linux-2.21-rc1/sys-utils/ipcs.c.kzak 2012-01-19 13:31:26.328579820 +0100
+++ util-linux-2.21-rc1/sys-utils/ipcs.c 2012-01-19 13:33:40.968066006 +0100
@@ -262,6 +262,27 @@ static void print_perms (int id, struct
printf(" %-10u\n", ipcp->gid);
diff -up util-linux-2.22.2/sys-utils/ipcs.c.kzak util-linux-2.22.2/sys-utils/ipcs.c
--- util-linux-2.22.2/sys-utils/ipcs.c.kzak 2012-12-12 21:04:47.976355744 +0100
+++ util-linux-2.22.2/sys-utils/ipcs.c 2013-02-19 16:12:54.712551108 +0100
@@ -264,6 +264,27 @@ static void print_perms (int id, struct
printf(" %-10u\n", ipcp->gid);
}
+static unsigned long long
+shminfo_from_proc(const char *name, unsigned long def)
+{
@ -28,11 +28,11 @@ diff -up util-linux-2.21-rc1/sys-utils/ipcs.c.kzak util-linux-2.21-rc1/sys-utils
+
void do_shm (char format)
{
int maxid, shmid, id;
@@ -286,12 +307,12 @@ void do_shm (char format)
* glibc 2.1.3 and all earlier libc's have ints as fields of
* struct shminfo; glibc 2.1.91 has unsigned long; ach
*/
int maxid, shmid, id;
@@ -288,12 +309,12 @@ void do_shm (char format)
* glibc 2.1.3 and all earlier libc's have ints as fields of
* struct shminfo; glibc 2.1.91 has unsigned long; ach
*/
- printf (_("max number of segments = %lu\n"),
- (unsigned long) shminfo.shmmni);
- printf (_("max seg size (kbytes) = %lu\n"),
@ -41,9 +41,9 @@ diff -up util-linux-2.21-rc1/sys-utils/ipcs.c.kzak util-linux-2.21-rc1/sys-utils
+ shminfo_from_proc("shmmni", shminfo.shmmni));
+ printf (_("max seg size (kbytes) = %llu\n"),
+ (shminfo_from_proc("shmmax", shminfo.shmmax) >> 10));
printf (_("max total shared memory (kbytes) = %llu\n"),
printf (_("max total shared memory (kbytes) = %llu\n"),
- getpagesize() / 1024 * (unsigned long long) shminfo.shmall);
+ getpagesize() / 1024 * shminfo_from_proc("shmall", shminfo.shmall));
printf (_("min seg size (bytes) = %lu\n"),
(unsigned long) shminfo.shmmin);
return;
printf (_("min seg size (bytes) = %lu\n"),
(unsigned long) shminfo.shmmin);
return;

View File

@ -1,11 +0,0 @@
diff -up util-linux-2.21-rc1/login-utils/login.c.kzak util-linux-2.21-rc1/login-utils/login.c
--- util-linux-2.21-rc1/login-utils/login.c.kzak 2012-01-19 13:19:54.886299587 +0100
+++ util-linux-2.21-rc1/login-utils/login.c 2012-01-19 13:20:40.853451212 +0100
@@ -499,7 +499,7 @@ static void log_lastlog(struct login_con
if (!cxt->pwd)
return;
- fd = open(_PATH_LASTLOG, O_RDWR, 0);
+ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0);
if (fd < 0)
return;

View File

@ -0,0 +1,12 @@
diff -up util-linux-2.22.2/login-utils/login.c.kzak util-linux-2.22.2/login-utils/login.c
--- util-linux-2.22.2/login-utils/login.c.kzak 2012-12-12 21:04:47.906355128 +0100
+++ util-linux-2.22.2/login-utils/login.c 2013-02-19 16:14:33.224339106 +0100
@@ -514,7 +514,7 @@ static void log_lastlog(struct login_con
if (!cxt->pwd)
return;
- fd = open(_PATH_LASTLOG, O_RDWR, 0);
+ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0);
if (fd < 0)
return;

View File

@ -2,7 +2,7 @@
Summary: A collection of basic system utilities
Name: util-linux
Version: 2.22.2
Release: 4%{?dist}
Release: 5%{?dist}
License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain
Group: System Environment/Base
URL: http://en.wikipedia.org/wiki/Util-linux
@ -80,16 +80,16 @@ Requires: libmount = %{version}-%{release}
# add a missing header
Patch0: util-linux-2.19-floppy-locale.patch
# add note about ATAPI IDE floppy to fdformat.8
Patch1: util-linux-2.20-fdformat-man-ide.patch
Patch1: util-linux-2.22-fdformat-man-ide.patch
# 169628 - /usr/bin/floppy doesn't work with /dev/fd0
Patch2: util-linux-2.19-floppy-generic.patch
### Ready for upstream?
###
# 151635 - makeing /var/log/lastlog
Patch3: util-linux-ng-2.21-login-lastlog.patch
Patch3: util-linux-ng-2.22-login-lastlog.patch
# 231192 - ipcs is not printing correct values on pLinux
Patch4: util-linux-2.21-ipcs-32bit.patch
Patch4: util-linux-2.22-ipcs-32bit.patch
###
### Upstream patches (2.23 or 2.22.x)
@ -103,6 +103,8 @@ Patch102: hexdump-do-not-segfault-when-iterating-over-an-empty.patch
Patch103: cal-don-t-mix-ncurses-output-functions-and-printf.patch
# upstream patch
Patch104: libblkid-remove-optimization-from-verify-function.patch
# 902512 - No boot : Dependency failed for /home (and blkid fails to tell UUID)
Patch105: libblkid-make-backup-superblock-visible-for-wipefs-8.patch
### Upstream patches from master branch (will be v2.23) for su(1) and new
### runuser(1) implementation. This is required for the recent coreutils where
@ -403,7 +405,7 @@ chmod 644 misc-utils/getopt-*.{bash,tcsh}
rm -f ${RPM_BUILD_ROOT}%{_datadir}/getopt/*
rmdir ${RPM_BUILD_ROOT}%{_datadir}/getopt
ln -s /proc/mounts %{buildroot}/etc/mtab
ln -sf /proc/mounts %{buildroot}/etc/mtab
# remove static libs
@ -442,8 +444,7 @@ if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
fi
fi
if [ ! -L /etc/mtab ]; then
rm -f /etc/mtab
ln -s /proc/mounts /etc/mtab
ln -fs /proc/mounts /etc/mtab
fi
%post -n libblkid
@ -778,8 +779,11 @@ fi
%{_mandir}/man3/uuid_unparse.3*
%{_libdir}/pkgconfig/uuid.pc
%changelog
* Tue Feb 19 2013 Karel Zak <kzak@redhat.com> 2.22.2-5
- fix #902512 - Dependency failed for /home (and blkid fails to tell UUID)
- refresh old patches
* Wed Feb 6 2013 Karel Zak <kzak@redhat.com> 2.22.2-4
- improve convertion to mtab symlink in post script
- spec file cleanup (based on #894199)