All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1 v1] new package: autofs
@ 2015-12-21 14:18 Jonathan Ben-Avraham
  2015-12-21 14:18 ` [Buildroot] [PATCH 1/1] nfs-utils: install /etc/nfsmount.conf Jonathan Ben-Avraham
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jonathan Ben-Avraham @ 2015-12-21 14:18 UTC (permalink / raw)
  To: buildroot

From: Jonathan Ben Avraham <yba@tkos.co.il>

Adds package autofs for toolchains with native RPC that supply nfs/nfs.h only.
The nfs-utils package could supply nfs/nfs.h but would require significant
upstream re-work.

Signed-off-by: Jonathan Ben Avraham <yba@tkos.co.il>
---
 package/Config.in          |    1 +
 package/autofs/Config.in   |   18 ++++++++++++++++++
 package/autofs/autofs.hash |    2 ++
 package/autofs/autofs.mk   |   24 ++++++++++++++++++++++++
 4 files changed, 45 insertions(+)
 create mode 100644 package/autofs/Config.in
 create mode 100644 package/autofs/autofs.hash
 create mode 100644 package/autofs/autofs.mk

diff --git a/package/Config.in b/package/Config.in
index 066aa06..db62c82 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -155,6 +155,7 @@ endif
 endmenu
 
 menu "Filesystem and flash utilities"
+	source "package/autofs/Config.in"
 	source "package/btrfs-progs/Config.in"
 	source "package/cifs-utils/Config.in"
 	source "package/cpio/Config.in"
diff --git a/package/autofs/Config.in b/package/autofs/Config.in
new file mode 100644
index 0000000..c151f3c
--- /dev/null
+++ b/package/autofs/Config.in
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_AUTOFS
+	bool "autofs"
+	depends on BR2_TOOLCHAIN_HAS_THREADS # rpcbind
+	depends on BR2_USE_MMU # nfs-utils, rpcbind
+	depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC # needs nfs/nfs.h
+	select BR2_PACKAGE_NFS_UTILS # runtime, if intended for network use
+	select BR2_PACKAGE_RPCBIND # runtime, if intended for netowork use
+	help
+	  Based on the Debian autofs package description:
+	  Autofs controls the operation of the automount daemons. The
+	  automount daemons automatically mount filesystems when they
+	  are used and unmount them after a period of inactivity based
+	  on a set of pre-configured maps defined by default in
+	  /etc/auto.master. The kernel automounter implements SunOS
+	  style automounter under Linux and requires a kernel version of
+	  at least 2.6.17 and the autofs4 kernel module.
+
+	  http://www.linuxfromscratch.org/blfs/view/svn/general/autofs.html
diff --git a/package/autofs/autofs.hash b/package/autofs/autofs.hash
new file mode 100644
index 0000000..2d98375
--- /dev/null
+++ b/package/autofs/autofs.hash
@@ -0,0 +1,2 @@
+# From https://www.kernel.org/pub/linux/daemons/autofs/v5/sha256sums.asc
+sha256 e08ff0ef9ff365d87b6c33dca136d20e4e07675197a324f2816894cb437021c3  autofs-5.1.1.tar.xz
diff --git a/package/autofs/autofs.mk b/package/autofs/autofs.mk
new file mode 100644
index 0000000..c889f89
--- /dev/null
+++ b/package/autofs/autofs.mk
@@ -0,0 +1,24 @@
+################################################################################
+#
+# autofs
+#
+################################################################################
+
+AUTOFS_VERSION = 5.1.1
+AUTOFS_SOURCE = autofs-$(AUTOFS_VERSION).tar.xz
+AUTOFS_SITE = $(BR2_KERNEL_MIRROR)/linux/daemons/autofs/v5
+AUTOFS_LICENSE = GPLv2+
+AUTOFS_LICENSE_FILES = COPYING COPYRIGHT
+
+AUTOFS_CONF_OPTS = --disable-mount-locking \
+	--enable-ignore-busy \
+	--without-openldap \
+	--without-sasl
+
+AUTOFS_MAKE_ENV = DONTSTRIP=1 CFLAGS="-O2 -Wall -I$(STAGING_DIR)/usr/include/tirpc"
+
+#ifeq ($(BR2_TOOLCHAIN_EXTERNAL_INET_RPC),y)
+#AUTOFS_CFLAGS += -I/usr/include/tirpc
+#endif
+
+$(eval $(autotools-package))
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/1] nfs-utils: install /etc/nfsmount.conf
  2015-12-21 14:18 [Buildroot] [PATCH 1/1 v1] new package: autofs Jonathan Ben-Avraham
@ 2015-12-21 14:18 ` Jonathan Ben-Avraham
  2015-12-21 15:16   ` Thomas Petazzoni
  2015-12-21 14:18 ` [Buildroot] [PATCH 1/1] new packages: yp-tools, ypbind-mt Jonathan Ben-Avraham
  2015-12-21 15:15 ` [Buildroot] [PATCH 1/1 v1] new package: autofs Thomas Petazzoni
  2 siblings, 1 reply; 9+ messages in thread
From: Jonathan Ben-Avraham @ 2015-12-21 14:18 UTC (permalink / raw)
  To: buildroot

From: Jonathan Ben Avraham <yba@tkos.co.il>

Installs /etc/nfsmount.conf on the target, mainly to be able to configure the
the NFS version that mount.nfs uses by default.

Signed-off-by: Jonathan Ben Avraham <yba@tkos.co.il>
---
 package/nfs-utils/nfs-utils.mk |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk
index 30f12fd..55b75e2 100644
--- a/package/nfs-utils/nfs-utils.mk
+++ b/package/nfs-utils/nfs-utils.mk
@@ -38,6 +38,9 @@ endif
 define NFS_UTILS_INSTALL_FIXUP
 	rm -f $(NFS_UTILS_TARGETS_)
 	touch $(TARGET_DIR)/etc/exports
+	$(INSTALL) -m 744 \
+		$(BUILD_DIR)/nfs-utils-$(NFS_UTILS_VERSION)/utils/mount/nfsmount.conf \
+		$(TARGET_DIR)/etc
 endef
 NFS_UTILS_POST_INSTALL_TARGET_HOOKS += NFS_UTILS_INSTALL_FIXUP
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/1] new packages: yp-tools, ypbind-mt
  2015-12-21 14:18 [Buildroot] [PATCH 1/1 v1] new package: autofs Jonathan Ben-Avraham
  2015-12-21 14:18 ` [Buildroot] [PATCH 1/1] nfs-utils: install /etc/nfsmount.conf Jonathan Ben-Avraham
@ 2015-12-21 14:18 ` Jonathan Ben-Avraham
  2015-12-21 15:58   ` Thomas Petazzoni
  2015-12-21 15:15 ` [Buildroot] [PATCH 1/1 v1] new package: autofs Thomas Petazzoni
  2 siblings, 1 reply; 9+ messages in thread
From: Jonathan Ben-Avraham @ 2015-12-21 14:18 UTC (permalink / raw)
  To: buildroot

From: Jonathan Ben Avraham <yba@tkos.co.il>

Adds the yp-tools and ypbind-mt packages required to use NIS and to
use NFS autofs-mounted partitions.

Note that to rebuild ypbind-mt you must rebuild nfs-utils, libtirpc,
yp-tools and ypbind-mt together.

Signed-off-by: Jonathan Ben Avraham <yba@tkos.co.il>
---
 package/Config.in                                  |    2 +
 ...nge-do_ypcall_tr-param-resp-to-ypresp_val.patch |  130 ++++++++++++++++++++
 package/yp-tools/Config.in                         |   17 +++
 package/yp-tools/mapv4v6addr.h                     |   69 +++++++++++
 package/yp-tools/yp-tools.mk                       |   32 +++++
 .../ypbind-mt/0001-Remove_man_dir_from_build.patch |   14 +++
 package/ypbind-mt/Config.in                        |   14 +++
 package/ypbind-mt/ypbind-mt.mk                     |   21 ++++
 package/ypbind-mt/ypbind.rc                        |   99 +++++++++++++++
 9 files changed, 398 insertions(+)
 create mode 100644 package/yp-tools/0001-Change-do_ypcall_tr-param-resp-to-ypresp_val.patch
 create mode 100644 package/yp-tools/Config.in
 create mode 100644 package/yp-tools/mapv4v6addr.h
 create mode 100644 package/yp-tools/yp-tools.mk
 create mode 100644 package/ypbind-mt/0001-Remove_man_dir_from_build.patch
 create mode 100644 package/ypbind-mt/Config.in
 create mode 100644 package/ypbind-mt/ypbind-mt.mk
 create mode 100755 package/ypbind-mt/ypbind.rc

diff --git a/package/Config.in b/package/Config.in
index db62c82..1395170 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -185,6 +185,8 @@ menu "Filesystem and flash utilities"
 	source "package/sunxi-tools/Config.in"
 	source "package/unionfs/Config.in"
 	source "package/xfsprogs/Config.in"
+	source "package/yp-tools/Config.in"
+	source "package/ypbind-mt/Config.in"
 endmenu
 
 menu "Fonts, cursors, icons, sounds and themes"
diff --git a/package/yp-tools/0001-Change-do_ypcall_tr-param-resp-to-ypresp_val.patch b/package/yp-tools/0001-Change-do_ypcall_tr-param-resp-to-ypresp_val.patch
new file mode 100644
index 0000000..8f71900
--- /dev/null
+++ b/package/yp-tools/0001-Change-do_ypcall_tr-param-resp-to-ypresp_val.patch
@@ -0,0 +1,130 @@
+From 5041c0f037a2bc9ae593f943894652ac9e3b567f Mon Sep 17 00:00:00 2001
+From: Jonathan Ben Avraham <yba@tkos.co.il>
+Date: Wed, 16 Dec 2015 13:03:05 +0200
+Subject: [PATCH 1/1] Change do_ypcall_tr param resp to ypresp_val *
+
+The do_ypcall_tr "resp" parameter is type caddr_t. This necessitates a cast to
+ypresp_val * to reference resp->status for use as an argument to ypprot_err
+which provides the return value for do_ypcall_tr.
+
+Since caddr_t and ypresp_val * can have different alignments on some archs such
+as arm, GCC -Wcast-align will issue a warning which yp-tools is configured to
+treat as an error.
+
+This commit changes the type of the resp parameter of do_ypcall_tr from caddr_t
+to ypresp_val * in order to avoid the posibility of an unaligned cast.
+
+Signed-off-by: Jonathan Ben Avraham <yba@tkos.co.il>
+---
+ lib/do_ypcall.c  |   10 +++-------
+ lib/internal.h   |    2 +-
+ lib/yp_maplist.c |    2 +-
+ lib/yp_master.c  |    2 +-
+ lib/yp_match.c   |    2 +-
+ lib/yp_next.c    |    2 +-
+ lib/yp_order.c   |    2 +-
+ 7 files changed, 9 insertions(+), 13 deletions(-)
+
+diff --git a/lib/do_ypcall.c b/lib/do_ypcall.c
+index 37d7060..17db14a 100644
+--- a/lib/do_ypcall.c
++++ b/lib/do_ypcall.c
+@@ -450,15 +450,11 @@ do_ypcall (const char *domain, u_long prog, xdrproc_t xargs,
+ /* Like do_ypcall, but translate the status value if necessary.  */
+ int
+ do_ypcall_tr (const char *domain, u_long prog, xdrproc_t xargs,
+-	      caddr_t req, xdrproc_t xres, caddr_t resp)
++	      caddr_t req, xdrproc_t xres, ypresp_val *resp)
+ {
+-  int status = do_ypcall (domain, prog, xargs, req, xres, resp);
++  int status = do_ypcall (domain, prog, xargs, req, xres, (caddr_t)resp);
+   if (status == YPERR_SUCCESS)
+-    /* We cast to ypresp_val although the pointer could also be of
+-       type ypresp_key_val or ypresp_master or ypresp_order or
+-       ypresp_maplist.  But the stat element is in a common prefix so
+-       this does not matter.  */
+-    status = ypprot_err (((struct ypresp_val *) resp)->status);
++    status = ypprot_err (resp->status);
+   return status;
+ }
+ 
+diff --git a/lib/internal.h b/lib/internal.h
+index c882b84..68236f6 100644
+--- a/lib/internal.h
++++ b/lib/internal.h
+@@ -19,6 +19,6 @@
+ extern int do_ypcall (const char *domain, u_long prog, xdrproc_t xargs,
+ 		      caddr_t req, xdrproc_t xres, caddr_t resp);
+ extern int do_ypcall_tr (const char *domain, u_long prog, xdrproc_t xargs,
+-			 caddr_t req, xdrproc_t xres, caddr_t resp);
++			 caddr_t req, xdrproc_t xres, struct ypresp_val *resp);
+ extern int yp_maplist (const char *, struct ypmaplist **);
+ #endif
+diff --git a/lib/yp_maplist.c b/lib/yp_maplist.c
+index f5980bb..9a1e180 100644
+--- a/lib/yp_maplist.c
++++ b/lib/yp_maplist.c
+@@ -35,7 +35,7 @@ yp_maplist (const char *indomain, struct ypmaplist **outmaplist)
+ 
+   result = do_ypcall_tr (indomain, YPPROC_MAPLIST, (xdrproc_t) xdr_domainname,
+                          (caddr_t) &indomain, (xdrproc_t) xdr_ypresp_maplist,
+-                         (caddr_t) &resp);
++                         (ypresp_val *) &resp);
+ 
+   if (result == YPERR_SUCCESS)
+     {
+diff --git a/lib/yp_master.c b/lib/yp_master.c
+index 6571ec4..d12a146 100644
+--- a/lib/yp_master.c
++++ b/lib/yp_master.c
+@@ -41,7 +41,7 @@ yp_master (const char *indomain, const char *inmap, char **outname)
+ 
+   result = do_ypcall_tr (indomain, YPPROC_MASTER, (xdrproc_t) xdr_ypreq_nokey,
+                          (caddr_t) &req, (xdrproc_t) xdr_ypresp_master,
+-                         (caddr_t) &resp);
++                         (ypresp_val *) &resp);
+ 
+   if (result != YPERR_SUCCESS)
+     return result;
+diff --git a/lib/yp_match.c b/lib/yp_match.c
+index b373111..c06cbe7 100644
+--- a/lib/yp_match.c
++++ b/lib/yp_match.c
+@@ -46,7 +46,7 @@ yp_match (const char *indomain, const char *inmap, const char *inkey,
+ 
+   result = do_ypcall_tr (indomain, YPPROC_MATCH, (xdrproc_t) xdr_ypreq_key,
+                          (caddr_t) &req, (xdrproc_t) xdr_ypresp_val,
+-                         (caddr_t) &resp);
++                         (ypresp_val *) &resp);
+ 
+   if (result != YPERR_SUCCESS)
+     return result;
+diff --git a/lib/yp_next.c b/lib/yp_next.c
+index 9520ed0..f45e21d 100644
+--- a/lib/yp_next.c
++++ b/lib/yp_next.c
+@@ -48,7 +48,7 @@ yp_next (const char *indomain, const char *inmap, const char *inkey,
+ 
+   result = do_ypcall_tr (indomain, YPPROC_NEXT, (xdrproc_t) xdr_ypreq_key,
+                          (caddr_t) &req, (xdrproc_t) xdr_ypresp_key_val,
+-                         (caddr_t) &resp);
++                         (ypresp_val *) &resp);
+ 
+   if (result != YPERR_SUCCESS)
+     return result;
+diff --git a/lib/yp_order.c b/lib/yp_order.c
+index 98ed990..44b1a9c 100644
+--- a/lib/yp_order.c
++++ b/lib/yp_order.c
+@@ -39,7 +39,7 @@ yp_order (const char *indomain, const char *inmap, unsigned int *outorder)
+   memset (&resp, '\0', sizeof (resp));
+   result = do_ypcall_tr (indomain, YPPROC_ORDER, (xdrproc_t) xdr_ypreq_nokey,
+                          (caddr_t) &req, (xdrproc_t) xdr_ypresp_order,
+-                         (caddr_t) &resp);
++                         (ypresp_val *) &resp);
+ 
+   if (result != YPERR_SUCCESS)
+     return result;
+-- 
+1.7.9.5
+
diff --git a/package/yp-tools/Config.in b/package/yp-tools/Config.in
new file mode 100644
index 0000000..437aebe
--- /dev/null
+++ b/package/yp-tools/Config.in
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_YP_TOOLS
+	bool "yp-tools"
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libtirpc, rpcbind
+	depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC # needs rpcsvc/nis.h
+	depends on BR2_USE_MMU # fork()
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_RPCBIND # runtime
+	help
+	  The yp-tools package contains the programs domainname,
+	  nisdomainname, ypcat, ypchfn, ypchsh, ypdomainname, ypmatch,
+	  yppoll, ypset, ypwhich and yppasswd. yp-tools 3.x is a port of
+	  yp-tools 2.x to support IPv6. For this reason, it is now
+	  linked against TI-RPC. Additional, it contians a nss_nis6
+	  plugin for glibc to enable NIS lookups on clients for passwd,
+	  group, etc.
+
+	  https://github.com/thkukuk/yp-tools
diff --git a/package/yp-tools/mapv4v6addr.h b/package/yp-tools/mapv4v6addr.h
new file mode 100644
index 0000000..7f85f7d
--- /dev/null
+++ b/package/yp-tools/mapv4v6addr.h
@@ -0,0 +1,69 @@
+/*
+ * ++Copyright++ 1985, 1988, 1993
+ * -
+ * Copyright (c) 1985, 1988, 1993
+ *    The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * -
+ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies, and that
+ * the name of Digital Equipment Corporation not be used in advertising or
+ * publicity pertaining to distribution of the document or software without
+ * specific, written prior permission.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
+ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ * -
+ * --Copyright--
+ */
+
+#include <string.h>
+#include <arpa/nameser.h>
+
+static void
+map_v4v6_address (const char *src, char *dst)
+{
+  u_char *p = (u_char *) dst;
+  int i;
+
+  /* Move the IPv4 part to the right position.  */
+  memcpy (dst + 12, src, INADDRSZ);
+
+  /* Mark this ipv6 addr as a mapped ipv4. */
+  for (i = 0; i < 10; i++)
+    *p++ = 0x00;
+  *p++ = 0xff;
+  *p = 0xff;
+}
diff --git a/package/yp-tools/yp-tools.mk b/package/yp-tools/yp-tools.mk
new file mode 100644
index 0000000..707da49
--- /dev/null
+++ b/package/yp-tools/yp-tools.mk
@@ -0,0 +1,32 @@
+################################################################################
+#
+# yp-tools
+#
+################################################################################
+
+YP_TOOLS_VERSION = yp-tools-3_4
+YP_TOOLS_SITE = $(call github,thkukuk,yp-tools,$(YP_TOOLS_VERSION))
+YP_TOOLS_LICENSE = GPLv2+
+YP_TOOLS_LICENSE_FILES = COPYING
+YP_TOOLS_AUTORECONF = YES
+YP_TOOLS_DEPENDENCIES = host-pkgconf
+YP_TOOLS_PRE_CONFIGURE_HOOKS += YP_TOOLS_LOCAL_MAPV4V6ADDR_H
+
+# From: Joe MacDonald <joe_macdonald@mentor.com>
+# +Date: Fri, 27 Feb 2015 12:04:10 -0500
+# +Subject: [PATCH] ipv4/ipv6: Provide an in-place version of mapv4v6addr.h
+# +
+# +mapv4v6addr.h isn't always available, depending on your build, but
+# +nis-hosts.c only needs it for a single, inline function.  So drop a copy
+# +here rather than playing games with the include path that would
+# +potentially lead to cross-compilation issues.
+# +
+# +Upstream-status: Inappropriate [embedded specific]
+# +
+# +Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+define YP_TOOLS_LOCAL_MAPV4V6ADDR_H
+	$(INSTALL) -D -m 0644 $(TOPDIR)/package/yp-tools/mapv4v6addr.h \
+		$(STAGING_DIR)/usr/include/resolv/mapv4v6addr.h
+endef
+
+$(eval $(autotools-package))
diff --git a/package/ypbind-mt/0001-Remove_man_dir_from_build.patch b/package/ypbind-mt/0001-Remove_man_dir_from_build.patch
new file mode 100644
index 0000000..3bd9b9f
--- /dev/null
+++ b/package/ypbind-mt/0001-Remove_man_dir_from_build.patch
@@ -0,0 +1,14 @@
+Remove the man directory from the build in order to avoid trying to build the
+commented targets ypbind.8 and ypconf.5
+
+--- a/Makefile.am	2014-12-04 16:27:18.000000000 +0200
++++ b/Makefile.am	2015-12-16 15:00:21.950050679 +0200
+@@ -5,7 +5,7 @@
+ #
+ AUTOMAKE_OPTIONS = 1.6 gnits dist-bzip2
+ #
+-SUBDIRS = lib src man po
++SUBDIRS = lib src po
+ 
+ CLEANFILES = *~
+ 
diff --git a/package/ypbind-mt/Config.in b/package/ypbind-mt/Config.in
new file mode 100644
index 0000000..46d2b23
--- /dev/null
+++ b/package/ypbind-mt/Config.in
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_YPBIND_MT
+	bool "ypbind-mt"
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libtirpc, rpcbind
+	depends on BR2_USE_MMU # fork()
+	depends on BR2_PACKAGE_YP_TOOLS
+	select BR2_PACKAGE_RPCBIND # runtime
+	help
+	  The ypbind-mt package contains a multithreaded ypbind daemon
+	  for Linux. It uses threads for better response and supports
+	  the ypbind protocols version 1, 2 and 3.
+
+	  Note: You need to add package "pam" for NIS authentication.
+
+	  https://github.com/thkukuk/ypbind-mt
diff --git a/package/ypbind-mt/ypbind-mt.mk b/package/ypbind-mt/ypbind-mt.mk
new file mode 100644
index 0000000..4d809e5
--- /dev/null
+++ b/package/ypbind-mt/ypbind-mt.mk
@@ -0,0 +1,21 @@
+################################################################################
+#
+# ypbind-mt
+#
+################################################################################
+
+YPBIND_MT_VERSION = ypbind-mt-2_2
+YPBIND_MT_SITE = $(call github,thkukuk,ypbind-mt,$(YPBIND_MT_VERSION))
+YPBIND_MT_LICENSE = GPLv2+
+YPBIND_MT_LICENSE_FILES = COPYING
+YPBIND_MT_AUTORECONF = YES
+YPBIND_MT_DEPENDENCIES = host-pkgconf
+YPBIND_MT_CONF_ENV = \
+	PKG_CONFIG_SYSROOT_DIR="$(TARGET_DIR)" \
+	PKG_CONFIG_PATH="$(TARGET_DIR)/usr/lib/pkgconfig"
+
+define YPBIND_MT_INSTALL_INIT_SYSV
+        $(INSTALL) -D -m 755 package/ypbind-mt/ypbind.rc $(TARGET_DIR)/etc/init.d/S70ypbind
+endef
+
+$(eval $(autotools-package))
diff --git a/package/ypbind-mt/ypbind.rc b/package/ypbind-mt/ypbind.rc
new file mode 100755
index 0000000..08df322
--- /dev/null
+++ b/package/ypbind-mt/ypbind.rc
@@ -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"
+        /usr/bin/ypdomainname &> /dev/null
+        if [ $? -ne 0 -o -z "`/bin/ypdomainname 2>/dev/null`" ]; then
+           if [ -f /etc/defaultdomain ]; then
+             XDOMAINNAME=`cat /etc/defaultdomain`
+             /usr/bin/ypdomainname "$XDOMAINNAME"
+	   fi
+           /usr/bin/ypdomainname &> /dev/null
+           if [ $? -ne 0 -o -z "`/usr/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
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/1 v1] new package: autofs
  2015-12-21 14:18 [Buildroot] [PATCH 1/1 v1] new package: autofs Jonathan Ben-Avraham
  2015-12-21 14:18 ` [Buildroot] [PATCH 1/1] nfs-utils: install /etc/nfsmount.conf Jonathan Ben-Avraham
  2015-12-21 14:18 ` [Buildroot] [PATCH 1/1] new packages: yp-tools, ypbind-mt Jonathan Ben-Avraham
