summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe MacDonald <joe_macdonald@mentor.com>2015-03-02 00:23:43 -0500
committerJoe MacDonald <joe_macdonald@mentor.com>2015-03-04 08:52:03 -0500
commite00832bc4dbeacb5eb09864674b6ba7a04fc8622 (patch)
tree97b20786b6ce441c044fbaa2e0d93d7355bf2ea9
parentbcfbe19f4a62b1a97978843b20ec4a9356b9aeb2 (diff)
downloadmeta-openembedded-e00832bc4dbeacb5eb09864674b6ba7a04fc8622.tar.gz
nis: integrate latest stable yp-tools and ypbind
Update to the latest stable NIS tools. The yp-tools libraries and headers conflict with the RPC headers provided by glibc, so install them to a different location. Systems that intend to build using the NIS-provided versions will need to specify the alternate location, but that is covered by pkg-config, so it should only be necessary to point pkg-config at the alternate .pc file. The older stable versions are suitable for IPv4-only setups, so keep them around in case those are required for some systems. Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch110
-rw-r--r--meta-networking/recipes-support/nis/yp-tools_3.3.bb46
-rw-r--r--meta-networking/recipes-support/nis/ypbind-mt_2.2.bb51
3 files changed, 207 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch b/meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch
new file mode 100644
index 000000000..9ef569f15
--- /dev/null
+++ b/meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch
@@ -0,0 +1,110 @@
1From a1ef10d63b0ea34c788d5432e94c72b00ae55e04 Mon Sep 17 00:00:00 2001
2From: Joe MacDonald <joe_macdonald@mentor.com>
3Date: Fri, 27 Feb 2015 12:04:10 -0500
4Subject: [PATCH] ipv4/ipv6: Provide an in-place version of mapv4v6addr.h
5
6mapv4v6addr.h isn't always available, depending on your build, but
7nis-hosts.c only needs it for a single, inline function. So drop a copy
8here rather than playing games with the include path that would
9potentially lead to cross-compilation issues.
10
11Upstream-status: Inappropriate [embedded specific]
12
13Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
14---
15 nss_nis6/mapv4v6addr.h | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++
16 nss_nis6/nis-hosts.c | 2 +-
17 2 files changed, 70 insertions(+), 1 deletion(-)
18 create mode 100644 nss_nis6/mapv4v6addr.h
19
20diff --git a/nss_nis6/mapv4v6addr.h b/nss_nis6/mapv4v6addr.h
21new file mode 100644
22index 0000000..7f85f7d
23--- /dev/null
24+++ b/nss_nis6/mapv4v6addr.h
25@@ -0,0 +1,69 @@
26+/*
27+ * ++Copyright++ 1985, 1988, 1993
28+ * -
29+ * Copyright (c) 1985, 1988, 1993
30+ * The Regents of the University of California. All rights reserved.
31+ *
32+ * Redistribution and use in source and binary forms, with or without
33+ * modification, are permitted provided that the following conditions
34+ * are met:
35+ * 1. Redistributions of source code must retain the above copyright
36+ * notice, this list of conditions and the following disclaimer.
37+ * 2. Redistributions in binary form must reproduce the above copyright
38+ * notice, this list of conditions and the following disclaimer in the
39+ * documentation and/or other materials provided with the distribution.
40+ * 4. Neither the name of the University nor the names of its contributors
41+ * may be used to endorse or promote products derived from this software
42+ * without specific prior written permission.
43+ *
44+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
45+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
46+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
47+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
48+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
49+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
50+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
51+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
52+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
53+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
54+ * SUCH DAMAGE.
55+ * -
56+ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
57+ *
58+ * Permission to use, copy, modify, and distribute this software for any
59+ * purpose with or without fee is hereby granted, provided that the above
60+ * copyright notice and this permission notice appear in all copies, and that
61+ * the name of Digital Equipment Corporation not be used in advertising or
62+ * publicity pertaining to distribution of the document or software without
63+ * specific, written prior permission.
64+ *
65+ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
66+ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
67+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
68+ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
69+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
70+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
71+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
72+ * SOFTWARE.
73+ * -
74+ * --Copyright--
75+ */
76+
77+#include <string.h>
78+#include <arpa/nameser.h>
79+
80+static void
81+map_v4v6_address (const char *src, char *dst)
82+{
83+ u_char *p = (u_char *) dst;
84+ int i;
85+
86+ /* Move the IPv4 part to the right position. */
87+ memcpy (dst + 12, src, INADDRSZ);
88+
89+ /* Mark this ipv6 addr as a mapped ipv4. */
90+ for (i = 0; i < 10; i++)
91+ *p++ = 0x00;
92+ *p++ = 0xff;
93+ *p = 0xff;
94+}
95diff --git a/nss_nis6/nis-hosts.c b/nss_nis6/nis-hosts.c
96index af99c74..96d8fa1 100644
97--- a/nss_nis6/nis-hosts.c
98+++ b/nss_nis6/nis-hosts.c
99@@ -36,7 +36,7 @@
100 #include "nss-nis6.h"
101
102 /* Get implementation for some internal functions. */
103-#include <resolv/mapv4v6addr.h>
104+#include "mapv4v6addr.h"
105
106 #define ENTNAME hostent
107 #define DATABASE "hosts"
108--
1091.9.1
110
diff --git a/meta-networking/recipes-support/nis/yp-tools_3.3.bb b/meta-networking/recipes-support/nis/yp-tools_3.3.bb
new file mode 100644
index 000000000..75ad9894d
--- /dev/null
+++ b/meta-networking/recipes-support/nis/yp-tools_3.3.bb
@@ -0,0 +1,46 @@
1# This package builds tools to manage NIS
2# The source package is utils/net/NIS/yp-tools
3#
4require nis.inc
5
6SUMMARY = "NIS client programs"
7DESCRIPTION = " \
8Network Information Service tools. \
9This package contains ypcat, ypmatch, ypset, \
10ypwhich, yppasswd, domainname, nisdomainname \
11and ypdomainname. \
12"
13
14SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \
15 file://domainname.service \
16 file://yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch \
17"
18SRC_URI[md5sum] = "acebeecc11a73fb8097503670344834c"
19SRC_URI[sha256sum] = "812be817df3d4c25813552be336c6c6ad5aedaf65611b81af3ad9f98fb3c2e50"
20
21DEPENDS = "libtirpc"
22
23inherit autotools systemd
24SYSTEMD_SERVICE_${PN} = "domainname.service"
25
26RPROVIDES_${PN} += "${PN}-systemd"
27RREPLACES_${PN} += "${PN}-systemd"
28RCONFLICTS_${PN} += "${PN}-systemd"
29
30CACHED_CONFIGUREVARS += "ac_cv_prog_STRIP=/bin/true"
31
32EXTRA_OECONF = " \
33 --disable-rpath \
34 --libdir=${libdir}/yp-nis/ \
35 --includedir=${includedir}/yp-nis/ \
36 "
37
38FILES_${PN} += " ${libdir}/yp-nis/*.so.*.* ${libdir}/yp-nis/pkgconfig/"
39FILES_${PN}-dbg += " ${libdir}/yp-nis/.debug"
40FILES_${PN}-dev += " ${libdir}/yp-nis/*.so ${libdir}/yp-nis/*.so.[12] ${libdir}/yp-nis/*.la"
41FILES_${PN}-staticdev += " ${libdir}/yp-nis/*.a"
42
43do_install_append() {
44 install -d ${D}${systemd_unitdir}/system
45 install -m 0644 ${WORKDIR}/domainname.service ${D}${systemd_unitdir}/system
46}
diff --git a/meta-networking/recipes-support/nis/ypbind-mt_2.2.bb b/meta-networking/recipes-support/nis/ypbind-mt_2.2.bb
new file mode 100644
index 000000000..b9607574a
--- /dev/null
+++ b/meta-networking/recipes-support/nis/ypbind-mt_2.2.bb
@@ -0,0 +1,51 @@
1# This package builds the NIS ypbind daemon
2# The source package is utils/net/NIS/ypbind-mt
3#
4require nis.inc
5
6DESCRIPTION = " \
7Multithreaded NIS bind service (ypbind-mt). \
8ypbind-mt is a complete new implementation of a NIS \
9binding daemon for Linux. It has the following \
10features. Supports ypbind protocol V1 and V2. \
11Uses threads for better response. Supports multiple \
12domain bindings. Supports /var/yp/binding/* file \
13for Linux libc 4/5 and glibc 2.x. Supports a list \
14of known secure NIS server (/etc/yp.conf) Binds to \
15the server which answered as first. \
16"
17HOMEPAGE = "http://www.linux-nis.org/nis/ypbind-mt/index.html"
18DEPENDS = "yp-tools"
19PROVIDES += "ypbind"
20
21SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \
22 file://ypbind-yocto.init \
23 file://ypbind.service \
24"
25SRC_URI[md5sum] = "54e2040d8266ae7d302d081ca310c8a8"
26SRC_URI[sha256sum] = "dc2f7d97c94dcab0acfdcd115cd8b464eb8c427e4bb0fe68404ae7465f517cd3"
27
28inherit systemd update-rc.d
29
30SYSTEMD_SERVICE_${PN} = "ypbind.service"
31INITSCRIPT_NAME = "ypbind"
32INITSCRIPT_PARAMS = "start 44 3 5 . stop 70 0 1 2 6 ."
33
34CACHED_CONFIGUREVARS = "ac_cv_prog_STRIP=/bin/true"
35
36EXTRA_OECONF = "PKG_CONFIG_PATH='${STAGING_LIBDIR}/yp-nis/pkgconfig/'"
37
38do_install_append () {
39 install -d ${D}${sysconfdir}/init.d
40 install -d ${D}${sysconfdir}/rcS.d
41
42 install -m 0755 ${WORKDIR}/ypbind-yocto.init ${D}${sysconfdir}/init.d/ypbind
43
44 install -d ${D}${systemd_unitdir}/system
45 install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system
46}
47
48
49RPROVIDES_${PN} += "${PN}-systemd"
50RREPLACES_${PN} += "${PN}-systemd"
51RCONFLICTS_${PN} += "${PN}-systemd"