remove old and unused patches
authorMike Frysinger <vapier@gentoo.org>
Mon, 10 Jan 2005 02:56:52 +0000 (02:56 +0000)
committerMike Frysinger <vapier@gentoo.org>
Mon, 10 Jan 2005 02:56:52 +0000 (02:56 +0000)
sys-apps/util-linux/Manifest
sys-apps/util-linux/files/util-linux-2.11z-01-nfsv4-crypt.dif [deleted file]
sys-apps/util-linux/files/util-linux-2.11z-mips-fdisk-fix.patch [deleted file]
sys-apps/util-linux/files/util-linux-2.11z-script.patch [deleted file]
sys-apps/util-linux/files/util-linux-2.12b-fat-LABEL-support.patch [deleted file]
sys-apps/util-linux/files/util-linux-2.12b-gcloop-with-crypt.patch [deleted file]
sys-apps/util-linux/files/util-linux-2.12b-gcloop.patch [deleted file]
sys-apps/util-linux/files/util-linux-2.12b-pic.patch [deleted file]
sys-apps/util-linux/files/util-linux-swapon-check-symlinks.patch [deleted file]
sys-apps/util-linux/util-linux-2.12-r5.ebuild

index b71b5dd0f810fc3b7c4db78daf3be03f99e63ab4..588cc0f6c1e096c3b124f3ca664e1ffe63f27312 100644 (file)
@@ -3,39 +3,31 @@ Hash: SHA1
 
 MD5 57673b282c25d0c720a58f6b279abf60 ChangeLog 16014
 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
-MD5 ab12b992dbe050c59d40d4e56f6076c9 util-linux-2.12-r5.ebuild 4199
 MD5 05bbf2629f4d1ab30d95e051cc923add util-linux-2.12i-r1.ebuild 3678
+MD5 26220b8883c0ebc90c7caeb8ae21e6f3 util-linux-2.12-r5.ebuild 4195
+MD5 e3697bc8fd6a344e8cba1c7d32e34790 files/util-linux-2.11z-parallel-make.patch 369
 MD5 6aa1c240dd789327ea92e36309052950 files/no-symlink-resolve.patch 316
-MD5 0f2f1ddaeaf52622fa80f4f08bb25a6b files/util-linux-2.11z-01-nfsv4-crypt.dif 13460
-MD5 482305a63e330c809dc808af25ecfe33 files/util-linux-2.12i-pic.patch 2522
+MD5 a43d2b8c70c5f40a195721dc536abace files/util-linux-2.12-swapon-unistd.patch 289
 MD5 7d35ae646b52391076f7a329af8265bc files/util-linux-2.11z-agetty-domainname-option.patch 1810
-MD5 6dc0134d8d5f325a86257698d2184718 files/util-linux-2.11z-mips-fdisk-fix.patch 1698
-MD5 e3697bc8fd6a344e8cba1c7d32e34790 files/util-linux-2.11z-parallel-make.patch 369
+MD5 0be8df03dae23c81a0e929e58a4114e0 files/util-linux-2.11z-01-nfsv4.dif 13442
 MD5 18371db840b08f5782e3f8f96c4efe8d files/util-linux-2.11z-pic.patch 3056
-MD5 90b5a47385e394b9112357282c35eb4a files/util-linux-2.11z-script.patch 1580
 MD5 d927611f34139a40f1fc9f4162c61f8a files/util-linux-2.12-kernel-2.6.patch 2964
-MD5 8d4f1146f0699deb1e6872e1c81293e3 files/util-linux-2.12-selinux.diff.bz2 2558
-MD5 65f42fbf981464410f7d5d84a429e920 files/util-linux-no-kill.patch 642
 MD5 7ce604460c5607e6eb5d894b6c8b2064 files/util-linux-2.12-fat-LABEL-support.patch 11583
-MD5 5a1bf3d383850b6c8ca05cc4fe76c813 files/digest-util-linux-2.12-r5 154
 MD5 4460875a6ebcf24a7ca5b41ed12f9fe5 files/util-linux-2.12-gcloop.patch 3806
+MD5 65f42fbf981464410f7d5d84a429e920 files/util-linux-no-kill.patch 642
 MD5 11fdaf3d68904b318fbffd7243e719b7 files/util-linux-2.12-amd64_rdev_installation.patch 737
-MD5 a43d2b8c70c5f40a195721dc536abace files/util-linux-2.12-swapon-unistd.patch 289
-MD5 e9d23ba9f2e86d57084dce2b34d76c10 files/util-linux-2.12b-fat-LABEL-support.patch 11672
-MD5 58cfa6f70a144bbe55e6aa1b85f72a96 files/util-linux-2.12b-gcloop-with-crypt.patch 3846
-MD5 a0217db1b99dfa1f137c22c36343a623 files/util-linux-2.12b-gcloop.patch 3844
-MD5 07a3dfffc55bcc7ef2868e025beb853e files/util-linux-2.12b-pic.patch 2874
-MD5 712184d7725a7aeb17cb0ef0e7549e72 files/util-linux-swapon-check-symlinks.patch 968
+MD5 73c0cb6f9aa5fa84e701fc68d0478aac files/util-linux-2.12i-nfsv4.patch 12854
+MD5 8d4f1146f0699deb1e6872e1c81293e3 files/util-linux-2.12-selinux.diff.bz2 2558
 MD5 61beee95fb4696a6af11ffb84ddb055c files/util-linux-2.12i-ignore-managed.patch 506
-MD5 cfa3960fd97ca16c85b0d1b87e6ba226 files/digest-util-linux-2.12i-r1 156
-MD5 0be8df03dae23c81a0e929e58a4114e0 files/util-linux-2.11z-01-nfsv4.dif 13442
+MD5 482305a63e330c809dc808af25ecfe33 files/util-linux-2.12i-pic.patch 2522
+MD5 5a1bf3d383850b6c8ca05cc4fe76c813 files/digest-util-linux-2.12-r5 154
 MD5 a9bc06c292401d6f2d27e8e4ebf7e6ae files/util-linux-2.12i-fat-LABEL-support.patch 2304
 MD5 33ddd96078cf91030b80f73eb70f5371 files/util-linux-2.12i-swapon-check-symlinks.patch 875
-MD5 73c0cb6f9aa5fa84e701fc68d0478aac files/util-linux-2.12i-nfsv4.patch 12854
+MD5 cfa3960fd97ca16c85b0d1b87e6ba226 files/digest-util-linux-2.12i-r1 156
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.9.14 (GNU/Linux)
 
-iD8DBQFB4enyroRuSHgZdywRAszwAJsFzgqU4YrVUIYgDEa1dIPtQV0qDgCdGcdl
-zxib1pR4D2phIX2ByCfmQTA=
-=i53+
+iD8DBQFB4e8ProRuSHgZdywRAjJcAJ46FqqHgNqMiqKjirgJJOLOCPkB1ACfYa8i
+pOSn2omBLrO3Prd04rqhZwg=
+=5xE5
 -----END PGP SIGNATURE-----
diff --git a/sys-apps/util-linux/files/util-linux-2.11z-01-nfsv4-crypt.dif b/sys-apps/util-linux/files/util-linux-2.11z-01-nfsv4-crypt.dif
deleted file mode 100644 (file)
index dcd924d..0000000
+++ /dev/null
@@ -1,475 +0,0 @@
-
-Add support for nfsv4 to mount
-
-
- mount/Makefile     |    4 
- mount/mount.c      |   13 ++
- mount/nfs4_mount.h |   82 +++++++++++++
- mount/nfs4mount.c  |  323 +++++++++++++++++++++++++++++++++++++++++++++++++++++
- mount/sundries.h   |    2 
- 5 files changed, 422 insertions(+), 2 deletions(-)
-
-diff -puN mount/Makefile~nfsv4 mount/Makefile
---- util-linux-2.11z/mount/Makefile~nfsv4      2003-04-23 16:40:57.000000000 -0400
-+++ util-linux-2.11z-bfields/mount/Makefile    2003-04-23 16:40:57.000000000 -0400
-@@ -25,8 +25,8 @@ PROGS = $(SUID_PROGS) $(NOSUID_PROGS)
- MAYBE = pivot_root swapoff
- 
- LO_OBJS = lomount.o $(LIB)/xstrncpy.o sha512.o rmd160.o
--NFS_OBJS = nfsmount.o nfsmount_xdr.o nfsmount_clnt.o
--GEN_FILES = nfsmount.h nfsmount_xdr.c nfsmount_clnt.c
-+NFS_OBJS = nfsmount.o nfsmount_xdr.o nfsmount_clnt.o nfs4mount.o
-+GEN_FILES = nfsmount.h nfsmount_xdr.c nfsmount_clnt.c nfs4mount.c
- 
- all: $(PROGS)
- 
-diff -puN mount/mount.c~nfsv4 mount/mount.c
---- util-linux-2.11z/mount/mount.c~nfsv4       2003-04-23 16:40:57.000000000 -0400
-+++ util-linux-2.11z-bfields/mount/mount.c     2003-04-23 16:40:57.000000000 -0400
-@@ -803,6 +803,19 @@ retry_nfs:
-                     "without support for the type `nfs'"));
- #endif
-   }
-+#ifdef HAVE_NFS
-+  /*
-+   * NFSv4 support
-+   */
-+  if (!fake && types && streq (types, "nfs4")) {
-+    mnt_err = nfs4mount(spec, node, &flags, &extra_opts, &mount_opts, bg);
-+    if (mnt_err)
-+      return mnt_err;
-+#else
-+    die (EX_SOFTWARE, _("mount: this version was compiled "
-+                    "without support for the type `nfs4'"));
-+#endif
-+  }
- 
-   block_signals (SIG_BLOCK);
- 
-diff -puN /dev/null mount/nfs4_mount.h
---- /dev/null  2003-01-08 17:56:04.000000000 -0500
-+++ util-linux-2.11z-bfields/mount/nfs4_mount.h        2003-04-23 16:40:57.000000000 -0400
-@@ -0,0 +1,82 @@
-+#ifndef _LINUX_NFS4_MOUNT_H
-+#define _LINUX_NFS4_MOUNT_H
-+
-+/*
-+ *  linux/include/linux/nfs4_mount.h
-+ *
-+ *  Copyright (C) 2002  Trond Myklebust
-+ *
-+ *  structure passed from user-space to kernel-space during an nfsv4 mount
-+ */
-+
-+/*
-+ * WARNING!  Do not delete or change the order of these fields.  If
-+ * a new field is required then add it to the end.  The version field
-+ * tracks which fields are present.  This will ensure some measure of
-+ * mount-to-kernel version compatibility.  Some of these aren't used yet
-+ * but here they are anyway.
-+ */
-+#define NFS4_MOUNT_VERSION    1
-+
-+struct nfs_string {
-+      unsigned int len;
-+      const char* data;
-+};
-+
-+struct nfs4_mount_data {
-+      int version;                            /* 1 */
-+      int flags;                              /* 1 */
-+      int rsize;                              /* 1 */
-+      int wsize;                              /* 1 */
-+      int timeo;                              /* 1 */
-+      int retrans;                            /* 1 */
-+      int acregmin;                           /* 1 */
-+      int acregmax;                           /* 1 */
-+      int acdirmin;                           /* 1 */
-+      int acdirmax;                           /* 1 */
-+
-+      /* see the definition of 'struct clientaddr4' in RFC3010 */
-+      struct nfs_string client_addr;          /* 1 */
-+
-+      /* Mount path */
-+      struct nfs_string mnt_path;             /* 1 */
-+
-+      /* Server details */
-+      struct nfs_string hostname;             /* 1 */
-+      /* Server IP address */
-+      unsigned int host_addrlen;              /* 1 */
-+      struct sockaddr* host_addr;             /* 1 */
-+
-+      /* Transport protocol to use */
-+      int proto;                              /* 1 */
-+
-+      /* Pseudo-flavours to use for authentication. See RFC2623 */
-+      int auth_flavourlen;                    /* 1 */
-+      int *auth_flavours;                     /* 1 */
-+};
-+
-+/* bits in the flags field */
-+/* Note: the fields that correspond to existing NFSv2/v3 mount options
-+ *     should mirror the values from include/linux/nfs_mount.h
-+ */
-+
-+#define NFS4_MOUNT_SOFT               0x0001  /* 1 */
-+#define NFS4_MOUNT_INTR               0x0002  /* 1 */
-+#define NFS4_MOUNT_NOCTO      0x0010  /* 1 */
-+#define NFS4_MOUNT_NOAC               0x0020  /* 1 */
-+#define NFS4_MOUNT_STRICTLOCK 0x1000  /* 1 */
-+#define NFS4_MOUNT_FLAGMASK   0xFFFF
-+
-+/* pseudoflavors: */
-+
-+#define RPC_AUTH_GSS_KRB5       390003
-+#define RPC_AUTH_GSS_KRB5I      390004
-+#define RPC_AUTH_GSS_KRB5P      390005
-+#define RPC_AUTH_GSS_LKEY       390006
-+#define RPC_AUTH_GSS_LKEYI      390007
-+#define RPC_AUTH_GSS_LKEYP      390008
-+#define RPC_AUTH_GSS_SPKM       390009
-+#define RPC_AUTH_GSS_SPKMI      390010
-+#define RPC_AUTH_GSS_SPKMP      390011
-+
-+#endif
-diff -puN /dev/null mount/nfs4mount.c
---- /dev/null  2003-01-08 17:56:04.000000000 -0500
-+++ util-linux-2.11z-bfields/mount/nfs4mount.c 2003-04-23 17:28:54.000000000 -0400
-@@ -0,0 +1,323 @@
-+/*
-+ * nfs4mount.c -- Linux NFS mount
-+ * Copyright (C) 2002 Trond Myklebust <trond.myklebust@fys.uio.no>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2, or (at your option)
-+ * any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * Note: this file based on the original nfsmount.c
-+ */
-+
-+#include "../defines.h"       /* for HAVE_rpcsvc_nfs_prot_h and HAVE_inet_aton */
-+
-+#include <linux/posix_types.h>
-+#include <asm/posix_types.h>
-+#undef __FD_CLR
-+#undef __FD_SET
-+#undef __FD_ISSET
-+#undef __FD_ZERO
-+
-+#include <unistd.h>
-+#include <stdio.h>
-+#include <string.h>
-+#include <errno.h>
-+#include <netdb.h>
-+#include <time.h>
-+#include <sys/socket.h>
-+#include <sys/time.h>
-+#include <sys/utsname.h>
-+#include <sys/stat.h>
-+#include <netinet/in.h>
-+#include <arpa/inet.h>
-+
-+#include "sundries.h"
-+
-+#include "mount_constants.h"
-+#include "nfs4_mount.h"
-+
-+#include "nls.h"
-+
-+#ifndef NFS_PORT
-+#define NFS_PORT 2049
-+#endif
-+
-+static int parse_devname(char *hostdir, char **hostname, char **dirname)
-+{
-+      char *s;
-+
-+      if (!(s = strchr(hostdir, ':'))) {
-+              fprintf(stderr,
-+                      _("mount: "
-+                        "directory to mount not in host:dir format\n"));
-+              return -1;
-+      }
-+      *hostname = hostdir;
-+      *dirname = s + 1;
-+      *s = '\0';
-+      /* Ignore all but first hostname in replicated mounts
-+         until they can be fully supported. (mack@sgi.com) */
-+      if ((s = strchr(hostdir, ','))) {
-+              *s = '\0';
-+              fprintf(stderr,
-+                      _("mount: warning: "
-+                        "multiple hostnames not supported\n"));
-+      }
-+      return 0;
-+}
-+
-+static int fill_ipv4_sockaddr(const char *hostname, struct sockaddr_in *addr)
-+{
-+      struct hostent *hp;
-+      addr->sin_family = AF_INET;
-+
-+      if (inet_aton(hostname, &addr->sin_addr))
-+              return 0;
-+      if ((hp = gethostbyname(hostname)) == NULL) {
-+              fprintf(stderr, _("mount: can't get address for %s\n"),
-+                      hostname);
-+              return -1;
-+      }
-+      if (hp->h_length > sizeof(struct in_addr)) {
-+              fprintf(stderr,
-+                      _("mount: got bad hp->h_length\n"));
-+              hp->h_length = sizeof(struct in_addr);
-+      }
-+      memcpy(&addr->sin_addr, hp->h_addr, hp->h_length);
-+      return 0;
-+}
-+
-+static int get_my_ipv4addr(char *ip_addr, int len)
-+{
-+      char myname[1024];
-+      struct sockaddr_in myaddr;
-+
-+      if (gethostname(myname, sizeof(myname))) {
-+              fprintf(stderr, _("mount: can't determine client address\n"));
-+              return -1;
-+      }
-+      if (fill_ipv4_sockaddr(myname, &myaddr))
-+              return -1;
-+      snprintf(ip_addr, len, "%s", inet_ntoa(myaddr.sin_addr));
-+      ip_addr[len-1] = '\0';
-+      return 0;
-+}
-+
-+int nfs4mount(const char *spec, const char *node, int *flags,
-+            char **extra_opts, char **mount_opts,
-+            int running_bg)
-+{
-+      static struct nfs4_mount_data data;
-+      static char hostdir[1024];
-+      static char ip_addr[16] = "127.0.0.1";
-+      static struct sockaddr_in server_addr;
-+      static int pseudoflavour = 0;
-+
-+      char *hostname, *dirname, *old_opts;
-+      char new_opts[1024];
-+      char *opt, *opteq;
-+      char *s;
-+      int val;
-+      int port, bg, soft, intr;
-+      int nocto, noac;
-+      int retry;
-+      int retval;
-+
-+      retval = EX_FAIL;
-+      if (strlen(spec) >= sizeof(hostdir)) {
-+              fprintf(stderr, _("mount: "
-+                                "excessively long host:dir argument\n"));
-+              goto fail;
-+      }
-+      strcpy(hostdir, spec);
-+      if (parse_devname(hostdir, &hostname, &dirname))
-+              goto fail;
-+
-+      if (fill_ipv4_sockaddr(hostname, &server_addr))
-+              goto fail;
-+      if (get_my_ipv4addr(ip_addr, sizeof(ip_addr)))
-+              goto fail;
-+
-+      /* add IP address to mtab options for use when unmounting */
-+      s = inet_ntoa(server_addr.sin_addr);
-+      old_opts = *extra_opts;
-+      if (!old_opts)
-+              old_opts = "";
-+      if (strlen(old_opts) + strlen(s) + 10 >= sizeof(new_opts)) {
-+              fprintf(stderr, _("mount: "
-+                                "excessively long option argument\n"));
-+              goto fail;
-+      }
-+      snprintf(new_opts, sizeof(new_opts), "%s%saddr=%s",
-+               old_opts, *old_opts ? "," : "", s);
-+      *extra_opts = xstrdup(new_opts);
-+
-+      /* Set default options.
-+       * rsize/wsize and timeo are left 0 in order to
-+       * let the kernel decide.
-+       */
-+      memset(&data, 0, sizeof(data));
-+      data.retrans    = 3;
-+      data.acregmin   = 3;
-+      data.acregmax   = 60;
-+      data.acdirmin   = 30;
-+      data.acdirmax   = 60;
-+      data.proto      = IPPROTO_TCP;
-+
-+      bg = 0;
-+      soft = 0;
-+      intr = 0;
-+      nocto = 0;
-+      noac = 0;
-+      retry = 10000;          /* 10000 minutes ~ 1 week */
-+
-+      /*
-+       * NFSv4 specifies that the default port should be 2049
-+       */
-+      port = NFS_PORT;
-+
-+      /* parse options */
-+
-+      for (opt = strtok(old_opts, ","); opt; opt = strtok(NULL, ",")) {
-+              if ((opteq = strchr(opt, '='))) {
-+                      val = atoi(opteq + 1);  
-+                      *opteq = '\0';
-+                      if (!strcmp(opt, "rsize"))
-+                              data.rsize = val;
-+                      else if (!strcmp(opt, "wsize"))
-+                              data.wsize = val;
-+                      else if (!strcmp(opt, "timeo"))
-+                              data.timeo = val;
-+                      else if (!strcmp(opt, "retrans"))
-+                              data.retrans = val;
-+                      else if (!strcmp(opt, "acregmin"))
-+                              data.acregmin = val;
-+                      else if (!strcmp(opt, "acregmax"))
-+                              data.acregmax = val;
-+                      else if (!strcmp(opt, "acdirmin"))
-+                              data.acdirmin = val;
-+                      else if (!strcmp(opt, "acdirmax"))
-+                              data.acdirmax = val;
-+                      else if (!strcmp(opt, "actimeo")) {
-+                              data.acregmin = val;
-+                              data.acregmax = val;
-+                              data.acdirmin = val;
-+                              data.acdirmax = val;
-+                      }
-+                      else if (!strcmp(opt, "retry"))
-+                              retry = val;
-+                      else if (!strcmp(opt, "port"))
-+                              port = val;
-+                      else if (!strcmp(opt, "proto")) {
-+                              if (!strncmp(opteq+1, "tcp", 3))
-+                                      data.proto = IPPROTO_TCP;
-+                              else if (!strncmp(opteq+1, "udp", 3))
-+                                      data.proto = IPPROTO_UDP;
-+                              else
-+                                      printf(_("Warning: Unrecognized proto= option.\n"));
-+                      } else if (!strcmp(opt, "clientaddr")) {
-+                              if (strlen(opteq+1) >= sizeof(ip_addr))
-+                                      printf(_("Invalid client address %s"),
-+                                                              opteq+1);
-+                              strncpy(ip_addr,opteq+1, sizeof(ip_addr));
-+                              ip_addr[sizeof(ip_addr)-1] = '\0';
-+                      } else if (!strcmp(opt, "sec")) {
-+                              if (!strncmp(opteq+1, "krb5i",5))
-+                                      pseudoflavour = 390004;
-+                              else if (!strncmp(opteq+1, "krb5p",5))
-+                                      pseudoflavour = 390005;
-+                              else if (!strncmp(opteq+1, "krb5",4))
-+                                      pseudoflavour = 390003;
-+                              else {
-+                                      printf(_("unknown security type %s\n"),
-+                                                      opteq+1);
-+                                      goto fail;
-+                              }
-+                      } else if (!strcmp(opt, "addr")) {
-+                              /* ignore */;
-+                      } else {
-+                              printf(_("unknown nfs mount parameter: "
-+                                       "%s=%d\n"), opt, val);
-+                              goto fail;
-+                      }
-+              } else {
-+                      val = 1;
-+                      if (!strncmp(opt, "no", 2)) {
-+                              val = 0;
-+                              opt += 2;
-+                      }
-+                      if (!strcmp(opt, "bg")) 
-+                              bg = val;
-+                      else if (!strcmp(opt, "fg")) 
-+                              bg = !val;
-+                      else if (!strcmp(opt, "soft"))
-+                              soft = val;
-+                      else if (!strcmp(opt, "hard"))
-+                              soft = !val;
-+                      else if (!strcmp(opt, "intr"))
-+                              intr = val;
-+                      else if (!strcmp(opt, "cto"))
-+                              nocto = !val;
-+                      else if (!strcmp(opt, "ac"))
-+                              noac = !val;
-+                      else {
-+                              if (!sloppy) {
-+                                      printf(_("unknown nfs mount option: "
-+                                               "%s%s\n"), val ? "" : "no", opt);
-+                                      goto fail;
-+                              }
-+                      }
-+              }
-+      }
-+
-+      data.flags = (soft ? NFS4_MOUNT_SOFT : 0)
-+              | (intr ? NFS4_MOUNT_INTR : 0)
-+              | (nocto ? NFS4_MOUNT_NOCTO : 0)
-+              | (noac ? NFS4_MOUNT_NOAC : 0);
-+
-+      if (pseudoflavour != 0) {
-+              data.auth_flavourlen = 1;
-+              data.auth_flavours = &pseudoflavour;
-+      }
-+
-+      data.client_addr.data = ip_addr;
-+      data.client_addr.len = strlen(ip_addr);
-+
-+      data.mnt_path.data = dirname;
-+      data.mnt_path.len = strlen(dirname);
-+
-+      data.hostname.data = hostname;
-+      data.hostname.len = strlen(hostname);
-+      data.host_addr = (struct sockaddr *)&server_addr;
-+      data.host_addrlen = sizeof(server_addr);
-+
-+#ifdef NFS_MOUNT_DEBUG
-+      printf("rsize = %d, wsize = %d, timeo = %d, retrans = %d\n",
-+             data.rsize, data.wsize, data.timeo, data.retrans);
-+      printf("acreg (min, max) = (%d, %d), acdir (min, max) = (%d, %d)\n",
-+             data.acregmin, data.acregmax, data.acdirmin, data.acdirmax);
-+      printf("port = %d, bg = %d, retry = %d, flags = %.8x\n",
-+             port, bg, retry, data.flags);
-+      printf("soft = %d, intr = %d, nocto = %d, noac = %d\n",
-+             (data.flags & NFS4_MOUNT_SOFT) != 0,
-+             (data.flags & NFS4_MOUNT_INTR) != 0,
-+             (data.flags & NFS4_MOUNT_NOCTO) != 0,
-+             (data.flags & NFS4_MOUNT_NOAC) != 0);
-+      printf("proto = %s\n", (data.proto == IPPROTO_TCP) ? "tcp" : "udp");
-+#endif
-+
-+      data.version = NFS4_MOUNT_VERSION;
-+
-+      *mount_opts = (char *) &data;
-+      /* clean up */
-+      return 0;
-+
-+fail:
-+      return retval;
-+}
-diff -puN mount/sundries.h~nfsv4 mount/sundries.h
---- util-linux-2.11z/mount/sundries.h~nfsv4    2003-04-23 16:40:57.000000000 -0400
-+++ util-linux-2.11z-bfields/mount/sundries.h  2003-04-23 16:40:57.000000000 -0400
-@@ -37,6 +37,8 @@ void die (int errcode, const char *fmt, 
- #ifdef HAVE_NFS
- int nfsmount (const char *spec, const char *node, int *flags,
-             char **orig_opts, char **opt_args, int *version, int running_bg);
-+int nfs4mount (const char *spec, const char *node, int *flags,
-+             char **orig_opts, char **opt_args, int running_bg);
- #endif
- 
- /* exit status - bits below are ORed */
-
-_
diff --git a/sys-apps/util-linux/files/util-linux-2.11z-mips-fdisk-fix.patch b/sys-apps/util-linux/files/util-linux-2.11z-mips-fdisk-fix.patch
deleted file mode 100644 (file)
index d0279da..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
---- ../../util-linux-2.11z/fdisk/fdisk.c       Sat Nov 23 17:05:24 2002
-+++ ./fdisk.c  Thu Apr 10 01:26:39 2003
-@@ -1335,7 +1337,15 @@
-       int i, sys, origsys;
-       struct partition *p;
- 
--      i = get_existing_partition(0, partitions);
-+      /* If sgi_label then don't use get_existing_partition,
-+         let the user select a partition, since get_existing_partition()
-+         only works for Linux like partition tables. */
-+      if (!sgi_label) { 
-+              i = get_existing_partition(0, partitions);
-+      } else {
-+              i = get_partition(0, partitions);
-+      }
-+
-       if (i == -1)
-               return;
-       p = ptes[i].part_table;
-@@ -1866,7 +1876,7 @@
-       fill_bounds(first, last);
-       if (n < 4) {
-               start = sector_offset;
--              if (display_in_cyl_units)
-+              if (display_in_cyl_units || !total_number_of_sectors)
-                       limit = heads * sectors * cylinders - 1;
-               else
-                       limit = total_number_of_sectors - 1;
-@@ -1946,7 +1956,7 @@
-                        _("Last %s or +size or +sizeM or +sizeK"),
-                        str_units(SINGULAR));
-               stop = read_int(cround(start), cround(limit), cround(limit),
--                              cround(start), mesg);
-+                              cround(start)-1, mesg);
-               if (display_in_cyl_units) {
-                       stop = stop * units_per_sector - 1;
-                       if (stop >limit)
-@@ -2575,7 +2585,15 @@
-                               unknown_command(c);
-                       break;
-               case 'd':
--                      j = get_existing_partition(1, partitions);
-+                      /* If sgi_label then don't use get_existing_partition,
-+                         let the user select a partition, since
-+                         get_existing_partition() only works for Linux-like
-+                         partition tables */
-+                      if (!sgi_label) {
-+                              j = get_existing_partition(1, partitions);
-+                      } else {
-+                              j = get_partition(1, partitions);
-+                      }
-                       if (j >= 0)
-                               delete_partition(j);
-                       break;
diff --git a/sys-apps/util-linux/files/util-linux-2.11z-script.patch b/sys-apps/util-linux/files/util-linux-2.11z-script.patch
deleted file mode 100644 (file)
index c92ec18..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
---- util-linux-2.11z/misc-utils/script.1       2002-01-12 11:45:00.000000000 -0800
-+++ ./misc-utils/script.1      2003-05-12 16:40:34.000000000 -0700
-@@ -40,6 +40,7 @@
- .Sh SYNOPSIS
- .Nm script
- .Op Fl a
-+.Op Fl c Ar COMMAND
- .Op Fl f
- .Op Fl q
- .Op Fl t
-@@ -69,6 +70,10 @@
- or
- .Pa typescript ,
- retaining the prior contents.
-+.It Fl c Ar COMMAND
-+Run the COMMAND rather than an interactive shell.
-+This makes it easy for a script to capture the output of a program that
-+behaves differently when its stdout is not a tty.
- .It Fl f
- Flush output after each write. This is nice for telecooperation:
- One person does `mkfifo foo; script -f foo' and another can
---- util-linux-2.11z/misc-utils/script.c       2002-11-26 08:18:00.000000000 -0800
-+++ ./misc-utils/script.c      2003-05-12 16:33:27.000000000 -0700
-@@ -91,6 +91,7 @@
- char  line[] = "/dev/ptyXX";
- #endif
- int   aflg = 0;
-+char  *cflg;
- int   fflg = 0;
- int   qflg = 0;
- int   tflg = 0;
-@@ -135,11 +136,14 @@
-               }
-       }
- 
--      while ((ch = getopt(argc, argv, "afqt")) != -1)
-+      while ((ch = getopt(argc, argv, "ac:fqt")) != -1)
-               switch((char)ch) {
-               case 'a':
-                       aflg++;
-                       break;
-+              case 'c':
-+                      cflg = optarg;
-+                      break;
-               case 'f':
-                       fflg++;
-                       break;
-@@ -284,6 +288,7 @@
- 
- void
- doshell() {
-+      char *opt = cflg? "-c" : "-i";
-       /***
-       int t;
- 
-@@ -301,9 +306,9 @@
-       (void) dup2(slave, 2);
-       (void) close(slave);
- #ifdef __linux__
--      execl(shell, strrchr(shell, '/') + 1, "-i", 0);
-+      execl(shell, strrchr(shell, '/') + 1, opt, cflg, 0);
- #else
--      execl(shell, "sh", "-i", 0);
-+      execl(shell, "sh", opt, cflg, 0);
- #endif
-       perror(shell);
-       fail();
diff --git a/sys-apps/util-linux/files/util-linux-2.12b-fat-LABEL-support.patch b/sys-apps/util-linux/files/util-linux-2.12b-fat-LABEL-support.patch
deleted file mode 100644 (file)
index d748c35..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-diff -uNr util-linux-2.12/mount/get_label_uuid.c ../patch/util-linux-2.12/mount/get_label_uuid.c
---- util-linux-2.12/mount/get_label_uuid.c     2002-11-26 12:18:01.000000000 +0100
-+++ ../patch/util-linux-2.12/mount/get_label_uuid.c    2003-10-20 18:27:56.000000000 +0200
-@@ -43,10 +43,142 @@
- #endif
- }
- 
--/*
-- * Get both label and uuid.
-- * For now, only ext2, ext3, xfs, ocfs, reiserfs are supported
-- */
-+/* Remove trailing spaces */
-+static void remtrailspc(char *label) {
-+    char *c;
-+
-+    c = strchr(label, 0)-1;
-+    while (c >= label && *c == ' ')
-+        *(c--) = 0;
-+}
-+
-+static int handle_fat_dirent(struct fat_dirent *dirent, char **label) {
-+    size_t namesize;
-+    
-+    /* end-of-directory marker */
-+    if (!dirent->s_filename[0])
-+        return -1;
-+
-+    /* valid volume label */
-+    if ((dirent->s_attr == 0x08 || dirent->s_attr == 0x28) && dirent->s_filename[0] != 0xe5) {
-+        
-+        /* sanity check */
-+        if (dirent->s_size[0] || dirent->s_size[1] || dirent->s_size[2] || dirent->s_size[3] ||
-+            dirent->s_cluster[0] || dirent->s_cluster[1])
-+            return -1;
-+            
-+        namesize = sizeof(dirent->s_filename);
-+        if (!(*label = calloc(namesize + 1, 1)))
-+            return -1;
-+        memcpy(*label, dirent->s_filename, namesize);
-+        (*label)[namesize] = 0;
-+        remtrailspc(*label);
-+        
-+        return 0;
-+    }
-+
-+    return 1;
-+}
-+
-+static int read_volume_label_fat(int fd, struct fat_super_block *fatsb, char **label) {
-+    unsigned i, m;
-+    off_t o;
-+
-+    m = assemble2le(fatsb->s_dirents);   /* root directory entries */  
-+
-+    o = (off_t) assemble2le(fatsb->s_ssec) *     /* bytes per sector */
-+        ((off_t) assemble2le(fatsb->s_rsecs) +   /* reserved sectors */
-+         (off_t) assemble2le(fatsb->s_spfat) *   /* sectors per fat */
-+         (off_t) fatsb->s_nfats);                /* number of fats */ 
-+    
-+    for (i = 0; i < m; i++) {
-+        struct fat_dirent dirent;
-+        int rv;
-+
-+        if (lseek(fd, o, SEEK_SET) != o ||
-+            read(fd, &dirent, sizeof(dirent)) != sizeof(dirent))
-+            return -1;
-+
-+        if ((rv = handle_fat_dirent(&dirent, label)) != 1)
-+            return rv;
-+        
-+        o += sizeof(dirent);
-+    }
-+    
-+    return -1;
-+}
-+
-+static int read_volume_label_fat32(int fd, struct fat32_super_block *fat32sb, char **label) {
-+    unsigned c;
-+    off_t fo, b, o;
-+    int i, ifat;
-+    size_t m, cs;
-+    
-+    ifat = fat32sb->s_mirror[0] & 128 ? (fat32sb->s_mirror[0] & 0xF) : 0;
-+
-+    if (ifat >= fat32sb->s_nfats)
-+        return -1;
-+    
-+    fo = (off_t) assemble2le(fat32sb->s_ssec) *    /* bytes per sector */
-+        ((off_t) assemble2le(fat32sb->s_rsecs) +   /* reserved sectors */
-+         (off_t) assemble4le(fat32sb->s_spfat) *   /* sectors per fat */
-+         (off_t) ifat);                            /* number of FAT used */
-+
-+    b = (off_t) assemble2le(fat32sb->s_ssec) *     /* bytes per sector */
-+        ((off_t) assemble2le(fat32sb->s_rsecs) +   /* reserved sectors */
-+         (off_t) assemble4le(fat32sb->s_spfat) *   /* sectors per fat */
-+         (off_t) fat32sb->s_nfats);                /* number of FATs */
-+
-+    c = assemble4le(fat32sb->s_rcluster) & 0x0fffffffL;
-+    if (c < 2 || c >= 0x0ffffff0)
-+        return -1;
-+
-+    m = cs = assemble2le(fat32sb->s_ssec) * (size_t) fat32sb->s_scluster;
-+    o = b + (off_t) cs*(c-2);
-+
-+    for (i = 0; i < 0xFFFF; i++) { /* safety against DoS attack */
-+        struct fat_dirent dirent;
-+        int rv;
-+
-+        if (lseek(fd, o, SEEK_SET) != o ||
-+            read(fd, &dirent, sizeof(dirent)) != sizeof(dirent))
-+            return -1;
-+
-+        if ((rv = handle_fat_dirent(&dirent, label)) != 1)
-+            return rv;
-+        
-+        if (m > sizeof(dirent)) {
-+            m -= sizeof(dirent);
-+            o += sizeof(dirent);
-+        } else {
-+            off_t d;
-+
-+            /* next cluster */
-+            
-+            d = fo+4*c;
-+            if (lseek(fd, d, SEEK_SET) != d ||
-+                read(fd, &c, 4) != 4)
-+                return -1;
-+
-+            c = assemble4le((char*) &c) & 0x0fffffffL;
-+            if (c < 2 || c >= 0x0ffffff0) {
-+                return -1;
-+            }
-+
-+            m = cs;
-+            o = b + cs*(c-2);
-+        }
-+    }
-+    
-+    
-+    return -1;
-+}
-+
-+
-+/*
-+ * Get both label and uuid.
-+ * For now, only ext2, ext3, xfs, ocfs, reiserfs are supported
-+ */
- int
- get_label_uuid(const char *device, char **label, char *uuid) {
-       int fd;
-@@ -54,8 +186,10 @@
-       struct ocfs_volume_header ovh;  /* Oracle */
-       struct ocfs_volume_label olbl;
-       struct reiserfs_super_block reiserfssb;
-+        struct fat_super_block fatsb;
-+        struct fat32_super_block fat32sb;
- 
--      fd = open(device, O_RDONLY);
-+        fd = open(device, O_RDONLY);
-       if (fd < 0)
-               return rv;
- 
-@@ -111,7 +245,87 @@
-                           memcpy(*label, jfssb.s_label, namesize);
-               }
-               rv = 0;
--      }
-+        } else if (lseek(fd, 0, SEEK_SET) == 0
-+                   && read(fd, (char*) &fat32sb, sizeof(fat32sb)) == sizeof(fat32sb)
-+                   && fat32sb.s_sig[0] == 0x55
-+                   && fat32sb.s_sig[1] == 0xAA
-+                   && (fat32sb.s_media & 0xF0) == 0xF0
-+                   && (fat32sb.s_spfat_old[0] == 0)
-+                   && (fat32sb.s_spfat_old[1] == 0)
-+                   && fat32sb.s_extsig == 0x29
-+                   && (memcmp(fat32sb.s_fs, "FAT32   ", 8) == 0)) {
-+
-+            *label = NULL;
-+
-+            /* If no root directory entry volume name was found use the one from the boot sector */
-+            if (read_volume_label_fat32(fd, &fat32sb, label) != 0) {
-+                if (memcmp(fat32sb.s_label, "NO NAME    ", 11) != 0 &&
-+                    memcmp(fat32sb.s_label, "           ", 11) != 0 &&
-+                    memcmp(fat32sb.s_label, "\0\0\0\0\0\0\0\0", 8) != 0) {
-+                    
-+                    namesize = sizeof(fat32sb.s_label);
-+                    if ((*label = calloc(namesize + 1, 1)) != NULL) {
-+                        memcpy(*label, fat32sb.s_label, namesize);
-+                        (*label)[namesize] = 0;
-+                        remtrailspc(*label);
-+                    }
-+                }
-+            }
-+
-+            if (*label) {
-+                
-+                /* Set UUID from serial */
-+                uuid[0] = fat32sb.s_serial[3];
-+                uuid[1] = fat32sb.s_serial[2];
-+                uuid[2] = fat32sb.s_serial[1];
-+                uuid[3] = fat32sb.s_serial[0];
-+                memset(uuid+4, 0, 12);
-+                
-+                rv = 0;
-+            }
-+      } else if (lseek(fd, 0, SEEK_SET) == 0
-+                   && read(fd, (char*) &fatsb, sizeof(fatsb)) == sizeof(fatsb)
-+                   && fatsb.s_sig[0] == 0x55
-+                   && fatsb.s_sig[1] == 0xAA
-+                   && (fatsb.s_media & 0xF0) == 0xF0
-+                   && fatsb.s_extsig == 0x29
-+                   && (memcmp(fatsb.s_fs, "FAT12   ", 8) == 0
-+                       || memcmp(fatsb.s_fs, "FAT16   ", 8) == 0
-+                       || memcmp(fatsb.s_fs, "FAT     ", 8) == 0
-+                       || memcmp(fatsb.s_fs, "\0\0\0\0\0\0\0\0", 8) == 0)
-+                   && memcmp(fatsb.s_fs2, "FAT32   ", 8) != 0) {
-+
-+            *label = NULL;
-+            
-+            if (read_volume_label_fat(fd, &fatsb, label) != 0) {
-+
-+                /* If no root directory entry volume name was found use the one from the boot sector */
-+                if (memcmp(fatsb.s_label, "NO NAME    ", 11) != 0 &&
-+                    memcmp(fatsb.s_label, "           ", 11) != 0 &&
-+                    memcmp(fatsb.s_label, "\0\0\0\0\0\0\0\0", 8) != 0) {
-+                    
-+                    namesize = sizeof(fatsb.s_label);
-+                    if ((*label = calloc(namesize + 1, 1)) != NULL) {
-+                        memcpy(*label, fatsb.s_label, namesize);
-+                        (*label)[namesize] = 0;
-+                        remtrailspc(*label);
-+                    }
-+
-+                }
-+            }
-+
-+            if (*label) {
-+
-+                /* Set UUID from serial */
-+                uuid[0] = fatsb.s_serial[3];
-+                uuid[1] = fatsb.s_serial[2];
-+                uuid[2] = fatsb.s_serial[1];
-+                uuid[3] = fatsb.s_serial[0];
-+                memset(uuid+4, 0, 12);
-+                
-+                rv = 0;
-+            }
-+        }
- 
-       close(fd);
-       return rv;
-diff -uNr util-linux-2.12/mount/linux_fs.h ../patch/util-linux-2.12/mount/linux_fs.h
---- util-linux-2.12/mount/linux_fs.h   2003-07-05 22:16:32.000000000 +0200
-+++ ../patch/util-linux-2.12/mount/linux_fs.h  2003-10-20 18:07:06.000000000 +0200
-@@ -122,13 +122,65 @@
-     u_char    s_dummy[3];
-     u_char    s_os[8];                /* "MSDOS5.0" or "MSWIN4.0" or "MSWIN4.1" */
-                               /* mtools-3.9.4 writes "MTOOL394" */
--    u_char    s_dummy2[32];
-+    u_char    s_ssec[2];        /* bytes per sector */
-+    u_char    s_scluster;       /* sectors per cluster */
-+    u_char    s_rsecs[2];       /* reserved sectors */
-+    u_char    s_nfats;          /* number of FATs */
-+    u_char    s_dirents[2];     /* maximum root directory entries */
-+    u_char    s_nsecs[2];       /* total number of sectors */
-+    u_char    s_media;          /* media type, upper nibble is 0xF */
-+    u_char    s_spfat[2];       /* sectors per fat */
-+
-+    u_char    s_dummy2[14];
-+    u_char    s_extsig;         /* extended signature */
-+    u_char    s_serial[4];      /* serial number */
-     u_char    s_label[11];    /* for DOS? */
--    u_char    s_fs[8];                /* "FAT12   " or "FAT16   " or all zero   */
-+    u_char    s_fs[8];                /* "FAT12   " or "FAT16   " or all zero   */
-                                 /* OS/2 BM has "FAT     " here. */
--    u_char    s_dummy3[9];
--    u_char    s_label2[11];   /* for Windows? */
--    u_char    s_fs2[8];               /* garbage or "FAT32   " */
-+
-+    u_char    s_dummy3[20];
-+    u_char    s_fs2[8];         /* "FAT32   " */
-+
-+    u_char    s_dummy4[420];
-+    u_char    s_sig[2];         /* 55 AA */
-+};
-+
-+struct fat32_super_block {
-+    u_char    s_dummy[3];
-+    u_char    s_os[8];                /* "MSDOS5.0" or "MSWIN4.0" or "MSWIN4.1" */
-+                              /* mtools-3.9.4 writes "MTOOL394" */
-+
-+    u_char    s_ssec[2];        /* bytes per sector */
-+    u_char    s_scluster;       /* sectors per cluster */
-+    u_char    s_rsecs[2];       /* reserved sectors */
-+    u_char    s_nfats;          /* number of FATs */
-+    u_char    s_dirents[2];     /* maximum root directory entries */
-+    u_char    s_nsecs[2];       /* total number of sectors */
-+    u_char    s_media;          /* media type, upper nibble is 0xF */
-+    u_char    s_spfat_old[2];   /* sectors per fat */
-+
-+    u_char    s_dummy2[12];
-+    u_char    s_spfat[4];       /* sectors per FAT */
-+    u_char    s_mirror[2];      /* mirror flag */
-+    u_char    s_version[2];     /* fs version */
-+    u_char    s_rcluster[4];    /* root directory cluster */
-+
-+    u_char    s_dummy3[18];
-+    u_char    s_extsig;         /* extended signature 0x29 */
-+    u_char    s_serial[4];      /* serial number */
-+    u_char    s_label[11];      /* label */
-+    u_char    s_fs[8];          /* filesystem type "FAT32   " */
-+
-+    u_char    s_dummy4[420];
-+    u_char    s_sig[2];         /* 55 AA */
-+};
-+
-+struct fat_dirent {
-+    u_char    s_filename[11];   /* Filename with extension */
-+    u_char    s_attr;           /* File attribute flags */
-+    u_char    s_dummy[14];   
-+    u_char    s_cluster[2];     /* Starting cluster */
-+    u_char    s_size[4];        /* File size */
- };
- 
- #define XFS_SUPER_MAGIC "XFSB"
diff --git a/sys-apps/util-linux/files/util-linux-2.12b-gcloop-with-crypt.patch b/sys-apps/util-linux/files/util-linux-2.12b-gcloop-with-crypt.patch
deleted file mode 100644 (file)
index fecefef..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-diff -ruN util-linux-2.12.orig/mount/lomount.c util-linux-2.12/mount/lomount.c
---- util-linux-2.12.orig/mount/lomount.c       2004-02-17 02:08:05.341716624 +0100
-+++ util-linux-2.12/mount/lomount.c    2004-02-17 02:12:10.653423576 +0100
-@@ -60,7 +60,8 @@
-         info->lo_flags = info64->lo_flags;
-         info->lo_init[0] = info64->lo_init[0];
-         info->lo_init[1] = info64->lo_init[1];
--        if (info->lo_encrypt_type == LO_CRYPT_CRYPTOAPI)
-+        if ((info->lo_encrypt_type == LO_CRYPT_CRYPTOAPI) ||
-+              (info->lo_encrypt_type == LO_CRYPT_COMPRESS))
-                 memcpy(info->lo_name, info64->lo_crypt_name, LO_NAME_SIZE);
-         else
-                 memcpy(info->lo_name, info64->lo_file_name, LO_NAME_SIZE);
-@@ -321,7 +322,8 @@
- 
- int
- set_loop(const char *device, const char *file, unsigned long long offset,
--       const char *encryption, int pfd, int *loopro) {
-+       const char *encnumber,const char *encryption,
-+       int pfd, int *loopro) {
-       struct loop_info64 loopinfo64;
-       int fd, ffd, mode;
-       char *pass;
-@@ -344,8 +346,9 @@
-       memset(&loopinfo64, 0, sizeof(loopinfo64));
- 
-       xstrncpy(loopinfo64.lo_file_name, file, LO_NAME_SIZE);
--
-+                      
-       if (encryption && *encryption) {
-+
-               if (digits_only(encryption)) {
-                       loopinfo64.lo_encrypt_type = atoi(encryption);
-               } else {
-@@ -386,6 +389,12 @@
-               }
-       }
- 
-+      if (encnumber && *encnumber) {
-+
-+              if (digits_only(encnumber))
-+                      loopinfo64.lo_encrypt_type = atoi(encnumber);
-+      }
-+
-       loopinfo64.lo_offset = offset;
- 
- #ifdef MCL_FUTURE  
-@@ -601,7 +610,7 @@
- 
- int
- main(int argc, char **argv) {
--      char *offset, *encryption, *passfd;
-+      char *offset, *encryption, *encnumber, *passfd;
-       int delete, c;
-       int res = 0;
-       int ro = 0;
-@@ -612,7 +621,7 @@
-       textdomain(PACKAGE);
- 
-       delete = off = 0;
--      offset = encryption = passfd = NULL;
-+      offset = encryption = encnumber = passfd = NULL;
-       progname = argv[0];
-       while ((c = getopt(argc,argv,"de:E:o:p:v")) != -1) {
-               switch (c) {
-@@ -620,6 +629,7 @@
-                       delete = 1;
-                       break;
-               case 'E':
-+                      encnumber = optarg;
-               case 'e':
-                       encryption = optarg;
-                       break;
-@@ -651,7 +661,7 @@
-               if (passfd && sscanf(passfd,"%d",&pfd) != 1)
-                       usage();
-               res = set_loop(argv[optind], argv[optind+1], off,
--                             encryption, pfd, &ro);
-+                              encnumber, encryption, pfd, &ro);
-       }
-       return res;
- }
-diff -ruN util-linux-2.12.orig/mount/lomount.h util-linux-2.12/mount/lomount.h
---- util-linux-2.12.orig/mount/lomount.h       2004-02-17 02:08:05.339716928 +0100
-+++ util-linux-2.12/mount/lomount.h    2004-02-17 02:08:14.921260312 +0100
-@@ -1,6 +1,6 @@
- extern int verbose;
- extern int set_loop(const char *, const char *, unsigned long long,
--                  const char *, int, int *);
-+                  const char *, const char *, int, int *);
- extern int del_loop(const char *);
- extern int is_loop_device(const char *);
- extern char * find_unused_loop_device(void);
-diff -ruN util-linux-2.12.orig/mount/loop.h util-linux-2.12/mount/loop.h
---- util-linux-2.12.orig/mount/loop.h  2004-02-17 02:08:05.341716624 +0100
-+++ util-linux-2.12/mount/loop.h       2004-02-17 02:08:14.922260160 +0100
-@@ -2,6 +2,7 @@
- #define LO_CRYPT_XOR  1
- #define LO_CRYPT_DES  2
- #define LO_CRYPT_CRYPTOAPI 18
-+#define LO_CRYPT_COMPRESS  19
- 
- #define LOOP_SET_FD           0x4C00
- #define LOOP_CLR_FD           0x4C01
-diff -ruN util-linux-2.12.orig/mount/mount.c util-linux-2.12/mount/mount.c
---- util-linux-2.12.orig/mount/mount.c 2004-02-17 02:08:05.281725744 +0100
-+++ util-linux-2.12/mount/mount.c      2004-02-17 02:08:14.924259856 +0100
-@@ -612,7 +612,7 @@
-       offset = opt_offset ? strtoull(opt_offset, NULL, 0) : 0;
-       if (opt_keygen)
-       pfd = use_keygen_prog(opt_keygen, keygen_args, _n_keygen_args);
--      if (set_loop(*loopdev, *loopfile, offset,
-+      if (set_loop(*loopdev, *loopfile, offset, NULL,
-                  opt_encryption, pfd, &loopro)) {
-       if (verbose)
-         printf(_("mount: failed setting up loop device\n"));
diff --git a/sys-apps/util-linux/files/util-linux-2.12b-gcloop.patch b/sys-apps/util-linux/files/util-linux-2.12b-gcloop.patch
deleted file mode 100644 (file)
index bf8eb7f..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-diff -ruN util-linux-2.12.orig/mount/lomount.c util-linux-2.12/mount/lomount.c
---- util-linux-2.12.orig/mount/lomount.c       2004-02-17 02:08:05.341716624 +0100
-+++ util-linux-2.12/mount/lomount.c    2004-02-17 02:12:10.653423576 +0100
-@@ -60,7 +60,8 @@
-         info->lo_flags = info64->lo_flags;
-         info->lo_init[0] = info64->lo_init[0];
-         info->lo_init[1] = info64->lo_init[1];
--        if (info->lo_encrypt_type == LO_CRYPT_CRYPTOAPI)
-+        if ((info->lo_encrypt_type == LO_CRYPT_CRYPTOAPI) ||
-+              (info->lo_encrypt_type == LO_CRYPT_COMPRESS))
-                 memcpy(info->lo_name, info64->lo_crypt_name, LO_NAME_SIZE);
-         else
-                 memcpy(info->lo_name, info64->lo_file_name, LO_NAME_SIZE);
-@@ -321,7 +322,8 @@
- 
- int
- set_loop(const char *device, const char *file, unsigned long long offset,
--       const char *encryption, int pfd, int *loopro) {
-+       const char *encnumber,const char *encryption,
-+       int pfd, int *loopro) {
-       struct loop_info64 loopinfo64;
-       int fd, ffd, mode;
-       char *pass;
-@@ -344,8 +346,9 @@
-       memset(&loopinfo64, 0, sizeof(loopinfo64));
- 
-       xstrncpy(loopinfo64.lo_file_name, file, LO_NAME_SIZE);
--
-+                      
-       if (encryption && *encryption) {
-+
-               if (digits_only(encryption)) {
-                       loopinfo64.lo_encrypt_type = atoi(encryption);
-               } else {
-@@ -386,6 +389,12 @@
-               }
-       }
- 
-+      if (encnumber && *encnumber) {
-+
-+              if (digits_only(encnumber))
-+                      loopinfo64.lo_encrypt_type = atoi(encnumber);
-+      }
-+
-       loopinfo64.lo_offset = offset;
- 
- #ifdef MCL_FUTURE  
-@@ -601,7 +610,7 @@
- 
- int
- main(int argc, char **argv) {
--      char *offset, *encryption, *passfd;
-+      char *offset, *encryption, *encnumber, *passfd;
-       int delete, c;
-       int res = 0;
-       int ro = 0;
-@@ -612,7 +621,7 @@
-       textdomain(PACKAGE);
- 
-       delete = off = 0;
--      offset = encryption = passfd = NULL;
-+      offset = encryption = encnumber = passfd = NULL;
-       progname = argv[0];
-       while ((c = getopt(argc,argv,"de:E:o:p:v")) != -1) {
-               switch (c) {
-@@ -620,6 +629,7 @@
-                       delete = 1;
-                       break;
-               case 'E':
-+                      encnumber = optarg;
-               case 'e':
-                       encryption = optarg;
-                       break;
-@@ -651,7 +661,7 @@
-               if (passfd && sscanf(passfd,"%d",&pfd) != 1)
-                       usage();
-               res = set_loop(argv[optind], argv[optind+1], off,
--                             encryption, pfd, &ro);
-+                              encnumber, encryption, pfd, &ro);
-       }
-       return res;
- }
-diff -ruN util-linux-2.12.orig/mount/lomount.h util-linux-2.12/mount/lomount.h
---- util-linux-2.12.orig/mount/lomount.h       2004-02-17 02:08:05.339716928 +0100
-+++ util-linux-2.12/mount/lomount.h    2004-02-17 02:08:14.921260312 +0100
-@@ -1,6 +1,6 @@
- extern int verbose;
- extern int set_loop(const char *, const char *, unsigned long long,
--                  const char *, int, int *);
-+                  const char *, const char *, int, int *);
- extern int del_loop(const char *);
- extern int is_loop_device(const char *);
- extern char * find_unused_loop_device(void);
-diff -ruN util-linux-2.12.orig/mount/loop.h util-linux-2.12/mount/loop.h
---- util-linux-2.12.orig/mount/loop.h  2004-02-17 02:08:05.341716624 +0100
-+++ util-linux-2.12/mount/loop.h       2004-02-17 02:08:14.922260160 +0100
-@@ -2,6 +2,7 @@
- #define LO_CRYPT_XOR  1
- #define LO_CRYPT_DES  2
- #define LO_CRYPT_CRYPTOAPI 18
-+#define LO_CRYPT_COMPRESS  19
- 
- #define LOOP_SET_FD           0x4C00
- #define LOOP_CLR_FD           0x4C01
-diff -ruN util-linux-2.12.orig/mount/mount.c util-linux-2.12/mount/mount.c
---- util-linux-2.12.orig/mount/mount.c 2004-02-17 02:08:05.281725744 +0100
-+++ util-linux-2.12/mount/mount.c      2004-02-17 02:08:14.924259856 +0100
-@@ -612,7 +612,7 @@
-       if (verbose)
-       printf(_("mount: going to use the loop device %s\n"), *loopdev);
-       offset = opt_offset ? strtoull(opt_offset, NULL, 0) : 0;
--      if (set_loop(*loopdev, *loopfile, offset,
-+      if (set_loop(*loopdev, *loopfile, offset, NULL,
-                  opt_encryption, pfd, &loopro)) {
-       if (verbose)
-         printf(_("mount: failed setting up loop device\n"));
diff --git a/sys-apps/util-linux/files/util-linux-2.12b-pic.patch b/sys-apps/util-linux/files/util-linux-2.12b-pic.patch
deleted file mode 100644 (file)
index 479c2cc..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-diff -u -r -N util-linux-2.11z.orig/fdisk/llseek.c util-linux-2.11z/fdisk/llseek.c
---- util-linux-2.11z.orig/fdisk/llseek.c       2002-10-31 14:44:31.000000000 +0100
-+++ util-linux-2.11z/fdisk/llseek.c    2003-07-12 19:08:59.000000000 +0200
-@@ -3,6 +3,9 @@
-  *
-  * Copyright (C) 1994 Remy Card.  This file may be redistributed
-  * under the terms of the GNU Public License.
-+ *
-+ * Changes:
-+ * 20030712 - Alexander Gabert <pappy@nikita.ath.cx> - adding PIC defines
-  */
- 
- #include <sys/types.h>
-@@ -25,7 +28,8 @@
- 
- #else /* HAVE_LLSEEK */
- 
--#if defined(__alpha__) || defined(__ia64__) || defined(__s390x__)
-+/* do not use assembler to put together syscalls at compile time (for llseek for example) when using PIC */
-+#if defined(__PIC__) || defined(__pic__) || defined(__alpha__) || defined(__ia64__) || defined(__s390x__) || defined(__hppa__)
- 
- #define my_llseek lseek
- 
-diff -u -r -N util-linux-2.11z.orig/fdisk/sfdisk.c util-linux-2.11z/fdisk/sfdisk.c
---- util-linux-2.11z.orig/fdisk/sfdisk.c       2003-01-28 19:18:03.000000000 +0100
-+++ util-linux-2.11z/fdisk/sfdisk.c    2003-07-12 19:08:38.000000000 +0200
-@@ -28,6 +28,7 @@
-  * Changes:
-  * 19990319 - Arnaldo Carvalho de Melo <acme@conectiva.com.br> - i18n
-  * 20040824 - David A. Wheeler <dwheeler@dwheeler.com> - warnings to stderr
-+ * 20030712 - Alexander Gabert <pappy@nikita.ath.cx> - adding PIC defines
-  */
- 
- #define PROGNAME "sfdisk"
-@@ -130,7 +131,9 @@
-  *
-  * Note: we use 512-byte sectors here, irrespective of the hardware ss.
-  */
--#if !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__)
-+
-+/* do not use the assembler constructed syscalls for seeking if compiled as PIC */
-+#if !defined(__PIC__) && !defined(__pic__) && !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__) && !defined (__hppa__)
- static
- _syscall5(int,  _llseek,  uint,  fd, ulong, hi, ulong, lo,
-        loff_t *, res, uint, wh);
-@@ -142,7 +145,7 @@
-     in = ((loff_t) s << 9);
-     out = 1;
- 
--#if !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__)
-+#if !defined(__PIC__) && !defined(__pic__) && !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__) && !defined (__hppa__)
-     if (_llseek (fd, in>>32, in & 0xffffffff, &out, SEEK_SET) != 0) {
- #else
-     if ((out = lseek(fd, in, SEEK_SET)) != in) {
---- util-linux-2.12b/partx/partx.c.orig        2004-09-04 15:58:23.000000000 -0400
-+++ util-linux-2.12b/partx/partx.c     2004-09-04 15:57:40.000000000 -0400
-@@ -333,7 +333,7 @@
- /*
-  * sseek: seek to specified sector
-  */
--#if !defined (__alpha__) && !defined (__ia64__) && !defined (__s390x__) && !defined(__x86_64__)
-+#if !defined (__alpha__) && !defined (__ia64__) && !defined (__s390x__) && !defined(__x86_64__) && !defined(__PIC__) && !defined(__hppa__)
- #define NEED__llseek
- #endif
- 
diff --git a/sys-apps/util-linux/files/util-linux-swapon-check-symlinks.patch b/sys-apps/util-linux/files/util-linux-swapon-check-symlinks.patch
deleted file mode 100644 (file)
index 9b14886..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
---- util-linux-2.12b/mount/swapon.c.orig       2004-10-28 10:02:44.320023600 -0400
-+++ util-linux-2.12b/mount/swapon.c    2004-10-28 10:02:14.384574000 -0400
-@@ -22,6 +22,7 @@
- #include <errno.h>
- #include <sys/stat.h>
- #include <unistd.h>
-+#include <sys/param.h>
- #include "swap_constants.h"
- #include "swapargs.h"
- #include "nls.h"
-@@ -143,10 +144,26 @@
- static int
- is_in_proc_swaps(char *fname) {
-       int i;
-+      struct stat fstatbuf;
- 
-       for (i = 0; i < numSwaps; i++)
-               if (!strcmp(fname, swapFiles[i]))
-                       return 1;
-+
-+      /* fallback:
-+       * if the device in /etc/fstab is a symlink, the entry
-+       * in /proc/swaps won't match because the kernel stores
-+       * absolute pathnames.  Here we compare dev_t's.
-+       */
-+      if (!lstat(fname, &fstatbuf))
-+              if (S_ISLNK(fstatbuf.st_mode)) {
-+                      struct stat swapstatbuf;
-+                      for (i = 0; i < numSwaps; i++)
-+                              if (!stat(swapFiles[i], &swapstatbuf) && \
-+                                  swapstatbuf.st_dev == fstatbuf.st_dev)
-+                                      return 1;
-+              }
-+
-       return 0;
- }
- 
index 3c92c5ef97e10e204edd8955b66636615331c64f..9e4b68d54647d8de2daa4f83207bce9f4a359eca 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.12-r5.ebuild,v 1.19 2005/01/10 01:54:02 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.12-r5.ebuild,v 1.20 2005/01/10 02:56:52 vapier Exp $
 
 inherit eutils flag-o-matic
 
@@ -38,7 +38,7 @@ src_unpack() {
        # Mailing list post with info:
        # http://www.kerneli.org/pipermail/cryptoapi-devel/2003-September/000634.html
        # Follow thread for usage.
-       use crypt && epatch ${DISTDIR}/${CRYPT_PATCH_P}.patch.bz2
+       use crypt && epatch ${WORKDIR}/${CRYPT_PATCH_P}.patch
 
        # Fix rare failures with -j4 or higher
        epatch ${FILESDIR}/${PN}-2.11z-parallel-make.patch