diff options
author | Jan Nieuwenhuizen <janneke@gnu.org> | 2020-03-07 17:16:38 -0500 |
---|---|---|
committer | Jan Nieuwenhuizen <janneke@gnu.org> | 2020-03-26 12:59:35 +0100 |
commit | 770ea94c9cde701ae3b45f313799b9d95154c267 (patch) | |
tree | a272097a0414e2d90e776dcca8a527cbd67f2555 /gnu | |
parent | 7f31bd25ad734c483d450eefccdfb26874d2326d (diff) | |
download | guix-770ea94c9cde701ae3b45f313799b9d95154c267.tar.gz guix-770ea94c9cde701ae3b45f313799b9d95154c267.zip |
gnu: mit-krb5: Supprt for the Hurd.
* gnu/packages/patches/mit-krb5-hurd.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/kerberos.scm (mit-krb5): Use it.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/kerberos.scm | 5 | ||||
-rw-r--r-- | gnu/packages/patches/mit-krb5-hurd.patch | 165 |
3 files changed, 170 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index fba481cfd0..ff92662cf4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1208,6 +1208,7 @@ dist_patch_DATA = \ %D%/packages/patches/mingw-w64-6.0.0-gcc.patch \ %D%/packages/patches/minisat-friend-declaration.patch \ %D%/packages/patches/minisat-install.patch \ + %D%/packages/patches/mit-krb5-hurd.patch \ %D%/packages/patches/mit-krb5-qualify-short-hostnames.patch \ %D%/packages/patches/mpc123-initialize-ao.patch \ %D%/packages/patches/module-init-tools-moduledir.patch \ diff --git a/gnu/packages/kerberos.scm b/gnu/packages/kerberos.scm index 0e290c0d46..896d15f485 100644 --- a/gnu/packages/kerberos.scm +++ b/gnu/packages/kerberos.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com> ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,6 +35,7 @@ #:use-module (gnu packages gettext) #:use-module (gnu packages gnupg) #:use-module (gnu packages libidn) + #:use-module (gnu packages hurd) #:use-module (gnu packages linux) #:use-module (gnu packages pkg-config) #:use-module (gnu packages compression) @@ -60,7 +62,8 @@ (string-append "https://kerberos.org/dist/krb5/" (version-major+minor version) "/krb5-" version ".tar.gz"))) - (patches (search-patches "mit-krb5-qualify-short-hostnames.patch")) + (patches (search-patches "mit-krb5-qualify-short-hostnames.patch" + "mit-krb5-hurd.patch")) (sha256 (base32 "121c5xsy3x0i4wdkrpw62yhvji6virbh6n30ypazkp0isws3k4bk")))) diff --git a/gnu/packages/patches/mit-krb5-hurd.patch b/gnu/packages/patches/mit-krb5-hurd.patch new file mode 100644 index 0000000000..d4962b1e60 --- /dev/null +++ b/gnu/packages/patches/mit-krb5-hurd.patch @@ -0,0 +1,165 @@ +Avoid using MAXPATHLEN and MAXHOSTLEN on the Hurd. + +Taken from https://salsa.debian.org/debian/krb5/-/blob/master/debian/patches/debian-local/0001-Debian-HURD-compatibility.patch + +From: Sam Hartman <hartmans@debian.org> +Date: Mon, 26 Dec 2011 18:05:13 -0500 +Subject: Debian: HURD compatibility + +HURD has no MAXPATHLEN or MAXHOSTLEN. + +Patch-Category: debian-local +--- + src/clients/ksu/ksu.h | 4 ++++ + src/include/k5-int.h | 3 +++ + src/kadmin/ktutil/ktutil_funcs.c | 4 ++++ + src/kprop/kprop_util.c | 4 ++++ + src/lib/gssapi/spnego/spnego_mech.c | 3 +++ + src/lib/krb5/os/sn2princ.c | 4 ++++ + src/plugins/kdb/db2/libdb2/include/db-int.h | 4 ++++ + src/tests/resolve/resolve.c | 4 ++++ + 8 files changed, 30 insertions(+) + +$ diff -u krb5-1.18/src/util/ss/help.c.orig krb5-1.18/src/util/ss/help.c +--- krb5-1.18/src/util/ss/help.c.orig 2020-03-07 23:25:52.712418587 +0100 ++++ krb5-1.18/src/util/ss/help.c 2020-03-07 23:26:25.764941122 +0100 +@@ -6,6 +6,9 @@ + */ + + #include <sys/param.h> ++#ifndef MAXPATHLEN ++# define MAXPATHLEN 4096 ++#endif + #include <sys/types.h> + #include <errno.h> + #include <sys/file.h> +$ diff -u krb5-1.18/src/lib/krb5/os/hostrealm.c.orig krb5-1.18/src/lib/krb5/os/hostrealm.c +--- krb5-1.18/src/lib/krb5/os/hostrealm.c.orig 2020-03-07 23:33:19.931420994 +0100 ++++ krb5-1.18/src/lib/krb5/os/hostrealm.c 2020-03-07 23:33:58.628026424 +0100 +@@ -42,6 +42,10 @@ + #endif + #endif + ++#ifndef MAXHOSTNAMELEN ++#define MAXHOSTNAMELEN 256 ++#endif ++ + struct hostrealm_module_handle { + struct krb5_hostrealm_vtable_st vt; + krb5_hostrealm_moddata data; +diff --git a/src/clients/ksu/ksu.h b/src/clients/ksu/ksu.h +index 3bf0bd4..f680b33 100644 +--- a/src/clients/ksu/ksu.h ++++ b/src/clients/ksu/ksu.h +@@ -56,6 +56,10 @@ + #define MAX_CMD 2048 /* this is temp, should use realloc instead, + as done in most of the code */ + ++#ifndef MAXPATHLEN ++# define MAXPATHLEN 4096 ++#endif ++ + + extern int optind; + extern char * optarg; +diff --git a/src/include/k5-int.h b/src/include/k5-int.h +index 6522422..e4f1678 100644 +--- a/src/include/k5-int.h ++++ b/src/include/k5-int.h +@@ -589,6 +589,9 @@ extern char *strdup (const char *); + #ifdef HAVE_SYS_PARAM_H + #include <sys/param.h> /* MAXPATHLEN */ + #endif ++#ifndef MAXPATHLEN ++# define MAXPATHLEN 4096 ++#endif + + #ifdef HAVE_SYS_FILE_H + #include <sys/file.h> /* prototypes for file-related +diff --git a/src/kadmin/ktutil/ktutil_funcs.c b/src/kadmin/ktutil/ktutil_funcs.c +index 6d119a2..fb7fa22 100644 +--- a/src/kadmin/ktutil/ktutil_funcs.c ++++ b/src/kadmin/ktutil/ktutil_funcs.c +@@ -34,6 +34,10 @@ + #include <string.h> + #include <ctype.h> + ++#ifndef MAXPATHLEN ++# define MAXPATHLEN 4096 ++#endif ++ + /* + * Free a kt_list + */ +diff --git a/src/kprop/kprop_util.c b/src/kprop/kprop_util.c +index c32d174..d72ab18 100644 +--- a/src/kprop/kprop_util.c ++++ b/src/kprop/kprop_util.c +@@ -32,6 +32,10 @@ + #include <sys/types.h> + #include <sys/socket.h> + ++#ifndef MAXHOSTNAMELEN ++#define MAXHOSTNAMELEN 256 ++#endif ++ + /* + * Convert an IPv4 or IPv6 socket address to a newly allocated krb5_address. + * There is similar code elsewhere in the tree, so this should possibly become +diff --git a/src/lib/gssapi/spnego/spnego_mech.c b/src/lib/gssapi/spnego/spnego_mech.c +index 9d6027c..585d8a6 100644 +--- a/src/lib/gssapi/spnego/spnego_mech.c ++++ b/src/lib/gssapi/spnego/spnego_mech.c +@@ -65,6 +65,9 @@ + #include "gssapiP_spnego.h" + #include <gssapi_err_generic.h> + ++#ifndef MAXHOSTNAMELEN ++#define MAXHOSTNAMELEN 256 ++#endif + + #undef g_token_size + #undef g_verify_token_header +diff --git a/src/lib/krb5/os/sn2princ.c b/src/lib/krb5/os/sn2princ.c +index 5932fd9..187daa8 100644 +--- a/src/lib/krb5/os/sn2princ.c ++++ b/src/lib/krb5/os/sn2princ.c +@@ -126,6 +126,10 @@ find_trailer(const char *hostname) + return p; + } + ++#ifndef MAXHOSTNAMELEN ++# define MAXHOSTNAMELEN 256 ++#endif ++ + krb5_error_code KRB5_CALLCONV + krb5_sname_to_principal(krb5_context context, const char *hostname, + const char *sname, krb5_int32 type, +diff --git a/src/plugins/kdb/db2/libdb2/include/db-int.h b/src/plugins/kdb/db2/libdb2/include/db-int.h +index 7e981d4..d83b3b6 100644 +--- a/src/plugins/kdb/db2/libdb2/include/db-int.h ++++ b/src/plugins/kdb/db2/libdb2/include/db-int.h +@@ -280,4 +280,8 @@ void __dbpanic __P((DB *dbp)); + #ifndef O_BINARY + #define O_BINARY 0 /* Needed for Win32 compiles */ + #endif ++ ++#ifndef MAXPATHLEN ++# define MAXPATHLEN 4096 ++#endif + #endif /* _DB_INT_H_ */ +diff --git a/src/tests/resolve/resolve.c b/src/tests/resolve/resolve.c +index 7339d21..38f7253 100644 +--- a/src/tests/resolve/resolve.c ++++ b/src/tests/resolve/resolve.c +@@ -73,6 +73,10 @@ char *strchr(); + #include <netinet/in.h> + #include <netdb.h> + ++#ifndef MAXHOSTNAMELEN ++# define MAXHOSTNAMELEN 256 ++#endif ++ + int + main(argc, argv) + int argc; |