@ 2015-12-21 15:15 ` Thomas Petazzoni
  2015-12-22 16:55   ` Jonathan Ben Avraham
  2 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2015-12-21 15:15 UTC (permalink / raw)
  To: buildroot

Dear Jonathan Ben-Avraham,

The commit title for a new package should be:

	<package>: new package

On Mon, 21 Dec 2015 16:18:55 +0200, Jonathan Ben-Avraham wrote:
> From: Jonathan Ben Avraham <yba@tkos.co.il>
> 
> Adds package autofs for toolchains with native RPC that supply nfs/nfs.h only.
> The nfs-utils package could supply nfs/nfs.h but would require significant
> upstream re-work.

It took me a bit of time to understand this. What you meant is that:
"The autofs package builds only with native RPC implementations and not
with TI-RPC, because it requires the nfs/nfs.h header which is
currently not provided by TI-RPC."

> diff --git a/package/Config.in b/package/Config.in

> diff --git a/package/autofs/Config.in b/package/autofs/Config.in
> new file mode 100644
> index 0000000..c151f3c
> --- /dev/null
> +++ b/package/autofs/Config.in
> @@ -0,0 +1,18 @@
> +config BR2_PACKAGE_AUTOFS
> +	bool "autofs"
> +	depends on BR2_TOOLCHAIN_HAS_THREADS # rpcbind
> +	depends on BR2_USE_MMU # nfs-utils, rpcbind
> +	depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC # needs nfs/nfs.h
> +	select BR2_PACKAGE_NFS_UTILS # runtime, if intended for network use
> +	select BR2_PACKAGE_RPCBIND # runtime, if intended for netowork use

netowork -> network

if nfs-utils and rpcbind are only needed for network use, then maybe we
should not make them mandatory dependencies. People wanting to do NFS
will anyway need to enable those two packages.

> +	help
> +	  Based on the Debian autofs package description:

Not needed.

> +	  Autofs controls the operation of the automount daemons. The
> +	  automount daemons automatically mount filesystems when they
> +	  are used and unmount them after a period of inactivity based
> +	  on a set of pre-configured maps defined by default in
> +	  /etc/auto.master. The kernel automounter implements SunOS
> +	  style automounter under Linux and requires a kernel version of
> +	  at least 2.6.17 and the autofs4 kernel module.
> +
> +	  http://www.linuxfromscratch.org/blfs/view/svn/general/autofs.html

This isn't really a great home page, but the project doesn't seem to
have any, so OK.

You need a Config.in comment here about the RPC dependency.

> diff --git a/package/autofs/autofs.mk b/package/autofs/autofs.mk
> new file mode 100644
> index 0000000..c889f89
> --- /dev/null
> +++ b/package/autofs/autofs.mk
> @@ -0,0 +1,24 @@
> +################################################################################
> +#
> +# autofs
> +#
> +################################################################################
> +
> +AUTOFS_VERSION = 5.1.1
> +AUTOFS_SOURCE = autofs-$(AUTOFS_VERSION).tar.xz
> +AUTOFS_SITE = $(BR2_KERNEL_MIRROR)/linux/daemons/autofs/v5
> +AUTOFS_LICENSE = GPLv2+
> +AUTOFS_LICENSE_FILES = COPYING COPYRIGHT
> +
> +AUTOFS_CONF_OPTS = --disable-mount-locking \
> +	--enable-ignore-busy \
> +	--without-openldap \
> +	--without-sasl
> +
> +AUTOFS_MAKE_ENV = DONTSTRIP=1 CFLAGS="-O2 -Wall -I$(STAGING_DIR)/usr/include/tirpc"

So you can't build with tirpc, but you add some special CFLAGS for it ?

> +#ifeq ($(BR2_TOOLCHAIN_EXTERNAL_INET_RPC),y)
> +#AUTOFS_CFLAGS += -I/usr/include/tirpc
> +#endif

This is commented, so unneeded ?

Other than that, looks good. Can you fix and resubmit ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/1] nfs-utils: install /etc/nfsmount.conf
  2015-12-21 14:18 ` [Buildroot] [PATCH 1/1] nfs-utils: install /etc/nfsmount.conf Jonathan Ben-Avraham
@ 2015-12-21 15:16   ` Thomas Petazzoni
  2015-12-22 17:13     ` Jonathan Ben Avraham
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2015-12-21 15:16 UTC (permalink / raw)
  To: buildroot

Dear Jonathan Ben-Avraham,

On Mon, 21 Dec 2015 16:18:56 +0200, Jonathan Ben-Avraham wrote:

> diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk
> index 30f12fd..55b75e2 100644
> --- a/package/nfs-utils/nfs-utils.mk
> +++ b/package/nfs-utils/nfs-utils.mk
> @@ -38,6 +38,9 @@ endif
>  define NFS_UTILS_INSTALL_FIXUP
>  	rm -f $(NFS_UTILS_TARGETS_)
>  	touch $(TARGET_DIR)/etc/exports
> +	$(INSTALL) -m 744 \

Why 744 and not 644 ? It doesn't make much sense to have an executable
configuration file.

Also, please use the -D option.

> +		$(BUILD_DIR)/nfs-utils-$(NFS_UTILS_VERSION)/utils/mount/nfsmount.conf \

Please use:

		$(@D)/utils/mount/nfsmount.conf

> +		$(TARGET_DIR)/etc

And a full destination path here:

		$(TARGET_DIR)/etc/nfsmount.conf

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/1] new packages: yp-tools, ypbind-mt
  2015-12-21 14:18 ` [Buildroot] [PATCH 1/1] new packages: yp-tools, ypbind-mt Jonathan Ben-Avraham
@ 2015-12-21 15:58   ` Thomas Petazzoni
  2015-12-22 17:26     ` Jonathan Ben Avraham
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2015-12-21 15:58 UTC (permalink / raw)
  To: buildroot

Dear Jonathan Ben-Avraham,

On Mon, 21 Dec 2015 16:18:57 +0200, Jonathan Ben-Avraham wrote:
> From: Jonathan Ben Avraham <yba@tkos.co.il>
> 
> Adds the yp-tools and ypbind-mt packages required to use NIS and to
> use NFS autofs-mounted partitions.

Two packages: should be two patches, one per package.

> Note that to rebuild ypbind-mt you must rebuild nfs-utils, libtirpc,
> yp-tools and ypbind-mt together.

What do you mean here ?

> diff --git a/package/Config.in b/package/Config.in
> index db62c82..1395170 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -185,6 +185,8 @@ menu "Filesystem and flash utilities"
>  	source "package/sunxi-tools/Config.in"
>  	source "package/unionfs/Config.in"
>  	source "package/xfsprogs/Config.in"
> +	source "package/yp-tools/Config.in"
> +	source "package/ypbind-mt/Config.in"

I am wondering if "Networking applications" is not a better location
for those packages.

> diff --git a/package/yp-tools/0001-Change-do_ypcall_tr-param-resp-to-ypresp_val.patch b/package/yp-tools/0001-Change-do_ypcall_tr-param-resp-to-ypresp_val.patch
> new file mode 100644
> index 0000000..8f71900
> --- /dev/null
> +++ b/package/yp-tools/0001-Change-do_ypcall_tr-param-resp-to-ypresp_val.patch
> @@ -0,0 +1,130 @@
> +From 5041c0f037a2bc9ae593f943894652ac9e3b567f Mon Sep 17 00:00:00 2001
> +From: Jonathan Ben Avraham <yba@tkos.co.il>
> +Date: Wed, 16 Dec 2015 13:03:05 +0200
> +Subject: [PATCH 1/1] Change do_ypcall_tr param resp to ypresp_val *
> +
> +The do_ypcall_tr "resp" parameter is type caddr_t. This necessitates a cast to
> +ypresp_val * to reference resp->status for use as an argument to ypprot_err
> +which provides the return value for do_ypcall_tr.
> +
> +Since caddr_t and ypresp_val * can have different alignments on some archs such
> +as arm, GCC -Wcast-align will issue a warning which yp-tools is configured to
> +treat as an error.
> +
> +This commit changes the type of the resp parameter of do_ypcall_tr from caddr_t
> +to ypresp_val * in order to avoid the posibility of an unaligned cast.
> +
> +Signed-off-by: Jonathan Ben Avraham <yba@tkos.co.il>

Please disable -Werror in yp-tools so that we don't have to add patches
for this problem (and of course report this problem upstream).

> diff --git a/package/yp-tools/Config.in b/package/yp-tools/Config.in
> new file mode 100644
> index 0000000..437aebe
> --- /dev/null
> +++ b/package/yp-tools/Config.in
> @@ -0,0 +1,17 @@
> +config BR2_PACKAGE_YP_TOOLS
> +	bool "yp-tools"
> +	depends on BR2_TOOLCHAIN_HAS_THREADS # libtirpc, rpcbind

If you need native RPC support, then why do you reference libtirpc
here ?

> +	depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC # needs rpcsvc/nis.h
> +	depends on BR2_USE_MMU # fork()
> +	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
> +	select BR2_PACKAGE_RPCBIND # runtime
> +	help
> +	  The yp-tools package contains the programs domainname,
> +	  nisdomainname, ypcat, ypchfn, ypchsh, ypdomainname, ypmatch,
> +	  yppoll, ypset, ypwhich and yppasswd. yp-tools 3.x is a port of
> +	  yp-tools 2.x to support IPv6. For this reason, it is now
> +	  linked against TI-RPC. Additional, it contians a nss_nis6
> +	  plugin for glibc to enable NIS lookups on clients for passwd,
> +	  group, etc.
> +
> +	  https://github.com/thkukuk/yp-tools
> diff --git a/package/yp-tools/mapv4v6addr.h b/package/yp-tools/mapv4v6addr.h
> new file mode 100644
> index 0000000..7f85f7d
> --- /dev/null
> +++ b/package/yp-tools/mapv4v6addr.h
> @@ -0,0 +1,69 @@
> +/*
> + * ++Copyright++ 1985, 1988, 1993
> + * -
> + * Copyright (c) 1985, 1988, 1993
> + *    The Regents of the University of California.  All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + * 4. Neither the name of the University nor the names of its contributors
> + *    may be used to endorse or promote products derived from this software
> + *    without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
> + * SUCH DAMAGE.
> + * -
> + * Portions Copyright (c) 1993 by Digital Equipment Corporation.
> + *
> + * Permission to use, copy, modify, and distribute this software for any
> + * purpose with or without fee is hereby granted, provided that the above
> + * copyright notice and this permission notice appear in all copies, and that
> + * the name of Digital Equipment Corporation not be used in advertising or
> + * publicity pertaining to distribution of the document or software without
> + * specific, written prior permission.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
> + * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
> + * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
> + * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
> + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
> + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
> + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
> + * SOFTWARE.
> + * -
> + * --Copyright--
> + */
> +
> +#include <string.h>
> +#include <arpa/nameser.h>
> +
> +static void
> +map_v4v6_address (const char *src, char *dst)
> +{
> +  u_char *p = (u_char *) dst;
> +  int i;
> +
> +  /* Move the IPv4 part to the right position.  */
> +  memcpy (dst + 12, src, INADDRSZ);
> +
> +  /* Mark this ipv6 addr as a mapped ipv4. */
> +  for (i = 0; i < 10; i++)
> +    *p++ = 0x00;
> +  *p++ = 0xff;
> +  *p = 0xff;
> +}
> diff --git a/package/yp-tools/yp-tools.mk b/package/yp-tools/yp-tools.mk
> new file mode 100644
> index 0000000..707da49
> --- /dev/null
> +++ b/package/yp-tools/yp-tools.mk
> @@ -0,0 +1,32 @@
> +################################################################################
> +#
> +# yp-tools
> +#
> +################################################################################
> +
> +YP_TOOLS_VERSION = yp-tools-3_4
> +YP_TOOLS_SITE = $(call github,thkukuk,yp-tools,$(YP_TOOLS_VERSION))
> +YP_TOOLS_LICENSE = GPLv2+
> +YP_TOOLS_LICENSE_FILES = COPYING
> +YP_TOOLS_AUTORECONF = YES
> +YP_TOOLS_DEPENDENCIES = host-pkgconf
> +YP_TOOLS_PRE_CONFIGURE_HOOKS += YP_TOOLS_LOCAL_MAPV4V6ADDR_H
> +
> +# From: Joe MacDonald <joe_macdonald@mentor.com>
> +# +Date: Fri, 27 Feb 2015 12:04:10 -0500
> +# +Subject: [PATCH] ipv4/ipv6: Provide an in-place version of mapv4v6addr.h
> +# +
> +# +mapv4v6addr.h isn't always available, depending on your build, but
> +# +nis-hosts.c only needs it for a single, inline function.  So drop a copy
> +# +here rather than playing games with the include path that would
> +# +potentially lead to cross-compilation issues.
> +# +
> +# +Upstream-status: Inappropriate [embedded specific]
> +# +
> +# +Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>

It's good to have some comments here, but not in the form of a patch
with the "+", From: field and so on.

> +define YP_TOOLS_LOCAL_MAPV4V6ADDR_H
> +	$(INSTALL) -D -m 0644 $(TOPDIR)/package/yp-tools/mapv4v6addr.h \

Use $(YP_TOOLS_PKGDIR) instead of $(TOPDIR)/package/yp-tools/.

But it seems like a lot of complexity for just one function. Why don't
you simply copy/paste this code into a patch for the nis-hosts program ?

> +$(eval $(autotools-package))
> diff --git a/package/ypbind-mt/0001-Remove_man_dir_from_build.patch b/package/ypbind-mt/0001-Remove_man_dir_from_build.patch
> new file mode 100644
> index 0000000..3bd9b9f
> --- /dev/null
> +++ b/package/ypbind-mt/0001-Remove_man_dir_from_build.patch
> @@ -0,0 +1,14 @@
> +Remove the man directory from the build in order to avoid trying to build the
> +commented targets ypbind.8 and ypconf.5
> +

Missing Signed-off-by line.

> +--- a/Makefile.am	2014-12-04 16:27:18.000000000 +0200
> ++++ b/Makefile.am	2015-12-16 15:00:21.950050679 +0200
> +@@ -5,7 +5,7 @@
> + #
> + AUTOMAKE_OPTIONS = 1.6 gnits dist-bzip2
> + #
> +-SUBDIRS = lib src man po
> ++SUBDIRS = lib src po
> + 
> + CLEANFILES = *~
> + 

Ideally this should be done in an upstreamable way, which makes
building the man pages optional (using a configure.ac option). Though
that it not a strict requirement.

> diff --git a/package/ypbind-mt/Config.in b/package/ypbind-mt/Config.in
> new file mode 100644
> index 0000000..46d2b23
> --- /dev/null
> +++ b/package/ypbind-mt/Config.in
> @@ -0,0 +1,14 @@
> +config BR2_PACKAGE_YPBIND_MT
> +	bool "ypbind-mt"
> +	depends on BR2_TOOLCHAIN_HAS_THREADS # libtirpc, rpcbind

Why do you talk about libtirpc here ?

> +	depends on BR2_USE_MMU # fork()
> +	depends on BR2_PACKAGE_YP_TOOLS

This should be a "select".

> +	select BR2_PACKAGE_RPCBIND # runtime
> +	help
> +	  The ypbind-mt package contains a multithreaded ypbind daemon
> +	  for Linux. It uses threads for better response and supports
> +	  the ypbind protocols version 1, 2 and 3.
> +
> +	  Note: You need to add package "pam" for NIS authentication.

We don't have any package called "pam", it's called "linux-pam".

> +
> +	  https://github.com/thkukuk/ypbind-mt
> diff --git a/package/ypbind-mt/ypbind-mt.mk b/package/ypbind-mt/ypbind-mt.mk
> new file mode 100644
> index 0000000..4d809e5
> --- /dev/null
> +++ b/package/ypbind-mt/ypbind-mt.mk
> @@ -0,0 +1,21 @@
> +################################################################################
> +#
> +# ypbind-mt
> +#
> +################################################################################
> +
> +YPBIND_MT_VERSION = ypbind-mt-2_2
> +YPBIND_MT_SITE = $(call github,thkukuk,ypbind-mt,$(YPBIND_MT_VERSION))
> +YPBIND_MT_LICENSE = GPLv2+

