pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/freeradius Fix build on NetBSD 8+. Fix Perl use.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b1f5de13097a
branches:  trunk
changeset: 368001:b1f5de13097a
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sat Sep 09 22:46:57 2017 +0000

description:
Fix build on NetBSD 8+. Fix Perl use.

diffstat:

 net/freeradius/Makefile                          |   5 +-
 net/freeradius/distinfo                          |   6 +-
 net/freeradius/patches/patch-ai                  |  63 +++++++++++++++++++++--
 net/freeradius/patches/patch-configure.ac        |  53 ++++++++++++++++++++
 net/freeradius/patches/patch-src_lib_udpfromto.c |  21 ++++++++
 5 files changed, 139 insertions(+), 9 deletions(-)

diffs (216 lines):

diff -r 8913a06b1fe6 -r b1f5de13097a net/freeradius/Makefile
--- a/net/freeradius/Makefile   Sat Sep 09 22:45:59 2017 +0000
+++ b/net/freeradius/Makefile   Sat Sep 09 22:46:57 2017 +0000
@@ -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 @@
                        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 -r 8913a06b1fe6 -r b1f5de13097a net/freeradius/distinfo
--- a/net/freeradius/distinfo   Sat Sep 09 22:45:59 2017 +0000
+++ b/net/freeradius/distinfo   Sat Sep 09 22:46:57 2017 +0000
@@ -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 -r 8913a06b1fe6 -r b1f5de13097a net/freeradius/patches/patch-ai
--- a/net/freeradius/patches/patch-ai   Sat Sep 09 22:45:59 2017 +0000
+++ b/net/freeradius/patches/patch-ai   Sat Sep 09 22:46:57 2017 +0000
@@ -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 @@
  
  $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 @@
  
  $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 @@
  
  $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 -r 8913a06b1fe6 -r b1f5de13097a net/freeradius/patches/patch-configure.ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/freeradius/patches/patch-configure.ac Sat Sep 09 22:46:57 2017 +0000
@@ -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 -r 8913a06b1fe6 -r b1f5de13097a net/freeradius/patches/patch-src_lib_udpfromto.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/freeradius/patches/patch-src_lib_udpfromto.c  Sat Sep 09 22:46:57 2017 +0000
@@ -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;
+ 



Home | Main Index | Thread Index | Old Index