nodogsplash package added
PATCH 1/2 nodogsplash package added
--- package/Config.in | 1 + package/nodogsplash/Config.in | 9 ++++++++ package/nodogsplash/nodogsplash.mk | 37 ++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 package/nodogsplash/Config.in create mode 100644 package/nodogsplash/nodogsplash.mk
package/Config.in +1 -0
@@ -2270,6 +2270,7 @@ endif source "package/nfacct/Config.in" source "package/nftables/Config.in" source "package/nginx/Config.in" + source "package/nodogsplash/Config.in" if BR2_PACKAGE_NGINX menu "External nginx modules" source "package/nginx-dav-ext/Config.in"
package/nodogsplash/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_PACKAGE_NODOGSPLASH + bool "nodogsplash" + depends on BR2_PACKAGE_LIBMICROHTTPD + help + Nodogsplash is a Captive Portal that offers + a simple way to provide restricted access to the Internet by + showing a splash page to the user before Internet access is granted + + https://github.com/nodogsplash/nodogsplash/
package/nodogsplash/nodogsplash.mk new file +37 -0
@@ -0,0 +1,37 @@ +################################################################################ +# +# nodogsplash +# +################################################################################ +NODOGSPLASH_VERSION = v4.5.1 +NODOGSPLASH_SITE = git://github.com/nodogsplash/nodogsplash.git +NODOGSPLASH_SITE_METHOD = git +NODOGSPLASH_LICENSE = GPL-2.0 +NODOGSPLASH_LICENSE_FILES = COPYING +NODOGSPLASH_DEPENDENCIES = libmicrohttpd +NODOGSPLASH_INSTALL_STAGING = YES + +define NODOGSPLASH_BUILD_CMDS + $(MAKE1) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) +endef + +define NODOGSPLASH_INSTALL_EXTRA_FILES + mkdir -p $(TARGET_DIR)/usr/bin + mkdir -p $(TARGET_DIR)/etc/nodogsplash/htdocs/images + cp $(@D)/resources/nodogsplash.conf $(TARGET_DIR)/etc/nodogsplash/ + cp $(@D)/resources/splash.html $(TARGET_DIR)/etc/nodogsplash/htdocs/ + cp $(@D)/resources/splash.css $(TARGET_DIR)/etc/nodogsplash/htdocs/ + cp $(@D)/resources/status.html $(TARGET_DIR)/etc/nodogsplash/htdocs/ + cp $(@D)/resources/splash.jpg $(TARGET_DIR)/etc/nodogsplash/htdocs/images/ +endef + +NODOGSPLASH_POST_INSTALL_TARGET_HOOKS += NODOGSPLASH_INSTALL_EXTRA_FILES + +define NODOGSPLASH_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/nodogsplash $(TARGET_DIR)/usr/bin + $(INSTALL) -D -m 0755 $(@D)/ndsctl $(TARGET_DIR)/usr/bin + +endef + +$(eval $(generic-package)) +
Signature · 6 lines
2.17.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 hash file added
--- package/nodogsplash/nodogsplash.hash | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 package/nodogsplash/nodogsplash.hash
package/nodogsplash/nodogsplash.hash new file +2 -0
@@ -0,0 +1,2 @@ +md5 edafdd4ef89218261f29a9074891cf7a nodogsplash-v4.5.1-br1.tar.gz +md5 cbbd794e2a0a289b9dfcc9f513d1996e COPYING
Signature · 6 lines
2.17.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] hash file added
Hello,
Quoted 5 lines · On Sun, 2 Jan 2022 20:15:25 +0200 azxxza22 <[email protected]> wrote:
Signed-off-by azxxza22 <[email protected]>--- package/nodogsplash/nodogsplash.hash | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 package/nodogsplash/nodogsplash.hash
This should be part of the patch adding the package.
package/nodogsplash/nodogsplash.hash line 2
Quoted 8 lines
package/nodogsplash/nodogsplash.hash new file +2
-0@@ -0,0 +1,2 @@ +md5 edafdd4ef89218261f29a9074891cf7a nodogsplash-v4.5.1-br1.tar.gz +md5 cbbd794e2a0a289b9dfcc9f513d1996e COPYING
These should be sha256 hashes, and there should be a comment above that says:
# Locally calculated
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello,
First of all, thanks a lot for your contribution! Please see below a number of comments. It would be good if you could address those comments and send an updated version.
Quoted 1 line · On Sun, 2 Jan 2022 20:15:24 +0200 azxxza22 <[email protected]> wrote:
Signed-off-by azxxza22 <[email protected]>
We need contributions to be made under a real name. Could you adjust this?
Quoted 4 lines
package/Config.in | 1 + package/nodogsplash/Config.in | 9 ++++++++ package/nodogsplash/nodogsplash.mk | 37 ++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+)
You also need to add an entry in the DEVELOPERS file, so that we know who maintains this package.
package/nodogsplash/Config.in line 3
Quoted 9 lines
package/nodogsplash/Config.in new file +3
-0@@ -0,0 +1,9 @@ +config BR2_PACKAGE_NODOGSPLASH + bool "nodogsplash" + depends on BR2_PACKAGE_LIBMICROHTTPD
This should be:
select BR2_PACKAGE_LIBMICROHTTPD
It would be useful to test the package with ./utils/test-pkg to make sure you have captured all toolchain dependencies.
package/nodogsplash/Config.in line 7
Quoted 4 lines
package/nodogsplash/Config.in new file +4
-0+ help + Nodogsplash is a Captive Portal that offers + a simple way to provide restricted access to the Internet by + showing a splash page to the user before Internet access is granted
I think this last line is too long. Could you run "make check-package" and make sure you haven't introduced new warnings?
package/nodogsplash/nodogsplash.mk line 5
Quoted 12 lines
package/nodogsplash/Config.in new file +1
-0+ https://github.com/nodogsplash/nodogsplash/package/nodogsplash/nodogsplash.mk new file +5
-0@@ -0,0 +1,37 @@ +################################################################################ +# +# nodogsplash +# +################################################################################
Empty new line needed here.
package/nodogsplash/nodogsplash.mk line 6
Quoted 1 line
package/nodogsplash/nodogsplash.mk new file +1
-0+NODOGSPLASH_VERSION = v4.5.1
Should be without the "v".
package/nodogsplash/nodogsplash.mk line 8
Quoted 2 lines
package/nodogsplash/nodogsplash.mk new file +2
-0+NODOGSPLASH_SITE = git://github.com/nodogsplash/nodogsplash.git +NODOGSPLASH_SITE_METHOD = git
Instead of those two lines, use:
NODOGSPLASH_SITE = $(call github,nodogsplash,nodogsplash,v$(NODOGSPLASH_VERSION))
package/nodogsplash/nodogsplash.mk line 12
Quoted 4 lines
package/nodogsplash/nodogsplash.mk new file +4
-0+NODOGSPLASH_LICENSE = GPL-2.0 +NODOGSPLASH_LICENSE_FILES = COPYING +NODOGSPLASH_DEPENDENCIES = libmicrohttpd +NODOGSPLASH_INSTALL_STAGING = YES
Why is this needed in staging? Does it install some library that another package will link against ?
package/nodogsplash/nodogsplash.mk line 15
Quoted 3 lines
package/nodogsplash/nodogsplash.mk new file +3
-0+ +define NODOGSPLASH_BUILD_CMDS + $(MAKE1) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D)
Why is $(MAKE1) used? Isn't $(MAKE) working?
Ideally, this should be:
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
package/nodogsplash/nodogsplash.mk line 25
Quoted 10 lines
package/nodogsplash/nodogsplash.mk new file +10
-0+endef + +define NODOGSPLASH_INSTALL_EXTRA_FILES + mkdir -p $(TARGET_DIR)/usr/bin + mkdir -p $(TARGET_DIR)/etc/nodogsplash/htdocs/images + cp $(@D)/resources/nodogsplash.conf $(TARGET_DIR)/etc/nodogsplash/ + cp $(@D)/resources/splash.html $(TARGET_DIR)/etc/nodogsplash/htdocs/ + cp $(@D)/resources/splash.css $(TARGET_DIR)/etc/nodogsplash/htdocs/ + cp $(@D)/resources/status.html $(TARGET_DIR)/etc/nodogsplash/htdocs/ + cp $(@D)/resources/splash.jpg $(TARGET_DIR)/etc/nodogsplash/htdocs/images/
Use:
$(INSTALL) -D -m 0644 src dst
it will automatically create any missing destination directory for you.
package/nodogsplash/nodogsplash.mk line 28
Quoted 3 lines
package/nodogsplash/nodogsplash.mk new file +3
-0+endef + +NODOGSPLASH_POST_INSTALL_TARGET_HOOKS += NODOGSPLASH_INSTALL_EXTRA_FILES
There's no need for a post-install target hook, just put the commands directly inside NODOGSPLASH_INSTALL_TARGET_CMDS.
package/nodogsplash/nodogsplash.mk line 32
Quoted 4 lines
package/nodogsplash/nodogsplash.mk new file +4
-0+ +define NODOGSPLASH_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/nodogsplash $(TARGET_DIR)/usr/bin + $(INSTALL) -D -m 0755 $(@D)/ndsctl $(TARGET_DIR)/usr/bin
Please use full destination paths, i.e:
$(INSTALL) -D -m 0755 $(@D)/nodogsplash $(TARGET_DIR)/usr/bin/nodogsplash $(INSTALL) -D -m 0755 $(@D)/ndsctl $(TARGET_DIR)/usr/bin/ndsctl
But I see the Makefile of the upstream project has an install target which seems to do the right thing. Why don't you use it?
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot