From patchwork Mon May 22 05:00:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 100247 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp85935qge; Sun, 21 May 2017 22:01:21 -0700 (PDT) X-Received: by 10.98.157.207 with SMTP id a76mr23583232pfk.17.1495429281857; Sun, 21 May 2017 22:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495429281; cv=none; d=google.com; s=arc-20160816; b=q12unfwtTnIsnENYMbyTw9lfi8MvJXR3xKoh6jn/RjfYUMo2xV2N5Vx3urYQWhM7jc QHSzBc3yEM2pbfbVLzjgHKK4hNGtESEJqGRfgMOyDyD/ZjPf0O65TA2OVx3pu0Ge0IRS g890ONIgVEpCUeCpRZc1slwvByb3uDT79NGifIdLU/EoUtyA2pvLLiJKtW/w53dyXvth yK3BQqIWgr11gDngObIz4hrZEP6uOviIDykU+c0FzBPbKwZ0XSXZLPW+THZFMYknnLzd VLR8+kmDnYjLejvQzPny+zbu4orJ3KxitHE5Bl+AjlQGXYU28p1otBVgY8U0yncIArrl lUDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=mV+qwKe7G/pg8/ZZ8T8Jf7Y31Pv6FtFDRNzQEBq4Yqo=; b=h/tkiJ7X6LJ107bDM0Y72nDm/o7QA4+R+kN8upBZSvAgadEaWZXbtVON8sTZWPq/je t+dfwn9k+TOndfZ6zYdYzPpE2l7h/2gG14Hd0k7XMe+Ju/eOzPIS3ramLeAgCiPRGc+6 zDIKtczsyUbfu092xm2QewZ75sukMiStIYFVy/bQtpjl9SCh9MJB5dunIHulDdmudJCu BbmB214F6g/vvj7TdLABdZPrUveUEQpcg9cLZIxzb/CIV4byAxcVD8wXPXl2YPrYSnxY wDd8k0u1YCIrsGblKQ6GbZW4bImPILzG0Xeh0MEjbS8vT/JyuEq1zS8pnDWYBTDwOEj8 Fr4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id 133si16209979pgb.29.2017.05.21.22.01.21; Sun, 21 May 2017 22:01:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id C0F4771D87; Mon, 22 May 2017 05:01:01 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf0-f177.google.com (mail-pf0-f177.google.com [209.85.192.177]) by mail.openembedded.org (Postfix) with ESMTP id 487B771D87 for ; Mon, 22 May 2017 05:00:56 +0000 (UTC) Received: by mail-pf0-f177.google.com with SMTP id e193so70350081pfh.0 for ; Sun, 21 May 2017 22:00:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KpmZIvC4ELjGm9lb1GmoBv9xPz3qKYlijPXYwZoM4QQ=; b=I39nhFxyqgili2tJvqjuNsriQ37VM3+ZwQvV4rdcMQ4slH+z7fiRfxxKkZV2Pb/3Gi WDJlQgsPUTJhxMoIUp+bsGgOyBikeZUsGG/GHCu4oyrNbicJtOXsdyAm1qMd3EzfJzwz Fw4HQ+RRAeAlCIBCSK0gqiED5WIxgWP3+En+FRFomdnk8HDeryOdgkytP0i/Gx9AoMsd 9RncLi2jabVhvqXd2ByNDD+LLfm5hPdz9V6QShCYoxT9QFKgUoDpr6+JKEs2hz8NlCqG 34wt1vBEcJQfaz4cv9tGimw01ycGxT78qgJzL2SZ5q+W8hsNQldg7hEmc2EAeMn0u4LR dgqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KpmZIvC4ELjGm9lb1GmoBv9xPz3qKYlijPXYwZoM4QQ=; b=TB9ZqHAFBLQsEa10UsTWRMhDyTER/f+0mLvwctphXw5+GrwrBoMcunDZfaGtNIEEUL Mfmh9rQpmGYjHUoIOf4+78Ob2afMxKS9lySD86QLPHuYktbo7qwEibCcv3ZYSCrkH2tF 695mdmFFcjmxDpL3L5C1iwsTX2Blk3nNOBGqLXYDkOwGD+wZesIblmOobHcpK9KV34Cs VwNP3mwJG7B2yoPhHOaaqPcwOFsX23vMIJtseKaQi6GXS7KbgTCVyRTehIO/cs7Dj4I3 htcKrE0JzufgHkeNXUS2qzarqbeigSz+4m7ZmfbsEwdozp6XX81Bw/iIo6jnXhBRhA07 +1uw== X-Gm-Message-State: AODbwcAchfpCZWYf/9SASHxep+8NXF1+wCi3lf3kY8FWurmPUybZLytP hzVOYNrWhhGKz7cf X-Received: by 10.98.59.2 with SMTP id i2mr23158709pfa.50.1495429257805; Sun, 21 May 2017 22:00:57 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::63fb]) by smtp.gmail.com with ESMTPSA id t13sm28839596pfa.126.2017.05.21.22.00.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 May 2017 22:00:56 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sun, 21 May 2017 22:00:29 -0700 Message-Id: <20170522050042.42403-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170522050042.42403-1-raj.khem@gmail.com> References: <20170522050042.42403-1-raj.khem@gmail.com> Subject: [OE-core] [PATCH 02/15] libnsl2: Add recipe X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org NIS functionality has been split out into independent library from glibc Signed-off-by: Khem Raj --- .../0001-include-sys-cdefs.h-explicitly.patch | 68 ++++++++++++++++++++++ .../0002-Define-glibc-specific-macros.patch | 57 ++++++++++++++++++ meta/recipes-extended/libnsl/libnsl2_git.bb | 35 +++++++++++ 3 files changed, 160 insertions(+) create mode 100644 meta/recipes-extended/libnsl/libnsl2/0001-include-sys-cdefs.h-explicitly.patch create mode 100644 meta/recipes-extended/libnsl/libnsl2/0002-Define-glibc-specific-macros.patch create mode 100644 meta/recipes-extended/libnsl/libnsl2_git.bb -- 2.13.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-extended/libnsl/libnsl2/0001-include-sys-cdefs.h-explicitly.patch b/meta/recipes-extended/libnsl/libnsl2/0001-include-sys-cdefs.h-explicitly.patch new file mode 100644 index 0000000000..c6c259adb8 --- /dev/null +++ b/meta/recipes-extended/libnsl/libnsl2/0001-include-sys-cdefs.h-explicitly.patch @@ -0,0 +1,68 @@ +From 508a0ff690dfebc17c4f55a5f81824ed549bed66 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 18 Apr 2017 09:13:33 -0700 +Subject: [PATCH 1/2] include sys/cdefs.h explicitly + +glibc includes this header indirectly but not musl + +Signed-off-by: Khem Raj +--- +Upstream_status: Pending + + src/rpcsvc/nis.h | 1 + + src/rpcsvc/nislib.h | 1 + + src/rpcsvc/ypclnt.h | 1 + + src/rpcsvc/ypupd.h | 1 + + 4 files changed, 4 insertions(+) + +diff --git a/src/rpcsvc/nis.h b/src/rpcsvc/nis.h +index 933c4d9..88cbca0 100644 +--- a/src/rpcsvc/nis.h ++++ b/src/rpcsvc/nis.h +@@ -32,6 +32,7 @@ + #ifndef _RPCSVC_NIS_H + #define _RPCSVC_NIS_H 1 + ++#include + #include + #include + #include +diff --git a/src/rpcsvc/nislib.h b/src/rpcsvc/nislib.h +index a59c19b..a53fab3 100644 +--- a/src/rpcsvc/nislib.h ++++ b/src/rpcsvc/nislib.h +@@ -19,6 +19,7 @@ + #ifndef __RPCSVC_NISLIB_H__ + #define __RPCSVC_NISLIB_H__ + ++#include + #include + + __BEGIN_DECLS +diff --git a/src/rpcsvc/ypclnt.h b/src/rpcsvc/ypclnt.h +index fe43fd4..a686b61 100644 +--- a/src/rpcsvc/ypclnt.h ++++ b/src/rpcsvc/ypclnt.h +@@ -20,6 +20,7 @@ + #ifndef __RPCSVC_YPCLNT_H__ + #define __RPCSVC_YPCLNT_H__ + ++#include + #include + + /* Some defines */ +diff --git a/src/rpcsvc/ypupd.h b/src/rpcsvc/ypupd.h +index d07fd4d..2c57301 100644 +--- a/src/rpcsvc/ypupd.h ++++ b/src/rpcsvc/ypupd.h +@@ -33,6 +33,7 @@ + #ifndef __RPCSVC_YPUPD_H__ + #define __RPCSVC_YPUPD_H__ + ++#include + #include + + #include +-- +2.12.2 + diff --git a/meta/recipes-extended/libnsl/libnsl2/0002-Define-glibc-specific-macros.patch b/meta/recipes-extended/libnsl/libnsl2/0002-Define-glibc-specific-macros.patch new file mode 100644 index 0000000000..68d819c42c --- /dev/null +++ b/meta/recipes-extended/libnsl/libnsl2/0002-Define-glibc-specific-macros.patch @@ -0,0 +1,57 @@ +From 60282514ea01af004d7f9e66dd3929223b7d2e7b Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 18 Apr 2017 09:16:12 -0700 +Subject: [PATCH 2/2] Define glibc specific macros + +Check and define +rawmemchr, __asprintf, __mempcpy, __strtok_r +__always_inline, TEMP_FAILURE_RETRY + +if not existing. Helps compiling with musl + +Signed-off-by: Khem Raj +--- +Upstream_status: Pending + +diff --git a/src/rpcsvc/nis.h b/src/rpcsvc/nis.h +index 88cbca0..23fc20c 100644 +--- a/src/rpcsvc/nis.h ++++ b/src/rpcsvc/nis.h +@@ -57,6 +57,34 @@ __BEGIN_DECLS + * + */ + ++#ifndef rawmemchr ++#define rawmemchr(s,c) memchr((s),(size_t)-1,(c)) ++#endif ++ ++#ifndef __asprintf ++#define __asprintf asprintf ++#endif ++ ++#ifndef __mempcpy ++#define __mempcpy mempcpy ++#endif ++ ++#ifndef __strtok_r ++#define __strtok_r strtok_r ++#endif ++ ++#ifndef __always_inline ++#define __always_inline __attribute__((__always_inline__)) ++#endif ++ ++#ifndef TEMP_FAILURE_RETRY ++#define TEMP_FAILURE_RETRY(exp) ({ \ ++typeof (exp) _rc; \ ++ do { \ ++ _rc = (exp); \ ++ } while (_rc == -1 && errno == EINTR); \ ++ _rc; }) ++#endif + + #ifndef __nis_object_h + #define __nis_object_h +-- +2.12.2 + diff --git a/meta/recipes-extended/libnsl/libnsl2_git.bb b/meta/recipes-extended/libnsl/libnsl2_git.bb new file mode 100644 index 0000000000..1698f69edb --- /dev/null +++ b/meta/recipes-extended/libnsl/libnsl2_git.bb @@ -0,0 +1,35 @@ +# Copyright (C) 2017 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Library containing NIS functions using TI-RPC (IPv6 enabled)" +DESCRIPTION = "This library contains the public client interface for NIS(YP) and NIS+\ + it was part of glibc and now is standalone packages. it also supports IPv6" +HOMEPAGE = "https://github.com/thkukuk/libnsl" +LICENSE = "LGPL-2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" +SECTION = "libs" +DEPENDS = "libtirpc" +DEPENDS_append_libc-musl = " bsd-headers" + +PV = "1.0.5+git${SRCPV}" + +SRCREV = "dfa2f313524aff9243c4d8ce1bace73786478356" + +SRC_URI = "git://github.com/thkukuk/libnsl \ + file://0001-include-sys-cdefs.h-explicitly.patch \ + file://0002-Define-glibc-specific-macros.patch \ + " + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig gettext + +EXTRA_OECONF += "--libdir=${libdir}/nsl --includedir=${includedir}/nsl" + +do_install_append() { + install -d ${D}${libdir} + mv ${D}${libdir}/nsl/pkgconfig ${D}${libdir} +} + +FILES_${PN} += "${libdir}/nsl/*.so.*" +FILES_${PN}-dev += "${includedir}/nsl ${libdir}/nsl/*.so"