package/libnss-ato: new package
PATCH v3 1/1 package/libnss-ato: new package
The libnss_ato module is a set of C library extensions which allows to map every nss request for unknown user to a single predefined user.
---
v2 -> v3:
- rebased to v0.2.0 tag
https://github.com/donapieppo/libnss-ato/releases/tag/v0.2.0
v1 -> v2:
- rebased on top of the latest master branch
- asked upstream for a release tag:
https://github.com/donapieppo/libnss-ato/issues/27
v1: https://lists.buildroot.org/pipermail/buildroot/2024-November/767814.html
- Baruch Siach: add depends on BR2_TOOLCHAIN_USES_GLIBC since other C libraries do not provide NSS functionality. (applied)
- Baruch Siach: questioned why upstream Makefile is not used; explained that it avoids patching for a single .c file. Added comment in .mk. (applied)
- Neal Frager: suggested asking upstream to create proper release tags instead of using commit SHA for SBOM compliance. (done, see above)
- Neal Frager: suggested sending upstream a PR to fix the Makefile for cross-compilation.
Tested with Buildroot gitlab CI (12/12 glibc toolchains pass):
https://gitlab.com/vjardin/buildroot/-/pipelines/2313074190
DEVELOPERS | 1 + package/Config.in | 1 + package/libnss-ato/Config.in | 11 +++++++++++ package/libnss-ato/libnss-ato.hash | 4 ++++ package/libnss-ato/libnss-ato.mk | 26 ++++++++++++++++++++++++++ 5 files changed, 43 insertions(+) create mode 100644 package/libnss-ato/Config.in create mode 100644 package/libnss-ato/libnss-ato.hash create mode 100644 package/libnss-ato/libnss-ato.mk
DEVELOPERS +1 -0
@@ -3358,6 +3358,7 @@ F: configs/nvidia_bf3_defconfig F: package/bfscripts/ F: package/dpdk/ F: package/libecoli/ +F: package/libnss-ato/ F: package/libyang-cpp/ F: package/sysrepo-cpp/
package/Config.in +1 -0
@@ -1630,6 +1630,7 @@ menu "Crypto" source "package/libksba/Config.in" source "package/libmd/Config.in" source "package/libnss/Config.in" + source "package/libnss-ato/Config.in" source "package/libp11/Config.in" source "package/libscrypt/Config.in" source "package/libsecret/Config.in"
package/libnss-ato/Config.in new file +11 -0
@@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBNSS_ATO + bool "libnss-ato" + depends on BR2_TOOLCHAIN_USES_GLIBC + help + Library to map every nss request for unknown user to a + single predefined user. + + https://github.com/donapieppo/libnss-ato + +comment "libnss-ato needs a glibc toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC
package/libnss-ato/libnss-ato.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally computed +sha256 7fe56dcfaed74884fa1f9323d000135a4de2a32177a474ee2b9e4a217ae83994 libnss-ato-0.2.0.tar.gz +sha256 3de3161d298c48e55d7416ad89130e13dd72263b93563f3fb79c899fa8450ce2 copyright +sha256 e3a994d82e644b03a792a930f574002658412f62407f5fee083f2555c5f23118 lgpl-3.0.txt
package/libnss-ato/libnss-ato.mk new file +26 -0
@@ -0,0 +1,26 @@ +################################################################################ +# +# libnss-ato +# +################################################################################ + +LIBNSS_ATO_VERSION = 0.2.0 +LIBNSS_ATO_SITE = $(call github,donapieppo,libnss-ato,v$(LIBNSS_ATO_VERSION)) +LIBNSS_ATO_LICENSE = LGPL-3.0+ +LIBNSS_ATO_LICENSE_FILES = copyright lgpl-3.0.txt + +# Skip the default build system (avoid patching Makefile for 1 .c) +define LIBNSS_ATO_BUILD_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ + -fPIC -Wall -shared -o $(@D)/libnss_ato.so.2 \ + -Wl,-soname,libnss_ato.so.2 \ + $(@D)/libnss_ato.c +endef + +define LIBNSS_ATO_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/libnss_ato.so.2 $(TARGET_DIR)/lib/libnss_ato.so.2 + ln -sf libnss_ato.so.2 $(TARGET_DIR)/lib/libnss_ato.so + $(INSTALL) -D -m 0644 $(@D)/libnss-ato.conf $(TARGET_DIR)/etc/libnss-ato.conf +endef + +$(eval $(generic-package))
Signature · 6 lines
2.51.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Vincent,
Quoted 5 lines · Vincent Cruz
The
libnss_atomodule is a set of C library extensions which allows to map every nss request for unknown user to a single predefined user.Signed-off-by Vincent Jardin <[email protected]>Signed-off-by Vincent Cruz <[email protected]>
OK for me, thanks Vincent C for this update.
Please, can a Buildroot's maintainer merge it ?
Quoted 4 lines
---
Tested with Buildroot gitlab CI (12/12 glibc toolchains pass):
https://gitlab.com/vjardin/buildroot/-/pipelines/2313074190
It was my check pipeline before the libnss-ato maintainer did set the tag v0.2.0
Quoted 1 line
+LIBNSS_ATO_VERSION = 0.2.0
ok, there was no libnss-ato code changes since the version 4a29c8410cda vs v0.2.0
FYI, since your patchwork is more up to date,
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
I did archive my former one,
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
best regards,
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 5 lines · Vincent Cruz
The
libnss_atomodule is a set of C library extensions which allows to map every nss request for unknown user to a single predefined user.Signed-off-by Vincent Jardin <[email protected]>Signed-off-by Vincent Cruz <[email protected]>
Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot