Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [meta-networking][PATCH V2 04/25] nis: Import recipes from OE classic
Date: Sun,  6 Jan 2013 01:12:27 -0800	[thread overview]
Message-ID: <1357463568-26241-4-git-send-email-raj.khem@gmail.com> (raw)
In-Reply-To: <1357463568-26241-1-git-send-email-raj.khem@gmail.com>

Update to latest versions while at it

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../recipes-support/nis/files/libdl.patch          |   12 +++
 .../recipes-support/nis/files/no-selinux.patch     |   16 ++++
 .../recipes-support/nis/files/ypbind-yocto.init    |   99 ++++++++++++++++++++
 meta-networking/recipes-support/nis/nis.inc        |   31 ++++++
 .../recipes-support/nis/yp-tools_2.12.bb           |   17 ++++
 .../recipes-support/nis/ypbind-mt_1.36.bb          |   39 ++++++++
 6 files changed, 214 insertions(+)
 create mode 100644 meta-networking/recipes-support/nis/files/libdl.patch
 create mode 100644 meta-networking/recipes-support/nis/files/no-selinux.patch
 create mode 100644 meta-networking/recipes-support/nis/files/ypbind-yocto.init
 create mode 100644 meta-networking/recipes-support/nis/nis.inc
 create mode 100644 meta-networking/recipes-support/nis/yp-tools_2.12.bb
 create mode 100644 meta-networking/recipes-support/nis/ypbind-mt_1.36.bb

