mirror of
git://git.savannah.gnu.org/guix.git
synced 2023-12-14 03:33:07 +01:00
gnu: libtirpc: Update to 1.3.1.
* gnu/packages/onc-rpc.scm (libtirpc): Update to 1.3.1. [arguments]: Remove obsolete adjustment. Rename phase. * gnu/packages/onc-rpc.scm (libtirpc/hurd)[source](patches): Remove obsolete patch. * gnu/packages/patches/libtirpc-hurd-client.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly.
This commit is contained in:
parent
e37c575723
commit
26e89a33f3
3 changed files with 7 additions and 63 deletions
|
@ -1286,7 +1286,6 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/libtgvoip-disable-webrtc.patch \
|
||||
%D%/packages/patches/libtheora-config-guess.patch \
|
||||
%D%/packages/patches/libtirpc-hurd.patch \
|
||||
%D%/packages/patches/libtirpc-hurd-client.patch \
|
||||
%D%/packages/patches/libtommath-fix-linkage.patch \
|
||||
%D%/packages/patches/libtool-skip-tests2.patch \
|
||||
%D%/packages/patches/libusb-0.1-disable-tests.patch \
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
(define-public libtirpc
|
||||
(package
|
||||
(name "libtirpc")
|
||||
(version "1.2.5")
|
||||
(version "1.3.1")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://sourceforge/libtirpc/libtirpc/"
|
||||
|
@ -45,26 +45,22 @@
|
|||
version ".tar.bz2"))
|
||||
(sha256
|
||||
(base32
|
||||
"1jl6a5kkw2vrp4gb6pmvf72rqimywvwfb9f7iz2xjg4wgq63bdpk"))))
|
||||
"05zf16ilwwkzv4cccaac32nssrj3rg444n9pskiwbgk6y359an14"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:configure-flags '("--disable-static")
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'remote-dangling-symlink
|
||||
(lambda _
|
||||
(add-after 'unpack 'adjust-netconfig-reference
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(substitute* '("man/netconfig.5"
|
||||
"man/getnetconfig.3t"
|
||||
"man/getnetpath.3t"
|
||||
"man/rpc.3t"
|
||||
"src/getnetconfig.c"
|
||||
"tirpc/netconfig.h")
|
||||
(("/etc/netconfig") (string-append %output "/etc/netconfig")))
|
||||
|
||||
;; Remove the dangling symlinks since it breaks the
|
||||
;; 'patch-source-shebangs' file tree traversal.
|
||||
(delete-file "INSTALL")
|
||||
#t)))))
|
||||
(("/etc/netconfig") (string-append (assoc-ref outputs "out")
|
||||
"/etc/netconfig"))))))))
|
||||
(inputs `(("mit-krb5" ,mit-krb5)))
|
||||
(home-page "https://sourceforge.net/projects/libtirpc/")
|
||||
(synopsis "Transport-independent Sun/ONC RPC implementation")
|
||||
|
@ -79,8 +75,7 @@ IPv4 and IPv6. ONC RPC is notably used by the network file system (NFS).")
|
|||
(inherit libtirpc)
|
||||
(name "libtirpc-hurd")
|
||||
(source (origin (inherit (package-source libtirpc))
|
||||
(patches (search-patches "libtirpc-hurd.patch"
|
||||
"libtirpc-hurd-client.patch"))))
|
||||
(patches (search-patches "libtirpc-hurd.patch"))))
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments libtirpc)
|
||||
((#:configure-flags flags ''())
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
Taken from https://salsa.debian.org/debian/libtirpc/-/raw/master/debian/patches/06-hurd-client-port.diff
|
||||
|
||||
Description: Fix client code for hurd, avoiding malloc overflow
|
||||
When trying to setup a inet connection, it happens the following:
|
||||
- in libtirp, src/clnt_vc.c, clnt_vc_create gets called
|
||||
- when trying to allocate vc_fd_locks, __rpc_dtbsize() is used as size
|
||||
for that array of fd locks
|
||||
- __rpc_dtbsize(), in src/rpc_generic.c, queries using rlimit the
|
||||
maximum (rlim_max) number of file descriptors (RLIMIT_NOFILE):
|
||||
- on Linux, the default is { rlim_cur = 1024, rlim_max = 4096 }
|
||||
- on kFreeBSD, the default is { rlim_cur = 1024, rlim_max = 1024 }
|
||||
- on Hurd, the default is { rlim_cur = 1024, rlim_max = RLIM_INFINITY }
|
||||
meaning that on Hurd the memory allocation fails (as
|
||||
__rpc_dtbsize() * sizeof(int) overflows and is negative)
|
||||
|
||||
Change libtiprc so __rpc_dtbsize falls back on rlim_cur if rlim_max
|
||||
is unlimited.
|
||||
|
||||
This patch fixes the client connection using inet sockets; local unix
|
||||
sockets are not working, for two reasons so far:
|
||||
- getpeername on them gives EOPNOTSUPP
|
||||
- SO_REUSEADDR is not implemented for them
|
||||
Author: Pino Toscano <pino@debian.org>
|
||||
|
||||
Bug-Debian: http://bugs.debian.org/739674
|
||||
Forwarded: no
|
||||
Reviewed-By: Petter Reinholdtsen
|
||||
Last-Update: 2014-03-03
|
||||
|
||||
--- a/src/rpc_generic.c
|
||||
+++ b/src/rpc_generic.c
|
||||
@@ -107,12 +107,17 @@
|
||||
{
|
||||
static int tbsize;
|
||||
struct rlimit rl;
|
||||
+ rlim_t lim;
|
||||
|
||||
if (tbsize) {
|
||||
return (tbsize);
|
||||
}
|
||||
if (getrlimit(RLIMIT_NOFILE, &rl) == 0) {
|
||||
- return (tbsize = (int)rl.rlim_max);
|
||||
+ lim = rl.rlim_max;
|
||||
+ if (lim == RLIM_INFINITY) {
|
||||
+ lim = rl.rlim_cur;
|
||||
+ }
|
||||
+ return (tbsize = (int)lim);
|
||||
}
|
||||
/*
|
||||
* Something wrong. I'll try to save face by returning a
|
Loading…
Reference in a new issue