From 889f6bb9271bcc011e0e8d4ea0afd6b4c03fa270 Mon Sep 17 00:00:00 2001 From: fake Date: Wed, 5 Jan 2005 11:51:38 +0000 Subject: [PATCH] fake: util-linux: update to 2.12p [2004123018372305808] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@5444 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- .../base/util-linux/configure-tqueue_h.patch | 10 --- .../base/util-linux/cryptoloop-support.diff | 83 ++++++++----------- .../base/util-linux/disable_cramfs_tools.diff | 16 ++-- package/base/util-linux/hotfixes.patch | 12 --- .../base/util-linux/linux-compiler_h.patch | 47 ++--------- .../base/util-linux/nice-mount-paths.patch | 67 ++++++--------- package/base/util-linux/util-linux.desc | 4 +- 7 files changed, 76 insertions(+), 163 deletions(-) delete mode 100644 package/base/util-linux/configure-tqueue_h.patch diff --git a/package/base/util-linux/configure-tqueue_h.patch b/package/base/util-linux/configure-tqueue_h.patch deleted file mode 100644 index 5819db026..000000000 --- a/package/base/util-linux/configure-tqueue_h.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- util-linux-2.12h/configure 2004-09-06 16:33:47.000000000 +0000 -+++ util-linux-2.12h-comp/configure 2004-10-23 08:24:25.176815064 +0000 -@@ -366,6 +366,7 @@ - # 1. cytune.c may need struct tq_struct - # - echo " -+#include - #include - #include - int main(){ exit(0); } diff --git a/package/base/util-linux/cryptoloop-support.diff b/package/base/util-linux/cryptoloop-support.diff index 52e7e1f82..b3337c5e6 100644 --- a/package/base/util-linux/cryptoloop-support.diff +++ b/package/base/util-linux/cryptoloop-support.diff @@ -1,15 +1,6 @@ -diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount.c ---- util-linux-2.12h/mount/lomount.c 2004-09-22 18:26:02.000000000 +0000 -+++ util-linux-2.12h-patch/mount/lomount.c 2004-10-23 03:37:44.541795904 +0000 -@@ -10,7 +10,6 @@ - * 2000-09-24 Marc Mutz - * - added -p option to pass passphrases via fd's to losetup/mount. - * Used for encryption in non-interactive environments. -- * The idea behind xgetpass() is stolen from GnuPG, v.1.0.3. - */ - - #define LOOPMAJOR 7 -@@ -24,12 +23,16 @@ +--- ./mount/lomount.c.orig 2004-12-30 18:03:18.851539264 +0100 ++++ ./mount/lomount.c 2004-12-30 18:17:14.617483528 +0100 +@@ -11,12 +11,16 @@ #include #include #include @@ -26,15 +17,15 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount. #include "loop.h" #include "lomount.h" -@@ -38,6 +41,7 @@ - +@@ -26,6 +30,7 @@ extern int verbose; + extern char *progname; extern char *xstrdup (const char *s); /* not: #include "sundries.h" */ +extern void *xmalloc (size_t size); /* idem */ extern void error (const char *fmt, ...); /* idem */ #ifdef LOOP_SET_FD -@@ -198,43 +202,113 @@ +@@ -190,44 +195,115 @@ return 0; } @@ -105,16 +96,17 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount. + sscanf(s, "min keysize : %d", &min_size); + sscanf(s, "max keysize : %d", &max_size); } -- if (read(pfd, pass+i, 1) != 1 || pass[i] == '\n') +- if (read(pfd, pass+i, 1) != 1 || +- pass[i] == '\n' || pass[i] == 0) - break; } + - if (pass == NULL) - return ""; -- else { -- pass[i] = 0; -- return pass; + fclose(fp); -+ + +- pass[i] = 0; +- return pass; + if (!cipher_found) { + fprintf(stderr, _("Invalid cipher \"%s\"\n"), cipher_name); + retval = 0; @@ -125,7 +117,8 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount. + loopinfo64->lo_encrypt_key_size, cipher_name); + retval = 0; + goto end; - } ++ } ++ + + retval = 1; +end: @@ -179,7 +172,7 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount. } static int -@@ -275,9 +349,40 @@ +@@ -268,9 +344,40 @@ if (digits_only(encryption)) { loopinfo64.lo_encrypt_type = atoi(encryption); } else { @@ -221,19 +214,16 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount. } } -@@ -308,10 +413,26 @@ - strlen(loopinfo64.lo_encrypt_key); - break; +@@ -297,7 +404,27 @@ + pass = getpass(_("Password: ")); + goto gotpass; default: - pass = xgetpass(pfd, _("Password: ")); -- xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE); -- memset(pass, 0, strlen(pass)); -- loopinfo64.lo_encrypt_key_size = LO_KEY_SIZE; -+ if (pfd == -1) { -+ pass = getpass(_("Password: ")); -+ xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE); ++ if (pfd == -1) { ++ pass = getpass(_("Password: ")); ++ xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE); + memset(pass, 0, strlen(pass)); -+ } else { ++ } else { + /* If we're reading from an extenral program, * + * odds are good that a SIGCHLD will interrupt * + * this read(), and ruin our whole day. So we * @@ -249,10 +239,11 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount. + } + sigprocmask(SIG_SETMASK, &oss, NULL); + } - } - - if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { -@@ -325,20 +446,44 @@ ++ break; + gotpass: + memset(loopinfo64.lo_encrypt_key, 0, LO_KEY_SIZE); + xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE); +@@ -316,20 +443,45 @@ struct loop_info loopinfo; int errsv = errno; @@ -265,6 +256,7 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount. + } + + ++ i = loop_info64_to_old(&loopinfo64, &loopinfo); i = loop_info64_to_old(&loopinfo64, &loopinfo); if (i) { errno = errsv; @@ -298,7 +290,7 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount. ioctl (fd, LOOP_CLR_FD, 0); close (fd); return 1; -@@ -420,6 +563,22 @@ +@@ -412,6 +564,22 @@ exit(1); } @@ -321,22 +313,19 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount. char * xstrdup (const char *s) { char *t; -Nur in util-linux-2.12h-patch/mount: lomount.c~. -diff -dur util-linux-2.12h/mount/mount.8 util-linux-2.12h-patch/mount/mount.8 ---- util-linux-2.12h/mount/mount.8 2004-09-19 20:00:49.000000000 +0000 -+++ util-linux-2.12h-patch/mount/mount.8 2004-10-23 03:36:52.385724832 +0000 -@@ -1759,6 +1759,11 @@ - .BR loop ", " offset " and " encryption , - that are really options to - .BR losetup (8). +--- ./mount/mount.8.orig 2004-12-30 18:03:25.645506424 +0100 ++++ ./mount/mount.8 2004-12-30 18:18:04.469904808 +0100 +@@ -1847,6 +1847,10 @@ + .BR \%losetup (8). + (These options can be used in addition to those specific + to the filesystem type.) +You can also use the +.BR keygen +option to have mount call an external program from, which it will read the +encryption key. Arguments to this program can be given, separated by semicolons. -+ + If no explicit loop device is mentioned (but just an option `\fB\-o loop\fP' is given), then - .B mount diff -dur util-linux-2.12h/mount/mount.c util-linux-2.12h-patch/mount/mount.c --- util-linux-2.12h/mount/mount.c 2004-10-13 20:54:39.000000000 +0000 +++ util-linux-2.12h-patch/mount/mount.c 2004-10-23 03:36:52.386724680 +0000 diff --git a/package/base/util-linux/disable_cramfs_tools.diff b/package/base/util-linux/disable_cramfs_tools.diff index f6f19e202..0c21be62a 100644 --- a/package/base/util-linux/disable_cramfs_tools.diff +++ b/package/base/util-linux/disable_cramfs_tools.diff @@ -1,6 +1,5 @@ -diff -dur util-linux-2.12h/disk-utils/Makefile util-linux-2.12h-patch/disk-utils/Makefile ---- util-linux-2.12h/disk-utils/Makefile 2002-11-02 13:52:47.000000000 +0000 -+++ util-linux-2.12h-patch/disk-utils/Makefile 2004-10-23 03:13:08.329214328 +0000 +--- ./disk-utils/Makefile.orig 2004-12-30 17:55:07.774194368 +0100 ++++ ./disk-utils/Makefile 2004-12-30 17:56:04.443579312 +0100 @@ -20,7 +20,7 @@ ETC= fdprm @@ -10,7 +9,7 @@ diff -dur util-linux-2.12h/disk-utils/Makefile util-linux-2.12h-patch/disk-utils ifneq "$(HAVE_FDUTILS)" "yes" USRBIN:=$(USRBIN) setfdprm -@@ -32,22 +32,8 @@ +@@ -32,26 +32,12 @@ MAN8:=$(MAN8) raw.8 endif @@ -18,6 +17,10 @@ diff -dur util-linux-2.12h/disk-utils/Makefile util-linux-2.12h-patch/disk-utils -SBIN:=$(SBIN) fsck.cramfs mkfs.cramfs -endif - + ifeq "$(HAVE_UUID)" "yes" + MKSWAP_LIBS=-luuid + endif + all: $(SBIN) $(USRBIN) -fsck.cramfs: fsck.cramfs.o @@ -32,7 +35,4 @@ diff -dur util-linux-2.12h/disk-utils/Makefile util-linux-2.12h-patch/disk-utils - fsck.minix.o mkfs.minix.o: bitops.h minix.h - install: all -Nur in util-linux-2.12h-patch/disk-utils: Makefile~. -Nur in util-linux-2.12h-patch/: Makefile~. -Nur in util-linux-2.12h-patch/: Makefile.rej. + mkswap: mkswap.o $(LIB)/xstrncpy.o diff --git a/package/base/util-linux/hotfixes.patch b/package/base/util-linux/hotfixes.patch index c93340910..45b3dc476 100644 --- a/package/base/util-linux/hotfixes.patch +++ b/package/base/util-linux/hotfixes.patch @@ -66,18 +66,6 @@ diff -dur util-linux-2.12h/mount/mount.c util-linux-2.12h-patch/mount/mount.c #ifdef DO_PS_FIDDLING #include "setproctitle.h" Nur in util-linux-2.12h-patch/mount: mount.c~. -diff -dur util-linux-2.12h/mount/swap.configure util-linux-2.12h-patch/mount/swap.configure ---- util-linux-2.12h/mount/swap.configure 1999-07-09 02:56:39.000000000 +0000 -+++ util-linux-2.12h-patch/mount/swap.configure 2004-10-23 03:17:42.547526808 +0000 -@@ -23,7 +23,7 @@ - echo '#include - main(){ exit(0); swapon("/dev/null", 0); }' >> conftest.c - eval $compile --if test -s conftest && ./conftest 2>/dev/null; then -+if test -s conftest; then - echo "#define SWAPON_HAS_TWO_ARGS" > swapargs.h - echo $PAGEH >> swapargs.h - echo $SWAPH >> swapargs.h diff -dur util-linux-2.12h/text-utils/Makefile util-linux-2.12h-patch/text-utils/Makefile --- util-linux-2.12h/text-utils/Makefile 2003-03-02 23:32:04.000000000 +0000 +++ util-linux-2.12h-patch/text-utils/Makefile 2004-10-23 03:17:42.547526808 +0000 diff --git a/package/base/util-linux/linux-compiler_h.patch b/package/base/util-linux/linux-compiler_h.patch index 0f4581ea3..19fd1cc9c 100644 --- a/package/base/util-linux/linux-compiler_h.patch +++ b/package/base/util-linux/linux-compiler_h.patch @@ -1,6 +1,5 @@ -diff -dur util-linux-2.12h/partx/addpart.c util-linux-2.12h-comp/partx/addpart.c ---- util-linux-2.12h/partx/addpart.c 1999-07-09 02:56:36.000000000 +0000 -+++ util-linux-2.12h-comp/partx/addpart.c 2004-10-23 08:41:37.998802256 +0000 +--- ./partx/addpart.c.orig 2004-12-30 18:27:39.994411784 +0100 ++++ ./partx/addpart.c 2004-12-30 18:27:49.601951216 +0100 @@ -3,6 +3,7 @@ #include #include @@ -9,31 +8,8 @@ diff -dur util-linux-2.12h/partx/addpart.c util-linux-2.12h-comp/partx/addpart.c #include int -diff -dur util-linux-2.12h/disk-utils/fdformat.c util-linux-2.12h-patch/disk-utils/fdformat.c ---- util-linux-2.12h/disk-utils/fdformat.c 2002-07-07 12:38:24.000000000 +0000 -+++ util-linux-2.12h-patch/disk-utils/fdformat.c 2004-10-23 03:07:43.330621624 +0000 -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - #include - - #include "nls.h" -diff -dur util-linux-2.12h/disk-utils/setfdprm.c util-linux-2.12h-patch/disk-utils/setfdprm.c ---- util-linux-2.12h/disk-utils/setfdprm.c 2001-10-21 10:32:27.000000000 +0000 -+++ util-linux-2.12h-patch/disk-utils/setfdprm.c 2004-10-23 03:07:43.331621472 +0000 -@@ -13,6 +13,7 @@ - #include - #include - #include -+#include - #include - #include "nls.h" - -diff -dur util-linux-2.12h/partx/delpart.c util-linux-2.12h-patch/partx/delpart.c ---- util-linux-2.12h/partx/delpart.c 1999-07-09 02:56:36.000000000 +0000 -+++ util-linux-2.12h-patch/partx/delpart.c 2004-10-23 03:07:43.331621472 +0000 +--- ./partx/delpart.c.orig 2004-12-30 18:28:55.711900976 +0100 ++++ ./partx/delpart.c 2004-12-30 18:29:03.194763408 +0100 @@ -3,6 +3,7 @@ #include #include @@ -42,9 +18,8 @@ diff -dur util-linux-2.12h/partx/delpart.c util-linux-2.12h-patch/partx/delpart. #include int -diff -dur util-linux-2.12h/partx/partx.c util-linux-2.12h-patch/partx/partx.c ---- util-linux-2.12h/partx/partx.c 2004-08-23 20:13:27.000000000 +0000 -+++ util-linux-2.12h-patch/partx/partx.c 2004-10-23 03:07:43.332621320 +0000 +--- ./partx/partx.c.orig 2004-12-30 18:29:10.607636480 +0100 ++++ ./partx/partx.c 2004-12-30 18:29:21.124037744 +0100 @@ -37,6 +37,7 @@ #include #include @@ -53,13 +28,3 @@ diff -dur util-linux-2.12h/partx/partx.c util-linux-2.12h-patch/partx/partx.c #include /* HDIO_GETGEO */ #include #define BLKGETSIZE _IO(0x12,96) /* return device size */ ---- util-linux-2.12h/sys-utils/cytune.c.orig 2004-11-13 17:28:02.949147420 +0100 -+++ util-linux-2.12h/sys-utils/cytune.c 2004-11-13 17:28:25.514481234 +0100 -@@ -58,6 +58,7 @@ - #include /* required for old kernels (for struct tq_struct) */ - /* compilation errors on other kernels */ - #endif -+#include - #include - - #if 0 diff --git a/package/base/util-linux/nice-mount-paths.patch b/package/base/util-linux/nice-mount-paths.patch index ae17121e4..14d75a4de 100644 --- a/package/base/util-linux/nice-mount-paths.patch +++ b/package/base/util-linux/nice-mount-paths.patch @@ -1,45 +1,26 @@ -# --- ROCK-COPYRIGHT-NOTE-BEGIN --- -# -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# Please add additional copyright information _after_ the line containing -# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by -# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! -# -# ROCK Linux: rock-src/package/base/util-linux/nice-mount-paths.patch -# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# --- ROCK-COPYRIGHT-NOTE-END --- - ---- ./mount/mount.c.orig Wed Mar 21 10:07:59 2001 -+++ ./mount/mount.c Wed Mar 21 10:12:15 2001 -@@ -1061,6 +1061,23 @@ - /* Substitute values in opts, if required */ - opts = usersubst(opts); +--- ./mount/mount.c.orig 2004-12-30 17:59:42.242468848 +0100 ++++ ./mount/mount.c 2004-12-30 18:00:26.571729776 +0100 +@@ -1159,6 +1159,23 @@ + /* Substitute values in opts, if required */ + opts = usersubst(opts); -+ /* make the node a nice absolute path name */ -+ if (node[0] && node[0]!='/') { -+ char *thisdir=get_current_dir_name(); -+ char *oldnode=node; -+ if (chdir(node) == 0) { -+ /* we will never free this variable ... */ -+ node=get_current_dir_name(); -+ chdir(thisdir); -+ if (verbose) printf("mount: change '%s' to '%s'\n",oldnode,node); -+ } -+ free(thisdir); -+ } -+ if (strlen(node)>=3 && node[strlen(node)-1]=='/') { -+ if (verbose) printf("mount: remove the leading '/' in '%s'\n",node); -+ node[strlen(node)-1]=0; -+ } ++ /* make the node a nice absolute path name */ ++ if (node[0] && node[0]!='/') { ++ char *thisdir=get_current_dir_name(); ++ char *oldnode=node; ++ if (chdir(node) == 0) { ++ /* we will never free this variable ... */ ++ node=get_current_dir_name(); ++ chdir(thisdir); ++ if (verbose) printf("mount: change '%s' to '%s'\n",oldnode,node); ++ } ++ free(thisdir); ++ } ++ if (strlen(node)>=3 && node[strlen(node)-1]=='/') { ++ if (verbose) printf("mount: remove the leading '/' in '%s'\n",node); ++ node[strlen(node)-1]=0; ++ } + - /* Merge the fstab and command line options. */ - if (opts == NULL) - opts = cmdlineopts; + /* Merge the fstab and command line options. */ + if (opts == NULL) + opts = cmdlineopts; diff --git a/package/base/util-linux/util-linux.desc b/package/base/util-linux/util-linux.desc index d716f1889..83ca5f037 100644 --- a/package/base/util-linux/util-linux.desc +++ b/package/base/util-linux/util-linux.desc @@ -38,8 +38,8 @@ [L] GPL [S] Stable -[V] 2.12h +[V] 2.12p [P] X -1-3-----9 179.200 -[D] 1373503241 util-linux-2.12h.tar.gz ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/ +[D] 234540563 util-linux-2.12p.tar.gz ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/