From cb4679ff2e73da3673aeb65fcc1baf9c7a55e94c Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 29 Sep 2009 07:13:57 +0000 Subject: [PATCH 01/48] Initialize branch F-12 for util-linux-ng --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..06de2d2 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-12 From 3d39c82c099f568b1c70984d53beed6a56e84035 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 1 Oct 2009 19:05:20 +0000 Subject: [PATCH 02/48] - fix #519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device --- util-linux-ng-2.16-switchroot-tty.patch | 17 +++++++++++++++++ util-linux-ng.spec | 7 ++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-2.16-switchroot-tty.patch diff --git a/util-linux-ng-2.16-switchroot-tty.patch b/util-linux-ng-2.16-switchroot-tty.patch new file mode 100644 index 0000000..14ee89f --- /dev/null +++ b/util-linux-ng-2.16-switchroot-tty.patch @@ -0,0 +1,17 @@ +diff -up util-linux-ng-2.16/sys-utils/switch_root.c.kzak util-linux-ng-2.16/sys-utils/switch_root.c +--- util-linux-ng-2.16/sys-utils/switch_root.c.kzak 2009-10-01 21:01:31.000000000 +0200 ++++ util-linux-ng-2.16/sys-utils/switch_root.c 2009-10-01 21:01:52.000000000 +0200 +@@ -267,13 +267,6 @@ int main(int argc, char *argv[]) + if (access(init, X_OK)) + warn("cannot access %s", init); + +- /* get session leader */ +- setsid(); +- +- /* set controlling terminal */ +- if (ioctl (0, TIOCSCTTY, 1)) +- warn("failed to TIOCSCTTY"); +- + execv(init, initargs); + err(EXIT_FAILURE, "failed to execute %s", init); + } diff --git a/util-linux-ng.spec b/util-linux-ng.spec index ff059b5..27eb962 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -114,6 +114,8 @@ Patch10: util-linux-ng-2.16-libblkid-compression.patch Patch11: util-linux-ng-2.14-sfdisk-dump.patch # Swsuspend does not work Patch12: util-linux-ng-2.16-blkid-swsuspend.patch +# 519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device +Patch13: util-linux-ng-2.16-switchroot-tty.patch %description The util-linux-ng package contains a large variety of low-level system @@ -722,6 +724,9 @@ fi %changelog +* Thu Oct 1 2009 Karel Zak 2.16-11 +- fix #519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device + * Wed Sep 16 2009 Tomas Mraz - 2.16-10 - use password-auth common PAM configuration instead of system-auth and drop pam_console.so call from the remote PAM config file From 54801c4aa369ef4c45dbd3fb45da1cd47396f4b5 Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 2 Oct 2009 08:46:21 +0000 Subject: [PATCH 03/48] - release++ --- util-linux-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 27eb962..de0183d 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 11%{?dist} +Release: 12%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -724,6 +724,9 @@ fi %changelog +* Fri Oct 2 2009 Karel Zak 2.16-12 +- release++ + * Thu Oct 1 2009 Karel Zak 2.16-11 - fix #519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device From cfb90b9408b47a0b899ea0faf09f277254dbf278 Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 2 Oct 2009 19:24:34 +0000 Subject: [PATCH 04/48] - #514413 - Extra spaces at the end of CD mount point --- util-linux-ng-2.16-libblkid-joliet.patch | 118 +++++++++++++++++++++++ util-linux-ng.spec | 8 +- 2 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-2.16-libblkid-joliet.patch diff --git a/util-linux-ng-2.16-libblkid-joliet.patch b/util-linux-ng-2.16-libblkid-joliet.patch new file mode 100644 index 0000000..74d063e --- /dev/null +++ b/util-linux-ng-2.16-libblkid-joliet.patch @@ -0,0 +1,118 @@ +diff -up util-linux-ng-2.16/shlibs/blkid/src/probe.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probe.c +--- util-linux-ng-2.16/shlibs/blkid/src/probe.c.kzak 2009-07-04 01:20:03.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probe.c 2009-10-02 20:53:33.000000000 +0200 +@@ -685,10 +685,27 @@ static int blkid_probe_set_usage(blkid_p + return blkid_probe_set_value(pr, "USAGE", (unsigned char *) u, strlen(u) + 1); + } + ++ ++/* Removes whitespace from the right-hand side of a string (trailing ++ * whitespace). ++ * ++ * Returns size of the new string (without \0). ++ */ ++static size_t blkid_rtrim_whitespace(unsigned char *str) ++{ ++ size_t i = strlen((char *) str); ++ ++ while (i--) { ++ if (!isspace(str[i])) ++ break; ++ } ++ str[++i] = '\0'; ++ return i; ++} ++ + int blkid_probe_set_label(blkid_probe pr, unsigned char *label, size_t len) + { + struct blkid_prval *v; +- int i; + + if (len > BLKID_PROBVAL_BUFSIZ) + len = BLKID_PROBVAL_BUFSIZ; +@@ -704,15 +721,7 @@ int blkid_probe_set_label(blkid_probe pr + + memcpy(v->data, label, len); + v->data[len] = '\0'; +- +- /* remove trailing whitespace */ +- i = strnlen((char *) v->data, len); +- while (i--) { +- if (!isspace(v->data[i])) +- break; +- } +- v->data[++i] = '\0'; +- v->len = i + 1; ++ v->len = blkid_rtrim_whitespace(v->data) + 1; + return 0; + } + +@@ -765,7 +774,8 @@ int blkid_probe_set_utf8label(blkid_prob + if (!v) + return -1; + +- v->len = encode_to_utf8(enc, v->data, sizeof(v->data), label, len); ++ encode_to_utf8(enc, v->data, sizeof(v->data), label, len); ++ v->len = blkid_rtrim_whitespace(v->data) + 1; + return 0; + } + +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/iso9660.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/iso9660.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/iso9660.c.kzak 2009-07-04 01:20:02.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/iso9660.c 2009-10-02 20:54:43.000000000 +0200 +@@ -19,6 +19,7 @@ + + #include "blkidP.h" + ++/* PVD - Primary volume descriptor */ + struct iso_volume_descriptor { + unsigned char vd_type; + unsigned char vd_id[5]; +@@ -48,6 +49,20 @@ struct high_sierra_volume_descriptor { + unsigned char volume_id[32]; + }; + ++/* returns 1 if the begin of @ascii is equal to @utf16 string. ++ */ ++static int ascii_eq_utf16be(unsigned char *ascii, ++ unsigned char *utf16, size_t len) ++{ ++ int a, u; ++ ++ for (a = 0, u = 0; u < len; a++, u += 2) { ++ if (utf16[u] != 0x0 || ascii[a] != utf16[u + 1]) ++ return 0; ++ } ++ return 1; ++} ++ + /* old High Sierra format */ + static int probe_iso9660_hsfs(blkid_probe pr, const struct blkid_idmag *mag) + { +@@ -82,8 +97,6 @@ static int probe_iso9660(blkid_probe pr, + /* Joliet Extension */ + off = ISO_VD_OFFSET; + for (i = 0; i < ISO_VD_MAX; i++) { +- uint8_t svd_label[64]; +- + iso = (struct iso_volume_descriptor *) + blkid_probe_get_buffer(pr, + off, +@@ -98,9 +111,16 @@ static int probe_iso9660(blkid_probe pr, + memcmp(iso->escape_sequences, "%/C", 3) == 0 || + memcmp(iso->escape_sequences, "%/E", 3) == 0) { + ++ /* Is the Joliet (UTF16BE) label equal to the label in ++ * the PVD? If yes, use PVD label. The Jolied version ++ * of the label could be trimed (because UTF16..). ++ */ ++ if (ascii_eq_utf16be(label, iso->volume_id, 32)) ++ break; ++ + blkid_probe_set_utf8label(pr, + iso->volume_id, +- sizeof(svd_label), ++ sizeof(iso->volume_id), + BLKID_ENC_UTF16BE); + + blkid_probe_set_version(pr, "Joliet Extension"); diff --git a/util-linux-ng.spec b/util-linux-ng.spec index ff059b5..c505a3c 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 10%{?dist} +Release: 10.1%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -114,6 +114,8 @@ Patch10: util-linux-ng-2.16-libblkid-compression.patch Patch11: util-linux-ng-2.14-sfdisk-dump.patch # Swsuspend does not work Patch12: util-linux-ng-2.16-blkid-swsuspend.patch +# 514413 - Extra spaces at the end of CD mount point +Patch13: util-linux-ng-2.16-libblkid-joliet.patch %description The util-linux-ng package contains a large variety of low-level system @@ -212,6 +214,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 %build unset LINGUAS || : @@ -722,6 +725,9 @@ fi %changelog +* Fri Oct 2 2009 Karel Zak 2.16-10.1 +- #514413 - Extra spaces at the end of CD mount point + * Wed Sep 16 2009 Tomas Mraz - 2.16-10 - use password-auth common PAM configuration instead of system-auth and drop pam_console.so call from the remote PAM config file From 65b849d1614074015eda83924458e1caded79704 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 5 Oct 2009 07:25:54 +0000 Subject: [PATCH 05/48] - fix spec file --- util-linux-ng.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index de0183d..3580539 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -214,6 +214,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 %build unset LINGUAS || : @@ -724,6 +725,9 @@ fi %changelog +* Mon Oct 5 2009 Karel Zak 2.16-13 +- fix spec file + * Fri Oct 2 2009 Karel Zak 2.16-12 - release++ From b73954c18c2210b63c96788a5bc439161439e196 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 5 Oct 2009 15:22:39 +0000 Subject: [PATCH 06/48] - fix #519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device --- util-linux-ng-2.16-switchroot-tty.patch | 17 +++++++++++++++++ util-linux-ng.spec | 8 +++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-2.16-switchroot-tty.patch diff --git a/util-linux-ng-2.16-switchroot-tty.patch b/util-linux-ng-2.16-switchroot-tty.patch new file mode 100644 index 0000000..14ee89f --- /dev/null +++ b/util-linux-ng-2.16-switchroot-tty.patch @@ -0,0 +1,17 @@ +diff -up util-linux-ng-2.16/sys-utils/switch_root.c.kzak util-linux-ng-2.16/sys-utils/switch_root.c +--- util-linux-ng-2.16/sys-utils/switch_root.c.kzak 2009-10-01 21:01:31.000000000 +0200 ++++ util-linux-ng-2.16/sys-utils/switch_root.c 2009-10-01 21:01:52.000000000 +0200 +@@ -267,13 +267,6 @@ int main(int argc, char *argv[]) + if (access(init, X_OK)) + warn("cannot access %s", init); + +- /* get session leader */ +- setsid(); +- +- /* set controlling terminal */ +- if (ioctl (0, TIOCSCTTY, 1)) +- warn("failed to TIOCSCTTY"); +- + execv(init, initargs); + err(EXIT_FAILURE, "failed to execute %s", init); + } diff --git a/util-linux-ng.spec b/util-linux-ng.spec index c505a3c..b0208c3 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 10.1%{?dist} +Release: 10.2%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -116,6 +116,8 @@ Patch11: util-linux-ng-2.14-sfdisk-dump.patch Patch12: util-linux-ng-2.16-blkid-swsuspend.patch # 514413 - Extra spaces at the end of CD mount point Patch13: util-linux-ng-2.16-libblkid-joliet.patch +# 519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device +Patch14: util-linux-ng-2.16-switchroot-tty.patch %description The util-linux-ng package contains a large variety of low-level system @@ -215,6 +217,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 %build unset LINGUAS || : @@ -725,6 +728,9 @@ fi %changelog +* Mon Oct 5 2009 Karel Zak 2.16-10.2 +- fix #519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device + * Fri Oct 2 2009 Karel Zak 2.16-10.1 - #514413 - Extra spaces at the end of CD mount point From 9cc0805afcb149dfb80d248e3b165a53f00d387c Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 19 Oct 2009 12:51:04 +0000 Subject: [PATCH 07/48] - upgrade to pre-release snapshot (official changelog not available yet, see http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for now) - new commands: fallocate, unshare, wipefs - libblkid supports topology and partitions probing - remove support for --rmpart[s] from blockdev(8) (util-linux-ng-2.14-blockdev-rmpart.patch) - merged upstream: util-linux-ng-2.14-sfdisk-dump.patch util-linux-ng-2.16-blkid-swsuspend.patch util-linux-ng-2.16-libblkid-compression.patch util-linux-ng-2.16-libblkid-ext2.patch util-linux-ng-2.16-switchroot-tty.patch --- .cvsignore | 2 +- sources | 2 +- util-linux-ng-2.14-blockdev-rmpart.patch | 93 ------------------- util-linux-ng-2.14-sfdisk-dump.patch | 54 ----------- util-linux-ng-2.16-blkid-cachefile.patch | 36 +++---- util-linux-ng-2.16-blkid-swsuspend.patch | 26 ------ util-linux-ng-2.16-libblkid-compression.patch | 57 ------------ util-linux-ng-2.16-libblkid-ext2.patch | 51 ---------- util-linux-ng-2.16-switchroot-tty.patch | 17 ---- util-linux-ng.spec | 50 +++++----- 10 files changed, 44 insertions(+), 344 deletions(-) delete mode 100644 util-linux-ng-2.14-blockdev-rmpart.patch delete mode 100644 util-linux-ng-2.14-sfdisk-dump.patch delete mode 100644 util-linux-ng-2.16-blkid-swsuspend.patch delete mode 100644 util-linux-ng-2.16-libblkid-compression.patch delete mode 100644 util-linux-ng-2.16-libblkid-ext2.patch delete mode 100644 util-linux-ng-2.16-switchroot-tty.patch diff --git a/.cvsignore b/.cvsignore index df25c4e..63a7a76 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.16.tar.bz2 +util-linux-ng-2.17-git5e51568.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index f0be7b2..7ea3e08 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -9623380641b0c2e0449f5b1ecc567663 util-linux-ng-2.16.tar.bz2 +d17141b5dabf4605b1c1db4cf8cff38a util-linux-ng-2.17-git5e51568.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng-2.14-blockdev-rmpart.patch b/util-linux-ng-2.14-blockdev-rmpart.patch deleted file mode 100644 index a907a06..0000000 --- a/util-linux-ng-2.14-blockdev-rmpart.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff -up util-linux-ng-2.14-rc3/disk-utils/blockdev.c.rm util-linux-ng-2.14-rc3/disk-utils/blockdev.c ---- util-linux-ng-2.14-rc3/disk-utils/blockdev.c.rm 2008-04-22 10:59:53.000000000 +0200 -+++ util-linux-ng-2.14-rc3/disk-utils/blockdev.c 2008-05-19 12:31:52.000000000 +0200 -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - - #include "nls.h" - #include "blkdev.h" -@@ -47,8 +48,11 @@ struct bdc { - { "--setfra", "BLKFRASET", BLKFRASET, ARGINTA, 0, "FSREADAHEAD", N_("set filesystem readahead") }, - { "--getfra", "BLKFRAGET", BLKFRAGET, ARGLINTG, -1, NULL, N_("get filesystem readahead") }, - { "--flushbufs", "BLKFLSBUF", BLKFLSBUF, ARGNONE, 0, NULL, N_("flush buffers") }, -- { "--rereadpt", "BLKRRPART", BLKRRPART, ARGNONE, 0, NULL, -- N_("reread partition table") }, -+ { "--rereadpt", "BLKRRPART", BLKRRPART, ARGNONE, 0, NULL, N_("reread partition table") }, -+#ifdef BLKPG -+ { "--rmpart", "BLKPG", BLKPG, ARGINTAP, 0, "PARTNO", N_("disable partition") }, -+ { "--rmparts", "BLKPG", BLKPG, ARGNONE, 0, NULL, N_("disable all partitions") }, -+#endif - }; - - #define SIZE(a) (sizeof(a)/sizeof((a)[0])) -@@ -89,6 +93,40 @@ find_cmd(char *s) { - return -1; - } - -+#ifdef BLKPG -+static int -+disable_partition(int fd, int partno) { -+ struct blkpg_partition part = { -+ .pno = partno, -+ .start = 0, -+ .length = 0, -+ .devname[0] = 0, -+ .volname[0] = 0, -+ }; -+ struct blkpg_ioctl_arg io = { -+ .op = BLKPG_DEL_PARTITION, -+ .datalen = sizeof(part), -+ .data = &part, -+ .flags = 0, -+ }; -+ int res; -+ -+ res = ioctl(fd, BLKPG, &io); -+ if (res < 0) -+ return 0; -+ return 1; -+} -+ -+static int -+disable_partitions(int fd) { -+ int p, res = 0; -+ -+ for (p = 1; p <= 256; p++) -+ res += disable_partition(fd, p); -+ return res ? 0 : -1; -+} -+#endif -+ - void do_commands(int fd, char **argv, int d); - void report_header(void); - void report_device(char *device, int quiet); -@@ -206,6 +244,12 @@ do_commands(int fd, char **argv, int d) - switch(bdcms[j].argtype) { - default: - case ARGNONE: -+#ifdef BLKPG -+ if (bdcms[j].ioc == BLKPG) { -+ res = disable_partitions(fd); -+ break; -+ } -+#endif - res = ioctl(fd, bdcms[j].ioc, 0); - break; - case ARGINTA: -@@ -223,6 +267,13 @@ do_commands(int fd, char **argv, int d) - bdcms[j].name); - usage(); - } -+#ifdef BLKPG -+ if (bdcms[j].ioc == BLKPG) { -+ iarg = atoi(argv[++i]); -+ res = disable_partition(fd, iarg) ? 0 : -1; -+ break; -+ } -+#endif - iarg = atoi(argv[++i]); - res = ioctl(fd, bdcms[j].ioc, &iarg); - break; diff --git a/util-linux-ng-2.14-sfdisk-dump.patch b/util-linux-ng-2.14-sfdisk-dump.patch deleted file mode 100644 index 89a644c..0000000 --- a/util-linux-ng-2.14-sfdisk-dump.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 1f1614f6a89de4b06e1843d0fadbca3f8a5521fe Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Fri, 11 Sep 2009 14:00:50 +0200 -Subject: [PATCH 1/2] sfdisk: dump has to be $LANG insensitive - -This stupid bug has been introduced by: - - commit add5133f4ad5136aac3ce7627e615d14893d0aeb - Author: Pedro Ribeiro - Date: Fri Oct 3 08:52:35 2008 +0200 - fdisk: several strings without gettext calls - -... so it shows that we need to improve our review process... :-( - -Address-Red-Hat-Bug: #522718 -Signed-off-by: Karel Zak ---- - fdisk/sfdisk.c | 10 +++++----- - 1 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c -index 8fae5bb..427cb40 100644 ---- a/fdisk/sfdisk.c -+++ b/fdisk/sfdisk.c -@@ -930,8 +930,8 @@ get_disksize(int format) { - static void - out_partition_header(char *dev, int format, struct geometry G) { - if (dump) { -- printf(_("# partition table of %s\n"), dev); -- printf(_("unit: sectors\n\n")); -+ printf("# partition table of %s\n", dev); -+ printf("unit: sectors\n\n"); - return; - } - -@@ -1059,12 +1059,12 @@ out_partition(char *dev, int format, struct part_desc *p, - size = p->size; - - if (dump) { -- printf(_(" start=%9lu"), start); -- printf(_(", size=%9lu"), size); -+ printf(" start=%9lu", start); -+ printf(", size=%9lu", size); - if (p->ptype == DOS_TYPE) { - printf(", Id=%2x", p->p.sys_type); - if (p->p.bootable == 0x80) -- printf(_(", bootable")); -+ printf(", bootable"); - } - printf("\n"); - return; --- -1.6.2.5 - diff --git a/util-linux-ng-2.16-blkid-cachefile.patch b/util-linux-ng-2.16-blkid-cachefile.patch index 9e1df11..5cff6d7 100644 --- a/util-linux-ng-2.16-blkid-cachefile.patch +++ b/util-linux-ng-2.16-blkid-cachefile.patch @@ -1,7 +1,7 @@ -diff -up util-linux-ng-2.16/misc-utils/blkid.8.kzak util-linux-ng-2.16/misc-utils/blkid.8 ---- util-linux-ng-2.16/misc-utils/blkid.8.kzak 2009-07-04 01:20:01.000000000 +0200 -+++ util-linux-ng-2.16/misc-utils/blkid.8 2009-07-16 00:41:28.000000000 +0200 -@@ -64,7 +64,7 @@ more devices. +diff -up util-linux-ng-2.17-git5e51568/misc-utils/blkid.8.kzak util-linux-ng-2.17-git5e51568/misc-utils/blkid.8 +--- util-linux-ng-2.17-git5e51568/misc-utils/blkid.8.kzak 2009-10-16 22:50:03.000000000 +0200 ++++ util-linux-ng-2.17-git5e51568/misc-utils/blkid.8 2009-10-19 14:31:10.000000000 +0200 +@@ -67,7 +67,7 @@ more devices. Read from .I cachefile instead of reading from the default cache file @@ -10,7 +10,7 @@ diff -up util-linux-ng-2.16/misc-utils/blkid.8.kzak util-linux-ng-2.16/misc-util If you want to start with a clean cache (i.e. don't report devices previously scanned but not necessarily available at this time), specify .IR /dev/null . -@@ -179,7 +179,7 @@ Display version number and exit. +@@ -190,7 +190,7 @@ Display version number and exit. Write the device cache to .I writecachefile instead of writing it to the default cache file @@ -19,10 +19,10 @@ diff -up util-linux-ng-2.16/misc-utils/blkid.8.kzak util-linux-ng-2.16/misc-util If you don't want to save the cache to the default file, specify .IR /dev/null. If not specified it will be the same file as that given by the -diff -up util-linux-ng-2.16/misc-utils/blkid.c.kzak util-linux-ng-2.16/misc-utils/blkid.c ---- util-linux-ng-2.16/misc-utils/blkid.c.kzak 2009-07-04 01:20:01.000000000 +0200 -+++ util-linux-ng-2.16/misc-utils/blkid.c 2009-07-16 00:41:28.000000000 +0200 -@@ -60,7 +60,7 @@ static void usage(int error) +diff -up util-linux-ng-2.17-git5e51568/misc-utils/blkid.c.kzak util-linux-ng-2.17-git5e51568/misc-utils/blkid.c +--- util-linux-ng-2.17-git5e51568/misc-utils/blkid.c.kzak 2009-10-16 22:50:03.000000000 +0200 ++++ util-linux-ng-2.17-git5e51568/misc-utils/blkid.c 2009-10-19 14:31:10.000000000 +0200 +@@ -62,7 +62,7 @@ static void usage(int error) " [-t ] [-w ] [dev ...]\n\n" " %1$s -p [-O ] [-S ] [-o format] [dev ...]\n\n" "Options:\n" @@ -31,9 +31,9 @@ diff -up util-linux-ng-2.16/misc-utils/blkid.c.kzak util-linux-ng-2.16/misc-util " -h print this usage message and exit\n" " -g garbage collect the blkid cache\n" " -o output format; can be one of:\n" -diff -up util-linux-ng-2.16/shlibs/blkid/libblkid.3.kzak util-linux-ng-2.16/shlibs/blkid/libblkid.3 ---- util-linux-ng-2.16/shlibs/blkid/libblkid.3.kzak 2009-07-04 01:20:03.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/libblkid.3 2009-07-16 00:40:13.000000000 +0200 +diff -up util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3.kzak util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3 +--- util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3.kzak 2009-10-16 22:50:03.000000000 +0200 ++++ util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3 2009-10-19 14:31:10.000000000 +0200 @@ -24,7 +24,7 @@ A common use is to allow use of LABEL= a specific block device names into configuration files. .P @@ -61,12 +61,12 @@ diff -up util-linux-ng-2.16/shlibs/blkid/libblkid.3.kzak util-linux-ng-2.16/shli caches data extracted from each recognized block device .TP .I /etc/blkid.conf -diff -up util-linux-ng-2.16/shlibs/blkid/src/blkidP.h.kzak util-linux-ng-2.16/shlibs/blkid/src/blkidP.h ---- util-linux-ng-2.16/shlibs/blkid/src/blkidP.h.kzak 2009-07-13 20:30:36.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/blkidP.h 2009-07-16 00:40:13.000000000 +0200 -@@ -223,7 +223,7 @@ struct blkid_struct_cache - extern char *blkid_strdup(const char *s); - extern char *blkid_strndup(const char *s, const int length); +diff -up util-linux-ng-2.17-git5e51568/shlibs/blkid/src/blkidP.h.kzak util-linux-ng-2.17-git5e51568/shlibs/blkid/src/blkidP.h +--- util-linux-ng-2.17-git5e51568/shlibs/blkid/src/blkidP.h.kzak 2009-10-16 22:50:03.000000000 +0200 ++++ util-linux-ng-2.17-git5e51568/shlibs/blkid/src/blkidP.h 2009-10-19 14:32:03.000000000 +0200 +@@ -267,7 +267,7 @@ extern char *blkid_strconcat(const char + extern int blkid_fstatat(DIR *dir, const char *dirname, const char *filename, + struct stat *st, int nofollow); -#define BLKID_CACHE_FILE "/etc/blkid.tab" +#define BLKID_CACHE_FILE "/etc/blkid/blkid.tab" diff --git a/util-linux-ng-2.16-blkid-swsuspend.patch b/util-linux-ng-2.16-blkid-swsuspend.patch deleted file mode 100644 index f9f4bf1..0000000 --- a/util-linux-ng-2.16-blkid-swsuspend.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 71cd5d8a775d98e93f7583210a5b53c52b4ec34f Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 14 Sep 2009 10:24:07 +0200 -Subject: [PATCH] libblkid: fix typo (swsupend -> swsuspend) - -Signed-off-by: Karel Zak ---- - shlibs/blkid/src/probers/swap.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/shlibs/blkid/src/probers/swap.c b/shlibs/blkid/src/probers/swap.c -index 86eb94c..c289488 100644 ---- a/shlibs/blkid/src/probers/swap.c -+++ b/shlibs/blkid/src/probers/swap.c -@@ -118,7 +118,7 @@ const struct blkid_idinfo swap_idinfo = - - const struct blkid_idinfo swsuspend_idinfo = - { -- .name = "swsupend", -+ .name = "swsuspend", - .usage = BLKID_USAGE_OTHER, - .probefunc = probe_swsuspend, - .magics = --- -1.6.2.5 - diff --git a/util-linux-ng-2.16-libblkid-compression.patch b/util-linux-ng-2.16-libblkid-compression.patch deleted file mode 100644 index 111d793..0000000 --- a/util-linux-ng-2.16-libblkid-compression.patch +++ /dev/null @@ -1,57 +0,0 @@ -From e94e99523d8a3d0218fe16b0a7a2c5886ccbc652 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Sun, 23 Aug 2009 20:33:10 +0200 -Subject: [PATCH] libblkid: add *.ko.gz support to modules.dep parser - -Address-Red-Hat-Bug: #518572 -Signed-off-by: Karel Zak ---- - shlibs/blkid/src/probers/ext.c | 18 +++++++++--------- - 1 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/shlibs/blkid/src/probers/ext.c b/shlibs/blkid/src/probers/ext.c -index a4d35d1..c27411d 100644 ---- a/shlibs/blkid/src/probers/ext.c -+++ b/shlibs/blkid/src/probers/ext.c -@@ -224,8 +224,8 @@ static int check_for_modules(const char *fs_name) - #ifdef __linux__ - struct utsname uts; - FILE *f; -- char buf[1024], *cp, *t; -- int i; -+ char buf[1024], *cp; -+ int namesz; - - if (uname(&uts)) - return 0; -@@ -234,6 +234,9 @@ static int check_for_modules(const char *fs_name) - f = fopen(buf, "r"); - if (!f) - return 0; -+ -+ namesz = strlen(fs_name); -+ - while (!feof(f)) { - if (!fgets(buf, sizeof(buf), f)) - break; -@@ -244,13 +247,10 @@ static int check_for_modules(const char *fs_name) - if ((cp = strrchr(buf, '/')) == NULL) - continue; - cp++; -- i = strlen(cp); -- if (i > 3) { -- t = cp + i - 3; -- if (!strcmp(t, ".ko")) -- *t = 0; -- } -- if (!strcmp(cp, fs_name)) { -+ -+ if (!strncmp(cp, fs_name, namesz) && -+ (!strcmp(cp + namesz, ".ko") || -+ !strcmp(cp + namesz, ".ko.gz"))) { - fclose(f); - return 1; - } --- -1.6.2.5 - diff --git a/util-linux-ng-2.16-libblkid-ext2.patch b/util-linux-ng-2.16-libblkid-ext2.patch deleted file mode 100644 index 85cb6e0..0000000 --- a/util-linux-ng-2.16-libblkid-ext2.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 92cf3ab964266603cf36272d0eec96cd07fa083c Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 13 Aug 2009 21:55:43 +0200 -Subject: [PATCH] libblkid: fix ext2 detection on systems with ext4 only - -Address-Red-Hat-Bug: #513104 -Signed-off-by: Karel Zak ---- - shlibs/blkid/src/probers/ext.c | 12 ++++++------ - 1 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/shlibs/blkid/src/probers/ext.c b/shlibs/blkid/src/probers/ext.c -index 671e556..a4d35d1 100644 ---- a/shlibs/blkid/src/probers/ext.c -+++ b/shlibs/blkid/src/probers/ext.c -@@ -483,11 +483,6 @@ static int probe_ext4(blkid_probe pr, const struct blkid_idmag *mag) - if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) - return -BLKID_ERR_PARAM; - -- /* Ext4 has at least one feature which ext3 doesn't understand */ -- if (!(frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) && -- !(fi & EXT3_FEATURE_INCOMPAT_UNSUPPORTED)) -- return -BLKID_ERR_PARAM; -- - /* - * If the filesystem does not have a journal and ext2 is not - * present, then force this to be detected as an ext2 -@@ -498,6 +493,12 @@ static int probe_ext4(blkid_probe pr, const struct blkid_idmag *mag) - get_linux_version() >= EXT4_SUPPORTS_EXT2) - goto force_ext4; - -+ /* Ext4 has at least one feature which ext3 doesn't understand */ -+ if (!(frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) && -+ !(fi & EXT3_FEATURE_INCOMPAT_UNSUPPORTED)) -+ return -BLKID_ERR_PARAM; -+ -+force_ext4: - /* - * If the filesystem is a OK for use by in-development - * filesystem code, and ext4dev is supported or ext4 is not -@@ -513,7 +514,6 @@ static int probe_ext4(blkid_probe pr, const struct blkid_idmag *mag) - return -BLKID_ERR_PARAM; - } - --force_ext4: - ext_get_info(pr, 4, es); - return 0; - } --- -1.6.2.5 - diff --git a/util-linux-ng-2.16-switchroot-tty.patch b/util-linux-ng-2.16-switchroot-tty.patch deleted file mode 100644 index 14ee89f..0000000 --- a/util-linux-ng-2.16-switchroot-tty.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -up util-linux-ng-2.16/sys-utils/switch_root.c.kzak util-linux-ng-2.16/sys-utils/switch_root.c ---- util-linux-ng-2.16/sys-utils/switch_root.c.kzak 2009-10-01 21:01:31.000000000 +0200 -+++ util-linux-ng-2.16/sys-utils/switch_root.c 2009-10-01 21:01:52.000000000 +0200 -@@ -267,13 +267,6 @@ int main(int argc, char *argv[]) - if (access(init, X_OK)) - warn("cannot access %s", init); - -- /* get session leader */ -- setsid(); -- -- /* set controlling terminal */ -- if (ioctl (0, TIOCSCTTY, 1)) -- warn("failed to TIOCSCTTY"); -- - execv(init, initargs); - err(EXIT_FAILURE, "failed to execute %s", init); - } diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 3580539..af96755 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,14 +1,15 @@ +%define snapshot_hash git5e51568 +%define upstream_version %{version}-%{snapshot_hash} + ### Header Summary: A collection of basic system utilities Name: util-linux-ng -Version: 2.16 -Release: 13%{?dist} +Version: 2.17 +Release: 0.1.%{snapshot_hash}%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng -%define upstream_version %{version} - ### Features %if 0%{?rhel} %define include_raw 1 @@ -90,8 +91,6 @@ Patch2: util-linux-ng-2.13-floppy-generic.patch ### Fedora/RHEL specific patches -- need to die! ### -# remove partitions -Patch3: util-linux-ng-2.14-blockdev-rmpart.patch # 199745 - Non-existant simpleinit(8) mentioned in ctrlaltdel(8) Patch4: util-linux-ng-2.13-ctrlaltdel-man.patch # /etc/blkid.tab --> /etc/blkid/blkid.tab @@ -104,19 +103,6 @@ Patch7: util-linux-ng-2.13-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux Patch8: util-linux-ng-2.15-ipcs-32bit.patch -### Upstream patches -### -# 513104 - blkid returns no fstype for ext2 device when ext2 module not loaded -Patch9: util-linux-ng-2.16-libblkid-ext2.patch -# 518572 - blkid requires ext2.ko to be decompressed on installation media -Patch10: util-linux-ng-2.16-libblkid-compression.patch -# 522718 - sfdisk -d /dev/xxx | sfdisk --force /dev/yyy fails when LANG is set -Patch11: util-linux-ng-2.14-sfdisk-dump.patch -# Swsuspend does not work -Patch12: util-linux-ng-2.16-blkid-swsuspend.patch -# 519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device -Patch13: util-linux-ng-2.16-switchroot-tty.patch - %description The util-linux-ng package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -205,16 +191,10 @@ cp %{SOURCE8} %{SOURCE9} . %patch0 -p1 %patch1 -p1 %patch2 -p1 -%patch3 -p1 %patch4 -p1 %patch5 -p1 %patch7 -p1 %patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 %build unset LINGUAS || : @@ -236,7 +216,6 @@ export SUID_LDFLAGS="-pie" %endif --with-selinux \ --with-audit \ - --with-fsprobe=builtin \ --disable-makeinstall-chown # build util-linux-ng @@ -531,6 +510,7 @@ fi /sbin/swapoff /sbin/swapon /sbin/switch_root +/sbin/wipefs %{_bindir}/cal %{_bindir}/chrt @@ -539,6 +519,7 @@ fi %{_bindir}/colrm %{_bindir}/column %{_bindir}/ddate +%{_bindir}/fallocate %{_bindir}/flock %{_bindir}/getopt %{_bindir}/hexdump @@ -563,6 +544,7 @@ fi %{_bindir}/setterm %{_bindir}/tailf %{_bindir}/ul +%{_bindir}/unshare %{_bindir}/uuidgen %{_bindir}/whereis @@ -582,6 +564,7 @@ fi %{_mandir}/man1/column.1* %{_mandir}/man1/ddate.1* %{_mandir}/man1/dmesg.1* +%{_mandir}/man1/fallocate.1* %{_mandir}/man1/flock.1* %{_mandir}/man1/getopt.1* %{_mandir}/man1/hexdump.1* @@ -608,6 +591,7 @@ fi %{_mandir}/man1/tailf.1* %{_mandir}/man1/taskset.1* %{_mandir}/man1/ul.1* +%{_mandir}/man1/unshare.1* %{_mandir}/man1/uuidgen.1* %{_mandir}/man1/whereis.1* %{_mandir}/man1/write.1* @@ -638,6 +622,7 @@ fi %{_mandir}/man8/swapon.8* %{_mandir}/man8/switch_root.8* %{_mandir}/man8/umount.8* +%{_mandir}/man8/wipefs.8* %if %{include_raw} /bin/raw @@ -725,6 +710,19 @@ fi %changelog +* Mon Oct 19 2009 Karel Zak 2.17-0.1.git5e51568 +- upgrade to pre-release snapshot (official changelog not available yet, see + http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for now) +- new commands: fallocate, unshare, wipefs +- libblkid supports topology and partitions probing +- remove support for --rmpart[s] from blockdev(8) (util-linux-ng-2.14-blockdev-rmpart.patch) +- merged upstream: + util-linux-ng-2.14-sfdisk-dump.patch + util-linux-ng-2.16-blkid-swsuspend.patch + util-linux-ng-2.16-libblkid-compression.patch + util-linux-ng-2.16-libblkid-ext2.patch + util-linux-ng-2.16-switchroot-tty.patch + * Mon Oct 5 2009 Karel Zak 2.16-13 - fix spec file From ad52cd8da8a9160dc14c01d92651b3dafdee90c8 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 10 Nov 2009 21:53:41 +0000 Subject: [PATCH 08/48] - upgrade to pre-release snapshot (official changelog not available yet, see http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for now) --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index 63a7a76..1429709 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.17-git5e51568.tar.bz2 +util-linux-ng-2.17-git10dfc39.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index 7ea3e08..bc6eca5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -d17141b5dabf4605b1c1db4cf8cff38a util-linux-ng-2.17-git5e51568.tar.bz2 +58b7042930a754edd9979228f0b174be util-linux-ng-2.17-git10dfc39.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index af96755..f5cca87 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,11 +1,11 @@ -%define snapshot_hash git5e51568 +%define snapshot_hash git10dfc39 %define upstream_version %{version}-%{snapshot_hash} ### Header Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 0.1.%{snapshot_hash}%{?dist} +Release: 0.2.%{snapshot_hash}%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -710,6 +710,10 @@ fi %changelog +* Tue Nov 10 2009 Karel Zak 2.17-0.2.git10dfc39 +- upgrade to pre-release snapshot (official changelog not available yet, see + http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for now) + * Mon Oct 19 2009 Karel Zak 2.17-0.1.git5e51568 - upgrade to pre-release snapshot (official changelog not available yet, see http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for now) From ad59cd7228043a6b79b1fa43be80ff582849b4db Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 23 Nov 2009 12:34:10 +0000 Subject: [PATCH 09/48] - upgrade to 2.17-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc1-Chan geLog --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 10 +++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 1429709..eb48652 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.17-git10dfc39.tar.bz2 +util-linux-ng-2.17-rc1.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index bc6eca5..a5e41cf 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -58b7042930a754edd9979228f0b174be util-linux-ng-2.17-git10dfc39.tar.bz2 +320a6bab5cc8f70f6b9ad0c05a6fe67f util-linux-ng-2.17-rc1.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index f5cca87..833ced1 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,11 +1,10 @@ -%define snapshot_hash git10dfc39 -%define upstream_version %{version}-%{snapshot_hash} +%define upstream_version %{version}-rc1 ### Header Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 0.2.%{snapshot_hash}%{?dist} +Release: 0.3%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -206,6 +205,7 @@ export SUID_LDFLAGS="-pie" --bindir=/bin \ --sbindir=/sbin \ --libdir=/%{_lib} \ + --disable-silent-rules \ --disable-wall \ --enable-partx \ --enable-login-utils \ @@ -710,6 +710,10 @@ fi %changelog +* Mon Nov 23 2009 Karel Zak 2.17-0.3 +- upgrade to 2.17-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc1-ChangeLog + * Tue Nov 10 2009 Karel Zak 2.17-0.2.git10dfc39 - upgrade to pre-release snapshot (official changelog not available yet, see http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for now) From 0b5b5047d566325af70296108db3832b7c3d487b Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 22:52:48 +0000 Subject: [PATCH 10/48] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c0f296d..c5d5fa9 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: util-linux-ng -# $Id$ +# $Id: Makefile,v 1.1 2007/08/17 21:07:02 wtogami Exp $ NAME := util-linux-ng SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 7dda70690df66fe315e4efc6aab2f62bc33ea22e Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:16:35 +0000 Subject: [PATCH 11/48] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c0f296d..c5d5fa9 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: util-linux-ng -# $Id$ +# $Id: Makefile,v 1.1 2007/08/17 21:07:02 wtogami Exp $ NAME := util-linux-ng SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From a2ebc32935a90f732bb21f84457cedb9e266761b Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 30 Nov 2009 11:19:21 +0000 Subject: [PATCH 12/48] - fix #539325 - fix VIA RAID detection - fix #541708 - libblkid does not recognize ufs partitions --- util-linux-ng-2.16-libblkid-packed.patch | 382 +++++++++++++++++++++++ util-linux-ng.spec | 10 +- 2 files changed, 391 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-2.16-libblkid-packed.patch diff --git a/util-linux-ng-2.16-libblkid-packed.patch b/util-linux-ng-2.16-libblkid-packed.patch new file mode 100644 index 0000000..9b22608 --- /dev/null +++ b/util-linux-ng-2.16-libblkid-packed.patch @@ -0,0 +1,382 @@ + + This is based on upstream commits: + + e7fee5520542fcfc6375e4ec1ffc1601971c937c - libblkid: fix UFS detection + 11854e2eff8b15411bbbc35c95dc77d6a722cc6b - libblkid: add missing packed attributes + + +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/adaptec_raid.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/adaptec_raid.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/adaptec_raid.c.kzak 2009-07-04 01:20:02.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/adaptec_raid.c 2009-11-30 12:06:14.000000000 +0100 +@@ -67,7 +67,7 @@ struct adaptec_metadata { + uint32_t raidtbl; + uint16_t raidline; + uint8_t res9[0xF6]; +-}; ++} __attribute__((packed)); + + #define AD_SIGNATURE "DPTM" + #define AD_MAGIC 0x37FC4D1E +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/cramfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/cramfs.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/cramfs.c.kzak 2009-07-04 01:20:02.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/cramfs.c 2009-11-30 12:06:14.000000000 +0100 +@@ -30,9 +30,9 @@ struct cramfs_super + uint32_t edition; + uint32_t blocks; + uint32_t files; +- } info; ++ } __attribute__((packed)) info; + uint8_t name[16]; +-}; ++} __attribute__((packed)); + + static int probe_cramfs(blkid_probe pr, const struct blkid_idmag *mag) + { +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/ext.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/ext.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/ext.c.kzak 2009-11-30 11:59:36.000000000 +0100 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/ext.c 2009-11-30 12:06:14.000000000 +0100 +@@ -76,7 +76,7 @@ struct ext2_super_block { + uint64_t s_mmp_block; + uint32_t s_raid_stripe_width; + uint32_t s_reserved[163]; +-}; ++} __attribute__((packed)); + + /* magic string */ + #define EXT_SB_MAGIC "\123\357" +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/gfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/gfs.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/gfs.c.kzak 2009-07-04 01:20:03.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/gfs.c 2009-11-30 12:06:14.000000000 +0100 +@@ -56,7 +56,7 @@ struct gfs2_sb { + struct gfs2_inum __pad3; /* Was quota inode in gfs1 */ + struct gfs2_inum __pad4; /* Was licence inode in gfs1 */ + uint8_t sb_uuid[16]; /* The UUID maybe 0 for backwards compat */ +-}; ++} __attribute__((packed)); + + static int probe_gfs(blkid_probe pr, const struct blkid_idmag *mag) + { +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/hpfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/hpfs.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/hpfs.c.kzak 2009-07-04 01:20:03.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/hpfs.c 2009-11-30 12:06:14.000000000 +0100 +@@ -39,20 +39,20 @@ struct hpfs_boot_block + uint8_t sig_hpfs[8]; + uint8_t pad[448]; + uint8_t magic[2]; +-}; ++} __attribute__((packed)); + + struct hpfs_super_block + { + uint8_t magic[4]; + uint8_t magic1[4]; + uint8_t version; +-}; ++} __attribute__((packed)); + + struct hpfs_spare_super + { + uint8_t magic[4]; + uint8_t magic1[4]; +-}; ++} __attribute__((packed)); + + + #define HPFS_SB_OFFSET 0x2000 +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/iso9660.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/iso9660.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/iso9660.c.kzak 2009-11-30 11:59:36.000000000 +0100 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/iso9660.c 2009-11-30 12:06:14.000000000 +0100 +@@ -30,7 +30,7 @@ struct iso_volume_descriptor { + unsigned char unused[8]; + unsigned char space_size[8]; + unsigned char escape_sequences[8]; +-}; ++} __attribute__((packed)); + + #define ISO_SUPERBLOCK_OFFSET 0x8000 + #define ISO_SECTOR_SIZE 0x800 +@@ -47,7 +47,7 @@ struct high_sierra_volume_descriptor { + unsigned char unused1; + unsigned char system_id[32]; + unsigned char volume_id[32]; +-}; ++} __attribute__((packed)); + + /* returns 1 if the begin of @ascii is equal to @utf16 string. + */ +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/luks.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/luks.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/luks.c.kzak 2009-07-04 01:20:03.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/luks.c 2009-11-30 12:06:14.000000000 +0100 +@@ -37,7 +37,7 @@ struct luks_phdr { + uint8_t mkDigestSalt[LUKS_SALTSIZE]; + uint32_t mkDigestIterations; + uint8_t uuid[UUID_STRING_L]; +-}; ++} __attribute__((packed)); + + static int probe_luks(blkid_probe pr, const struct blkid_idmag *mag) + { +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/ntfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/ntfs.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/ntfs.c.kzak 2009-07-04 01:20:02.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/ntfs.c 2009-11-30 12:06:14.000000000 +0100 +@@ -27,7 +27,7 @@ struct ntfs_super_block { + uint8_t reserved2[3]; + uint64_t volume_serial; + uint16_t checksum; +-}; ++} __attribute__((packed)); + + struct master_file_table_record { + uint32_t magic; +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/nvidia_raid.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/nvidia_raid.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/nvidia_raid.c.kzak 2009-07-04 01:20:02.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/nvidia_raid.c 2009-11-30 12:06:14.000000000 +0100 +@@ -21,7 +21,7 @@ struct nv_metadata { + uint32_t size; + uint32_t chksum; + uint16_t version; +-}; ++} __attribute__((packed)); + + #define NVIDIA_SIGNATURE "NVIDIA" + +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/reiserfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/reiserfs.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/reiserfs.c.kzak 2009-07-04 01:20:02.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/reiserfs.c 2009-11-30 12:06:14.000000000 +0100 +@@ -28,7 +28,7 @@ struct reiserfs_super_block { + uint32_t rs_dummy4[5]; + unsigned char rs_uuid[16]; + char rs_label[16]; +-}; ++} __attribute__((packed)); + + struct reiser4_super_block { + unsigned char rs4_magic[16]; +@@ -36,7 +36,7 @@ struct reiser4_super_block { + unsigned char rs4_uuid[16]; + unsigned char rs4_label[16]; + uint64_t rs4_dummy2; +-}; ++} __attribute__((packed)); + + static int probe_reiser(blkid_probe pr, const struct blkid_idmag *mag) + { +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/romfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/romfs.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/romfs.c.kzak 2009-07-04 01:20:03.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/romfs.c 2009-11-30 12:06:14.000000000 +0100 +@@ -21,7 +21,7 @@ struct romfs_super_block { + unsigned char ros_magic[8]; + uint32_t ros_dummy1[2]; + unsigned char ros_volume[16]; +-}; ++} __attribute__((packed)); + + static int probe_romfs(blkid_probe pr, const struct blkid_idmag *mag) + { +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/silicon_raid.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/silicon_raid.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/silicon_raid.c.kzak 2009-07-04 01:20:02.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/silicon_raid.c 2009-11-30 12:06:14.000000000 +0100 +@@ -35,7 +35,7 @@ struct silicon_metadata { + uint16_t vendor_id; + uint16_t minor_ver; + uint16_t major_ver; +-}; ++} __attribute__((packed)); + + #define SILICON_MAGIC 0x2F000000 + +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/squashfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/squashfs.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/squashfs.c.kzak 2009-07-04 01:20:02.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/squashfs.c 2009-11-30 12:06:14.000000000 +0100 +@@ -26,7 +26,7 @@ struct sqsh_super_block { + uint32_t directory_table_start_2; + uint16_t s_major; + uint16_t s_minor; +-}; ++} __attribute__((packed)); + + static int probe_squashfs(blkid_probe pr, const struct blkid_idmag *mag) + { +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/swap.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/swap.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/swap.c.kzak 2009-11-30 11:59:36.000000000 +0100 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/swap.c 2009-11-30 12:06:14.000000000 +0100 +@@ -28,7 +28,7 @@ struct swap_header_v1_2 { + unsigned char volume[16]; + uint32_t padding[117]; + uint32_t badpages[1]; +-}; ++} __attribute__((packed)); + + #define PAGESIZE_MIN 0xff6 /* 4086 (arm, i386, ...) */ + #define PAGESIZE_MAX 0xfff6 /* 65526 (ia64) */ +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/sysv.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/sysv.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/sysv.c.kzak 2009-07-04 01:20:02.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/sysv.c 2009-11-30 12:06:14.000000000 +0100 +@@ -39,7 +39,7 @@ struct xenix_super_block { + uint8_t s_fill[371]; + uint32_t s_magic; + uint32_t s_type; +-}; ++} __attribute__((packed)); + + + #define SYSV_NICINOD 100 +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/udf.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/udf.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/udf.c.kzak 2009-07-04 01:20:03.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/udf.c 2009-11-30 12:06:14.000000000 +0100 +@@ -28,28 +28,32 @@ struct volume_descriptor { + uint16_t crc; + uint16_t crc_len; + uint32_t location; +- } tag; ++ } __attribute__((packed)) tag; ++ + union { + struct anchor_descriptor { + uint32_t length; + uint32_t location; +- } anchor; ++ } __attribute__((packed)) anchor; ++ + struct primary_descriptor { + uint32_t seq_num; + uint32_t desc_num; + struct dstring { + uint8_t clen; + uint8_t c[31]; +- } ident; +- } primary; +- } type; +-}; ++ } __attribute__((packed)) ident; ++ } __attribute__((packed)) primary; ++ ++ } __attribute__((packed)) type; ++ ++} __attribute__((packed)); + + struct volume_structure_descriptor { + uint8_t type; + uint8_t id[5]; + uint8_t version; +-}; ++} __attribute__((packed)); + + #define UDF_VSD_OFFSET 0x8000 + +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/ufs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/ufs.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/ufs.c.kzak 2009-07-04 01:20:03.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/ufs.c 2009-11-30 12:06:50.000000000 +0100 +@@ -117,7 +117,7 @@ struct ufs_super_block { + uint64_t fs_csaddr; + int64_t fs_pendingblocks; + int32_t fs_pendinginodes; +- } fs_u2; ++ } __attribute__((packed)) fs_u2; + } fs_u11; + union { + struct { +@@ -153,17 +153,22 @@ struct ufs_super_block { + int32_t fs_rotbloff; + uint32_t fs_magic; + uint8_t fs_space[1]; +-}; ++} __attribute__((packed)); + + #define UFS_MAGIC 0x00011954 + #define UFS2_MAGIC 0x19540119 + #define UFS_MAGIC_FEA 0x00195612 + #define UFS_MAGIC_LFN 0x00095014 ++#define UFS_MAGIC_SEC 0x00612195 ++#define UFS_MAGIC_4GB 0x05231994 + + static int probe_ufs(blkid_probe pr, const struct blkid_idmag *mag) + { + int offsets[] = { 0, 8, 64, 256 }; +- int mags[] = { UFS2_MAGIC, UFS_MAGIC, UFS_MAGIC_FEA, UFS_MAGIC_LFN }; ++ int mags[] = { ++ UFS2_MAGIC, UFS_MAGIC, UFS_MAGIC_FEA, UFS_MAGIC_LFN, ++ UFS_MAGIC_SEC, UFS_MAGIC_4GB ++ }; + int i; + uint32_t magic; + struct ufs_super_block *ufs; +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/vfat.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/vfat.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/vfat.c.kzak 2009-07-04 01:20:02.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/vfat.c 2009-11-30 12:06:14.000000000 +0100 +@@ -47,7 +47,7 @@ struct vfat_super_block { + /* 52*/ unsigned char vs_magic[8]; + /* 5a*/ unsigned char vs_dummy2[164]; + /*1fe*/ unsigned char vs_pmagic[2]; +-}; ++} __attribute__((packed)); + + /* Yucky misaligned values */ + struct msdos_super_block { +@@ -71,7 +71,7 @@ struct msdos_super_block { + /* 36*/ unsigned char ms_magic[8]; + /* 3d*/ unsigned char ms_dummy2[192]; + /*1fe*/ unsigned char ms_pmagic[2]; +-}; ++} __attribute__((packed)); + + struct vfat_dir_entry { + uint8_t name[11]; +@@ -85,7 +85,7 @@ struct vfat_dir_entry { + uint16_t date_write; + uint16_t cluster_low; + uint32_t size; +-}; ++} __attribute__((packed)); + + struct fat32_fsinfo { + uint8_t signature1[4]; +@@ -94,7 +94,7 @@ struct fat32_fsinfo { + uint32_t free_clusters; + uint32_t next_cluster; + uint32_t reserved2[4]; +-}; ++} __attribute__((packed)); + + /* maximum number of clusters */ + #define FAT12_MAX 0xFF4 +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/via_raid.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/via_raid.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/via_raid.c.kzak 2009-07-04 01:20:02.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/via_raid.c 2009-11-30 12:06:14.000000000 +0100 +@@ -27,10 +27,10 @@ struct via_metadata { + uint32_t capacity_low; + uint32_t capacity_high; + uint32_t serial_checksum; +- } array; ++ } __attribute__((packed)) array; + uint32_t serial_checksum[8]; + uint8_t checksum; +-}; ++} __attribute__((packed)); + + #define VIA_SIGNATURE 0xAA55 + +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/xfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/xfs.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/xfs.c.kzak 2009-07-04 01:20:02.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/xfs.c 2009-11-30 12:06:14.000000000 +0100 +@@ -32,7 +32,7 @@ struct xfs_super_block { + uint64_t xs_icount; + uint64_t xs_ifree; + uint64_t xs_fdblocks; +-}; ++} __attribute__((packed)); + + static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag) + { +diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/zfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/zfs.c +--- util-linux-ng-2.16/shlibs/blkid/src/probers/zfs.c.kzak 2009-07-04 01:20:02.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/probers/zfs.c 2009-11-30 12:06:14.000000000 +0100 +@@ -24,7 +24,7 @@ struct zfs_uberblock { + uint64_t ub_guid_sum; /* sum of all vdev guids */ + uint64_t ub_timestamp; /* UTC time of last sync */ + /*blkptr_t ub_rootbp;*/ /* MOS objset_phys_t */ +-}; ++} __attribute__((packed)); + + static int probe_zfs(blkid_probe pr, const struct blkid_idmag *mag) + { diff --git a/util-linux-ng.spec b/util-linux-ng.spec index b0208c3..96cdce7 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 10.2%{?dist} +Release: 10.3%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -118,6 +118,9 @@ Patch12: util-linux-ng-2.16-blkid-swsuspend.patch Patch13: util-linux-ng-2.16-libblkid-joliet.patch # 519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device Patch14: util-linux-ng-2.16-switchroot-tty.patch +# 539325 - fix VIA RAID detection +# 541708 - libblkid does not recognize ufs partitions +Patch15: util-linux-ng-2.16-libblkid-packed.patch %description The util-linux-ng package contains a large variety of low-level system @@ -218,6 +221,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch12 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 %build unset LINGUAS || : @@ -728,6 +732,10 @@ fi %changelog +* Mon Nov 30 2009 Karel Zak 2.16-10.3 +- fix #539325 - fix VIA RAID detection +- fix #541708 - libblkid does not recognize ufs partitions + * Mon Oct 5 2009 Karel Zak 2.16-10.2 - fix #519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device From 7cf27511292f70b616786b69e9a392dbe5873a0f Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 7 Dec 2009 08:58:40 +0000 Subject: [PATCH 13/48] - upgrade to 2.16.2 (removes 7 patches) ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.16/v2.16.2-Releas eNotes - fix #531992 - not prompted for passphrase --- .cvsignore | 2 +- sources | 2 +- util-linux-ng-2.14-sfdisk-dump.patch | 54 --- util-linux-ng-2.16-blkid-crypto.path | 41 ++ util-linux-ng-2.16-blkid-swsuspend.patch | 26 -- util-linux-ng-2.16-libblkid-compression.patch | 57 --- util-linux-ng-2.16-libblkid-ext2.patch | 51 --- util-linux-ng-2.16-libblkid-joliet.patch | 118 ------ util-linux-ng-2.16-libblkid-packed.patch | 382 ------------------ util-linux-ng-2.16-switchroot-tty.patch | 17 - util-linux-ng.spec | 33 +- 11 files changed, 52 insertions(+), 731 deletions(-) delete mode 100644 util-linux-ng-2.14-sfdisk-dump.patch create mode 100644 util-linux-ng-2.16-blkid-crypto.path delete mode 100644 util-linux-ng-2.16-blkid-swsuspend.patch delete mode 100644 util-linux-ng-2.16-libblkid-compression.patch delete mode 100644 util-linux-ng-2.16-libblkid-ext2.patch delete mode 100644 util-linux-ng-2.16-libblkid-joliet.patch delete mode 100644 util-linux-ng-2.16-libblkid-packed.patch delete mode 100644 util-linux-ng-2.16-switchroot-tty.patch diff --git a/.cvsignore b/.cvsignore index df25c4e..f38fe5c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.16.tar.bz2 +util-linux-ng-2.16.2.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index f0be7b2..22eb2d3 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -9623380641b0c2e0449f5b1ecc567663 util-linux-ng-2.16.tar.bz2 +edd1f7a82fd388cc0e1e3d2d1e7ea55a util-linux-ng-2.16.2.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng-2.14-sfdisk-dump.patch b/util-linux-ng-2.14-sfdisk-dump.patch deleted file mode 100644 index 89a644c..0000000 --- a/util-linux-ng-2.14-sfdisk-dump.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 1f1614f6a89de4b06e1843d0fadbca3f8a5521fe Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Fri, 11 Sep 2009 14:00:50 +0200 -Subject: [PATCH 1/2] sfdisk: dump has to be $LANG insensitive - -This stupid bug has been introduced by: - - commit add5133f4ad5136aac3ce7627e615d14893d0aeb - Author: Pedro Ribeiro - Date: Fri Oct 3 08:52:35 2008 +0200 - fdisk: several strings without gettext calls - -... so it shows that we need to improve our review process... :-( - -Address-Red-Hat-Bug: #522718 -Signed-off-by: Karel Zak ---- - fdisk/sfdisk.c | 10 +++++----- - 1 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c -index 8fae5bb..427cb40 100644 ---- a/fdisk/sfdisk.c -+++ b/fdisk/sfdisk.c -@@ -930,8 +930,8 @@ get_disksize(int format) { - static void - out_partition_header(char *dev, int format, struct geometry G) { - if (dump) { -- printf(_("# partition table of %s\n"), dev); -- printf(_("unit: sectors\n\n")); -+ printf("# partition table of %s\n", dev); -+ printf("unit: sectors\n\n"); - return; - } - -@@ -1059,12 +1059,12 @@ out_partition(char *dev, int format, struct part_desc *p, - size = p->size; - - if (dump) { -- printf(_(" start=%9lu"), start); -- printf(_(", size=%9lu"), size); -+ printf(" start=%9lu", start); -+ printf(", size=%9lu", size); - if (p->ptype == DOS_TYPE) { - printf(", Id=%2x", p->p.sys_type); - if (p->p.bootable == 0x80) -- printf(_(", bootable")); -+ printf(", bootable"); - } - printf("\n"); - return; --- -1.6.2.5 - diff --git a/util-linux-ng-2.16-blkid-crypto.path b/util-linux-ng-2.16-blkid-crypto.path new file mode 100644 index 0000000..65d6c10 --- /dev/null +++ b/util-linux-ng-2.16-blkid-crypto.path @@ -0,0 +1,41 @@ +From: Scott James Remnant +Subject: [PATCH] libblkid: return first detected crypto device + +Crypto devices may sometimes have multiple additional prober matches, +however just like RAID, there's no danger of activating the wrong one +since special help is needed to activate the block device before it +can be used. + +Thus modify blkid_do_safeprobe() to break out of the loop when a +crypto device is detected, as it does already for RAID. + +[kzak@redhar.com: - backport to 2.16.2 for Fedora-12] + +Signed-off-by: Scott James Remnant +Signed-off-by: Karel Zak + +diff -up util-linux-ng-2.16.2/shlibs/blkid/src/probe.c.kzak util-linux-ng-2.16.2/shlibs/blkid/src/probe.c +--- util-linux-ng-2.16.2/shlibs/blkid/src/probe.c.kzak 2009-12-07 09:44:46.000000000 +0100 ++++ util-linux-ng-2.16.2/shlibs/blkid/src/probe.c 2009-12-07 09:47:12.000000000 +0100 +@@ -538,9 +538,9 @@ int blkid_do_probe(blkid_probe pr) + * (cannot be used in while()) and checks for ambivalen results (more + * filesystems on the device) -- in such case returns -2. + * +- * The function does not check for filesystems when a RAID signature is +- * detected. The function also does not check for collision between RAIDs. The +- * first detected RAID is returned. ++ * The function does not check for filesystems when a RAID or crypto signature ++ * is detected. The function also does not check for collision between RAIDs ++ * and crypto devices. The first detected RAID or crypto device is returned. + */ + int blkid_do_safeprobe(blkid_probe pr) + { +@@ -558,7 +558,7 @@ int blkid_do_safeprobe(blkid_probe pr) + } + count++; + +- if (idinfos[pr->idx]->usage & BLKID_USAGE_RAID) ++ if (idinfos[pr->idx]->usage & (BLKID_USAGE_RAID | BLKID_USAGE_CRYPTO)) + break; + if (!(idinfos[pr->idx]->flags & BLKID_IDINFO_TOLERANT)) + intol++; diff --git a/util-linux-ng-2.16-blkid-swsuspend.patch b/util-linux-ng-2.16-blkid-swsuspend.patch deleted file mode 100644 index f9f4bf1..0000000 --- a/util-linux-ng-2.16-blkid-swsuspend.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 71cd5d8a775d98e93f7583210a5b53c52b4ec34f Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 14 Sep 2009 10:24:07 +0200 -Subject: [PATCH] libblkid: fix typo (swsupend -> swsuspend) - -Signed-off-by: Karel Zak ---- - shlibs/blkid/src/probers/swap.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/shlibs/blkid/src/probers/swap.c b/shlibs/blkid/src/probers/swap.c -index 86eb94c..c289488 100644 ---- a/shlibs/blkid/src/probers/swap.c -+++ b/shlibs/blkid/src/probers/swap.c -@@ -118,7 +118,7 @@ const struct blkid_idinfo swap_idinfo = - - const struct blkid_idinfo swsuspend_idinfo = - { -- .name = "swsupend", -+ .name = "swsuspend", - .usage = BLKID_USAGE_OTHER, - .probefunc = probe_swsuspend, - .magics = --- -1.6.2.5 - diff --git a/util-linux-ng-2.16-libblkid-compression.patch b/util-linux-ng-2.16-libblkid-compression.patch deleted file mode 100644 index 111d793..0000000 --- a/util-linux-ng-2.16-libblkid-compression.patch +++ /dev/null @@ -1,57 +0,0 @@ -From e94e99523d8a3d0218fe16b0a7a2c5886ccbc652 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Sun, 23 Aug 2009 20:33:10 +0200 -Subject: [PATCH] libblkid: add *.ko.gz support to modules.dep parser - -Address-Red-Hat-Bug: #518572 -Signed-off-by: Karel Zak ---- - shlibs/blkid/src/probers/ext.c | 18 +++++++++--------- - 1 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/shlibs/blkid/src/probers/ext.c b/shlibs/blkid/src/probers/ext.c -index a4d35d1..c27411d 100644 ---- a/shlibs/blkid/src/probers/ext.c -+++ b/shlibs/blkid/src/probers/ext.c -@@ -224,8 +224,8 @@ static int check_for_modules(const char *fs_name) - #ifdef __linux__ - struct utsname uts; - FILE *f; -- char buf[1024], *cp, *t; -- int i; -+ char buf[1024], *cp; -+ int namesz; - - if (uname(&uts)) - return 0; -@@ -234,6 +234,9 @@ static int check_for_modules(const char *fs_name) - f = fopen(buf, "r"); - if (!f) - return 0; -+ -+ namesz = strlen(fs_name); -+ - while (!feof(f)) { - if (!fgets(buf, sizeof(buf), f)) - break; -@@ -244,13 +247,10 @@ static int check_for_modules(const char *fs_name) - if ((cp = strrchr(buf, '/')) == NULL) - continue; - cp++; -- i = strlen(cp); -- if (i > 3) { -- t = cp + i - 3; -- if (!strcmp(t, ".ko")) -- *t = 0; -- } -- if (!strcmp(cp, fs_name)) { -+ -+ if (!strncmp(cp, fs_name, namesz) && -+ (!strcmp(cp + namesz, ".ko") || -+ !strcmp(cp + namesz, ".ko.gz"))) { - fclose(f); - return 1; - } --- -1.6.2.5 - diff --git a/util-linux-ng-2.16-libblkid-ext2.patch b/util-linux-ng-2.16-libblkid-ext2.patch deleted file mode 100644 index 85cb6e0..0000000 --- a/util-linux-ng-2.16-libblkid-ext2.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 92cf3ab964266603cf36272d0eec96cd07fa083c Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 13 Aug 2009 21:55:43 +0200 -Subject: [PATCH] libblkid: fix ext2 detection on systems with ext4 only - -Address-Red-Hat-Bug: #513104 -Signed-off-by: Karel Zak ---- - shlibs/blkid/src/probers/ext.c | 12 ++++++------ - 1 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/shlibs/blkid/src/probers/ext.c b/shlibs/blkid/src/probers/ext.c -index 671e556..a4d35d1 100644 ---- a/shlibs/blkid/src/probers/ext.c -+++ b/shlibs/blkid/src/probers/ext.c -@@ -483,11 +483,6 @@ static int probe_ext4(blkid_probe pr, const struct blkid_idmag *mag) - if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) - return -BLKID_ERR_PARAM; - -- /* Ext4 has at least one feature which ext3 doesn't understand */ -- if (!(frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) && -- !(fi & EXT3_FEATURE_INCOMPAT_UNSUPPORTED)) -- return -BLKID_ERR_PARAM; -- - /* - * If the filesystem does not have a journal and ext2 is not - * present, then force this to be detected as an ext2 -@@ -498,6 +493,12 @@ static int probe_ext4(blkid_probe pr, const struct blkid_idmag *mag) - get_linux_version() >= EXT4_SUPPORTS_EXT2) - goto force_ext4; - -+ /* Ext4 has at least one feature which ext3 doesn't understand */ -+ if (!(frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) && -+ !(fi & EXT3_FEATURE_INCOMPAT_UNSUPPORTED)) -+ return -BLKID_ERR_PARAM; -+ -+force_ext4: - /* - * If the filesystem is a OK for use by in-development - * filesystem code, and ext4dev is supported or ext4 is not -@@ -513,7 +514,6 @@ static int probe_ext4(blkid_probe pr, const struct blkid_idmag *mag) - return -BLKID_ERR_PARAM; - } - --force_ext4: - ext_get_info(pr, 4, es); - return 0; - } --- -1.6.2.5 - diff --git a/util-linux-ng-2.16-libblkid-joliet.patch b/util-linux-ng-2.16-libblkid-joliet.patch deleted file mode 100644 index 74d063e..0000000 --- a/util-linux-ng-2.16-libblkid-joliet.patch +++ /dev/null @@ -1,118 +0,0 @@ -diff -up util-linux-ng-2.16/shlibs/blkid/src/probe.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probe.c ---- util-linux-ng-2.16/shlibs/blkid/src/probe.c.kzak 2009-07-04 01:20:03.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probe.c 2009-10-02 20:53:33.000000000 +0200 -@@ -685,10 +685,27 @@ static int blkid_probe_set_usage(blkid_p - return blkid_probe_set_value(pr, "USAGE", (unsigned char *) u, strlen(u) + 1); - } - -+ -+/* Removes whitespace from the right-hand side of a string (trailing -+ * whitespace). -+ * -+ * Returns size of the new string (without \0). -+ */ -+static size_t blkid_rtrim_whitespace(unsigned char *str) -+{ -+ size_t i = strlen((char *) str); -+ -+ while (i--) { -+ if (!isspace(str[i])) -+ break; -+ } -+ str[++i] = '\0'; -+ return i; -+} -+ - int blkid_probe_set_label(blkid_probe pr, unsigned char *label, size_t len) - { - struct blkid_prval *v; -- int i; - - if (len > BLKID_PROBVAL_BUFSIZ) - len = BLKID_PROBVAL_BUFSIZ; -@@ -704,15 +721,7 @@ int blkid_probe_set_label(blkid_probe pr - - memcpy(v->data, label, len); - v->data[len] = '\0'; -- -- /* remove trailing whitespace */ -- i = strnlen((char *) v->data, len); -- while (i--) { -- if (!isspace(v->data[i])) -- break; -- } -- v->data[++i] = '\0'; -- v->len = i + 1; -+ v->len = blkid_rtrim_whitespace(v->data) + 1; - return 0; - } - -@@ -765,7 +774,8 @@ int blkid_probe_set_utf8label(blkid_prob - if (!v) - return -1; - -- v->len = encode_to_utf8(enc, v->data, sizeof(v->data), label, len); -+ encode_to_utf8(enc, v->data, sizeof(v->data), label, len); -+ v->len = blkid_rtrim_whitespace(v->data) + 1; - return 0; - } - -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/iso9660.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/iso9660.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/iso9660.c.kzak 2009-07-04 01:20:02.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/iso9660.c 2009-10-02 20:54:43.000000000 +0200 -@@ -19,6 +19,7 @@ - - #include "blkidP.h" - -+/* PVD - Primary volume descriptor */ - struct iso_volume_descriptor { - unsigned char vd_type; - unsigned char vd_id[5]; -@@ -48,6 +49,20 @@ struct high_sierra_volume_descriptor { - unsigned char volume_id[32]; - }; - -+/* returns 1 if the begin of @ascii is equal to @utf16 string. -+ */ -+static int ascii_eq_utf16be(unsigned char *ascii, -+ unsigned char *utf16, size_t len) -+{ -+ int a, u; -+ -+ for (a = 0, u = 0; u < len; a++, u += 2) { -+ if (utf16[u] != 0x0 || ascii[a] != utf16[u + 1]) -+ return 0; -+ } -+ return 1; -+} -+ - /* old High Sierra format */ - static int probe_iso9660_hsfs(blkid_probe pr, const struct blkid_idmag *mag) - { -@@ -82,8 +97,6 @@ static int probe_iso9660(blkid_probe pr, - /* Joliet Extension */ - off = ISO_VD_OFFSET; - for (i = 0; i < ISO_VD_MAX; i++) { -- uint8_t svd_label[64]; -- - iso = (struct iso_volume_descriptor *) - blkid_probe_get_buffer(pr, - off, -@@ -98,9 +111,16 @@ static int probe_iso9660(blkid_probe pr, - memcmp(iso->escape_sequences, "%/C", 3) == 0 || - memcmp(iso->escape_sequences, "%/E", 3) == 0) { - -+ /* Is the Joliet (UTF16BE) label equal to the label in -+ * the PVD? If yes, use PVD label. The Jolied version -+ * of the label could be trimed (because UTF16..). -+ */ -+ if (ascii_eq_utf16be(label, iso->volume_id, 32)) -+ break; -+ - blkid_probe_set_utf8label(pr, - iso->volume_id, -- sizeof(svd_label), -+ sizeof(iso->volume_id), - BLKID_ENC_UTF16BE); - - blkid_probe_set_version(pr, "Joliet Extension"); diff --git a/util-linux-ng-2.16-libblkid-packed.patch b/util-linux-ng-2.16-libblkid-packed.patch deleted file mode 100644 index 9b22608..0000000 --- a/util-linux-ng-2.16-libblkid-packed.patch +++ /dev/null @@ -1,382 +0,0 @@ - - This is based on upstream commits: - - e7fee5520542fcfc6375e4ec1ffc1601971c937c - libblkid: fix UFS detection - 11854e2eff8b15411bbbc35c95dc77d6a722cc6b - libblkid: add missing packed attributes - - -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/adaptec_raid.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/adaptec_raid.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/adaptec_raid.c.kzak 2009-07-04 01:20:02.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/adaptec_raid.c 2009-11-30 12:06:14.000000000 +0100 -@@ -67,7 +67,7 @@ struct adaptec_metadata { - uint32_t raidtbl; - uint16_t raidline; - uint8_t res9[0xF6]; --}; -+} __attribute__((packed)); - - #define AD_SIGNATURE "DPTM" - #define AD_MAGIC 0x37FC4D1E -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/cramfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/cramfs.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/cramfs.c.kzak 2009-07-04 01:20:02.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/cramfs.c 2009-11-30 12:06:14.000000000 +0100 -@@ -30,9 +30,9 @@ struct cramfs_super - uint32_t edition; - uint32_t blocks; - uint32_t files; -- } info; -+ } __attribute__((packed)) info; - uint8_t name[16]; --}; -+} __attribute__((packed)); - - static int probe_cramfs(blkid_probe pr, const struct blkid_idmag *mag) - { -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/ext.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/ext.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/ext.c.kzak 2009-11-30 11:59:36.000000000 +0100 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/ext.c 2009-11-30 12:06:14.000000000 +0100 -@@ -76,7 +76,7 @@ struct ext2_super_block { - uint64_t s_mmp_block; - uint32_t s_raid_stripe_width; - uint32_t s_reserved[163]; --}; -+} __attribute__((packed)); - - /* magic string */ - #define EXT_SB_MAGIC "\123\357" -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/gfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/gfs.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/gfs.c.kzak 2009-07-04 01:20:03.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/gfs.c 2009-11-30 12:06:14.000000000 +0100 -@@ -56,7 +56,7 @@ struct gfs2_sb { - struct gfs2_inum __pad3; /* Was quota inode in gfs1 */ - struct gfs2_inum __pad4; /* Was licence inode in gfs1 */ - uint8_t sb_uuid[16]; /* The UUID maybe 0 for backwards compat */ --}; -+} __attribute__((packed)); - - static int probe_gfs(blkid_probe pr, const struct blkid_idmag *mag) - { -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/hpfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/hpfs.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/hpfs.c.kzak 2009-07-04 01:20:03.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/hpfs.c 2009-11-30 12:06:14.000000000 +0100 -@@ -39,20 +39,20 @@ struct hpfs_boot_block - uint8_t sig_hpfs[8]; - uint8_t pad[448]; - uint8_t magic[2]; --}; -+} __attribute__((packed)); - - struct hpfs_super_block - { - uint8_t magic[4]; - uint8_t magic1[4]; - uint8_t version; --}; -+} __attribute__((packed)); - - struct hpfs_spare_super - { - uint8_t magic[4]; - uint8_t magic1[4]; --}; -+} __attribute__((packed)); - - - #define HPFS_SB_OFFSET 0x2000 -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/iso9660.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/iso9660.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/iso9660.c.kzak 2009-11-30 11:59:36.000000000 +0100 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/iso9660.c 2009-11-30 12:06:14.000000000 +0100 -@@ -30,7 +30,7 @@ struct iso_volume_descriptor { - unsigned char unused[8]; - unsigned char space_size[8]; - unsigned char escape_sequences[8]; --}; -+} __attribute__((packed)); - - #define ISO_SUPERBLOCK_OFFSET 0x8000 - #define ISO_SECTOR_SIZE 0x800 -@@ -47,7 +47,7 @@ struct high_sierra_volume_descriptor { - unsigned char unused1; - unsigned char system_id[32]; - unsigned char volume_id[32]; --}; -+} __attribute__((packed)); - - /* returns 1 if the begin of @ascii is equal to @utf16 string. - */ -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/luks.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/luks.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/luks.c.kzak 2009-07-04 01:20:03.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/luks.c 2009-11-30 12:06:14.000000000 +0100 -@@ -37,7 +37,7 @@ struct luks_phdr { - uint8_t mkDigestSalt[LUKS_SALTSIZE]; - uint32_t mkDigestIterations; - uint8_t uuid[UUID_STRING_L]; --}; -+} __attribute__((packed)); - - static int probe_luks(blkid_probe pr, const struct blkid_idmag *mag) - { -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/ntfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/ntfs.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/ntfs.c.kzak 2009-07-04 01:20:02.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/ntfs.c 2009-11-30 12:06:14.000000000 +0100 -@@ -27,7 +27,7 @@ struct ntfs_super_block { - uint8_t reserved2[3]; - uint64_t volume_serial; - uint16_t checksum; --}; -+} __attribute__((packed)); - - struct master_file_table_record { - uint32_t magic; -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/nvidia_raid.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/nvidia_raid.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/nvidia_raid.c.kzak 2009-07-04 01:20:02.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/nvidia_raid.c 2009-11-30 12:06:14.000000000 +0100 -@@ -21,7 +21,7 @@ struct nv_metadata { - uint32_t size; - uint32_t chksum; - uint16_t version; --}; -+} __attribute__((packed)); - - #define NVIDIA_SIGNATURE "NVIDIA" - -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/reiserfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/reiserfs.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/reiserfs.c.kzak 2009-07-04 01:20:02.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/reiserfs.c 2009-11-30 12:06:14.000000000 +0100 -@@ -28,7 +28,7 @@ struct reiserfs_super_block { - uint32_t rs_dummy4[5]; - unsigned char rs_uuid[16]; - char rs_label[16]; --}; -+} __attribute__((packed)); - - struct reiser4_super_block { - unsigned char rs4_magic[16]; -@@ -36,7 +36,7 @@ struct reiser4_super_block { - unsigned char rs4_uuid[16]; - unsigned char rs4_label[16]; - uint64_t rs4_dummy2; --}; -+} __attribute__((packed)); - - static int probe_reiser(blkid_probe pr, const struct blkid_idmag *mag) - { -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/romfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/romfs.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/romfs.c.kzak 2009-07-04 01:20:03.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/romfs.c 2009-11-30 12:06:14.000000000 +0100 -@@ -21,7 +21,7 @@ struct romfs_super_block { - unsigned char ros_magic[8]; - uint32_t ros_dummy1[2]; - unsigned char ros_volume[16]; --}; -+} __attribute__((packed)); - - static int probe_romfs(blkid_probe pr, const struct blkid_idmag *mag) - { -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/silicon_raid.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/silicon_raid.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/silicon_raid.c.kzak 2009-07-04 01:20:02.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/silicon_raid.c 2009-11-30 12:06:14.000000000 +0100 -@@ -35,7 +35,7 @@ struct silicon_metadata { - uint16_t vendor_id; - uint16_t minor_ver; - uint16_t major_ver; --}; -+} __attribute__((packed)); - - #define SILICON_MAGIC 0x2F000000 - -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/squashfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/squashfs.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/squashfs.c.kzak 2009-07-04 01:20:02.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/squashfs.c 2009-11-30 12:06:14.000000000 +0100 -@@ -26,7 +26,7 @@ struct sqsh_super_block { - uint32_t directory_table_start_2; - uint16_t s_major; - uint16_t s_minor; --}; -+} __attribute__((packed)); - - static int probe_squashfs(blkid_probe pr, const struct blkid_idmag *mag) - { -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/swap.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/swap.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/swap.c.kzak 2009-11-30 11:59:36.000000000 +0100 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/swap.c 2009-11-30 12:06:14.000000000 +0100 -@@ -28,7 +28,7 @@ struct swap_header_v1_2 { - unsigned char volume[16]; - uint32_t padding[117]; - uint32_t badpages[1]; --}; -+} __attribute__((packed)); - - #define PAGESIZE_MIN 0xff6 /* 4086 (arm, i386, ...) */ - #define PAGESIZE_MAX 0xfff6 /* 65526 (ia64) */ -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/sysv.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/sysv.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/sysv.c.kzak 2009-07-04 01:20:02.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/sysv.c 2009-11-30 12:06:14.000000000 +0100 -@@ -39,7 +39,7 @@ struct xenix_super_block { - uint8_t s_fill[371]; - uint32_t s_magic; - uint32_t s_type; --}; -+} __attribute__((packed)); - - - #define SYSV_NICINOD 100 -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/udf.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/udf.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/udf.c.kzak 2009-07-04 01:20:03.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/udf.c 2009-11-30 12:06:14.000000000 +0100 -@@ -28,28 +28,32 @@ struct volume_descriptor { - uint16_t crc; - uint16_t crc_len; - uint32_t location; -- } tag; -+ } __attribute__((packed)) tag; -+ - union { - struct anchor_descriptor { - uint32_t length; - uint32_t location; -- } anchor; -+ } __attribute__((packed)) anchor; -+ - struct primary_descriptor { - uint32_t seq_num; - uint32_t desc_num; - struct dstring { - uint8_t clen; - uint8_t c[31]; -- } ident; -- } primary; -- } type; --}; -+ } __attribute__((packed)) ident; -+ } __attribute__((packed)) primary; -+ -+ } __attribute__((packed)) type; -+ -+} __attribute__((packed)); - - struct volume_structure_descriptor { - uint8_t type; - uint8_t id[5]; - uint8_t version; --}; -+} __attribute__((packed)); - - #define UDF_VSD_OFFSET 0x8000 - -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/ufs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/ufs.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/ufs.c.kzak 2009-07-04 01:20:03.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/ufs.c 2009-11-30 12:06:50.000000000 +0100 -@@ -117,7 +117,7 @@ struct ufs_super_block { - uint64_t fs_csaddr; - int64_t fs_pendingblocks; - int32_t fs_pendinginodes; -- } fs_u2; -+ } __attribute__((packed)) fs_u2; - } fs_u11; - union { - struct { -@@ -153,17 +153,22 @@ struct ufs_super_block { - int32_t fs_rotbloff; - uint32_t fs_magic; - uint8_t fs_space[1]; --}; -+} __attribute__((packed)); - - #define UFS_MAGIC 0x00011954 - #define UFS2_MAGIC 0x19540119 - #define UFS_MAGIC_FEA 0x00195612 - #define UFS_MAGIC_LFN 0x00095014 -+#define UFS_MAGIC_SEC 0x00612195 -+#define UFS_MAGIC_4GB 0x05231994 - - static int probe_ufs(blkid_probe pr, const struct blkid_idmag *mag) - { - int offsets[] = { 0, 8, 64, 256 }; -- int mags[] = { UFS2_MAGIC, UFS_MAGIC, UFS_MAGIC_FEA, UFS_MAGIC_LFN }; -+ int mags[] = { -+ UFS2_MAGIC, UFS_MAGIC, UFS_MAGIC_FEA, UFS_MAGIC_LFN, -+ UFS_MAGIC_SEC, UFS_MAGIC_4GB -+ }; - int i; - uint32_t magic; - struct ufs_super_block *ufs; -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/vfat.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/vfat.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/vfat.c.kzak 2009-07-04 01:20:02.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/vfat.c 2009-11-30 12:06:14.000000000 +0100 -@@ -47,7 +47,7 @@ struct vfat_super_block { - /* 52*/ unsigned char vs_magic[8]; - /* 5a*/ unsigned char vs_dummy2[164]; - /*1fe*/ unsigned char vs_pmagic[2]; --}; -+} __attribute__((packed)); - - /* Yucky misaligned values */ - struct msdos_super_block { -@@ -71,7 +71,7 @@ struct msdos_super_block { - /* 36*/ unsigned char ms_magic[8]; - /* 3d*/ unsigned char ms_dummy2[192]; - /*1fe*/ unsigned char ms_pmagic[2]; --}; -+} __attribute__((packed)); - - struct vfat_dir_entry { - uint8_t name[11]; -@@ -85,7 +85,7 @@ struct vfat_dir_entry { - uint16_t date_write; - uint16_t cluster_low; - uint32_t size; --}; -+} __attribute__((packed)); - - struct fat32_fsinfo { - uint8_t signature1[4]; -@@ -94,7 +94,7 @@ struct fat32_fsinfo { - uint32_t free_clusters; - uint32_t next_cluster; - uint32_t reserved2[4]; --}; -+} __attribute__((packed)); - - /* maximum number of clusters */ - #define FAT12_MAX 0xFF4 -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/via_raid.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/via_raid.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/via_raid.c.kzak 2009-07-04 01:20:02.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/via_raid.c 2009-11-30 12:06:14.000000000 +0100 -@@ -27,10 +27,10 @@ struct via_metadata { - uint32_t capacity_low; - uint32_t capacity_high; - uint32_t serial_checksum; -- } array; -+ } __attribute__((packed)) array; - uint32_t serial_checksum[8]; - uint8_t checksum; --}; -+} __attribute__((packed)); - - #define VIA_SIGNATURE 0xAA55 - -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/xfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/xfs.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/xfs.c.kzak 2009-07-04 01:20:02.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/xfs.c 2009-11-30 12:06:14.000000000 +0100 -@@ -32,7 +32,7 @@ struct xfs_super_block { - uint64_t xs_icount; - uint64_t xs_ifree; - uint64_t xs_fdblocks; --}; -+} __attribute__((packed)); - - static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag) - { -diff -up util-linux-ng-2.16/shlibs/blkid/src/probers/zfs.c.kzak util-linux-ng-2.16/shlibs/blkid/src/probers/zfs.c ---- util-linux-ng-2.16/shlibs/blkid/src/probers/zfs.c.kzak 2009-07-04 01:20:02.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/probers/zfs.c 2009-11-30 12:06:14.000000000 +0100 -@@ -24,7 +24,7 @@ struct zfs_uberblock { - uint64_t ub_guid_sum; /* sum of all vdev guids */ - uint64_t ub_timestamp; /* UTC time of last sync */ - /*blkptr_t ub_rootbp;*/ /* MOS objset_phys_t */ --}; -+} __attribute__((packed)); - - static int probe_zfs(blkid_probe pr, const struct blkid_idmag *mag) - { diff --git a/util-linux-ng-2.16-switchroot-tty.patch b/util-linux-ng-2.16-switchroot-tty.patch deleted file mode 100644 index 14ee89f..0000000 --- a/util-linux-ng-2.16-switchroot-tty.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -up util-linux-ng-2.16/sys-utils/switch_root.c.kzak util-linux-ng-2.16/sys-utils/switch_root.c ---- util-linux-ng-2.16/sys-utils/switch_root.c.kzak 2009-10-01 21:01:31.000000000 +0200 -+++ util-linux-ng-2.16/sys-utils/switch_root.c 2009-10-01 21:01:52.000000000 +0200 -@@ -267,13 +267,6 @@ int main(int argc, char *argv[]) - if (access(init, X_OK)) - warn("cannot access %s", init); - -- /* get session leader */ -- setsid(); -- -- /* set controlling terminal */ -- if (ioctl (0, TIOCSCTTY, 1)) -- warn("failed to TIOCSCTTY"); -- - execv(init, initargs); - err(EXIT_FAILURE, "failed to execute %s", init); - } diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 96cdce7..40d6767 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux-ng -Version: 2.16 -Release: 10.3%{?dist} +Version: 2.16.2 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -105,22 +105,8 @@ Patch7: util-linux-ng-2.13-login-lastlog.patch Patch8: util-linux-ng-2.15-ipcs-32bit.patch ### Upstream patches -### -# 513104 - blkid returns no fstype for ext2 device when ext2 module not loaded -Patch9: util-linux-ng-2.16-libblkid-ext2.patch -# 518572 - blkid requires ext2.ko to be decompressed on installation media -Patch10: util-linux-ng-2.16-libblkid-compression.patch -# 522718 - sfdisk -d /dev/xxx | sfdisk --force /dev/yyy fails when LANG is set -Patch11: util-linux-ng-2.14-sfdisk-dump.patch -# Swsuspend does not work -Patch12: util-linux-ng-2.16-blkid-swsuspend.patch -# 514413 - Extra spaces at the end of CD mount point -Patch13: util-linux-ng-2.16-libblkid-joliet.patch -# 519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device -Patch14: util-linux-ng-2.16-switchroot-tty.patch -# 539325 - fix VIA RAID detection -# 541708 - libblkid does not recognize ufs partitions -Patch15: util-linux-ng-2.16-libblkid-packed.patch +# 531992 - not prompted for passphrase +Patch9: util-linux-ng-2.16-blkid-crypto.path %description The util-linux-ng package contains a large variety of low-level system @@ -216,12 +202,6 @@ cp %{SOURCE8} %{SOURCE9} . %patch7 -p1 %patch8 -p1 %patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 %build unset LINGUAS || : @@ -732,6 +712,11 @@ fi %changelog +* Mon Dec 7 2009 Karel Zak 2.16.2-1 +- upgrade to 2.16.2 (removes 7 patches) + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.16/v2.16.2-ReleaseNotes +- fix #531992 - not prompted for passphrase + * Mon Nov 30 2009 Karel Zak 2.16-10.3 - fix #539325 - fix VIA RAID detection - fix #541708 - libblkid does not recognize ufs partitions From eacf3d56edf9984eda78daf5e5287894542160e8 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 7 Dec 2009 09:43:23 +0000 Subject: [PATCH 14/48] - fix #536797 - ntfs volume labels are not correct in hal --- util-linux-ng-2.16-blkid-ntfs.path | 65 ++++++++++++++++++++++++++++++ util-linux-ng.spec | 8 +++- 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-2.16-blkid-ntfs.path diff --git a/util-linux-ng-2.16-blkid-ntfs.path b/util-linux-ng-2.16-blkid-ntfs.path new file mode 100644 index 0000000..e0dab70 --- /dev/null +++ b/util-linux-ng-2.16-blkid-ntfs.path @@ -0,0 +1,65 @@ + + Backport from upstream to Fedora-12, original patch: + + commit 832b3f2eb6a6c5f2e7d8db422767404320e45ced + Author: Karel Zak + Date: Fri Nov 13 00:10:48 2009 +0100 + + libblkid: fix NTFS non-ASCII labels + + Addresses-Red-Hat-Bug: #536797 + Signed-off-by: Karel Zak + + + +diff -up util-linux-ng-2.16.2/shlibs/blkid/src/probers/ntfs.c.kzak util-linux-ng-2.16.2/shlibs/blkid/src/probers/ntfs.c +--- util-linux-ng-2.16.2/shlibs/blkid/src/probers/ntfs.c.kzak 2009-11-30 12:43:13.000000000 +0100 ++++ util-linux-ng-2.16.2/shlibs/blkid/src/probers/ntfs.c 2009-12-07 10:34:10.000000000 +0100 +@@ -65,10 +65,9 @@ static int probe_ntfs(blkid_probe pr, co + struct ntfs_super_block *ns; + struct master_file_table_record *mft; + struct file_attribute *attr; +- unsigned char label_str[129], *cp; + int bytes_per_sector, sectors_per_cluster; + int mft_record_size, attr_off, attr_len; +- unsigned int i, attr_type, val_len; ++ unsigned int attr_type, val_len; + int val_off; + uint64_t nr_clusters; + blkid_loff_t off; +@@ -128,7 +127,6 @@ static int probe_ntfs(blkid_probe pr, co + mft = (struct master_file_table_record *) buf_mft; + + attr_off = le16_to_cpu(mft->attrs_offset); +- label_str[0] = 0; + + while (1) { + attr = (struct file_attribute *) (buf_mft + attr_off); +@@ -147,16 +145,8 @@ static int probe_ntfs(blkid_probe pr, co + break; + + if (attr_type == MFT_RECORD_ATTR_VOLUME_NAME) { +- if (val_len > sizeof(label_str)) +- val_len = sizeof(label_str)-1; +- +- for (i=0, cp=label_str; i < val_len; i+=2,cp++) { +- val = ((uint8_t *) attr) + val_off + i; +- *cp = val[0]; +- if (val[1]) +- *cp = '?'; +- } +- *cp = 0; ++ val = ((uint8_t *) attr) + val_off; ++ blkid_probe_set_utf8label(pr, val, val_len, BLKID_ENC_UTF16LE); + } + } + +@@ -164,8 +154,6 @@ static int probe_ntfs(blkid_probe pr, co + (unsigned char *) &ns->volume_serial, + sizeof(ns->volume_serial), + "%016" PRIX64, le64_to_cpu(ns->volume_serial)); +- if (label_str[0]) +- blkid_probe_set_label(pr, label_str, strlen((char *)label_str)); + return 0; + } + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 40d6767..ea70e3d 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -107,6 +107,8 @@ Patch8: util-linux-ng-2.15-ipcs-32bit.patch ### Upstream patches # 531992 - not prompted for passphrase Patch9: util-linux-ng-2.16-blkid-crypto.path +# 536797 - ntfs volume labels are not correct in hal +Patch10: util-linux-ng-2.16-blkid-ntfs.path %description The util-linux-ng package contains a large variety of low-level system @@ -202,6 +204,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 %build unset LINGUAS || : @@ -712,6 +715,9 @@ fi %changelog +* Mon Dec 7 2009 Karel Zak 2.16.2-2 +- fix #536797 - ntfs volume labels are not correct in hal + * Mon Dec 7 2009 Karel Zak 2.16.2-1 - upgrade to 2.16.2 (removes 7 patches) ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.16/v2.16.2-ReleaseNotes From 8e0edf304511367c254a63ce9ab8a4464fac2b01 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 7 Dec 2009 11:17:37 +0000 Subject: [PATCH 15/48] - add clock.8 man page (manlink to hwclock) - add --help to mount.tmpfs --- mount.tmpfs | 8 ++++++++ util-linux-ng.spec | 11 ++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/mount.tmpfs b/mount.tmpfs index f862c03..e37f735 100644 --- a/mount.tmpfs +++ b/mount.tmpfs @@ -10,6 +10,14 @@ # /sbin/mount.tmpfs spec dir [-sfnv] [-o options] # +case $1 in + -h|--help|-?) + echo "mount.tmpfs is a private mount(8) wrapper for tmpfs." + echo "Don't use it directly!" + exit 1 + ;; +esac + if ! echo "$@" | grep -q -E '(fs|def|root)?context='; then con=$(ls --scontext -d "$2" | cut -f 1 -d ' ') if [ -n "$con" ] && [ "$con" != "?" ] && [ "$con" != "unlabeled" ]; then diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 833ced1..76ca1cc 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -4,7 +4,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 0.3%{?dist} +Release: 0.4%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -303,7 +303,7 @@ chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/sunhostid ln -sf ../../sbin/hwclock ${RPM_BUILD_ROOT}/usr/sbin/hwclock ln -sf hwclock ${RPM_BUILD_ROOT}/sbin/clock - +echo ".so man8/hwclock.8" > ${RPM_BUILD_ROOT}%{_mandir}/man8/clock.8 # remove libtool junk (TODO) #rm -f ${RPM_BUILD_ROOT}/%{_lib}/libblkid.la @@ -324,7 +324,7 @@ for I in /usr/{bin,sbin}/{fdformat,tunelp,floppy} \ %{_mandir}/man8/{fdformat,tunelp,floppy}.8* \ /sbin/{hwclock,clock} \ /usr/sbin/hwclock \ - %{_mandir}/man8/hwclock.8*; do + %{_mandir}/man8/{hwclock,clock}.8*; do rm -f $RPM_BUILD_ROOT$I done @@ -641,6 +641,7 @@ fi %{_mandir}/man8/fdformat.8* %{_mandir}/man8/floppy.8* %{_mandir}/man8/hwclock.8* +%{_mandir}/man8/clock.8* %{_mandir}/man8/tunelp.8* %endif @@ -710,6 +711,10 @@ fi %changelog +* Mon Dec 7 2009 Karel Zak 2.17-0.4 +- add clock.8 man page (manlink to hwclock) +- add --help to mount.tmpfs + * Mon Nov 23 2009 Karel Zak 2.17-0.3 - upgrade to 2.17-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc1-ChangeLog From 68cfaf1c07c4a133159ce2a87c0f37b73d603ba0 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 9 Dec 2009 12:52:55 +0000 Subject: [PATCH 16/48] - upgrade to 2.17-rc2 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc2-Chan geLog --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 12 ++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index eb48652..70995c2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.17-rc1.tar.bz2 +util-linux-ng-2.17-rc2.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index a5e41cf..ddc2bf4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -320a6bab5cc8f70f6b9ad0c05a6fe67f util-linux-ng-2.17-rc1.tar.bz2 +e8410e61fced33c6978c86c5b409f8c8 util-linux-ng-2.17-rc2.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 76ca1cc..8c9f220 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,10 +1,10 @@ -%define upstream_version %{version}-rc1 +%define upstream_version %{version}-rc2 ### Header Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 0.4%{?dist} +Release: 0.5%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -711,11 +711,15 @@ fi %changelog -* Mon Dec 7 2009 Karel Zak 2.17-0.4 +* Wed Dec 9 2009 Karel Zak 2.17-0.5 +- upgrade to 2.17-rc2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc2-ChangeLog + +* Mon Dec 7 2009 Karel Zak 2.17-0.4 - add clock.8 man page (manlink to hwclock) - add --help to mount.tmpfs -* Mon Nov 23 2009 Karel Zak 2.17-0.3 +* Mon Nov 23 2009 Karel Zak 2.17-0.3 - upgrade to 2.17-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc1-ChangeLog From 43b042be2b179e9f0fab859642df8235181844b6 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 9 Dec 2009 20:58:54 +0000 Subject: [PATCH 17/48] - fix typo in spec file --- ...-crypto.path => util-linux-ng-2.16-blkid-crypto.patch | 0 ...lkid-ntfs.path => util-linux-ng-2.16-blkid-ntfs.patch | 0 util-linux-ng.spec | 9 ++++++--- 3 files changed, 6 insertions(+), 3 deletions(-) rename util-linux-ng-2.16-blkid-crypto.path => util-linux-ng-2.16-blkid-crypto.patch (100%) rename util-linux-ng-2.16-blkid-ntfs.path => util-linux-ng-2.16-blkid-ntfs.patch (100%) diff --git a/util-linux-ng-2.16-blkid-crypto.path b/util-linux-ng-2.16-blkid-crypto.patch similarity index 100% rename from util-linux-ng-2.16-blkid-crypto.path rename to util-linux-ng-2.16-blkid-crypto.patch diff --git a/util-linux-ng-2.16-blkid-ntfs.path b/util-linux-ng-2.16-blkid-ntfs.patch similarity index 100% rename from util-linux-ng-2.16-blkid-ntfs.path rename to util-linux-ng-2.16-blkid-ntfs.patch diff --git a/util-linux-ng.spec b/util-linux-ng.spec index ea70e3d..857cb0b 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -106,9 +106,9 @@ Patch8: util-linux-ng-2.15-ipcs-32bit.patch ### Upstream patches # 531992 - not prompted for passphrase -Patch9: util-linux-ng-2.16-blkid-crypto.path +Patch9: util-linux-ng-2.16-blkid-crypto.patch # 536797 - ntfs volume labels are not correct in hal -Patch10: util-linux-ng-2.16-blkid-ntfs.path +Patch10: util-linux-ng-2.16-blkid-ntfs.patch %description The util-linux-ng package contains a large variety of low-level system @@ -715,6 +715,9 @@ fi %changelog +* Wed Dec 9 2009 Karel Zak 2.16.2-3 +- fix typo in spec file + * Mon Dec 7 2009 Karel Zak 2.16.2-2 - fix #536797 - ntfs volume labels are not correct in hal From 7aec78fd0d9961ee2bc831577568ce0338b7294e Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 10 Dec 2009 14:25:08 +0000 Subject: [PATCH 18/48] - fix typo in spec file - add Requires: libblkid and libuuid (bz#531992 comment #38) --- util-linux-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 857cb0b..e931297 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -75,6 +75,8 @@ Requires(post): /sbin/install-info Requires(post): coreutils Requires: pam >= 1.0.90, /etc/pam.d/system-auth Requires: audit-libs >= 1.0.6 +Requires: libuuid = %{version}-%{release} +Requires: libblkid = %{version}-%{release} %if %{include_raw} Requires: udev %endif @@ -715,8 +717,9 @@ fi %changelog -* Wed Dec 9 2009 Karel Zak 2.16.2-3 +* Thu Dec 10 2009 Karel Zak 2.16.2-3 - fix typo in spec file +- add Requires: libblkid and libuuid (bz#531992 comment #38) * Mon Dec 7 2009 Karel Zak 2.16.2-2 - fix #536797 - ntfs volume labels are not correct in hal From 45c4f71208d2258a95c9c1f85c4aea203044e802 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 10 Dec 2009 14:37:50 +0000 Subject: [PATCH 19/48] increment release number, fix changelog --- util-linux-ng.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index e931297..58d8f35 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16.2 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -717,10 +717,12 @@ fi %changelog -* Thu Dec 10 2009 Karel Zak 2.16.2-3 -- fix typo in spec file +* Thu Dec 10 2009 Karel Zak 2.16.2-4 - add Requires: libblkid and libuuid (bz#531992 comment #38) +* Wed Dec 9 2009 Karel Zak 2.16.2-3 +- fix typo in spec file + * Mon Dec 7 2009 Karel Zak 2.16.2-2 - fix #536797 - ntfs volume labels are not correct in hal From 508868f4718c0cbd5155980ccf0cc4dab9cfc138 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 14 Dec 2009 11:50:10 +0000 Subject: [PATCH 20/48] - minor fixes in spec file (fix URL, add Requires, add LGPLv2+) --- util-linux-ng.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 8c9f220..bcf1c92 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -4,8 +4,8 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 0.5%{?dist} -License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain +Release: 0.6%{?dist} +License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -34,7 +34,7 @@ BuildRequires: zlib-devel BuildRequires: popt-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/util-linux-ng-%{upstream_version}.tar.bz2 +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/util-linux-ng-%{upstream_version}.tar.bz2 Source1: util-linux-ng-login.pamd Source2: util-linux-ng-remote.pamd Source3: util-linux-ng-chsh-chfn.pamd @@ -75,6 +75,8 @@ Requires(post): /sbin/install-info Requires(post): coreutils Requires: pam >= 1.0.90, /etc/pam.d/system-auth Requires: audit-libs >= 1.0.6 +Requires: libuuid = %{version}-%{release} +Requires: libblkid = %{version}-%{release} %if %{include_raw} Requires: udev %endif @@ -711,6 +713,9 @@ fi %changelog +* Mon Dec 14 2009 Karel Zak 2.17-0.6 +- minor fixes in spec file (fix URL, add Requires, add LGPLv2+) + * Wed Dec 9 2009 Karel Zak 2.17-0.5 - upgrade to 2.17-rc2 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc2-ChangeLog From 62111d14ce21192775954c6ad799ede063370f99 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 15 Dec 2009 13:39:10 +0000 Subject: [PATCH 21/48] - fix #547245 - blkid does not recognize Adaptec HostRAID members --- util-linux-ng-2.16-blkid-ataraid.patch | 69 ++++++++++++++++++++++++++ util-linux-ng.spec | 8 ++- 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-2.16-blkid-ataraid.patch diff --git a/util-linux-ng-2.16-blkid-ataraid.patch b/util-linux-ng-2.16-blkid-ataraid.patch new file mode 100644 index 0000000..e0657e6 --- /dev/null +++ b/util-linux-ng-2.16-blkid-ataraid.patch @@ -0,0 +1,69 @@ +diff -up util-linux-ng-2.16.2/shlibs/blkid/src/probers/adaptec_raid.c.kzak util-linux-ng-2.16.2/shlibs/blkid/src/probers/adaptec_raid.c +--- util-linux-ng-2.16.2/shlibs/blkid/src/probers/adaptec_raid.c.kzak 2009-11-30 12:43:13.000000000 +0100 ++++ util-linux-ng-2.16.2/shlibs/blkid/src/probers/adaptec_raid.c 2009-12-15 14:18:10.000000000 +0100 +@@ -16,6 +16,7 @@ + #include "blkidP.h" + + struct adaptec_metadata { ++ + uint32_t b0idcode; + uint8_t lunsave[8]; + uint16_t sdtype; +@@ -63,13 +64,13 @@ struct adaptec_metadata { + uint32_t fwTestMagic; + uint32_t fwTestSeqNum; + uint8_t fwTestRes[8]; +- uint8_t smagic[4]; ++ uint32_t smagic; + uint32_t raidtbl; + uint16_t raidline; + uint8_t res9[0xF6]; + } __attribute__((packed)); + +-#define AD_SIGNATURE "DPTM" ++#define AD_SIGNATURE 0x4450544D /* "DPTM" */ + #define AD_MAGIC 0x37FC4D1E + + static int probe_adraid(blkid_probe pr, const struct blkid_idmag *mag) +@@ -87,7 +88,7 @@ static int probe_adraid(blkid_probe pr, + sizeof(struct adaptec_metadata)); + if (!ad) + return -1; +- if (memcmp(ad->smagic, AD_SIGNATURE, sizeof(AD_SIGNATURE)) != 0) ++ if (ad->smagic != be32_to_cpu(AD_SIGNATURE)) + return -1; + if (ad->b0idcode != be32_to_cpu(AD_MAGIC)) + return -1; +diff -up util-linux-ng-2.16.2/shlibs/blkid/src/probers/highpoint_raid.c.kzak util-linux-ng-2.16.2/shlibs/blkid/src/probers/highpoint_raid.c +--- util-linux-ng-2.16.2/shlibs/blkid/src/probers/highpoint_raid.c.kzak 2009-11-30 12:37:08.000000000 +0100 ++++ util-linux-ng-2.16.2/shlibs/blkid/src/probers/highpoint_raid.c 2009-12-15 14:18:10.000000000 +0100 +@@ -45,18 +45,25 @@ static int probe_highpoint45x(blkid_prob + } + + const struct blkid_idinfo highpoint45x_idinfo = { +- .name = "highpoint_raid_member", ++ .name = "hpt45x_raid_member", + .usage = BLKID_USAGE_RAID, + .probefunc = probe_highpoint45x, + .magics = BLKID_NONE_MAGIC + }; + + const struct blkid_idinfo highpoint37x_idinfo = { +- .name = "highpoint_raid_member", ++ .name = "hpt37x_raid_member", + .usage = BLKID_USAGE_RAID, + .magics = { +- { .magic = "\xf0\x16\x78\x5a", .len = 4, .kboff = 4 }, +- { .magic = "\xfd\x16\x78\x5a", .len = 4, .kboff = 4 }, ++ /* ++ * Superblok offset: 4608 bytes (9 sectors) ++ * Magic string offset within superblock: 32 bytes ++ * ++ * kboff = (4608 + 32) / 1024 ++ * sboff = (4608 + 32) % kboff ++ */ ++ { .magic = "\xf0\x16\x78\x5a", .len = 4, .kboff = 4, .sboff = 544 }, ++ { .magic = "\xfd\x16\x78\x5a", .len = 4, .kboff = 4, .sboff = 544 }, + { NULL } + } + }; diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 58d8f35..8b3a7a0 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16.2 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -111,6 +111,8 @@ Patch8: util-linux-ng-2.15-ipcs-32bit.patch Patch9: util-linux-ng-2.16-blkid-crypto.patch # 536797 - ntfs volume labels are not correct in hal Patch10: util-linux-ng-2.16-blkid-ntfs.patch +# 547245 - blkid does not recognize Adaptec HostRAID members +Patch11: util-linux-ng-2.16-blkid-ataraid.patch %description The util-linux-ng package contains a large variety of low-level system @@ -207,6 +209,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 %build unset LINGUAS || : @@ -717,6 +720,9 @@ fi %changelog +* Tue Dec 15 2009 Karel Zak 2.16.2-5 +- fix #547245 - blkid does not recognize Adaptec HostRAID members + * Thu Dec 10 2009 Karel Zak 2.16.2-4 - add Requires: libblkid and libuuid (bz#531992 comment #38) From 23fc39cc0af8b68f1519a45a412d4b394a7e705b Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 8 Jan 2010 11:22:22 +0000 Subject: [PATCH 22/48] - upgrade to the final 2.17 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-ReleaseN otes ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-ChangeLo g - fix #545147 - util-linux-ng : Violation of the Packaging Guidelines (remove uuid and blkid static libs) --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 21 +++++++++++++++------ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.cvsignore b/.cvsignore index 70995c2..87044f2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.17-rc2.tar.bz2 +util-linux-ng-2.17.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index ddc2bf4..964e6d2 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -e8410e61fced33c6978c86c5b409f8c8 util-linux-ng-2.17-rc2.tar.bz2 +11cc8a0138019e7060dd275d47dbc096 util-linux-ng-2.17.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index bcf1c92..00cd090 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,14 +1,14 @@ -%define upstream_version %{version}-rc2 - ### Header Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 0.6%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng +%define upstream_version %{version} + ### Features %if 0%{?rhel} %define include_raw 1 @@ -43,7 +43,7 @@ Source5: mount.tmpfs Source8: nologin.c Source9: nologin.8 Source10: uuidd.init -Source11: http://download.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 +Source11: http://sourceforge.net/projects/floppyutil/files/floppy/%{floppyver}/floppy-%{floppyver}.tar.bz2 ### Obsoletes & Conflicts & Provides %ifarch alpha @@ -397,6 +397,8 @@ done # omit info/dir file rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir +# remove static libs +rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid}.a # find MO files %find_lang %name @@ -682,7 +684,7 @@ fi %files -n libblkid-devel %defattr(-,root,root) -%{_libdir}/libblkid.a +#%{_libdir}/libblkid.a %{_libdir}/libblkid.so %{_includedir}/blkid %{_mandir}/man3/libblkid.3* @@ -695,7 +697,7 @@ fi %files -n libuuid-devel %defattr(-,root,root) -%{_libdir}/libuuid.a +#%{_libdir}/libuuid.a %{_libdir}/libuuid.so %{_includedir}/uuid %{_mandir}/man3/uuid.3* @@ -713,6 +715,13 @@ fi %changelog +* Thu Jan 8 2010 Karel Zak 2.17-1 +- upgrade to the final 2.17 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-ReleaseNotes + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-ChangeLog +- fix #545147 - util-linux-ng : Violation of the Packaging Guidelines + (remove uuid and blkid static libs) + * Mon Dec 14 2009 Karel Zak 2.17-0.6 - minor fixes in spec file (fix URL, add Requires, add LGPLv2+) From f2798a3ae7bf993765af6fa1738e49497e9126ea Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 8 Jan 2010 14:01:57 +0000 Subject: [PATCH 23/48] - remove Provides: lib{uuid,blkid}-static (thanks to Michael Schwendt) - remove useless URL to sf.net --- util-linux-ng.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 00cd090..1ec0563 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -43,7 +43,7 @@ Source5: mount.tmpfs Source8: nologin.c Source9: nologin.8 Source10: uuidd.init -Source11: http://sourceforge.net/projects/floppyutil/files/floppy/%{floppyver}/floppy-%{floppyver}.tar.bz2 +Source11: floppy-%{floppyver}.tar.bz2 ### Obsoletes & Conflicts & Provides %ifarch alpha @@ -124,7 +124,7 @@ This is block device identification library, part of util-linux-ng. Summary: Block device ID library Group: Development/Libraries License: LGPLv2+ -Provides: libblkid-static = %{version}-%{release} +#Provides: libblkid-static = %{version}-%{release} Requires: libblkid = %{version}-%{release} Requires: pkgconfig @@ -154,7 +154,7 @@ See also the "uuid" package, which is a separate implementation. Summary: Universally unique ID library Group: Development/Libraries License: BSD -Provides: libuuid-static = %{version}-%{release} +#Provides: libuuid-static = %{version}-%{release} Requires: libuuid = %{version}-%{release} Requires: pkgconfig @@ -715,6 +715,10 @@ fi %changelog +* Fri Jan 8 2010 Karel Zak 2.17-2 +- remove Provides: lib{uuid,blkid}-static (thanks to Michael Schwendt) +- remove useless URL to sf.net + * Thu Jan 8 2010 Karel Zak 2.17-1 - upgrade to the final 2.17 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-ReleaseNotes From 895e26434c3afa63a9a31f73c6e4d0457fbef27e Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 12 Feb 2010 19:30:23 +0000 Subject: [PATCH 24/48] - fix #541402 - uuidd initscript lsb compliance --- util-linux-ng.spec | 5 +++- uuidd.init | 69 ++++++++++++++++++++++++++++++++++------------ 2 files changed, 55 insertions(+), 19 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 1ec0563..fddde80 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -715,6 +715,9 @@ fi %changelog +* Fri Feb 12 2010 Karel Zak 2.17-3 +- fix #541402 - uuidd initscript lsb compliance + * Fri Jan 8 2010 Karel Zak 2.17-2 - remove Provides: lib{uuid,blkid}-static (thanks to Michael Schwendt) - remove useless URL to sf.net diff --git a/uuidd.init b/uuidd.init index 4494388..e8de8aa 100755 --- a/uuidd.init +++ b/uuidd.init @@ -25,23 +25,30 @@ # source function library . /etc/rc.d/init.d/functions +[ -e /etc/sysconfig/uuidd ] && . /etc/sysconfig/uuidd -RETVAL=0 -DAEMON=uuidd +DAEMON=/usr/sbin/uuidd +LOCKFILE=/var/lock/subsys/uuidd start() { + [ -x $DAEMON ] || exit 5 + [ -w $LOCKFILE ] || exit 4 echo -n $"Starting uuidd: " - daemon --user uuidd --pidfile /var/run/uuidd/uuidd.pid /usr/sbin/uuidd - RETVAL=$? + daemon --user uuidd --pidfile /var/run/uuidd/uuidd.pid $DAEMON + retval=$? echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/uuidd + [ $retval -eq 0 ] && touch $LOCKFILE + return $retval } stop() { + [ -w $LOCKFILE ] || exit 4 echo -n $"Stopping uuidd: " killproc uuidd + retval=$? echo - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/uuidd + [ $retval -eq 0 ] && rm -f $LOCKFILE + return $retval } restart() { @@ -49,26 +56,52 @@ restart() { start } +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + # run checks to determine if the service is running or use generic status + status $DAEMON +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + case "$1" in start) - start + rh_status_q && exit 0 + $1 ;; stop) - stop + rh_status_q || exit 0 + $1 ;; - restart|force-reload|reload) - restart + restart) + $1 ;; - condrestart) - [ -f /var/lock/subsys/uuidd ] && restart + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload ;; status) - status -p /var/run/uuidid/uuidd.pid uuidd uuidd - RETVAL=$? + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart ;; *) - echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}" - exit 1 + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 esac - -exit $RETVAL +exit $? From ebf27ef6b1ef36ea4a4a8ab5082d6fabafdfe783 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 16 Feb 2010 14:29:21 +0000 Subject: [PATCH 25/48] - fix uuidd init script --- util-linux-ng.spec | 5 ++++- uuidd.init | 48 ++++++++++++++++++++++++++++------------------ 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index fddde80..02e5a18 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -715,6 +715,9 @@ fi %changelog +* Tue Feb 16 2010 Karel Zak 2.17-4 +- fix uuidd init script + * Fri Feb 12 2010 Karel Zak 2.17-3 - fix #541402 - uuidd initscript lsb compliance diff --git a/uuidd.init b/uuidd.init index e8de8aa..9fba666 100755 --- a/uuidd.init +++ b/uuidd.init @@ -22,32 +22,43 @@ # when using libuuid. ### END INIT INFO - # source function library . /etc/rc.d/init.d/functions + [ -e /etc/sysconfig/uuidd ] && . /etc/sysconfig/uuidd -DAEMON=/usr/sbin/uuidd -LOCKFILE=/var/lock/subsys/uuidd +DAEMON=uuidd +exec=/usr/sbin/uuidd +prog=uuidd +user=uuidd +lockfile=/var/lock/subsys/$DAEMON +pidfile=/var/run/uuidd/uuidd.pid -start() { - [ -x $DAEMON ] || exit 5 - [ -w $LOCKFILE ] || exit 4 - echo -n $"Starting uuidd: " - daemon --user uuidd --pidfile /var/run/uuidd/uuidd.pid $DAEMON - retval=$? - echo - [ $retval -eq 0 ] && touch $LOCKFILE - return $retval +check() { + # Check that we're a privileged user + [ $(id -u) -eq 0 ] || exit 4 + + # Check if daemon binary is executable + [ -x $exec ] || exit 5 } -stop() { - [ -w $LOCKFILE ] || exit 4 - echo -n $"Stopping uuidd: " - killproc uuidd +start () { + check + echo -n $"Starting $prog: " + daemon --user $user --pidfile $pidfile $DAEMON + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +stop () { + check + echo -n $"Stopping $prog: " + killproc $DAEMON retval=$? echo - [ $retval -eq 0 ] && rm -f $LOCKFILE + [ $retval -eq 0 ] && rm -f $lockfile return $retval } @@ -65,8 +76,7 @@ force_reload() { } rh_status() { - # run checks to determine if the service is running or use generic status - status $DAEMON + status -p $pidfile $DAEMON } rh_status_q() { From 3469b9156ce3b634895b39c6f7ed2115a165d4d7 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 16 Feb 2010 15:07:47 +0000 Subject: [PATCH 26/48] - upgrade to 2.17.1-rc1 --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index 87044f2..291fb7f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.17.tar.bz2 +util-linux-ng-2.17.1-rc1.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index 964e6d2..95d2f4f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -11cc8a0138019e7060dd275d47dbc096 util-linux-ng-2.17.tar.bz2 +2fb632d41d4bb47b02a41ced45e4649f util-linux-ng-2.17.1-rc1.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 02e5a18..e07f111 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,13 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux-ng -Version: 2.17 -Release: 4%{?dist} +Version: 2.17.1 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng -%define upstream_version %{version} +%define upstream_version %{version}-rc1 ### Features %if 0%{?rhel} @@ -34,7 +34,7 @@ BuildRequires: zlib-devel BuildRequires: popt-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/util-linux-ng-%{upstream_version}.tar.bz2 +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/util-linux-ng-%{upstream_version}.tar.bz2 Source1: util-linux-ng-login.pamd Source2: util-linux-ng-remote.pamd Source3: util-linux-ng-chsh-chfn.pamd @@ -715,6 +715,9 @@ fi %changelog +* Tue Feb 16 2010 Karel Zak 2.17.1-0.1 +- upgrade to 2.17.1-rc1 + * Tue Feb 16 2010 Karel Zak 2.17-4 - fix uuidd init script From fa547b9550f824e45e3095b4303f79f7126eda23 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 17 Feb 2010 09:45:17 +0000 Subject: [PATCH 27/48] - fix #557831 - blkid detects ext4 fs as minix fs - fix #494070 - Anaconda tries to mount zfs filesystem as EXT3 and install fails --- util-linux-ng-2.16-blkid-minix.patch | 91 ++++++++++++++++++++++++++++ util-linux-ng-2.16-blkid-zfs.patch | 62 +++++++++++++++++++ util-linux-ng.spec | 13 +++- 3 files changed, 165 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-2.16-blkid-minix.patch create mode 100644 util-linux-ng-2.16-blkid-zfs.patch diff --git a/util-linux-ng-2.16-blkid-minix.patch b/util-linux-ng-2.16-blkid-minix.patch new file mode 100644 index 0000000..00e5861 --- /dev/null +++ b/util-linux-ng-2.16-blkid-minix.patch @@ -0,0 +1,91 @@ +diff -up util-linux-ng-2.16.2/shlibs/blkid/src/probers/minix.c.kzak util-linux-ng-2.16.2/shlibs/blkid/src/probers/minix.c +--- util-linux-ng-2.16.2/shlibs/blkid/src/probers/minix.c.kzak 2009-11-30 12:37:08.000000000 +0100 ++++ util-linux-ng-2.16.2/shlibs/blkid/src/probers/minix.c 2010-02-17 10:33:53.000000000 +0100 +@@ -11,20 +11,84 @@ + + #include "blkidP.h" + ++struct minix_super_block { ++ uint16_t s_ninodes; ++ uint16_t s_nzones; ++ uint16_t s_imap_blocks; ++ uint16_t s_zmap_blocks; ++ uint16_t s_firstdatazone; ++ uint16_t s_log_zone_size; ++ uint32_t s_max_size; ++ uint16_t s_magic; ++ uint16_t s_state; ++ uint32_t s_zones; ++}; ++ ++struct minix3_super_block { ++ uint32_t s_ninodes; ++ uint16_t s_pad0; ++ uint16_t s_imap_blocks; ++ uint16_t s_zmap_blocks; ++ uint16_t s_firstdatazone; ++ uint16_t s_log_zone_size; ++ uint16_t s_pad1; ++ uint32_t s_max_size; ++ uint32_t s_zones; ++ uint16_t s_magic; ++ uint16_t s_pad2; ++ uint16_t s_blocksize; ++ uint8_t s_disk_version; ++}; ++ ++#define MINIX_BLOCK_SIZE_BITS 10 ++#define MINIX_BLOCK_SIZE (1 << MINIX_BLOCK_SIZE_BITS) ++ + static int probe_minix(blkid_probe pr, const struct blkid_idmag *mag) + { ++ int version; ++ + /* for more details see magic strings below */ + switch(mag->magic[1]) { + case '\023': +- blkid_probe_set_version(pr, "1"); ++ version = 1; + break; + case '\044': +- blkid_probe_set_version(pr, "2"); ++ version = 2; + break; + case '\115': +- blkid_probe_set_version(pr, "3"); ++ version = 3; ++ break; ++ default: ++ return -1; + break; + } ++ ++ if (version <= 2) { ++ struct minix_super_block *sb; ++ uint32_t zones; ++ ++ sb = blkid_probe_get_sb(pr, mag, struct minix_super_block); ++ if (!sb || sb->s_imap_blocks == 0 || sb->s_zmap_blocks == 0) ++ return -1; ++ ++ zones = version == 2 ? sb->s_zones : sb->s_nzones; ++ ++ /* sanity checks to be sure that the FS is really minix */ ++ if (sb->s_imap_blocks * MINIX_BLOCK_SIZE * 8 < sb->s_ninodes + 1) ++ return -1; ++ if (sb->s_zmap_blocks * MINIX_BLOCK_SIZE * 8 < zones - sb->s_firstdatazone + 1) ++ return -1; ++ ++ } else if (version == 3) { ++ struct minix3_super_block *sb; ++ ++ sb = blkid_probe_get_sb(pr, mag, struct minix3_super_block); ++ if (!sb || sb->s_imap_blocks == 0 || sb->s_zmap_blocks == 0) ++ return -1; ++ ++ } ++ ++ blkid_probe_sprintf_version(pr, "%d", version); + return 0; + } + diff --git a/util-linux-ng-2.16-blkid-zfs.patch b/util-linux-ng-2.16-blkid-zfs.patch new file mode 100644 index 0000000..1989a51 --- /dev/null +++ b/util-linux-ng-2.16-blkid-zfs.patch @@ -0,0 +1,62 @@ +diff -up util-linux-ng-2.16.2/shlibs/blkid/src/probers/zfs.c.kzak util-linux-ng-2.16.2/shlibs/blkid/src/probers/zfs.c +--- util-linux-ng-2.16.2/shlibs/blkid/src/probers/zfs.c.kzak 2009-11-30 12:43:13.000000000 +0100 ++++ util-linux-ng-2.16.2/shlibs/blkid/src/probers/zfs.c 2010-02-17 10:31:33.000000000 +0100 +@@ -23,21 +23,22 @@ struct zfs_uberblock { + uint64_t ub_txg; /* txg of last sync */ + uint64_t ub_guid_sum; /* sum of all vdev guids */ + uint64_t ub_timestamp; /* UTC time of last sync */ +- /*blkptr_t ub_rootbp;*/ /* MOS objset_phys_t */ ++ char ub_rootbp; /* MOS objset_phys_t */ + } __attribute__((packed)); + + static int probe_zfs(blkid_probe pr, const struct blkid_idmag *mag) + { + struct zfs_uberblock *ub; +- int swab_endian; + uint64_t spa_version; + + ub = blkid_probe_get_sb(pr, mag, struct zfs_uberblock); + if (!ub) + return -1; + +- swab_endian = (ub->ub_magic == swab64(UBERBLOCK_MAGIC)); +- spa_version = swab_endian ? swab64(ub->ub_version) : ub->ub_version; ++ if (ub->ub_magic == be64_to_cpu(UBERBLOCK_MAGIC)) ++ spa_version = be64_to_cpu(ub->ub_version); ++ else ++ spa_version = le64_to_cpu(ub->ub_version); + + blkid_probe_sprintf_version(pr, "%" PRIu64, spa_version); + #if 0 +@@ -56,10 +57,19 @@ const struct blkid_idinfo zfs_idinfo = + .probefunc = probe_zfs, + .magics = + { +- { .magic = "\0\0\x02\xf5\xb0\x07\xb1\x0c", .len = 8, .kboff = 8 }, +- { .magic = "\x1c\xb1\x07\xb0\xf5\x02\0\0", .len = 8, .kboff = 8 }, +- { .magic = "\0\0\x02\xf5\xb0\x07\xb1\x0c", .len = 8, .kboff = 264 }, +- { .magic = "\x0c\xb1\x07\xb0\xf5\x02\0\0", .len = 8, .kboff = 264 }, ++ /* ZFS has 128 root blocks (#4 is the first used), check only 6 of them */ ++ { .magic = "\0\0\0\0\0\xba\xb1\x0c", .len = 8, .kboff = 128 }, ++ { .magic = "\x0c\xb1\xba\0\0\0\0\0", .len = 8, .kboff = 128 }, ++ { .magic = "\0\0\0\0\0\xba\xb1\x0c", .len = 8, .kboff = 132 }, ++ { .magic = "\x0c\xb1\xba\0\0\0\0\0", .len = 8, .kboff = 132 }, ++ { .magic = "\0\0\0\0\0\xba\xb1\x0c", .len = 8, .kboff = 136 }, ++ { .magic = "\x0c\xb1\xba\0\0\0\0\0", .len = 8, .kboff = 136 }, ++ { .magic = "\0\0\0\0\0\xba\xb1\x0c", .len = 8, .kboff = 384 }, ++ { .magic = "\x0c\xb1\xba\0\0\0\0\0", .len = 8, .kboff = 384 }, ++ { .magic = "\0\0\0\0\0\xba\xb1\x0c", .len = 8, .kboff = 388 }, ++ { .magic = "\x0c\xb1\xba\0\0\0\0\0", .len = 8, .kboff = 388 }, ++ { .magic = "\0\0\0\0\0\xba\xb1\x0c", .len = 8, .kboff = 392 }, ++ { .magic = "\x0c\xb1\xba\0\0\0\0\0", .len = 8, .kboff = 392 }, + { NULL } + } + }; +diff -up util-linux-ng-2.16.2/tests/expected/blkid/low-probe-zfs.kzak util-linux-ng-2.16.2/tests/expected/blkid/low-probe-zfs +--- util-linux-ng-2.16.2/tests/expected/blkid/low-probe-zfs.kzak 2009-10-16 22:50:03.000000000 +0200 ++++ util-linux-ng-2.16.2/tests/expected/blkid/low-probe-zfs 2010-02-17 10:31:33.000000000 +0100 +@@ -1,3 +1,3 @@ + ID_FS_TYPE=zfs + ID_FS_USAGE=filesystem +-ID_FS_VERSION=1 ++ID_FS_VERSION=8 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 8b3a7a0..49d22b1 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16.2 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -113,6 +113,11 @@ Patch9: util-linux-ng-2.16-blkid-crypto.patch Patch10: util-linux-ng-2.16-blkid-ntfs.patch # 547245 - blkid does not recognize Adaptec HostRAID members Patch11: util-linux-ng-2.16-blkid-ataraid.patch +# 557831 - blkid detects ext4 fs as minix fs +Patch12: util-linux-ng-2.16-blkid-minix.patch +# 494070 - Anaconda tries to mount zfs filesystem as EXT3 and install fails +Patch13: util-linux-ng-2.16-blkid-zfs.patch + %description The util-linux-ng package contains a large variety of low-level system @@ -210,6 +215,8 @@ cp %{SOURCE8} %{SOURCE9} . %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 +%patch13 -p1 %build unset LINGUAS || : @@ -720,6 +727,10 @@ fi %changelog +* Wed Feb 17 2010 Karel Zak 2.16.2-6 +- fix #557831 - blkid detects ext4 fs as minix fs +- fix #494070 - Anaconda tries to mount zfs filesystem as EXT3 and install fails + * Tue Dec 15 2009 Karel Zak 2.16.2-5 - fix #547245 - blkid does not recognize Adaptec HostRAID members From b160158d1defb50a557122770bc5ebe74481f69b Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 22 Feb 2010 12:05:05 +0000 Subject: [PATCH 28/48] - upgrade to the final 2.17.1 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.1-Releas eNotes ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.1-Change Log --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 291fb7f..0e8589b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.17.1-rc1.tar.bz2 +util-linux-ng-2.17.1.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index 95d2f4f..609226f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -2fb632d41d4bb47b02a41ced45e4649f util-linux-ng-2.17.1-rc1.tar.bz2 +1771802e8f4c795f72f06efb1fc61587 util-linux-ng-2.17.1.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index e07f111..91b031c 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17.1 -Release: 0.1%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -715,6 +715,11 @@ fi %changelog +* Mon Feb 22 2010 Karel Zak 2.17.1-1 +- upgrade to the final 2.17.1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.1-ReleaseNotes + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.1-ChangeLog + * Tue Feb 16 2010 Karel Zak 2.17.1-0.1 - upgrade to 2.17.1-rc1 From c5424ee0fef357e9159b5a76fc7a2e5b96054022 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 22 Feb 2010 12:19:28 +0000 Subject: [PATCH 29/48] fix typo in spec file --- util-linux-ng.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 91b031c..decaa6a 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -7,7 +7,7 @@ License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Pu Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng -%define upstream_version %{version}-rc1 +%define upstream_version %{version} ### Features %if 0%{?rhel} From ea621fccb04b6838966167ac3fdbb26711f931fa Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 8 Mar 2010 12:19:54 +0000 Subject: [PATCH 30/48] - fix #570606 - blkid (and related) should be a bit more robust --- util-linux-ng-2.16-blkid-minix.patch | 24 ++++++++++++++++++------ util-linux-ng.spec | 6 +++++- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/util-linux-ng-2.16-blkid-minix.patch b/util-linux-ng-2.16-blkid-minix.patch index 00e5861..99c341d 100644 --- a/util-linux-ng-2.16-blkid-minix.patch +++ b/util-linux-ng-2.16-blkid-minix.patch @@ -1,8 +1,11 @@ diff -up util-linux-ng-2.16.2/shlibs/blkid/src/probers/minix.c.kzak util-linux-ng-2.16.2/shlibs/blkid/src/probers/minix.c --- util-linux-ng-2.16.2/shlibs/blkid/src/probers/minix.c.kzak 2009-11-30 12:37:08.000000000 +0100 -+++ util-linux-ng-2.16.2/shlibs/blkid/src/probers/minix.c 2010-02-17 10:33:53.000000000 +0100 -@@ -11,20 +11,84 @@ ++++ util-linux-ng-2.16.2/shlibs/blkid/src/probers/minix.c 2010-03-08 13:11:54.000000000 +0100 +@@ -9,22 +9,96 @@ + * GNU Lesser General Public License. + */ ++#include #include "blkidP.h" +struct minix_super_block { @@ -39,6 +42,7 @@ diff -up util-linux-ng-2.16.2/shlibs/blkid/src/probers/minix.c.kzak util-linux-n + static int probe_minix(blkid_probe pr, const struct blkid_idmag *mag) { ++ unsigned char *ext; + int version; + /* for more details see magic strings below */ @@ -54,11 +58,11 @@ diff -up util-linux-ng-2.16.2/shlibs/blkid/src/probers/minix.c.kzak util-linux-n case '\115': - blkid_probe_set_version(pr, "3"); + version = 3; -+ break; + break; + default: + return -1; - break; - } ++ break; ++ } + + if (version <= 2) { + struct minix_super_block *sb; @@ -83,7 +87,15 @@ diff -up util-linux-ng-2.16.2/shlibs/blkid/src/probers/minix.c.kzak util-linux-n + if (!sb || sb->s_imap_blocks == 0 || sb->s_zmap_blocks == 0) + return -1; + -+ } + } ++ ++ /* unfortunately, some parts of ext3 is sometimes possible to ++ * interpreted as minix superblock. So check for extN magic ++ * string. (For extN magic string and offsets see ext.c.) ++ */ ++ ext = blkid_probe_get_buffer(pr, 0x400 + 0x38, 2); ++ if (ext && memcmp(ext, "\123\357", 2) == 0) ++ return -1; + + blkid_probe_sprintf_version(pr, "%d", version); return 0; diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 49d22b1..ffe2ecd 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16.2 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -114,6 +114,7 @@ Patch10: util-linux-ng-2.16-blkid-ntfs.patch # 547245 - blkid does not recognize Adaptec HostRAID members Patch11: util-linux-ng-2.16-blkid-ataraid.patch # 557831 - blkid detects ext4 fs as minix fs +# 570606 - blkid (and related) should be a bit more robust Patch12: util-linux-ng-2.16-blkid-minix.patch # 494070 - Anaconda tries to mount zfs filesystem as EXT3 and install fails Patch13: util-linux-ng-2.16-blkid-zfs.patch @@ -727,6 +728,9 @@ fi %changelog +* Mon Mar 8 2010 Karel Zak 2.16.2-7 +- fix #570606 - blkid (and related) should be a bit more robust + * Wed Feb 17 2010 Karel Zak 2.16.2-6 - fix #557831 - blkid detects ext4 fs as minix fs - fix #494070 - Anaconda tries to mount zfs filesystem as EXT3 and install fails From ad3276c60edc555c50209cd7dce23ade5c36f0e0 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 11 Mar 2010 22:10:59 +0000 Subject: [PATCH 31/48] - fix #533874 - libblkid should allow scanning of slow devices (eg. cdroms) --- util-linux-ng-2.17-blkid-removable.patch | 302 +++++++++++++++++++++++ util-linux-ng.spec | 10 +- 2 files changed, 310 insertions(+), 2 deletions(-) create mode 100644 util-linux-ng-2.17-blkid-removable.patch diff --git a/util-linux-ng-2.17-blkid-removable.patch b/util-linux-ng-2.17-blkid-removable.patch new file mode 100644 index 0000000..86c0669 --- /dev/null +++ b/util-linux-ng-2.17-blkid-removable.patch @@ -0,0 +1,302 @@ +diff -up util-linux-ng-2.17.1/include/pathnames.h.kzak util-linux-ng-2.17.1/include/pathnames.h +--- util-linux-ng-2.17.1/include/pathnames.h.kzak 2010-02-22 09:41:10.000000000 +0100 ++++ util-linux-ng-2.17.1/include/pathnames.h 2010-02-23 10:25:52.000000000 +0100 +@@ -76,6 +76,8 @@ + #define _PATH_PROC_PARTITIONS "/proc/partitions" + #define _PATH_PROC_DEVICES "/proc/devices" + ++#define _PATH_SYS_BLOCK "/sys/block" ++ + #ifndef _PATH_MOUNTED + # ifdef MOUNTED /* deprecated */ + # define _PATH_MOUNTED MOUNTED +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/blkid.h.in.kzak util-linux-ng-2.17.1/shlibs/blkid/src/blkid.h.in +--- util-linux-ng-2.17.1/shlibs/blkid/src/blkid.h.in.kzak 2010-02-22 09:41:11.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/blkid.h.in 2010-02-23 10:25:52.000000000 +0100 +@@ -142,6 +142,7 @@ extern int blkid_devno_to_wholedisk(dev_ + /* devname.c */ + extern int blkid_probe_all(blkid_cache cache); + extern int blkid_probe_all_new(blkid_cache cache); ++extern int blkid_probe_all_removable(blkid_cache cache); + extern blkid_dev blkid_get_dev(blkid_cache cache, const char *devname, + int flags); + +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h.kzak util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h +--- util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h.kzak 2010-02-23 10:21:19.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h 2010-02-23 10:25:52.000000000 +0100 +@@ -51,6 +51,7 @@ struct blkid_struct_dev + + #define BLKID_BID_FL_VERIFIED 0x0001 /* Device data validated from disk */ + #define BLKID_BID_FL_INVALID 0x0004 /* Device is invalid */ ++#define BLKID_BID_FL_REMOVABLE 0x0008 /* Device added by blkid_probe_all_removable() */ + + /* + * Each tag defines a NAME=value pair for a particular device. The tags +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/blkid.sym.kzak util-linux-ng-2.17.1/shlibs/blkid/src/blkid.sym +--- util-linux-ng-2.17.1/shlibs/blkid/src/blkid.sym.kzak 2010-02-22 09:41:11.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/blkid.sym 2010-02-23 10:25:52.000000000 +0100 +@@ -114,3 +114,11 @@ global: + blkid_topology_get_optimal_io_size; + blkid_topology_get_physical_sector_size; + } BLKID_2.15; ++ ++/* ++ * version(s) since util-linux-ng 2.18 ++ */ ++BLKID_2.18 { ++global: ++ blkid_probe_all_removable; ++} BLKID_2.17; +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/devname.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/devname.c +--- util-linux-ng-2.17.1/shlibs/blkid/src/devname.c.kzak 2010-02-22 09:41:12.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/devname.c 2010-02-23 10:25:52.000000000 +0100 +@@ -21,6 +21,7 @@ + #endif + #include + #include ++#include + #if HAVE_SYS_TYPES_H + #include + #endif +@@ -37,7 +38,9 @@ + #include + + #include "blkidP.h" ++ + #include "canonicalize.h" /* $(top_srcdir)/include */ ++#include "pathnames.h" + + /* + * Find a dev struct in the cache by device name, if available. +@@ -156,7 +159,7 @@ static int is_dm_leaf(const char *devnam + * Probe a single block device to add to the device cache. + */ + static void probe_one(blkid_cache cache, const char *ptname, +- dev_t devno, int pri, int only_if_new) ++ dev_t devno, int pri, int only_if_new, int removable) + { + blkid_dev dev = NULL; + struct list_head *p, *pnext; +@@ -236,6 +239,8 @@ set_pri: + dev->bid_pri += 5; + } else if (!strncmp(ptname, "md", 2)) + dev->bid_pri = BLKID_PRI_MD; ++ if (removable) ++ dev->bid_flags |= BLKID_BID_FL_REMOVABLE; + } + return; + } +@@ -327,7 +332,7 @@ static void lvm_probe_all(blkid_cache ca + lvm_device, + (unsigned int) dev)); + probe_one(cache, lvm_device, dev, BLKID_PRI_LVM, +- only_if_new); ++ only_if_new, 0); + free(lvm_device); + } + closedir(lv_list); +@@ -359,7 +364,7 @@ evms_probe_all(blkid_cache cache, int on + device, ma, mi)); + + probe_one(cache, device, makedev(ma, mi), BLKID_PRI_EVMS, +- only_if_new); ++ only_if_new, 0); + num++; + } + fclose(procpt); +@@ -407,7 +412,7 @@ ubi_probe_all(blkid_cache cache, int onl + continue; + DBG(DEBUG_DEVNAME, printf("UBI vol %s/%s: devno 0x%04X\n", + *dirname, name, (int) dev)); +- probe_one(cache, name, dev, BLKID_PRI_UBI, only_if_new); ++ probe_one(cache, name, dev, BLKID_PRI_UBI, only_if_new, 0); + } + closedir(dir); + } +@@ -484,7 +489,7 @@ static int probe_all(blkid_cache cache, + + if (sz > 1) + probe_one(cache, ptname, devs[which], 0, +- only_if_new); ++ only_if_new, 0); + lens[which] = 0; /* mark as checked */ + } + +@@ -521,20 +526,81 @@ static int probe_all(blkid_cache cache, + printf("whole dev %s, devno 0x%04X\n", + ptnames[last], (unsigned int) devs[last])); + probe_one(cache, ptnames[last], devs[last], 0, +- only_if_new); ++ only_if_new, 0); + lens[last] = 0; + } + } + + /* Handle the last device if it wasn't partitioned */ + if (lens[which]) +- probe_one(cache, ptname, devs[which], 0, only_if_new); ++ probe_one(cache, ptname, devs[which], 0, only_if_new, 0); + + fclose(proc); + blkid_flush_cache(cache); + return 0; + } + ++/* Don't use it by default -- it's pretty slow (because cdroms, floppy, ...) ++ */ ++static int probe_all_removable(blkid_cache cache) ++{ ++ DIR *dir; ++ struct dirent *d; ++ char buf[PATH_MAX]; ++ ++ if (!cache) ++ return -BLKID_ERR_PARAM; ++ ++ dir = opendir(_PATH_SYS_BLOCK); ++ if (!dir) ++ return -BLKID_ERR_PROC; ++ ++ while((d = readdir(dir))) { ++ int fd, rc, ma, mi; ++ ++#ifdef _DIRENT_HAVE_D_TYPE ++ if (d->d_type != DT_UNKNOWN && d->d_type != DT_LNK) ++ continue; ++#endif ++ if (d->d_name[0] == '.' && ++ ((d->d_name[1] == 0) || ++ ((d->d_name[1] == '.') && (d->d_name[2] == 0)))) ++ continue; ++ ++ snprintf(buf, sizeof(buf), "%s/removable", d->d_name); ++ fd = blkid_openat(dir, _PATH_SYS_BLOCK, buf, O_RDONLY); ++ if (fd < 0) ++ continue; ++ ++ rc = read(fd, buf, 1); ++ close(fd); ++ ++ if (rc != 1 || *buf != '1') ++ continue; /* not removable device */ ++ ++ /* get devno */ ++ snprintf(buf, sizeof(buf), "%s/dev", d->d_name); ++ fd = blkid_openat(dir, _PATH_SYS_BLOCK, buf, O_RDONLY); ++ if (fd < 0) ++ continue; ++ ++ rc = read(fd, buf, sizeof(buf)); ++ close(fd); ++ ++ if (rc < 3) ++ continue; /* M:N */ ++ buf[rc] = '\0'; ++ if (sscanf(buf, "%d:%d", &ma, &mi) != 2) ++ continue; ++ ++ probe_one(cache, d->d_name, makedev(ma, mi), 0, 0, 1); ++ } ++ ++ closedir(dir); ++ return 0; ++} ++ ++ + /** + * blkid_probe_all: + * @cache: cache handler +@@ -573,6 +639,33 @@ int blkid_probe_all_new(blkid_cache cach + return ret; + } + ++/** ++ * blkid_probe_all_removable: ++ * @cache: cache handler ++ * ++ * The libblkid probing is based on devices from /proc/partitions by default. ++ * This file usually does not contain removable devices (e.g. CDROMs) and this kind ++ * of devices are invisible for libblkid. ++ * ++ * This function adds removable block devices to @cache (probing is based on ++ * information from the /sys directory). Don't forget that removable devices ++ * (floppies, CDROMs, ...) could be pretty slow. It's very bad idea to call ++ * this function by default. ++ * ++ * Note that devices which were detected by this function won't be written to ++ * blkid.tab cache file. ++ * ++ * Returns: 0 on success, or number less than zero in case of error. ++ */ ++int blkid_probe_all_removable(blkid_cache cache) ++{ ++ int ret; ++ ++ DBG(DEBUG_PROBE, printf("Begin blkid_probe_all_removable()\n")); ++ ret = probe_all_removable(cache); ++ DBG(DEBUG_PROBE, printf("End blkid_probe_all_removable()\n")); ++ return ret; ++} + + #ifdef TEST_PROGRAM + int main(int argc, char **argv) +@@ -594,6 +687,9 @@ int main(int argc, char **argv) + if (blkid_probe_all(cache) < 0) + printf("%s: error probing devices\n", argv[0]); + ++ if (blkid_probe_all_removable(cache) < 0) ++ printf("%s: error probing removable devices\n", argv[0]); ++ + blkid_put_cache(cache); + return (0); + } +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/devno.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/devno.c +--- util-linux-ng-2.17.1/shlibs/blkid/src/devno.c.kzak 2010-02-22 09:41:12.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/devno.c 2010-02-23 10:25:52.000000000 +0100 +@@ -95,14 +95,30 @@ int blkid_fstatat(DIR *dir, const char * + return fstatat(dirfd(dir), filename, st, + nofollow ? AT_SYMLINK_NOFOLLOW : 0); + #else +- char device[PATH_MAX]; ++ char path[PATH_MAX]; ++ int len; ++ ++ len = snprintf(path, sizeof(path), "%s/%s", dirname, filename); ++ if (len < 0 || len + 1 > sizeof(path)) ++ return -1; ++ ++ return nofollow ? lstat(path, st) : stat(path, st); ++#endif ++} ++ ++int blkid_openat(DIR *dir, const char *dirname, const char *filename, int flags) ++{ ++#ifdef HAVE_FSTATAT ++ return openat(dirfd(dir), filename, flags); ++#else ++ char path[PATH_MAX]; + int len; + +- len = snprintf(device, sizeof(device), "%s/%s", dirname, filename); +- if (len < 0 || len + 1 > sizeof(device)) ++ len = snprintf(path, sizeof(path), "%s/%s", dirname, filename); ++ if (len < 0 || len + 1 > sizeof(path)) + return -1; + +- return nofollow ? lstat(device, st) : stat(device, st); ++ return open(path, flags); + #endif + } + +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/save.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/save.c +--- util-linux-ng-2.17.1/shlibs/blkid/src/save.c.kzak 2010-02-22 09:41:12.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/save.c 2010-02-23 10:25:52.000000000 +0100 +@@ -119,7 +119,7 @@ int blkid_flush_cache(blkid_cache cache) + + list_for_each(p, &cache->bic_devs) { + blkid_dev dev = list_entry(p, struct blkid_struct_dev, bid_devs); +- if (!dev->bid_type) ++ if (!dev->bid_type || (dev->bid_flags & BLKID_BID_FL_REMOVABLE)) + continue; + if ((ret = save_dev(dev, file)) < 0) + break; diff --git a/util-linux-ng.spec b/util-linux-ng.spec index decaa6a..3b902b7 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,8 +2,8 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17.1 -Release: 1%{?dist} -License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain +Release: 2%{?dist} +License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and MIT and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -103,6 +103,8 @@ Patch5: util-linux-ng-2.16-blkid-cachefile.patch Patch7: util-linux-ng-2.13-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux Patch8: util-linux-ng-2.15-ipcs-32bit.patch +# 533874 - RFE: libblkid should allow the developer to ask for scanning of slow devices (eg. cdroms) +Patch9: util-linux-ng-2.17-blkid-removable.patch %description The util-linux-ng package contains a large variety of low-level system @@ -196,6 +198,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch5 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %build unset LINGUAS || : @@ -715,6 +718,9 @@ fi %changelog +* Thu Mar 11 2010 Karel Zak 2.17.1-2 +- fix #533874 - libblkid should allow scanning of slow devices (eg. cdroms) + * Mon Feb 22 2010 Karel Zak 2.17.1-1 - upgrade to the final 2.17.1 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.1-ReleaseNotes From cc2529dc647e4c59f952305040cd7210acb5c4fb Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 12 Apr 2010 13:53:52 +0000 Subject: [PATCH 32/48] - fix #581252 - remounting tmpfs fails because of hidden rootcontext= --- mount.tmpfs | 13 ++++++++++--- util-linux-ng.spec | 5 ++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/mount.tmpfs b/mount.tmpfs index f862c03..1734f4e 100644 --- a/mount.tmpfs +++ b/mount.tmpfs @@ -10,11 +10,18 @@ # /sbin/mount.tmpfs spec dir [-sfnv] [-o options] # -if ! echo "$@" | grep -q -E '(fs|def|root)?context='; then - con=$(ls --scontext -d "$2" | cut -f 1 -d ' ') - if [ -n "$con" ] && [ "$con" != "?" ] && [ "$con" != "unlabeled" ]; then +# Remount with context mount options is unsupported +# http://bugzilla.redhat.com/show_bug.cgi?id=563267 +# +if ! echo "$@" | grep -q -E '\-o.*remount'; then + + if ! echo "$@" | grep -q -E '(fs|def|root)?context='; then + con=$(ls --scontext -d "$2" | cut -f 1 -d ' ') + if [ -n "$con" ] && [ "$con" != "?" ] && [ "$con" != "unlabeled" ]; then exec /bin/mount "$@" -o "rootcontext=\"$con\"" -i -t tmpfs + fi fi + fi exec /bin/mount "$@" -i -t tmpfs diff --git a/util-linux-ng.spec b/util-linux-ng.spec index ffe2ecd..c6dfe39 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16.2 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -728,6 +728,9 @@ fi %changelog +* Mon Apr 12 2010 Karel Zak 2.16.2-8 +- fix #581252 - remounting tmpfs fails because of hidden rootcontext= + * Mon Mar 8 2010 Karel Zak 2.16.2-7 - fix #570606 - blkid (and related) should be a bit more robust From ac8c6510b05b9435d1c62fe2d9669ac444de899f Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 12 Apr 2010 15:02:58 +0000 Subject: [PATCH 33/48] - fix #581252 - remounting tmpfs fails because of hidden rootcontext= - fix #580296 - "rtcwake" does miss the "off" option - fix #575734 - use microsecond resolution for blkid cache entries - upgrade to the bugfix release 2.17.2 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.2-Releas eNotes ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.2-Change Log - minor fixed in spec file --- .cvsignore | 2 +- mount.tmpfs | 15 +- sources | 2 +- util-linux-ng-2.17-blkid-usec.patch | 221 +++++++++++++++++++++++++++ util-linux-ng-2.17-rtcwake-off.patch | 71 +++++++++ util-linux-ng.spec | 24 ++- 6 files changed, 326 insertions(+), 9 deletions(-) create mode 100644 util-linux-ng-2.17-blkid-usec.patch create mode 100644 util-linux-ng-2.17-rtcwake-off.patch diff --git a/.cvsignore b/.cvsignore index 0e8589b..d5e246a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.17.1.tar.bz2 floppy-0.16.tar.bz2 +util-linux-ng-2.17.2.tar.bz2 diff --git a/mount.tmpfs b/mount.tmpfs index e37f735..c0862eb 100644 --- a/mount.tmpfs +++ b/mount.tmpfs @@ -18,11 +18,18 @@ case $1 in ;; esac -if ! echo "$@" | grep -q -E '(fs|def|root)?context='; then - con=$(ls --scontext -d "$2" | cut -f 1 -d ' ') - if [ -n "$con" ] && [ "$con" != "?" ] && [ "$con" != "unlabeled" ]; then - exec /bin/mount "$@" -o "rootcontext=\"$con\"" -i -t tmpfs +# Remount with context mount options is unsupported +# http://bugzilla.redhat.com/show_bug.cgi?id=563267 +# +if ! echo "$@" | grep -q -E '\-o.*remount'; then + + if ! echo "$@" | grep -q -E '(fs|def|root)?context='; then + con=$(ls --scontext -d "$2" | cut -f 1 -d ' ') + if [ -n "$con" ] && [ "$con" != "?" ] && [ "$con" != "unlabeled" ]; then + exec /bin/mount "$@" -o "rootcontext=\"$con\"" -i -t tmpfs + fi fi + fi exec /bin/mount "$@" -i -t tmpfs diff --git a/sources b/sources index 609226f..53ca2bc 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -1771802e8f4c795f72f06efb1fc61587 util-linux-ng-2.17.1.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 +4635725a3eef1c57090bac8ea5e082e6 util-linux-ng-2.17.2.tar.bz2 diff --git a/util-linux-ng-2.17-blkid-usec.patch b/util-linux-ng-2.17-blkid-usec.patch new file mode 100644 index 0000000..8070d51 --- /dev/null +++ b/util-linux-ng-2.17-blkid-usec.patch @@ -0,0 +1,221 @@ + +This is backport from upstream, this version of the patch requires glibc and +kernel >= 2.5.48. The stat.st_mtim availability is not checked to avoid changes +to ./configure script. It should be fine for Fedora/RHEL. --kzak 18-Mar-2010 + + +commit message from the original patch: + +commit 6c2f2b9d62b196296e827f8bb7336a39e80695a9 +Author: Karel Zak +Date: Wed Mar 17 14:49:14 2010 +0100 + + libblkid: add microsecond resolution for cache entries + + The libblkid library uses stat.st_mtine to detect changes on the + device. The last update time of of the device in the cache is stored + as TIME= tag in the /etc/blkid.tab file. + + Linux since 2.5.48 supports nanosecond resolution and more precise + time is available in the stat.st_mtim timespec struct. + + This patch add microsecond precision to TIME= tag in the cache file, + old format: + + TIME="" + + the new format: + + TIME="." + + This change is backwardly compatible. + + Now, the blkid_verify() function checks stat.st_mtime and + stat.st_mtim.tv_nsec/1000. + + Test: + + # e2label /dev/sdb1 AAAA + + old version: + + # blkid -s LABEL /dev/sdb1; e2label /dev/sdb1 BBBB; blkid -s LABEL /dev/sdb1 + /dev/sdb1: LABEL="AAAA" + /dev/sdb1: LABEL="AAAA" + + new version: + + # blkid -s LABEL /dev/sdb1; e2label /dev/sdb1 BBBB; blkid -s LABEL /dev/sdb1 + /dev/sdb1: LABEL="AAAA" + /dev/sdb1: LABEL="BBBB" + + Signed-off-by: Karel Zak + + +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h.kzak util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h +--- util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h.kzak 2010-03-18 14:48:12.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h 2010-03-18 15:01:36.000000000 +0100 +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -28,6 +29,9 @@ + #include "blkid.h" + #include "list.h" + ++/* enable microsecond resolution for the cache */ ++#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 ++ + /* + * This describes the attributes of a specific device. + * We can traverse all of the tags by bid_tags (linking to the tag bit_names). +@@ -44,6 +48,7 @@ struct blkid_struct_dev + int bid_pri; /* Device priority */ + dev_t bid_devno; /* Device major/minor number */ + time_t bid_time; /* Last update time of device */ ++ suseconds_t bid_utime; /* Last update time (microseconds) */ + unsigned int bid_flags; /* Device status bitflags */ + char *bid_label; /* Shortcut to device LABEL */ + char *bid_uuid; /* Shortcut to binary UUID */ +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/dev.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/dev.c +--- util-linux-ng-2.17.1/shlibs/blkid/src/dev.c.kzak 2010-02-04 12:53:58.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/dev.c 2010-03-18 14:58:23.000000000 +0100 +@@ -84,7 +84,7 @@ void blkid_debug_dump_dev(blkid_dev dev) + + printf(" dev: name = %s\n", dev->bid_name); + printf(" dev: DEVNO=\"0x%0llx\"\n", (long long)dev->bid_devno); +- printf(" dev: TIME=\"%ld\"\n", (long)dev->bid_time); ++ printf(" dev: TIME=\"%ld.%ld\"\n", (long)dev->bid_time, (long)dev->bid_utime); + printf(" dev: PRI=\"%d\"\n", dev->bid_pri); + printf(" dev: flags = 0x%08X\n", dev->bid_flags); + +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/read.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/read.c +--- util-linux-ng-2.17.1/shlibs/blkid/src/read.c.kzak 2010-02-04 12:53:58.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/read.c 2010-03-18 14:58:23.000000000 +0100 +@@ -49,7 +49,8 @@ static void debug_dump_dev(blkid_dev dev + * + * The following tags are required for each entry: + * unique (within this file) ID number of this device +- * (ascii time_t) time this entry was last read from disk ++ * (time_t and suseconds_t) time this entry was last ++ * read from disk + * (detected) type of filesystem/data for this partition + * + * The following tags may be present, depending on the device contents +@@ -318,9 +319,12 @@ static int parse_tag(blkid_cache cache, + dev->bid_devno = STRTOULL(value, 0, 0); + else if (!strcmp(name, "PRI")) + dev->bid_pri = strtol(value, 0, 0); +- else if (!strcmp(name, "TIME")) +- dev->bid_time = STRTOULL(value, 0, 0); +- else ++ else if (!strcmp(name, "TIME")) { ++ char *end = NULL; ++ dev->bid_time = STRTOULL(value, &end, 0); ++ if (end && *end == '.') ++ dev->bid_utime = STRTOULL(end + 1, 0, 0); ++ } else + ret = blkid_set_tag(dev, name, value, strlen(value)); + + DBG(DEBUG_READ, printf(" tag: %s=\"%s\"\n", name, value)); +@@ -455,7 +459,7 @@ static void debug_dump_dev(blkid_dev dev + + printf(" dev: name = %s\n", dev->bid_name); + printf(" dev: DEVNO=\"0x%0llx\"\n", (long long)dev->bid_devno); +- printf(" dev: TIME=\"%lld\"\n", (long long)dev->bid_time); ++ printf(" dev: TIME=\"%ld.%ld\"\n", (long)dev->bid_time, (long)dev->bid_utime); + printf(" dev: PRI=\"%d\"\n", dev->bid_pri); + printf(" dev: flags = 0x%08X\n", dev->bid_flags); + +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/save.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/save.c +--- util-linux-ng-2.17.1/shlibs/blkid/src/save.c.kzak 2010-02-22 09:41:12.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/save.c 2010-03-18 14:58:23.000000000 +0100 +@@ -37,9 +37,11 @@ static int save_dev(blkid_dev dev, FILE + printf("device %s, type %s\n", dev->bid_name, dev->bid_type ? + dev->bid_type : "(null)")); + +- fprintf(file, +- "bid_devno, (long) dev->bid_time); ++ fprintf(file, "bid_devno, ++ (long) dev->bid_time, ++ (long) dev->bid_utime); ++ + if (dev->bid_pri) + fprintf(file, " PRI=\"%d\"", dev->bid_pri); + list_for_each(p, &dev->bid_tags) { +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/verify.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/verify.c +--- util-linux-ng-2.17.1/shlibs/blkid/src/verify.c.kzak 2010-02-04 12:53:58.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/verify.c 2010-03-18 14:58:23.000000000 +0100 +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + #include + #ifdef HAVE_SYS_STAT_H + #include +@@ -73,19 +74,34 @@ blkid_dev blkid_verify(blkid_cache cache + return NULL; + } + +- if ((now >= dev->bid_time) && +- (st.st_mtime <= dev->bid_time) && +- ((diff < BLKID_PROBE_MIN) || +- (dev->bid_flags & BLKID_BID_FL_VERIFIED && +- diff < BLKID_PROBE_INTERVAL))) ++ if (now >= dev->bid_time && ++#ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC ++ (st.st_mtime < dev->bid_time || ++ (st.st_mtime == dev->bid_time && ++ st.st_mtim.tv_nsec / 1000 <= dev->bid_utime)) && ++#else ++ st.st_mtime <= dev->bid_time && ++#endif ++ (diff < BLKID_PROBE_MIN || ++ (dev->bid_flags & BLKID_BID_FL_VERIFIED && ++ diff < BLKID_PROBE_INTERVAL))) + return dev; + ++#ifndef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC + DBG(DEBUG_PROBE, + printf("need to revalidate %s (cache time %lu, stat time %lu,\n\t" + "time since last check %lu)\n", + dev->bid_name, (unsigned long)dev->bid_time, + (unsigned long)st.st_mtime, (unsigned long)diff)); +- ++#else ++ DBG(DEBUG_PROBE, ++ printf("need to revalidate %s (cache time %lu.%lu, stat time %lu.%lu,\n\t" ++ "time since last check %lu)\n", ++ dev->bid_name, ++ (unsigned long)dev->bid_time, (unsigned long)dev->bid_utime, ++ (unsigned long)st.st_mtime, (unsigned long)st.st_mtim.tv_nsec / 1000, ++ (unsigned long)diff)); ++#endif + + if (!cache->probe) { + cache->probe = blkid_new_probe(); +@@ -156,8 +172,16 @@ blkid_dev blkid_verify(blkid_cache cache + + found_type: + if (dev) { ++#ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC ++ struct timeval tv; ++ if (!gettimeofday(&tv, NULL)) { ++ dev->bid_time = tv.tv_sec; ++ dev->bid_utime = tv.tv_usec; ++ } else ++#endif ++ dev->bid_time = time(0); ++ + dev->bid_devno = st.st_rdev; +- dev->bid_time = time(0); + dev->bid_flags |= BLKID_BID_FL_VERIFIED; + cache->bic_flags |= BLKID_BIC_FL_CHANGED; + diff --git a/util-linux-ng-2.17-rtcwake-off.patch b/util-linux-ng-2.17-rtcwake-off.patch new file mode 100644 index 0000000..473c7ef --- /dev/null +++ b/util-linux-ng-2.17-rtcwake-off.patch @@ -0,0 +1,71 @@ +From ecd55f9647d139784857df994d0f5b965d164547 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 8 Apr 2010 08:51:00 +0200 +Subject: [PATCH 1/2] rtcwake: does miss the "off" option + +Reported-by: Piergiorgio Sartor +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=580296 +Signed-off-by: Karel Zak +--- + sys-utils/rtcwake.c | 24 +++++++++++++++++++----- + 1 files changed, 19 insertions(+), 5 deletions(-) + +diff --git a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c +index 7b2df26..344fed7 100644 +--- a/sys-utils/rtcwake.c ++++ b/sys-utils/rtcwake.c +@@ -468,15 +468,19 @@ int main(int argc, char **argv) + fflush(stdout); + usleep(10 * 1000); + +- if (strcmp(suspend, "no") == 0) ++ if (strcmp(suspend, "no") == 0) { ++ if (verbose) ++ printf(_("suspend mode: no; leaving\n")); ++ close(fd); + exit(EXIT_SUCCESS); +- else if (strcmp(suspend, "on") != 0) { +- sync(); +- suspend_system(suspend); ++ + } else if (strcmp(suspend, "off") == 0) { + char *arg[4]; + int i = 0; + ++ if (verbose) ++ printf(_("suspend mode: off; executing %s\n"), ++ _PATH_SHUTDOWN); + arg[i++] = _PATH_SHUTDOWN; + arg[i++] = "-P"; + arg[i++] = "now"; +@@ -487,9 +491,13 @@ int main(int argc, char **argv) + fprintf(stderr, _("%s: unable to execute %s: %s\n"), + progname, _PATH_SHUTDOWN, strerror(errno)); + rc = EXIT_FAILURE; +- } else { ++ ++ } else if (strcmp(suspend, "on") == 0) { + unsigned long data; + ++ if (verbose) ++ printf(_("suspend mode: on; reading rtc\n")); ++ + do { + t = read(fd, &data, sizeof data); + if (t < 0) { +@@ -499,6 +507,12 @@ int main(int argc, char **argv) + if (verbose) + printf("... %s: %03lx\n", devname, data); + } while (!(data & RTC_AF)); ++ ++ } else { ++ if (verbose) ++ printf(_("suspend mode: %s; suspending system\n"), suspend); ++ sync(); ++ suspend_system(suspend); + } + + if (ioctl(fd, RTC_AIE_OFF, 0) < 0) +-- +1.6.6 + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 3b902b7..3ec3fbb 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,9 +1,9 @@ ### Header Summary: A collection of basic system utilities Name: util-linux-ng -Version: 2.17.1 -Release: 2%{?dist} -License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and MIT and BSD with advertising and Public Domain +Version: 2.17.2 +Release: 1%{?dist} +License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -103,8 +103,15 @@ Patch5: util-linux-ng-2.16-blkid-cachefile.patch Patch7: util-linux-ng-2.13-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux Patch8: util-linux-ng-2.15-ipcs-32bit.patch + +### Upstream Patches +### # 533874 - RFE: libblkid should allow the developer to ask for scanning of slow devices (eg. cdroms) Patch9: util-linux-ng-2.17-blkid-removable.patch +# 575734 - use microsecond resolution for blkid cache entries +Patch10: util-linux-ng-2.17-blkid-usec.patch +# 580296 - "rtcwake" does miss the "off" option +Patch11: util-linux-ng-2.17-rtcwake-off.patch %description The util-linux-ng package contains a large variety of low-level system @@ -199,6 +206,8 @@ cp %{SOURCE8} %{SOURCE9} . %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 +%patch11 -p1 %build unset LINGUAS || : @@ -718,6 +727,15 @@ fi %changelog +* Mon Apr 12 2010 Karel Zak 2.17.2-1 +- fix #581252 - remounting tmpfs fails because of hidden rootcontext= +- fix #580296 - "rtcwake" does miss the "off" option +- fix #575734 - use microsecond resolution for blkid cache entries +- upgrade to the bugfix release 2.17.2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.2-ReleaseNotes + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.2-ChangeLog +- minor fixed in spec file + * Thu Mar 11 2010 Karel Zak 2.17.1-2 - fix #533874 - libblkid should allow scanning of slow devices (eg. cdroms) From ec700b7502182dca6a96e3085bdb41bcb1d4ca50 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 12 Apr 2010 18:56:01 +0000 Subject: [PATCH 34/48] - fix #577947 - need --no-canonicalize option for mount --- util-linux-ng-2.16-mount-nocanonicalize.patch | 148 ++++++++++++++++++ util-linux-ng.spec | 9 +- 2 files changed, 155 insertions(+), 2 deletions(-) create mode 100644 util-linux-ng-2.16-mount-nocanonicalize.patch diff --git a/util-linux-ng-2.16-mount-nocanonicalize.patch b/util-linux-ng-2.16-mount-nocanonicalize.patch new file mode 100644 index 0000000..1030021 --- /dev/null +++ b/util-linux-ng-2.16-mount-nocanonicalize.patch @@ -0,0 +1,148 @@ +diff -up util-linux-ng-2.16.2/mount/mount.8.kzak util-linux-ng-2.16.2/mount/mount.8 +--- util-linux-ng-2.16.2/mount/mount.8.kzak 2009-11-30 15:54:35.000000000 +0100 ++++ util-linux-ng-2.16.2/mount/mount.8 2010-04-12 17:32:22.000000000 +0200 +@@ -439,6 +439,14 @@ This is necessary for example when + .I /etc + is on a read-only filesystem. + .TP ++.B \-\-no\-canonicalize ++Don't canonicalize paths. The mount command canonicalizes all paths ++(from command line or fstab) and stores canonicalized paths to the ++.IR /etc/mtab ++file. This option can be used together with the ++.B \-f ++flag for already canonicalized absolut paths. ++.TP + .BI \-p " num" + In case of a loop mount with encryption, read the passphrase from + file descriptor +diff -up util-linux-ng-2.16.2/mount/mount.c.kzak util-linux-ng-2.16.2/mount/mount.c +--- util-linux-ng-2.16.2/mount/mount.c.kzak 2010-04-12 17:40:39.000000000 +0200 ++++ util-linux-ng-2.16.2/mount/mount.c 2010-04-12 17:34:34.000000000 +0200 +@@ -1878,6 +1878,7 @@ static struct option longopts[] = { + { "make-rslave", 0, 0, 141 }, + { "make-rprivate", 0, 0, 142 }, + { "make-runbindable", 0, 0, 143 }, ++ { "no-canonicalize", 0, 0, 144 }, + { "internal-only", 0, 0, 'i' }, + { NULL, 0, 0, 0 } + }; +@@ -2170,7 +2171,9 @@ main(int argc, char *argv[]) { + case 143: + mounttype = (MS_UNBINDABLE | MS_REC); + break; +- ++ case 144: ++ nocanonicalize = 1; ++ break; + case '?': + default: + usage (stderr, EX_USAGE); +@@ -2209,7 +2212,8 @@ main(int argc, char *argv[]) { + + if (restricted && + (types || options || readwrite || nomtab || mount_all || +- fake || mounttype || (argc + specseen) != 1)) { ++ nocanonicalize || fake || mounttype || (argc + specseen) != 1)) { ++ + die (EX_USAGE, _("mount: only root can do that")); + } + +diff -up util-linux-ng-2.16.2/mount/sundries.c.kzak util-linux-ng-2.16.2/mount/sundries.c +--- util-linux-ng-2.16.2/mount/sundries.c.kzak 2009-11-30 15:42:33.000000000 +0100 ++++ util-linux-ng-2.16.2/mount/sundries.c 2010-04-12 17:29:49.000000000 +0200 +@@ -21,6 +21,7 @@ + + int mount_quiet; + int verbose; ++int nocanonicalize; + char *progname; + + char * +@@ -270,9 +271,9 @@ canonicalize_spec (const char *path) + { + char *res; + +- if (path == NULL) ++ if (!path) + return NULL; +- if (is_pseudo_fs(path)) ++ if (nocanonicalize || is_pseudo_fs(path)) + return xstrdup(path); + + res = canonicalize_path(path); +@@ -283,8 +284,14 @@ canonicalize_spec (const char *path) + + char *canonicalize (const char *path) + { +- char *res = canonicalize_path(path); ++ char *res; + ++ if (!path) ++ return NULL; ++ else if (nocanonicalize) ++ return xstrdup(path); ++ ++ res = canonicalize_path(path); + if (!res) + die(EX_SYSERR, _("not enough memory")); + return res; +diff -up util-linux-ng-2.16.2/mount/sundries.h.kzak util-linux-ng-2.16.2/mount/sundries.h +--- util-linux-ng-2.16.2/mount/sundries.h.kzak 2009-10-16 22:50:03.000000000 +0200 ++++ util-linux-ng-2.16.2/mount/sundries.h 2010-04-12 17:29:49.000000000 +0200 +@@ -16,6 +16,7 @@ + /* global mount, umount, and losetup variables */ + extern int mount_quiet; + extern int verbose; ++extern int nocanonicalize; + extern char *progname; + + #define streq(s, t) (strcmp ((s), (t)) == 0) +diff -up util-linux-ng-2.16.2/mount/umount.8.kzak util-linux-ng-2.16.2/mount/umount.8 +--- util-linux-ng-2.16.2/mount/umount.8.kzak 2009-10-16 22:50:03.000000000 +0200 ++++ util-linux-ng-2.16.2/mount/umount.8 2010-04-12 17:34:44.000000000 +0200 +@@ -119,6 +119,10 @@ Lazy unmount. Detach the filesystem from + and cleanup all references to the filesystem as soon as it is not busy + anymore. + (Requires kernel 2.4.11 or later.) ++.IP "\fB\-\-no\-canonicalize\fP" ++Don't canonicalize paths. For more details about this option see the ++.B mount(8) ++man page. + + .SH "THE LOOP DEVICE" + The +diff -up util-linux-ng-2.16.2/mount/umount.c.kzak util-linux-ng-2.16.2/mount/umount.c +--- util-linux-ng-2.16.2/mount/umount.c.kzak 2009-10-16 22:50:03.000000000 +0200 ++++ util-linux-ng-2.16.2/mount/umount.c 2010-04-12 17:34:44.000000000 +0200 +@@ -388,6 +388,8 @@ static struct option longopts[] = + { "version", 0, 0, 'V' }, + { "read-only", 0, 0, 'r' }, + { "types", 1, 0, 't' }, ++ ++ { "no-canonicalize", 0, 0, 144 }, + { NULL, 0, 0, 0 } + }; + +@@ -672,7 +674,10 @@ main (int argc, char *argv[]) { + types = optarg; + break; + case 'i': +- external_allowed = 0; ++ external_allowed = 0; ++ break; ++ case 144: ++ nocanonicalize = 1; + break; + case 0: + break; +@@ -691,7 +696,8 @@ main (int argc, char *argv[]) { + } + } + +- if (restricted && (all || types || nomtab || force || remount)) { ++ if (restricted && ++ (all || types || nomtab || force || remount || nocanonicalize)) { + die (2, _("umount: only root can do that")); + } + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index c6dfe39..b86d572 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16.2 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -118,7 +118,8 @@ Patch11: util-linux-ng-2.16-blkid-ataraid.patch Patch12: util-linux-ng-2.16-blkid-minix.patch # 494070 - Anaconda tries to mount zfs filesystem as EXT3 and install fails Patch13: util-linux-ng-2.16-blkid-zfs.patch - +# 577947 - need --no-canonicalize option for mount +Patch14: util-linux-ng-2.16-mount-nocanonicalize.patch %description The util-linux-ng package contains a large variety of low-level system @@ -218,6 +219,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 %build unset LINGUAS || : @@ -728,6 +730,9 @@ fi %changelog +* Mon Apr 12 2010 Karel Zak 2.16.2-9 +- fix #577947 - need --no-canonicalize option for mount + * Mon Apr 12 2010 Karel Zak 2.16.2-8 - fix #581252 - remounting tmpfs fails because of hidden rootcontext= From b5c0655ff7acbc922ef7c1d6f29e86cb01eb2ee2 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 8 Jun 2010 08:06:15 +0000 Subject: [PATCH 35/48] - upgrade to the release 2.18-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseN otes ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc1-Chan geLog --- .cvsignore | 2 +- sources | 2 +- util-linux-ng-2.16-blkid-cachefile.patch | 43 +++++++++++++----------- util-linux-ng.spec | 40 ++++++++++------------ 4 files changed, 42 insertions(+), 45 deletions(-) diff --git a/.cvsignore b/.cvsignore index d5e246a..ea3ac53 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ floppy-0.16.tar.bz2 -util-linux-ng-2.17.2.tar.bz2 +util-linux-ng-2.18-rc1.tar.bz2 diff --git a/sources b/sources index 53ca2bc..395b4d2 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -4635725a3eef1c57090bac8ea5e082e6 util-linux-ng-2.17.2.tar.bz2 +b52575b0ce729d5e8ab50fa56877d28f util-linux-ng-2.18-rc1.tar.bz2 diff --git a/util-linux-ng-2.16-blkid-cachefile.patch b/util-linux-ng-2.16-blkid-cachefile.patch index 5cff6d7..7edd4e9 100644 --- a/util-linux-ng-2.16-blkid-cachefile.patch +++ b/util-linux-ng-2.16-blkid-cachefile.patch @@ -1,7 +1,13 @@ -diff -up util-linux-ng-2.17-git5e51568/misc-utils/blkid.8.kzak util-linux-ng-2.17-git5e51568/misc-utils/blkid.8 ---- util-linux-ng-2.17-git5e51568/misc-utils/blkid.8.kzak 2009-10-16 22:50:03.000000000 +0200 -+++ util-linux-ng-2.17-git5e51568/misc-utils/blkid.8 2009-10-19 14:31:10.000000000 +0200 -@@ -67,7 +67,7 @@ more devices. +--- + misc-utils/blkid.8 | 4 ++-- + misc-utils/blkid.c | 2 +- + shlibs/blkid/libblkid.3 | 6 +++--- + shlibs/blkid/src/blkidP.h | 2 +- + 4 files changed, 7 insertions(+), 7 deletions(-) + +--- util-linux-ng-2.18-rc1.orig/misc-utils/blkid.8 ++++ util-linux-ng-2.18-rc1/misc-utils/blkid.8 +@@ -81,7 +81,7 @@ same meaning as "KiB") or decimal (10^N) Read from .I cachefile instead of reading from the default cache file @@ -10,7 +16,7 @@ diff -up util-linux-ng-2.17-git5e51568/misc-utils/blkid.8.kzak util-linux-ng-2.1 If you want to start with a clean cache (i.e. don't report devices previously scanned but not necessarily available at this time), specify .IR /dev/null . -@@ -190,7 +190,7 @@ Display version number and exit. +@@ -228,7 +228,7 @@ Display version number and exit. Write the device cache to .I writecachefile instead of writing it to the default cache file @@ -19,21 +25,19 @@ diff -up util-linux-ng-2.17-git5e51568/misc-utils/blkid.8.kzak util-linux-ng-2.1 If you don't want to save the cache to the default file, specify .IR /dev/null. If not specified it will be the same file as that given by the -diff -up util-linux-ng-2.17-git5e51568/misc-utils/blkid.c.kzak util-linux-ng-2.17-git5e51568/misc-utils/blkid.c ---- util-linux-ng-2.17-git5e51568/misc-utils/blkid.c.kzak 2009-10-16 22:50:03.000000000 +0200 -+++ util-linux-ng-2.17-git5e51568/misc-utils/blkid.c 2009-10-19 14:31:10.000000000 +0200 -@@ -62,7 +62,7 @@ static void usage(int error) - " [-t ] [-w ] [dev ...]\n\n" - " %1$s -p [-O ] [-S ] [-o format] [dev ...]\n\n" +--- util-linux-ng-2.18-rc1.orig/misc-utils/blkid.c ++++ util-linux-ng-2.18-rc1/misc-utils/blkid.c +@@ -65,7 +65,7 @@ static void usage(int error) + " [-o format] [dev ...]\n\n" + " %1$s -i [-s ] [-o format] [dev ...]\n\n" "Options:\n" - " -c cache file (default: /etc/blkid.tab, /dev/null = none)\n" + " -c cache file (default: /etc/blkid/blkid.tab, /dev/null = none)\n" " -h print this usage message and exit\n" " -g garbage collect the blkid cache\n" " -o output format; can be one of:\n" -diff -up util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3.kzak util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3 ---- util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3.kzak 2009-10-16 22:50:03.000000000 +0200 -+++ util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3 2009-10-19 14:31:10.000000000 +0200 +--- util-linux-ng-2.18-rc1.orig/shlibs/blkid/libblkid.3 ++++ util-linux-ng-2.18-rc1/shlibs/blkid/libblkid.3 @@ -24,7 +24,7 @@ A common use is to allow use of LABEL= a specific block device names into configuration files. .P @@ -61,12 +65,11 @@ diff -up util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3.kzak util-linux-n caches data extracted from each recognized block device .TP .I /etc/blkid.conf -diff -up util-linux-ng-2.17-git5e51568/shlibs/blkid/src/blkidP.h.kzak util-linux-ng-2.17-git5e51568/shlibs/blkid/src/blkidP.h ---- util-linux-ng-2.17-git5e51568/shlibs/blkid/src/blkidP.h.kzak 2009-10-16 22:50:03.000000000 +0200 -+++ util-linux-ng-2.17-git5e51568/shlibs/blkid/src/blkidP.h 2009-10-19 14:32:03.000000000 +0200 -@@ -267,7 +267,7 @@ extern char *blkid_strconcat(const char - extern int blkid_fstatat(DIR *dir, const char *dirname, const char *filename, - struct stat *st, int nofollow); +--- util-linux-ng-2.18-rc1.orig/shlibs/blkid/src/blkidP.h ++++ util-linux-ng-2.18-rc1/shlibs/blkid/src/blkidP.h +@@ -279,7 +279,7 @@ extern int blkid_fstatat(DIR *dir, const + extern int blkid_openat(DIR *dir, const char *dirname, const char *filename, + int flags); -#define BLKID_CACHE_FILE "/etc/blkid.tab" +#define BLKID_CACHE_FILE "/etc/blkid/blkid.tab" diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 3ec3fbb..b4c266b 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,13 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux-ng -Version: 2.17.2 -Release: 1%{?dist} +Version: 2.18 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng -%define upstream_version %{version} +%define upstream_version %{version}-rc1 ### Features %if 0%{?rhel} @@ -32,9 +32,10 @@ BuildRequires: pam-devel BuildRequires: texinfo BuildRequires: zlib-devel BuildRequires: popt-devel +BuildRequires: libutempter-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/util-linux-ng-%{upstream_version}.tar.bz2 +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/util-linux-ng-%{upstream_version}.tar.bz2 Source1: util-linux-ng-login.pamd Source2: util-linux-ng-remote.pamd Source3: util-linux-ng-chsh-chfn.pamd @@ -43,7 +44,7 @@ Source5: mount.tmpfs Source8: nologin.c Source9: nologin.8 Source10: uuidd.init -Source11: floppy-%{floppyver}.tar.bz2 +Source11: http://dl.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 ### Obsoletes & Conflicts & Provides %ifarch alpha @@ -104,15 +105,6 @@ Patch7: util-linux-ng-2.13-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux Patch8: util-linux-ng-2.15-ipcs-32bit.patch -### Upstream Patches -### -# 533874 - RFE: libblkid should allow the developer to ask for scanning of slow devices (eg. cdroms) -Patch9: util-linux-ng-2.17-blkid-removable.patch -# 575734 - use microsecond resolution for blkid cache entries -Patch10: util-linux-ng-2.17-blkid-usec.patch -# 580296 - "rtcwake" does miss the "off" option -Patch11: util-linux-ng-2.17-rtcwake-off.patch - %description The util-linux-ng package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -124,6 +116,7 @@ program. Summary: Block device ID library Group: Development/Libraries License: LGPLv2+ +Requires: libuuid = %{version}-%{release} %description -n libblkid This is block device identification library, part of util-linux-ng. @@ -133,7 +126,6 @@ This is block device identification library, part of util-linux-ng. Summary: Block device ID library Group: Development/Libraries License: LGPLv2+ -#Provides: libblkid-static = %{version}-%{release} Requires: libblkid = %{version}-%{release} Requires: pkgconfig @@ -163,7 +155,6 @@ See also the "uuid" package, which is a separate implementation. Summary: Universally unique ID library Group: Development/Libraries License: BSD -#Provides: libuuid-static = %{version}-%{release} Requires: libuuid = %{version}-%{release} Requires: pkgconfig @@ -205,9 +196,6 @@ cp %{SOURCE8} %{SOURCE9} . %patch5 -p1 %patch7 -p1 %patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 %build unset LINGUAS || : @@ -230,6 +218,7 @@ export SUID_LDFLAGS="-pie" %endif --with-selinux \ --with-audit \ + --with-utempter \ --disable-makeinstall-chown # build util-linux-ng @@ -335,10 +324,10 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/cytune $RPM_BUILD_ROOT%{_mandir}/man8/cytune.8* # unsupported on s390 %ifarch s390 s390x for I in /usr/{bin,sbin}/{fdformat,tunelp,floppy} \ - %{_mandir}/man8/{fdformat,tunelp,floppy}.8* \ - /sbin/{hwclock,clock} \ - /usr/sbin/hwclock \ - %{_mandir}/man8/{hwclock,clock}.8*; do + %{_mandir}/man8/{fdformat,tunelp,floppy}.8* \ + /sbin/{hwclock,clock} \ + /usr/sbin/hwclock \ + %{_mandir}/man8/{hwclock,clock}.8*; do rm -f $RPM_BUILD_ROOT$I done @@ -727,6 +716,11 @@ fi %changelog +* Tue Jun 8 2010 Karel Zak 2.18-0.1 +- upgrade to the release 2.18-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc1-ChangeLog + * Mon Apr 12 2010 Karel Zak 2.17.2-1 - fix #581252 - remounting tmpfs fails because of hidden rootcontext= - fix #580296 - "rtcwake" does miss the "off" option From 719e877065ddf54762feb46197abb64a6d0d0ea5 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 8 Jun 2010 08:08:50 +0000 Subject: [PATCH 36/48] remove unused patches --- util-linux-ng-2.17-blkid-removable.patch | 302 ----------------------- util-linux-ng-2.17-blkid-usec.patch | 221 ----------------- util-linux-ng-2.17-rtcwake-off.patch | 71 ------ 3 files changed, 594 deletions(-) delete mode 100644 util-linux-ng-2.17-blkid-removable.patch delete mode 100644 util-linux-ng-2.17-blkid-usec.patch delete mode 100644 util-linux-ng-2.17-rtcwake-off.patch diff --git a/util-linux-ng-2.17-blkid-removable.patch b/util-linux-ng-2.17-blkid-removable.patch deleted file mode 100644 index 86c0669..0000000 --- a/util-linux-ng-2.17-blkid-removable.patch +++ /dev/null @@ -1,302 +0,0 @@ -diff -up util-linux-ng-2.17.1/include/pathnames.h.kzak util-linux-ng-2.17.1/include/pathnames.h ---- util-linux-ng-2.17.1/include/pathnames.h.kzak 2010-02-22 09:41:10.000000000 +0100 -+++ util-linux-ng-2.17.1/include/pathnames.h 2010-02-23 10:25:52.000000000 +0100 -@@ -76,6 +76,8 @@ - #define _PATH_PROC_PARTITIONS "/proc/partitions" - #define _PATH_PROC_DEVICES "/proc/devices" - -+#define _PATH_SYS_BLOCK "/sys/block" -+ - #ifndef _PATH_MOUNTED - # ifdef MOUNTED /* deprecated */ - # define _PATH_MOUNTED MOUNTED -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/blkid.h.in.kzak util-linux-ng-2.17.1/shlibs/blkid/src/blkid.h.in ---- util-linux-ng-2.17.1/shlibs/blkid/src/blkid.h.in.kzak 2010-02-22 09:41:11.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/blkid.h.in 2010-02-23 10:25:52.000000000 +0100 -@@ -142,6 +142,7 @@ extern int blkid_devno_to_wholedisk(dev_ - /* devname.c */ - extern int blkid_probe_all(blkid_cache cache); - extern int blkid_probe_all_new(blkid_cache cache); -+extern int blkid_probe_all_removable(blkid_cache cache); - extern blkid_dev blkid_get_dev(blkid_cache cache, const char *devname, - int flags); - -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h.kzak util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h ---- util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h.kzak 2010-02-23 10:21:19.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h 2010-02-23 10:25:52.000000000 +0100 -@@ -51,6 +51,7 @@ struct blkid_struct_dev - - #define BLKID_BID_FL_VERIFIED 0x0001 /* Device data validated from disk */ - #define BLKID_BID_FL_INVALID 0x0004 /* Device is invalid */ -+#define BLKID_BID_FL_REMOVABLE 0x0008 /* Device added by blkid_probe_all_removable() */ - - /* - * Each tag defines a NAME=value pair for a particular device. The tags -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/blkid.sym.kzak util-linux-ng-2.17.1/shlibs/blkid/src/blkid.sym ---- util-linux-ng-2.17.1/shlibs/blkid/src/blkid.sym.kzak 2010-02-22 09:41:11.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/blkid.sym 2010-02-23 10:25:52.000000000 +0100 -@@ -114,3 +114,11 @@ global: - blkid_topology_get_optimal_io_size; - blkid_topology_get_physical_sector_size; - } BLKID_2.15; -+ -+/* -+ * version(s) since util-linux-ng 2.18 -+ */ -+BLKID_2.18 { -+global: -+ blkid_probe_all_removable; -+} BLKID_2.17; -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/devname.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/devname.c ---- util-linux-ng-2.17.1/shlibs/blkid/src/devname.c.kzak 2010-02-22 09:41:12.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/devname.c 2010-02-23 10:25:52.000000000 +0100 -@@ -21,6 +21,7 @@ - #endif - #include - #include -+#include - #if HAVE_SYS_TYPES_H - #include - #endif -@@ -37,7 +38,9 @@ - #include - - #include "blkidP.h" -+ - #include "canonicalize.h" /* $(top_srcdir)/include */ -+#include "pathnames.h" - - /* - * Find a dev struct in the cache by device name, if available. -@@ -156,7 +159,7 @@ static int is_dm_leaf(const char *devnam - * Probe a single block device to add to the device cache. - */ - static void probe_one(blkid_cache cache, const char *ptname, -- dev_t devno, int pri, int only_if_new) -+ dev_t devno, int pri, int only_if_new, int removable) - { - blkid_dev dev = NULL; - struct list_head *p, *pnext; -@@ -236,6 +239,8 @@ set_pri: - dev->bid_pri += 5; - } else if (!strncmp(ptname, "md", 2)) - dev->bid_pri = BLKID_PRI_MD; -+ if (removable) -+ dev->bid_flags |= BLKID_BID_FL_REMOVABLE; - } - return; - } -@@ -327,7 +332,7 @@ static void lvm_probe_all(blkid_cache ca - lvm_device, - (unsigned int) dev)); - probe_one(cache, lvm_device, dev, BLKID_PRI_LVM, -- only_if_new); -+ only_if_new, 0); - free(lvm_device); - } - closedir(lv_list); -@@ -359,7 +364,7 @@ evms_probe_all(blkid_cache cache, int on - device, ma, mi)); - - probe_one(cache, device, makedev(ma, mi), BLKID_PRI_EVMS, -- only_if_new); -+ only_if_new, 0); - num++; - } - fclose(procpt); -@@ -407,7 +412,7 @@ ubi_probe_all(blkid_cache cache, int onl - continue; - DBG(DEBUG_DEVNAME, printf("UBI vol %s/%s: devno 0x%04X\n", - *dirname, name, (int) dev)); -- probe_one(cache, name, dev, BLKID_PRI_UBI, only_if_new); -+ probe_one(cache, name, dev, BLKID_PRI_UBI, only_if_new, 0); - } - closedir(dir); - } -@@ -484,7 +489,7 @@ static int probe_all(blkid_cache cache, - - if (sz > 1) - probe_one(cache, ptname, devs[which], 0, -- only_if_new); -+ only_if_new, 0); - lens[which] = 0; /* mark as checked */ - } - -@@ -521,20 +526,81 @@ static int probe_all(blkid_cache cache, - printf("whole dev %s, devno 0x%04X\n", - ptnames[last], (unsigned int) devs[last])); - probe_one(cache, ptnames[last], devs[last], 0, -- only_if_new); -+ only_if_new, 0); - lens[last] = 0; - } - } - - /* Handle the last device if it wasn't partitioned */ - if (lens[which]) -- probe_one(cache, ptname, devs[which], 0, only_if_new); -+ probe_one(cache, ptname, devs[which], 0, only_if_new, 0); - - fclose(proc); - blkid_flush_cache(cache); - return 0; - } - -+/* Don't use it by default -- it's pretty slow (because cdroms, floppy, ...) -+ */ -+static int probe_all_removable(blkid_cache cache) -+{ -+ DIR *dir; -+ struct dirent *d; -+ char buf[PATH_MAX]; -+ -+ if (!cache) -+ return -BLKID_ERR_PARAM; -+ -+ dir = opendir(_PATH_SYS_BLOCK); -+ if (!dir) -+ return -BLKID_ERR_PROC; -+ -+ while((d = readdir(dir))) { -+ int fd, rc, ma, mi; -+ -+#ifdef _DIRENT_HAVE_D_TYPE -+ if (d->d_type != DT_UNKNOWN && d->d_type != DT_LNK) -+ continue; -+#endif -+ if (d->d_name[0] == '.' && -+ ((d->d_name[1] == 0) || -+ ((d->d_name[1] == '.') && (d->d_name[2] == 0)))) -+ continue; -+ -+ snprintf(buf, sizeof(buf), "%s/removable", d->d_name); -+ fd = blkid_openat(dir, _PATH_SYS_BLOCK, buf, O_RDONLY); -+ if (fd < 0) -+ continue; -+ -+ rc = read(fd, buf, 1); -+ close(fd); -+ -+ if (rc != 1 || *buf != '1') -+ continue; /* not removable device */ -+ -+ /* get devno */ -+ snprintf(buf, sizeof(buf), "%s/dev", d->d_name); -+ fd = blkid_openat(dir, _PATH_SYS_BLOCK, buf, O_RDONLY); -+ if (fd < 0) -+ continue; -+ -+ rc = read(fd, buf, sizeof(buf)); -+ close(fd); -+ -+ if (rc < 3) -+ continue; /* M:N */ -+ buf[rc] = '\0'; -+ if (sscanf(buf, "%d:%d", &ma, &mi) != 2) -+ continue; -+ -+ probe_one(cache, d->d_name, makedev(ma, mi), 0, 0, 1); -+ } -+ -+ closedir(dir); -+ return 0; -+} -+ -+ - /** - * blkid_probe_all: - * @cache: cache handler -@@ -573,6 +639,33 @@ int blkid_probe_all_new(blkid_cache cach - return ret; - } - -+/** -+ * blkid_probe_all_removable: -+ * @cache: cache handler -+ * -+ * The libblkid probing is based on devices from /proc/partitions by default. -+ * This file usually does not contain removable devices (e.g. CDROMs) and this kind -+ * of devices are invisible for libblkid. -+ * -+ * This function adds removable block devices to @cache (probing is based on -+ * information from the /sys directory). Don't forget that removable devices -+ * (floppies, CDROMs, ...) could be pretty slow. It's very bad idea to call -+ * this function by default. -+ * -+ * Note that devices which were detected by this function won't be written to -+ * blkid.tab cache file. -+ * -+ * Returns: 0 on success, or number less than zero in case of error. -+ */ -+int blkid_probe_all_removable(blkid_cache cache) -+{ -+ int ret; -+ -+ DBG(DEBUG_PROBE, printf("Begin blkid_probe_all_removable()\n")); -+ ret = probe_all_removable(cache); -+ DBG(DEBUG_PROBE, printf("End blkid_probe_all_removable()\n")); -+ return ret; -+} - - #ifdef TEST_PROGRAM - int main(int argc, char **argv) -@@ -594,6 +687,9 @@ int main(int argc, char **argv) - if (blkid_probe_all(cache) < 0) - printf("%s: error probing devices\n", argv[0]); - -+ if (blkid_probe_all_removable(cache) < 0) -+ printf("%s: error probing removable devices\n", argv[0]); -+ - blkid_put_cache(cache); - return (0); - } -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/devno.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/devno.c ---- util-linux-ng-2.17.1/shlibs/blkid/src/devno.c.kzak 2010-02-22 09:41:12.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/devno.c 2010-02-23 10:25:52.000000000 +0100 -@@ -95,14 +95,30 @@ int blkid_fstatat(DIR *dir, const char * - return fstatat(dirfd(dir), filename, st, - nofollow ? AT_SYMLINK_NOFOLLOW : 0); - #else -- char device[PATH_MAX]; -+ char path[PATH_MAX]; -+ int len; -+ -+ len = snprintf(path, sizeof(path), "%s/%s", dirname, filename); -+ if (len < 0 || len + 1 > sizeof(path)) -+ return -1; -+ -+ return nofollow ? lstat(path, st) : stat(path, st); -+#endif -+} -+ -+int blkid_openat(DIR *dir, const char *dirname, const char *filename, int flags) -+{ -+#ifdef HAVE_FSTATAT -+ return openat(dirfd(dir), filename, flags); -+#else -+ char path[PATH_MAX]; - int len; - -- len = snprintf(device, sizeof(device), "%s/%s", dirname, filename); -- if (len < 0 || len + 1 > sizeof(device)) -+ len = snprintf(path, sizeof(path), "%s/%s", dirname, filename); -+ if (len < 0 || len + 1 > sizeof(path)) - return -1; - -- return nofollow ? lstat(device, st) : stat(device, st); -+ return open(path, flags); - #endif - } - -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/save.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/save.c ---- util-linux-ng-2.17.1/shlibs/blkid/src/save.c.kzak 2010-02-22 09:41:12.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/save.c 2010-02-23 10:25:52.000000000 +0100 -@@ -119,7 +119,7 @@ int blkid_flush_cache(blkid_cache cache) - - list_for_each(p, &cache->bic_devs) { - blkid_dev dev = list_entry(p, struct blkid_struct_dev, bid_devs); -- if (!dev->bid_type) -+ if (!dev->bid_type || (dev->bid_flags & BLKID_BID_FL_REMOVABLE)) - continue; - if ((ret = save_dev(dev, file)) < 0) - break; diff --git a/util-linux-ng-2.17-blkid-usec.patch b/util-linux-ng-2.17-blkid-usec.patch deleted file mode 100644 index 8070d51..0000000 --- a/util-linux-ng-2.17-blkid-usec.patch +++ /dev/null @@ -1,221 +0,0 @@ - -This is backport from upstream, this version of the patch requires glibc and -kernel >= 2.5.48. The stat.st_mtim availability is not checked to avoid changes -to ./configure script. It should be fine for Fedora/RHEL. --kzak 18-Mar-2010 - - -commit message from the original patch: - -commit 6c2f2b9d62b196296e827f8bb7336a39e80695a9 -Author: Karel Zak -Date: Wed Mar 17 14:49:14 2010 +0100 - - libblkid: add microsecond resolution for cache entries - - The libblkid library uses stat.st_mtine to detect changes on the - device. The last update time of of the device in the cache is stored - as TIME= tag in the /etc/blkid.tab file. - - Linux since 2.5.48 supports nanosecond resolution and more precise - time is available in the stat.st_mtim timespec struct. - - This patch add microsecond precision to TIME= tag in the cache file, - old format: - - TIME="" - - the new format: - - TIME="." - - This change is backwardly compatible. - - Now, the blkid_verify() function checks stat.st_mtime and - stat.st_mtim.tv_nsec/1000. - - Test: - - # e2label /dev/sdb1 AAAA - - old version: - - # blkid -s LABEL /dev/sdb1; e2label /dev/sdb1 BBBB; blkid -s LABEL /dev/sdb1 - /dev/sdb1: LABEL="AAAA" - /dev/sdb1: LABEL="AAAA" - - new version: - - # blkid -s LABEL /dev/sdb1; e2label /dev/sdb1 BBBB; blkid -s LABEL /dev/sdb1 - /dev/sdb1: LABEL="AAAA" - /dev/sdb1: LABEL="BBBB" - - Signed-off-by: Karel Zak - - -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h.kzak util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h ---- util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h.kzak 2010-03-18 14:48:12.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h 2010-03-18 15:01:36.000000000 +0100 -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -28,6 +29,9 @@ - #include "blkid.h" - #include "list.h" - -+/* enable microsecond resolution for the cache */ -+#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 -+ - /* - * This describes the attributes of a specific device. - * We can traverse all of the tags by bid_tags (linking to the tag bit_names). -@@ -44,6 +48,7 @@ struct blkid_struct_dev - int bid_pri; /* Device priority */ - dev_t bid_devno; /* Device major/minor number */ - time_t bid_time; /* Last update time of device */ -+ suseconds_t bid_utime; /* Last update time (microseconds) */ - unsigned int bid_flags; /* Device status bitflags */ - char *bid_label; /* Shortcut to device LABEL */ - char *bid_uuid; /* Shortcut to binary UUID */ -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/dev.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/dev.c ---- util-linux-ng-2.17.1/shlibs/blkid/src/dev.c.kzak 2010-02-04 12:53:58.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/dev.c 2010-03-18 14:58:23.000000000 +0100 -@@ -84,7 +84,7 @@ void blkid_debug_dump_dev(blkid_dev dev) - - printf(" dev: name = %s\n", dev->bid_name); - printf(" dev: DEVNO=\"0x%0llx\"\n", (long long)dev->bid_devno); -- printf(" dev: TIME=\"%ld\"\n", (long)dev->bid_time); -+ printf(" dev: TIME=\"%ld.%ld\"\n", (long)dev->bid_time, (long)dev->bid_utime); - printf(" dev: PRI=\"%d\"\n", dev->bid_pri); - printf(" dev: flags = 0x%08X\n", dev->bid_flags); - -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/read.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/read.c ---- util-linux-ng-2.17.1/shlibs/blkid/src/read.c.kzak 2010-02-04 12:53:58.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/read.c 2010-03-18 14:58:23.000000000 +0100 -@@ -49,7 +49,8 @@ static void debug_dump_dev(blkid_dev dev - * - * The following tags are required for each entry: - * unique (within this file) ID number of this device -- * (ascii time_t) time this entry was last read from disk -+ * (time_t and suseconds_t) time this entry was last -+ * read from disk - * (detected) type of filesystem/data for this partition - * - * The following tags may be present, depending on the device contents -@@ -318,9 +319,12 @@ static int parse_tag(blkid_cache cache, - dev->bid_devno = STRTOULL(value, 0, 0); - else if (!strcmp(name, "PRI")) - dev->bid_pri = strtol(value, 0, 0); -- else if (!strcmp(name, "TIME")) -- dev->bid_time = STRTOULL(value, 0, 0); -- else -+ else if (!strcmp(name, "TIME")) { -+ char *end = NULL; -+ dev->bid_time = STRTOULL(value, &end, 0); -+ if (end && *end == '.') -+ dev->bid_utime = STRTOULL(end + 1, 0, 0); -+ } else - ret = blkid_set_tag(dev, name, value, strlen(value)); - - DBG(DEBUG_READ, printf(" tag: %s=\"%s\"\n", name, value)); -@@ -455,7 +459,7 @@ static void debug_dump_dev(blkid_dev dev - - printf(" dev: name = %s\n", dev->bid_name); - printf(" dev: DEVNO=\"0x%0llx\"\n", (long long)dev->bid_devno); -- printf(" dev: TIME=\"%lld\"\n", (long long)dev->bid_time); -+ printf(" dev: TIME=\"%ld.%ld\"\n", (long)dev->bid_time, (long)dev->bid_utime); - printf(" dev: PRI=\"%d\"\n", dev->bid_pri); - printf(" dev: flags = 0x%08X\n", dev->bid_flags); - -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/save.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/save.c ---- util-linux-ng-2.17.1/shlibs/blkid/src/save.c.kzak 2010-02-22 09:41:12.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/save.c 2010-03-18 14:58:23.000000000 +0100 -@@ -37,9 +37,11 @@ static int save_dev(blkid_dev dev, FILE - printf("device %s, type %s\n", dev->bid_name, dev->bid_type ? - dev->bid_type : "(null)")); - -- fprintf(file, -- "bid_devno, (long) dev->bid_time); -+ fprintf(file, "bid_devno, -+ (long) dev->bid_time, -+ (long) dev->bid_utime); -+ - if (dev->bid_pri) - fprintf(file, " PRI=\"%d\"", dev->bid_pri); - list_for_each(p, &dev->bid_tags) { -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/verify.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/verify.c ---- util-linux-ng-2.17.1/shlibs/blkid/src/verify.c.kzak 2010-02-04 12:53:58.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/verify.c 2010-03-18 14:58:23.000000000 +0100 -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - #include - #ifdef HAVE_SYS_STAT_H - #include -@@ -73,19 +74,34 @@ blkid_dev blkid_verify(blkid_cache cache - return NULL; - } - -- if ((now >= dev->bid_time) && -- (st.st_mtime <= dev->bid_time) && -- ((diff < BLKID_PROBE_MIN) || -- (dev->bid_flags & BLKID_BID_FL_VERIFIED && -- diff < BLKID_PROBE_INTERVAL))) -+ if (now >= dev->bid_time && -+#ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC -+ (st.st_mtime < dev->bid_time || -+ (st.st_mtime == dev->bid_time && -+ st.st_mtim.tv_nsec / 1000 <= dev->bid_utime)) && -+#else -+ st.st_mtime <= dev->bid_time && -+#endif -+ (diff < BLKID_PROBE_MIN || -+ (dev->bid_flags & BLKID_BID_FL_VERIFIED && -+ diff < BLKID_PROBE_INTERVAL))) - return dev; - -+#ifndef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC - DBG(DEBUG_PROBE, - printf("need to revalidate %s (cache time %lu, stat time %lu,\n\t" - "time since last check %lu)\n", - dev->bid_name, (unsigned long)dev->bid_time, - (unsigned long)st.st_mtime, (unsigned long)diff)); -- -+#else -+ DBG(DEBUG_PROBE, -+ printf("need to revalidate %s (cache time %lu.%lu, stat time %lu.%lu,\n\t" -+ "time since last check %lu)\n", -+ dev->bid_name, -+ (unsigned long)dev->bid_time, (unsigned long)dev->bid_utime, -+ (unsigned long)st.st_mtime, (unsigned long)st.st_mtim.tv_nsec / 1000, -+ (unsigned long)diff)); -+#endif - - if (!cache->probe) { - cache->probe = blkid_new_probe(); -@@ -156,8 +172,16 @@ blkid_dev blkid_verify(blkid_cache cache - - found_type: - if (dev) { -+#ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC -+ struct timeval tv; -+ if (!gettimeofday(&tv, NULL)) { -+ dev->bid_time = tv.tv_sec; -+ dev->bid_utime = tv.tv_usec; -+ } else -+#endif -+ dev->bid_time = time(0); -+ - dev->bid_devno = st.st_rdev; -- dev->bid_time = time(0); - dev->bid_flags |= BLKID_BID_FL_VERIFIED; - cache->bic_flags |= BLKID_BIC_FL_CHANGED; - diff --git a/util-linux-ng-2.17-rtcwake-off.patch b/util-linux-ng-2.17-rtcwake-off.patch deleted file mode 100644 index 473c7ef..0000000 --- a/util-linux-ng-2.17-rtcwake-off.patch +++ /dev/null @@ -1,71 +0,0 @@ -From ecd55f9647d139784857df994d0f5b965d164547 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 8 Apr 2010 08:51:00 +0200 -Subject: [PATCH 1/2] rtcwake: does miss the "off" option - -Reported-by: Piergiorgio Sartor -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=580296 -Signed-off-by: Karel Zak ---- - sys-utils/rtcwake.c | 24 +++++++++++++++++++----- - 1 files changed, 19 insertions(+), 5 deletions(-) - -diff --git a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c -index 7b2df26..344fed7 100644 ---- a/sys-utils/rtcwake.c -+++ b/sys-utils/rtcwake.c -@@ -468,15 +468,19 @@ int main(int argc, char **argv) - fflush(stdout); - usleep(10 * 1000); - -- if (strcmp(suspend, "no") == 0) -+ if (strcmp(suspend, "no") == 0) { -+ if (verbose) -+ printf(_("suspend mode: no; leaving\n")); -+ close(fd); - exit(EXIT_SUCCESS); -- else if (strcmp(suspend, "on") != 0) { -- sync(); -- suspend_system(suspend); -+ - } else if (strcmp(suspend, "off") == 0) { - char *arg[4]; - int i = 0; - -+ if (verbose) -+ printf(_("suspend mode: off; executing %s\n"), -+ _PATH_SHUTDOWN); - arg[i++] = _PATH_SHUTDOWN; - arg[i++] = "-P"; - arg[i++] = "now"; -@@ -487,9 +491,13 @@ int main(int argc, char **argv) - fprintf(stderr, _("%s: unable to execute %s: %s\n"), - progname, _PATH_SHUTDOWN, strerror(errno)); - rc = EXIT_FAILURE; -- } else { -+ -+ } else if (strcmp(suspend, "on") == 0) { - unsigned long data; - -+ if (verbose) -+ printf(_("suspend mode: on; reading rtc\n")); -+ - do { - t = read(fd, &data, sizeof data); - if (t < 0) { -@@ -499,6 +507,12 @@ int main(int argc, char **argv) - if (verbose) - printf("... %s: %03lx\n", devname, data); - } while (!(data & RTC_AF)); -+ -+ } else { -+ if (verbose) -+ printf(_("suspend mode: %s; suspending system\n"), suspend); -+ sync(); -+ suspend_system(suspend); - } - - if (ioctl(fd, RTC_AIE_OFF, 0) < 0) --- -1.6.6 - From aaefb1b1e98f24da1aaf35844c19c2a1a4856be6 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 8 Jun 2010 10:27:29 +0000 Subject: [PATCH 37/48] fix spec file, new tarball --- sources | 2 +- util-linux-ng.spec | 50 +++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/sources b/sources index 395b4d2..442ae15 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -b52575b0ce729d5e8ab50fa56877d28f util-linux-ng-2.18-rc1.tar.bz2 +0cc60971007daec02e0e841702dc056b util-linux-ng-2.18-rc1.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index b4c266b..cec6cb3 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -78,6 +78,8 @@ Requires: pam >= 1.0.90, /etc/pam.d/system-auth Requires: audit-libs >= 1.0.6 Requires: libuuid = %{version}-%{release} Requires: libblkid = %{version}-%{release} +Requires: libmount = %{version}-%{release} + %if %{include_raw} Requires: udev %endif @@ -112,6 +114,28 @@ others, Util-linux contains the fdisk configuration tool and the login program. +%package -n libmount +Summary: Device mounting library +Group: Development/Libraries +License: LGPLv2+ +Requires: libblkid = %{version}-%{release} + +%description -n libmount +This is the device mounting library, part of util-linux-ng. + + +%package -n libmount-devel +Summary: Device mounting library +Group: Development/Libraries +License: LGPLv2+ +Requires: libmount = %{version}-%{release} +Requires: pkgconfig + +%description -n libmount-devel +This is the device mounting development library and headers, +part of util-linux-ng. + + %package -n libblkid Summary: Block device ID library Group: Development/Libraries @@ -308,9 +332,6 @@ ln -sf ../../sbin/hwclock ${RPM_BUILD_ROOT}/usr/sbin/hwclock ln -sf hwclock ${RPM_BUILD_ROOT}/sbin/clock echo ".so man8/hwclock.8" > ${RPM_BUILD_ROOT}%{_mandir}/man8/clock.8 -# remove libtool junk (TODO) -#rm -f ${RPM_BUILD_ROOT}/%{_lib}/libblkid.la - # install tmpfs mount helper pushd ${RPM_BUILD_ROOT}/sbin install -m 755 %{SOURCE5} ./mount.tmpfs @@ -399,7 +420,7 @@ done rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir # remove static libs -rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid}.a +rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount}.a # find MO files %find_lang %name @@ -455,6 +476,9 @@ exit 0 %post -n libuuid -p /sbin/ldconfig %postun -n libuuid -p /sbin/ldconfig +%post -n libmount -p /sbin/ldconfig +%postun -n libmount -p /sbin/ldconfig + %pre -n uuidd getent group uuidd >/dev/null || groupadd -r uuidd getent passwd uuidd >/dev/null || \ @@ -492,6 +516,7 @@ fi %ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog /bin/dmesg +/bin/findmnt /bin/kill /bin/more /bin/taskset @@ -505,6 +530,7 @@ fi /sbin/findfs /sbin/fsck /sbin/fsck.cramfs +/sbin/fsfreeze /sbin/losetup /sbin/mkfs /sbin/mkfs.cramfs @@ -512,6 +538,7 @@ fi /sbin/nologin /sbin/partx /sbin/pivot_root +/sbin/swaplabel /sbin/swapoff /sbin/swapon /sbin/switch_root @@ -611,7 +638,9 @@ fi %{_mandir}/man8/delpart.8* %{_mandir}/man8/fdisk.8* %{_mandir}/man8/findfs.8* +%{_mandir}/man8/findmnt.8* %{_mandir}/man8/fsck.8* +%{_mandir}/man8/fsfreeze.8* %{_mandir}/man8/isosize.8* %{_mandir}/man8/ldattach.8* %{_mandir}/man8/losetup.8* @@ -623,6 +652,7 @@ fi %{_mandir}/man8/pivot_root.8* %{_mandir}/man8/rtcwake.8* %{_mandir}/man8/setarch.8* +%{_mandir}/man8/swaplabel.8* %{_mandir}/man8/swapoff.8* %{_mandir}/man8/swapon.8* %{_mandir}/man8/switch_root.8* @@ -677,12 +707,22 @@ fi %dir %attr(2775, uuidd, uuidd) /var/run/uuidd +%files -n libmount +%defattr(-,root,root) +/%{_lib}/libmount.so.* + +%files -n libmount-devel +%defattr(-,root,root) +%{_libdir}/libmount.so +%{_includedir}/mount +%{_libdir}/pkgconfig/mount.pc + + %files -n libblkid %defattr(-,root,root) %dir /etc/blkid /%{_lib}/libblkid.so.* - %files -n libblkid-devel %defattr(-,root,root) #%{_libdir}/libblkid.a From c8f122a16e8ebd94fd8c6019f9d0df3e4941a810 Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 18 Jun 2010 11:24:07 +0000 Subject: [PATCH 38/48] - upgrade to 2.18-rc2 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc2-Chan geLog --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index ea3ac53..2e451ae 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ floppy-0.16.tar.bz2 -util-linux-ng-2.18-rc1.tar.bz2 +util-linux-ng-2.18-rc2.tar.bz2 diff --git a/sources b/sources index 442ae15..71c40af 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -0cc60971007daec02e0e841702dc056b util-linux-ng-2.18-rc1.tar.bz2 +2abe61d15b3c2bc0d882df32ba8ba1f7 util-linux-ng-2.18-rc2.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index cec6cb3..f9910f5 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.18 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng -%define upstream_version %{version}-rc1 +%define upstream_version %{version}-rc2 ### Features %if 0%{?rhel} @@ -756,6 +756,10 @@ fi %changelog +* Fri Jun 18 2010 Karel Zak 2.18-0.2 +- upgrade to 2.18-rc2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc2-ChangeLog + * Tue Jun 8 2010 Karel Zak 2.18-0.1 - upgrade to the release 2.18-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes From a668ec573265aa8996ab0764d0ab95aeebafbae4 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 30 Jun 2010 13:46:30 +0000 Subject: [PATCH 39/48] - upgrade to the final 2.18 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseN otes Fri Jun 18 2010 Karel Zak 2.18-0.2 - upgrade to 2.18-rc2 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc2-Chan geLog --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index 2e451ae..e3f316a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ floppy-0.16.tar.bz2 -util-linux-ng-2.18-rc2.tar.bz2 +util-linux-ng-2.18.tar.bz2 diff --git a/sources b/sources index 71c40af..0384138 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -2abe61d15b3c2bc0d882df32ba8ba1f7 util-linux-ng-2.18-rc2.tar.bz2 +2f5f71e6af969d041d73ab778c141a77 util-linux-ng-2.18.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index f9910f5..186d248 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.18 -Release: 0.2%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng -%define upstream_version %{version}-rc2 +%define upstream_version %{version} ### Features %if 0%{?rhel} @@ -756,6 +756,10 @@ fi %changelog +* Wed Jun 30 2010 Karel Zak 2.18-1 +- upgrade to the final 2.18 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes + * Fri Jun 18 2010 Karel Zak 2.18-0.2 - upgrade to 2.18-rc2 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc2-ChangeLog From dbeb3ad15c420a45f6ae76e484368d901e449732 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 14:50:06 +0000 Subject: [PATCH 40/48] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index c5d5fa9..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: util-linux-ng -# $Id: Makefile,v 1.1 2007/08/17 21:07:02 wtogami Exp $ -NAME := util-linux-ng -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index 06de2d2..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-12 From 84c61844a034d0e897cf15c58ff7c7515f1200f9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 14:50:12 +0000 Subject: [PATCH 41/48] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index c5d5fa9..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: util-linux-ng -# $Id: Makefile,v 1.1 2007/08/17 21:07:02 wtogami Exp $ -NAME := util-linux-ng -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From ad6c4cead9151213db5306321fa37087d73ed2d2 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 20 Jul 2010 08:38:50 +0000 Subject: [PATCH 42/48] - fix #615719 - tmpfs mount fails with 'user' option. - fix #598631 - shutdown, reboot, halt and C-A-D don't work --- mount.tmpfs | 18 ++++++++++++++++ util-linux-ng-2.17-agetty-clocal.patch | 30 ++++++++++++++++++++++++++ util-linux-ng.spec | 12 ++++++++++- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-2.17-agetty-clocal.patch diff --git a/mount.tmpfs b/mount.tmpfs index c0862eb..4fc7e60 100644 --- a/mount.tmpfs +++ b/mount.tmpfs @@ -18,6 +18,24 @@ case $1 in ;; esac +restricted=1 +ruid=$(id --user --real) +euid=$(id --user) + +if [ $ruid -eq 0 ] && [ $ruid -eq $euid ]; then + restricted=0 +fi + +# mount(8) in restricted mode (for non-root users) does not allow to use any +# mount options, types or so on command line. We have to call mount(8) with +# mountpoint only. All necessary options have to be defined in /etc/fstab. +# +# https://bugzilla.redhat.com/show_bug.cgi?id=615719 +# +if [ $restricted -eq 1 ]; then + exec /bin/mount -i "$2" +fi + # Remount with context mount options is unsupported # http://bugzilla.redhat.com/show_bug.cgi?id=563267 # diff --git a/util-linux-ng-2.17-agetty-clocal.patch b/util-linux-ng-2.17-agetty-clocal.patch new file mode 100644 index 0000000..9429a23 --- /dev/null +++ b/util-linux-ng-2.17-agetty-clocal.patch @@ -0,0 +1,30 @@ +From 9fcaa8826c180273829cf03e5fe34e08daef721f Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 12 Jul 2010 11:57:55 +0200 +Subject: [PATCH] aggety: don't wipe CLOCAL flag + +gettey should not clear the flag. It seems that the flag is +automatically enabled for serial consoles tht don't use CD signal. + +Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=598631 +Signed-off-by: Karel Zak +--- + login-utils/agetty.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/login-utils/agetty.c b/login-utils/agetty.c +index 39a1fd3..0cb00db 100644 +--- a/login-utils/agetty.c ++++ b/login-utils/agetty.c +@@ -706,7 +706,7 @@ termio_init(tp, speed, op) + /* flush input and output queues, important for modems! */ + (void) tcflush(0, TCIOFLUSH); + +- tp->c_cflag = CS8 | HUPCL | CREAD; ++ tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL); + cfsetispeed(tp, speed); + cfsetospeed(tp, speed); + if (op->flags & F_LOCAL) { +-- +1.6.6.1 + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 186d248..ed242b1 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.18 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -107,6 +107,11 @@ Patch7: util-linux-ng-2.13-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux Patch8: util-linux-ng-2.15-ipcs-32bit.patch +### Upstream Patches +### +# 598631 - shutdown, reboot, halt and C-A-D don't work +Patch9: util-linux-ng-2.17-agetty-clocal.patch + %description The util-linux-ng package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -220,6 +225,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch5 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %build unset LINGUAS || : @@ -756,6 +762,10 @@ fi %changelog +* Mon Aug 2 2010 Karel Zak 2.18-2 +- fix #615719 - tmpfs mount fails with 'user' option. +- fix #598631 - shutdown, reboot, halt and C-A-D don't work + * Wed Jun 30 2010 Karel Zak 2.18-1 - upgrade to the final 2.18 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes From f5b82120dc1743e2b446dd2934b20f4b4fdcab9d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 2 Aug 2010 10:52:05 +0200 Subject: [PATCH 43/48] - fix #618957 - ISO images listed in fstab are mounted twice at boot Signed-off-by: Karel Zak --- util-linux-ng-2.17-mount-loopdev.patch | 83 ++++++++++++++++++++++++++ util-linux-ng.spec | 4 ++ 2 files changed, 87 insertions(+) create mode 100644 util-linux-ng-2.17-mount-loopdev.patch diff --git a/util-linux-ng-2.17-mount-loopdev.patch b/util-linux-ng-2.17-mount-loopdev.patch new file mode 100644 index 0000000..e898b3e --- /dev/null +++ b/util-linux-ng-2.17-mount-loopdev.patch @@ -0,0 +1,83 @@ +diff -up util-linux-ng-2.17.2/mount/mount.c.kzak util-linux-ng-2.17.2/mount/mount.c +--- util-linux-ng-2.17.2/mount/mount.c.kzak 2010-03-22 09:10:56.000000000 +0100 ++++ util-linux-ng-2.17.2/mount/mount.c 2010-07-29 16:15:28.000000000 +0200 +@@ -1090,7 +1090,8 @@ loop_check(const char **spec, const char + if (verbose) + printf(_("mount: skipping the setup of a loop device\n")); + } else { +- int loop_opts = SETLOOP_AUTOCLEAR; /* always attempt autoclear */ ++ /* use autoclear loopdev on system without regular mtab only */ ++ int loop_opts = mtab_is_writable() ? 0 : SETLOOP_AUTOCLEAR; + int res; + + if (*flags & MS_RDONLY) +@@ -1759,6 +1760,50 @@ mounted (const char *spec0, const char * + return ret; + } + ++/* returns 0 if not mounted, 1 if mounted and -1 in case of error */ ++static int ++is_fstab_entry_mounted(struct mntentchn *mc, int verbose) ++{ ++ struct stat st; ++ ++ if (mounted(mc->m.mnt_fsname, mc->m.mnt_dir)) ++ goto yes; ++ ++ /* extra care for loop devices */ ++ if ((strstr(mc->m.mnt_opts, "loop=") || ++ (stat(mc->m.mnt_fsname, &st) == 0 && S_ISREG(st.st_mode)))) { ++ ++ char *p = strstr(mc->m.mnt_opts, "offset="); ++ uintmax_t offset = 0; ++ ++ if (p && *(p + 7)) { ++ char *end = NULL; ++ ++ p += 7; ++ errno = 0; ++ offset = strtoumax(p, &end, 0); ++ ++ if (end == p || (errno != 0 && ++ (offset == UINTMAX_MAX || offset == 0))) { ++ if (verbose) ++ printf(_("mount: ignore %s " ++ "(unparsable offset= option)\n"), ++ mc->m.mnt_fsname); ++ return -1; ++ } ++ } ++ if (is_mounted_same_loopfile(mc->m.mnt_dir, mc->m.mnt_fsname, offset)) ++ goto yes; ++ } ++ ++ return 0; ++yes: ++ if (verbose) ++ printf(_("mount: %s already mounted on %s\n"), ++ mc->m.mnt_fsname, mc->m.mnt_dir); ++ return 1; ++} ++ + /* avoid using stat() on things we are not going to mount anyway.. */ + static int + has_noauto (const char *opts) { +@@ -1804,16 +1849,8 @@ do_mount_all (char *types, char *options + if (matching_type (mc->m.mnt_type, types) + && matching_opts (mc->m.mnt_opts, test_opts) + && !streq (mc->m.mnt_dir, "/") +- && !streq (mc->m.mnt_dir, "root")) { +- +- if (mounted (mc->m.mnt_fsname, mc->m.mnt_dir)) { +- if (verbose) +- printf(_("mount: %s already mounted " +- "on %s\n"), +- mc->m.mnt_fsname, +- mc->m.mnt_dir); +- continue; +- } ++ && !streq (mc->m.mnt_dir, "root") ++ && !is_fstab_entry_mounted(mc, verbose)) { + + mtmp = (struct mntentchn *) xmalloc(sizeof(*mtmp)); + *mtmp = *mc; diff --git a/util-linux-ng.spec b/util-linux-ng.spec index ed242b1..eb112ea 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -111,6 +111,8 @@ Patch8: util-linux-ng-2.15-ipcs-32bit.patch ### # 598631 - shutdown, reboot, halt and C-A-D don't work Patch9: util-linux-ng-2.17-agetty-clocal.patch +# 618957 - ISO images listed in fstab are mounted twice at boot +Patch10: util-linux-ng-2.17-mount-loopdev.patch %description The util-linux-ng package contains a large variety of low-level system @@ -226,6 +228,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 %build unset LINGUAS || : @@ -765,6 +768,7 @@ fi * Mon Aug 2 2010 Karel Zak 2.18-2 - fix #615719 - tmpfs mount fails with 'user' option. - fix #598631 - shutdown, reboot, halt and C-A-D don't work +- fix #618957 - ISO images listed in fstab are mounted twice at boot * Wed Jun 30 2010 Karel Zak 2.18-1 - upgrade to the final 2.18 From f5753f26bf819b2610b302d343e283e3e2d4b705 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 5 Aug 2010 11:47:58 +0200 Subject: [PATCH 44/48] 2.18-3: fix #620924 Signed-off-by: Karel Zak --- mount.tmpfs | 4 +--- util-linux-ng.spec | 5 ++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mount.tmpfs b/mount.tmpfs index 4fc7e60..5495c9d 100644 --- a/mount.tmpfs +++ b/mount.tmpfs @@ -19,10 +19,8 @@ case $1 in esac restricted=1 -ruid=$(id --user --real) -euid=$(id --user) -if [ $ruid -eq 0 ] && [ $ruid -eq $euid ]; then +if [ $UID -eq 0 ] && [ $UID -eq $EUID ]; then restricted=0 fi diff --git a/util-linux-ng.spec b/util-linux-ng.spec index eb112ea..846dbe9 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.18 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -765,6 +765,9 @@ fi %changelog +* Thu Aug 5 2010 Karel Zak 2.18-3 +- fix #620924 - /sbin/mount.tmpfs uses not available /usr/bin/id + * Mon Aug 2 2010 Karel Zak 2.18-2 - fix #615719 - tmpfs mount fails with 'user' option. - fix #598631 - shutdown, reboot, halt and C-A-D don't work From 39ece656f36c1c4e06930d776e20ac63a9ac5ef1 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 18 Aug 2010 10:16:07 +0200 Subject: [PATCH 45/48] 2.18-4: fix #623685 Signed-off-by: Karel Zak --- .gitignore | 3 + util-linux-ng-2.18-agetty-baudrate.patch | 147 ++++++++++++++++++ ... => util-linux-ng-2.18-agetty-clocal.patch | 14 +- util-linux-ng.spec | 12 +- 4 files changed, 166 insertions(+), 10 deletions(-) create mode 100644 util-linux-ng-2.18-agetty-baudrate.patch rename util-linux-ng-2.17-agetty-clocal.patch => util-linux-ng-2.18-agetty-clocal.patch (76%) diff --git a/.gitignore b/.gitignore index e3f316a..d0444d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ floppy-0.16.tar.bz2 util-linux-ng-2.18.tar.bz2 +*~ +*.rpm +*.log diff --git a/util-linux-ng-2.18-agetty-baudrate.patch b/util-linux-ng-2.18-agetty-baudrate.patch new file mode 100644 index 0000000..68397dd --- /dev/null +++ b/util-linux-ng-2.18-agetty-baudrate.patch @@ -0,0 +1,147 @@ +From 848e5e6ce3978d921366b799d907a78a12299924 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 18 Aug 2010 09:02:03 +0200 +Subject: [PATCH] agetty: add -s to reuse existing baud rate + +For example: + + /sbin/agetty -s /dev/ttyS0 9600 + +will reuse the speed the kernel configured on the port. If the setting +from kernel is useless (tty returns BREAK character) then the baud +rate from command line (9600) is used. + +Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=623685 +Signed-off-by: Karel Zak +--- + login-utils/agetty.8 | 16 +++++----------- + login-utils/agetty.c | 22 ++++++++++++++-------- + 2 files changed, 19 insertions(+), 19 deletions(-) + +diff --git a/login-utils/agetty.8 b/login-utils/agetty.8 +index 8761374..53037dd 100644 +--- a/login-utils/agetty.8 ++++ b/login-utils/agetty.8 +@@ -3,7 +3,7 @@ + agetty \- alternative Linux getty + + .SH SYNOPSIS +-.BR "agetty " [\-8ihLmnUw] ++.BR "agetty " [\-8ihLmnsUw] + .RI "[-f " issue_file ] + .RI "[-l " login_program ] + .RI "[-I " init ] +@@ -12,16 +12,6 @@ agetty \- alternative Linux getty + .I port + .I baud_rate,... + .RI [ term ] +-.br +-.BR "agetty " [\-8ihLmnw] +-.RI "[-f " issue_file ] +-.RI "[-l " login_program ] +-.RI "[-I " init ] +-.RI "[-t " timeout ] +-.RI "[-H " login_host ] +-.I baud_rate,... +-.I port +-.RI [ term ] + + .SH DESCRIPTION + .ad +@@ -163,6 +153,10 @@ Force the line to be a local line with no need for carrier detect. This can + be useful when you have a locally attached terminal where the serial line + does not set the carrier detect signal. + .TP ++\-s ++Try to keep the existing baud rate. The baud rates from ++the command line are used when agetty receives a BREAK character. ++.TP + \-U + Turn on support for detecting an uppercase only terminal. This setting will + detect a login name containing only capitals as indicating an uppercase +diff --git a/login-utils/agetty.c b/login-utils/agetty.c +index 39a1fd3..9fc389b 100644 +--- a/login-utils/agetty.c ++++ b/login-utils/agetty.c +@@ -133,6 +133,7 @@ struct options { + #define F_CUSTISSUE (1<<6) /* give alternative issue file */ + #define F_NOPROMPT (1<<7) /* don't ask for login name! */ + #define F_LCUC (1<<8) /* Support for *LCUC stty modes */ ++#define F_KEEPSPEED (1<<9) /* Follow baud rate from kernel */ + + /* Storage for things detected while the login name was read. */ + +@@ -203,7 +204,7 @@ void parse_args P_((int argc, char **argv, struct options *op)); + void parse_speeds P_((struct options *op, char *arg)); + void update_utmp P_((char *line)); + void open_tty P_((char *tty, struct termios *tp, int local)); +-void termio_init P_((struct termios *tp, int speed, struct options *op)); ++void termio_init P_((struct termios *tp, struct options *op)); + void auto_baud P_((struct termios *tp)); + void do_prompt P_((struct options *op, struct termios *tp)); + void next_speed P_((struct termios *tp, struct options *op)); +@@ -297,7 +298,7 @@ main(argc, argv) + tcsetpgrp(0, getpid()); + /* Initialize the termios settings (raw mode, eight-bit, blocking i/o). */ + debug("calling termio_init\n"); +- termio_init(&termios, options.speeds[FIRST_SPEED], &options); ++ termio_init(&termios, &options); + + /* write the modem init string and DON'T flush the buffers */ + if (options.flags & F_INITSTRING) { +@@ -373,7 +374,7 @@ parse_args(argc, argv, op) + extern int optind; /* getopt */ + int c; + +- while (isascii(c = getopt(argc, argv, "8I:LH:f:hil:mt:wUn"))) { ++ while (isascii(c = getopt(argc, argv, "8I:LH:f:hil:mst:wUn"))) { + switch (c) { + case '8': + op->eightbits = 1; +@@ -443,6 +444,9 @@ parse_args(argc, argv, op) + case 'n': + op->flags |= F_NOPROMPT; + break; ++ case 's': ++ op->flags |= F_KEEPSPEED; /* keep kernel defined speed */ ++ break; + case 't': /* time out */ + if ((op->timeout = atoi(optarg)) <= 0) + error(_("bad timeout value: %s"), optarg); +@@ -691,9 +695,8 @@ char gbuf[1024]; + char area[1024]; + + void +-termio_init(tp, speed, op) ++termio_init(tp, op) + struct termios *tp; +- int speed; + struct options *op; + { + +@@ -707,8 +710,11 @@ termio_init(tp, speed, op) + (void) tcflush(0, TCIOFLUSH); + + tp->c_cflag = CS8 | HUPCL | CREAD; +- cfsetispeed(tp, speed); +- cfsetospeed(tp, speed); ++ ++ if (!(op->flags & F_KEEPSPEED)) { ++ cfsetispeed(tp, op->speeds[FIRST_SPEED]); ++ cfsetospeed(tp, op->speeds[FIRST_SPEED]); ++ } + if (op->flags & F_LOCAL) { + tp->c_cflag |= CLOCAL; + } +@@ -1203,7 +1209,7 @@ bcode(s) + void + usage() + { +- fprintf(stderr, _("Usage: %s [-8hiLmUw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] baud_rate,... line [termtype]\nor\t[-hiLmw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] line baud_rate,... [termtype]\n"), progname); ++ fprintf(stderr, _("Usage: %s [-8hiLmsUw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] baud_rate,... line [termtype]\nor\t[-hiLmw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] line baud_rate,... [termtype]\n"), progname); + exit(1); + } + +-- +1.7.2 + diff --git a/util-linux-ng-2.17-agetty-clocal.patch b/util-linux-ng-2.18-agetty-clocal.patch similarity index 76% rename from util-linux-ng-2.17-agetty-clocal.patch rename to util-linux-ng-2.18-agetty-clocal.patch index 9429a23..1708e4d 100644 --- a/util-linux-ng-2.17-agetty-clocal.patch +++ b/util-linux-ng-2.18-agetty-clocal.patch @@ -1,4 +1,4 @@ -From 9fcaa8826c180273829cf03e5fe34e08daef721f Mon Sep 17 00:00:00 2001 +From e143d1f00497f0178a1febec8fb4aa7c842fa35a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 12 Jul 2010 11:57:55 +0200 Subject: [PATCH] aggety: don't wipe CLOCAL flag @@ -13,18 +13,18 @@ Signed-off-by: Karel Zak 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/login-utils/agetty.c b/login-utils/agetty.c -index 39a1fd3..0cb00db 100644 +index 9fc389b..2541948 100644 --- a/login-utils/agetty.c +++ b/login-utils/agetty.c -@@ -706,7 +706,7 @@ termio_init(tp, speed, op) +@@ -709,7 +709,7 @@ termio_init(tp, op) /* flush input and output queues, important for modems! */ (void) tcflush(0, TCIOFLUSH); - tp->c_cflag = CS8 | HUPCL | CREAD; + tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL); - cfsetispeed(tp, speed); - cfsetospeed(tp, speed); - if (op->flags & F_LOCAL) { + + if (!(op->flags & F_KEEPSPEED)) { + cfsetispeed(tp, op->speeds[FIRST_SPEED]); -- -1.6.6.1 +1.7.2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 846dbe9..af7f369 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.18 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -109,10 +109,12 @@ Patch8: util-linux-ng-2.15-ipcs-32bit.patch ### Upstream Patches ### +# 623685 - please extend agetty to not require a baud rate to be specified +Patch9: util-linux-ng-2.18-agetty-baudrate.patch # 598631 - shutdown, reboot, halt and C-A-D don't work -Patch9: util-linux-ng-2.17-agetty-clocal.patch +Patch10: util-linux-ng-2.18-agetty-clocal.patch # 618957 - ISO images listed in fstab are mounted twice at boot -Patch10: util-linux-ng-2.17-mount-loopdev.patch +Patch11: util-linux-ng-2.17-mount-loopdev.patch %description The util-linux-ng package contains a large variety of low-level system @@ -229,6 +231,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 %build unset LINGUAS || : @@ -765,6 +768,9 @@ fi %changelog +* Wed Aug 18 2010 Karel Zak 2.18-4 +- fix #623685 - please extend agetty to not require a baud rate to be specified + * Thu Aug 5 2010 Karel Zak 2.18-3 - fix #620924 - /sbin/mount.tmpfs uses not available /usr/bin/id From 334e0e7abe683e5df22777c8f0f5f8b2631b51b5 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 26 Oct 2010 23:39:38 +0200 Subject: [PATCH 46/48] 2.18-5: fix agetty -s (#645640) Signed-off-by: Karel Zak --- util-linux-ng-2.18-agetty-baudrate.patch | 127 +++++++++++++++++------ util-linux-ng-2.18-agetty-clocal.patch | 42 ++++---- util-linux-ng.spec | 6 +- 3 files changed, 117 insertions(+), 58 deletions(-) diff --git a/util-linux-ng-2.18-agetty-baudrate.patch b/util-linux-ng-2.18-agetty-baudrate.patch index 68397dd..72dc257 100644 --- a/util-linux-ng-2.18-agetty-baudrate.patch +++ b/util-linux-ng-2.18-agetty-baudrate.patch @@ -1,27 +1,50 @@ -From 848e5e6ce3978d921366b799d907a78a12299924 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 18 Aug 2010 09:02:03 +0200 -Subject: [PATCH] agetty: add -s to reuse existing baud rate -For example: + based on upstream patch: + + commit 848e5e6ce3978d921366b799d907a78a12299924 + Author: Karel Zak + Date: Wed Aug 18 09:02:03 2010 +0200 + + agetty: add -s to reuse existing baud rate + + For example: /sbin/agetty -s /dev/ttyS0 9600 -will reuse the speed the kernel configured on the port. If the setting -from kernel is useless (tty returns BREAK character) then the baud -rate from command line (9600) is used. + will reuse the speed the kernel configured on the port. If the setting + from kernel is useless (tty returns BREAK character) then the baud + rate from command line (9600) is used. -Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=623685 -Signed-off-by: Karel Zak ---- - login-utils/agetty.8 | 16 +++++----------- - login-utils/agetty.c | 22 ++++++++++++++-------- - 2 files changed, 19 insertions(+), 19 deletions(-) + Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=623685 + Signed-off-by: Karel Zak -diff --git a/login-utils/agetty.8 b/login-utils/agetty.8 -index 8761374..53037dd 100644 ---- a/login-utils/agetty.8 -+++ b/login-utils/agetty.8 + and + + commit e98f4af950a64db188e0a9f3eed20fefaa463a99 + Author: Karel Zak + Date: Fri Oct 22 21:24:50 2010 +0200 + + agetty: fix -s option (baud rate setup) + + The problem is pretty visible in strace output: + + broken version: + ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo ...}) = 0 + [...] + ioctl(0, SNDCTL_TMR_START or TCSETS, {B0 -opost -isig -icanon -echo ...}) = 0 + ^^^ + fixed version: + ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo ...}) = 0 + [...] + ioctl(0, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0 + + Reported-by: Jon Masters + Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=645640 + Signed-off-by: Karel Zak + +diff -up util-linux-ng-2.18/login-utils/agetty.8.kzak util-linux-ng-2.18/login-utils/agetty.8 +--- util-linux-ng-2.18/login-utils/agetty.8.kzak 2010-02-04 12:53:56.000000000 +0100 ++++ util-linux-ng-2.18/login-utils/agetty.8 2010-10-22 22:07:43.000000000 +0200 @@ -3,7 +3,7 @@ agetty \- alternative Linux getty @@ -48,7 +71,7 @@ index 8761374..53037dd 100644 .SH DESCRIPTION .ad -@@ -163,6 +153,10 @@ Force the line to be a local line with no need for carrier detect. This can +@@ -163,6 +153,10 @@ Force the line to be a local line with n be useful when you have a locally attached terminal where the serial line does not set the carrier detect signal. .TP @@ -59,10 +82,9 @@ index 8761374..53037dd 100644 \-U Turn on support for detecting an uppercase only terminal. This setting will detect a login name containing only capitals as indicating an uppercase -diff --git a/login-utils/agetty.c b/login-utils/agetty.c -index 39a1fd3..9fc389b 100644 ---- a/login-utils/agetty.c -+++ b/login-utils/agetty.c +diff -up util-linux-ng-2.18/login-utils/agetty.c.kzak util-linux-ng-2.18/login-utils/agetty.c +--- util-linux-ng-2.18/login-utils/agetty.c.kzak 2010-04-01 16:11:56.000000000 +0200 ++++ util-linux-ng-2.18/login-utils/agetty.c 2010-10-22 22:15:40.000000000 +0200 @@ -133,6 +133,7 @@ struct options { #define F_CUSTISSUE (1<<6) /* give alternative issue file */ #define F_NOPROMPT (1<<7) /* don't ask for login name! */ @@ -71,7 +93,7 @@ index 39a1fd3..9fc389b 100644 /* Storage for things detected while the login name was read. */ -@@ -203,7 +204,7 @@ void parse_args P_((int argc, char **argv, struct options *op)); +@@ -203,7 +204,7 @@ void parse_args P_((int argc, char **arg void parse_speeds P_((struct options *op, char *arg)); void update_utmp P_((char *line)); void open_tty P_((char *tty, struct termios *tp, int local)); @@ -108,7 +130,7 @@ index 39a1fd3..9fc389b 100644 case 't': /* time out */ if ((op->timeout = atoi(optarg)) <= 0) error(_("bad timeout value: %s"), optarg); -@@ -691,9 +695,8 @@ char gbuf[1024]; +@@ -691,11 +695,17 @@ char gbuf[1024]; char area[1024]; void @@ -118,22 +140,62 @@ index 39a1fd3..9fc389b 100644 - int speed; struct options *op; { ++ speed_t ispeed, ospeed; ++ ++ if (op->flags & F_KEEPSPEED) { ++ ispeed = cfgetispeed(tp); /* save the original setting */ ++ ospeed = cfgetospeed(tp); ++ } else ++ ospeed = ispeed = op->speeds[FIRST_SPEED]; -@@ -707,8 +710,11 @@ termio_init(tp, speed, op) + /* + * Initial termios settings: 8-bit characters, raw-mode, blocking i/o. +@@ -706,14 +716,20 @@ termio_init(tp, speed, op) + /* flush input and output queues, important for modems! */ (void) tcflush(0, TCIOFLUSH); ++ tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; ++ tp->c_cflag = CS8 | HUPCL | CREAD; - cfsetispeed(tp, speed); - cfsetospeed(tp, speed); + -+ if (!(op->flags & F_KEEPSPEED)) { -+ cfsetispeed(tp, op->speeds[FIRST_SPEED]); -+ cfsetospeed(tp, op->speeds[FIRST_SPEED]); -+ } ++ /* Note that the speed is stored in the c_cflag termios field, so we have ++ * set the speed always when the cflag se reseted. ++ */ ++ cfsetispeed(tp, ispeed); ++ cfsetospeed(tp, ospeed); ++ if (op->flags & F_LOCAL) { tp->c_cflag |= CLOCAL; } -@@ -1203,7 +1209,7 @@ bcode(s) + +- tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; + #ifdef HAVE_STRUCT_TERMIOS_C_LINE + tp->c_line = 0; + #endif +@@ -973,9 +989,18 @@ next_speed(tp, op) + struct termios *tp; + struct options *op; + { +- static int baud_index = FIRST_SPEED;/* current speed index */ ++ static int baud_index = -1; ++ ++ if (baud_index == -1) ++ /* ++ * if the F_KEEPSPEED flags is set then the FIRST_SPEED is not ++ * tested yet (see termio_init()). ++ */ ++ baud_index = (op->flags & F_KEEPSPEED) ? FIRST_SPEED : ++ 1 % op->numspeed; ++ else ++ baud_index = (baud_index + 1) % op->numspeed; + +- baud_index = (baud_index + 1) % op->numspeed; + cfsetispeed(tp, op->speeds[baud_index]); + cfsetospeed(tp, op->speeds[baud_index]); + (void) tcsetattr(0, TCSANOW, tp); +@@ -1203,7 +1228,7 @@ bcode(s) void usage() { @@ -142,6 +204,3 @@ index 39a1fd3..9fc389b 100644 exit(1); } --- -1.7.2 - diff --git a/util-linux-ng-2.18-agetty-clocal.patch b/util-linux-ng-2.18-agetty-clocal.patch index 1708e4d..5d0b677 100644 --- a/util-linux-ng-2.18-agetty-clocal.patch +++ b/util-linux-ng-2.18-agetty-clocal.patch @@ -1,30 +1,26 @@ -From e143d1f00497f0178a1febec8fb4aa7c842fa35a Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 12 Jul 2010 11:57:55 +0200 -Subject: [PATCH] aggety: don't wipe CLOCAL flag -gettey should not clear the flag. It seems that the flag is -automatically enabled for serial consoles tht don't use CD signal. + backport of upstream patch: -Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=598631 -Signed-off-by: Karel Zak ---- - login-utils/agetty.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + Commit: e143d1f00497f0178a1febec8fb4aa7c842fa35a + From: Karel Zak + Date: Mon, 12 Jul 2010 11:57:55 +0200 + Subject: [PATCH] aggety: don't wipe CLOCAL flag -diff --git a/login-utils/agetty.c b/login-utils/agetty.c -index 9fc389b..2541948 100644 ---- a/login-utils/agetty.c -+++ b/login-utils/agetty.c -@@ -709,7 +709,7 @@ termio_init(tp, op) - /* flush input and output queues, important for modems! */ - (void) tcflush(0, TCIOFLUSH); + gettey should not clear the flag. It seems that the flag is + automatically enabled for serial consoles tht don't use CD signal. + + Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=598631 + Signed-off-by: Karel Zak + +diff -up util-linux-ng-2.18/login-utils/agetty.c.kzak util-linux-ng-2.18/login-utils/agetty.c +--- util-linux-ng-2.18/login-utils/agetty.c.kzak 2010-10-22 21:51:31.000000000 +0200 ++++ util-linux-ng-2.18/login-utils/agetty.c 2010-10-22 21:51:31.000000000 +0200 +@@ -715,7 +715,7 @@ termio_init(tp, speed, op) + + tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; - tp->c_cflag = CS8 | HUPCL | CREAD; + tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL); - if (!(op->flags & F_KEEPSPEED)) { - cfsetispeed(tp, op->speeds[FIRST_SPEED]); --- -1.7.2 - + /* Note that the speed is stored in the c_cflag termios field, so we have + * set the speed always when the cflag se reseted. diff --git a/util-linux-ng.spec b/util-linux-ng.spec index af7f369..f30a19e 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.18 -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: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -110,6 +110,7 @@ Patch8: util-linux-ng-2.15-ipcs-32bit.patch ### Upstream Patches ### # 623685 - please extend agetty to not require a baud rate to be specified +# 645640 - new "-s" parameter parsing in agetty does not work Patch9: util-linux-ng-2.18-agetty-baudrate.patch # 598631 - shutdown, reboot, halt and C-A-D don't work Patch10: util-linux-ng-2.18-agetty-clocal.patch @@ -768,6 +769,9 @@ fi %changelog +* Tue Oct 26 2010 Karel Zak 2.18-5 +- fix #645640 - new "-s" parameter parsing in agetty does not work + * Wed Aug 18 2010 Karel Zak 2.18-4 - fix #623685 - please extend agetty to not require a baud rate to be specified From 6c69926dbfca8b07bd2f93b56bc8e7c54c7b227d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 27 Oct 2010 00:18:01 +0200 Subject: [PATCH 47/48] 2.18-5: add -l (lock) support to fsck Signed-off-by: Karel Zak --- util-linux-ng-2.18-fsck-wholedisk.patch | 510 ++++++++++++++++++++++++ util-linux-ng.spec | 4 + 2 files changed, 514 insertions(+) create mode 100644 util-linux-ng-2.18-fsck-wholedisk.patch diff --git a/util-linux-ng-2.18-fsck-wholedisk.patch b/util-linux-ng-2.18-fsck-wholedisk.patch new file mode 100644 index 0000000..3718255 --- /dev/null +++ b/util-linux-ng-2.18-fsck-wholedisk.patch @@ -0,0 +1,510 @@ +diff -up util-linux-ng-2.18/fsck/fsck.8.kzak util-linux-ng-2.18/fsck/fsck.8 +--- util-linux-ng-2.18/fsck/fsck.8.kzak 2010-06-30 12:51:35.000000000 +0200 ++++ util-linux-ng-2.18/fsck/fsck.8 2010-10-26 23:55:30.000000000 +0200 +@@ -7,7 +7,7 @@ + fsck \- check and repair a Linux file system + .SH SYNOPSIS + .B fsck +-.RB [ \-sAVRTMNP ] ++.RB [ \-lsAVRTMNP ] + .RB [ \-C + .RI [ fd ]] + .RB [ \-t +@@ -80,6 +80,17 @@ variable. Please see the file system-sp + further details. + .SH OPTIONS + .TP ++.B \-l ++Lock whole-disk device by exclusive ++.BR flock (2). ++This option can be used with one device only (e.g. -A and -l are mutually ++exclusive). This option is recommended when more ++.B fsck (8) ++instances are executed in the same time. The option is ignored when used for ++multiple devices or for non-rotating disk. The fsck does not lock underlying ++devices if executed to check stacked devices (e.g. MD or DM) -- this feature is ++not implemented yet. ++.TP + .B \-s + Serialize + .B fsck +@@ -200,6 +211,11 @@ If there are multiple filesystems with t + fsck will attempt to check them in parallel, although it will avoid running + multiple filesystem checks on the same physical disk. + .sp ++.B fsck ++does not check stacked devices (RAIDs, dm-crypt, ...) in parallel with any other ++device. See below for FSCK_FORCE_ALL_PARALLEL setting. The /sys filesystem is ++used to detemine dependencies between devices. ++.sp + Hence, a very common configuration in + .I /etc/fstab + files is to set the root filesystem to have a +@@ -366,10 +382,10 @@ program's behavior is affected by the fo + .B FSCK_FORCE_ALL_PARALLEL + If this environment variable is set, + .B fsck +-will attempt to run all of the specified filesystems in parallel, +-regardless of whether the filesystems appear to be on the same +-device. (This is useful for RAID systems or high-end storage systems +-such as those sold by companies such as IBM or EMC.) ++will attempt to run all of the specified filesystems in parallel, regardless of ++whether the filesystems appear to be on the same device. (This is useful for ++RAID systems or high-end storage systems such as those sold by companies such ++as IBM or EMC.) Note that the fs_passno value is still used. + .TP + .B FSCK_MAX_INST + This environment variable will limit the maximum number of file system +diff -up util-linux-ng-2.18/fsck/fsck.c.kzak util-linux-ng-2.18/fsck/fsck.c +--- util-linux-ng-2.18/fsck/fsck.c.kzak 2010-05-19 23:36:23.000000000 +0200 ++++ util-linux-ng-2.18/fsck/fsck.c 2010-10-26 23:55:30.000000000 +0200 +@@ -31,6 +31,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include +@@ -42,6 +44,8 @@ + #include + #include + #include ++#include ++#include + + #include "fsprobe.h" + +@@ -85,6 +89,7 @@ char *devices[MAX_DEVICES]; + char *args[MAX_ARGS]; + int num_devices, num_args; + ++int lockdisk = 0; + int verbose = 0; + int doall = 0; + int noexecute = 0; +@@ -214,11 +219,97 @@ static void parse_escape(char *word) + *q = 0; + } + ++static dev_t get_disk(const char *device) ++{ ++ struct stat st; ++ dev_t disk; ++ ++ if (!stat(device, &st) && ++ !blkid_devno_to_wholedisk(st.st_rdev, NULL, 0, &disk)) ++ return disk; ++ ++ return 0; ++} ++ ++static int is_irrotational_disk(dev_t disk) ++{ ++ char path[PATH_MAX]; ++ FILE *f; ++ int rc, x; ++ ++ rc = snprintf(path, sizeof(path), ++ "/sys/dev/block/%d:%d/queue/rotational", ++ major(disk), minor(disk)); ++ ++ if (rc < 0 || rc + 1 > sizeof(path)) ++ return 0; ++ ++ f = fopen(path, "r"); ++ if (!f) ++ return 0; ++ ++ rc = fscanf(f, "%u", &x); ++ fclose(f); ++ ++ return rc == 1 ? !x : 0; ++} ++ ++static void lock_disk(struct fsck_instance *inst) ++{ ++ dev_t disk = inst->fs->disk ? : get_disk(inst->fs->device); ++ char *diskname; ++ ++ if (!disk || is_irrotational_disk(disk)) ++ return; ++ ++ diskname = blkid_devno_to_devname(disk); ++ if (!diskname) ++ return; ++ ++ if (verbose) ++ printf(_("Locking disk %s ... "), diskname); ++ ++ inst->lock = open(diskname, O_CLOEXEC | O_RDONLY); ++ if (inst->lock >= 0) { ++ int rc = -1; ++ ++ /* inform users that we're waiting on the lock */ ++ if (verbose && ++ (rc = flock(inst->lock, LOCK_EX | LOCK_NB)) != 0 && ++ errno == EWOULDBLOCK) ++ printf(_("(waiting) ")); ++ ++ if (rc != 0 && flock(inst->lock, LOCK_EX) != 0) { ++ close(inst->lock); /* failed */ ++ inst->lock = -1; ++ } ++ } ++ ++ if (verbose) ++ printf("%s.\n", inst->lock >= 0 ? _("success") : _("failed")); ++ ++ free(diskname); ++ return; ++} ++ ++static void unlock_disk(struct fsck_instance *inst) ++{ ++ if (inst->lock >= 0) { ++ /* explicitly unlock, don't rely on close(), maybe some library ++ * (e.g. liblkid) has still open the device. ++ */ ++ flock(inst->lock, LOCK_UN); ++ close(inst->lock); ++ } ++} ++ ++ ++ + static void free_instance(struct fsck_instance *i) + { ++ if (lockdisk) ++ unlock_disk(i); + free(i->prog); +- free(i->device); +- free(i->base_device); + free(i); + return; + } +@@ -240,6 +331,8 @@ static struct fs_info *create_fs_device( + fs->passno = passno; + fs->flags = 0; + fs->next = NULL; ++ fs->disk = 0; ++ fs->stacked = 0; + + if (!filesys_info) + filesys_info = fs; +@@ -414,8 +507,7 @@ static int progress_active(NOARGS) + * Execute a particular fsck program, and link it into the list of + * child processes we are waiting for. + */ +-static int execute(const char *type, const char *device, const char *mntpt, +- int interactive) ++static int execute(const char *type, struct fs_info *fs, int interactive) + { + char *s, *argv[80], prog[80]; + int argc, i; +@@ -452,7 +544,7 @@ static int execute(const char *type, con + } + } + +- argv[argc++] = string_copy(device); ++ argv[argc++] = string_copy(fs->device); + argv[argc] = 0; + + s = find_fsck(prog); +@@ -464,12 +556,19 @@ static int execute(const char *type, con + + if (verbose || noexecute) { + printf("[%s (%d) -- %s] ", s, num_running, +- mntpt ? mntpt : device); ++ fs->mountpt ? fs->mountpt : fs->device); + for (i=0; i < argc; i++) + printf("%s ", argv[i]); + printf("\n"); + } + ++ ++ inst->fs = fs; ++ inst->lock = -1; ++ ++ if (lockdisk) ++ lock_disk(inst); ++ + /* Fork and execute the correct program. */ + if (noexecute) + pid = -1; +@@ -492,8 +591,6 @@ static int execute(const char *type, con + inst->pid = pid; + inst->prog = string_copy(prog); + inst->type = string_copy(type); +- inst->device = string_copy(device); +- inst->base_device = base_device(device); + inst->start_time = time(0); + inst->next = NULL; + +@@ -597,12 +694,12 @@ static struct fsck_instance *wait_one(in + } else { + printf(_("Warning... %s for device %s exited " + "with signal %d.\n"), +- inst->prog, inst->device, sig); ++ inst->prog, inst->fs->device, sig); + status = EXIT_ERROR; + } + } else { + printf(_("%s %s: status is %x, should never happen.\n"), +- inst->prog, inst->device, status); ++ inst->prog, inst->fs->device, status); + status = EXIT_ERROR; + } + inst->exit_status = status; +@@ -641,7 +738,7 @@ ret_inst: + instance_list = inst->next; + if (verbose > 1) + printf(_("Finished with %s (exit status %d)\n"), +- inst->device, inst->exit_status); ++ inst->fs->device, inst->exit_status); + num_running--; + return inst; + } +@@ -698,7 +795,7 @@ static void fsck_device(struct fs_info * + type = DEFAULT_FSTYPE; + + num_running++; +- retval = execute(type, fs->device, fs->mountpt, interactive); ++ retval = execute(type, fs, interactive); + if (retval) { + fprintf(stderr, _("%s: Error %d while executing fsck.%s " + "for %s\n"), progname, retval, type, fs->device); +@@ -924,40 +1021,70 @@ static int ignore(struct fs_info *fs) + return 0; + } + ++static int count_slaves(dev_t disk) ++{ ++ DIR *dir; ++ struct dirent *dp; ++ char dirname[PATH_MAX]; ++ int count = 0; ++ ++ snprintf(dirname, sizeof(dirname), ++ "/sys/dev/block/%u:%u/slaves/", ++ major(disk), minor(disk)); ++ ++ if (!(dir = opendir(dirname))) ++ return -1; ++ ++ while ((dp = readdir(dir)) != 0) { ++#ifdef _DIRENT_HAVE_D_TYPE ++ if (dp->d_type != DT_UNKNOWN && dp->d_type != DT_LNK) ++ continue; ++#endif ++ if (dp->d_name[0] == '.' && ++ ((dp->d_name[1] == 0) || ++ ((dp->d_name[1] == '.') && (dp->d_name[2] == 0)))) ++ continue; ++ ++ count++; ++ } ++ closedir(dir); ++ return count; ++} ++ + /* + * Returns TRUE if a partition on the same disk is already being + * checked. + */ +-static int device_already_active(char *device) ++static int disk_already_active(struct fs_info *fs) + { + struct fsck_instance *inst; +- char *base; + + if (force_all_parallel) + return 0; + +-#ifdef BASE_MD +- /* Don't check a soft raid disk with any other disk */ +- if (instance_list && +- (!strncmp(instance_list->device, BASE_MD, sizeof(BASE_MD)-1) || +- !strncmp(device, BASE_MD, sizeof(BASE_MD)-1))) ++ if (instance_list && instance_list->fs->stacked) ++ /* any instance for a stacked device is already running */ + return 1; +-#endif + +- base = base_device(device); ++ if (!fs->disk) { ++ fs->disk = get_disk(fs->device); ++ if (fs->disk) ++ fs->stacked = count_slaves(fs->disk); ++ } ++ + /* + * If we don't know the base device, assume that the device is + * already active if there are any fsck instances running. ++ * ++ * Don't check a stacked device with any other disk too. + */ +- if (!base) ++ if (!fs->disk || fs->stacked) + return (instance_list != 0); ++ + for (inst = instance_list; inst; inst = inst->next) { +- if (!inst->base_device || !strcmp(base, inst->base_device)) { +- free(base); ++ if (!inst->fs->disk || fs->disk == inst->fs->disk) + return 1; +- } + } +- free(base); + return 0; + } + +@@ -1038,7 +1165,7 @@ static int check_all(NOARGS) + * already been spawned, then we need to defer + * this to another pass. + */ +- if (device_already_active(fs->device)) { ++ if (disk_already_active(fs)) { + pass_done = 0; + continue; + } +@@ -1188,6 +1315,9 @@ static void PRS(int argc, char *argv[]) + } + } + break; ++ case 'l': ++ lockdisk++; ++ break; + case 'V': + verbose++; + break; +@@ -1298,6 +1428,12 @@ int main(int argc, char *argv[]) + if ((num_devices == 1) || (serialize)) + interactive = 1; + ++ if (lockdisk && (doall || num_devices > 1)) { ++ fprintf(stderr, _("%s: the -l option can be used with one " ++ "device only -- ignore\n"), progname); ++ lockdisk = 0; ++ } ++ + /* If -A was specified ("check all"), do that! */ + if (doall) + return check_all(); +diff -up util-linux-ng-2.18/fsck/fsck.h.kzak util-linux-ng-2.18/fsck/fsck.h +--- util-linux-ng-2.18/fsck/fsck.h.kzak 2010-03-18 23:11:23.000000000 +0100 ++++ util-linux-ng-2.18/fsck/fsck.h 2010-10-26 23:55:30.000000000 +0200 +@@ -44,6 +44,8 @@ struct fs_info { + int freq; + int passno; + int flags; ++ dev_t disk; ++ int stacked; + struct fs_info *next; + }; + +@@ -56,12 +58,12 @@ struct fs_info { + struct fsck_instance { + int pid; + int flags; ++ int lock; /* flock()ed whole disk file descriptor or -1 */ + int exit_status; + time_t start_time; + char * prog; + char * type; +- char * device; +- char * base_device; ++ struct fs_info *fs; + struct fsck_instance *next; + }; + +diff -up util-linux-ng-2.18/fsck/Makefile.am.kzak util-linux-ng-2.18/fsck/Makefile.am +--- util-linux-ng-2.18/fsck/Makefile.am.kzak 2010-05-24 12:33:46.000000000 +0200 ++++ util-linux-ng-2.18/fsck/Makefile.am 2010-10-26 23:55:30.000000000 +0200 +@@ -3,7 +3,7 @@ include $(top_srcdir)/config/include-Mak + sbin_PROGRAMS = fsck + dist_man_MANS = fsck.8 + +-fsck_SOURCES = base_device.c fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ ++fsck_SOURCES = fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ + $(top_srcdir)/lib/fsprobe.c $(top_srcdir)/lib/canonicalize.c + fsck_LDADD = + fsck_CFLAGS = $(AM_CFLAGS) +diff -up util-linux-ng-2.18/fsck/Makefile.in.kzak util-linux-ng-2.18/fsck/Makefile.in +--- util-linux-ng-2.18/fsck/Makefile.in.kzak 2010-10-26 23:56:04.000000000 +0200 ++++ util-linux-ng-2.18/fsck/Makefile.in 2010-10-26 23:56:15.000000000 +0200 +@@ -62,9 +62,8 @@ CONFIG_CLEAN_FILES = + CONFIG_CLEAN_VPATH_FILES = + am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" + PROGRAMS = $(sbin_PROGRAMS) +-am_fsck_OBJECTS = fsck-base_device.$(OBJEXT) fsck-fsck.$(OBJEXT) \ +- fsck-ismounted.$(OBJEXT) fsck-fsprobe.$(OBJEXT) \ +- fsck-canonicalize.$(OBJEXT) ++am_fsck_OBJECTS = fsck-fsck.$(OBJEXT) fsck-ismounted.$(OBJEXT) \ ++ fsck-fsprobe.$(OBJEXT) fsck-canonicalize.$(OBJEXT) + fsck_OBJECTS = $(am_fsck_OBJECTS) + am__DEPENDENCIES_1 = + @BUILD_LIBBLKID_FALSE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) +@@ -204,6 +203,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PERL = @PERL@ +@@ -315,7 +315,7 @@ ul_libmount_la = $(top_builddir)/shlibs/ + # mount.h is generated by ./configure script and stored in build directory + ul_libmount_incdir = $(ul_libmount_builddir) + dist_man_MANS = fsck.8 +-fsck_SOURCES = base_device.c fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ ++fsck_SOURCES = fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ + $(top_srcdir)/lib/fsprobe.c $(top_srcdir)/lib/canonicalize.c + + fsck_LDADD = $(am__append_1) $(am__append_3) +@@ -407,7 +407,6 @@ mostlyclean-compile: + distclean-compile: + -rm -f *.tab.c + +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-base_device.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-canonicalize.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-fsck.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-fsprobe.Po@am__quote@ +@@ -437,22 +436,6 @@ distclean-compile: + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +-fsck-base_device.o: base_device.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-base_device.o -MD -MP -MF $(DEPDIR)/fsck-base_device.Tpo -c -o fsck-base_device.o `test -f 'base_device.c' || echo '$(srcdir)/'`base_device.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-base_device.Tpo $(DEPDIR)/fsck-base_device.Po +-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='base_device.c' object='fsck-base_device.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -c -o fsck-base_device.o `test -f 'base_device.c' || echo '$(srcdir)/'`base_device.c +- +-fsck-base_device.obj: base_device.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-base_device.obj -MD -MP -MF $(DEPDIR)/fsck-base_device.Tpo -c -o fsck-base_device.obj `if test -f 'base_device.c'; then $(CYGPATH_W) 'base_device.c'; else $(CYGPATH_W) '$(srcdir)/base_device.c'; fi` +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-base_device.Tpo $(DEPDIR)/fsck-base_device.Po +-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='base_device.c' object='fsck-base_device.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -c -o fsck-base_device.obj `if test -f 'base_device.c'; then $(CYGPATH_W) 'base_device.c'; else $(CYGPATH_W) '$(srcdir)/base_device.c'; fi` +- + fsck-fsck.o: fsck.c + @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-fsck.o -MD -MP -MF $(DEPDIR)/fsck-fsck.Tpo -c -o fsck-fsck.o `test -f 'fsck.c' || echo '$(srcdir)/'`fsck.c + @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-fsck.Tpo $(DEPDIR)/fsck-fsck.Po +diff -up util-linux-ng-2.18/Makefile.am.kzak util-linux-ng-2.18/Makefile.am +--- util-linux-ng-2.18/Makefile.am.kzak 2010-03-18 23:11:23.000000000 +0100 ++++ util-linux-ng-2.18/Makefile.am 2010-10-26 23:55:30.000000000 +0200 +@@ -30,8 +30,10 @@ SUBDIRS += mount + endif + + if BUILD_FSCK ++if BUILD_LIBBLKID + SUBDIRS += fsck + endif ++endif + + ACLOCAL_AMFLAGS = -I m4 + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index f30a19e..b71bacf 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -116,6 +116,8 @@ Patch9: util-linux-ng-2.18-agetty-baudrate.patch Patch10: util-linux-ng-2.18-agetty-clocal.patch # 618957 - ISO images listed in fstab are mounted twice at boot Patch11: util-linux-ng-2.17-mount-loopdev.patch +# backport from upstream, add -l (lock) support to fsck, requested by systemd +Patch12: util-linux-ng-2.18-fsck-wholedisk.patch %description The util-linux-ng package contains a large variety of low-level system @@ -233,6 +235,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 %build unset LINGUAS || : @@ -771,6 +774,7 @@ fi %changelog * Tue Oct 26 2010 Karel Zak 2.18-5 - fix #645640 - new "-s" parameter parsing in agetty does not work +- add -l (lock) support to fsck * Wed Aug 18 2010 Karel Zak 2.18-4 - fix #623685 - please extend agetty to not require a baud rate to be specified From d59979fa05e2402ffa389c4362d1cbcce0e55582 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 19 Jan 2011 10:13:23 +0100 Subject: [PATCH 48/48] retired Signed-off-by: Karel Zak --- dead.package | 2 + mount.tmpfs | 51 - nologin.8 | 63 - nologin.c | 58 - sources | 2 - util-linux-ng-2.13-ctrlaltdel-man.patch | 10 - util-linux-ng-2.13-fdformat-man-ide.patch | 23 - util-linux-ng-2.13-floppy-generic.patch | 102 - util-linux-ng-2.13-floppy-locale.patch | 10 - util-linux-ng-2.13-login-lastlog.patch | 13 - util-linux-ng-2.15-ipcs-32bit.patch | 48 - util-linux-ng-2.16-blkid-cachefile.patch | 78 - util-linux-ng-2.17-mount-loopdev.patch | 83 - util-linux-ng-2.18-agetty-baudrate.patch | 206 -- util-linux-ng-2.18-agetty-clocal.patch | 26 - util-linux-ng-2.18-fsck-wholedisk.patch | 510 ----- util-linux-ng-60-raw.rules | 11 - util-linux-ng-chsh-chfn.pamd | 6 - util-linux-ng-login.pamd | 16 - util-linux-ng-remote.pamd | 14 - util-linux-ng.spec | 2314 --------------------- uuidd.init | 117 -- 22 files changed, 2 insertions(+), 3761 deletions(-) create mode 100644 dead.package delete mode 100644 mount.tmpfs delete mode 100644 nologin.8 delete mode 100644 nologin.c delete mode 100644 sources delete mode 100644 util-linux-ng-2.13-ctrlaltdel-man.patch delete mode 100644 util-linux-ng-2.13-fdformat-man-ide.patch delete mode 100644 util-linux-ng-2.13-floppy-generic.patch delete mode 100644 util-linux-ng-2.13-floppy-locale.patch delete mode 100644 util-linux-ng-2.13-login-lastlog.patch delete mode 100644 util-linux-ng-2.15-ipcs-32bit.patch delete mode 100644 util-linux-ng-2.16-blkid-cachefile.patch delete mode 100644 util-linux-ng-2.17-mount-loopdev.patch delete mode 100644 util-linux-ng-2.18-agetty-baudrate.patch delete mode 100644 util-linux-ng-2.18-agetty-clocal.patch delete mode 100644 util-linux-ng-2.18-fsck-wholedisk.patch delete mode 100644 util-linux-ng-60-raw.rules delete mode 100644 util-linux-ng-chsh-chfn.pamd delete mode 100644 util-linux-ng-login.pamd delete mode 100644 util-linux-ng-remote.pamd delete mode 100644 util-linux-ng.spec delete mode 100755 uuidd.init diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..aca69ac --- /dev/null +++ b/dead.package @@ -0,0 +1,2 @@ + + util-linux-ng has been renamed to util-linux diff --git a/mount.tmpfs b/mount.tmpfs deleted file mode 100644 index 5495c9d..0000000 --- a/mount.tmpfs +++ /dev/null @@ -1,51 +0,0 @@ -#! /bin/bash -# -# Copyright (C) 2009 Eric Paris -# Daniel Walsh -# Karel Zak -# -# http://bugzilla.redhat.com/show_bug.cgi?id=476964 -# -# Usage: -# /sbin/mount.tmpfs spec dir [-sfnv] [-o options] -# - -case $1 in - -h|--help|-?) - echo "mount.tmpfs is a private mount(8) wrapper for tmpfs." - echo "Don't use it directly!" - exit 1 - ;; -esac - -restricted=1 - -if [ $UID -eq 0 ] && [ $UID -eq $EUID ]; then - restricted=0 -fi - -# mount(8) in restricted mode (for non-root users) does not allow to use any -# mount options, types or so on command line. We have to call mount(8) with -# mountpoint only. All necessary options have to be defined in /etc/fstab. -# -# https://bugzilla.redhat.com/show_bug.cgi?id=615719 -# -if [ $restricted -eq 1 ]; then - exec /bin/mount -i "$2" -fi - -# Remount with context mount options is unsupported -# http://bugzilla.redhat.com/show_bug.cgi?id=563267 -# -if ! echo "$@" | grep -q -E '\-o.*remount'; then - - if ! echo "$@" | grep -q -E '(fs|def|root)?context='; then - con=$(ls --scontext -d "$2" | cut -f 1 -d ' ') - if [ -n "$con" ] && [ "$con" != "?" ] && [ "$con" != "unlabeled" ]; then - exec /bin/mount "$@" -o "rootcontext=\"$con\"" -i -t tmpfs - fi - fi - -fi - -exec /bin/mount "$@" -i -t tmpfs diff --git a/nologin.8 b/nologin.8 deleted file mode 100644 index 5cb1601..0000000 --- a/nologin.8 +++ /dev/null @@ -1,63 +0,0 @@ -.\" $OpenBSD: nologin.8,v 1.8 1999/06/04 02:45:19 aaron Exp $ -.\" $NetBSD: nologin.8,v 1.3 1995/03/18 14:59:09 cgd Exp $ -.\" -.\" Copyright (c) 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" @(#)nologin.8 8.1 (Berkeley) 6/19/93 -.\" -.Dd February 15, 1997 -.Dt NOLOGIN 8 -.Os -.Sh NAME -.Nm nologin -.Nd politely refuse a login -.Sh SYNOPSIS -.Nm nologin -.Sh DESCRIPTION -.Nm -displays a message that an account is not available and -exits non-zero. -It is intended as a replacement shell field for accounts that -have been disabled. -.Pp -If the file -.Pa /etc/nologin.txt -exists, -.Nm -displays its contents to the user instead of the default message. -.Sh SEE ALSO -.Xr login 1 -.Sh HISTORY -The -.Nm -command appeared in -.Bx 4.4 . diff --git a/nologin.c b/nologin.c deleted file mode 100644 index 8a51ba9..0000000 --- a/nologin.c +++ /dev/null @@ -1,58 +0,0 @@ -/* $OpenBSD: nologin.c,v 1.2 1997/04/04 16:51:37 millert Exp $ */ - -/* - * Copyright (c) 1997, Jason Downs. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include - -/* Distinctly different from _PATH_NOLOGIN. */ -#define _PATH_NOLOGIN_TXT "/etc/nologin.txt" - -#define DEFAULT_MESG "This account is currently not available.\n" - -/*ARGSUSED*/ -int main(argc, argv) - int argc; - char *argv[]; -{ - int nfd, nrd; - char nbuf[128]; - - nfd = open(_PATH_NOLOGIN_TXT, O_RDONLY); - if (nfd < 0) { - write(STDOUT_FILENO, DEFAULT_MESG, strlen(DEFAULT_MESG)); - exit (1); - } - - while ((nrd = read(nfd, nbuf, sizeof(nbuf))) > 0) - write(STDOUT_FILENO, nbuf, nrd); - close (nfd); - - exit (1); -} diff --git a/sources b/sources deleted file mode 100644 index 0384138..0000000 --- a/sources +++ /dev/null @@ -1,2 +0,0 @@ -7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -2f5f71e6af969d041d73ab778c141a77 util-linux-ng-2.18.tar.bz2 diff --git a/util-linux-ng-2.13-ctrlaltdel-man.patch b/util-linux-ng-2.13-ctrlaltdel-man.patch deleted file mode 100644 index ab7c6bd..0000000 --- a/util-linux-ng-2.13-ctrlaltdel-man.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- util-linux-2.13-pre6/sys-utils/ctrlaltdel.8.kzak 2006-08-10 12:23:53.000000000 +0200 -+++ util-linux-2.13-pre6/sys-utils/ctrlaltdel.8 2006-08-10 12:24:08.000000000 +0200 -@@ -32,7 +32,6 @@ - .SH FILES - .I /etc/rc.local - .SH "SEE ALSO" --.BR simpleinit (8), - .BR init (8) - .SH AUTHOR - Peter Orbaek (poe@daimi.aau.dk) diff --git a/util-linux-ng-2.13-fdformat-man-ide.patch b/util-linux-ng-2.13-fdformat-man-ide.patch deleted file mode 100644 index 1116641..0000000 --- a/util-linux-ng-2.13-fdformat-man-ide.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- util-linux-ng-2.13-rc3/disk-utils/fdformat.8.xxx 2007-07-03 01:56:04.000000000 +0200 -+++ util-linux-ng-2.13-rc3/disk-utils/fdformat.8 2007-08-13 12:07:58.000000000 +0200 -@@ -45,6 +45,10 @@ - .BR setfdprm (8) - to load the disk parameters. - -+For ATAPI IDE floppy driver (also known as LS-120 drives or "Superdisk" -+drives) you have to use the -+.BR floppy (8). -+ - .SH OPTIONS - .TP - .B \-n -@@ -54,7 +58,8 @@ - .BR fd (4), - .BR setfdprm (8), - .BR mkfs (8), --.BR emkfs (8) -+.BR emkfs (8), -+.BR floppy (8) - .SH AUTHOR - Werner Almesberger (almesber@nessie.cs.id.ethz.ch) - .SH AVAILABILITY diff --git a/util-linux-ng-2.13-floppy-generic.patch b/util-linux-ng-2.13-floppy-generic.patch deleted file mode 100644 index ffc4750..0000000 --- a/util-linux-ng-2.13-floppy-generic.patch +++ /dev/null @@ -1,102 +0,0 @@ ---- util-linux-2.12p/floppy-0.16/floppyfloppy.c.generic 2001-02-13 01:15:38.000000000 +0100 -+++ util-linux-2.12p/floppy-0.16/floppyfloppy.c 2005-09-30 15:38:08.000000000 +0200 -@@ -264,6 +264,33 @@ - #endif - } - -+/* -1=error, 1=true, 0=false */ -+static int check_generic(const char *dev, int n) -+{ -+ struct floppy_struct param; -+ int fd; -+ -+ if ((fd=open(dev, O_RDONLY)) < 0) -+ { -+ perror(dev); -+ return -1; -+ } -+ if (ioctl(fd,FDGETPRM,(long) ¶m) < 0) -+ { -+ perror(dev); -+ close(fd); -+ return -1; -+ } -+ close(fd); -+ -+ if (param.sect==floppy_type[n].sectors && -+ param.head==floppy_type[n].heads && -+ param.track==floppy_type[n].tracks) -+ /* generic device uses expected format */ -+ return 1; -+ -+ return 0; -+} - - static int do_format(const char *dev, int fmtnum, - int (*fmt_func)(const char *, int), int flags) -@@ -275,6 +302,7 @@ - struct format_descr curtrack; - int pct; - struct stat stat_buf; -+ int gen = 0; - - int i, j; - char *devname; -@@ -297,23 +325,52 @@ - - strcat(strcpy(devname, dev), floppy_type[fmtnum].dev); - -+ if (stat(devname, &stat_buf)==-1 && errno==ENOENT) -+ { -+ /* /dev/fd0xxxxx doesn't exist ...try to use generic device -+ * -+ * Note: we needn't size specific device if the generic device uses -+ * right floppy format (FDGETPRM). -- Karel Zak [30/09/2005] -+ */ -+ if ((gen = check_generic(dev, fmtnum))==1) /* true */ -+ { -+ fprintf(stderr, _("WARNING: size specific device %s doesn't exist, using generic device: %s\n"), -+ devname, dev); -+ strcpy(devname, dev); -+ } -+ else if (gen==0) /* false */ -+ { -+ fprintf(stderr, _("ERROR: size specific device %1$s doesn't exist. Use \"MAKEDEV %1$s\" and try it again.\n"), devname); -+ return (1); -+ } -+ else /* error -- no floppy medium or device? */ -+ return(1); -+ } - fd=open(devname, O_WRONLY); - if (fd < 0) - { - perror(devname); - return (1); - } -- -- if (fstat(fd, &stat_buf) || -- !S_ISBLK(stat_buf.st_mode) || -- MINOR_DEV(stat_buf.st_rdev) != fmtnum) -+ if (fstat(fd, &stat_buf) < 0) -+ { -+ perror(devname); -+ close(fd); -+ return (1); -+ } -+ if (!S_ISBLK(stat_buf.st_mode)) -+ { -+ fprintf(stderr,_("%s: not a block device\n"), devname); -+ close(fd); -+ return (1); -+ } -+ if (gen==0 && MINOR_DEV(stat_buf.st_rdev) != fmtnum) - { - errno=EINVAL; - perror(devname); - close(fd); - return (1); - } -- - if (ioctl(fd, FDGETPRM, &geo) < 0) - { - perror(devname); diff --git a/util-linux-ng-2.13-floppy-locale.patch b/util-linux-ng-2.13-floppy-locale.patch deleted file mode 100644 index 9b8142f..0000000 --- a/util-linux-ng-2.13-floppy-locale.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- util-linux-ng-2.13-rc3/floppy-0.16/superfloppy.c.kzak 2001-07-14 05:26:16.000000000 +0200 -+++ util-linux-ng-2.13-rc3/floppy-0.16/superfloppy.c 2007-08-13 13:14:53.000000000 +0200 -@@ -12,6 +12,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/util-linux-ng-2.13-login-lastlog.patch b/util-linux-ng-2.13-login-lastlog.patch deleted file mode 100644 index 548b99d..0000000 --- a/util-linux-ng-2.13-login-lastlog.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-linux-ng-2.14.2-rc1/login-utils/login.c -=================================================================== ---- util-linux-ng-2.14.2-rc1.orig/login-utils/login.c -+++ util-linux-ng-2.14.2-rc1/login-utils/login.c -@@ -1415,7 +1415,7 @@ dolastlog(int quiet) { - struct lastlog ll; - int fd; - -- if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) >= 0) { -+ if ((fd = open(_PATH_LASTLOG, O_RDWR|O_CREAT, 0)) >= 0) { - lseek(fd, (off_t)pwd->pw_uid * sizeof(ll), SEEK_SET); - if (!quiet) { - if (read(fd, (char *)&ll, sizeof(ll)) == sizeof(ll) && diff --git a/util-linux-ng-2.15-ipcs-32bit.patch b/util-linux-ng-2.15-ipcs-32bit.patch deleted file mode 100644 index c3860f1..0000000 --- a/util-linux-ng-2.15-ipcs-32bit.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -up util-linux-ng-2.15.1-rc1/sys-utils/ipcs.c.kzak util-linux-ng-2.15.1-rc1/sys-utils/ipcs.c ---- util-linux-ng-2.15.1-rc1/sys-utils/ipcs.c.kzak 2009-03-25 13:19:08.000000000 +0100 -+++ util-linux-ng-2.15.1-rc1/sys-utils/ipcs.c 2009-06-04 15:22:48.000000000 +0200 -@@ -243,6 +243,26 @@ print_perms (int id, struct ipc_perm *ip - 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) - { -@@ -266,12 +286,12 @@ void do_shm (char format) - 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)); - 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; diff --git a/util-linux-ng-2.16-blkid-cachefile.patch b/util-linux-ng-2.16-blkid-cachefile.patch deleted file mode 100644 index 7edd4e9..0000000 --- a/util-linux-ng-2.16-blkid-cachefile.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- - misc-utils/blkid.8 | 4 ++-- - misc-utils/blkid.c | 2 +- - shlibs/blkid/libblkid.3 | 6 +++--- - shlibs/blkid/src/blkidP.h | 2 +- - 4 files changed, 7 insertions(+), 7 deletions(-) - ---- util-linux-ng-2.18-rc1.orig/misc-utils/blkid.8 -+++ util-linux-ng-2.18-rc1/misc-utils/blkid.8 -@@ -81,7 +81,7 @@ same meaning as "KiB") or decimal (10^N) - Read from - .I cachefile - instead of reading from the default cache file --.IR /etc/blkid.tab . -+.IR /etc/blkid/blkid.tab . - If you want to start with a clean cache (i.e. don't report devices previously - scanned but not necessarily available at this time), specify - .IR /dev/null . -@@ -228,7 +228,7 @@ Display version number and exit. - Write the device cache to - .I writecachefile - instead of writing it to the default cache file --.IR /etc/blkid.tab . -+.IR /etc/blkid/blkid.tab . - If you don't want to save the cache to the default file, specify - .IR /dev/null. - If not specified it will be the same file as that given by the ---- util-linux-ng-2.18-rc1.orig/misc-utils/blkid.c -+++ util-linux-ng-2.18-rc1/misc-utils/blkid.c -@@ -65,7 +65,7 @@ static void usage(int error) - " [-o format] [dev ...]\n\n" - " %1$s -i [-s ] [-o format] [dev ...]\n\n" - "Options:\n" -- " -c cache file (default: /etc/blkid.tab, /dev/null = none)\n" -+ " -c cache file (default: /etc/blkid/blkid.tab, /dev/null = none)\n" - " -h print this usage message and exit\n" - " -g garbage collect the blkid cache\n" - " -o output format; can be one of:\n" ---- util-linux-ng-2.18-rc1.orig/shlibs/blkid/libblkid.3 -+++ util-linux-ng-2.18-rc1/shlibs/blkid/libblkid.3 -@@ -24,7 +24,7 @@ A common use is to allow use of LABEL= a - specific block device names into configuration files. - .P - Block device information is normally kept in a cache file --.I /etc/blkid.tab -+.I /etc/blkid/blkid.tab - and is verified to still be valid before being returned to the user - (if the user has read permission on the raw block device, otherwise not). - The cache file also allows unprivileged users (normally anyone other -@@ -59,7 +59,7 @@ symlink does not match with LABEL or UUI - .I CACHE_FILE= - Overrides the standard location of the cache file. This setting can be - overridden by the environment variable BLKID_FILE. Default is --.I /etc/blkid.tab. -+.I /etc/blkid/blkid.tab. - .TP - .I EVALUATE= - Defines LABEL and UUID evaluation method(s). Currently, the libblkid library -@@ -77,7 +77,7 @@ from Ted Ts'o. The library was subseque - The low-level probing code was rewritten by Karel Zak. - .SH FILES - .TP 18 --.I /etc/blkid.tab -+.I /etc/blkid/blkid.tab - caches data extracted from each recognized block device - .TP - .I /etc/blkid.conf ---- util-linux-ng-2.18-rc1.orig/shlibs/blkid/src/blkidP.h -+++ util-linux-ng-2.18-rc1/shlibs/blkid/src/blkidP.h -@@ -279,7 +279,7 @@ extern int blkid_fstatat(DIR *dir, const - extern int blkid_openat(DIR *dir, const char *dirname, const char *filename, - int flags); - --#define BLKID_CACHE_FILE "/etc/blkid.tab" -+#define BLKID_CACHE_FILE "/etc/blkid/blkid.tab" - #define BLKID_CONFIG_FILE "/etc/blkid.conf" - - #define BLKID_ERR_IO 5 diff --git a/util-linux-ng-2.17-mount-loopdev.patch b/util-linux-ng-2.17-mount-loopdev.patch deleted file mode 100644 index e898b3e..0000000 --- a/util-linux-ng-2.17-mount-loopdev.patch +++ /dev/null @@ -1,83 +0,0 @@ -diff -up util-linux-ng-2.17.2/mount/mount.c.kzak util-linux-ng-2.17.2/mount/mount.c ---- util-linux-ng-2.17.2/mount/mount.c.kzak 2010-03-22 09:10:56.000000000 +0100 -+++ util-linux-ng-2.17.2/mount/mount.c 2010-07-29 16:15:28.000000000 +0200 -@@ -1090,7 +1090,8 @@ loop_check(const char **spec, const char - if (verbose) - printf(_("mount: skipping the setup of a loop device\n")); - } else { -- int loop_opts = SETLOOP_AUTOCLEAR; /* always attempt autoclear */ -+ /* use autoclear loopdev on system without regular mtab only */ -+ int loop_opts = mtab_is_writable() ? 0 : SETLOOP_AUTOCLEAR; - int res; - - if (*flags & MS_RDONLY) -@@ -1759,6 +1760,50 @@ mounted (const char *spec0, const char * - return ret; - } - -+/* returns 0 if not mounted, 1 if mounted and -1 in case of error */ -+static int -+is_fstab_entry_mounted(struct mntentchn *mc, int verbose) -+{ -+ struct stat st; -+ -+ if (mounted(mc->m.mnt_fsname, mc->m.mnt_dir)) -+ goto yes; -+ -+ /* extra care for loop devices */ -+ if ((strstr(mc->m.mnt_opts, "loop=") || -+ (stat(mc->m.mnt_fsname, &st) == 0 && S_ISREG(st.st_mode)))) { -+ -+ char *p = strstr(mc->m.mnt_opts, "offset="); -+ uintmax_t offset = 0; -+ -+ if (p && *(p + 7)) { -+ char *end = NULL; -+ -+ p += 7; -+ errno = 0; -+ offset = strtoumax(p, &end, 0); -+ -+ if (end == p || (errno != 0 && -+ (offset == UINTMAX_MAX || offset == 0))) { -+ if (verbose) -+ printf(_("mount: ignore %s " -+ "(unparsable offset= option)\n"), -+ mc->m.mnt_fsname); -+ return -1; -+ } -+ } -+ if (is_mounted_same_loopfile(mc->m.mnt_dir, mc->m.mnt_fsname, offset)) -+ goto yes; -+ } -+ -+ return 0; -+yes: -+ if (verbose) -+ printf(_("mount: %s already mounted on %s\n"), -+ mc->m.mnt_fsname, mc->m.mnt_dir); -+ return 1; -+} -+ - /* avoid using stat() on things we are not going to mount anyway.. */ - static int - has_noauto (const char *opts) { -@@ -1804,16 +1849,8 @@ do_mount_all (char *types, char *options - if (matching_type (mc->m.mnt_type, types) - && matching_opts (mc->m.mnt_opts, test_opts) - && !streq (mc->m.mnt_dir, "/") -- && !streq (mc->m.mnt_dir, "root")) { -- -- if (mounted (mc->m.mnt_fsname, mc->m.mnt_dir)) { -- if (verbose) -- printf(_("mount: %s already mounted " -- "on %s\n"), -- mc->m.mnt_fsname, -- mc->m.mnt_dir); -- continue; -- } -+ && !streq (mc->m.mnt_dir, "root") -+ && !is_fstab_entry_mounted(mc, verbose)) { - - mtmp = (struct mntentchn *) xmalloc(sizeof(*mtmp)); - *mtmp = *mc; diff --git a/util-linux-ng-2.18-agetty-baudrate.patch b/util-linux-ng-2.18-agetty-baudrate.patch deleted file mode 100644 index 72dc257..0000000 --- a/util-linux-ng-2.18-agetty-baudrate.patch +++ /dev/null @@ -1,206 +0,0 @@ - - based on upstream patch: - - commit 848e5e6ce3978d921366b799d907a78a12299924 - Author: Karel Zak - Date: Wed Aug 18 09:02:03 2010 +0200 - - agetty: add -s to reuse existing baud rate - - For example: - - /sbin/agetty -s /dev/ttyS0 9600 - - will reuse the speed the kernel configured on the port. If the setting - from kernel is useless (tty returns BREAK character) then the baud - rate from command line (9600) is used. - - Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=623685 - Signed-off-by: Karel Zak - - and - - commit e98f4af950a64db188e0a9f3eed20fefaa463a99 - Author: Karel Zak - Date: Fri Oct 22 21:24:50 2010 +0200 - - agetty: fix -s option (baud rate setup) - - The problem is pretty visible in strace output: - - broken version: - ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo ...}) = 0 - [...] - ioctl(0, SNDCTL_TMR_START or TCSETS, {B0 -opost -isig -icanon -echo ...}) = 0 - ^^^ - fixed version: - ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo ...}) = 0 - [...] - ioctl(0, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0 - - Reported-by: Jon Masters - Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=645640 - Signed-off-by: Karel Zak - -diff -up util-linux-ng-2.18/login-utils/agetty.8.kzak util-linux-ng-2.18/login-utils/agetty.8 ---- util-linux-ng-2.18/login-utils/agetty.8.kzak 2010-02-04 12:53:56.000000000 +0100 -+++ util-linux-ng-2.18/login-utils/agetty.8 2010-10-22 22:07:43.000000000 +0200 -@@ -3,7 +3,7 @@ - agetty \- alternative Linux getty - - .SH SYNOPSIS --.BR "agetty " [\-8ihLmnUw] -+.BR "agetty " [\-8ihLmnsUw] - .RI "[-f " issue_file ] - .RI "[-l " login_program ] - .RI "[-I " init ] -@@ -12,16 +12,6 @@ agetty \- alternative Linux getty - .I port - .I baud_rate,... - .RI [ term ] --.br --.BR "agetty " [\-8ihLmnw] --.RI "[-f " issue_file ] --.RI "[-l " login_program ] --.RI "[-I " init ] --.RI "[-t " timeout ] --.RI "[-H " login_host ] --.I baud_rate,... --.I port --.RI [ term ] - - .SH DESCRIPTION - .ad -@@ -163,6 +153,10 @@ Force the line to be a local line with n - be useful when you have a locally attached terminal where the serial line - does not set the carrier detect signal. - .TP -+\-s -+Try to keep the existing baud rate. The baud rates from -+the command line are used when agetty receives a BREAK character. -+.TP - \-U - Turn on support for detecting an uppercase only terminal. This setting will - detect a login name containing only capitals as indicating an uppercase -diff -up util-linux-ng-2.18/login-utils/agetty.c.kzak util-linux-ng-2.18/login-utils/agetty.c ---- util-linux-ng-2.18/login-utils/agetty.c.kzak 2010-04-01 16:11:56.000000000 +0200 -+++ util-linux-ng-2.18/login-utils/agetty.c 2010-10-22 22:15:40.000000000 +0200 -@@ -133,6 +133,7 @@ struct options { - #define F_CUSTISSUE (1<<6) /* give alternative issue file */ - #define F_NOPROMPT (1<<7) /* don't ask for login name! */ - #define F_LCUC (1<<8) /* Support for *LCUC stty modes */ -+#define F_KEEPSPEED (1<<9) /* Follow baud rate from kernel */ - - /* Storage for things detected while the login name was read. */ - -@@ -203,7 +204,7 @@ void parse_args P_((int argc, char **arg - void parse_speeds P_((struct options *op, char *arg)); - void update_utmp P_((char *line)); - void open_tty P_((char *tty, struct termios *tp, int local)); --void termio_init P_((struct termios *tp, int speed, struct options *op)); -+void termio_init P_((struct termios *tp, struct options *op)); - void auto_baud P_((struct termios *tp)); - void do_prompt P_((struct options *op, struct termios *tp)); - void next_speed P_((struct termios *tp, struct options *op)); -@@ -297,7 +298,7 @@ main(argc, argv) - tcsetpgrp(0, getpid()); - /* Initialize the termios settings (raw mode, eight-bit, blocking i/o). */ - debug("calling termio_init\n"); -- termio_init(&termios, options.speeds[FIRST_SPEED], &options); -+ termio_init(&termios, &options); - - /* write the modem init string and DON'T flush the buffers */ - if (options.flags & F_INITSTRING) { -@@ -373,7 +374,7 @@ parse_args(argc, argv, op) - extern int optind; /* getopt */ - int c; - -- while (isascii(c = getopt(argc, argv, "8I:LH:f:hil:mt:wUn"))) { -+ while (isascii(c = getopt(argc, argv, "8I:LH:f:hil:mst:wUn"))) { - switch (c) { - case '8': - op->eightbits = 1; -@@ -443,6 +444,9 @@ parse_args(argc, argv, op) - case 'n': - op->flags |= F_NOPROMPT; - break; -+ case 's': -+ op->flags |= F_KEEPSPEED; /* keep kernel defined speed */ -+ break; - case 't': /* time out */ - if ((op->timeout = atoi(optarg)) <= 0) - error(_("bad timeout value: %s"), optarg); -@@ -691,11 +695,17 @@ char gbuf[1024]; - char area[1024]; - - void --termio_init(tp, speed, op) -+termio_init(tp, op) - struct termios *tp; -- int speed; - struct options *op; - { -+ speed_t ispeed, ospeed; -+ -+ if (op->flags & F_KEEPSPEED) { -+ ispeed = cfgetispeed(tp); /* save the original setting */ -+ ospeed = cfgetospeed(tp); -+ } else -+ ospeed = ispeed = op->speeds[FIRST_SPEED]; - - /* - * Initial termios settings: 8-bit characters, raw-mode, blocking i/o. -@@ -706,14 +716,20 @@ termio_init(tp, speed, op) - /* flush input and output queues, important for modems! */ - (void) tcflush(0, TCIOFLUSH); - -+ tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; -+ - tp->c_cflag = CS8 | HUPCL | CREAD; -- cfsetispeed(tp, speed); -- cfsetospeed(tp, speed); -+ -+ /* Note that the speed is stored in the c_cflag termios field, so we have -+ * set the speed always when the cflag se reseted. -+ */ -+ cfsetispeed(tp, ispeed); -+ cfsetospeed(tp, ospeed); -+ - if (op->flags & F_LOCAL) { - tp->c_cflag |= CLOCAL; - } - -- tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; - #ifdef HAVE_STRUCT_TERMIOS_C_LINE - tp->c_line = 0; - #endif -@@ -973,9 +989,18 @@ next_speed(tp, op) - struct termios *tp; - struct options *op; - { -- static int baud_index = FIRST_SPEED;/* current speed index */ -+ static int baud_index = -1; -+ -+ if (baud_index == -1) -+ /* -+ * if the F_KEEPSPEED flags is set then the FIRST_SPEED is not -+ * tested yet (see termio_init()). -+ */ -+ baud_index = (op->flags & F_KEEPSPEED) ? FIRST_SPEED : -+ 1 % op->numspeed; -+ else -+ baud_index = (baud_index + 1) % op->numspeed; - -- baud_index = (baud_index + 1) % op->numspeed; - cfsetispeed(tp, op->speeds[baud_index]); - cfsetospeed(tp, op->speeds[baud_index]); - (void) tcsetattr(0, TCSANOW, tp); -@@ -1203,7 +1228,7 @@ bcode(s) - void - usage() - { -- fprintf(stderr, _("Usage: %s [-8hiLmUw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] baud_rate,... line [termtype]\nor\t[-hiLmw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] line baud_rate,... [termtype]\n"), progname); -+ fprintf(stderr, _("Usage: %s [-8hiLmsUw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] baud_rate,... line [termtype]\nor\t[-hiLmw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] line baud_rate,... [termtype]\n"), progname); - exit(1); - } - diff --git a/util-linux-ng-2.18-agetty-clocal.patch b/util-linux-ng-2.18-agetty-clocal.patch deleted file mode 100644 index 5d0b677..0000000 --- a/util-linux-ng-2.18-agetty-clocal.patch +++ /dev/null @@ -1,26 +0,0 @@ - - backport of upstream patch: - - Commit: e143d1f00497f0178a1febec8fb4aa7c842fa35a - From: Karel Zak - Date: Mon, 12 Jul 2010 11:57:55 +0200 - Subject: [PATCH] aggety: don't wipe CLOCAL flag - - gettey should not clear the flag. It seems that the flag is - automatically enabled for serial consoles tht don't use CD signal. - - Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=598631 - Signed-off-by: Karel Zak - -diff -up util-linux-ng-2.18/login-utils/agetty.c.kzak util-linux-ng-2.18/login-utils/agetty.c ---- util-linux-ng-2.18/login-utils/agetty.c.kzak 2010-10-22 21:51:31.000000000 +0200 -+++ util-linux-ng-2.18/login-utils/agetty.c 2010-10-22 21:51:31.000000000 +0200 -@@ -715,7 +715,7 @@ termio_init(tp, speed, op) - - tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; - -- tp->c_cflag = CS8 | HUPCL | CREAD; -+ tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL); - - /* Note that the speed is stored in the c_cflag termios field, so we have - * set the speed always when the cflag se reseted. diff --git a/util-linux-ng-2.18-fsck-wholedisk.patch b/util-linux-ng-2.18-fsck-wholedisk.patch deleted file mode 100644 index 3718255..0000000 --- a/util-linux-ng-2.18-fsck-wholedisk.patch +++ /dev/null @@ -1,510 +0,0 @@ -diff -up util-linux-ng-2.18/fsck/fsck.8.kzak util-linux-ng-2.18/fsck/fsck.8 ---- util-linux-ng-2.18/fsck/fsck.8.kzak 2010-06-30 12:51:35.000000000 +0200 -+++ util-linux-ng-2.18/fsck/fsck.8 2010-10-26 23:55:30.000000000 +0200 -@@ -7,7 +7,7 @@ - fsck \- check and repair a Linux file system - .SH SYNOPSIS - .B fsck --.RB [ \-sAVRTMNP ] -+.RB [ \-lsAVRTMNP ] - .RB [ \-C - .RI [ fd ]] - .RB [ \-t -@@ -80,6 +80,17 @@ variable. Please see the file system-sp - further details. - .SH OPTIONS - .TP -+.B \-l -+Lock whole-disk device by exclusive -+.BR flock (2). -+This option can be used with one device only (e.g. -A and -l are mutually -+exclusive). This option is recommended when more -+.B fsck (8) -+instances are executed in the same time. The option is ignored when used for -+multiple devices or for non-rotating disk. The fsck does not lock underlying -+devices if executed to check stacked devices (e.g. MD or DM) -- this feature is -+not implemented yet. -+.TP - .B \-s - Serialize - .B fsck -@@ -200,6 +211,11 @@ If there are multiple filesystems with t - fsck will attempt to check them in parallel, although it will avoid running - multiple filesystem checks on the same physical disk. - .sp -+.B fsck -+does not check stacked devices (RAIDs, dm-crypt, ...) in parallel with any other -+device. See below for FSCK_FORCE_ALL_PARALLEL setting. The /sys filesystem is -+used to detemine dependencies between devices. -+.sp - Hence, a very common configuration in - .I /etc/fstab - files is to set the root filesystem to have a -@@ -366,10 +382,10 @@ program's behavior is affected by the fo - .B FSCK_FORCE_ALL_PARALLEL - If this environment variable is set, - .B fsck --will attempt to run all of the specified filesystems in parallel, --regardless of whether the filesystems appear to be on the same --device. (This is useful for RAID systems or high-end storage systems --such as those sold by companies such as IBM or EMC.) -+will attempt to run all of the specified filesystems in parallel, regardless of -+whether the filesystems appear to be on the same device. (This is useful for -+RAID systems or high-end storage systems such as those sold by companies such -+as IBM or EMC.) Note that the fs_passno value is still used. - .TP - .B FSCK_MAX_INST - This environment variable will limit the maximum number of file system -diff -up util-linux-ng-2.18/fsck/fsck.c.kzak util-linux-ng-2.18/fsck/fsck.c ---- util-linux-ng-2.18/fsck/fsck.c.kzak 2010-05-19 23:36:23.000000000 +0200 -+++ util-linux-ng-2.18/fsck/fsck.c 2010-10-26 23:55:30.000000000 +0200 -@@ -31,6 +31,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include -@@ -42,6 +44,8 @@ - #include - #include - #include -+#include -+#include - - #include "fsprobe.h" - -@@ -85,6 +89,7 @@ char *devices[MAX_DEVICES]; - char *args[MAX_ARGS]; - int num_devices, num_args; - -+int lockdisk = 0; - int verbose = 0; - int doall = 0; - int noexecute = 0; -@@ -214,11 +219,97 @@ static void parse_escape(char *word) - *q = 0; - } - -+static dev_t get_disk(const char *device) -+{ -+ struct stat st; -+ dev_t disk; -+ -+ if (!stat(device, &st) && -+ !blkid_devno_to_wholedisk(st.st_rdev, NULL, 0, &disk)) -+ return disk; -+ -+ return 0; -+} -+ -+static int is_irrotational_disk(dev_t disk) -+{ -+ char path[PATH_MAX]; -+ FILE *f; -+ int rc, x; -+ -+ rc = snprintf(path, sizeof(path), -+ "/sys/dev/block/%d:%d/queue/rotational", -+ major(disk), minor(disk)); -+ -+ if (rc < 0 || rc + 1 > sizeof(path)) -+ return 0; -+ -+ f = fopen(path, "r"); -+ if (!f) -+ return 0; -+ -+ rc = fscanf(f, "%u", &x); -+ fclose(f); -+ -+ return rc == 1 ? !x : 0; -+} -+ -+static void lock_disk(struct fsck_instance *inst) -+{ -+ dev_t disk = inst->fs->disk ? : get_disk(inst->fs->device); -+ char *diskname; -+ -+ if (!disk || is_irrotational_disk(disk)) -+ return; -+ -+ diskname = blkid_devno_to_devname(disk); -+ if (!diskname) -+ return; -+ -+ if (verbose) -+ printf(_("Locking disk %s ... "), diskname); -+ -+ inst->lock = open(diskname, O_CLOEXEC | O_RDONLY); -+ if (inst->lock >= 0) { -+ int rc = -1; -+ -+ /* inform users that we're waiting on the lock */ -+ if (verbose && -+ (rc = flock(inst->lock, LOCK_EX | LOCK_NB)) != 0 && -+ errno == EWOULDBLOCK) -+ printf(_("(waiting) ")); -+ -+ if (rc != 0 && flock(inst->lock, LOCK_EX) != 0) { -+ close(inst->lock); /* failed */ -+ inst->lock = -1; -+ } -+ } -+ -+ if (verbose) -+ printf("%s.\n", inst->lock >= 0 ? _("success") : _("failed")); -+ -+ free(diskname); -+ return; -+} -+ -+static void unlock_disk(struct fsck_instance *inst) -+{ -+ if (inst->lock >= 0) { -+ /* explicitly unlock, don't rely on close(), maybe some library -+ * (e.g. liblkid) has still open the device. -+ */ -+ flock(inst->lock, LOCK_UN); -+ close(inst->lock); -+ } -+} -+ -+ -+ - static void free_instance(struct fsck_instance *i) - { -+ if (lockdisk) -+ unlock_disk(i); - free(i->prog); -- free(i->device); -- free(i->base_device); - free(i); - return; - } -@@ -240,6 +331,8 @@ static struct fs_info *create_fs_device( - fs->passno = passno; - fs->flags = 0; - fs->next = NULL; -+ fs->disk = 0; -+ fs->stacked = 0; - - if (!filesys_info) - filesys_info = fs; -@@ -414,8 +507,7 @@ static int progress_active(NOARGS) - * Execute a particular fsck program, and link it into the list of - * child processes we are waiting for. - */ --static int execute(const char *type, const char *device, const char *mntpt, -- int interactive) -+static int execute(const char *type, struct fs_info *fs, int interactive) - { - char *s, *argv[80], prog[80]; - int argc, i; -@@ -452,7 +544,7 @@ static int execute(const char *type, con - } - } - -- argv[argc++] = string_copy(device); -+ argv[argc++] = string_copy(fs->device); - argv[argc] = 0; - - s = find_fsck(prog); -@@ -464,12 +556,19 @@ static int execute(const char *type, con - - if (verbose || noexecute) { - printf("[%s (%d) -- %s] ", s, num_running, -- mntpt ? mntpt : device); -+ fs->mountpt ? fs->mountpt : fs->device); - for (i=0; i < argc; i++) - printf("%s ", argv[i]); - printf("\n"); - } - -+ -+ inst->fs = fs; -+ inst->lock = -1; -+ -+ if (lockdisk) -+ lock_disk(inst); -+ - /* Fork and execute the correct program. */ - if (noexecute) - pid = -1; -@@ -492,8 +591,6 @@ static int execute(const char *type, con - inst->pid = pid; - inst->prog = string_copy(prog); - inst->type = string_copy(type); -- inst->device = string_copy(device); -- inst->base_device = base_device(device); - inst->start_time = time(0); - inst->next = NULL; - -@@ -597,12 +694,12 @@ static struct fsck_instance *wait_one(in - } else { - printf(_("Warning... %s for device %s exited " - "with signal %d.\n"), -- inst->prog, inst->device, sig); -+ inst->prog, inst->fs->device, sig); - status = EXIT_ERROR; - } - } else { - printf(_("%s %s: status is %x, should never happen.\n"), -- inst->prog, inst->device, status); -+ inst->prog, inst->fs->device, status); - status = EXIT_ERROR; - } - inst->exit_status = status; -@@ -641,7 +738,7 @@ ret_inst: - instance_list = inst->next; - if (verbose > 1) - printf(_("Finished with %s (exit status %d)\n"), -- inst->device, inst->exit_status); -+ inst->fs->device, inst->exit_status); - num_running--; - return inst; - } -@@ -698,7 +795,7 @@ static void fsck_device(struct fs_info * - type = DEFAULT_FSTYPE; - - num_running++; -- retval = execute(type, fs->device, fs->mountpt, interactive); -+ retval = execute(type, fs, interactive); - if (retval) { - fprintf(stderr, _("%s: Error %d while executing fsck.%s " - "for %s\n"), progname, retval, type, fs->device); -@@ -924,40 +1021,70 @@ static int ignore(struct fs_info *fs) - return 0; - } - -+static int count_slaves(dev_t disk) -+{ -+ DIR *dir; -+ struct dirent *dp; -+ char dirname[PATH_MAX]; -+ int count = 0; -+ -+ snprintf(dirname, sizeof(dirname), -+ "/sys/dev/block/%u:%u/slaves/", -+ major(disk), minor(disk)); -+ -+ if (!(dir = opendir(dirname))) -+ return -1; -+ -+ while ((dp = readdir(dir)) != 0) { -+#ifdef _DIRENT_HAVE_D_TYPE -+ if (dp->d_type != DT_UNKNOWN && dp->d_type != DT_LNK) -+ continue; -+#endif -+ if (dp->d_name[0] == '.' && -+ ((dp->d_name[1] == 0) || -+ ((dp->d_name[1] == '.') && (dp->d_name[2] == 0)))) -+ continue; -+ -+ count++; -+ } -+ closedir(dir); -+ return count; -+} -+ - /* - * Returns TRUE if a partition on the same disk is already being - * checked. - */ --static int device_already_active(char *device) -+static int disk_already_active(struct fs_info *fs) - { - struct fsck_instance *inst; -- char *base; - - if (force_all_parallel) - return 0; - --#ifdef BASE_MD -- /* Don't check a soft raid disk with any other disk */ -- if (instance_list && -- (!strncmp(instance_list->device, BASE_MD, sizeof(BASE_MD)-1) || -- !strncmp(device, BASE_MD, sizeof(BASE_MD)-1))) -+ if (instance_list && instance_list->fs->stacked) -+ /* any instance for a stacked device is already running */ - return 1; --#endif - -- base = base_device(device); -+ if (!fs->disk) { -+ fs->disk = get_disk(fs->device); -+ if (fs->disk) -+ fs->stacked = count_slaves(fs->disk); -+ } -+ - /* - * If we don't know the base device, assume that the device is - * already active if there are any fsck instances running. -+ * -+ * Don't check a stacked device with any other disk too. - */ -- if (!base) -+ if (!fs->disk || fs->stacked) - return (instance_list != 0); -+ - for (inst = instance_list; inst; inst = inst->next) { -- if (!inst->base_device || !strcmp(base, inst->base_device)) { -- free(base); -+ if (!inst->fs->disk || fs->disk == inst->fs->disk) - return 1; -- } - } -- free(base); - return 0; - } - -@@ -1038,7 +1165,7 @@ static int check_all(NOARGS) - * already been spawned, then we need to defer - * this to another pass. - */ -- if (device_already_active(fs->device)) { -+ if (disk_already_active(fs)) { - pass_done = 0; - continue; - } -@@ -1188,6 +1315,9 @@ static void PRS(int argc, char *argv[]) - } - } - break; -+ case 'l': -+ lockdisk++; -+ break; - case 'V': - verbose++; - break; -@@ -1298,6 +1428,12 @@ int main(int argc, char *argv[]) - if ((num_devices == 1) || (serialize)) - interactive = 1; - -+ if (lockdisk && (doall || num_devices > 1)) { -+ fprintf(stderr, _("%s: the -l option can be used with one " -+ "device only -- ignore\n"), progname); -+ lockdisk = 0; -+ } -+ - /* If -A was specified ("check all"), do that! */ - if (doall) - return check_all(); -diff -up util-linux-ng-2.18/fsck/fsck.h.kzak util-linux-ng-2.18/fsck/fsck.h ---- util-linux-ng-2.18/fsck/fsck.h.kzak 2010-03-18 23:11:23.000000000 +0100 -+++ util-linux-ng-2.18/fsck/fsck.h 2010-10-26 23:55:30.000000000 +0200 -@@ -44,6 +44,8 @@ struct fs_info { - int freq; - int passno; - int flags; -+ dev_t disk; -+ int stacked; - struct fs_info *next; - }; - -@@ -56,12 +58,12 @@ struct fs_info { - struct fsck_instance { - int pid; - int flags; -+ int lock; /* flock()ed whole disk file descriptor or -1 */ - int exit_status; - time_t start_time; - char * prog; - char * type; -- char * device; -- char * base_device; -+ struct fs_info *fs; - struct fsck_instance *next; - }; - -diff -up util-linux-ng-2.18/fsck/Makefile.am.kzak util-linux-ng-2.18/fsck/Makefile.am ---- util-linux-ng-2.18/fsck/Makefile.am.kzak 2010-05-24 12:33:46.000000000 +0200 -+++ util-linux-ng-2.18/fsck/Makefile.am 2010-10-26 23:55:30.000000000 +0200 -@@ -3,7 +3,7 @@ include $(top_srcdir)/config/include-Mak - sbin_PROGRAMS = fsck - dist_man_MANS = fsck.8 - --fsck_SOURCES = base_device.c fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ -+fsck_SOURCES = fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ - $(top_srcdir)/lib/fsprobe.c $(top_srcdir)/lib/canonicalize.c - fsck_LDADD = - fsck_CFLAGS = $(AM_CFLAGS) -diff -up util-linux-ng-2.18/fsck/Makefile.in.kzak util-linux-ng-2.18/fsck/Makefile.in ---- util-linux-ng-2.18/fsck/Makefile.in.kzak 2010-10-26 23:56:04.000000000 +0200 -+++ util-linux-ng-2.18/fsck/Makefile.in 2010-10-26 23:56:15.000000000 +0200 -@@ -62,9 +62,8 @@ CONFIG_CLEAN_FILES = - CONFIG_CLEAN_VPATH_FILES = - am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" - PROGRAMS = $(sbin_PROGRAMS) --am_fsck_OBJECTS = fsck-base_device.$(OBJEXT) fsck-fsck.$(OBJEXT) \ -- fsck-ismounted.$(OBJEXT) fsck-fsprobe.$(OBJEXT) \ -- fsck-canonicalize.$(OBJEXT) -+am_fsck_OBJECTS = fsck-fsck.$(OBJEXT) fsck-ismounted.$(OBJEXT) \ -+ fsck-fsprobe.$(OBJEXT) fsck-canonicalize.$(OBJEXT) - fsck_OBJECTS = $(am_fsck_OBJECTS) - am__DEPENDENCIES_1 = - @BUILD_LIBBLKID_FALSE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) -@@ -204,6 +203,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ - PACKAGE_NAME = @PACKAGE_NAME@ - PACKAGE_STRING = @PACKAGE_STRING@ - PACKAGE_TARNAME = @PACKAGE_TARNAME@ -+PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PATH_SEPARATOR = @PATH_SEPARATOR@ - PERL = @PERL@ -@@ -315,7 +315,7 @@ ul_libmount_la = $(top_builddir)/shlibs/ - # mount.h is generated by ./configure script and stored in build directory - ul_libmount_incdir = $(ul_libmount_builddir) - dist_man_MANS = fsck.8 --fsck_SOURCES = base_device.c fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ -+fsck_SOURCES = fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ - $(top_srcdir)/lib/fsprobe.c $(top_srcdir)/lib/canonicalize.c - - fsck_LDADD = $(am__append_1) $(am__append_3) -@@ -407,7 +407,6 @@ mostlyclean-compile: - distclean-compile: - -rm -f *.tab.c - --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-base_device.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-canonicalize.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-fsck.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-fsprobe.Po@am__quote@ -@@ -437,22 +436,6 @@ distclean-compile: - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - --fsck-base_device.o: base_device.c --@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-base_device.o -MD -MP -MF $(DEPDIR)/fsck-base_device.Tpo -c -o fsck-base_device.o `test -f 'base_device.c' || echo '$(srcdir)/'`base_device.c --@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-base_device.Tpo $(DEPDIR)/fsck-base_device.Po --@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='base_device.c' object='fsck-base_device.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -c -o fsck-base_device.o `test -f 'base_device.c' || echo '$(srcdir)/'`base_device.c -- --fsck-base_device.obj: base_device.c --@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-base_device.obj -MD -MP -MF $(DEPDIR)/fsck-base_device.Tpo -c -o fsck-base_device.obj `if test -f 'base_device.c'; then $(CYGPATH_W) 'base_device.c'; else $(CYGPATH_W) '$(srcdir)/base_device.c'; fi` --@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-base_device.Tpo $(DEPDIR)/fsck-base_device.Po --@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='base_device.c' object='fsck-base_device.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -c -o fsck-base_device.obj `if test -f 'base_device.c'; then $(CYGPATH_W) 'base_device.c'; else $(CYGPATH_W) '$(srcdir)/base_device.c'; fi` -- - fsck-fsck.o: fsck.c - @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-fsck.o -MD -MP -MF $(DEPDIR)/fsck-fsck.Tpo -c -o fsck-fsck.o `test -f 'fsck.c' || echo '$(srcdir)/'`fsck.c - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-fsck.Tpo $(DEPDIR)/fsck-fsck.Po -diff -up util-linux-ng-2.18/Makefile.am.kzak util-linux-ng-2.18/Makefile.am ---- util-linux-ng-2.18/Makefile.am.kzak 2010-03-18 23:11:23.000000000 +0100 -+++ util-linux-ng-2.18/Makefile.am 2010-10-26 23:55:30.000000000 +0200 -@@ -30,8 +30,10 @@ SUBDIRS += mount - endif - - if BUILD_FSCK -+if BUILD_LIBBLKID - SUBDIRS += fsck - endif -+endif - - ACLOCAL_AMFLAGS = -I m4 - diff --git a/util-linux-ng-60-raw.rules b/util-linux-ng-60-raw.rules deleted file mode 100644 index 2279c91..0000000 --- a/util-linux-ng-60-raw.rules +++ /dev/null @@ -1,11 +0,0 @@ -# This file and interface are deprecated. -# Applications needing raw device access should open regular -# block devices with O_DIRECT. -# -# Enter raw device bindings here. -# -# An example would be: -# ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N" -# to bind /dev/raw/raw1 to /dev/sda, or -# ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/bin/raw /dev/raw/raw2 %M %m" -# to bind /dev/raw/raw2 to the device with major 8, minor 1. diff --git a/util-linux-ng-chsh-chfn.pamd b/util-linux-ng-chsh-chfn.pamd deleted file mode 100644 index 2dbc0aa..0000000 --- a/util-linux-ng-chsh-chfn.pamd +++ /dev/null @@ -1,6 +0,0 @@ -#%PAM-1.0 -auth sufficient pam_rootok.so -auth include system-auth -account include system-auth -password include system-auth -session include system-auth diff --git a/util-linux-ng-login.pamd b/util-linux-ng-login.pamd deleted file mode 100644 index 2c9a3a2..0000000 --- a/util-linux-ng-login.pamd +++ /dev/null @@ -1,16 +0,0 @@ -#%PAM-1.0 -auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so -auth include system-auth -account required pam_nologin.so -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 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 required pam_namespace.so -session optional pam_keyinit.so force revoke -session include system-auth --session optional pam_ck_connector.so diff --git a/util-linux-ng-remote.pamd b/util-linux-ng-remote.pamd deleted file mode 100644 index d8f83f3..0000000 --- a/util-linux-ng-remote.pamd +++ /dev/null @@ -1,14 +0,0 @@ -#%PAM-1.0 -auth required pam_securetty.so -auth include password-auth -account required pam_nologin.so -account include password-auth -password include password-auth -# pam_selinux.so close should be the first session rule -session required pam_selinux.so close -session required pam_loginuid.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 required pam_namespace.so -session optional pam_keyinit.so force revoke -session include password-auth diff --git a/util-linux-ng.spec b/util-linux-ng.spec deleted file mode 100644 index b71bacf..0000000 --- a/util-linux-ng.spec +++ /dev/null @@ -1,2314 +0,0 @@ -### Header -Summary: A collection of basic system utilities -Name: util-linux-ng -Version: 2.18 -Release: 5%{?dist} -License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain -Group: System Environment/Base -URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng - -%define upstream_version %{version} - -### Features -%if 0%{?rhel} -%define include_raw 1 -%else -%define include_raw 0 -%endif - -### Macros -%define floppyver 0.16 -%define cytune_archs %{ix86} alpha armv4l - -### Paths -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root - -### Dependences -BuildRequires: audit-libs-devel >= 1.0.6 -BuildRequires: gettext-devel -BuildRequires: libselinux-devel -BuildRequires: ncurses-devel -BuildRequires: pam-devel -BuildRequires: texinfo -BuildRequires: zlib-devel -BuildRequires: popt-devel -BuildRequires: libutempter-devel - -### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/util-linux-ng-%{upstream_version}.tar.bz2 -Source1: util-linux-ng-login.pamd -Source2: util-linux-ng-remote.pamd -Source3: util-linux-ng-chsh-chfn.pamd -Source4: util-linux-ng-60-raw.rules -Source5: mount.tmpfs -Source8: nologin.c -Source9: nologin.8 -Source10: uuidd.init -Source11: http://dl.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 - -### Obsoletes & Conflicts & Provides -%ifarch alpha -Conflicts: initscripts <= 4.58 -%endif -Conflicts: kernel < 2.2.12-7 -# old versions of e2fsprogs contain fsck, uuidgen -Conflicts: e2fsprogs < 1.41.8-5 - -# old versions of util-linux have been splited to more sub-packages -Obsoletes: mount < 2.11, losetup < 2.11 -Provides: mount = %{version}-%{release}, losetup = %{version}-%{release} -# Robert Love's schedutils have been merged to util-linux-2.13-pre1 -Obsoletes: schedutils < 1.5 -Provides: schedutils = %{version}-%{release} -# fork and rename from util-linux to util-linux-ng -Obsoletes: util-linux < 2.13.1 -Provides: util-linux = %{version}-%{release} - -# setarch merge in util-linux-ng-2.13 -%ifarch sparc sparcv9 sparc64 -Obsoletes: sparc32 -%endif -Obsoletes: setarch < 2.1 -Provides: setarch = %{version}-%{release} - -Requires(preun): /sbin/install-info -Requires(post): /sbin/install-info -Requires(post): coreutils -Requires: pam >= 1.0.90, /etc/pam.d/system-auth -Requires: audit-libs >= 1.0.6 -Requires: libuuid = %{version}-%{release} -Requires: libblkid = %{version}-%{release} -Requires: libmount = %{version}-%{release} - -%if %{include_raw} -Requires: udev -%endif - -### Floppy patches (Fedora/RHEL specific) -### -# add a missing header -Patch0: util-linux-ng-2.13-floppy-locale.patch -# add note about ATAPI IDE floppy to fdformat.8 -Patch1: util-linux-ng-2.13-fdformat-man-ide.patch -# 169628 - /usr/bin/floppy doesn't work with /dev/fd0 -Patch2: util-linux-ng-2.13-floppy-generic.patch - -### Fedora/RHEL specific patches -- need to die! -### -# 199745 - Non-existant simpleinit(8) mentioned in ctrlaltdel(8) -Patch4: util-linux-ng-2.13-ctrlaltdel-man.patch -# /etc/blkid.tab --> /etc/blkid/blkid.tab -Patch5: util-linux-ng-2.16-blkid-cachefile.patch - -### Ready for upstream? -### -# 151635 - makeing /var/log/lastlog -Patch7: util-linux-ng-2.13-login-lastlog.patch -# 231192 - ipcs is not printing correct values on pLinux -Patch8: util-linux-ng-2.15-ipcs-32bit.patch - -### Upstream Patches -### -# 623685 - please extend agetty to not require a baud rate to be specified -# 645640 - new "-s" parameter parsing in agetty does not work -Patch9: util-linux-ng-2.18-agetty-baudrate.patch -# 598631 - shutdown, reboot, halt and C-A-D don't work -Patch10: util-linux-ng-2.18-agetty-clocal.patch -# 618957 - ISO images listed in fstab are mounted twice at boot -Patch11: util-linux-ng-2.17-mount-loopdev.patch -# backport from upstream, add -l (lock) support to fsck, requested by systemd -Patch12: util-linux-ng-2.18-fsck-wholedisk.patch - -%description -The util-linux-ng package contains a large variety of low-level system -utilities that are necessary for a Linux system to function. Among -others, Util-linux contains the fdisk configuration tool and the login -program. - - -%package -n libmount -Summary: Device mounting library -Group: Development/Libraries -License: LGPLv2+ -Requires: libblkid = %{version}-%{release} - -%description -n libmount -This is the device mounting library, part of util-linux-ng. - - -%package -n libmount-devel -Summary: Device mounting library -Group: Development/Libraries -License: LGPLv2+ -Requires: libmount = %{version}-%{release} -Requires: pkgconfig - -%description -n libmount-devel -This is the device mounting development library and headers, -part of util-linux-ng. - - -%package -n libblkid -Summary: Block device ID library -Group: Development/Libraries -License: LGPLv2+ -Requires: libuuid = %{version}-%{release} - -%description -n libblkid -This is block device identification library, part of util-linux-ng. - - -%package -n libblkid-devel -Summary: Block device ID library -Group: Development/Libraries -License: LGPLv2+ -Requires: libblkid = %{version}-%{release} -Requires: pkgconfig - -%description -n libblkid-devel -This is the block device identification development library and headers, -part of util-linux-ng. - - -%package -n libuuid -Summary: Universally unique ID library -Group: Development/Libraries -License: BSD - -%description -n libuuid -This is the universally unique ID library, part of e2fsprogs. - -The libuuid library generates and parses 128-bit universally unique -id's (UUID's). A UUID is an identifier that is unique across both -space and time, with respect to the space of all UUIDs. A UUID can -be used for multiple purposes, from tagging objects with an extremely -short lifetime, to reliably identifying very persistent objects -across a network. - -See also the "uuid" package, which is a separate implementation. - -%package -n libuuid-devel -Summary: Universally unique ID library -Group: Development/Libraries -License: BSD -Requires: libuuid = %{version}-%{release} -Requires: pkgconfig - -%description -n libuuid-devel -This is the universally unique ID development library and headers, -part of e2fsprogs. - -The libuuid library generates and parses 128-bit universally unique -id's (UUID's). A UUID is an identifier that is unique across both -space and time, with respect to the space of all UUIDs. A UUID can -be used for multiple purposes, from tagging objects with an extremely -short lifetime, to reliably identifying very persistent objects -across a network. - -See also the "uuid-devel" package, which is a separate implementation. - - -%package -n uuidd -Summary: Helper daemon to guarantee uniqueness of time-based UUIDs -Group: System Environment/Daemons -Requires: libuuid = %{version}-%{release} -License: GPLv2 -Requires(pre): shadow-utils - -%description -n uuidd -The uuidd package contains a userspace daemon (uuidd) which guarantees -uniqueness of time-based UUID generation even at very high rates on -SMP systems. - - -%prep -%setup -q -a 11 -n %{name}-%{upstream_version} -cp %{SOURCE8} %{SOURCE9} . - -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch4 -p1 -%patch5 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 - -%build -unset LINGUAS || : - -export CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS" -export SUID_CFLAGS="-fpie" -export SUID_LDFLAGS="-pie" -%configure \ - --bindir=/bin \ - --sbindir=/sbin \ - --libdir=/%{_lib} \ - --disable-silent-rules \ - --disable-wall \ - --enable-partx \ - --enable-login-utils \ - --enable-kill \ - --enable-write \ -%if %{include_raw} - --enable-raw \ -%endif - --with-selinux \ - --with-audit \ - --with-utempter \ - --disable-makeinstall-chown - -# build util-linux-ng -make %{?_smp_mflags} - -# build floppy stuff -pushd floppy-%{floppyver} -%configure --disable-gtk2 -make %{?_smp_mflags} -popd - -# build nologin -gcc $CFLAGS -o nologin nologin.c - -%install -rm -rf ${RPM_BUILD_ROOT} -mkdir -p ${RPM_BUILD_ROOT}/{bin,sbin} -mkdir -p ${RPM_BUILD_ROOT}%{_bindir} -mkdir -p ${RPM_BUILD_ROOT}%{_infodir} -mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,6,8,5} -mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} -mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/{pam.d,security/console.apps,blkid} -mkdir -p ${RPM_BUILD_ROOT}/var/log -touch ${RPM_BUILD_ROOT}/var/log/lastlog -chmod 0644 ${RPM_BUILD_ROOT}/var/log/lastlog - -# install util-linux-ng -make install DESTDIR=${RPM_BUILD_ROOT} - -# inslall floppy stuff -pushd floppy-%{floppyver} -make install DESTDIR=${RPM_BUILD_ROOT} -popd - -# install nologin -install -m 755 nologin ${RPM_BUILD_ROOT}/sbin -install -m 644 nologin.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 - -%if %{include_raw} -echo '.so man8/raw.8' > $RPM_BUILD_ROOT%{_mandir}/man8/rawdevices.8 -{ - # see RH bugzilla #216664 - mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/udev/rules.d - pushd ${RPM_BUILD_ROOT}%{_sysconfdir}/udev/rules.d - install -m 644 %{SOURCE4} ./60-raw.rules - popd -} -%endif - -# Our own initscript for uuidd -install -D -m 755 %{SOURCE10} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/uuidd -# And a dirs uuidd needs that the makefiles don't create -install -d ${RPM_BUILD_ROOT}/var/run/uuidd -install -d ${RPM_BUILD_ROOT}/var/lib/libuuid - -# libtool junk -rm -rf ${RPM_BUILD_ROOT}%{_libdir}/*.la - -%ifarch sparc sparc64 sparcv9 -rm -rf ${RPM_BUILD_ROOT}%{_bindir}/sunhostid -cat << E-O-F > ${RPM_BUILD_ROOT}%{_bindir}/sunhostid -#!/bin/sh -# this should be %{_bindir}/sunhostid or somesuch. -# Copyright 1999 Peter Jones, . -# GPL and all that good stuff apply. -( -idprom=\`cat /proc/openprom/idprom\` -echo \$idprom|dd bs=1 skip=2 count=2 -echo \$idprom|dd bs=1 skip=27 count=6 -echo -) 2>/dev/null -E-O-F -chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/sunhostid -%endif - -# PAM settings -{ - pushd ${RPM_BUILD_ROOT}%{_sysconfdir}/pam.d - install -m 644 %{SOURCE1} ./login - install -m 644 %{SOURCE2} ./remote - install -m 644 %{SOURCE3} ./chsh - install -m 644 %{SOURCE3} ./chfn - popd -} - -ln -sf ../../sbin/hwclock ${RPM_BUILD_ROOT}/usr/sbin/hwclock -ln -sf hwclock ${RPM_BUILD_ROOT}/sbin/clock -echo ".so man8/hwclock.8" > ${RPM_BUILD_ROOT}%{_mandir}/man8/clock.8 - -# install tmpfs mount helper -pushd ${RPM_BUILD_ROOT}/sbin -install -m 755 %{SOURCE5} ./mount.tmpfs -popd - -# unsupported on %{ix86} alpha armv4l -%ifnarch %cytune_archs -rm -f $RPM_BUILD_ROOT%{_bindir}/cytune $RPM_BUILD_ROOT%{_mandir}/man8/cytune.8* -%endif - -# unsupported on s390 -%ifarch s390 s390x -for I in /usr/{bin,sbin}/{fdformat,tunelp,floppy} \ - %{_mandir}/man8/{fdformat,tunelp,floppy}.8* \ - /sbin/{hwclock,clock} \ - /usr/sbin/hwclock \ - %{_mandir}/man8/{hwclock,clock}.8*; do - - rm -f $RPM_BUILD_ROOT$I -done -%endif - -# unsupported on SPARCs -%ifarch sparc sparcv9 sparc64 -for I in /sbin/sfdisk \ - %{_mandir}/man8/sfdisk.8* \ - %doc fdisk/sfdisk.examples \ - /sbin/cfdisk \ - %{_mandir}/man8/cfdisk.8*; do - - rm -f $RPM_BUILD_ROOT$I -done -%endif - -# deprecated commands -for I in /sbin/fsck.minix /sbin/mkfs.{bfs,minix} /sbin/sln \ - /usr/bin/chkdupexe %{_bindir}/line %{_bindir}/pg %{_bindir}/newgrp \ - /sbin/shutdown /usr/sbin/vipw /usr/sbin/vigr; do - rm -f $RPM_BUILD_ROOT$I -done - -# deprecated man pages -for I in man1/chkdupexe.1 man1/line.1 man1/pg.1 man1/newgrp.1 \ - man8/fsck.minix.8 man8/mkfs.minix.8 man8/mkfs.bfs.8 \ - man8/vipw.8 man8/vigr; do - rm -rf $RPM_BUILD_ROOT%{_mandir}/${I}* -done - -# deprecated docs -for I in text-utils/README.pg misc-utils/README.reset floppy-%{floppyver}/README.html; do - rm -rf $I -done - -# rename docs -mv floppy-%{floppyver}/README floppy-%{floppyver}/README.floppy - -# we install getopt/getopt-*.{bash,tcsh} as doc files -chmod 644 getopt/getopt-*.{bash,tcsh} -rm -f ${RPM_BUILD_ROOT}%{_datadir}/getopt/* -rmdir ${RPM_BUILD_ROOT}%{_datadir}/getopt - -ln -sf ../../bin/kill $RPM_BUILD_ROOT%{_bindir}/kill - -# /usr/sbin -> /sbin -for I in addpart delpart partx; do - if [ -e $RPM_BUILD_ROOT/usr/sbin/$I ]; then - mv $RPM_BUILD_ROOT/usr/sbin/$I $RPM_BUILD_ROOT/sbin/$I - fi -done - -# /usr/bin -> /bin -for I in taskset; do - if [ -e $RPM_BUILD_ROOT/usr/bin/$I ]; then - mv $RPM_BUILD_ROOT/usr/bin/$I $RPM_BUILD_ROOT/bin/$I - fi -done - -# /sbin -> /bin -for I in raw; do - if [ -e $RPM_BUILD_ROOT/sbin/$I ]; then - mv $RPM_BUILD_ROOT/sbin/$I $RPM_BUILD_ROOT/bin/$I - fi -done - -# omit info/dir file -rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir - -# remove static libs -rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount}.a - -# find MO files -%find_lang %name - -# the files section supports only one -f option... -mv %{name}.lang %{name}.files - -# create list of setarch(8) symlinks -find $RPM_BUILD_ROOT%{_bindir}/ -regextype posix-egrep -type l \ - -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64)$" \ - -printf "%{_bindir}/%f\n" >> %{name}.files - -find $RPM_BUILD_ROOT%{_mandir}/man8 -regextype posix-egrep \ - -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64)\.8.*" \ - -printf "%{_mandir}/man8/%f*\n" >> %{name}.files - -%clean -[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} - -%post -/sbin/install-info %{_infodir}/ipc.info %{_infodir}/dir || : -# only for minimal buildroots without /var/log -[ -d /var/log ] || /bin/mkdir -p /var/log -/bin/touch /var/log/lastlog -/bin/chown root:root /var/log/lastlog -/bin/chmod 0644 /var/log/lastlog -# Fix the file context, do not use restorecon -if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then - SECXT=$( /usr/sbin/matchpathcon -n /var/log/lastlog 2> /dev/null ) - if [ -n "$SECXT" ]; then - # Selinux enabled, but without policy? It's true for buildroots - # without selinux stuff on host machine with enabled selinux. - # We don't want to use any RPM dependence on selinux policy for - # matchpathcon(2). SELinux policy should be optional. - /usr/bin/chcon "$SECXT" /var/log/lastlog >/dev/null 2>&1 || : - fi -fi - -%preun -if [ "$1" = 0 ]; then - /sbin/install-info --del %{_infodir}/ipc.info %{_infodir}/dir || : -fi -exit 0 - - -%post -n libblkid -/sbin/ldconfig -[ -e /etc/blkid.tab ] && mv /etc/blkid.tab /etc/blkid/blkid.tab || : -[ -e /etc/blkid.tab.old ] && mv /etc/blkid.tab.old /etc/blkid/blkid.tab.old || : - -%postun -n libblkid -p /sbin/ldconfig - -%post -n libuuid -p /sbin/ldconfig -%postun -n libuuid -p /sbin/ldconfig - -%post -n libmount -p /sbin/ldconfig -%postun -n libmount -p /sbin/ldconfig - -%pre -n uuidd -getent group uuidd >/dev/null || groupadd -r uuidd -getent passwd uuidd >/dev/null || \ -useradd -r -g uuidd -d /var/lib/libuuid -s /sbin/nologin \ - -c "UUID generator helper daemon" uuidd -exit 0 - -%post -n uuidd -/sbin/chkconfig --add uuidd - -%preun -n uuidd -if [ "$1" = 0 ]; then - /sbin/service uuidd stop > /dev/null 2>&1 || : - /sbin/chkconfig --del uuidd -fi - -%files -f %{name}.files -%defattr(-,root,root) -%doc */README.* NEWS AUTHORS licenses/* README* -%doc getopt/getopt-*.{bash,tcsh} - -%config(noreplace) %{_sysconfdir}/pam.d/chfn -%config(noreplace) %{_sysconfdir}/pam.d/chsh -%config(noreplace) %{_sysconfdir}/pam.d/login -%config(noreplace) %{_sysconfdir}/pam.d/remote - -%attr(4755,root,root) /bin/mount -%attr(4755,root,root) /bin/umount -%attr(755,root,root) /sbin/mount.tmpfs -%attr(755,root,root) /bin/login -%attr(4711,root,root) %{_bindir}/chfn -%attr(4711,root,root) %{_bindir}/chsh -%attr(2755,root,tty) %{_bindir}/write - -%ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog - -/bin/dmesg -/bin/findmnt -/bin/kill -/bin/more -/bin/taskset -/sbin/addpart -/sbin/agetty -/sbin/blkid -/sbin/blockdev -/sbin/ctrlaltdel -/sbin/delpart -/sbin/fdisk -/sbin/findfs -/sbin/fsck -/sbin/fsck.cramfs -/sbin/fsfreeze -/sbin/losetup -/sbin/mkfs -/sbin/mkfs.cramfs -/sbin/mkswap -/sbin/nologin -/sbin/partx -/sbin/pivot_root -/sbin/swaplabel -/sbin/swapoff -/sbin/swapon -/sbin/switch_root -/sbin/wipefs - -%{_bindir}/cal -%{_bindir}/chrt -%{_bindir}/col -%{_bindir}/colcrt -%{_bindir}/colrm -%{_bindir}/column -%{_bindir}/ddate -%{_bindir}/fallocate -%{_bindir}/flock -%{_bindir}/getopt -%{_bindir}/hexdump -%{_bindir}/ionice -%{_bindir}/ipcmk -%{_bindir}/ipcrm -%{_bindir}/ipcs -%{_bindir}/isosize -%{_bindir}/kill -%{_bindir}/logger -%{_bindir}/look -%{_bindir}/lscpu -%{_bindir}/mcookie -%{_bindir}/namei -%{_bindir}/rename -%{_bindir}/renice -%{_bindir}/rev -%{_bindir}/script -%{_bindir}/scriptreplay -%{_bindir}/setarch -%{_bindir}/setsid -%{_bindir}/setterm -%{_bindir}/tailf -%{_bindir}/ul -%{_bindir}/unshare -%{_bindir}/uuidgen -%{_bindir}/whereis - -%{_sbindir}/ldattach -%{_sbindir}/readprofile -%{_sbindir}/rtcwake - -%{_infodir}/ipc.info* - -%{_mandir}/man1/cal.1* -%{_mandir}/man1/chfn.1* -%{_mandir}/man1/chrt.1* -%{_mandir}/man1/chsh.1* -%{_mandir}/man1/col.1* -%{_mandir}/man1/colcrt.1* -%{_mandir}/man1/colrm.1* -%{_mandir}/man1/column.1* -%{_mandir}/man1/ddate.1* -%{_mandir}/man1/dmesg.1* -%{_mandir}/man1/fallocate.1* -%{_mandir}/man1/flock.1* -%{_mandir}/man1/getopt.1* -%{_mandir}/man1/hexdump.1* -%{_mandir}/man1/ionice.1* -%{_mandir}/man1/ipcmk.1* -%{_mandir}/man1/ipcrm.1* -%{_mandir}/man1/ipcs.1* -%{_mandir}/man1/kill.1* -%{_mandir}/man1/logger.1* -%{_mandir}/man1/login.1* -%{_mandir}/man1/look.1* -%{_mandir}/man1/lscpu.1* -%{_mandir}/man1/mcookie.1* -%{_mandir}/man1/more.1* -%{_mandir}/man1/namei.1* -%{_mandir}/man1/readprofile.1* -%{_mandir}/man1/rename.1* -%{_mandir}/man1/renice.1* -%{_mandir}/man1/rev.1* -%{_mandir}/man1/script.1* -%{_mandir}/man1/scriptreplay.1* -%{_mandir}/man1/setsid.1* -%{_mandir}/man1/setterm.1* -%{_mandir}/man1/tailf.1* -%{_mandir}/man1/taskset.1* -%{_mandir}/man1/ul.1* -%{_mandir}/man1/unshare.1* -%{_mandir}/man1/uuidgen.1* -%{_mandir}/man1/whereis.1* -%{_mandir}/man1/write.1* - -%{_mandir}/man5/fstab.5* - -%{_mandir}/man8/addpart.8* -%{_mandir}/man8/agetty.8* -%{_mandir}/man8/blkid.8* -%{_mandir}/man8/blockdev.8* -%{_mandir}/man8/ctrlaltdel.8* -%{_mandir}/man8/delpart.8* -%{_mandir}/man8/fdisk.8* -%{_mandir}/man8/findfs.8* -%{_mandir}/man8/findmnt.8* -%{_mandir}/man8/fsck.8* -%{_mandir}/man8/fsfreeze.8* -%{_mandir}/man8/isosize.8* -%{_mandir}/man8/ldattach.8* -%{_mandir}/man8/losetup.8* -%{_mandir}/man8/mkfs.8* -%{_mandir}/man8/mkswap.8* -%{_mandir}/man8/mount.8* -%{_mandir}/man8/nologin.8* -%{_mandir}/man8/partx.8* -%{_mandir}/man8/pivot_root.8* -%{_mandir}/man8/rtcwake.8* -%{_mandir}/man8/setarch.8* -%{_mandir}/man8/swaplabel.8* -%{_mandir}/man8/swapoff.8* -%{_mandir}/man8/swapon.8* -%{_mandir}/man8/switch_root.8* -%{_mandir}/man8/umount.8* -%{_mandir}/man8/wipefs.8* - -%if %{include_raw} -/bin/raw -%config(noreplace) %{_sysconfdir}/udev/rules.d/60-raw.rules -%{_mandir}/man8/raw.8* -%{_mandir}/man8/rawdevices.8* -%endif - -%ifnarch s390 s390x -/sbin/clock -/sbin/hwclock -%{_bindir}/floppy -%{_sbindir}/fdformat -%{_sbindir}/hwclock -%{_sbindir}/tunelp -%{_mandir}/man8/fdformat.8* -%{_mandir}/man8/floppy.8* -%{_mandir}/man8/hwclock.8* -%{_mandir}/man8/clock.8* -%{_mandir}/man8/tunelp.8* -%endif - -%ifnarch sparc sparcv9 sparc64 -%doc fdisk/sfdisk.examples -/sbin/cfdisk -/sbin/sfdisk -%{_mandir}/man8/cfdisk.8* -%{_mandir}/man8/sfdisk.8* -%endif - -%ifarch sparc sparc64 sparcv9 -%{_bindir}/sunhostid -%endif - -%ifarch %cytune_archs -%{_bindir}/cytune -%{_mandir}/man8/cytune.8* -%endif - - -%files -n uuidd -%defattr(-,root,root) -/etc/rc.d/init.d/uuidd -%{_mandir}/man8/uuidd.8* -%attr(-, uuidd, uuidd) %{_sbindir}/uuidd -%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid -%dir %attr(2775, uuidd, uuidd) /var/run/uuidd - - -%files -n libmount -%defattr(-,root,root) -/%{_lib}/libmount.so.* - -%files -n libmount-devel -%defattr(-,root,root) -%{_libdir}/libmount.so -%{_includedir}/mount -%{_libdir}/pkgconfig/mount.pc - - -%files -n libblkid -%defattr(-,root,root) -%dir /etc/blkid -/%{_lib}/libblkid.so.* - -%files -n libblkid-devel -%defattr(-,root,root) -#%{_libdir}/libblkid.a -%{_libdir}/libblkid.so -%{_includedir}/blkid -%{_mandir}/man3/libblkid.3* -%{_libdir}/pkgconfig/blkid.pc - - -%files -n libuuid -%defattr(-,root,root) -/%{_lib}/libuuid.so.* - -%files -n libuuid-devel -%defattr(-,root,root) -#%{_libdir}/libuuid.a -%{_libdir}/libuuid.so -%{_includedir}/uuid -%{_mandir}/man3/uuid.3* -%{_mandir}/man3/uuid_clear.3* -%{_mandir}/man3/uuid_compare.3* -%{_mandir}/man3/uuid_copy.3* -%{_mandir}/man3/uuid_generate.3* -%{_mandir}/man3/uuid_generate_random.3* -%{_mandir}/man3/uuid_generate_time.3* -%{_mandir}/man3/uuid_is_null.3* -%{_mandir}/man3/uuid_parse.3* -%{_mandir}/man3/uuid_time.3* -%{_mandir}/man3/uuid_unparse.3* -%{_libdir}/pkgconfig/uuid.pc - - -%changelog -* Tue Oct 26 2010 Karel Zak 2.18-5 -- fix #645640 - new "-s" parameter parsing in agetty does not work -- add -l (lock) support to fsck - -* Wed Aug 18 2010 Karel Zak 2.18-4 -- fix #623685 - please extend agetty to not require a baud rate to be specified - -* Thu Aug 5 2010 Karel Zak 2.18-3 -- fix #620924 - /sbin/mount.tmpfs uses not available /usr/bin/id - -* Mon Aug 2 2010 Karel Zak 2.18-2 -- fix #615719 - tmpfs mount fails with 'user' option. -- fix #598631 - shutdown, reboot, halt and C-A-D don't work -- fix #618957 - ISO images listed in fstab are mounted twice at boot - -* Wed Jun 30 2010 Karel Zak 2.18-1 -- upgrade to the final 2.18 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes - -* Fri Jun 18 2010 Karel Zak 2.18-0.2 -- upgrade to 2.18-rc2 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc2-ChangeLog - -* Tue Jun 8 2010 Karel Zak 2.18-0.1 -- upgrade to the release 2.18-rc1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc1-ChangeLog - -* Mon Apr 12 2010 Karel Zak 2.17.2-1 -- fix #581252 - remounting tmpfs fails because of hidden rootcontext= -- fix #580296 - "rtcwake" does miss the "off" option -- fix #575734 - use microsecond resolution for blkid cache entries -- upgrade to the bugfix release 2.17.2 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.2-ReleaseNotes - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.2-ChangeLog -- minor fixed in spec file - -* Thu Mar 11 2010 Karel Zak 2.17.1-2 -- fix #533874 - libblkid should allow scanning of slow devices (eg. cdroms) - -* Mon Feb 22 2010 Karel Zak 2.17.1-1 -- upgrade to the final 2.17.1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.1-ReleaseNotes - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.1-ChangeLog - -* Tue Feb 16 2010 Karel Zak 2.17.1-0.1 -- upgrade to 2.17.1-rc1 - -* Tue Feb 16 2010 Karel Zak 2.17-4 -- fix uuidd init script - -* Fri Feb 12 2010 Karel Zak 2.17-3 -- fix #541402 - uuidd initscript lsb compliance - -* Fri Jan 8 2010 Karel Zak 2.17-2 -- remove Provides: lib{uuid,blkid}-static (thanks to Michael Schwendt) -- remove useless URL to sf.net - -* Thu Jan 8 2010 Karel Zak 2.17-1 -- upgrade to the final 2.17 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-ReleaseNotes - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-ChangeLog -- fix #545147 - util-linux-ng : Violation of the Packaging Guidelines - (remove uuid and blkid static libs) - -* Mon Dec 14 2009 Karel Zak 2.17-0.6 -- minor fixes in spec file (fix URL, add Requires, add LGPLv2+) - -* Wed Dec 9 2009 Karel Zak 2.17-0.5 -- upgrade to 2.17-rc2 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc2-ChangeLog - -* Mon Dec 7 2009 Karel Zak 2.17-0.4 -- add clock.8 man page (manlink to hwclock) -- add --help to mount.tmpfs - -* Mon Nov 23 2009 Karel Zak 2.17-0.3 -- upgrade to 2.17-rc1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc1-ChangeLog - -* Tue Nov 10 2009 Karel Zak 2.17-0.2.git10dfc39 -- upgrade to pre-release snapshot (official changelog not available yet, see - http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for now) - -* Mon Oct 19 2009 Karel Zak 2.17-0.1.git5e51568 -- upgrade to pre-release snapshot (official changelog not available yet, see - http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for now) -- new commands: fallocate, unshare, wipefs -- libblkid supports topology and partitions probing -- remove support for --rmpart[s] from blockdev(8) (util-linux-ng-2.14-blockdev-rmpart.patch) -- merged upstream: - util-linux-ng-2.14-sfdisk-dump.patch - util-linux-ng-2.16-blkid-swsuspend.patch - util-linux-ng-2.16-libblkid-compression.patch - util-linux-ng-2.16-libblkid-ext2.patch - util-linux-ng-2.16-switchroot-tty.patch - -* Mon Oct 5 2009 Karel Zak 2.16-13 -- fix spec file - -* Fri Oct 2 2009 Karel Zak 2.16-12 -- release++ - -* Thu Oct 1 2009 Karel Zak 2.16-11 -- fix #519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device - -* Wed Sep 16 2009 Tomas Mraz - 2.16-10 -- use password-auth common PAM configuration instead of system-auth and - drop pam_console.so call from the remote PAM config file - -* Mon Sep 14 2009 Karel Zak 2.16-9 -- fix #522718 - sfdisk -d /dev/xxx | sfdisk --force /dev/yyy fails when LANG is set -- fix typo in swsuspend detection - -* Wed Aug 26 2009 Tomas Mraz - 2.16-8 -- rebuilt with new audit - -* Sun Aug 23 2009 Karel Zak 2.16-7 -- fix #518572 - blkid requires ext2.ko to be decompressed on installation media - -* Thu Aug 13 2009 Karel Zak 2.16-5 -- fix #513104 - blkid returns no fstype for ext2 device when ext2 module not loaded - -* Wed Aug 5 2009 Stepan Kasal 2.16-4 -- set conflict with versions of e2fsprogs containing fsck - -* Thu Jul 30 2009 Karel Zak 2.16-3 -- remove the mount.conf support (see #214891) - -* Mon Jul 27 2009 Karel Zak 2.16-2 -- fix #214891 - add mount.conf and MTAB_LOCK_DIR= option - -* Sat Jul 25 2009 Karel Zak 2.16-1 -- upgrade to 2.16 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.16/v2.16-ReleaseNotes -- enable built-in libuuid (replacement for the old uuid stuff from e2fsprogs) -- new commands switch_root, uuidgen and uuidd (subpackage) - -* Wed Jun 10 2009 Karel Zak 2.15.1-1 -- upgrade to 2.15.1 - -* Mon Jun 8 2009 Karel Zak 2.15.1-0.2 -- set BuildRequires: e2fsprogs-devel -- add Requires: e2fsprogs-devel to libblkid-devel - -* Thu Jun 4 2009 Karel Zak 2.15.1-0.1 -- upgrade to 2.15.1-rc1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.15/v2.15-ReleaseNotes - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.15/v2.15.1-rc1-ChangeLog -- merged patches: - util-linux-ng-2.14-login-remote.patch - util-linux-ng-2.14-fdisk-4k-I.patch - util-linux-ng-2.14-fdisk-4k-II.patch - util-linux-ng-2.14-fdisk-4k-III.patch - util-linux-ng-2.14-dmesg-r.patch - util-linux-ng-2.14-flock-segfaults.patch - util-linux-ng-2.14-renice-n.patch -- new commands: lscpu, ipcmk -- remove support for "managed" and "kudzu" mount options -- cleanup spec file -- enable built-in libblkid (replacement for the old blkid from e2fsprogs) - -* Thu Apr 2 2009 Karel Zak 2.14.2-8 -- fix #490769 - %post scriptlet failed (thanks to Dan Horak) - -* Fri Mar 20 2009 Karel Zak 2.14.2-7 -- fix some nits in mount.tmpfs - -* Fri Mar 20 2009 Karel Zak 2.14.2-6 -- fix #491175 - mount of tmpfs FSs fail at boot - -* Thu Mar 19 2009 Karel Zak 2.14.2-5 -- fix #489672 - flock segfaults when file name is not given (upstream) -- fix #476964 - Mount /var/tmp with tmpfs creates denials -- fix #487227 - fdisk 4KiB hw sectors support (upstream) -- fix #477303 - renice doesn't support -n option (upstream) - -* Wed Feb 25 2009 Fedora Release Engineering - 2.14.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Fri Feb 20 2009 Karel Zak 2.14.2-3 -- add -r option to dmesg(1) - -* Mon Feb 9 2009 Karel Zak 2.14.2-2 -- fix typo in spec file - -* Mon Feb 9 2009 Karel Zak 2.14.2-1 -- upgrade to stable 2.14.2 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/v2.14.2-ReleaseNotes - -* Thu Jan 22 2009 Karel Zak 2.14.2-0.2 -- fix #480413 - util-linux-ng doesn't include scriptreplay -- fix #479002 - remove dependency on ConsoleKit-libs -- upgrade to 2.14.2-rc2 - -* Mon Dec 22 2008 Karel Zak 2.14.2-0.1 -- upgrade to 2.14.2-rc1 -- refresh old patches - -* Fri Nov 21 2008 Karel Zak 2.14.1-5 -- fix #472502 - problem with fdisk and use +sectors for the end of partition - -* Mon Oct 6 2008 Karel Zak 2.14.1-3 -- fix #465761 - mount manpage is missing uid/gid mount options for tmpfs -- refresh util-linux-ng-2.14-mount-file_t.patch (fuzz=0) - -* Wed Sep 10 2008 Karel Zak 2.14.1-2 -- remove obsolete pam-console support - -* Wed Sep 10 2008 Karel Zak 2.14.1-1 -- upgrade to stable 2.14.1 - -* Thu Aug 14 2008 Karel Zak 2.14.1-0.1 -- upgrade to 2.14.1-rc1 -- refresh old patches - -* Thu Jul 24 2008 Karel Zak 2.14-3 -- update util-linux-ng-2.14-mount-file_t.patch to make - the SELinux warning optional (verbose mode is required) - -* Tue Jul 1 2008 Karel Zak 2.14-2 -- fix #390691 - mount should check selinux context on mount, and warn on file_t - -* Mon Jun 9 2008 Karel Zak 2.14-1 -- upgrade to stable util-linux-ng release - -* Mon May 19 2008 Karel Zak 2.14-0.1 -- upgrade to 2.14-rc3 -- remove arch(8) (deprecated in favor of uname(1) or arch(1) from coreutils) -- add a new command ldattach(8) -- cfdisk(8) linked with libncursesw - -* Tue Apr 22 2008 Karel Zak 2.13.1-9 -- fix audit log injection attack via login - -* Thu Apr 17 2008 Karel Zak 2.13.1-8 -- fix location of the command raw(8) - -* Tue Apr 15 2008 Karel Zak 2.13.1-7 -- fix 244383 - libblkid uses TYPE="swsuspend" for S1SUSPEND/S2SUSPEND - -* Wed Apr 2 2008 Karel Zak 2.13.1-6 -- fix 439984 - backport mkswap -U - -* Wed Mar 26 2008 Tom "spot" Callaway - 2.13.1-5 -- clean up sparc conditionals - -* Tue Feb 19 2008 Fedora Release Engineering - 2.13.1-4 -- Autorebuild for GCC 4.3 - -* Mon Jan 28 2008 Karel Zak 2.13.1-3 -- upgrade to new upstream release -- fix #427874 - util-linux-ng gets "excess command line argument" on update - -* Wed Jan 2 2008 Karel Zak 2.13.1-2 -- update to upstream 2.13.1-rc2 - -* Wed Dec 12 2007 Dan Walsh 2.13.1-1 -- Fix pam files so that pam_keyinit happens after pam_selinux.so - -* Wed Dec 12 2007 Karel Zak 2.13.1-0.2 -- remove viwp and vigr (in favour of shadow-utils) - -* Sun Dec 9 2007 Karel Zak 2.13.1-0.1 -- update to the latest upstream stable branch - (commit: fda9d11739ee88c3b2f22a73f12ec019bd3b8335) - -* Wed Oct 31 2007 Karel Zak 2.13-4 -- fix #354791 - blockdev command calls the blkpg ioctl with a wrong data structure - -* Tue Oct 16 2007 Karel Zak 2.13-3 -- fix mount -L | -U segfault -- fix script die on SIGWINCH - -* Thu Oct 4 2007 Karel Zak 2.13-2 -- update to the latest upstream stable branch - -* Tue Aug 28 2007 Karel Zak 2.13-1 -- upgrade to stable util-linux-ng release - -* Fri Aug 24 2007 Karel Zak 2.13-0.59 -- add release number to util-linux Provides and increment setarch Obsoletes -- fix #254114 - spec typo -- upgrade to floppy-0.16 -- add BuildRequires: popt-devel - -* Wed Aug 22 2007 Jesse Keating 2.13-0.58 -- Obsolete a sufficiently high enough version of setarch - -* Mon Aug 20 2007 Karel Zak 2.13-0.57 -- fix #253664 - util-linux-ng fails to build on sparc (patch by Dennis Gilmore) -- rebase to new GIT snapshot - -* Mon Aug 20 2007 Karel Zak 2.13-0.56 -- fix obsoletes field - -* Mon Aug 20 2007 Karel Zak 2.13-0.55 -- util-linux-ng includes setarch(1), define relevat Obsoletes+Provides - -* Mon Aug 20 2007 Karel Zak 2.13-0.54 -- port "blockdev --rmpart" patch from util-linux -- use same Provides/Obsoletes setting like in util-linux - -* Wed Aug 15 2007 Karel Zak 2.13-0.53 -- fix #252046 - review Request: util-linux-ng (util-linux replacement) - -* Mon Aug 13 2007 Karel Zak 2.13-0.52 -- rebase to util-linux-ng (new util-linux upstream fork, - based on util-linux 2.13-pre7) -- more than 70 Fedora/RHEL patches have been merged to upstream code - -* Fri Apr 6 2007 Karel Zak 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. - (added rpc_pipefs to util-linux-2.13-umount-sysfs.patch) -- fix #227903 - mount -f does not work with NFS-mounted - -* Sat Mar 3 2007 David Zeuthen 2.13-0.50 -- include ConsoleKit session module by default (#229172) - -* Thu Jan 11 2007 Karel Zak 2.13-0.49 -- fix #222293 - undocumented partx,addpart, delpart - -* Sun Dec 17 2006 Karel Zak 2.13-0.48 -- fix paths in po/Makefile.in.in - -* Fri Dec 15 2006 Karel Zak 2.13-0.47 -- fix #217240 - namei ignores non-directory components instead of saying "Not a directory" -- fix #217241 - namei enforces symlink limits inconsistently - -* Wed Dec 14 2006 Karel Zak 2.13-0.46 -- fix leaking file descriptor in the more command (patch by Steve Grubb) - -* Wed Dec 13 2006 Karel Zak 2.13-0.45 -- use ncurses only -- fix #218915 - fdisk -b 4K -- upgrade to -pre7 release -- fix building problem with raw0 patch -- fix #217186 - /bin/sh: @MKINSTALLDIRS@: No such file or directory - (port po/Makefile.in.in from gettext-0.16) -- sync with FC6 and RHEL5: -- fix #216489 - SCHED_BATCH option missing in chrt -- fix #216712 - issues with raw device support ("raw0" is wrong device name) -- fix #216760 - mount with context or fscontext option fails - (temporarily disabled the support for additional contexts -- not supported by kernel yet) -- fix #211827 - Can't mount with additional contexts -- fix #213127 - mount --make-unbindable does not work -- fix #211749 - add -r option to losetup to create a read-only loop - -* Thu Oct 12 2006 Karel Zak 2.13-0.44 -- fix #209911 - losetup.8 updated (use dm-crypt rather than deprecated cryptoloop) -- fix #210338 - spurious error from '/bin/login -h $PHONENUMBER' (bug in IPv6 patch) -- fix #208634 - mkswap "works" without warning on a mounted device - -* Sun Oct 01 2006 Jesse Keating - 2.13-0.43 -- rebuilt for unwind info generation, broken in gcc-4.1.1-21 - -* Wed Sep 20 2006 Karel Zak 2.13-0.42 -- remove obsolete NFS code and patches (we use /sbin/mount.nfs - and /sbin/umount.nfs from nfs-utils now) -- move nfs.5 to nfs-utils - -* Fri Sep 15 2006 Karel Zak 2.13-0.41 -- fix #205038 - mount not allowing sloppy option (exports "-s" - to external /sbin/mount.nfs(4) calls) -- fix minor bug in util-linux-2.13-mount-twiceloop.patch -- fix #188193- util-linux should provide plugin infrastructure for HAL - -* Mon Aug 21 2006 Karel Zak 2.13-0.40 -- fix Makefile.am in util-linux-2.13-mount-context.patch -- fix #201343 - pam_securetty requires known user to work - (split PAM login configuration to two files) -- fix #203358 - change location of taskset binary to allow for early affinity work - -* Fri Aug 11 2006 Karel Zak 2.13-0.39 -- fix #199745 - non-existant simpleinit(8) mentioned in ctrlaltdel(8) - -* Thu Aug 10 2006 Dan Walsh 2.13-0.38 -- Change keycreate line to happen after pam_selinux open call so it gets correct context - -* Thu Aug 10 2006 Karel Zak 2.13-0.37 -- fix #176494 - last -i returns strange IP addresses (patch by Bill Nottingham) - -* Thu Jul 27 2006 Karel Zak 2.13-0.36 -- fix #198300, #199557 - util-linux "post" scriptlet failure - -* Thu Jul 27 2006 Steve Dickson 2.13-0.35 -- Added the -o fsc flag to nfsmount. - -* Wed Jul 26 2006 Karel Zak 2.13-0.34 -- rebuild - -* Tue Jul 18 2006 Karel Zak 2.13-0.33 -- add Requires(post): libselinux - -* Mon Jul 17 2006 Karel Zak 2.13-0.32 -- add IPv6 support to the login command (patch by Milan Zazrivec) -- fix #198626 - add keyinit instructions to the login PAM script - (patch by David Howells) - -* Wed Jul 12 2006 Jesse Keating - 2.13-0.31.1 -- rebuild - -* Tue Jul 11 2006 Karel Zak 2.13-0.31 -- cleanup dependences for post and preun scriptlets - -* Mon Jul 10 2006 Karsten Hopp 2.13-0.30 -- silence install in minimal buildroot without /var/log - -* Fri Jul 7 2006 Karel Zak 2.13-0.29 -- include the raw command for RHELs - -* Mon Jun 26 2006 Florian La Roche 2.13-0.28 -- move install-info parts from postun to preun - -* Wed Jun 21 2006 Dan Walsh 2.13-0.27 -- Only execute chcon on machines with selinux enabled - -* Wed Jun 14 2006 Steve Dickson 2.13-0.26 -- Remove unneeded header files from nfsmount.c - -* Mon Jun 12 2006 Karel Zak 2.13-0.25 -- fix #187014 - umount segfaults for normal user -- fix #183446 - cal not UTF-8-aware -- fix #186915 - mount does not translate SELIinux context options though libselinux -- fix #185500 - Need man page entry for -o context= mount option -- fix #152579 - missing info about /etc/mtab and /proc/mounts mismatch -- fix #183890 - missing info about possible ioctl() and fcntl() problems on NFS filesystem -- fix #191230 - using mount --move results in wrong data in /etc/mtab -- added mount subtrees support -- fdisk: wrong number of sectors for large disks (suse#160822) -- merge fdisk-xvd (#182553) with new fdisk-isfull (#188981) patch -- fix #181549 - raw(8) manpage has old information about dd -- remove asm/page.h usage - -* Wed May 24 2006 Dan Walsh 2.13-0.24 -- Remove requirement on restorecon, since we can do the same thing -- with chcon/matchpathcon, and not add requirement on policycoreutils - -* Wed May 24 2006 Steve Dickson 2.13-0.23 -- Fixed bug in patch for bz183713 which cause nfs4 mounts to fail. - -* Tue May 2 2006 Steve Dickson 2.13-0.22 -- Added syslog logging to background mounts as suggested - by a customer. - -* Mon May 1 2006 Steve Dickson 2.13-0.21 -- fix #183713 - foreground mounts are not retrying as advertised -- fix #151549 - Added 'noacl' mount flag -- fix #169042 - Changed nfsmount to try udp before using tcp when rpc-ing - the remote rpc.mountd (iff -o tcp is not specified). - This drastically increases the total number of tcp mounts - that can happen at once (ala autofs). - -* Wed Mar 9 2006 Jesse Keating 2.13-0.20 -- Better calling of restorecon as suggested by Bill Nottingham -- prereq restorecon to avoid ordering issues - -* Wed Mar 9 2006 Jesse Keating 2.13-0.19 -- restorecon /var/log/lastlog - -* Wed Mar 8 2006 Karel Zak 2.13-0.17 -- fix #181782 - mkswap selinux relabeling (fix util-linux-2.13-mkswap-selinux.patch) - -* Wed Feb 22 2006 Karel Zak 2.13-0.16 -- fix #181782 - mkswap should automatically add selinux label to swapfile -- fix #180730 - col is exiting with 1 (fix util-linux-2.12p-col-EILSEQ.patch) -- fix #181896 - broken example in schedutils man pages -- fix #177331 - login omits pam_acct_mgmt & pam_chauthtok when authentication is skipped. -- fix #177523 - umount -a should not unmount sysfs -- fix #182553 - fdisk -l inside xen guest shows no disks - -* Fri Feb 10 2006 Jesse Keating - 2.13-0.15.1 -- bump again for double-long bug on ppc(64) - -* Wed Feb 8 2006 Peter Jones 2.13-0.15 -- add "blockdev --rmpart N " and "blockdev --rmparts " - -* Tue Feb 07 2006 Jesse Keating - 2.13-0.14.1 -- rebuilt for new gcc4.1 snapshot and glibc changes - -* Thu Jan 19 2006 Steve Dickson 2.13-0.14 -- Updated the gssd_check() and idmapd_check(), used with - nfsv4 mounts, to looked for the correct file in /var/lock/subsys - which stops bogus warnings. - -* Tue Jan 3 2006 Karel Zak 2.13-0.13 -- fix #174676 - hwclock audit return code mismatch -- fix #176441: col truncates data -- fix #174111 - mount allows loopback devices to be mounted more than once to the same mount point -- better wide chars usage in the cal command (based on the old 'moremisc' patch) - -* Mon Dec 12 2005 Karel Zak 2.13-0.12 -- rebuilt - -* Fri Dec 09 2005 Jesse Keating -- rebuilt - -* Fri Nov 25 2005 Karel Zak 2.13-0.11.pre6 -- update to upstream version 2.13-pre6 -- fix #172203 - mount man page in RHEL4 lacks any info on cifs mount options - -* Mon Nov 7 2005 Karel Zak 2.13-0.10.pre5 -- fix #171337 - mkfs.cramfs doesn't work correctly with empty files - -* Fri Oct 28 2005 Karel Zak 2.13-0.9.pre5 -- rebuild - -* Wed Oct 26 2005 Karel Zak 2.13-0.8.pre5 -- updated version of the patch for hwclock audit - -* Thu Oct 20 2005 Karel Zak 2.13-0.7.pre5 -- fix #171337 - mkfs.cramfs dies creating installer image - -* Thu Oct 20 2005 Karel Zak 2.13-0.6.pre5 -- update to upstream 2.13pre5 -- remove separated cramfs1.1 (already in upstream package) -- remove odd symlink /usr/bin/mkcramfs -> ../../sbin/mkfs.cramfs -- fix #170171 - ipcs -lm always report "max total shared memory (kbytes) = 0" - -* Mon Oct 17 2005 Karel Zak 2.13-0.5.pre4 -* fix #170564 - add audit message to login - -* Fri Oct 7 2005 Karel Zak 2.13-0.4.pre4 -- fix #169628 - /usr/bin/floppy doesn't work with /dev/fd0 -- fix #168436 - login will attempt to run if it has no read/write access to its terminal -- fix #168434 - login's timeout can fail - needs to call siginterrupt(SIGALRM,1) -- fix #165253 - losetup missing option -a [new feature] -- update PAM files (replace pam_stack with new "include" PAM directive) -- remove kbdrate from src.rpm -- update to 2.13pre4 - -* Fri Oct 7 2005 Steve Dickson 2.13-0.3.pre3 -- fix #170110 - Documentation for 'rsize' and 'wsize' NFS mount options - is misleading - -* Fri Sep 2 2005 Karel Zak 2.13-0.3.pre2 -- fix #166923 - hwclock will not run on a non audit-enabled kernel -- fix #159410 - mkswap(8) claims max swap area size is 2 GB -- fix #165863 - swsusp swaps should be reinitialized -- change /var/log/lastlog perms to 0644 - -* Tue Aug 16 2005 Karel Zak 2.13-0.2.pre2 -- /usr/share/misc/getopt/* -move-> /usr/share/doc/util-linux-2.13/getopt-* -- the arch command marked as deprecated -- removed: elvtune, rescuept and setfdprm -- removed: man8/sln.8 (moved to man-pages, see #10601) -- removed REDAME.pg and README.reset -- .spec file cleanup -- added schedutils (commands: chrt, ionice and taskset) - -* Tue Jul 12 2005 Karel Zak 2.12p-9.7 -- fix #159339 - util-linux updates for new audit system -- fix #158737 - sfdisk warning for large partitions, gpt -- fix #150912 - Add ocfs2 support -- NULL is better than zero at end of execl() - -* Thu Jun 16 2005 Karel Zak 2.12p-9.5 -- fix #157656 - CRM 546998: Possible bug in vipw, changes permissions of /etc/shadow and /etc/gshadow -- fix #159339 - util-linux updates for new audit system (pam_loginuid.so added to util-linux-selinux.pamd) -- fix #159418 - sfdisk unusable - crashes immediately on invocation -- fix #157674 - sync option on VFAT mount destroys flash drives -- fix .spec file /usr/sbin/{hwclock,clock} symlinks - -* Wed May 4 2005 Jeremy Katz - 2.12p-9.3 -- rebuild against new libe2fsprogs (and libblkid) to fix cramfs auto-detection - -* Mon May 2 2005 Karel Zak 2.12p-9.2 -- rebuild - -* Mon May 2 2005 Karel Zak 2.12p-9 -- fix #156597 - look - doesn't work with separators - -* Mon Apr 25 2005 Karel Zak 2.12p-8 -- fix #154498 - util-linux login & pam session -- fix #155293 - man 5 nfs should include vers as a mount option -- fix #76467 - At boot time, fsck chokes on LVs listed by label in fstab -- new Source URL -- added note about ATAPI IDE floppy to fdformat.8 -- fix #145355 - Man pages for fstab and fstab-sync in conflict - -* Tue Apr 5 2005 Karel Zak 2.12p-7 -- enable build with libblkid from e2fsprogs-devel -- remove workaround for duplicated labels - -* Thu Mar 31 2005 Steve Dickson 2.12p-5 -- Fixed nfs mount to rollback correctly. - -* Fri Mar 25 2005 Karel Zak 2.12p-4 -- added /var/log/lastlog to util-linux (#151635) -- disabled 'newgrp' in util-linux (enabled in shadow-utils) (#149997, #151613) -- improved mtab lock (#143118) -- fixed ipcs typo (#151156) -- implemented mount workaround for duplicated labels (#116300) - -* Wed Mar 16 2005 Elliot Lee 2.12p-3 -- rebuilt - -* Fri Feb 25 2005 Steve Dickson 2.12p-2 -- Changed nfsmount to only use reserve ports when necessary - (bz# 141773) - -* Thu Dec 23 2004 Elliot Lee 2.12p-1 -- Update to util-linux-2.12p. This changes swap header format - from - you may need to rerun mkswap if you did a clean install of - FC3. - -* Fri Dec 10 2004 Elliot Lee 2.12j-1 -- Update to util-linux-2.12j - -* Tue Dec 7 2004 Steve Dickson 2.12a-20 -- Corrected a buffer overflow problem with nfs mounts. - (bz# 141733) - -* Wed Dec 01 2004 Elliot Lee 2.12a-19 -- Patches for various bugs. - -* Mon Nov 29 2004 Steve Dickson 2.12a-18 -- Made NFS mounts adhere to the IP protocol if specified on - command line as well as made NFS umounts adhere to the - current IP protocol. Fix #140016 - -* Thu Oct 14 2004 Elliot Lee 2.12a-16 -- Add include_raw macro, build with it off for Fedora - -* Wed Oct 13 2004 Stephen C. Tweedie - 2.12a-15 -- Add raw patch to allow binding of devices not yet in /dev - -* Wed Oct 13 2004 John (J5) Palmieri 2.12a-14 -- Add David Zeuthen's patch to enable the pamconsole flag #133941 - -* Wed Oct 13 2004 Stephen C. Tweedie 2.12a-13 -- Restore raw utils (bugzilla #130016) - -* Mon Oct 11 2004 Phil Knirsch 2.12a-12 -- Add the missing remote entry in pam.d - -* Wed Oct 6 2004 Steve Dickson -- Rechecked in some missing NFS mounting code. - -* Wed Sep 29 2004 Elliot Lee 2.12a-10 -- Make swaplabel support work with swapon -a -e - -* Tue Sep 28 2004 Steve Dickson -- Updated the NFS and NFS4 code to the latest CITI patch set - (in which they incorporate a number of our local patches). - -* Wed Sep 15 2004 Nalin Dahybhai 2.12a-8 -- Fix #132196 - turn on SELinux support at build-time. - -* Wed Sep 15 2004 Phil Knirsch 2.12a-7 -- Fix #91174 with pamstart.patch - -* Tue Aug 31 2004 Elliot Lee 2.12a-6 -- Fix #16415, #70616 with rdevman.patch -- Fix #102566 with loginman.patch -- Fix #104321 with rescuept.patch (just use plain lseek - we're in _FILE_OFFSET_BITS=64 land now) -- Fix #130016 - remove raw. -- Re-add agetty (replacing it with mgetty is too much pain, and mgetty is much larger) - -* Thu Aug 26 2004 Steve Dickson -- Made the NFS security checks more explicit to avoid confusion - (an upstream fix) -- Also removed a compilation warning - -* Wed Aug 11 2004 Alasdair Kergon -- Remove unused mount libdevmapper inclusion. - -* Wed Aug 11 2004 Alasdair Kergon -- Add device-mapper mount-by-label support -- Fix segfault in mount-by-label when a device without a label is present. - -* Wed Aug 11 2004 Steve Dickson -- Updated nfs man page to show that intr are on by - default for nfs4 - -* Thu Aug 05 2004 Jindrich Novy -- modified warning causing heart attack for >16 partitions, #107824 - -* Fri Jul 09 2004 Elliot Lee 2.12a-3 -- Fix #126623, #126572 -- Patch cleanup -- Remove agetty (use mgetty, agetty is broken) - -* Tue Jun 15 2004 Elliot Lee -- rebuilt - -* Thu Jun 03 2004 Elliot Lee 2.12a-1 -- Update to 2.12a -- Fix #122448 - -* Thu May 13 2004 Dan Walsh 2.12-19 -- Change pam_selinux to run last - -* Tue May 04 2004 Elliot Lee 2.12-18 -- Fix #122448 (autofs issues) - -* Fri Apr 23 2004 Elliot Lee 2.12-17 -- Fix #119157 by editing the patch -- Add patch145 to fix #119986 - -* Fri Apr 16 2004 Elliot Lee 2.12-16 -- Fix #118803 - -* Tue Mar 23 2004 Jeremy Katz 2.12-15 -- mkcramfs: use PAGE_SIZE for default blocksize (#118681) - -* Sat Mar 20 2004 -- Updated the nfs-mount.patch to correctly - handle the mounthost option and to ignore - servers that do not set auth flavors - -* Tue Mar 16 2004 Dan Walsh 2.12-13 -- Fix selinux ordering or pam for login - -* Tue Mar 16 2004 -- Make RPC error messages displayed with -v argument -- Added two checks to the nfs4 path what will print warnings - when rpc.idmapd and rpc.gssd are not running -- Ping NFS v4 servers before diving into kernel -- Make v4 mount interruptible which also make the intr option on by default - -* Sun Mar 13 2004 -- Reworked how the rpc.idmapd and rpc.gssd checks were - done due to review comments from upstream. -- Added rpc_strerror() so the '-v' flag will show RPC errors. - -* Sat Mar 13 2004 -- Added two checks to the nfs4 path what will print warnings - when rpc.idmapd and rpc.gssd are not running. - -* Thu Mar 11 2004 -- Reworked and updated the nfsv4 patches. - -* Wed Mar 10 2004 Dan Walsh -- Bump version - -* Wed Mar 10 2004 Steve Dickson -- Tried to make nfs error message a bit more meaninful -- Cleaned up some warnings - -* Sun Mar 7 2004 Steve Dickson -- Added pesudo flavors for nfsv4 mounts. -- Added BuildRequires: libselinux-devel and Requires: libselinux - when WITH_SELINUX is set. - -* Fri Feb 27 2004 Dan Walsh 2.12-5 -- check for 2.6.3 kernel in mount options - -* Mon Feb 23 2004 Elliot Lee 2.12-4 -- Remove /bin/kill for #116100 - -* Fri Feb 20 2004 Dan Walsh 2.12-3 -- rebuilt - -* Fri Feb 13 2004 Elliot Lee -- rebuilt - -* Thu Feb 12 2004 Elliot Lee 2.12-1 -- Final 2.12 has been out for ages - might as well use it. - -* Wed Jan 28 2004 Steve Dickson 2.12pre-4 -- Added mount patches that have NFS version 4 support - -* Mon Jan 26 2004 Elliot Lee 2.12pre-3 -- Provides: mount losetup - -* Mon Jan 26 2004 Dan Walsh 2.12pre-2 -- Add multiple to /etc/pam.d/login for SELinux - -* Thu Jan 15 2004 Elliot Lee 2.12pre-1 -- 2.12pre-1 -- Merge mount/losetup packages into the main package (#112324) -- Lose separate - -* Mon Nov 3 2003 Dan Walsh 2.11y-35.sel -- remove selinux code from login and use pam_selinux - -* Thu Oct 30 2003 Dan Walsh 2.11y-34.sel -- turn on selinux - -* Fri Oct 24 2003 Elliot Lee 2.11y-34 -- Add BuildRequires: texinfo (from a bug# I don't remember) -- Fix #90588 with mountman patch142. - -* Mon Oct 6 2003 Dan Walsh 2.11y-33 -- turn off selinux - -* Thu Sep 25 2003 Dan Walsh 2.11y-32.sel -- turn on selinux -- remove context selection - -* Fri Sep 19 2003 Elliot Lee 2.11y-31 -- Add patch140 (alldevs) to fix #101772. Printing the total size of - all devices was deemed a lower priority than having all devices - (e.g. /dev/ida/c0d9) displayed. - -* Fri Sep 12 2003 Dan Walsh 2.11y-31 -- turn off selinux - -* Fri Sep 12 2003 Dan Walsh 2.11y-30.sel -- turn on selinux - -* Fri Sep 5 2003 Elliot Lee 2.11y-28 -- Fix #103004, #103954 - -* Fri Sep 5 2003 Dan Walsh 2.11y-27 -- turn off selinux - -* Thu Sep 4 2003 Dan Walsh 2.11y-26.sel -- build with selinux - -* Mon Aug 11 2003 Elliot Lee 2.11y-25 -- Use urandom instead for mkcramfs - -* Tue Jul 29 2003 Dan Walsh 2.11y-24 -- add SELINUX 2.5 support - -* Wed Jul 23 2003 Elliot Lee 2.11y-22 -- #100433 patch - -* Mon Jun 14 2003 Elliot Lee 2.11y-20 -- #97381 patch - -* Wed Jun 04 2003 Elliot Lee -- rebuilt - -* Mon Apr 21 2003 Elliot Lee 2.11y-17 -- Change patch128 to improve ipcs -l - -* Fri Apr 11 2003 Elliot Lee 2.11y-16 -- Fix #85407 - -* Fri Apr 11 2003 Elliot Lee 2.11y-15 -- Change patch128 to util-linux-2.11f-ipcs-84243-86285.patch to get all -ipcs fixes - -* Thu Apr 10 2003 Matt Wilson 2.11y-14 -- fix last login date display on AMD64 (#88574) - -* Mon Apr 7 2003 Jeremy Katz 2.11y-13 -- include sfdisk on ppc - -* Fri Mar 28 2003 Jeremy Katz 2.11y-12 -- add patch from msw to change mkcramfs blocksize with a command line option - -* Tue Mar 25 2003 Phil Knirsch 2.11y-11 -- Fix segfault on s390x due to wrong usage of BLKGETSIZE. - -* Thu Mar 13 2003 Elliot Lee 2.11y-10 -- Really apply the ipcs patch. Doh. - -* Mon Feb 24 2003 Elliot Lee -- rebuilt - -* Wed Feb 19 2003 Elliot Lee 2.11y-8 -- ipcs-84243.patch to fix #84243 - -* Thu Feb 13 2003 Yukihiro Nakai 2.11y-7 -- Update moremisc patch to fix swprintf()'s minimum field (bug #83361). - -* Mon Feb 03 2003 Elliot Lee 2.11y-6 -- Fix mcookie segfault on many 64-bit architectures (bug #83345). - -* Mon Feb 03 2003 Tim Waugh 2.11y-5 -- Fix underlined multibyte characters (bug #83376). - -* Sun Feb 02 2003 Florian La Roche -- rebuild to have again a s390 rpm -- disable some more apps for mainframe - -* Wed Jan 29 2003 Elliot Lee 2.11y-4 -- util-linux-2.11y-umask-82552.patch - -* Wed Jan 22 2003 Tim Powers -- rebuilt - -* Mon Jan 13 2003 Elliot Lee 2.11y-2 -- Fix #81069, #75421 - -* Mon Jan 13 2003 Elliot Lee 2.11y-1 -- Update to 2.11y -- Fix #80953 -- Update patch0, patch107, patch117, patch120 for 2.11y -- Remove patch60, patch61, patch207, patch211, patch212, patch119, patch121 -- Remove patch122, patch200 - -* Wed Oct 30 2002 Elliot Lee 2.11w-2 -- Remove some crack/unnecessary patches while submitting stuff upstream. -- Build with -D_FILE_OFFSET_BITS=64 - -* Tue Oct 29 2002 Elliot Lee 2.11w-1 -- Update to 2.11w, resolve patch conflicts - -* Tue Oct 08 2002 Phil Knirsch 2.11r-10hammer.3 -- Extended util-linux-2.11b-s390x patch to work again. - -* Thu Oct 03 2002 Elliot Lee 2.11r-10hammer.2 -- Add patch122 for hwclock on x86_64 - -* Thu Sep 12 2002 Than Ngo 2.11r-10hammer.1 -- Fixed pam config files - -* Wed Sep 11 2002 Bernhard Rosenkraenzer 2.11r-10hammer -- Port to hammer - -* Fri Aug 30 2002 Elliot Lee 2.11r-10 -- Patch120 (hwclock) to fix #72140 -- Include isosize util - -* Wed Aug 7 2002 Elliot Lee 2.11r-9 -- Patch120 (skipraid2) to fix #70353, because the original patch was -totally useless. - -* Fri Aug 2 2002 Elliot Lee 2.11r-8 -- Patch119 (fdisk-add-primary) from #67898 - -* Wed Jul 24 2002 Elliot Lee 2.11r-7 -- Really add the gptsize patch, instead of what I think the patch says. -(+1) - -* Tue Jul 23 2002 Elliot Lee 2.11r-6 -- Add the sp[n].size part of the patch from #69603 - -* Mon Jul 22 2002 Florian La Roche -- adjust mainframe patches - -* Tue Jul 2 2002 Bill Nottingham 2.11r-4 -- only require usermode if we're shipping kbdrate here - -* Fri Jun 28 2002 Trond Eivind Glomsrod 2.11r-3 -- Port the large swap patch to new util-linux... the off_t changes - now in main aren't sufficient - -* Thu Jun 27 2002 Elliot Lee 2.11r-2 -- Remove swapondetect (patch301) until it avoids possible false positives. - -* Thu Jun 27 2002 Elliot Lee 2.11r-1 -- Update to 2.11r, wheeee -- Remove unused patches - -* Thu Jun 27 2002 Elliot Lee 2.11n-19 -- Make a note here that this package was the source of the single change -contained in util-linux-2.11f-18 (in 7.2/Alpha), and also contains the -rawman patch from util-linux-2.11f-17.1 (in 2.1AS). -- Package has no runtime deps on slang, so remove the BuildRequires: -slang-devel. - -* Fri Jun 21 2002 Tim Powers -- automated rebuild - -* Thu Jun 20 2002 Elliot Lee 2.11n-17 -- Fix teg's swapondetect patch to not print out the usage message when -'swapon -a -e' is run. (#66690) (edit existing patch) -- Apply hjl's utmp handling patch (#66950) (patch116) -- Fix fdisk man page notes on IDE disk partition limit (#64013) (patch117) -- Fix mount.8 man page notes on vfat shortname option (#65628) (patch117) -- Fix possible cal overflow with widechars (#67090) (patch117) - -* Tue Jun 11 2002 Trond Eivind Glomsrod 2.11n-16 -- support large swap partitions -- add '-d' option to autodetect available swap partitions - -* Thu May 23 2002 Tim Powers -- automated rebuild - -* Wed May 15 2002 Elliot Lee 2.11n-14 -- Remove kbdrate (again). - -* Mon Apr 29 2002 Florian La Roche -- adjust mainframe patches to apply to current rpm -- do not include fdisk until it is fixed to work on mainframe - -* Mon Apr 01 2002 Elliot Lee 2.11n-12 -- Don't strip binaries - rpm does it for us. - -* Sun Mar 31 2002 Elliot Lee 2.11n-11 -- Apply patch115 from ejb@ql.org for bug #61868 - -* Wed Mar 27 2002 Elliot Lee 2.11n-10 -- Finish fixing #60675 (ipcrm man page), updated the patch. -- Fix #61203 (patch114 - dumboctal.patch). - -* Tue Mar 12 2002 Elliot Lee 2.11n-9 -- Update ctty3 patch to ignore SIGHUP while dropping controlling terminal - -* Fri Mar 08 2002 Elliot Lee 2.11n-8 -- Update ctty3 patch to drop controlling terminal before forking. - -* Fri Mar 08 2002 Elliot Lee 2.11n-7 - Fix various bugs: -- Add patch110 (skipraid) to properly skip devices that are part of a RAID array. -- Add patch111 (mkfsman) to update the mkfs man page's "SEE ALSO" section. -- remove README.cfdisk -- Include partx -- Fix 54741 and related bugs for good(hah!) with patch113 (ctty3) - -* Wed Mar 06 2002 Elliot Lee 2.11n-6 -- Put kbdrate in, add usermode dep. - -* Tue Feb 26 2002 Elliot Lee 2.11n-5 -- Fix #60363 (tweak raw.8 man page, make rawdevices.8 symlink). - -* Tue Jan 28 2002 Bill Nottingham 2.11n-4 -- remove kbdrate (fixes kbd conflict) - -* Fri Dec 28 2001 Elliot Lee 2.11n-3 -- Add util-linux-2.11n-ownerumount.patch (#56593) -- Add patch102 (util-linux-2.11n-colrm.patch) to fix #51887 -- Fix #53452 nits. -- Fix #56953 (remove tunelp on s390) -- Fix #56459, and in addition switch to using sed instead of perl. -- Fix #58471 -- Fix #57300 -- Fix #37436 -- Fix #32132 - -* Wed Dec 26 2001 Elliot Lee 2.11n-1 -- Update to 2.11n -- Merge mount/losetup back in. - -* Tue Dec 04 2001 Elliot Lee 2.11f-17 -- Add patch38 (util-linux-2.11f-ctty2.patch) to ignore SIGINT/SIGTERM/SIGQUIT in the parent, so that ^\ won't break things. - -* Fri Nov 09 2001 Elliot Lee 2.11f-16 -- Merge patches 36, 75, 76, and 77 into patch #37, to attempt resolve all the remaining issues with #54741. - -* Wed Oct 24 2001 Florian La Roche -- add nologin man-page for s390/s390x - -* Wed Oct 24 2001 Bernhard Rosenkraenzer 2.11f-14 -- Don't build kbdrate on s390/s390x -- Don't make the pivot_root.8 man page executable(!) - -* Tue Oct 23 2001 Elliot Lee 2.11f-13 -- Patch/idea #76 from HJL, fixes bug #54741 (race condition in login -acquisition of controlling terminal). - -* Thu Oct 11 2001 Bill Nottingham -- fix permissions problem with vipw & shadow files, again (doh!) - -* Tue Oct 09 2001 Erik Troan -- added patch from Olaf Kirch to fix possible pwent structure overwriting - -* Fri Sep 28 2001 Elliot Lee 2.11f-10 -- fdisk patch from arjan - -* Sun Aug 26 2001 Elliot Lee 2.11f-9 -- Don't include cfdisk, since it appears to be an even bigger pile of junk than fdisk? :) - -* Wed Aug 1 2001 Tim Powers -- don't require usermode - -* Mon Jul 30 2001 Elliot Lee 2.11f-7 -- Incorporate kbdrate back in. - -* Mon Jul 30 2001 Bill Nottingham -- revert the patch that calls setsid() in login that we had reverted - locally but got integrated upstream (#46223) - -* Tue Jul 24 2001 Florian La Roche -- correct s390x patch - -* Mon Jul 23 2001 Elliot Lee -- Add my megapatch (various bugs) -- Include pivot_root (#44828) - -* Thu Jul 12 2001 Bill Nottingham -- make shadow files 0400, not 0600 - -* Wed Jul 11 2001 Bill Nottingham -- fix permissions problem with vipw & shadow files - -* Mon Jun 18 2001 Florian La Roche -- update to 2.11f, remove any merged patches -- add s390x patches for somewhat larger swap - -* Thu Jun 14 2001 Erik Troan -- added --verbose patch to mkcramfs; it's much quieter by default now - -* Tue May 22 2001 Erik Troan -- removed warning about starting partitions on cylinder 0 -- swap version2 - makes it unnecessary - -* Wed May 9 2001 Bernhard Rosenkraenzer 2.11b-2 -- Fix up s390x support - -* Mon May 7 2001 Bernhard Rosenkraenzer 2.11b-1 -- Fix up login for real (a console session should be the controlling tty) - by reverting to 2.10s code (#36839, #36840, #39237) -- Add man page for agetty (#39287) -- 2.11b, while at it - -* Fri Apr 27 2001 Preston Brown 2.11a-4 -- /sbin/nologin from OpenBSD added. - -* Fri Apr 20 2001 Bernhard Rosenkraenzer 2.11a-3 -- Fix up login - exiting immediately even if the password is correct - is not exactly a nice feature. -- Make definite plans to kill people who update login without checking - if the new version works ;) - -* Tue Apr 17 2001 Erik Troan -- upgraded to 2.11a (kbdrate moved to kbd, among other things) -- turned off ALLOW_VCS_USE -- modified mkcramfs to not use a large number of file descriptors -- include mkfs.bfs - -* Sun Apr 8 2001 Matt Wilson -- changed Requires: kernel >= 2.2.12-7 to Conflicts: kernel < 2.2.12-7 - (fixes a initscripts -> util-linux -> kernel -> initscripts prereq loop) - -* Tue Mar 20 2001 Matt Wilson -- patched mkcramfs to use the PAGE_SIZE from asm/page.h instead of hard - coding 4096 (fixes mkcramfs on alpha...) - -* Mon Mar 19 2001 Matt Wilson -- added mkcramfs (from linux/scripts/mkcramfs) - -* Mon Feb 26 2001 Tim Powers -- fixed bug #29131, where ipc.info didn't have an info dir entry, - added the dir entry to ipc.texi (Patch58) - -* Fri Feb 23 2001 Preston Brown -- use lang finder script -- install info files - -* Thu Feb 08 2001 Erik Troan -- reverted login patch; seems to cause problems -- added agetty - -* Wed Feb 07 2001 Erik Troan -- updated kill man page -- added patch to fix vipw race -- updated vipw to edit /etc/shadow and /etc/gshadow, if appropriate -- added patch to disassociate login from tty, session, and pgrp - -* Tue Feb 06 2001 Erik Troan -- fixed problem w/ empty extended partitions -- added patch to fix the date in the more man page -- set OPT to pass optimization flags to make rather then RPM_OPT_FLAG -- fixed fdisk -l /Proc/partitions parsing -- updated to 2.10s - -* Tue Jan 23 2001 Preston Brown -- danish translations added - -* Mon Jan 15 2001 Nalin Dahyabhai -- fix segfault in login in btmp patch (#24025) - -* Mon Dec 11 2000 Oliver Paukstadt -- ported to s390 - -* Wed Nov 01 2000 Florian La Roche -- update to 2.10p -- update patch37 to newer fdisk version - -* Mon Oct 9 2000 Jeff Johnson -- update to 2.10o -- fdformat: fixed to work with kernel 2.4.0test6 (Marek Wojtowicz) -- login: not installed suid -- getopt: by default install aux files in /usr/share/misc -- update to 2.10n: -- added blockdev.8 -- change to elvtune (andrea) -- fixed overrun in agetty (vii@penguinpowered.com) -- shutdown: prefer umounting by mount point (rgooch) -- fdisk: added plan9 -- fdisk: remove empty links in chain of extended partitions -- hwclock: handle both /dev/rtc and /dev/efirtc (Bill Nottingham) -- script: added -f (flush) option (Ivan Schreter) -- script: added -q (quiet) option (Per Andreas Buer) -- getopt: updated to version 1.1.0 (Frodo Looijaard) -- Czech messages (Jiri Pavlovsky) -- login.1 man page had not /var/spool/mail path (#16998). -- sln.8 man page (but not executable) included (#10601). -- teach fdisk 0xde(Dell), 0xee(EFI GPT), 0xef(EFI FAT) partitions (#17610). - -* Wed Aug 30 2000 Matt Wilson -- rebuild to cope with glibc locale binary incompatibility, again - -* Mon Aug 14 2000 Jeff Johnson -- setfdprm should open with O_WRONLY, not 3. - -* Fri Aug 11 2000 Jeff Johnson -- fdformat should open with O_WRONLY, not 3. - -* Fri Jul 21 2000 Nalin Dahyabhai -- make 'look' look in /usr/share/dict - -* Fri Jul 21 2000 Bill Nottingham -- put /usr/local/sbin:/usr/local/bin in root's path - -* Wed Jul 19 2000 Jakub Jelinek -- rebuild to cope with glibc locale binary incompatibility - -* Thu Jul 13 2000 Prospector -- automatic rebuild - -* Mon Jul 10 2000 Bill Nottingham -- enable hwclock to use /dev/efirtc on ia64 (gettext is fun. :( ) - -* Mon Jul 3 2000 Bill Nottingham -- move cfdisk to /usr/sbin, it depends on /usr stuff -- add rescuept - -* Fri Jun 23 2000 Bernhard Rosenkraenzer -- point more at the correct path to vi (for "v"), Bug #10882 - -* Sun Jun 4 2000 Jeff Johnson -- FHS packaging changes. - -* Thu Jun 1 2000 Nalin Dahyabhai -- modify PAM setup to use system-auth - -* Mon May 1 2000 Bill Nottingham -- eek, where did login go? (specfile tweaks) - -* Mon Apr 17 2000 Bernhard Rosenkraenzer -- 2.10k -- fix compilation with current glibc - -* Tue Mar 21 2000 Bernhard Rosenkraenzer -- 2.10h - -* Tue Mar 7 2000 Jeff Johnson -- rebuild for sparc baud rates > 38400. - -* Sat Mar 4 2000 Matt Wilson -- use snprintf - not sprintf - when doing - sprintf ("%%s\n", _("Some string")) to avoid overflows and - segfaults. - -* Mon Feb 21 2000 Jeff Johnson -- raw control file was /dev/raw, now /dev/rawctl. -- raw access files were /dev/raw*, now /dev/raw/raw*. - -* Thu Feb 17 2000 Erik Troan -- -v argument to mkswap wasn't working - -* Thu Feb 10 2000 Jakub Jelinek -- Recognize 0xfd on Sun disklabels as RAID - -* Tue Feb 8 2000 Bill Nottingham -- more lives in /bin, and was linked against /usr/lib/libnurses. Bad. - -* Thu Feb 03 2000 Jakub Jelinek -- update to 2.10f -- fix issues in the new realpath code, avoid leaking memory - -* Tue Feb 01 2000 Cristian Gafton -- rebuild to fix dependencies -- add NFSv3 patches - -* Fri Jan 28 2000 Bill Nottingham -- don't require csh - -* Mon Jan 24 2000 Nalin Dahyabhai -- update to 2.10e -- add rename - -* Thu Jan 20 2000 Jeff Johnson -- strip newlines in logger input. - -* Mon Jan 10 2000 Jeff Johnson -- rebuild with correct ncurses libs. - -* Tue Dec 7 1999 Matt Wilson -- updated to util-linux 2.10c -- deprecated IMAP login mail notification patch17 -- deprecated raw patch22 -- depricated readprofile patch24 - -* Tue Dec 7 1999 Bill Nottingham -- add patch for readprofile - -* Thu Nov 18 1999 Michael K. Johnson -- tunelp should come from util-linux - -* Tue Nov 9 1999 Jakub Jelinek -- kbdrate cannot use /dev/port on sparc. - -* Wed Nov 3 1999 Jakub Jelinek -- fix kbdrate on sparc. - -* Wed Oct 27 1999 Bill Nottingham -- ship hwclock on alpha. - -* Tue Oct 5 1999 Bill Nottingham -- don't ship symlinks to rdev if we don't ship rdev. - -* Tue Sep 07 1999 Cristian Gafton -- add rawIO support from sct - -* Mon Aug 30 1999 Preston Brown -- don't display "new mail" message when the only piece of mail is from IMAP - -* Fri Aug 27 1999 Michael K. Johnson -- kbdrate is now a console program - -* Thu Aug 26 1999 Jeff Johnson -- hostid is now in sh-utils. On sparc, install hostid as sunhostid (#4581). -- update to 2.9w: -- Updated mount.8 (Yann Droneaud) -- Improved makefiles -- Fixed flaw in fdisk - -* Tue Aug 10 1999 Jeff Johnson -- tsort is now in textutils. - -* Wed Aug 4 1999 Bill Nottingham -- turn off setuid bit on login. Again. :( - -* Tue Aug 3 1999 Peter Jones, -- hostid script for sparc (#3803). - -* Tue Aug 03 1999 Christian 'Dr. Disk' Hechelmann -- added locale message catalogs to %%file -- added patch for non-root build -- vigr.8 and /usr/lib/getopt man-page was missing from file list -- /etc/fdprm really is a config file - -* Fri Jul 23 1999 Jeff Johnson -- update to 2.9v: -- cfdisk no longer believes the kernel's HDGETGEO - (and may be able to partition a 2 TB disk) - -* Fri Jul 16 1999 Jeff Johnson -- update to 2.9u: -- Czech more.help and messages (Jiri Pavlovsky) -- Japanese messages (Daisuke Yamashita) -- fdisk fix (Klaus G. Wagner) -- mount fix (Hirokazu Takahashi) -- agetty: enable hardware flow control (Thorsten Kranzkowski) -- minor cfdisk improvements -- fdisk no longer accepts a default device -- Makefile fix - -* Tue Jul 6 1999 Jeff Johnson -- update to 2.9t: -- national language support for hwclock -- Japanese messages (both by Daisuke Yamashita) -- German messages and some misc i18n fixes (Elrond) -- Czech messages (Jiri Pavlovsky) -- wall fixed for /dev/pts/xx ttys -- make last and wall use getutent() (Sascha Schumann) - [Maybe this is bad: last reading all of wtmp may be too slow. - Revert in case people complain.] -- documented UUID= and LABEL= in fstab.5 -- added some partition types -- swapon: warn only if verbose - -* Fri Jun 25 1999 Jeff Johnson -- update to 2.9s. - -* Sat May 29 1999 Jeff Johnson -- fix mkswap sets incorrect bits on sparc64 (#3140). - -* Thu Apr 15 1999 Jeff Johnson -- on sparc64 random ioctls on clock interface cause kernel messages. - -* Thu Apr 15 1999 Jeff Johnson -- improved raid patch (H.J. Lu). - -* Wed Apr 14 1999 Michael K. Johnson -- added patch for smartraid controllers - -* Sat Apr 10 1999 Cristian Gafton -- fix logging problems caused by setproctitle and PAM interaction - (#2045) - -* Wed Mar 31 1999 Jeff Johnson -- include docs and examples for sfdisk (#1164) - -* Mon Mar 29 1999 Matt Wilson -- rtc is not working properly on alpha, we can't use hwclock yet. - -* Fri Mar 26 1999 Cristian Gafton -- add patch to make mkswap more 64 bit friendly... Patch from - eranian@hpl.hp.com (ahem!) - -* Thu Mar 25 1999 Jeff Johnson -- include sfdisk (#1164) -- fix write (#1784) -- use positive logic in spec file (%%ifarch rather than %ifnarch). -- (re)-use 1st matching utmp slot if search by mypid not found. -- update to 2.9o -- lastb wants bad logins in wtmp clone /var/run/btmp (#884) - -* Thu Mar 25 1999 Jakub Jelinek -- if hwclock is to be compiled on sparc, - it must actually work. Also, it should obsolete - clock, otherwise it clashes. -- limit the swap size in mkswap for 2.2.1+ kernels - by the actual maximum size kernel can handle. -- fix kbdrate on sparc, patch by J. S. Connell - - -* Wed Mar 24 1999 Matt Wilson -- added pam_console back into pam.d/login - -* Tue Mar 23 1999 Matt Wilson -- updated to 2.9i -- added hwclock for sparcs and alpha - -* Mon Mar 22 1999 Erik Troan -- added vigr to file list - -* Sun Mar 21 1999 Cristian Gafton -- auto rebuild in the new build environment (release 12) - -* Thu Mar 18 1999 Cristian Gafton -- remove most of the ifnarch arm stuff - -* Mon Mar 15 1999 Michael Johnson -- added pam_console.so to /etc/pam.d/login - -* Thu Feb 4 1999 Michael K. Johnson -- .perms patch to login to make it retain root in parent process - for pam_close_session to work correctly - -* Tue Jan 12 1999 Jeff Johnson -- strip fdisk in buildroot correctly (#718) - -* Mon Jan 11 1999 Cristian Gafton -- have fdisk compiled on sparc and arm - -* Mon Jan 11 1999 Erik Troan -- added beos partition type to fdisk - -* Wed Dec 30 1998 Cristian Gafton -- incorporate fdisk on all arches - -* Sat Dec 5 1998 Jeff Johnson -- restore PAM functionality at end of login (Bug #201) - -* Thu Dec 03 1998 Cristian Gafton -- patch top build on the arm without PAM and related utilities, for now. -- build hwclock only on intel - -* Wed Nov 18 1998 Cristian Gafton -- upgraded to version 2.9 - -* Thu Oct 29 1998 Bill Nottingham -- build for Raw Hide (slang-1.2.2) -- patch kbdrate wackiness so it builds with egcs - -* Tue Oct 13 1998 Erik Troan -- patched more to use termcap - -* Mon Oct 12 1998 Erik Troan -- added warning about alpha/bsd label starting cylinder - -* Mon Sep 21 1998 Erik Troan -- use sigsetjmp/siglongjmp in more rather then sig'less versions - -* Fri Sep 11 1998 Jeff Johnson -- explicit attrs for setuid/setgid programs - -* Thu Aug 27 1998 Cristian Gafton -- sln is now included in glibc - -* Sun Aug 23 1998 Jeff Johnson -- add cbm1581 floppy definitions (problem #787) - -* Mon Jun 29 1998 Jeff Johnson -- remove /etc/nologin at end of shutdown/halt. - -* Fri Jun 19 1998 Jeff Johnson -- add mount/losetup. - -* Thu Jun 18 1998 Jeff Johnson -- update to 2.8 with 2.8b clean up. hostid now defunct? - -* Mon Jun 01 1998 David S. Miller -- "more" now works properly on sparc - -* Sat May 02 1998 Jeff Johnson -- Fix "fdisk -l" fault on mounted cdrom. (prob #513) - -* Fri Apr 24 1998 Prospector System -- translations modified for de, fr, tr - -* Sat Apr 11 1998 Cristian Gafton -- manhattan rebuild - -* Mon Dec 29 1997 Erik Troan -- more didn't suspend properly on glibc -- use proper tc*() calls rather then ioctl's - -* Sun Dec 21 1997 Cristian Gafton -- fixed a security problem in chfn and chsh accepting too - long gecos fields - -* Fri Dec 19 1997 Mike Wangsmo -- removed "." from default path - -* Tue Dec 02 1997 Cristian Gafton -- added (again) the vipw patch - -* Wed Oct 22 1997 Michael Fulbright -- minor cleanups for glibc 2.1 - -* Fri Oct 17 1997 Michael Fulbright -- added vfat32 filesystem type to list recognized by fdisk - -* Fri Oct 10 1997 Erik Troan -- don't build clock on the alpha -- don't install chkdupexe - -* Thu Oct 02 1997 Michael K. Johnson -- Update to new pam standard. -- BuildRoot. - -* Thu Sep 25 1997 Cristian Gafton -- added rootok and setproctitle patches -- updated pam config files for chfn and chsh - -* Tue Sep 02 1997 Erik Troan -- updated MCONFIG to automatically determine the architecture -- added glibc header hacks to fdisk code -- rdev is only available on the intel - -* Fri Jul 18 1997 Erik Troan -- update to util-linux 2.7, fixed login problems - -* Wed Jun 25 1997 Erik Troan -- Merged Red Hat changes into main util-linux source, updated package to - development util-linux (nearly 2.7). - -* Tue Apr 22 1997 Michael K. Johnson -- LOG_AUTH --> LOG_AUTHPRIV in login and shutdown - -* Mon Mar 03 1997 Michael K. Johnson -- Moved to new pam and from pam.conf to pam.d - -* Tue Feb 25 1997 Michael K. Johnson -- pam.patch differentiated between different kinds of bad logins. - In particular, "user does not exist" and "bad password" were treated - differently. This was a minor security hole. diff --git a/uuidd.init b/uuidd.init deleted file mode 100755 index 9fba666..0000000 --- a/uuidd.init +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/bash -# -# uuidd uuidd daemon for unique time-based UUID generation -# -# Author: Eric Sandeen -# -# chkconfig: - 60 99 -# -# description: uuidd is a helper daemon to guarantee uniqueness of \ -# time-based UUIDs when using libuuid. -# processname: uuidd -# pidfile: /var/lib/libuuid/uuidd.pid -# - -### BEGIN INIT INFO -# Provides: uuidd -# Required-Start: $time $local_fs -# Required-Stop: $time $local_fs -# Default-Stop: 0 1 6 -# Short-Description: UUID daemon -# Description: Daemon which guarantees uniqueness of time-based UUIDS -# when using libuuid. -### END INIT INFO - -# source function library -. /etc/rc.d/init.d/functions - -[ -e /etc/sysconfig/uuidd ] && . /etc/sysconfig/uuidd - -DAEMON=uuidd -exec=/usr/sbin/uuidd -prog=uuidd -user=uuidd -lockfile=/var/lock/subsys/$DAEMON -pidfile=/var/run/uuidd/uuidd.pid - -check() { - # Check that we're a privileged user - [ $(id -u) -eq 0 ] || exit 4 - - # Check if daemon binary is executable - [ -x $exec ] || exit 5 -} - -start () { - check - echo -n $"Starting $prog: " - daemon --user $user --pidfile $pidfile $DAEMON - retval=$? - echo - [ $retval -eq 0 ] && touch $lockfile - return $retval -} - -stop () { - check - echo -n $"Stopping $prog: " - killproc $DAEMON - retval=$? - echo - [ $retval -eq 0 ] && rm -f $lockfile - return $retval -} - -restart() { - stop - start -} - -reload() { - restart -} - -force_reload() { - restart -} - -rh_status() { - status -p $pidfile $DAEMON -} - -rh_status_q() { - rh_status >/dev/null 2>&1 -} - - -case "$1" in - start) - rh_status_q && exit 0 - $1 - ;; - stop) - rh_status_q || exit 0 - $1 - ;; - restart) - $1 - ;; - reload) - rh_status_q || exit 7 - $1 - ;; - force-reload) - force_reload - ;; - status) - rh_status - ;; - condrestart|try-restart) - rh_status_q || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" - exit 2 -esac -exit $?