I think the license is really GPLv2. Only a file in lib/ has a GPLv2+
marker. All the files in src/ are GPLv2 only.

> +YPBIND_MT_LICENSE_FILES = COPYING
> +YPBIND_MT_AUTORECONF = YES
> +YPBIND_MT_DEPENDENCIES = host-pkgconf
> +YPBIND_MT_CONF_ENV = \
> +	PKG_CONFIG_SYSROOT_DIR="$(TARGET_DIR)" \
> +	PKG_CONFIG_PATH="$(TARGET_DIR)/usr/lib/pkgconfig"

Clearly no. The pkg-config handling is already passed correctly by the
autotools-package infrastructure, and the values you are passing are
wrong. Which problem are you trying to solve here ?

> +
> +define YPBIND_MT_INSTALL_INIT_SYSV
> +        $(INSTALL) -D -m 755 package/ypbind-mt/ypbind.rc $(TARGET_DIR)/etc/init.d/S70ypbind

The file should be named S70ypbind in package/ypbind-mt/. Also, please
use $(YPBIND_MT_PKGDIR) (yes, I know not all packages are doing this
yet, because it's a fairly new variable).

The init script looks a bit complicated to me, but I haven't reviewed
it in detail for now.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/1 v1] new package: autofs
  2015-12-21 15:15 ` [Buildroot] [PATCH 1/1 v1] new package: autofs Thomas Petazzoni
@ 2015-12-22 16:55   ` Jonathan Ben Avraham
  0 siblings, 0 replies; 9+ messages in thread
From: Jonathan Ben Avraham @ 2015-12-22 16:55 UTC (permalink / raw)
  To: buildroot

On Mon, 21 Dec 2015, Thomas Petazzoni wrote:

> Date: Mon, 21 Dec 2015 16:15:50 +0100
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> To: Jonathan Ben-Avraham <yba@tkos.co.il>
> Cc: buildroot at busybox.net
> Subject: Re: [Buildroot] [PATCH 1/1 v1] new package: autofs
> 
> Dear Jonathan Ben-Avraham,
>
> The commit title for a new package should be:
>
> 	<package>: new package
>
> On Mon, 21 Dec 2015 16:18:55 +0200, Jonathan Ben-Avraham wrote:
>> From: Jonathan Ben Avraham <yba@tkos.co.il>
>>
>> Adds package autofs for toolchains with native RPC that supply nfs/nfs.h only.
>> The nfs-utils package could supply nfs/nfs.h but would require significant
>> upstream re-work.
>
> It took me a bit of time to understand this. What you meant is that:
> "The autofs package builds only with native RPC implementations and not
> with TI-RPC, because it requires the nfs/nfs.h header which is
> currently not provided by TI-RPC."
>
>> diff --git a/package/Config.in b/package/Config.in
>
>> diff --git a/package/autofs/Config.in b/package/autofs/Config.in
>> new file mode 100644
>> index 0000000..c151f3c
>> --- /dev/null
>> +++ b/package/autofs/Config.in
>> @@ -0,0 +1,18 @@
>> +config BR2_PACKAGE_AUTOFS
>> +	bool "autofs"
>> +	depends on BR2_TOOLCHAIN_HAS_THREADS # rpcbind
>> +	depends on BR2_USE_MMU # nfs-utils, rpcbind
>> +	depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC # needs nfs/nfs.h
>> +	select BR2_PACKAGE_NFS_UTILS # runtime, if intended for network use
>> +	select BR2_PACKAGE_RPCBIND # runtime, if intended for netowork use
>
> netowork -> network
>
> if nfs-utils and rpcbind are only needed for network use, then maybe we
> should not make them mandatory dependencies. People wanting to do NFS
> will anyway need to enable those two packages.
>
>> +	help
>> +	  Based on the Debian autofs package description:
>
> Not needed.
>
>> +	  Autofs controls the operation of the automount daemons. The
>> +	  automount daemons automatically mount filesystems when they
>> +	  are used and unmount them after a period of inactivity based
>> +	  on a set of pre-configured maps defined by default in
>> +	  /etc/auto.master. The kernel automounter implements SunOS
>> +	  style automounter under Linux and requires a kernel version of
>> +	  at least 2.6.17 and the autofs4 kernel module.
>> +
>> +	  http://www.linuxfromscratch.org/blfs/view/svn/general/autofs.html
>
> This isn't really a great home page, but the project doesn't seem to
> have any, so OK.
>
> You need a Config.in comment here about the RPC dependency.
>
>> diff --git a/package/autofs/autofs.mk b/package/autofs/autofs.mk
>> new file mode 100644
>> index 0000000..c889f89
>> --- /dev/null
>> +++ b/package/autofs/autofs.mk
>> @@ -0,0 +1,24 @@
>> +################################################################################
>> +#
>> +# autofs
>> +#
>> +################################################################################
>> +
>> +AUTOFS_VERSION = 5.1.1
>> +AUTOFS_SOURCE = autofs-$(AUTOFS_VERSION).tar.xz
>> +AUTOFS_SITE = $(BR2_KERNEL_MIRROR)/linux/daemons/autofs/v5
>> +AUTOFS_LICENSE = GPLv2+
>> +AUTOFS_LICENSE_FILES = COPYING COPYRIGHT
>> +
>> +AUTOFS_CONF_OPTS = --disable-mount-locking \
>> +	--enable-ignore-busy \
>> +	--without-openldap \
>> +	--without-sasl
>> +
>> +AUTOFS_MAKE_ENV = DONTSTRIP=1 CFLAGS="-O2 -Wall -I$(STAGING_DIR)/usr/include/tirpc"
>
> So you can't build with tirpc, but you add some special CFLAGS for it ?
>
>> +#ifeq ($(BR2_TOOLCHAIN_EXTERNAL_INET_RPC),y)
>> +#AUTOFS_CFLAGS += -I/usr/include/tirpc
>> +#endif
>
> This is commented, so unneeded ?
>
> Other than that, looks good. Can you fix and resubmit ?
>
> Thanks!
>
> Thomas
>

Hi Thomas,
Thanks, I submitted v2 of the patch just now.

  - yba


-- 
  9590 8E58 D30D 1660 C349  673D B205 4FC4 B8F5 B7F9  ~. .~  Tk Open Systems
