diff options
author | joerg <joerg@pkgsrc.org> | 2017-09-09 22:46:57 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2017-09-09 22:46:57 +0000 |
commit | 9e3f842a7b33f926f7fd5f8cde999e77aa4fd9b6 (patch) | |
tree | 1936c8360833ba44e6662b5358dfe317e902aa75 | |
parent | 6e928bb4626b5997afa50427fed8c50e1eb6123d (diff) | |
download | pkgsrc-9e3f842a7b33f926f7fd5f8cde999e77aa4fd9b6.tar.gz |
Fix build on NetBSD 8+. Fix Perl use.
-rw-r--r-- | net/freeradius/Makefile | 5 | ||||
-rw-r--r-- | net/freeradius/distinfo | 6 | ||||
-rw-r--r-- | net/freeradius/patches/patch-ai | 63 | ||||
-rw-r--r-- | net/freeradius/patches/patch-configure.ac | 53 | ||||
-rw-r--r-- | net/freeradius/patches/patch-src_lib_udpfromto.c | 21 |
5 files changed, 139 insertions, 9 deletions
diff --git a/net/freeradius/Makefile b/net/freeradius/Makefile index bc15ecbcbbd..36e02bd3dc5 100644 --- a/net/freeradius/Makefile +++ b/net/freeradius/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.91 2017/08/26 10:07:28 fhajny Exp $ +# $NetBSD: Makefile,v 1.92 2017/09/09 22:46:57 joerg Exp $ .include "Makefile.common" @@ -192,6 +192,9 @@ EGDIRS= certs mods-available mods-config mods-config/attr_filter mods-config/f mods-config/sql/main/sqlite mods-config/unbound mods-enabled \ policy.d sites-available sites-enabled +REPLACE_PERL+= scripts/sql/radsqlrelay \ + src/modules/rlm_counter/rad_counter + .for f in ${EGFILES} CONF_FILES_PERMS+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f} \ ${RADIUS_USER} ${RADIUS_GROUP} 0640 diff --git a/net/freeradius/distinfo b/net/freeradius/distinfo index 2520eef76c4..6807a2e1f89 100644 --- a/net/freeradius/distinfo +++ b/net/freeradius/distinfo @@ -1,12 +1,14 @@ -$NetBSD: distinfo,v 1.32 2017/08/26 10:07:28 fhajny Exp $ +$NetBSD: distinfo,v 1.33 2017/09/09 22:46:57 joerg Exp $ SHA1 (freeradius-server-3.0.15.tar.bz2) = f651142a31b514fc80d888fe8ab5040cbfdd546e RMD160 (freeradius-server-3.0.15.tar.bz2) = 46d2d491b71516c6db7659e46e1ec44c7fbf9d1f SHA512 (freeradius-server-3.0.15.tar.bz2) = a2808f0b70b73f11c4c7d00edcb4a56a2ab8f73ce0ff74a9834c8b613ce5ed75ece372f852b0891f68c6a33f50c1bababb76d2eff9326a7fc29fe6b45ec9af88 Size (freeradius-server-3.0.15.tar.bz2) = 3038070 bytes -SHA1 (patch-ai) = 837af388cd6f4f4c41177eb28e2eebdfd74e7d8d +SHA1 (patch-ai) = 834fea0886410de30ed489fa39be066fa3fb3186 +SHA1 (patch-configure.ac) = 2e1a979f51122f4c214f11574116a9a7695387d0 SHA1 (patch-main_command.c) = 1c79b29eb13df341906c710c8dd41860a27473dd SHA1 (patch-main_util.c) = b9cefdb9bc30df0906184e8c0bb883e5258767c3 SHA1 (patch-rlm_krb5_configure) = e97f0efe85c449d3b8a9aa450b6b7d1d0e4c6b89 SHA1 (patch-rlm_perl_configure) = 577d6f0df7322ee12a99aafcdcc2d0b40e89eb69 SHA1 (patch-rlm_yubikey_configure) = ea62cc0e87da014befbd0ad79f68dc852dc0f254 +SHA1 (patch-src_lib_udpfromto.c) = 28322d32ed95c40b59d26072261ea29f5cd2e4da diff --git a/net/freeradius/patches/patch-ai b/net/freeradius/patches/patch-ai index 102dd74f473..474a9726b76 100644 --- a/net/freeradius/patches/patch-ai +++ b/net/freeradius/patches/patch-ai @@ -1,10 +1,10 @@ -$NetBSD: patch-ai,v 1.11 2017/08/26 10:07:28 fhajny Exp $ +$NetBSD: patch-ai,v 1.12 2017/09/09 22:46:57 joerg Exp $ Portable test syntax ---- configure.orig 2016-09-29 15:19:48.000000000 +0000 +--- configure.orig 2017-07-17 12:43:00.000000000 +0000 +++ configure -@@ -9031,7 +9031,7 @@ fi +@@ -9047,7 +9047,7 @@ fi smart_prefix= @@ -13,7 +13,7 @@ Portable test syntax $as_echo "#define HAVE_PCAP_H 1" >>confdefs.h -@@ -9274,7 +9274,7 @@ fi +@@ -9290,7 +9290,7 @@ fi smart_prefix= @@ -22,7 +22,7 @@ Portable test syntax $as_echo "#define HAVE_COLLECTDC_H 1" >>confdefs.h -@@ -9517,7 +9517,7 @@ fi +@@ -9533,7 +9533,7 @@ fi smart_prefix= @@ -31,7 +31,58 @@ Portable test syntax $as_echo "#define HAVE_CAPABILITY_H 1" >>confdefs.h -@@ -12640,7 +12640,7 @@ subdirs="$subdirs $mysubdirs" +@@ -10133,7 +10133,49 @@ $as_echo "no" >&6; } + eval "ac_cv_type_${ac_safe_type}_has_ipi_addr=" + fi + +-if test "x$ac_cv_type_struct_in_pktinfo_has_ipi_addr" = "xyes"; then ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipi_spec_dst in struct in_pktinfo" >&5 ++$as_echo_n "checking for ipi_spec_dst in struct in_pktinfo... " >&6; } ++ ++ ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include <netinet/in.h> ++#ifdef HAVE_STDDEF_H ++#include <stddef.h> ++#endif ++#ifndef offsetof ++#define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER) ++#endif ++ ++int ++main () ++{ ++ int foo = offsetof(struct in_pktinfo, ipi_spec_dst) ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ has_element=" " ++else ++ has_element= ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++ ac_safe_type=`echo "struct in_pktinfo" | sed 'y% %_%'` ++ if test "x$has_element" != "x"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ eval "ac_cv_type_${ac_safe_type}_has_ipi_spec_dst=yes" ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ eval "ac_cv_type_${ac_safe_type}_has_ipi_spec_dst=" ++ fi ++ ++if test "$ac_cv_type_struct_in_pktinfo_has_ipi_addr" = "yes" && test "$ac_cv_type_struct_in_pktinfo_has_ipi_spec_dst" = "yes"; then + + $as_echo "#define HAVE_IP_PKTINFO /**/" >>confdefs.h + +@@ -12656,7 +12698,7 @@ subdirs="$subdirs $mysubdirs" diff --git a/net/freeradius/patches/patch-configure.ac b/net/freeradius/patches/patch-configure.ac new file mode 100644 index 00000000000..a3725bf06d5 --- /dev/null +++ b/net/freeradius/patches/patch-configure.ac @@ -0,0 +1,53 @@ +$NetBSD: patch-configure.ac,v 1.1 2017/09/09 22:46:57 joerg Exp $ + +Check if in_pkt_info has ipi_spec_dst before trying to use (NetBSD 8 doesn't). +Fix test syntax. + +--- configure.ac.orig 2017-07-17 12:43:00.000000000 +0000 ++++ configure.ac +@@ -1213,7 +1213,7 @@ else + dnl # + smart_try_dir="$pcap_include_dir" + FR_SMART_CHECK_INCLUDE([pcap.h]) +- if test "x$ac_cv_header_pcap_h" == "xyes"; then ++ if test "x$ac_cv_header_pcap_h" = "xyes"; then + AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.]) + AC_SUBST(PCAP_LIBS) + AC_SUBST(PCAP_LDFLAGS) +@@ -1231,7 +1231,7 @@ else + dnl # + smart_try_dir="$collectdclient_include_dir" + FR_SMART_CHECK_INCLUDE([collectd/client.h]) +- if test "x$ac_cv_header_collectd_client_h" == "xyes"; then ++ if test "x$ac_cv_header_collectd_client_h" = "xyes"; then + AC_DEFINE(HAVE_COLLECTDC_H, 1, [Define to 1 if you have the `collectdclient' library (-lcollectdclient).]) + AC_SUBST(COLLECTDC_LIBS) + AC_SUBST(COLLECTDC_LDFLAGS) +@@ -1251,7 +1251,7 @@ else + dnl # + smart_try_dir="$cap_include_dir" + FR_SMART_CHECK_INCLUDE([sys/capability.h]) +- if test "x$ac_cv_header_sys_capability_h" == "xyes"; then ++ if test "x$ac_cv_header_sys_capability_h" = "xyes"; then + AC_DEFINE(HAVE_CAPABILITY_H, 1, [Define to 1 if you have the <sys/capability.h> header file.]) + else + AC_MSG_WARN([cap headers not found, will not perform debugger checks. Use --with-cap-include-dir=<path>.]) +@@ -1511,7 +1511,8 @@ dnl # + dnl # struct ip_pktinfo + dnl # + FR_CHECK_STRUCT_HAS_MEMBER([#include <netinet/in.h>], [struct in_pktinfo], ipi_addr) +-if test "x$ac_cv_type_struct_in_pktinfo_has_ipi_addr" = "xyes"; then ++FR_CHECK_STRUCT_HAS_MEMBER([#include <netinet/in.h>], [struct in_pktinfo], ipi_spec_dst) ++if test "$ac_cv_type_struct_in_pktinfo_has_ipi_addr" = "yes" && test "$ac_cv_type_struct_in_pktinfo_has_ipi_spec_dst" = "yes"; then + AC_DEFINE(HAVE_IP_PKTINFO, [], [define if you have IP_PKTINFO (Linux)]) + fi + +@@ -2217,7 +2218,7 @@ dnl # Add -Werror last, so it doesn't i + dnl # test programs. + dnl # + dnl ############################################################# +-if test "x$werror" == "xyes"; then ++if test "x$werror" = "xyes"; then + CFLAGS="-Werror $CFLAGS" + fi + diff --git a/net/freeradius/patches/patch-src_lib_udpfromto.c b/net/freeradius/patches/patch-src_lib_udpfromto.c new file mode 100644 index 00000000000..a793b0e22bc --- /dev/null +++ b/net/freeradius/patches/patch-src_lib_udpfromto.c @@ -0,0 +1,21 @@ +$NetBSD: patch-src_lib_udpfromto.c,v 1.1 2017/09/09 22:46:57 joerg Exp $ + +Only use IP_PKTINFO if the configure checks for the necessary members +passed. + +--- src/lib/udpfromto.c.orig 2017-09-09 18:10:18.070426265 +0000 ++++ src/lib/udpfromto.c +@@ -386,11 +386,11 @@ int sendfromto(int s, void *buf, size_t + msgh.msg_name = to; + msgh.msg_namelen = tolen; + +-# if defined(IP_PKTINFO) || defined(IP_SENDSRCADDR) ++# if defined(HAVE_IP_PKTINFO) || defined(IP_SENDSRCADDR) + if (from->sa_family == AF_INET) { + struct sockaddr_in *s4 = (struct sockaddr_in *) from; + +-# ifdef IP_PKTINFO ++# ifdef HAVE_IP_PKTINFO + struct cmsghdr *cmsg; + struct in_pktinfo *pkt; + |