Changeset 1561:699c3fb0c57b in freeDiameter
- Timestamp:
- Jun 17, 2021, 1:44:45 AM (3 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 1 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
INSTALL.Fedora
r861 r1561 4 4 5 5 Dependencies on Fedora 13 (from minimal system): 6 # yum install cmake make gcc gcc-c++ flex bison lksctp-tools-devel gnutls-devel libgcrypt-devel libidn -devel6 # yum install cmake make gcc gcc-c++ flex bison lksctp-tools-devel gnutls-devel libgcrypt-devel libidn2-devel 7 7 8 8 In addition, if you have not already retrieved the latest source: -
INSTALL.FreeBSD
r921 r1561 35 35 4) Install 'flex' and 'bison', same way. 36 36 37 5) Install 'gnutls' and 'libidn ', same way also.37 5) Install 'gnutls' and 'libidn2', same way also. 38 38 39 39 6) Retrieve freeDiameter source code: -
INSTALL.OSX
r1288 r1561 40 40 41 41 2) Install dependencies: 42 $ brew install mercurial cmake gnutls libgcrypt postgres mysql libidn 42 $ brew install mercurial cmake gnutls libgcrypt postgres mysql libidn2 43 43 44 44 Notes: 45 * GNU IDN (libidn ) is optional, see below45 * GNU IDN (libidn2) is optional, see below 46 46 * When libusrsctp package is available, you can use it as well. 47 47 However, it requires some rework on the source code as libusrsctp is not fully -
INSTALL.OpenSUSE
r858 r1561 4 4 5 5 Dependencies on OpenSUSE 11.3 (from minimal server system installation): 6 # zypper install cmake make gcc gcc-c++ flex bison lksctp-tools-devel libgnutls-devel libgcrypt-devel libidn -devel6 # zypper install cmake make gcc gcc-c++ flex bison lksctp-tools-devel libgnutls-devel libgcrypt-devel libidn2-devel 7 7 # zypper install mercurial 8 8 -
INSTALL.Ubuntu
r1351 r1561 18 18 19 19 The following packages are required to compile freeDiameter from source: 20 cmake make gcc g++ flex bison libsctp1 libsctp-dev libgnutls-dev libgcrypt-dev libidn 11-dev20 cmake make gcc g++ flex bison libsctp1 libsctp-dev libgnutls-dev libgcrypt-dev libidn2-dev 21 21 22 (note that libidn and libsctp can be avoided by defining DISABLE_SCTP and DIAMID_IDNA_REJECT)22 (note that libidn2 and libsctp can be avoided by defining DISABLE_SCTP and DIAMID_IDNA_REJECT) 23 23 24 24 Additionnaly, these ones may be useful: … … 45 45 46 46 # Install the dependencies for building the source: 47 sudo apt-get -y install mercurial cmake make gcc g++ bison flex libsctp-dev libgnutls-dev libgcrypt-dev libidn 11-dev ssl-cert debhelper fakeroot \47 sudo apt-get -y install mercurial cmake make gcc g++ bison flex libsctp-dev libgnutls-dev libgcrypt-dev libidn2-dev ssl-cert debhelper fakeroot \ 48 48 libpq-dev libmysqlclient-dev libxml2-dev swig python-dev 49 49 … … 85 85 86 86 1) Install all packages dependencies 87 # sudo apt-get install mercurial cmake make gcc g++ bison flex libsctp-dev libgnutls-dev libgcrypt-dev libidn 11-dev87 # sudo apt-get install mercurial cmake make gcc g++ bison flex libsctp-dev libgnutls-dev libgcrypt-dev libidn2-dev 88 88 89 89 2) (OPTION) If you will compile modules that require postgresql, also install: -
INSTALL.pkgsrc
r1334 r1561 9 9 If you want to build and install freeDiameter from the repository, 10 10 you'll need to install: 11 pkg_add bison pkg-config libidn gnutls libgcrypt mercurial11 pkg_add bison pkg-config libidn2 gnutls libgcrypt mercurial 12 12 and follow the usual installation note. 13 13 -
contrib/RPM/freeDiameter.spec
r1224 r1561 11 11 12 12 BuildRequires: cmake make gcc gcc-c++ flex bison lksctp-tools-devel 13 BuildRequires: gnutls-devel libgcrypt-devel libidn -devel13 BuildRequires: gnutls-devel libgcrypt-devel libidn2-devel 14 14 BuildRequires: mercurial 15 15 Requires: lksctp-tools -
contrib/debian/control
r1310 r1561 5 5 Build-Depends: debhelper ( >= 7.3.9), 6 6 cmake, make, gcc, g++, bison, flex, 7 libsctp-dev, libgnutls-dev | gnutls-dev, libidn 11-dev,7 libsctp-dev, libgnutls-dev | gnutls-dev, libidn2-dev, 8 8 libpq-dev, libmysqlclient-dev, libxml2-dev, swig, python-dev, 9 9 libgcrypt11-dev | libgcrypt20-dev -
contrib/nightly_tests/prereqs.fedora
r1053 r1561 4 4 postgresql-server postgresql-devel 5 5 mysql-server mysql-devel 6 libxml2 libxml2-devel libidn -devel6 libxml2 libxml2-devel libidn2-devel 7 7 swig python-devel 8 8 -
include/freeDiameter/CMakeLists.txt
r1406 r1561 2 2 3 3 Project("freeDiameter includes directory" C) 4 5 INCLUDE(FindPkgConfig) 4 6 5 7 ######################## … … 136 138 SET(SCTP_LIBRARIES ${SCTP_LIBRARIES} PARENT_SCOPE) 137 139 138 # IDNA process: we use libidn from GNU (unless the function & header files are included in libc)140 # IDNA process: we use GNU libidn2 139 141 IF(NOT DIAMID_IDNA_IGNORE AND NOT DIAMID_IDNA_REJECT) 140 FIND_PACKAGE(IDNA) 141 SET(CHECK_IDNA_SOURCE_CODE " 142 #include <idna.h> 143 int main() { 144 return idna_to_ascii_8z(NULL, NULL, 0); 145 } 146 ") 147 SET(CMAKE_REQUIRED_INCLUDES ${IDNA_INCLUDE_DIR}) 148 SET(CMAKE_REQUIRED_LIBRARIES ${IDNA_LIBRARIES}) 149 CHECK_C_SOURCE_COMPILES("${CHECK_IDNA_SOURCE_CODE}" HAS_IDNA_SUPPORT) 150 IF(NOT HAS_IDNA_SUPPORT) 151 MESSAGE(SEND_ERROR "Unable to find idna.h header or idna_to_ascii_8z function, please install libidn-dev or equivalent, or set DIAMID_IDNA_IGNORE or DIAMID_IDNA_REJECT") 152 ENDIF(NOT HAS_IDNA_SUPPORT) 142 PKG_CHECK_MODULES(IDNA libidn2) 143 IF(NOT IDNA_FOUND) 144 MESSAGE(SEND_ERROR "Unable to find libidn2, please install libidn2-dev or equivalent, or set DIAMID_IDNA_IGNORE or DIAMID_IDNA_REJECT") 145 ENDIF() 153 146 ELSE (NOT DIAMID_IDNA_IGNORE AND NOT DIAMID_IDNA_REJECT) 154 147 MESSAGE(STATUS "Non-default Internationalized Domain Names (IDN) behavior selected (no stringprep).") 155 148 ENDIF(NOT DIAMID_IDNA_IGNORE AND NOT DIAMID_IDNA_REJECT) 156 SET(IDNA_INCLUDE_DIR ${IDNA_INCLUDE_DIR} PARENT_SCOPE)157 SET(IDNA_LIBRARIES ${IDNA_LIBRARIES} PARENT_SCOPE)158 149 159 150 … … 221 212 222 213 # LFDPROTO_LIBS = libraries required by the libfdproto. 223 SET(LFDPROTO_LIBS ${CLOCK_GETTIME_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${IDNA_LI BRARIES} PARENT_SCOPE)214 SET(LFDPROTO_LIBS ${CLOCK_GETTIME_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${IDNA_LINK_LIBRARIES} PARENT_SCOPE) 224 215 # And includes paths 225 SET(LFDPROTO_INCLUDES ${IDNA_INCLUDE_DIR } PARENT_SCOPE)216 SET(LFDPROTO_INCLUDES ${IDNA_INCLUDE_DIRS} PARENT_SCOPE) 226 217 # Dependencies: the libraries required by any code linking to libfdproto. 227 218 SET(LFDPROTO_LINK_INTERFACES ${CMAKE_THREAD_LIBS_INIT} PARENT_SCOPE) -
libfdproto/CMakeLists.txt
r1560 r1561 28 28 SET(LFDPROTO_SRC ${LFDPROTO_SRC} PARENT_SCOPE) 29 29 30 # Include path31 INCLUDE_DIRECTORIES(${LFDPROTO_INCLUDES})32 33 30 # Build as a shared library 34 31 ADD_LIBRARY(libfdproto SHARED ${LFDPROTO_SRC}) 32 33 # Include path 34 TARGET_INCLUDE_DIRECTORIES(libfdproto PRIVATE /a/b/c ${LFDPROTO_INCLUDES}) 35 35 36 36 ADD_DEPENDENCIES(libfdproto version_information) -
libfdproto/ostr.c
r1127 r1561 37 37 38 38 #if (!defined(DIAMID_IDNA_IGNORE) && !defined(DIAMID_IDNA_REJECT)) 39 /* Process IDNA with stringprep -- See RFC5890 -- and libidn documentation... */40 #include <idn a.h> /* idna_to_ascii_8z() */39 /* Process IDNA with stringprep -- See RFC5890 -- and libidn2 documentation... */ 40 #include <idn2.h> /* idn2_to_ascii_8z() */ 41 41 #endif /* !defined(DIAMID_IDNA_IGNORE) && !defined(DIAMID_IDNA_REJECT) */ 42 42 … … 227 227 } 228 228 229 ret = idn a_to_ascii_8z ( *id, &processed, IDNA_USE_STD3_ASCII_RULES );230 if (ret == IDN A_SUCCESS) {229 ret = idn2_to_ascii_8z ( *id, &processed, IDNA_USE_STD3_ASCII_RULES ); 230 if (ret == IDN2_OK) { 231 231 TRACE_DEBUG(INFO, "The string '%s' is not a valid DiameterIdentity, it was changed to '%s'", *id, processed); 232 232 if (memory == 0) … … 236 236 /* Done! */ 237 237 } else { 238 TRACE_DEBUG(INFO, "The string '%s' is not a valid DiameterIdentity and cannot be sanit anized: %s", *id, idna_strerror (ret));238 TRACE_DEBUG(INFO, "The string '%s' is not a valid DiameterIdentity and cannot be sanitized: %s", *id, idn2_strerror (ret)); 239 239 return EINVAL; 240 240 }
Note: See TracChangeset
for help on using the changeset viewer.