- fix #245578 - login's PAM configuration inits the keyring at an
inconvenient time - fix #231532 - "pamconsole" not documented in mount(8) - fix #243930 - translation files exist, but are not being used - fix #228731 - sfdisk doesn't support DM-MP device (add default heads and sectors) - fix #231192 - ipcs is not printing correct values on pLinux - fix #245912 - mount doesn't write the 'loop=...' option in /etc/mtab when mounting a loop device - fix #213253 - "cal -3" generates improperly formatted output
This commit is contained in:
parent
b4b7c6b515
commit
7dd321303c
|
@ -0,0 +1,109 @@
|
|||
--- util-linux-2.13-pre7/misc-utils/cal.c.kzak 2007-07-09 14:54:39.000000000 +0200
|
||||
+++ util-linux-2.13-pre7/misc-utils/cal.c 2007-07-09 14:54:39.000000000 +0200
|
||||
@@ -87,9 +87,13 @@
|
||||
putp(s);
|
||||
}
|
||||
|
||||
-static char *
|
||||
+static const char *
|
||||
my_tgetstr(char *s, char *ss) {
|
||||
- return tigetstr(ss);
|
||||
+ const char* ret = tigetstr(ss);
|
||||
+ if (!ret || ret==(char*)-1)
|
||||
+ return "";
|
||||
+ else
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
#elif defined(HAVE_LIBTERMCAP)
|
||||
@@ -110,14 +114,20 @@
|
||||
tputs (s, 1, putchar);
|
||||
}
|
||||
|
||||
-static char *
|
||||
+static const char *
|
||||
my_tgetstr(char *s, char *ss) {
|
||||
- return tgetstr(s, &strbuf);
|
||||
+ const char* ret = tgetstr(s, &strbuf);
|
||||
+ if (!ret)
|
||||
+ return "";
|
||||
+ else
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
const char *term="";
|
||||
const char *Senter="", *Sexit="";/* enter and exit standout mode */
|
||||
+int Slen; /* strlen of Senter+Sexit */
|
||||
+char *Hrow; /* pointer to highlighted row in month */
|
||||
|
||||
#ifdef HAVE_LANGINFO_H
|
||||
# include <langinfo.h>
|
||||
@@ -262,6 +272,7 @@
|
||||
if (ret > 0) {
|
||||
Senter = my_tgetstr("so","smso");
|
||||
Sexit = my_tgetstr("se","rmso");
|
||||
+ Slen = strlen(Senter) + strlen(Sexit);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -437,11 +448,18 @@
|
||||
sprintf(out->s[1],"%s",
|
||||
julian ? j_day_headings : day_headings);
|
||||
for (row = 0; row < 6; row++) {
|
||||
- for (col = 0, p = lineout; col < 7; col++)
|
||||
- p = ascii_day(p, days[row * 7 + col]);
|
||||
+ int has_hl = 0;
|
||||
+ for (col = 0, p = lineout; col < 7; col++) {
|
||||
+ int xd = days[row * 7 + col];
|
||||
+ if (xd != SPACE && (xd & TODAY_FLAG))
|
||||
+ has_hl = 1;
|
||||
+ p = ascii_day(p, xd);
|
||||
+ }
|
||||
*p = '\0';
|
||||
trim_trailing_spaces(lineout);
|
||||
sprintf(out->s[row+2], "%s", lineout);
|
||||
+ if (has_hl)
|
||||
+ Hrow = out->s[row+2];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -489,14 +507,25 @@
|
||||
do_monthly(day, prev_month, prev_year, &out_prev);
|
||||
do_monthly(day, month, year, &out_curm);
|
||||
do_monthly(day, next_month, next_year, &out_next);
|
||||
+
|
||||
width = (julian ? J_WEEK_LEN : WEEK_LEN) -1;
|
||||
for (i = 0; i < 2; i++)
|
||||
printf("%s %s %s\n", out_prev.s[i], out_curm.s[i], out_next.s[i]);
|
||||
for (i = 2; i < FMT_ST_LINES; i++) {
|
||||
+ int w1, w2, w3;
|
||||
+ w1 = w2 = w3 = width;
|
||||
+
|
||||
+#if defined(HAVE_NCURSES) || defined(HAVE_LIBTERMCAP)
|
||||
+ /* adjust width to allow for non printable characters */
|
||||
+ w1 += (out_prev.s[i] == Hrow ? Slen : 0);
|
||||
+ w2 += (out_curm.s[i] == Hrow ? Slen : 0);
|
||||
+ w3 += (out_next.s[i] == Hrow ? Slen : 0);
|
||||
+#endif
|
||||
snprintf(lineout, SIZE(lineout), "%-*s %-*s %-*s\n",
|
||||
- width, out_prev.s[i],
|
||||
- width, out_curm.s[i],
|
||||
- width, out_next.s[i]);
|
||||
+ w1, out_prev.s[i],
|
||||
+ w2, out_curm.s[i],
|
||||
+ w3, out_next.s[i]);
|
||||
+
|
||||
#if defined(HAVE_NCURSES) || defined(HAVE_LIBTERMCAP)
|
||||
my_putstring(lineout);
|
||||
#else
|
||||
--- util-linux-2.13-pre7/configure.ac.kzak 2007-07-09 14:54:48.000000000 +0200
|
||||
+++ util-linux-2.13-pre7/configure.ac 2007-07-09 14:55:11.000000000 +0200
|
||||
@@ -71,6 +71,7 @@
|
||||
if test x$ac_cv_header_ncurses_h = xyes || test x$ac_cv_header_ncurses_ncurses_h = xyes; then
|
||||
have_ncurses=yes
|
||||
AC_MSG_NOTICE([you have ncurses])
|
||||
+ AC_DEFINE(HAVE_NCURSES, 1, [Do we have -lncurses?])
|
||||
else
|
||||
AC_MSG_NOTICE([you do not have ncurses])
|
||||
fi
|
|
@ -0,0 +1,68 @@
|
|||
|
||||
The compat (32bit) version of sys_shmctl on 64bit kernel returns incorrect
|
||||
information. In this case is better to read data from /proc/sys/kernel/shm*.
|
||||
|
||||
--- util-linux-2.13-pre7/sys-utils/ipcs.c.kzak 2007-06-25 10:25:31.000000000 +0200
|
||||
+++ util-linux-2.13-pre7/sys-utils/ipcs.c 2007-06-25 10:14:06.000000000 +0200
|
||||
@@ -253,6 +253,26 @@
|
||||
printf(" %-10d\n", ipcp->gid);
|
||||
}
|
||||
|
||||
+static unsigned long long
|
||||
+shminfo_from_proc(const char *name, unsigned long def)
|
||||
+{
|
||||
+ char path[256];
|
||||
+ char buf[64];
|
||||
+ FILE *f;
|
||||
+ unsigned long long res = def;
|
||||
+
|
||||
+ if (!name)
|
||||
+ return res;
|
||||
+
|
||||
+ snprintf(path, sizeof(path), "/proc/sys/kernel/%s", name);
|
||||
+
|
||||
+ if (!(f = fopen(path, "r")))
|
||||
+ return res;
|
||||
+ if (fgets(buf, sizeof(buf), f))
|
||||
+ res = atoll(buf);
|
||||
+ fclose(f);
|
||||
+ return res;
|
||||
+}
|
||||
|
||||
void do_shm (char format)
|
||||
{
|
||||
@@ -268,7 +288,7 @@
|
||||
printf (_("kernel not configured for shared memory\n"));
|
||||
return;
|
||||
}
|
||||
-
|
||||
+
|
||||
switch (format) {
|
||||
case LIMITS:
|
||||
printf (_("------ Shared Memory Limits --------\n"));
|
||||
@@ -276,18 +296,15 @@
|
||||
return;
|
||||
/* 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"),
|
||||
- (unsigned long) (shminfo.shmmax >> 10));
|
||||
-
|
||||
+ printf (_("max number of segments = %llu\n"),
|
||||
+ shminfo_from_proc("shmmni", shminfo.shmmni));
|
||||
+ printf (_("max seg size (kbytes) = %llu\n"),
|
||||
+ (shminfo_from_proc("shmmax", shminfo.shmmax) >> 10));
|
||||
+
|
||||
/* max shmem = pagesize * shminfo.shmall / 1024
|
||||
- *
|
||||
- * note: that "shminfo.shmall * getpagesize()" is greater than ULONG_MAX (32bit)
|
||||
- * it means that better is "/" before "*" or use "long long"
|
||||
*/
|
||||
- printf (_("max total shared memory (kbytes) = %lu\n"),
|
||||
- getpagesize()/1024 * (unsigned long) shminfo.shmall);
|
||||
+ printf (_("max total shared memory (kbytes) = %llu\n"),
|
||||
+ getpagesize()/1024 * shminfo_from_proc("shmall", shminfo.shmall));
|
||||
printf (_("min seg size (bytes) = %lu\n"),
|
||||
(unsigned long) shminfo.shmmin);
|
||||
return;
|
|
@ -0,0 +1,16 @@
|
|||
--- util-linux-2.13-pre7/config/include-Makefile.am.kzak 2007-06-25 11:15:40.000000000 +0200
|
||||
+++ util-linux-2.13-pre7/config/include-Makefile.am 2007-06-25 11:16:39.000000000 +0200
|
||||
@@ -3,10 +3,10 @@
|
||||
datadir = $(prefix)/usr/share
|
||||
infodir = $(datadir)/info
|
||||
mandir = $(datadir)/man
|
||||
+localedir = $(datadir)/locale
|
||||
|
||||
-AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
|
||||
+AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include \
|
||||
+ -DLOCALEDIR=\"$(localedir)\"
|
||||
|
||||
DEFAULT_INCLUDES =
|
||||
|
||||
-DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
|
||||
-
|
|
@ -0,0 +1,34 @@
|
|||
commit 2e039577c5eb895fab35aed136345a0c07d7a587
|
||||
Author: Karel Zak <kzak@redhat.com>
|
||||
Date: Mon Jul 2 23:35:08 2007 +0200
|
||||
|
||||
mount: use loop= option when mounting by /sbin/mount.<type>
|
||||
|
||||
The mount(8) calls external mount programs (/sbin/mount.<type>)
|
||||
without the loop=/dev/loopN option. This patch fix this bug.
|
||||
|
||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||
|
||||
diff --git a/mount/mount.c b/mount/mount.c
|
||||
index c27c5e5..50089a9 100644
|
||||
--- a/mount/mount.c
|
||||
+++ b/mount/mount.c
|
||||
@@ -1057,6 +1057,9 @@ try_mount_one (const char *spec0, const char *node0, const char *types0,
|
||||
goto out;
|
||||
}
|
||||
|
||||
+ if (loop)
|
||||
+ opt_loopdev = loopdev;
|
||||
+
|
||||
/*
|
||||
* Call mount.TYPE for types that require a separate mount program.
|
||||
* For the moment these types are ncpfs and smbfs. Maybe also vxfs.
|
||||
@@ -1082,8 +1085,6 @@ try_mount_one (const char *spec0, const char *node0, const char *types0,
|
||||
|
||||
if (fake || mnt5_res == 0) {
|
||||
/* Mount succeeded, report this (if verbose) and write mtab entry. */
|
||||
- if (loop)
|
||||
- opt_loopdev = loopdev;
|
||||
|
||||
if (!(mounttype & MS_PROPAGATION)) {
|
||||
update_mtab_entry(loop ? loopfile : spec,
|
|
@ -0,0 +1,13 @@
|
|||
--- util-linux-2.13-pre7/fdisk/sfdisk.c.kzak 2007-06-25 09:13:31.000000000 +0200
|
||||
+++ util-linux-2.13-pre7/fdisk/sfdisk.c 2007-06-25 09:12:42.000000000 +0200
|
||||
@@ -469,8 +469,8 @@
|
||||
|
||||
R = get_geometry(dev, fd, silent);
|
||||
|
||||
- B.heads = (U.heads ? U.heads : R.heads);
|
||||
- B.sectors = (U.sectors ? U.sectors : R.sectors);
|
||||
+ B.heads = (U.heads ? U.heads : (R.heads ? R.heads : 255));
|
||||
+ B.sectors = (U.sectors ? U.sectors : (R.sectors ? R.sectors : 63));
|
||||
B.cylinders = (U.cylinders ? U.cylinders : R.cylinders);
|
||||
|
||||
B.cylindersize = B.heads * B.sectors;
|
|
@ -6,10 +6,10 @@ account include system-auth
|
|||
password include system-auth
|
||||
# pam_selinux.so close should be the first session rule
|
||||
session required pam_selinux.so close
|
||||
session optional pam_keyinit.so force revoke
|
||||
session include system-auth
|
||||
session required pam_loginuid.so
|
||||
session optional pam_console.so
|
||||
# pam_selinux.so open should only be followed by sessions to be executed in the user context
|
||||
session required pam_selinux.so open
|
||||
session optional pam_keyinit.so force revoke
|
||||
session optional pam_ck_connector.so
|
||||
|
|
|
@ -6,9 +6,10 @@ account include system-auth
|
|||
password include system-auth
|
||||
# pam_selinux.so close should be the first session rule
|
||||
session required pam_selinux.so close
|
||||
session optional pam_keyinit.so force revoke
|
||||
session include system-auth
|
||||
session required pam_loginuid.so
|
||||
session optional pam_console.so
|
||||
# pam_selinux.so open should only be followed by sessions to be executed in the user context
|
||||
session required pam_selinux.so open
|
||||
session optional pam_keyinit.so force revoke
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
Summary: A collection of basic system utilities.
|
||||
Name: util-linux
|
||||
Version: 2.13
|
||||
Release: 0.51%{?dist}
|
||||
Release: 0.52%{?dist}
|
||||
License: distributable
|
||||
Group: System Environment/Base
|
||||
|
||||
|
@ -247,7 +247,16 @@ Patch262: util-linux-2.13-partx-man.patch
|
|||
Patch263: util-linux-2.13-hwclock-systohc.patch
|
||||
# 227903 - mount -f does not work with NFS-mounted
|
||||
Patch264: util-linux-2.13-mount-fake.patch
|
||||
|
||||
# 243930 - Translation files exist, but are not being used
|
||||
Patch265: util-linux-2.13-localedir.patch
|
||||
# 228731 - sfdisk doesn't support DM-MP device (add default heads and sectors)
|
||||
Patch266: util-linux-2.13-sfdisk-geo.patch
|
||||
# 231192 - ipcs is not printing correct values on pLinux
|
||||
Patch267: util-linux-2.13-ipcs-32bit.patch
|
||||
# 245912: mount doesn't write the 'loop=...' option in /etc/mtab when mounting a loop device
|
||||
Patch268: util-linux-2.13-mount-loop.patch
|
||||
# 213253: "cal -3" generates improperly formatted output
|
||||
Patch269: util-linux-2.13-cal-3.patch
|
||||
|
||||
# When adding patches, please make sure that it is easy to find out what bug # the
|
||||
# patch fixes.
|
||||
|
@ -351,6 +360,11 @@ cp %{SOURCE8} %{SOURCE9} .
|
|||
%patch262 -p1
|
||||
%patch263 -p1
|
||||
%patch264 -p1
|
||||
%patch265 -p1
|
||||
%patch266 -p1
|
||||
%patch267 -p1
|
||||
%patch268 -p1
|
||||
%patch269 -p1
|
||||
|
||||
%build
|
||||
unset LINGUAS || :
|
||||
|
@ -764,6 +778,15 @@ exit 0
|
|||
/sbin/losetup
|
||||
|
||||
%changelog
|
||||
* Mon Jul 9 2007 Karel Zak <kzak@redhat.com> 2.13-0.52
|
||||
- fix #245578 - login's PAM configuration inits the keyring at an inconvenient time
|
||||
- fix #231532 - "pamconsole" not documented in mount(8)
|
||||
- fix #243930 - translation files exist, but are not being used
|
||||
- fix #228731 - sfdisk doesn't support DM-MP device (add default heads and sectors)
|
||||
- fix #231192 - ipcs is not printing correct values on pLinux
|
||||
- fix #245912 - mount doesn't write the 'loop=...' option in /etc/mtab when mounting a loop device
|
||||
- fix #213253 - "cal -3" generates improperly formatted output
|
||||
|
||||
* Fri Apr 6 2007 Karel Zak <kzak@redhat.com> 2.13-0.51
|
||||
- fix #150493 - hwclock --systohc sets clock 0.5 seconds slow
|
||||
- fix #220873 - starting RPC idmapd: Error: RPC MTAB does not exist.
|
||||
|
|
Loading…
Reference in New Issue