From 6743223b29bbe0de26b360ded58b43736fdf52d7 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 7 Oct 2024 12:30:48 +0200 Subject: [PATCH 1/3] package/curios-httpd: install unmodified OCI tarball in image Before: $ ls -lah output/target/lib/oci drwxr-xr-x 2 jacky users 4,0K Oct 7 12:26 . drwxr-xr-x 27 jacky users 20K Aug 29 06:45 .. -rw-r--r-- 1 jacky users 1,8M Oct 7 12:19 curios-httpd-v24.05.0.tar.gz After: $ ls -lah output/target/lib/oci drwxr-xr-x 2 jacky users 4,0K Oct 7 12:26 . drwxr-xr-x 27 jacky users 20K Aug 29 06:45 .. -rw-r--r-- 1 jacky users 281K Oct 7 12:28 curios-httpd-v24.05.0.tar.gz Signed-off-by: Joachim Wiberg --- package/curios-httpd/Config.in | 6 +++--- package/curios-httpd/curios-httpd.mk | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package/curios-httpd/Config.in b/package/curios-httpd/Config.in index c2dbfa25..2b9565e8 100644 --- a/package/curios-httpd/Config.in +++ b/package/curios-httpd/Config.in @@ -2,8 +2,8 @@ config BR2_PACKAGE_CURIOS_HTTPD bool "curiOS-httpd" help Example of how to bundle an OCI archive of curiOS-httpd in - /lib/oci for the given target architecture. OCI archives - can also be bundled in post-build.sh, but with packaging - the "source" is bundled in SDK builds. + /lib/oci for the given target architecture. OCI archives can + also be bundled in post-build.sh, but with packaging all the + "source" tarballs are bundled for SDK builds (archiving). https://github.com/kernelkit/curiOS diff --git a/package/curios-httpd/curios-httpd.mk b/package/curios-httpd/curios-httpd.mk index 02983904..05946c03 100644 --- a/package/curios-httpd/curios-httpd.mk +++ b/package/curios-httpd/curios-httpd.mk @@ -9,11 +9,11 @@ CURIOS_HTTPD_SOURCE = curios-httpd-oci-$(GO_GOARCH)-$(CURIOS_HTTPD_VERSION).tar. CURIOS_HTTPD_SITE = https://github.com/kernelkit/curiOS/releases/download/$(CURIOS_HTTPD_VERSION) CURIOS_HTTPD_LICENSE = GPL CURIOS_HTTPD_LICENSE_FILES = COPYING -CURIOS_HTTPD_INSTALL_TARGET = YES define CURIOS_HTTPD_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/lib/oci - (cd $(@D)/.. && $(TAR) cfz $(TARGET_DIR)/lib/oci/$(notdir $(@D)).tar.gz $(notdir $(@D))) + cp $(CURIOS_HTTPD_DL_DIR)/$(CURIOS_HTTPD_SOURCE) \ + $(TARGET_DIR)/lib/oci/$(notdir $(@D)).tar.gz endef $(eval $(generic-package)) From 5cbe92f9ec8b503bd1ea1cd08515d9a7ff243870 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 7 Oct 2024 14:03:05 +0200 Subject: [PATCH 2/3] package/curios-nftables: new package Allow bundling dedicated nftables container in Infix images. With this container, the /etc/nftables.conf can be kept as part of the device's startup-config (base-64 coded binary format). Highly useful in advanced setups, either with dedicated interfaces in the container, or when run in host network mode. Signed-off-by: Joachim Wiberg --- package/Config.in | 1 + package/curios-nftables/Config.in | 9 +++++++++ package/curios-nftables/curios-nftables.hash | 4 ++++ package/curios-nftables/curios-nftables.mk | 20 ++++++++++++++++++++ 4 files changed, 34 insertions(+) create mode 100644 package/curios-nftables/Config.in create mode 100644 package/curios-nftables/curios-nftables.hash create mode 100644 package/curios-nftables/curios-nftables.mk diff --git a/package/Config.in b/package/Config.in index b6b2e55c..bcb98f82 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2,6 +2,7 @@ menu "Packages" source "$BR2_EXTERNAL_INFIX_PATH/package/confd/Config.in" source "$BR2_EXTERNAL_INFIX_PATH/package/test-mode/Config.in" source "$BR2_EXTERNAL_INFIX_PATH/package/curios-httpd/Config.in" +source "$BR2_EXTERNAL_INFIX_PATH/package/curios-nftables/Config.in" source "$BR2_EXTERNAL_INFIX_PATH/package/execd/Config.in" source "$BR2_EXTERNAL_INFIX_PATH/package/gencert/Config.in" source "$BR2_EXTERNAL_INFIX_PATH/package/statd/Config.in" diff --git a/package/curios-nftables/Config.in b/package/curios-nftables/Config.in new file mode 100644 index 00000000..87fb8ac5 --- /dev/null +++ b/package/curios-nftables/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_CURIOS_NFTABLES + bool "curiOS-nftables" + help + Example of how to bundle an OCI archive of curiOS-nftables in + /lib/oci for the given target architecture. OCI archives can + also be bundled in post-build.sh, but with packaging all the + "source" tarballs are bundled for SDK builds (archiving). + + https://github.com/kernelkit/curiOS diff --git a/package/curios-nftables/curios-nftables.hash b/package/curios-nftables/curios-nftables.hash new file mode 100644 index 00000000..230c0251 --- /dev/null +++ b/package/curios-nftables/curios-nftables.hash @@ -0,0 +1,4 @@ +# Locally computed +sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING +sha256 f25651505bf4fc635dc8d391f377b1116837e99dee522ce0691c15b090cee818 curios-nftables-oci-arm64-v24.05.0.tar.gz +sha256 025c2a5d6c71c62ebbe6f96d8b9ffa3235d6812e87b51645f6e89357d9762669 curios-nftables-oci-amd64-v24.05.0.tar.gz diff --git a/package/curios-nftables/curios-nftables.mk b/package/curios-nftables/curios-nftables.mk new file mode 100644 index 00000000..43b9745d --- /dev/null +++ b/package/curios-nftables/curios-nftables.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# curios-nftables +# +################################################################################ + +CURIOS_NFTABLES_VERSION = v24.05.0 +CURIOS_NFTABLES_SOURCE = curios-nftables-oci-$(GO_GOARCH)-$(CURIOS_NFTABLES_VERSION).tar.gz +CURIOS_NFTABLES_SITE = https://github.com/kernelkit/curiOS/releases/download/$(CURIOS_NFTABLES_VERSION) +CURIOS_NFTABLES_LICENSE = GPL +CURIOS_NFTABLES_LICENSE_FILES = COPYING +CURIOS_NFTABLES_INSTALL_TARGET = YES + +define CURIOS_NFTABLES_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/lib/oci + cp $(CURIOS_NFTABLES_DL_DIR)/$(CURIOS_NFTABLES_SOURCE) \ + $(TARGET_DIR)/lib/oci/$(notdir $(@D)).tar.gz +endef + +$(eval $(generic-package)) From 458c1f8795e95cfbf9cc047290a5c05838c8bbbc Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 7 Oct 2024 14:10:38 +0200 Subject: [PATCH 3/3] configs: include nftables container image in default builds Signed-off-by: Joachim Wiberg --- configs/aarch64_defconfig | 1 + configs/x86_64_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/aarch64_defconfig b/configs/aarch64_defconfig index a3efa0ce..dba6c30c 100644 --- a/configs/aarch64_defconfig +++ b/configs/aarch64_defconfig @@ -132,6 +132,7 @@ INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc" INFIX_SUPPORT="mailto:kernelkit@googlegroups.com" BR2_PACKAGE_CONFD=y BR2_PACKAGE_CURIOS_HTTPD=y +BR2_PACKAGE_CURIOS_NFTABLES=y BR2_PACKAGE_EXECD=y BR2_PACKAGE_GENCERT=y BR2_PACKAGE_STATD=y diff --git a/configs/x86_64_defconfig b/configs/x86_64_defconfig index 1cf50021..0fee0b32 100644 --- a/configs/x86_64_defconfig +++ b/configs/x86_64_defconfig @@ -135,6 +135,7 @@ INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc" INFIX_SUPPORT="mailto:kernelkit@googlegroups.com" BR2_PACKAGE_CONFD=y BR2_PACKAGE_CURIOS_HTTPD=y +BR2_PACKAGE_CURIOS_NFTABLES=y BR2_PACKAGE_EXECD=y BR2_PACKAGE_GENCERT=y BR2_PACKAGE_STATD=y