=}-------- Jonathan Ben-Avraham ("yba") ----------ooO--U--Ooo------------{=
mailto:yba at tkos.co.il tel:+972.52.486.3386 http://tkos.co.il skype:benavrhm

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/1] nfs-utils: install /etc/nfsmount.conf
  2015-12-21 15:16   ` Thomas Petazzoni
@ 2015-12-22 17:13     ` Jonathan Ben Avraham
  0 siblings, 0 replies; 9+ messages in thread
From: Jonathan Ben Avraham @ 2015-12-22 17:13 UTC (permalink / raw)
  To: buildroot

On Mon, 21 Dec 2015, Thomas Petazzoni wrote:

> Date: Mon, 21 Dec 2015 16:16:58 +0100
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> To: Jonathan Ben-Avraham <yba@tkos.co.il>
> Cc: buildroot at busybox.net
> Subject: Re: [Buildroot] [PATCH 1/1] nfs-utils: install /etc/nfsmount.conf
> 
> Dear Jonathan Ben-Avraham,
>
> On Mon, 21 Dec 2015 16:18:56 +0200, Jonathan Ben-Avraham wrote:
>
>> diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk
>> index 30f12fd..55b75e2 100644
>> --- a/package/nfs-utils/nfs-utils.mk
>> +++ b/package/nfs-utils/nfs-utils.mk
>> @@ -38,6 +38,9 @@ endif
>>  define NFS_UTILS_INSTALL_FIXUP
>>  	rm -f $(NFS_UTILS_TARGETS_)
>>  	touch $(TARGET_DIR)/etc/exports
>> +	$(INSTALL) -m 744 \
>
> Why 744 and not 644 ? It doesn't make much sense to have an executable
> configuration file.
>
> Also, please use the -D option.
>
>> +		$(BUILD_DIR)/nfs-utils-$(NFS_UTILS_VERSION)/utils/mount/nfsmount.conf \
>
> Please use:
>
> 		$(@D)/utils/mount/nfsmount.conf
>
>> +		$(TARGET_DIR)/etc
>
> And a full destination path here:
>
> 		$(TARGET_DIR)/etc/nfsmount.conf
>
> Thanks!
>
> Thomas
>

Hi Thomas,
Thanks. I submitted another version, v1, of the patch just now.

  - yba


-- 
  9590 8E58 D30D 1660 C349  673D B205 4FC4 B8F5 B7F9  ~. .~  Tk Open Systems
=}-------- Jonathan Ben-Avraham ("yba") ----------ooO--U--Ooo------------{=
mailto:yba at tkos.co.il tel:+972.52.486.3386 http://tkos.co.il skype:benavrhm

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/1] new packages: yp-tools, ypbind-mt
  2015-12-21 15:58   ` Thomas Petazzoni
@ 2015-12-22 17:26     ` Jonathan Ben Avraham
  0 siblings, 0 replies; 9+ messages in thread
From: Jonathan Ben Avraham @ 2015-12-22 17:26 UTC (permalink / raw)
  To: buildroot

On Mon, 21 Dec 2015, Thomas Petazzoni wrote:

> Date: Mon, 21 Dec 2015 16:58:56 +0100
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> To: Jonathan Ben-Avraham <yba@tkos.co.il>
> Cc: buildroot at busybox.net
> Subject: Re: [Buildroot] [PATCH 1/1] new packages: yp-tools, ypbind-mt
> 
> Dear Jonathan Ben-Avraham,
>
> On Mon, 21 Dec 2015 16:18:57 +0200, Jonathan Ben-Avraham wrote:
>> From: Jonathan Ben Avraham <yba@tkos.co.il>
>>
>> Adds the yp-tools and ypbind-mt packages required to use NIS and to
>> use NFS autofs-mounted partitions.

[snip]

>> diff --git a/package/yp-tools/yp-tools.mk b/package/yp-tools/yp-tools.mk
>> new file mode 100644
>> index 0000000..707da49
>> --- /dev/null
>> +++ b/package/yp-tools/yp-tools.mk
>> @@ -0,0 +1,32 @@
>> +################################################################################
>> +#
>> +# yp-tools
>> +#
>> +################################################################################
>> +
>> +YP_TOOLS_VERSION = yp-tools-3_4
>> +YP_TOOLS_SITE = $(call github,thkukuk,yp-tools,$(YP_TOOLS_VERSION))
>> +YP_TOOLS_LICENSE = GPLv2+
>> +YP_TOOLS_LICENSE_FILES = COPYING
>> +YP_TOOLS_AUTORECONF = YES
>> +YP_TOOLS_DEPENDENCIES = host-pkgconf
>> +YP_TOOLS_PRE_CONFIGURE_HOOKS += YP_TOOLS_LOCAL_MAPV4V6ADDR_H
>> +
>> +# From: Joe MacDonald <joe_macdonald@mentor.com>
>> +# +Date: Fri, 27 Feb 2015 12:04:10 -0500
>> +# +Subject: [PATCH] ipv4/ipv6: Provide an in-place version of mapv4v6addr.h
>> +# +
>> +# +mapv4v6addr.h isn't always available, depending on your build, but
>> +# +nis-hosts.c only needs it for a single, inline function.  So drop a copy
>> +# +here rather than playing games with the include path that would
>> +# +potentially lead to cross-compilation issues.
>> +# +
>> +# +Upstream-status: Inappropriate [embedded specific]
>> +# +
>> +# +Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>

[snip]

> But it seems like a lot of complexity for just one function. Why don't
> you simply copy/paste this code into a patch for the nis-hosts program ?

Hi Thomas,
The reason is that a newer version of nis-hosts could break a patch but 
the include file will not break. At worst it will be redundant. I wanted 
to avoid having to maintain the patch over version changes.

  - yba


[snip]
>
> Thomas
>

-- 
  9590 8E58 D30D 1660 C349  673D B205 4FC4 B8F5 B7F9  ~. .~  Tk Open Systems
=}-------- Jonathan Ben-Avraham ("yba") ----------ooO--U--Ooo------------{=
mailto:yba at tkos.co.il tel:+972.52.486.3386 http://tkos.co.il skype:benavrhm

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-12-22 17:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-21 14:18 [Buildroot] [PATCH 1/1 v1] new package: autofs Jonathan Ben-Avraham
2015-12-21 14:18 ` [Buildroot] [PATCH 1/1] nfs-utils: install /etc/nfsmount.conf Jonathan Ben-Avraham
2015-12-21 15:16   ` Thomas Petazzoni
2015-12-22 17:13     ` Jonathan Ben Avraham
2015-12-21 14:18 ` [Buildroot] [PATCH 1/1] new packages: yp-tools, ypbind-mt Jonathan Ben-Avraham
2015-12-21 15:58   ` Thomas Petazzoni
2015-12-22 17:26     ` Jonathan Ben Avraham
2015-12-21 15:15 ` [Buildroot] [PATCH 1/1 v1] new package: autofs Thomas Petazzoni
2015-12-22 16:55   ` Jonathan Ben Avraham

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.