aboutsummaryrefslogtreecommitdiffstats
path: root/meta-app-framework
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-10-26 10:19:47 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-11-09 09:36:28 +0000
commita65624407900a1d449c40da693540e610532818d (patch)
treeccd1b10231d82db37d7764dd3a2f253df0fa9f04 /meta-app-framework
parentb2afd8b384b462325a5be1065f887afafe8cd7cc (diff)
nss-localuser: Add the NSS plugin for localuser
`nss-localuser` is a plugin for the GNU Name Service Switch (NSS) functionality of the GNU C Library (`glibc`) providing host name resolution for *"localuser"* family of virtual hostnames. The delivered NSS service defines one virtual host of name `localuser` that resolves to an IP address of the localhost loopback that integrates user ID. Bug-AGL: SPEC-1833 Change-Id: I8ce87297a220e8c691cdbea00262d873b68ffd75 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'meta-app-framework')
-rw-r--r--meta-app-framework/recipes-core/nss-localuser/nss-localuser_0.1.bb37
-rw-r--r--meta-app-framework/recipes-core/packagegroups/packagegroup-agl-app-framework.bb1
2 files changed, 38 insertions, 0 deletions
diff --git a/meta-app-framework/recipes-core/nss-localuser/nss-localuser_0.1.bb b/meta-app-framework/recipes-core/nss-localuser/nss-localuser_0.1.bb
new file mode 100644
index 000000000..148bc5163
--- /dev/null
+++ b/meta-app-framework/recipes-core/nss-localuser/nss-localuser_0.1.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Name Service Switch module for resolving the local user hostname"
+
+DESCRIPTION = "plugin for the GNU Name Service Switch (NSS) \
+functionality of the GNU C Library (`glibc`) providing host name \
+resolution for *"localuser"* family of virtual hostnames."
+
+HOMEPAGE = "https://git.automotivelinux.org/src/nss-localuser/"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=79ad77111c398994735201536a4749ba"
+
+SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/nss-localuser;protocol=https;branch=${AGL_BRANCH}"
+SRCREV = "d2d9e83bd9bdc3a091d6b9f1ccaec012fba2f0f4"
+PV = "${AGL_BRANCH}+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+ make
+}
+
+do_install() {
+ make nssdir=${D}${libdir} install
+}
+
+pkg_postinst_${PN} () {
+ sed -e '/^hosts:/s/\<localuser\>\s*//' \
+ -e 's/\(^hosts:\s\s*\)\(.*\)/\1localuser \2/' \
+ -i $D${sysconfdir}/nsswitch.conf
+}
+
+pkg_prerm_${PN} () {
+ sed -e '/^hosts:/s/\<localuser\>\s*//' \
+ -i $D${sysconfdir}/nsswitch.conf
+}
+
+INSANE_SKIP_${PN} = "ldflags"
diff --git a/meta-app-framework/recipes-core/packagegroups/packagegroup-agl-app-framework.bb b/meta-app-framework/recipes-core/packagegroups/packagegroup-agl-app-framework.bb
index 0201c0e4f..3944c1915 100644
--- a/meta-app-framework/recipes-core/packagegroups/packagegroup-agl-app-framework.bb
+++ b/meta-app-framework/recipes-core/packagegroups/packagegroup-agl-app-framework.bb
@@ -14,5 +14,6 @@ RDEPENDS_${PN} += "\
af-binder \
libafbwsc \
af-main \
+ nss-localuser \
systemd-agl-sync \
"