diff --git a/meta-networking/recipes-support/nis/files/libdl.patch b/meta-networking/recipes-support/nis/files/libdl.patch
new file mode 100644
index 0000000..605af31
--- /dev/null
+++ b/meta-networking/recipes-support/nis/files/libdl.patch
@@ -0,0 +1,12 @@
+--- pwdutils-2.6/configure.in.orig	2005-04-19 20:22:36.603052192 -0700
++++ pwdutils-2.6/configure.in	2005-04-19 21:09:45.308023672 -0700
+@@ -178,6 +178,9 @@
+     AC_CHECK_LIB(ldap, main, LDAP_LIBS="-lldap $LDAP_LIBS" found_ldap_lib=yes,,$LDAP_LIBS)
+   fi
+ 
++  dnl this always needs dl
++  AC_CHECK_LIB(dl, dlopen, LDAP_LIBS="$LDAP_LIBS -ldl")
++
+   if test -z "$found_ldap_lib" -a \( $with_ldap_lib = auto -o $with_ldap_lib = netscape5 \); then
+     AC_CHECK_LIB(ldap50, main, LDAP_LIBS="-lldap50 -lssldap50 -lssl3 -lnss3 -lnspr4 -lprldap50 -lplc4 -lplds4" found_ldap_lib=yes need_pthread=true,, -lpthread)
+   fi
diff --git a/meta-networking/recipes-support/nis/files/no-selinux.patch b/meta-networking/recipes-support/nis/files/no-selinux.patch
new file mode 100644
index 0000000..71da3e3
--- /dev/null
+++ b/meta-networking/recipes-support/nis/files/no-selinux.patch
@@ -0,0 +1,16 @@
+--- pwdutils-2.6/lib/copy_xattr.c.orig	2005-04-16 17:15:52.916660880 -0700
++++ pwdutils-2.6/lib/copy_xattr.c	2005-04-16 17:18:10.345768480 -0700
+@@ -127,8 +127,11 @@
+ 
+ 	  if (lsetxattr (to, name, value, size, 0) != 0)
+ 	    {
+-	      if (strcmp (name, "security.selinux") == 0 &&
+-		  is_selinux_enabled() == 0)
++	      if (strcmp (name, "security.selinux") == 0
++#if defined(WITH_SELINUX)
++				  && is_selinux_enabled() == 0
++#endif
++				  )
+ 		fprintf (stderr,
+ 			 _("SELinux not enabled, ignore attribute %s for `%s'.\n"),
+ 			 name, to);
diff --git a/meta-networking/recipes-support/nis/files/ypbind-yocto.init b/meta-networking/recipes-support/nis/files/ypbind-yocto.init
new file mode 100644
index 0000000..5f50a53
--- /dev/null
+++ b/meta-networking/recipes-support/nis/files/ypbind-yocto.init
@@ -0,0 +1,99 @@
+#! /bin/sh
+# Copyright (c) 2004 Author: Thorsten Kukuk <kukuk@suse.de>
+#
+# /etc/init.d/ypbind
+#
+#   and symbolic its link
+#
+# /usr/sbin/rcypbind
+#
+# System startup script for the ypbind daemon
+#
+### BEGIN INIT INFO
+# Provides: ypbind
+# Required-Start: $remote_fs $portmap
+# Should-Start: ypserv slpd
+# Required-Stop: portmap
+# Default-Start: 3 5
+# Default-Stop: 0 1 2 6
+# Short-Description: Start ypbind (necessary for a NIS client)
+# Description: ypbind finds the server for NIS domains and maintains
+#	the NIS binding information.
+### END INIT INFO
+
+YPBIND_BIN=/usr/sbin/ypbind
+pidfile=/var/run/ypbind.pid
+
+[ -f /etc/default/ypbind ] && . /etc/default/ypbind
+
+case "$1" in
+    start)
+	echo -n "Starting ypbind"
+	## If the domainname is not set, skip starting of ypbind
+	## and return with "program not configured"
+        /bin/ypdomainname &> /dev/null
+        if [ $? -ne 0 -o -z "`/bin/ypdomainname 2>/dev/null`" ]; then
+           if [ -f /etc/defaultdomain ]; then
+             XDOMAINNAME=`cat /etc/defaultdomain`
+             /bin/ypdomainname "$XDOMAINNAME"
+	   fi
+           /bin/ypdomainname &> /dev/null
+           if [ $? -ne 0 -o -z "`/bin/ypdomainname 2>/dev/null`" ]; then
+	     # Tell the user this has skipped
+	     echo -n " . . . . . . . . . . No domainname set"
+             # service is not configured
+	     exit 1
+           fi
+        fi
+
+	## If we don't have a /etc/yp.conf file, skip starting of
+        ## ypbind and return with "program not configured"
+        ## if you add the -broadcast Option later, comment this out.
+	if [ ! -f /etc/yp.conf -a "$YPBIND_BROADCAST" != "yes" ] ; then
+	  # Tell the user this has skipped
+	  echo -n " . . . . . . . . . . ${attn}/etc/yp.conf not found${norm}"
+          # service is not configured
+	  exit 1
+        fi
+
+	# evaluate the OPTIONS for ypbind-mt
+	OPTIONS=""
+	test "$YPBIND_LOCAL_ONLY" = "yes" && OPTIONS="-local-only $OPTIONS"
+	test "$YPBIND_BROADCAST" = "yes" && OPTIONS="-broadcast $OPTIONS"
+	test "$YPBIND_BROKEN_SERVER" = "yes" && OPTIONS="-broken-server $OPTIONS"
+
+	start-stop-daemon --start --quiet --pidfile $pidfile --exec $YPBIND_BIN -- $YPBIND_OPTIONS $OPTIONS
+        if [ $? -eq 0 ]; then
+            notfound=1
+            for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
+                ypwhich &>/dev/null && { notfound=0 ; break; };
+                echo -n " ."
+                sleep 1;
+            done
+            if [ $notfound -eq 1 ]; then
+                echo -n " ${warn}No NIS server found${norm}";
+	    fi
+        else
+            exit 1
+        fi
+	;;
+    stop)
+	echo -n "Shutting down ypbind"
+	start-stop-daemon --stop --quiet --pidfile $pidfile
+	# Remove static data, else glibc will continue to use NIS
+        rm -f /var/yp/binding/* /var/run/ypbind.pid
+	;;
+    restart)
+	$0 stop
+	sleep 1
+	$0 start
+	;;
+    reload | force-reload)
+	echo -n "Reload service ypbind"
+	start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile
+	;;
+    *)
+	echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
+	exit 1
+	;;
+esac
diff --git a/meta-networking/recipes-support/nis/nis.inc b/meta-networking/recipes-support/nis/nis.inc
new file mode 100644
index 0000000..f9f5bd1
--- /dev/null
+++ b/meta-networking/recipes-support/nis/nis.inc
@@ -0,0 +1,31 @@
+# This include file contains global definitions for the
+# various NIS packages.
+#
+# These packages will only function correctly with glibc -
+# the rpcsvc functionality is not present in uclibc
+DESCRIPTION = "NIS Server and Tools"
+HOMEPAGE = "http://www.linux-nis.org/nis/"
+SECTION = "console/network"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+inherit autotools gettext
+
+# install is broken because src/Makefile heroically adds '-s'
+# to the install flags - passing -s to the build /usr/bin/install!
+# install-strip gets it right but installs ypbind -m <default>,
+# not -m 555.  In an OE build this is not, so far as I can see,
+# a security problem (and this fix to the build problem is *much*
+# easier and more maintainable.)
+do_install() {
+	oe_runmake 'DESTDIR=${D}' install-strip
+}
+
+# An attempt to build on uclibc will fail, causing annoyance,
+# so force the package to be skipped here (this will cause a
+# 'nothing provides' error)
+python () {
+    os = bb.data.getVar("TARGET_OS", d, 1)
+    if os == "linux-uclibc":
+        raise bb.parse.SkipPackage("NIS functionality requires rpcsvc/yp.h, uClibC does not provide this")
+}
diff --git a/meta-networking/recipes-support/nis/yp-tools_2.12.bb b/meta-networking/recipes-support/nis/yp-tools_2.12.bb
new file mode 100644
index 0000000..18a52fc
--- /dev/null
+++ b/meta-networking/recipes-support/nis/yp-tools_2.12.bb
@@ -0,0 +1,17 @@
+# This package builds tools to manage NIS
+# The source package is utils/net/NIS/yp-tools
+#
+PR = "r0"
+DESCRIPTION="\
+Network Information Service tools.  \
+This package contains ypcat, ypmatch, ypset, \
+ypwhich, yppasswd, domainname, nisdomainname \
+and ypdomainname."
+
+require nis.inc
+SRC_URI = "http://www.linux-nis.org/download/yp-tools/${P}.tar.bz2"
+
+SRC_URI[md5sum] = "ce1e06d86caa285fa8cd76fdf103f51e"
+SRC_URI[sha256sum] = "6ae8321666eea7837da343eea90ea30273fb74943ad111d5a4befd2afb252063"
+
+CACHED_CONFIGUREVARS += "ac_cv_prog_STRIP=/bin/true"
diff --git a/meta-networking/recipes-support/nis/ypbind-mt_1.36.bb b/meta-networking/recipes-support/nis/ypbind-mt_1.36.bb
new file mode 100644
index 0000000..96ef19b
--- /dev/null
+++ b/meta-networking/recipes-support/nis/ypbind-mt_1.36.bb
@@ -0,0 +1,39 @@
+# This package builds the NIS ypbind daemon
+# The source package is utils/net/NIS/ypbind-mt
+#
+PR = "r0"
+DESCRIPTION="\
+Multithreaded NIS bind service (ypbind-mt).  \
+ypbind-mt is a complete new implementation of a NIS \
+binding daemon for Linux. It has the following \
+features.  Supports ypbind protocol V1 and V2.  \
+Uses threads for better response.  Supports multiple \
+domain bindings.  Supports /var/yp/binding/* file \
+for Linux libc 4/5 and glibc 2.x.  Supports a list \
+of known secure NIS server (/etc/yp.conf) Binds to \
+the server which answered as first."
+HOMEPAGE="http://www.linux-nis.org/nis/ypbind-mt/index.html"
+
+require nis.inc
+
+SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${P}.tar.bz2"
+SRC_URI[md5sum] = "135834db97d78ff6d79fdee2810b4056"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=082c9a0886c7c3db1bc862b5b62ffe08"
+SRC_URI[sha256sum] = "0eff76c1849f4b38ea1a60280d8397c4240369c641fe5402ce57edf1a90958c7"
+
+# ypbind-mt now provides all the functionality of ypbind
+# and is used in place of it.
+PROVIDES += "ypbind"
+
+CACHED_CONFIGUREVARS = "ac_cv_prog_STRIP=/bin/true"
+SRC_URI += "file://ypbind-yocto.init"
+
+do_install_append () {
+    install -d ${D}${sysconfdir}/init.d
+    install -d ${D}${sysconfdir}/rcS.d
+
+    install -m 0755 ${WORKDIR}/ypbind-yocto.init ${D}${sysconfdir}/init.d/ypbind
+
+    ln -s ../init.d/ypbind ${D}${sysconfdir}/rcS.d/S44ypbind
+}
-- 
1.7.9.5




  parent reply	other threads:[~2013-01-06  9:28 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-06  9:12 [meta-networking][PATCH V2 01/25] arptables: Import recipe from OE-Classic and update to latest Khem Raj
2013-01-06  9:12 ` [meta-networking][PATCH V2 02/25] ebtables: Fix segfault by linking with no-as-needed Khem Raj
2013-01-06  9:12 ` [meta-networking][PATCH V2 03/25] autofs: Add recipes for 5.0.7 Khem Raj
2013-01-07 15:58   ` Joe MacDonald
2013-01-07 22:48     ` Khem Raj
2013-01-08 17:33       ` Khem Raj
2013-01-08 19:03         ` Joe MacDonald
2013-01-08 22:19           ` Martin Jansa
2013-01-08 22:22             ` Joe MacDonald
2013-01-06  9:12 ` Khem Raj [this message]
2013-01-06  9:12 ` [meta-networking][PATCH V2 05/25] ndisc6: Forward port recipe from OE classic Khem Raj
2013-01-06  9:12 ` [meta-oe][PATCH V2 06/25] net-snmp: Use ${PN} instead of hardcoding net-snmp Khem Raj
2013-01-06  9:12 ` [meta-oe][PATCH V2 07/25] jansson_2.3.1.bb: Fix multilib use BPN in SRC_URI instead of PN Khem Raj
2013-01-06  9:12 ` [meta-oe][PATCH V2 08/25] liblockfile: Upgrade 1.06 -> 1.09 Khem Raj
2013-01-06  9:12 ` [meta-oe][PATCH V2 09/25] atftp: Upgrade to latest from git Khem Raj
2013-01-06  9:36   ` Martin Jansa
2013-01-07  1:23     ` Khem Raj
2013-01-07 15:36       ` Joe MacDonald
2013-01-07 16:01         ` Khem Raj
2013-01-07 16:04           ` Joe MacDonald
2013-01-06  9:12 ` [meta-oe][PATCH V2 10/25] tcpdump: Upgrade from 4.1.1 -> 4.3.0 Khem Raj
2013-01-06  9:12 ` [meta-oe][PATCH V2 11/25] cppunit: Upgrade recipes from 1.12.1 -> 1.13.1 Khem Raj
2013-01-06  9:12 ` [meta-oe][PATCH V2 12/25] luajit: Add recipes Khem Raj
2013-01-06  9:12 ` [meta-oe][PATCH V2 13/25] concurrencykit: Add recipe for latest from git Khem Raj
2013-01-07 18:15   ` Martin Jansa
2013-01-07 21:58     ` Khem Raj
2013-01-08 17:33       ` Khem Raj
2013-01-06  9:12 ` [meta-oe][PATCH V2 14/25] tcsh: Add recipes for package Khem Raj
2013-01-06  9:12 ` [meta-oe][PATCH V2 15/25] dmidecode: Forward port from OE-Classic Khem Raj
2013-01-06  9:12 ` [meta-oe][PATCH V2 16/25] libuio: Add recipe for version 0.2.1 Khem Raj
2013-01-06  9:12 ` [meta-oe][PATCH V2 17/25] uml-utilities: Forward port recipe from OE classic Khem Raj
2013-01-06  9:12 ` [meta-systemd][PATCH V2 18/25] systemd: Fix build when base_libdir is not /lib Khem Raj
2013-01-09 10:18   ` Martin Jansa
2013-01-06  9:12 ` [meta-systemd][PATCH V2 19/25] systemd.bbclass: Fixes for living along with multilib Khem Raj
2013-01-06  9:12 ` [meta-systemd][PATCH V2 20/25] at: Add systemd unit file Khem Raj
2013-01-06  9:12 ` [meta-systemd][PATCH V2 21/25] dhcp: Add systemd unit file for dhclient Khem Raj
2013-01-06  9:12 ` [meta-systemd][PATCH V2 22/25] nis: Add support for systemd launch of NIS services Khem Raj
2013-01-06  9:12 ` [meta-systemd][PATCH V2 23/25] rpcbind: Add systemd service unit file Khem Raj
2013-01-06  9:12 ` [meta-systemd][PATCH V2 24/25] dhclient.service: Rearrange the cmdline for dhclient Khem Raj
2013-01-06  9:12 ` [meta-systemd][PATCH V2 25/25] meta-systemd/atftpd: Adjust bbappend to match to recipe upgrade Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1357463568-26241-4-git-send-email-raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox