All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libnss-ato: new package
@ 2024-11-19  1:44 Vincent Jardin
  2024-11-19  1:59 ` Vincent Jardin
  0 siblings, 1 reply; 12+ messages in thread
From: Vincent Jardin @ 2024-11-19  1:44 UTC (permalink / raw)
  To: buildroot; +Cc: vjardin

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.

Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
 DEVELOPERS                         |  1 +
 package/Config.in                  |  1 +
 package/libnss-ato/Config.in       |  7 +++++++
 package/libnss-ato/libnss-ato.hash |  4 ++++
 package/libnss-ato/libnss-ato.mk   | 27 +++++++++++++++++++++++++++
 5 files changed, 40 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

diff --git a/DEVELOPERS b/DEVELOPERS
index 3945803d53..6dee1c10ec 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -3285,6 +3285,7 @@ F:	board/nvidia/bf3/
 F:	configs/nvidia_bf3_defconfig
 F:	package/bfscripts/
 F:	package/dpdk/
+F:	package/libnss-ato/
 
 N:	Vincent Prince <vincent.prince.fr@gmail.com>
 F:	package/nss-myhostname/
diff --git a/package/Config.in b/package/Config.in
index 1eb5e1e020..30dc2c1712 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1610,6 +1610,7 @@ menu "Crypto"
 	source "package/libmd/Config.in"
 	source "package/libmhash/Config.in"
 	source "package/libnss/Config.in"
+	source "package/libnss-ato/Config.in"
 	source "package/libolm/Config.in"
 	source "package/libp11/Config.in"
 	source "package/libscrypt/Config.in"
diff --git a/package/libnss-ato/Config.in b/package/libnss-ato/Config.in
new file mode 100644
index 0000000000..ca3b7413d9
--- /dev/null
+++ b/package/libnss-ato/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_LIBNSS_ATO
+	bool "libnss-ato"
+	help
+	  Library to map every nss request for unknown user to a
+	  single predefined user.
+
+	  https://github.com/donapieppo/libnss-ato
diff --git a/package/libnss-ato/libnss-ato.hash b/package/libnss-ato/libnss-ato.hash
new file mode 100644
index 0000000000..d63d84e6b1
--- /dev/null
+++ b/package/libnss-ato/libnss-ato.hash
@@ -0,0 +1,4 @@
+# Locally computed
+sha256  3de3161d298c48e55d7416ad89130e13dd72263b93563f3fb79c899fa8450ce2  copyright
+sha256  e3a994d82e644b03a792a930f574002658412f62407f5fee083f2555c5f23118  lgpl-3.0.txt
+sha256  3cd9e41e293a37a541729a5f88b1c0d4433a0b9cb78b8e4637ad57c08add96c5  libnss-ato-4a29c8410cdac590a210dab2dec41d5f4b40d282-git4.tar.gz
diff --git a/package/libnss-ato/libnss-ato.mk b/package/libnss-ato/libnss-ato.mk
new file mode 100644
index 0000000000..4676e44d8d
--- /dev/null
+++ b/package/libnss-ato/libnss-ato.mk
@@ -0,0 +1,27 @@
+################################################################################
+#
+# libnss-ato
+#
+################################################################################
+
+LIBNSS_ATO_VERSION = 4a29c8410cdac590a210dab2dec41d5f4b40d282
+LIBNSS_ATO_SITE = https://github.com/donapieppo/libnss-ato.git
+LIBNSS_ATO_SITE_METHOD = git
+LIBNSS_ATO_LICENSE = LGPL-3.0+
+LIBNSS_ATO_LICENSE_FILES = copyright lgpl-3.0.txt
+
+# Skip the default build system (no configure/Makefile to use)
+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))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/libnss-ato: new package
@ 2025-02-05 15:29 Frager, Neal via buildroot
  0 siblings, 0 replies; 12+ messages in thread
From: Frager, Neal via buildroot @ 2025-02-05 15:29 UTC (permalink / raw)
  To: buildroot@buildroot.org, vjardin@free.fr

Hi Vincent,

> 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.

> Signed-off-by: Vincent Jardin <vjardin@free.fr>

Thank you for the new package.

> ---
> 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

--- SNIP ---

> diff --git a/package/libnss-ato/libnss-ato.hash b/package/libnss-ato/libnss-ato.hash
> new file mode 100644
> index 0000000000..5e828f1be6
> --- /dev/null
> +++ b/package/libnss-ato/libnss-ato.hash
> @@ -0,0 +1,4 @@
> +# Locally computed
> +sha256  3de3161d298c48e55d7416ad89130e13dd72263b93563f3fb79c899fa8450ce2  copyright
> +sha256  e3a994d82e644b03a792a930f574002658412f62407f5fee083f2555c5f23118  lgpl-3.0.txt
> +sha256  87e17468eec71254e7848cb7c9dae5603ab376a719b05e2f5e69038ffed8beef  libnss-ato-4a29c8410cdac590a210dab2dec41d5f4b40d282.tar.gz

Do you think you could ask the repo owner to create a release tag with a nice
version number?  Using the commit sha is probably not the best for users who
need to create an SBOM.  What do you think?

> diff --git a/package/libnss-ato/libnss-ato.mk b/package/libnss-ato/libnss-ato.mk
> new file mode 100644
> index 0000000000..46b8a7963b
> --- /dev/null
> +++ b/package/libnss-ato/libnss-ato.mk
> @@ -0,0 +1,26 @@
> +################################################################################
> +#
> +# libnss-ato
> +#
> +################################################################################
> +
> +LIBNSS_ATO_VERSION = 4a29c8410cdac590a210dab2dec41d5f4b40d282

Same comment as above.

> +LIBNSS_ATO_SITE = $(call github,donapieppo,libnss-ato,$(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

If you are going to contact the package owner about making a release tag, you
might as well send him a pull request to fix his Makefile, so you can use make
for building the package.

It is only a single c file after all...

> +
> +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))

Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2025-02-05 15:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-19  1:44 [Buildroot] [PATCH 1/1] package/libnss-ato: new package Vincent Jardin
2024-11-19  1:59 ` Vincent Jardin
2024-11-19  5:42   ` Baruch Siach via buildroot
2024-11-19 16:30     ` Vincent Jardin
2024-11-19 16:35     ` Vincent Jardin
2024-11-19 17:08       ` Baruch Siach via buildroot
2024-11-19 18:32         ` Vincent Jardin
2024-11-20  4:36           ` Baruch Siach via buildroot
2024-11-20  8:07             ` Vincent Jardin
2025-01-27  9:57               ` Vincent Jardin
2024-11-20  8:08             ` Vincent Jardin
  -- strict thread matches above, loose matches on Subject: below --
2025-02-05 15:29 Frager, Neal via buildroot

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.