diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-11-12 02:26:00 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-11-12 02:26:00 +0000 |
commit | b11c29ce5fe5c62b014521d10a521c8d1b8eb54e (patch) | |
tree | 228b17af8ca0672fbddab220c97a411b5f0002ea | |
parent | Stable on sparc (Manifest recommit) (diff) | |
download | gentoo-2-b11c29ce5fe5c62b014521d10a521c8d1b8eb54e.tar.gz gentoo-2-b11c29ce5fe5c62b014521d10a521c8d1b8eb54e.tar.bz2 gentoo-2-b11c29ce5fe5c62b014521d10a521c8d1b8eb54e.zip |
Version bump. Add loop-aes patch (#24458 / #25192). Punt gcloop/cryptoapi patches. Add patch to ignore managed/kudzu options #70873.
8 files changed, 756 insertions, 1 deletions
diff --git a/sys-apps/util-linux/ChangeLog b/sys-apps/util-linux/ChangeLog index daa43768483a..05ea56e5c858 100644 --- a/sys-apps/util-linux/ChangeLog +++ b/sys-apps/util-linux/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for sys-apps/util-linux # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.89 2004/10/30 21:42:11 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.90 2004/11/12 02:26:00 vapier Exp $ + +*util-linux-2.12i (11 Nov 2004) + + 11 Nov 2004; Mike Frysinger <vapier@gentoo.org> + files/util-linux-2.12b-pic.patch, + +files/util-linux-2.12i-fat-LABEL-support.patch, + +files/util-linux-2.12i-ignore-managed.patch, + +files/util-linux-2.12i-nfsv4.patch, +files/util-linux-2.12i-pic.patch, + +files/util-linux-2.12i-swapon-check-symlinks.patch, + +util-linux-2.12i.ebuild: + Version bump. Add loop-aes patch (#24458 / #25192). Punt gcloop/cryptoapi + patches. Add patch to ignore managed/kudzu options #70873. *util-linux-2.12b-r1 (30 Oct 2004) diff --git a/sys-apps/util-linux/files/digest-util-linux-2.12i b/sys-apps/util-linux/files/digest-util-linux-2.12i new file mode 100644 index 000000000000..13435271bfbe --- /dev/null +++ b/sys-apps/util-linux/files/digest-util-linux-2.12i @@ -0,0 +1,3 @@ +MD5 6e0deccf97db98d2ae751577d019efa4 util-linux-2.12i.tar.gz 1975468 +MD5 1de89f3967b8fa74b5f98bc0fb099de2 loop-AES-v2.2d.tar.bz2 153810 +MD5 bdd7e3ba9df96725a19b1daa67e8b8e8 util-linux-2.12i-cryptoapi-losetup.patch.bz2 4773 diff --git a/sys-apps/util-linux/files/util-linux-2.12i-fat-LABEL-support.patch b/sys-apps/util-linux/files/util-linux-2.12i-fat-LABEL-support.patch new file mode 100644 index 000000000000..41b713939279 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.12i-fat-LABEL-support.patch @@ -0,0 +1,69 @@ +--- mount-2.12-fat.patch.orig 2004-11-11 20:16:07.165232227 -0500 ++++ mount-2.12-fat.patch 2004-11-11 20:18:47.717923660 -0500 +@@ -1,11 +1,10 @@ + 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,7 +43,139 @@ +- #endif ++@@ -43,6 +43,137 @@ ++ return rc; + } + +--/* for now, only ext2, ext3, xfs, ocfs are supported */ + +/* Remove trailing spaces */ + +static void remtrailspc(char *label) { + + char *c; +@@ -137,29 +136,23 @@ + + return -1; + +} + + +-+ +-+/* for now, only ext2, ext3, xfs, ocfs, fat, fat32 are supported */ +- int +- get_label_uuid(const char *device, char **label, char *uuid) { +- int fd; +-@@ -54,8 +186,10 @@ +- struct jfs_super_block jfssb; +- struct ocfs_volume_header ovh; /* Oracle */ ++ /* ++ * Get both label and uuid. ++ * For now, only ext2, ext3, xfs, ocfs, ocfs2, reiserfs are supported ++@@ -54,6 +186,8 @@ + struct ocfs_volume_label olbl; ++ struct ocfs2_super_block osb; ++ 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); ++ fd = open(device, O_RDONLY); + if (fd < 0) +- return rv; +- +-@@ -111,7 +245,87 @@ +- memcpy(*label, jfssb.s_label, namesize); ++@@ -111,6 +245,87 @@ + } + rv = 0; +-- } +-+ } else if (lseek(fd, 0, SEEK_SET) == 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 +@@ -240,9 +233,9 @@ + + rv = 0; + + } + + } +- +- close(fd); +- return rv; ++ else if (lseek(fd, REISERFS_DISK_OFFSET_IN_BYTES, SEEK_SET) ++ == REISERFS_DISK_OFFSET_IN_BYTES ++ && read(fd, (char *) &reiserfssb, sizeof(reiserfssb)) + 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 diff --git a/sys-apps/util-linux/files/util-linux-2.12i-ignore-managed.patch b/sys-apps/util-linux/files/util-linux-2.12i-ignore-managed.patch new file mode 100644 index 000000000000..b6cb5670c496 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.12i-ignore-managed.patch @@ -0,0 +1,11 @@ +--- util-linux-2.12a/mount/mount.c.sopwith 2004-03-04 20:28:22.000000000 -0500 ++++ util-linux-2.12a/mount/mount.c 2004-07-16 16:50:18.792814782 -0400 +@@ -191,6 +191,8 @@ + { "diratime", 0, 1, MS_NODIRATIME }, /* Update dir access times */ + { "nodiratime", 0, 0, MS_NODIRATIME },/* Do not update dir access times */ + #endif ++ { "kudzu", 0, 0, 0 }, /* Silently remove this option (backwards compat use only) */ ++ { "managed", 0, 0, 0 }, /* Silently remove this option */ + { NULL, 0, 0, 0 } + }; + diff --git a/sys-apps/util-linux/files/util-linux-2.12i-nfsv4.patch b/sys-apps/util-linux/files/util-linux-2.12i-nfsv4.patch new file mode 100644 index 000000000000..864449b17767 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.12i-nfsv4.patch @@ -0,0 +1,456 @@ +diff -ur util-linux-2.12i.orig/mount/Makefile util-linux-2.12i/mount/Makefile +--- util-linux-2.12i.orig/mount/Makefile 2004-11-11 20:03:33.032897551 -0500 ++++ util-linux-2.12i/mount/Makefile 2004-11-11 20:04:38.279986828 -0500 +@@ -29,2 +29,4 @@ + ++NFS_OBJS += nfs4mount.o ++GEN_FILES += nfs4mount.c + all: $(PROGS) +diff -ur util-linux-2.12i.orig/mount/mount.c util-linux-2.12i/mount/mount.c +--- util-linux-2.12i.orig/mount/mount.c 2004-11-11 20:03:33.033897369 -0500 ++++ util-linux-2.12i/mount/mount.c 2004-11-11 20:03:40.384555521 -0500 +@@ -810,6 +810,19 @@ + "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 -ur util-linux-2.12i.orig/mount/sundries.h util-linux-2.12i/mount/sundries.h +--- util-linux-2.12i.orig/mount/sundries.h 2004-11-11 20:03:33.034897186 -0500 ++++ util-linux-2.12i/mount/sundries.h 2004-11-11 20:03:40.386555156 -0500 +@@ -37,6 +37,8 @@ + #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 -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 --git a/sys-apps/util-linux/files/util-linux-2.12i-pic.patch b/sys-apps/util-linux/files/util-linux-2.12i-pic.patch new file mode 100644 index 000000000000..2725682ad9f3 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.12i-pic.patch @@ -0,0 +1,59 @@ +diff -ur util-linux-2.12i.orig/fdisk/llseek.c util-linux-2.12i/fdisk/llseek.c +--- util-linux-2.12i.orig/fdisk/llseek.c 2004-11-11 20:08:34.074942938 -0500 ++++ util-linux-2.12i/fdisk/llseek.c 2004-11-11 20:09:43.040353443 -0500 +@@ -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> +@@ -19,7 +22,9 @@ + + #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(__alpha__) || defined(__ia64__) || defined(__s390x__) || defined(__hppa__) \ ++ || defined(__PIC__) || defined(__pic__) + + #define my_llseek lseek + +diff -ur util-linux-2.12i.orig/fdisk/sfdisk.c util-linux-2.12i/fdisk/sfdisk.c +--- util-linux-2.12i.orig/fdisk/sfdisk.c 2004-11-11 20:08:34.074942938 -0500 ++++ util-linux-2.12i/fdisk/sfdisk.c 2004-11-11 20:11:07.242982424 -0500 +@@ -30,6 +30,7 @@ + * 19990319 - Arnaldo Carvalho de Melo <acme@conectiva.com.br> - i18n + * 20040428 - Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com> - added PACKED + * 20040824 - David A. Wheeler <dwheeler@dwheeler.com> - warnings to stderr ++ * 20030712 - Alexander Gabert <pappy@nikita.ath.cx> - adding PIC defines + */ + + #define PROGNAME "sfdisk" +@@ -172,7 +173,9 @@ + * Note: we use 512-byte sectors here, irrespective of the hardware ss. + */ + #undef use_lseek +-#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 (__alpha__) || defined (__ia64__) || defined (__x86_64__) || defined (__s390x__) || defined (__hppa__) \ ++ || defined(__PIC__) && defined(__pic__) + #define use_lseek + #endif + +diff -ur util-linux-2.12i.orig/partx/partx.c util-linux-2.12i/partx/partx.c +--- util-linux-2.12i.orig/partx/partx.c 2004-11-11 20:08:34.155928155 -0500 ++++ util-linux-2.12i/partx/partx.c 2004-11-11 20:12:34.740010020 -0500 +@@ -333,7 +333,8 @@ + /* + * 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(__hppa__) \ ++ && !defined(__PIC__) && !defined(__pic__) + #define NEED__llseek + #endif + diff --git a/sys-apps/util-linux/files/util-linux-2.12i-swapon-check-symlinks.patch b/sys-apps/util-linux/files/util-linux-2.12i-swapon-check-symlinks.patch new file mode 100644 index 000000000000..b9ed3466e703 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.12i-swapon-check-symlinks.patch @@ -0,0 +1,33 @@ +--- 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,2 +22,3 @@ + #include <stdlib.h> ++#include <sys/param.h> + #include <stdio.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; + } + diff --git a/sys-apps/util-linux/util-linux-2.12i.ebuild b/sys-apps/util-linux/util-linux-2.12i.ebuild new file mode 100644 index 000000000000..a5b6b918f18c --- /dev/null +++ b/sys-apps/util-linux/util-linux-2.12i.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2004 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.12i.ebuild,v 1.1 2004/11/12 02:26:00 vapier Exp $ + +inherit eutils flag-o-matic toolchain-funcs + +AES_VER="2.2d" +DESCRIPTION="Various useful Linux utilities" +HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/" +SRC_URI="mirror://kernel/linux/utils/${PN}/${P}.tar.gz + crypt? ( http://loop-aes.sourceforge.net/loop-AES/loop-AES-v${AES_VER}.tar.bz2 )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="crypt nls static pam selinux perl" + +DEPEND="virtual/libc + >=sys-libs/ncurses-5.2-r2 + >=sys-fs/e2fsprogs-1.34 + selinux? ( sys-libs/libselinux ) + pam? ( sys-apps/pam-login ) + crypt? ( app-crypt/hashalot )" +RDEPEND="${DEPEND} + perl? ( dev-lang/perl ) + nls? ( sys-devel/gettext )" + +yesno() { useq $1 && echo yes || echo no; } + +src_unpack() { + unpack ${A} + cd ${S} + + # crypto support, yummy #24458 + use crypt && epatch ${WORKDIR}/loop-AES-v${AES_VER}/util-linux-*.diff + + # Fix rare failures with -j4 or higher + epatch ${FILESDIR}/${PN}-2.11z-parallel-make.patch + + # Fix unreadable df output + epatch ${FILESDIR}/no-symlink-resolve.patch + + # Add the O option to agetty to display DNS domainname in the issue + # file, thanks to Marius Mauch <genone@genone.de>, bug #22275. + # + # NOTE: Removing this will break future baselayout, so PLEASE + # consult with me before doing so. + # + # <azarah@gentoo.org> (17 Jul 2003) + epatch ${FILESDIR}/${PN}-2.11z-agetty-domainname-option.patch + + # Add NFS4 support (kernel 2.5/2.6) + epatch ${FILESDIR}/${P}-nfsv4.patch + + # ignore managed/kudzu options #70873 + epatch ${FILESDIR}/${P}-ignore-managed.patch + + # Allow util-linux to be built with -fPIC + epatch ${FILESDIR}/${P}-pic.patch + + # Add support to read fat/fat32 labels, bug #36722 + epatch ${FILESDIR}/${P}-fat-LABEL-support.patch + epatch ${S}/mount-2.12-fat.patch + + # Install rdev on amd64 platform + epatch ${FILESDIR}/${PN}-2.12-amd64_rdev_installation.patch + + # swapon gets confused by symlinks in /dev #69162 + epatch ${FILESDIR}/${P}-swapon-check-symlinks.patch + + # Add support for gcloop +# use squashfs :P +# use crypt || epatch ${FILESDIR}/${PN}-2.12b-gcloop.patch +# use crypt && epatch ${FILESDIR}/${PN}-2.12b-gcloop-with-crypt.patch + + # Enable random features + sed -i \ + -e "/^HAVE_PAM=/s:no:$(yesno pam):" \ + -e "/^HAVE_SELINUX=/s:no:$(yesno selinux):" \ + -e "/^DISABLE_NLS=/s:no:$(yesno !nls):" \ + -e "/^HAVE_KILL=/s:no:yes:" \ + -e "/^HAVE_SLN=/s:no:yes:" \ + -e "/^HAVE_TSORT/s:no:yes:" \ + -e "s:-pipe -O2 \$(CPUOPT) -fomit-frame-pointer:${CFLAGS}:" \ + -e "s:CPU=.*:CPU=${CHOST%%-*}:" \ + -e "s:usr/man:usr/share/man:" \ + -e "s:usr/info:usr/share/info:" \ + -e "s:SUIDMODE=.*4755:SUIDMODE=4711:" \ + MCONFIG || die "MCONFIG sed" +} + +src_compile() { + append-ldflags -Wl,-z,now + use static && append-ldflags -static + export CC="$(tc-getCC)" + + econf || die "configure failed" + emake || die "emake failed" + + cd partx + emake CFLAGS="${CFLAGS} -include linux/compiler.h" || die "make partx failed" +} + +src_install() { + make install DESTDIR="${D}" || die "install failed" + dosbin partx/{addpart,delpart,partx} || die "dosbin" + use perl || rm -f "${D}"/usr/bin/chkdupexe + + dodoc HISTORY MAINTAINER README VERSION + docinto examples + dodoc example.files/* +} |