05/35: postfix: fix send mail failure and eliminate warning
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
It fails here now:
Updating TOPDIR/BUILD/postfix/3.2.2-r0/image/usr/share/doc/postfix/XFORWARD_README...
newaliases: fatal: chdir /var/spool/postfix: No such file or directory
WARNING: exit code 75 from a shell command.
ERROR: Function failed: do_install (log file is located at TOPDIR/BUILD/postfix/3.2.2-r0/temp/log.do_install.15748)
Quoted 192 lines · On Mon, Jan 8, 2018 at 8:40 PM, <[email protected]> wrote:
This is an automated email from the git hooks/post-receive script.
joe_macdonaldpushed a commit to branch master
in repository meta-openembedded.commit
e1221e7aa4c66dbd279f4460f3314679f720287f
Author: Yi Zhao <[email protected]>
AuthorDate: Thu Oct 26 14:43:31 2017 -0700postfix: fix send mail failure and eliminate warning
* Update main.cf for postfix 3.x to eliminate startup warning
* Setdaemon_directoryfrom ${libexecdir} to ${libexecdir}/postfix
* Using absolute path for newaliases and postmap to generate the
correct
db file inpkg_postinst
* Remove duplicateSRC_URIlines in postfix_3.2.2.bb(LOCAL REV: NOT UPSTREAM) -- will sent to oe-devel later
Signed-off-by Yi Zhao <[email protected]>* Move use of newaliases and postmap on host to install phase because absolute path might not exist at rootfs build time.
Signed-off-by Joe Slater <[email protected]>Signed-off-by Armin Kuster <[email protected]>Signed-off-by Joe MacDonald <[email protected]>--- .../postfix/files/{main.cf_2.0 => main.cf} | 3 +++ .../recipes-daemons/postfix/postfix.inc | 28 ++++++++++++---------- .../recipes-daemons/postfix/postfix_3.2.2.bb | 17 ++++--------- 3 files changed, 22 insertions(+), 26 deletions(-)meta-networking/recipes-daemons/postfix/files/main.cf renamed from meta-networking/recipes-daemons/postfix/files/main.cf_2.0 +3
-0@@ -1,3 +1,6 @@ +compatibility_level = 2 +smtputf8_enable = no + # Configure your domain and accounts #mydomain=sample.com #FQDN from gethostnamemeta-networking/recipes-daemons/postfix/postfix.inc +0
-0@@ -18,7 +18,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=
64375f37431336ea1b1b3005fe3fa354"
SRC_URI= "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \ file://makedefs.patch \ file://install.patch \meta-networking/recipes-daemons/postfix/postfix.inc +2
-2- file://main.cf_2.0 \ + file://main.cf \ file://postfix \ file://internal_recipient \ file://postfix.service \@@ -135,7 +135,7 @@ SYSTEMD_SERVICE_${PN} = "postfix.service" do_install () { sh ./postfix-install 'install_root=${D}' \ 'config_directory=${sysconfdir}/postfix' \ - 'daemon_directory=${libexecdir}' \ + 'daemon_directory=${libexecdir}/postfix' \ 'command_directory=${sbindir}' \ 'queue_directory=${localstatedir}/spool/postfix' \ 'sendmail_path=${sbindir}/sendmail.postfix' \@@ -149,8 +149,8 @@ do_install () { mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/sample-main.cf
install -m 755 ${S}/bin/smtp-sink ${D}/${sbindir}/ install -d ${D}${sysconfdir}/init.d- install -m 644 ${WORKDIR}/main.cf_2.0 ${D}${sysconfdir}/postfix/main
.cf
- sed -i 's#@LIBEXECDIR@#${libexecdir}#' ${D}${sysconfdir}/postfix/main
.cfmeta-networking/recipes-daemons/postfix/postfix.inc +2
-0+ install -m 644 ${WORKDIR}/main.cf ${D}${sysconfdir}/postfix/main.cf + sed -i 's#@LIBEXECDIR@#${libexecdir}/postfix#'${D}${sysconfdir}/postfix/main.cf
install -m 755 ${WORKDIR}/check_hostname.sh ${D}${sbindir}/meta-networking/recipes-daemons/postfix/postfix.inc +0
-0@@ -159,11 +159,11 @@ do_install () { install -d ${D}${systemd_unitdir}/system install -m 0644 ${WORKDIR}/postfix.service${D}${systemd_unitdir}/system
- sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g'
${D}${systemd_unitdir}/system/postfix.service
+ sed -i -e 's#@LIBEXECDIR@#${libexecdir}/postfix#g'
${D}${systemd_unitdir}/system/postfix.servicesed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/postfix.service sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/postfix.service
meta-networking/recipes-daemons/postfix/postfix.inc +1
-1- install -m 0755 ${WORKDIR}/aliasesdb ${D}${libexecdir} + install -m 0755 ${WORKDIR}/aliasesdb ${D}${libexecdir}/postfix install -m 770 -d ${D}${localstatedir}/spool/postfix chown postfix:postfix ${D}${localstatedir}/spool/postfix@@ -217,6 +217,12 @@ do_install_append_class-native() { do_install_append_class-target() { # Remove references to buildmachine paths in target makedefs.out sed -i 's:-fdebug-prefix-map[^ ]*::g; s:--sysroot=${STAGING_DIR_TARGET}::g'${D}/etc/postfix/makedefs.out
+ # Since we are building recipe postfix, newaliases and postmap come
from oursysroot_native.meta-networking/recipes-daemons/postfix/postfix.inc +5
-5+ touch ${D}/etc/aliases + newaliases -C ${D}/etc/postfix/main.cf -oA${D}/etc/aliases + touch ${D}/etc/postfix/virtual_alias + postmap -c ${D}/etc/postfix ${D}/etc/postfix/virtual_alias + } NATIVE_INSTALL_WORKS = "1"@@ -240,13 +246,8 @@ pkg_postinst_${PN} () { touch /etc/postfix/virtual_alias postmap /etc/postfix/virtual_alias else - touch $D/etc/aliases - newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases - touch $D/etc/postfix/virtual_alias - postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias - if ${@'true' if 'linuxstdbase' in d.getVar('DISTROOVERRIDES',False) else 'false'}; then
meta-networking/recipes-daemons/postfix/postfix.inc +1
-1- # /usr/lib/sendmial is required by LSB core test + # /usr/lib/sendmail is required by LSB core test [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail$D/usr/lib/
fi
fimeta-networking/recipes-daemons/postfix/postfix.inc +2
-1@@ -255,4 +256,5 @@ pkg_postinst_${PN} () { # Exclude .debug directories from the main package FILES_${PN} = "${sysconfdir} ${localstatedir} ${bindir}/* ${sbindir}/* \ ${libexecdir}/* ${systemd_unitdir}/*" -FILES_${PN}-dbg += "${libexecdir}/.debug" +CONFFILES_${PN} = "/etc/aliases /etc/postfix/virtual_alias*" +FILES_${PN}-dbg += "${libexecdir}/postfix/.debug"meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb +1
-13@@ -1,18 +1,9 @@ require postfix.inc -SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/ official/postfix-${PV}.tar.gz \ - file://makedefs.patch \ - file://install.patch \ - file://main.cf_2.0 \ - file://postfix \ - file://internal_recipient \ - file://postfix.service \ - file://aliasesdb \ - file://check_hostname.sh \ - file://0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch \ - file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch \ - file://postfix-install.patch \ - file://icu-config.patch \ +SRC_URI += "file://0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch\
+ file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch
\meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb +2
-0+ file://postfix-install.patch \ + file://icu-config.patch \ " SRC_URI[md5sum] = "aea073a9b0bea5bdb590460a270a4aa0" SRC_URI[sha256sum] = "d06849418d119d09366997b2b481bb
23f737629769b4e4a52da42fb3ad8b0576"--
To stop receiving notification emails like this one, please contact the administrator of this repository.
--
_______________________________________________
Openembedded-commits mailing list [email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [oe-commits] [meta-openembedded] 09/35: freediameter: add new recipe
It causes new QA warnings/errors:
ERROR: QA Issue: freediameter rdepends on kernel-module-ipip, but it isn't a build dependency? [build-deps]
ERROR: QA Issue: freediameter rdepends on kernel-module-sctp, but it isn't a build dependency? [build-deps]
ERROR: QA Issue: freediameter rdepends on kernel-module-tipc, but it isn't a build dependency? [build-deps]
ERROR: QA Issue: freediameter rdepends on kernel-module-udp-tunnel, but it isn't a build dependency? [build-deps]
Quoted 991 lines · On Mon, Jan 8, 2018 at 8:40 PM, <[email protected]> wrote:
This is an automated email from the git hooks/post-receive script.
joe_macdonaldpushed a commit to branch master
in repository meta-openembedded.commit
ba8543aeee6b97b31e66c261563a197cd0be87e3
Author: Jackie Huang <[email protected]>
AuthorDate: Wed Nov 1 09:23:39 2017 -0400freediameter: add new recipe
freeDiameter is an open source Diameter protocol implementation. It provides an extensible platform for deploying a Diameter network for your Authentication, Authorization and Accounting needs.
Signed-off-by Jackie Huang <[email protected]>Signed-off-by Joe MacDonald <[email protected]>Signed-off-by Armin Kuster <[email protected]>Signed-off-by Joe MacDonald <[email protected]>--- ...murhash-algorithm-with-Robert-Jenkin-s-ha.patch | 223 ++++++++++++++++++ .../freediameter/files/freeDiameter.conf | 250 +++++++++++++++++++++ .../freediameter/files/freediameter.init | 72 ++++++ .../freediameter/files/freediameter.service | 11 + .../freediameter/files/install_test.patch | 22 ++ .../freediameter/files/pass-ptest-env.patch | 72 ++++++ .../recipes-protocols/freediameter/files/run-ptest | 11 + .../freediameter/freediameter_1.2.1.bb | 136 +++++++++++ 8 files changed, 797 insertions(+)(quoted diff) +0
-0Replace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch b/meta-networking/recipes-protocols/freediameter/files/ Replace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch new file mode 100644
index 0000000..71a5a1ameta-networking/recipes-protocols/freediameter/files/ new file +0
-0Replace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch
meta-networking/recipes-protocols/freediameter/files/ new file +21
-1@@ -0,0 +1,223 @@ +Replace murmurhash algorithm with Robert Jenkin's hash algorithm + +Upstream-Status: Pending + +From test result, murmurhash algorithm does not work in big endian +processor, so replace it with Robert Jenkin's hash which has worked +in linux kernel for many years and has more adaptability. + +Signed-off-by: Roy.Li <[email protected]> +--- + libfdproto/ostr.c | 192 +++++++++++++++++++++--------- ----------------------- + 1 file changed, 74 insertions(+), 118 deletions(-) + +diff --git a/libfdproto/ostr.c b/libfdproto/ostr.c +index 8f29b48..ce1f4dd 100644 +--- a/libfdproto/ostr.c ++++ b/libfdproto/ostr.c +@@ -430,128 +430,84 @@ after_proto: + + + /********************************************************************************************************/
+-/* Hash function -- credits to Austin Appleby, thank you ^^ */ +-/* See http://murmurhash.googlepages.com for more information on this function */ +- +-/* the strings are NOT always aligned properly (ex: received in RADIUS message), so we use the aligned MurmurHash2 function as needed */ +-#define _HASH_MIX(h,k,m) { k *= m; k ^= k >> r; k *= m; h *= m; h ^= k; } +-uint32_t fd_os_hash ( uint8_t * string, size_t len )++/*
++ * Robert Jenkin's hash function.
++ * http://burtleburtle.net/bob/hash/evahash.html
++ * This is in the public domain.
++ */++#define mix(a, b, c) \ ++ do { \ ++ a = a - b; a = a - c; a = a ^ (c >> 13); \ ++ b = b - c; b = b - a; b = b ^ (a << 8); \ ++ c = c - a; c = c - b; c = c ^ (b >> 13); \ ++ a = a - b; a = a - c; a = a ^ (c >> 12); \ ++ b = b - c; b = b - a; b = b ^ (a << 16); \ ++ c = c - a; c = c - b; c = c ^ (b >> 5); \ ++ a = a - b; a = a - c; a = a ^ (c >> 3); \ ++ b = b - c; b = b - a; b = b ^ (a << 10); \ ++ c = c - a; c = c - b; c = c ^ (b >> 15); \++ } while (0)
++
++unsignedhash_rjenkins(const char *str, unsigned length)
+ {+- uint32_t hash = len; +- uint8_t * data = string; +- +- const unsigned int m = 0x5bd1e995; +- const int r = 24; +- int align = (long)string & 3; +- +- if (!align || (len < 4)) { +- /* In case data is aligned, MurmurHash2 function */ +- while(len >= 4) +- { +- /* Mix 4 bytes at a time into the hash */ +- uint32_t k = *(uint32_t *)data; /* We don't care about the byte order */ +- +- _HASH_MIX(hash, k, m); +- +- data += 4; +- len -= 4; +- } +- +- /* Handle the last few bytes of the input */ +- switch(len) { +- case 3: hash ^= data[2] << 16; +- case 2: hash ^= data[1] << 8; +- case 1: hash ^= data[0]; +- hash *= m; +- } +- +- } else { +- /* Unaligned data, use alignment-safe slower version */ +- +- /* Pre-load the temp registers */ +- uint32_t t = 0, d = 0; +- switch(align) +- { +- case 1: t |= data[2] << 16; +- case 2: t |= data[1] << 8; +- case 3: t |= data[0]; +- } +- t <<= (8 * align); +- +- data += 4-align; +- len -= 4-align; +- +- /* From this point, "data" can be read by chunks of 4 bytes */ +- +- int sl = 8 * (4-align); +- int sr = 8 * align; +- +- /* Mix */ +- while(len >= 4) +- { +- uint32_t k; +- +- d = *(unsigned int *)data; +- k = (t >> sr) | (d << sl); +- +- _HASH_MIX(hash, k, m); +- +- t = d; +- +- data += 4; +- len -= 4; +- } +- +- /* Handle leftover data in temp registers */ +- d = 0; +- if(len >= align) +- { +- uint32_t k; +- +- switch(align) +- { +- case 3: d |= data[2] << 16; +- case 2: d |= data[1] << 8; +- case 1: d |= data[0]; +- } +- +- k = (t >> sr) | (d << sl); +- _HASH_MIX(hash, k, m); +- +- data += align; +- len -= align; +- +- /* Handle tail bytes */ +- +- switch(len) +- { +- case 3: hash ^= data[2] << 16; +- case 2: hash ^= data[1] << 8; +- case 1: hash ^= data[0]; +- hash *= m; +- }; +- } +- else +- { +- switch(len) +- { +- case 3: d |= data[2] << 16; +- case 2: d |= data[1] << 8; +- case 1: d |= data[0]; +- case 0: hash ^= (t >> sr) | (d << sl); +- hash *= m; +- } +- } +- ++ const unsigned char *k = (const unsigned char *)str; ++ uint32_t a, b, c; /* the internal state */ ++ uint32_t len; /* how many key bytes still need mixing */ ++ ++ /* Set up the internal state */ ++ len = length; ++ a = 0x9e3779b9; /* the golden ratio; an arbitrary value */ ++ b = a; ++ c = 0; /* variable initialization of internal state*/
++
++ /* handle most of the key */
++ while (len >= 12) {
++ a = a + (k[0] + ((uint32_t)k[1] << 8) + ((uint32_t)k[2] <<
16) +
++ ((uint32_t)k[3] << 24));
++ b = b + (k[4] + ((uint32_t)k[5] << 8) + ((uint32_t)k[6] <<
16) +
++ ((uint32_t)k[7] << 24));
++ c = c + (k[8] + ((uint32_t)k[9] << 8) + ((uint32_t)k[10]
<< 16) +
++ ((uint32_t)k[11] << 24));++ mix(a, b, c); ++ k = k + 12; ++ len = len - 12; ++ } + ++ /* handle the last 11 bytes */ ++ c = c + length; ++ switch (len) { /* all the case statements fall through*/
++ case 11:
++ c = c + ((uint32_t)k[10] << 24);
++ case 10:
++ c = c + ((uint32_t)k[9] << 16);
++ case 9:
++ c = c + ((uint32_t)k[8] << 8);
++ /* the first byte of c is reserved for the length */
++ case 8:
++ b = b + ((uint32_t)k[7] << 24);
++ case 7:
++ b = b + ((uint32_t)k[6] << 16);
++ case 6:
++ b = b + ((uint32_t)k[5] << 8);
++ case 5:
++ b = b + k[4];
++ case 4:
++ a = a + ((uint32_t)k[3] << 24);
++ case 3:
++ a = a + ((uint32_t)k[2] << 16);
++ case 2:
++ a = a + ((uint32_t)k[1] << 8);
++ case 1:
++ a = a + k[0];
++ /* case 0: nothing left to add */meta-networking/recipes-protocols/freediameter/files/ new file +20
-0+ } ++ mix(a, b, c); + +- /* Do a few final mixes of the hash to ensure the last few +- bytes are well-incorporated. */ +- hash ^= hash >> 13; +- hash *= m; +- hash ^= hash >> 15; ++ return c; ++} + +- return hash; ++uint32_t fd_os_hash ( uint8_t * string, size_t len ) ++{ ++ return hash_rjenkins(string, len); + } + +-- +1.7.10.4 +meta-networking/recipes-protocols/freediameter/files/ new file +0
-0freeDiameter.conf
meta-networking/recipes-protocols/freediameter/files/ new file +3
-0@@ -0,0 +1,250 @@ +# This is a sample configuration file for freeDiameter daemon. + +# Most of the options can be omitted, as they default to reasonablevalues.
meta-networking/recipes-protocols/freediameter/files/ new file +5
-0+# Only TLS-related options must be configured properly in usual setups. + +# It is possible to use "include" keyword to import additional files +# e.g.: include "/etc/freeDiameter.d/*.conf" +# This is exactly equivalent as copy & paste the content of the includedfile(s)
meta-networking/recipes-protocols/freediameter/files/ new file +19
-0+# where the "include" keyword is found. + + +############################################################## +## Peer identity and realm + +# The Diameter Identity of this daemon. +# This must be a valid FQDN that resolves to the local host. +# Default: hostname's FQDN +#Identity = "aaa.koganei.freediameter.net"; + +# The Diameter Realm of this daemon. +# Default: the domain part of Identity (after the first dot). +#Realm = "koganei.freediameter.net"; + +############################################################## +## Transport protocol configuration + +# The port this peer is listening on for incoming connections (TCP andSCTP).
meta-networking/recipes-protocols/freediameter/files/ new file +4
-0+# Default: 3868. Use 0 to disable. +#Port = 3868; + +# The port this peer is listening on for incoming TLS-protectedconnections (TCP and SCTP).
meta-networking/recipes-protocols/freediameter/files/ new file +2
-0+# See TLS_old_method for more information about TLS flavours. +# Note: we use TLS/SCTP instead of DTLS/SCTP at the moment. This willchange in future version of freeDiameter.
meta-networking/recipes-protocols/freediameter/files/ new file +4
-0+# Default: 5868. Use 0 to disable. +#SecPort = 5868; + +# Use RFC3588 method for TLS protection, where TLS is negociated afterCER/CEA exchange is completed
+# on the unsecure connection. The alternative is RFC6733 mechanism, where TLS protects also themeta-networking/recipes-protocols/freediameter/files/ new file +3
-0+# CER/CEA exchange on a dedicated secure port. +# This parameter only affects outgoing connections. +# The setting can be also defined per-peer (see Peers configurationsection).
meta-networking/recipes-protocols/freediameter/files/ new file +11
-0+# Default: use RFC6733 method with separate port for TLS. +#TLS_old_method; + +# Disable use of TCP protocol (only listen and connect over SCTP) +# Default : TCP enabled +#No_TCP; + +# Disable use of SCTP protocol (only listen and connect over TCP) +# Default : SCTP enabled +#No_SCTP; +# This option is ignored if freeDiameter is compiled with DISABLE_SCTPoption.
meta-networking/recipes-protocols/freediameter/files/ new file +50
-0+ +# Prefer TCP instead of SCTP for establishing new connections. +# This setting may be overwritten per peer in peer configuration blocs. +# Default : SCTP is attempted first. +#Prefer_TCP; + +# Default number of streams per SCTP associations. +# This setting may be overwritten per peer basis. +# Default : 30 streams +#SCTP_streams = 30; + +############################################################## +## Endpoint configuration + +# Disable use of IP addresses (only IPv6) +# Default : IP enabled +#No_IP; + +# Disable use of IPv6 addresses (only IP) +# Default : IPv6 enabled +#No_IPv6; + +# Specify local addresses the server must bind to +# Default : listen on all addresses available. +#ListenOn = "202.249.37.5"; +#ListenOn = "2001:200:903:2::202:1"; +#ListenOn = "fe80::21c:5ff:fe98:7d62%eth0"; + + +############################################################## +## Server configuration + +# How many Diameter peers are allowed to be connecting at the same time ? +# This parameter limits the number of incoming connections from the time +# the connection is accepted until the first CER is received. +# Default: 5 unidentified clients in paralel. +#ThreadsPerServer = 5; + +############################################################## +## TLS Configuration + +# TLS is managed by the GNUTLS library in the freeDiameter daemon. +# You may find more information about parameters and special behaviors +# in the relevant documentation. +# http://www.gnu.org/software/gnutls/manual/ + +# Credentials of the local peer +# The X509 certificate and private key file to use for the local peer. +# The files must contain PKCS-1 encoded RSA key, in PEM format. +# (These parameters are passed to gnutls_certificate_set_x509_key_filefunction)
meta-networking/recipes-protocols/freediameter/files/ new file +3
-0+# Default : NO DEFAULT +#TLS_Cred = "<x509 certif file.PEM>" , "<x509 private key file.PEM>"; +#TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key";
meta-networking/recipes-protocols/freediameter/files/ new file +3
-0+ +# Certificate authority / trust anchors +# The file containing the list of trusted Certificate Authorities (PEMlist)
+# (This parameter is passed tognutls_certificate_set_x509_trust_filefunction)meta-networking/recipes-protocols/freediameter/files/ new file +7
-0+# The directive can appear several times to specify several files. +# Default : GNUTLS default behavior +#TLS_CA = "<file.PEM>"; + +# Certificate Revocation List file +# The information about revoked certificates. +# The file contains a list of trusted CRLs in PEM format. They shouldhave been verified before.
+# (This parameter is passed tognutls_certificate_set_x509_crl_filefunction)
+# Note: openssl CRL format might have interoperability issue with GNUTLS format.meta-networking/recipes-protocols/freediameter/files/ new file +6
-0+# Default : GNUTLS default behavior +#TLS_CRL = "<file.PEM>"; + +# GNU TLS Priority string +# This string allows to configure the behavior of GNUTLS key exchanges +# algorithms. See gnutls_priority_init function documentation forinformation.
meta-networking/recipes-protocols/freediameter/files/ new file +4
-0+# You should also refer to the Diameter required TLS support here: +# http://tools.ietf.org/html/rfc6733#section-13.1 +# Default : "NORMAL" +# Example: TLS_Prio = "NONE:+VERS-TLS1.1:+AES-128-CBC:+RSA:+SHA1:+COMP-NULL";
meta-networking/recipes-protocols/freediameter/files/ new file +23
-0+#TLS_Prio = "NORMAL"; + +# Diffie-Hellman parameters size +# Set the number of bits for generated DH parameters +# Valid value should be 768, 1024, 2048, 3072 or 4096. +# (This parameter is passed to gnutls_dh_params_generate2 function, +# it usually should match RSA key size) +# Default : 1024 +#TLS_DH_Bits = 1024; + +# Alternatively, you can specify a file to load the PKCS#3 encoded +# DH parameters directly from. This accelerates the daemon start +# but is slightly less secure. If this file is provided, the +# TLS_DH_Bits parameters has no effect. +# Default : no default. +#TLS_DH_File = "<file.PEM>"; + + +############################################################## +## Timers configuration + +# The Tc timer of this peer. +# It is the delay before a new attempt is made to reconnect adisconnected peer.
meta-networking/recipes-protocols/freediameter/files/ new file +6
-0+# The value is expressed in seconds. The recommended value is 30 seconds. +# Default: 30 +#TcTimer = 30; + +# The Tw timer of this peer. +# It is the delay before a watchdog message is sent, as described in RFC3539.
+# The value is expressed in seconds. The default value is 30 seconds. Value mustmeta-networking/recipes-protocols/freediameter/files/ new file +11
-0+# be greater or equal to 6 seconds. See details in the RFC. +# Default: 30 +#TwTimer = 30; + +############################################################## +## Applications configuration + +# Disable the relaying of Diameter messages? +# For messages not handled locally, the default behavior is to forward the +# message to another peer if any is available, according to the routing +# algorithms. In addition the "0xffffff" application is advertised inCER/CEA
meta-networking/recipes-protocols/freediameter/files/ new file +5
-0+# exchanges. +# Default: Relaying is enabled. +#NoRelay; + +# Number of server threads that can handle incoming messages at the sametime.
meta-networking/recipes-protocols/freediameter/files/ new file +17
-0+# Default: 4 +#AppServThreads = 4; + +# Other applications are configured by loaded extensions. + +############################################################## +## Extensions configuration + +# The freeDiameter framework merely provides support for +# Diameter Base Protocol. The specific application behaviors, +# as well as advanced functions, are provided +# by loadable extensions (plug-ins). +# These extensions may in addition receive the name of a +# configuration file, the format of which is extension-specific. +# +# Format: +#LoadExtension = "/path/to/extension" [ : "/optional/configuration/file"] ;
meta-networking/recipes-protocols/freediameter/files/ new file +8
-0+# +# Examples: +#LoadExtension = "extensions/sample.fdx"; +#LoadExtension = "extensions/sample.fdx":"conf/sample.conf"; + +# Extensions are named as follow: +# dict_* for extensions that add content to the dictionary definitions. +# dbg_* for extensions useful only to retrieve more information on theframework execution.
+# acl_* : Access control list, to control which peers are allowed to connect.
+# rt_* : routing extensions that impact how messages are forwarded to
other peers.
+# app_* : applications, these extensions usually register callbacks to handle specific messages.meta-networking/recipes-protocols/freediameter/files/ new file +4
-0+# test_* : dummy extensions that are useful only in testing environments. + + +# The dbg_msg_dump.fdx extension allows you to tweak the way freeDiameterdisplays some
+# information about some events. This extension does not actually use a configuration file
+# but receives directly a parameter in the string passed to the extension. Here are some examples:
+## LoadExtension = "dbg_msg_dumps.fdx" : "0x1111"; # Removes all default hooks, very quiet even in case of errors.
+## LoadExtension = "dbg_msg_dumps.fdx" : "0x2222"; # Display all events with few details.
+## LoadExtension = "dbg_msg_dumps.fdx" : "0x0080"; # Dump complete information about sent and received messages.
+# The four digits respectively control: connections, routing decisions, sent/received messages, errors.meta-networking/recipes-protocols/freediameter/files/ new file +6
-0+# The values for each digit are: +# 0 - default - keep the default behavior +# 1 - quiet - remove any specific log +# 2 - compact - display only a summary of the information +# 4 - full - display the complete information on a single long line +# 8 - tree - display the complete information in an easier to readformat spanning several lines.
meta-networking/recipes-protocols/freediameter/files/ new file +7
-0+ + +############################################################## +## Peers configuration + +# The local server listens for incoming connections. By default, +# all unknown connecting peers are rejected. Extensions can override thisbehavior (e.g.,
acl_wl).meta-networking/recipes-protocols/freediameter/files/ new file +14
-0+# +# In addition to incoming connections, the local peer can +# be configured to establish and maintain connections to some +# Diameter nodes and allow connections from these nodes. +# This is achieved with the ConnectPeer directive described below. +# +# Note that the configured Diameter Identity MUST match +# the information received inside CEA, or the connection will be aborted. +# +# Format: +#ConnectPeer = "diameterid" [ { parameter1; parameter2; ...} ] ; +# Parameters that can be specified in the peer's parameter list: +# No_TCP; No_SCTP; No_IP; No_IPv6; Prefer_TCP; TLS_old_method; +# No_TLS; # assume transparent security instead of TLS. DTLS isnot supported yet (will change in future versions).
meta-networking/recipes-protocols/freediameter/files/ new file +7
-0+# Port = 5868; # The port to connect to +# TcTimer = 30; +# TwTimer = 30; +# ConnectTo = "202.249.37.5"; +# ConnectTo = "2001:200:903:2::202:1"; +# TLS_Prio = "NORMAL"; +# Realm = "realm.net"; # Reject the peer if it does not advertise thisrealm.
meta-networking/recipes-protocols/freediameter/files/ new file +3
-0+# Examples: +#ConnectPeer = "aaa.wide.ad.jp"; +#ConnectPeer = "old.diameter.serv" { TcTimer = 60; TLS_old_method;
No_SCTP; Port=3868; } ;meta-networking/recipes-protocols/freediameter/files/ new file +1
-0+##############################################################meta-networking/recipes-protocols/freediameter/files/ new file +0
-0freediameter.init
meta-networking/recipes-protocols/freediameter/files/ new file +11
-0@@ -0,0 +1,72 @@ +#!/bin/sh +# +### BEGIN INIT INFO +# Provides: freediameter +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Short-Description: Start freeDiameter daemon at boot time +# Description: Start the freeDiameter daemon at boot time. +# freeDiameter is an extensible implementation of the Diameterprotocol,
+# designed for Authentication, Authorization and Accounting.
Diameter ismeta-networking/recipes-protocols/freediameter/files/ new file +60
-0+# an evolution of the RADIUS protocol. +### END INIT INFO# +DAEMON=/usr/bin/freeDiameterd +CONF=/etc/freeDiameter/freeDiameter.conf +NAME=freediameter +DESC="freeDiameter daemon" + +. /etc/init.d/functions +start() { + [ -x $DAEMON ] || exit 5 + echo -n $"Starting $DAEMON: " + start-stop-daemon -S -b -x ${DAEMON} && success || failure + retval=$? + echo "" + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + start-stop-daemon -K -x $DAEMON + retval=$? + echo "" + return $retval +} + +restart() { + stop + sleep 3 + start +} + +rh_status() { + status $DAEMON +} + +rh_status_q() { + rh_status > /dev/null 2>&1 +} + +case "$1" in + start) + rh_status_q && exit 0 + start + ;; + stop) + rh_status_q || exit 0 + stop + ;; + restart) + restart + ;; + status) + rh_status + ;; + *) + echo $"Usage: $prog {start|stop|status|restart}" + exit 2 +esac + +exit $?meta-networking/recipes-protocols/freediameter/files/ renamed from meta-networking/recipes-protocols/freediameter/files/freediameter.service +0
-0freediameter.service
new file mode 100644
index 0000000..514481bmeta-networking/recipes-protocols/freediameter/files/ new file +0
-0freediameter.service
meta-networking/recipes-protocols/freediameter/files/ new file +11
-0@@ -0,0 +1,11 @@ +[Unit] +Description=freediameter daemon +After=network.target + +[Service] +Type=simple +PIDFile=/var/run/freediameter.pid +ExecStart=@BINDIR@/freeDiameterd + +[Install] +WantedBy=multi-user.targetmeta-networking/recipes-protocols/freediameter/files/ new file +0
-0install_test.patch
meta-networking/recipes-protocols/freediameter/files/ new file +18
-0@@ -0,0 +1,22 @@ +CMakeLists: add an option to install tests + +Upstream-Status: Inappropriate [OE ptest specific] + +Original author: Yao Zhao <[email protected]> +Signed-off-by: Jackie Huang <[email protected]> + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index da8da1b..de04059 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -113,4 +113,9 @@ ENDFOREACH( TEST ) + #### + ## INSTALL section ## + +-# we do not install the tests ++# install the tests ++SET(INSTALL_TEST_SUFFIX /opt/${FD_PROJECT_NAME}-tests CACHE PATH"Directory where the test binary is installed.")
++
++INSTALL(TARGETS ${TEST_LIST}
++ RUNTIME DESTINATION ${INSTALL_TEST_SUFFIX}
++ COMPONENT freeDiameter-common)meta-networking/recipes-protocols/freediameter/files/ renamed from meta-networking/recipes-protocols/freediameter/files/pass-ptest-env.patch +0
-0pass-ptest-env.patch
new file mode 100644
index 0000000..ea857afmeta-networking/recipes-protocols/freediameter/files/ new file +0
-0pass-ptest-env.patch
meta-networking/recipes-protocols/freediameter/files/ new file +12
-0@@ -0,0 +1,72 @@ +freediameter ptest cases testmesg_stress.c and testloadext.c need load +extensions both build time and runtime. Then they search extensions with +build directory that causes runtime failures. + +Pass an environment variable to define runtime extension path. + +Upstream-Status: Inappropriate [OE ptest specific] + +Signed-off-by: Kai Kang <[email protected]> +Signed-off-by: Jackie Huang <[email protected]> + +diff -Nur freeDiameter-1.2.0.orig/tests/testloadext.c
freeDiameter-1.2.0/tests/testloadext.c
+---freeDiameter-1.2.0.orig/tests/testloadext.c2014-02-19
17:33:24.785405032 +0800
++++freeDiameter-1.2.0/tests/testloadext.c2014-02-19
20:08:03.871403924 +0800
+@@ -49,7 +49,7 @@
+ {meta-networking/recipes-protocols/freediameter/files/ new file +16
-0+ DIR *dir; + struct dirent *dp; +- char fullname[512]; ++ char fullname[1024]; + int pathlen; + + /* First, initialize the daemon modules */ +@@ -57,11 +57,16 @@ + CHECK( 0, fd_queues_init() ); + CHECK( 0, fd_msg_init() ); + CHECK( 0, fd_rtdisp_init() ); +- ++ ++ char *ext_dir = getenv("EXTENSIONS_DIR"); ++ if (ext_dir) ++ pathlen = snprintf(fullname, sizeof(fullname), "%s",
ext_dir);
++ else
++ pathlen = snprintf(fullname, sizeof(fullname),BUILD_DIR
"/extensions/");
+++ /* Find all extensions which have been compiled along the test */ +- TRACE_DEBUG(INFO, "Loading from: '%s'", BUILD_DIR "/extensions"); +- CHECK( 0, (dir = opendir (BUILD_DIR "/extensions")) == NULL ? 1 :0 );
+- pathlen = snprintf(fullname, sizeof(fullname),BUILD_DIR
"/extensions/");
++TRACE_DEBUG(INFO, "Loading from: '%s'", fullname);
++CHECK( 0, (dir = opendir (fullname)) == NULL ? 1 : 0 );meta-networking/recipes-protocols/freediameter/files/ new file +4
-0+ + while ((dp = readdir (dir)) != NULL) { + char * dot = strrchr(dp->d_name, '.'); +diff -Nur freeDiameter-1.2.0.orig/tests/testmesg_stress.c
freeDiameter-1.2.0/tests/testmesg_stress.c
+---freeDiameter-1.2.0.orig/tests/testmesg_stress.c2014-02-19
17:33:24.785405032 +0800
++++freeDiameter-1.2.0/tests/testmesg_stress.c2014-02-19 20:08:03.928403924 +0800
+@@ -67,15 +67,20 @@
+ {meta-networking/recipes-protocols/freediameter/files/ new file +6
-0+ DIR *dir; + struct dirent *dp; +- char fullname[512]; ++ char fullname[1024]; + int pathlen; + struct fd_list all_extensions = FD_LIST_INITIALIZER(all_extensions);
+ structfd_listext_with_depends= FD_LIST_INITIALIZER(ext_with_
depends);
+
++ char*ext_dir=getenv("EXTENSIONS_DIR");
++ if (ext_dir)
++ pathlen = snprintf(fullname, sizeof(fullname), "%s",ext_dir);
++ else
++ pathlen = snprintf(fullname, sizeof(fullname),BUILD_DIR
"/extensions/");
++
+ /* Find all extensions which have been compiled along the test */
+- LOG_D("Loading %s*.fdx from: '%s'",BUILD_DIR"/extensions",
prefix ?: "");
+- CHECK( 0, (dir = opendir (BUILD_DIR"/extensions")) == NULL ? 1 :
0 );
+- pathlen = snprintf(fullname, sizeof(fullname),BUILD_DIR
"/extensions/");
++TRACE_DEBUG(INFO, "Loading from: '%s'", fullname);
++CHECK( 0, (dir = opendir (fullname)) == NULL ? 1 : 0 );meta-networking/recipes-protocols/freediameter/files/ new file +3
-0+ + while ((dp = readdir (dir)) != NULL) { + char * dot = strrchr(dp->d_name, '.');meta-networking/recipes-protocols/freediameter/files/run-ptest new file +11
-0@@ -0,0 +1,11 @@ +#!/bin/sh + +if ! lsmod | grep -q sctp && ! modprobe sctp 2>/dev/null; then + echo "Couldn't load kernel module sctp." + echo "Test cases testsctp and testcnx will fail." + echo +fi + +export EXTENSIONS_DIR=$EXTENSIONS_DIR +cmake -E cmake_echo_color --cyan "Running tests..." +ctest --force-new-ctest-process(quoted diff) +0
-0meter_1.2.1.bb b/meta-networking/recipes-protocols/freediameter/freedia meter_1.2.1.bb
new file mode 100644
index 0000000..92cd24cmeta-networking/recipes-protocols/freediameter/freediameter_1.2.1.bb new file +15
-0@@ -0,0 +1,136 @@ +SUMMARY = "An open source implementation of the diameter protocol" +DESCRIPTION = "\ +freeDiameter is an open source Diameter protocol implementation \ +(RFC3588). It provides an extensible platform for deploying a \ +Diameter network for your Authentication, Authorization and \ +Accounting needs." + +HOMEPAGE = "http://www.freediameter.net" + +DEPENDS = "flex bison cmake-native libgcrypt gnutls libidn lksctp-tools" + +fd_pkgname = "freeDiameter" + +SRC_URI = "\ + http://www.freediameter.net/hg/${fd_pkgname}/archive/${PV}.tar.gz;downloadfilename=${fd_pkgname}-${PV}.tar.gz \
meta-networking/recipes-protocols/freediameter/freediameter_1.2.1.bb new file +4
-0+ file://Replace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch \ + file://freediameter.service \ + file://freediameter.init \ + ${@bb.utils.contains('DISTRO_FEATURES', 'ptest','file://install_test.patch file://run-ptest file://pass-ptest-env.patch', '', d)} \
meta-networking/recipes-protocols/freediameter/freediameter_1.2.1.bb new file +5
-0+ file://freeDiameter.conf \ + " + +SRC_URI[md5sum] = "61b1062aa144b5f12eed514611e6d697" +SRC_URI[sha256sum] = "bd7f105542e9903e776aa006c6931c
1f5d3d477cb59af33a9162422efa477097"meta-networking/recipes-protocols/freediameter/freediameter_1.2.1.bb new file +54
-1+ +S = "${WORKDIR}/${fd_pkgname}-${PV}" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=892b2ed6ae815488a08416ff7ee74a35" + +PTEST_PATH = "${libdir}/${fd_pkgname}/ptest" + +inherit cmake pkgconfig update-rc.d ptest systemd + +EXTRA_OECMAKE = " \ + -DDEFAULT_CONF_PATH:PATH=${sysconfdir}/${fd_pkgname} \ + -DBUILD_DBG_MONITOR:BOOL=ON \ + -DBUILD_TEST_APP:BOOL=ON \ + -DBUILD_TESTING:BOOL=ON \ + -DBUILD_APP_RADGW:BOOL=ON \ + -DBUILD_APP_REDIRECT:BOOL=ON \ + -DBUILD_TEST_ACCT:BOOL=ON \ + -DBUILD_TEST_NETEMUL:BOOL=ON \ + -DBUILD_TEST_RT_ANY:BOOL=ON \ + -DINSTALL_LIBRARY_SUFFIX:PATH=${baselib} \ + -DINSTALL_EXTENSIONS_SUFFIX:PATH=${baselib}/${fd_pkgname} \ + -DINSTALL_TEST_SUFFIX:PATH=${PTEST_PATH}-tests \ + -DCMAKE_SKIP_RPATH:BOOL=ON \ +" +# INSTALL_LIBRARY_SUFFIX is relative to CMAKE_INSTALL_PREFIX +# specify it on cmd line will fix the SET bug in CMakeList.txt + +# -DBUILD_APP_ACCT:BOOL=ON This needs POSTGRESQL support + +# -DBUILD_APP_DIAMEAP:BOOL=ON -DBUILD_APP_SIP:BOOL=ON -DBUILD_TEST_SIP:BOOL=ON +# These need MySQL support + +# -DBUILD_DBG_INTERACTIVE:BOOL=ON This needs SWIG support + +# -DALL_EXTENSIONS=ON will enable all + +FD_KEY ?="${BPN}.key" +FD_PEM ?= "${BPN}.pem" +FD_CA ?= "${BPN}.pem" +FD_DH_PEM ?= "${BPN}-dh.pem" +FD_HOSTNAME ?= "${MACHINE}" +FD_REALM ?= "openembedded.org" + +do_install_append() { + # install the sample configuration files + install -d -m 0755 ${D}${sysconfdir}/${fd_pkgname} + for i in ${S}/doc/*.conf.sample; do + install -m 0644 $i ${D}${sysconfdir}/${fd_pkgname}/ + done + mv ${D}${sysconfdir}/${fd_pkgname}/freediameter.conf.sample \ + ${D}${sysconfdir}/${fd_pkgname}/freeDiameter.conf.sample + install -d ${D}${sysconfdir}/freeDiameter + install ${WORKDIR}/freeDiameter.conf ${D}${sysconfdir}/${fd_
pkgname}/freeDiameter.confmeta-networking/recipes-protocols/freediameter/freediameter_1.2.1.bb new file +7
-0+ + # install daemon init related files + install -d -m 0755 ${D}${sysconfdir}/default + install -d -m 0755 ${D}${sysconfdir}/init.d + install -m 0644 ${S}/contrib/debian/freediameter-daemon.default \ + ${D}${sysconfdir}/default/${BPN} + install -m 0755 ${WORKDIR}/freediameter.init${D}${sysconfdir}/init.d/${BPN}
meta-networking/recipes-protocols/freediameter/freediameter_1.2.1.bb new file +4
-0+ + # install for systemd + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/freediameter.service${D}${systemd_system_unitdir}
+ sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_system_unitdir}/
*.servicemeta-networking/recipes-protocols/freediameter/freediameter_1.2.1.bb new file +15
-2+ + cat >> ${D}${sysconfdir}/freeDiameter/freeDiameter.conf <<EOF +## OE specific ## +#Identity="${FD_HOSTNAME}"; +Identity = "${FD_HOSTNAME}.${FD_REALM}"; +Realm = "${FD_REALM}"; +Port = 30868; +SecPort = 30869; +TLS_Cred = "/etc/freeDiameter/${FD_PEM}" , "/etc/freeDiameter/${FD_KEY}"; +TLS_CA = "/etc/freeDiameter/${FD_CA}"; +TLS_DH_File = "/etc/freeDiameter/${FD_DH_PEM}"; +EOF + + # create self cert + openssl req -x509 -config ${STAGING_DIR_NATIVE}/etc/ssl/openssl.cnf -newkey rsa:4096 -sha256 -nodes -out ${D}${sysconfdir}/freeDiameter/${FD_PEM} -keyout ${D}${sysconfdir}/freeDiameter/${FD_KEY} -days 3650 -subj'/CN=${FD_HOSTNAME}.${FD_REALM}'
meta-networking/recipes-protocols/freediameter/freediameter_1.2.1.bb new file +6
-0+ openssl dhparam -out ${D}${sysconfdir}/freeDiameter/${FD_DH_PEM} 1024 + +} + +do_install_ptest() { + sed -i "s#\(EXTENSIONS_DIR=\).*\$#\1${libdir}/${fd_pkgname}/#"${D}${PTEST_PATH}/run-ptest
meta-networking/recipes-protocols/freediameter/freediameter_1.2.1.bb new file +25
-1+ mv ${D}${PTEST_PATH}-tests/* ${D}${PTEST_PATH}/ + rmdir ${D}${PTEST_PATH}-tests + install -m 0644 ${B}/tests/CTestTestfile.cmake ${D}${PTEST_PATH}/ +} + +FILES_${PN}-dbg += "${libdir}/${fd_pkgname}/.debug/*" + +# include the extensions in main package +FILES_${PN} += "${libdir}/${fd_pkgname}/*" + +RDEPENDS_${PN} = "glib-2.0 gnutls libidn" +RDEPENDS_${PN} += "openssl openssl-conf openssl-engines" +RDEPENDS_${PN} += "kernel-module-tipc kernel-module-sctp" +RDEPENDS_${PN} += "kernel-module-udp-tunnel kernel-module-ipip" +RDEPENDS_${PN}-ptest = "cmake" + +INITSCRIPT_PACKAGES = "${PN}" +INITSCRIPT_NAME_${PN} = "${BPN}" +INITSCRIPT_PARAMS$_${PN} = "start 30 . stop 70 0 1 2 3 4 5 6 ." + +SYSTEMD_SERVICE_${PN} = "freediameter.service" +SYSTEMD_AUTO_ENABLE = "disable" + +CONFFILES_${PN} = "${sysconfdir}/freediameter.conf" + --To stop receiving notification emails like this one, please contact the administrator of this repository.
--
_______________________________________________
Openembedded-commits mailing list [email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits