public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH v2 04/12] kas: Add packages selection
Date: Tue, 19 Sep 2023 13:56:32 +0200	[thread overview]
Message-ID: <20230919115640.18398-5-ubely@ilbers.de> (raw)
In-Reply-To: <20230919115640.18398-1-ubely@ilbers.de>

This part of configuration allows to choose which additional packages
(both from Isar and Debian) to include to the target image.

Isar packages are added to IMAGE_INSTALL since Debian packages go
to IMAGE_PREINSTALL.

The features are implemented as "string" parameter in the menu since
it reduces a number of required YAML fragments.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 Kconfig                                     |   1 +
 kas/opt/packages-distro.yaml                |   6 +
 kas/opt/packages-isar.yaml                  |   6 +
 kas/package/Kconfig                         | 148 ++++++++++++++++++++
 kas/package/packages-distro.yaml            |   6 +
 kas/package/pkg_cowsay.yaml                 |   6 +
 kas/package/pkg_enable-fsck.yaml            |   6 +
 kas/package/pkg_example-module.yaml         |   6 +
 kas/package/pkg_example-prebuilt.yaml       |   6 +
 kas/package/pkg_example-raw.yaml            |   6 +
 kas/package/pkg_expand-on-first-boot.yaml   |   6 +
 kas/package/pkg_hello-isar.yaml             |   6 +
 kas/package/pkg_hello.yaml                  |   6 +
 kas/package/pkg_isar-disable-apt-cache.yaml |   6 +
 kas/package/pkg_isar-exclude-docs.yaml      |   6 +
 kas/package/pkg_kselftest.yaml              |   6 +
 kas/package/pkg_samefile.yaml               |   6 +
 kas/package/pkg_sshd-regen-keys.yaml        |   6 +
 18 files changed, 245 insertions(+)
 create mode 100644 kas/opt/packages-distro.yaml
 create mode 100644 kas/opt/packages-isar.yaml
 create mode 100644 kas/package/Kconfig
 create mode 100644 kas/package/packages-distro.yaml
 create mode 100644 kas/package/pkg_cowsay.yaml
 create mode 100644 kas/package/pkg_enable-fsck.yaml
 create mode 100644 kas/package/pkg_example-module.yaml
 create mode 100644 kas/package/pkg_example-prebuilt.yaml
 create mode 100644 kas/package/pkg_example-raw.yaml
 create mode 100644 kas/package/pkg_expand-on-first-boot.yaml
 create mode 100644 kas/package/pkg_hello-isar.yaml
 create mode 100644 kas/package/pkg_hello.yaml
 create mode 100644 kas/package/pkg_isar-disable-apt-cache.yaml
 create mode 100644 kas/package/pkg_isar-exclude-docs.yaml
 create mode 100644 kas/package/pkg_kselftest.yaml
 create mode 100644 kas/package/pkg_samefile.yaml
 create mode 100644 kas/package/pkg_sshd-regen-keys.yaml

diff --git a/Kconfig b/Kconfig
index f48c56cf..0d54ea52 100644
--- a/Kconfig
+++ b/Kconfig
@@ -10,4 +10,5 @@ config KAS_BUILD_SYSTEM
 
 source "kas/distro/Kconfig"
 source "kas/machine/Kconfig"
+source "kas/package/Kconfig"
 source "kas/opt/Kconfig"
diff --git a/kas/opt/packages-distro.yaml b/kas/opt/packages-distro.yaml
new file mode 100644
index 00000000..d2fca914
--- /dev/null
+++ b/kas/opt/packages-distro.yaml
@@ -0,0 +1,6 @@
+header:
+  version: 14
+
+local_conf_header:
+  packages-distro: |
+    IMAGE_PREINSTALL:append = " ${KAS_IMAGE_PREINSTALL}"
diff --git a/kas/opt/packages-isar.yaml b/kas/opt/packages-isar.yaml
new file mode 100644
index 00000000..c8da258d
--- /dev/null
+++ b/kas/opt/packages-isar.yaml
@@ -0,0 +1,6 @@
+header:
+  version: 14
+
+local_conf_header:
+  packages-isar: |
+    IMAGE_INSTALL:append = " ${KAS_IMAGE_INSTALL}"
diff --git a/kas/package/Kconfig b/kas/package/Kconfig
new file mode 100644
index 00000000..a5531167
--- /dev/null
+++ b/kas/package/Kconfig
@@ -0,0 +1,148 @@
+menu "Packages selection"
+
+menu "Isar packages"
+
+config PACKAGE_COWSAY
+        bool "cowsay"
+        default y
+
+config KAS_INCLUDE_PACKAGE_COWSAY
+        string
+        default "kas/package/pkg_cowsay.yaml"
+        depends on PACKAGE_COWSAY
+
+
+config PACKAGE_ENABLE_FSCK
+        bool "enable-fsck"
+        default y
+
+config KAS_INCLUDE_PACKAGE_ENABLE_FSCK
+        string
+        default "kas/package/pkg_enable-fsck.yaml"
+        depends on PACKAGE_ENABLE_FSCK
+
+
+config PACKAGE_EXAMPLE_RAW
+        bool "example-raw"
+        default y
+
+config KAS_INCLUDE_PACKAGE_EXAMPLE_RAW
+        string
+        default "kas/package/pkg_example-raw.yaml"
+        depends on PACKAGE_EXAMPLE_RAW
+
+
+config PACKAGE_EXAMPLE_MODULE
+        bool "example-module"
+        default y
+
+config KAS_INCLUDE_PACKAGE_EXAMPLE_MODULE
+        string
+        default "kas/package/pkg_example-module.yaml"
+        depends on PACKAGE_EXAMPLE_MODULE
+
+
+config PACKAGE_EXAMPLE_PREBUILT
+        bool "example-prebuilt"
+        default y
+
+config KAS_INCLUDE_PACKAGE_EXAMPLE_PREBUILT
+        string
+        default "kas/package/pkg_example-prebuilt.yaml"
+        depends on PACKAGE_EXAMPLE_PREBUILT
+
+
+config PACKAGE_EXPAND_ON_FIRST_BOOT
+        bool "expand-on-first-boot"
+        default y
+
+config KAS_INCLUDE_PACKAGE_EXPAND_ON_FIRST_BOOT
+        string
+        default "kas/package/pkg_expand-on-first-boot.yaml"
+        depends on PACKAGE_EXPAND_ON_FIRST_BOOT
+
+
+config PACKAGE_HELLO
+        bool "hello"
+        default y
+
+config KAS_INCLUDE_PACKAGE_HELLO
+        string
+        default "kas/package/pkg_hello.yaml"
+        depends on PACKAGE_HELLO
+
+
+config PACKAGE_HELLO_ISAR
+        bool "hello-isar"
+        default y
+
+config KAS_INCLUDE_PACKAGE_HELLO_ISAR
+        string
+        default "kas/package/pkg_hello-isar.yaml"
+        depends on PACKAGE_HELLO_ISAR
+
+
+config PACKAGE_ISAR_EXCLUDE_DOCS
+        bool "isar-exclude-docs"
+        default y
+
+config KAS_INCLUDE_PACKAGE_ISAR_EXCLUDE_DOCS
+        string
+        default "kas/package/pkg_isar-exclude-docs.yaml"
+        depends on PACKAGE_ISAR_EXCLUDE_DOCS
+
+
+config PACKAGE_ISAR_DISABLE_APT_CACHE
+        bool "isar-disable-apt-cache"
+        default y
+
+config KAS_INCLUDE_PACKAGE_ISAR_DISABLE_APT_CACHE
+        string
+        default "kas/package/pkg_isar-disable-apt-cache.yaml"
+        depends on PACKAGE_ISAR_DISABLE_APT_CACHE
+
+
+config PACKAGE_KSELFTEST
+        bool "kselftest"
+        default n
+
+config KAS_INCLUDE_PACKAGE_KSELFTEST
+        string
+        default "kas/package/pkg_kselftest.yaml"
+        depends on PACKAGE_KSELFTEST
+
+
+config PACKAGE_SAMEFILE
+        bool "samefile"
+        default y
+
+config KAS_INCLUDE_PACKAGE_SAMEFILE
+        string
+        default "kas/package/pkg_samefile.yaml"
+        depends on PACKAGE_SAMEFILE
+
+
+config PACKAGE_SSHD_REGEN_KEYS
+        bool "sshd-regen-keys"
+        default y
+
+config KAS_INCLUDE_PACKAGE_SSHD_REGEN_KEYS
+        string
+        default "kas/package/pkg_sshd-regen-keys.yaml"
+        depends on PACKAGE_SSHD_REGEN_KEYS
+
+endmenu
+
+config KAS_IMAGE_PREINSTALL
+	string "Distro packages"
+	default "fdisk iproute2 iputils-ping ics-dhcp-client"
+	help
+	  Space-separated list of packages that are provided by the selected distro.
+	  These packages are downloaded from distro mirrors and just unpacked
+	  and configured by Isar.
+
+config KAS_INCLUDE_PACKAGES_DISTRO
+	string
+	default "kas/package/packages-distro.yaml"
+
+endmenu
diff --git a/kas/package/packages-distro.yaml b/kas/package/packages-distro.yaml
new file mode 100644
index 00000000..d2fca914
--- /dev/null
+++ b/kas/package/packages-distro.yaml
@@ -0,0 +1,6 @@
+header:
+  version: 14
+
+local_conf_header:
+  packages-distro: |
+    IMAGE_PREINSTALL:append = " ${KAS_IMAGE_PREINSTALL}"
diff --git a/kas/package/pkg_cowsay.yaml b/kas/package/pkg_cowsay.yaml
new file mode 100644
index 00000000..8d647032
--- /dev/null
+++ b/kas/package/pkg_cowsay.yaml
@@ -0,0 +1,6 @@
+header:
+  version: 14
+
+local_conf_header:
+  package-cowsay: |
+    IMAGE_INSTALL:append = " cowsay"
diff --git a/kas/package/pkg_enable-fsck.yaml b/kas/package/pkg_enable-fsck.yaml
new file mode 100644
index 00000000..2b2770ea
--- /dev/null
+++ b/kas/package/pkg_enable-fsck.yaml
@@ -0,0 +1,6 @@
+header:
+  version: 14
+
+local_conf_header:
+  package-enable-fsck: |
+    IMAGE_INSTALL:append = " enable-fsck"
diff --git a/kas/package/pkg_example-module.yaml b/kas/package/pkg_example-module.yaml
new file mode 100644
index 00000000..e9d84b06
--- /dev/null
+++ b/kas/package/pkg_example-module.yaml
@@ -0,0 +1,6 @@
+header:
+  version: 14
+
+local_conf_header:
+  package-example-module: |
+    IMAGE_INSTALL:append = " example-module-${KERNEL_NAME}"
diff --git a/kas/package/pkg_example-prebuilt.yaml b/kas/package/pkg_example-prebuilt.yaml
new file mode 100644
index 00000000..0489448d
--- /dev/null
+++ b/kas/package/pkg_example-prebuilt.yaml
@@ -0,0 +1,6 @@
+header:
+  version: 14
+
+local_conf_header:
+  package-example-prebuilt: |
+    IMAGE_INSTALL:append = " example-prebuilt"
diff --git a/kas/package/pkg_example-raw.yaml b/kas/package/pkg_example-raw.yaml
new file mode 100644
index 00000000..cd5d6811
--- /dev/null
+++ b/kas/package/pkg_example-raw.yaml
@@ -0,0 +1,6 @@
+header:
+  version: 14
+
+local_conf_header:
+  package-example-raw: |
+    IMAGE_INSTALL:append = " example-raw"
diff --git a/kas/package/pkg_expand-on-first-boot.yaml b/kas/package/pkg_expand-on-first-boot.yaml
new file mode 100644
index 00000000..e54812e6
--- /dev/null
+++ b/kas/package/pkg_expand-on-first-boot.yaml
@@ -0,0 +1,6 @@
+header:
+  version: 14
+
+local_conf_header:
+  package-expand-on-first-boot: |
+    IMAGE_INSTALL:append = " expand-on-first-boot"
diff --git a/kas/package/pkg_hello-isar.yaml b/kas/package/pkg_hello-isar.yaml
new file mode 100644
index 00000000..20372daf
--- /dev/null
+++ b/kas/package/pkg_hello-isar.yaml
@@ -0,0 +1,6 @@
+header:
+  version: 14
+
+local_conf_header:
+  package-hello-isar: |
+    IMAGE_INSTALL:append = " hello-isar"
diff --git a/kas/package/pkg_hello.yaml b/kas/package/pkg_hello.yaml
new file mode 100644
index 00000000..f6cf2a97
--- /dev/null
+++ b/kas/package/pkg_hello.yaml
@@ -0,0 +1,6 @@
+header:
+  version: 14
+
+local_conf_header:
+  package-hello: |
+    IMAGE_INSTALL:append = " hello"
diff --git a/kas/package/pkg_isar-disable-apt-cache.yaml b/kas/package/pkg_isar-disable-apt-cache.yaml
new file mode 100644
index 00000000..497c48b0
--- /dev/null
+++ b/kas/package/pkg_isar-disable-apt-cache.yaml
@@ -0,0 +1,6 @@
+header:
+  version: 14
+
+local_conf_header:
+  package-isar-disable-apt-cache: |
+    IMAGE_INSTALL:append = " isar-disable-apt-cache"
diff --git a/kas/package/pkg_isar-exclude-docs.yaml b/kas/package/pkg_isar-exclude-docs.yaml
new file mode 100644
index 00000000..34c761d6
--- /dev/null
+++ b/kas/package/pkg_isar-exclude-docs.yaml
@@ -0,0 +1,6 @@
+header:
+  version: 14
+
+local_conf_header:
+  package-isar-exclude-docs: |
+    IMAGE_INSTALL:append = " isar-exclude-docs"
diff --git a/kas/package/pkg_kselftest.yaml b/kas/package/pkg_kselftest.yaml
new file mode 100644
index 00000000..ba925111
--- /dev/null
+++ b/kas/package/pkg_kselftest.yaml
@@ -0,0 +1,6 @@
+header:
+  version: 14
+
+local_conf_header:
+  package-kselftest: |
+    IMAGE_INSTALL:append = " kselftest"
diff --git a/kas/package/pkg_samefile.yaml b/kas/package/pkg_samefile.yaml
new file mode 100644
index 00000000..b5edaa22
--- /dev/null
+++ b/kas/package/pkg_samefile.yaml
@@ -0,0 +1,6 @@
+header:
+  version: 14
+
+local_conf_header:
+  package-samefile: |
+    IMAGE_INSTALL:append = " samefile"
diff --git a/kas/package/pkg_sshd-regen-keys.yaml b/kas/package/pkg_sshd-regen-keys.yaml
new file mode 100644
index 00000000..f14e2a12
--- /dev/null
+++ b/kas/package/pkg_sshd-regen-keys.yaml
@@ -0,0 +1,6 @@
+header:
+  version: 14
+
+local_conf_header:
+  package-sshd-regen-keys: |
+    IMAGE_INSTALL:append = " sshd-regen-keys"
-- 
2.20.1


  parent reply	other threads:[~2023-09-19 11:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-19 11:56 [PATCH v2 00/12] Support building Isar using kas Uladzimir Bely
2023-09-19 11:56 ` [PATCH v2 01/12] kas: Add initial Kconfig support Uladzimir Bely
2023-09-19 12:04   ` Jan Kiszka
2023-09-19 11:56 ` [PATCH v2 02/12] kas: Add a local copy of kas-container script Uladzimir Bely
2023-09-19 11:56 ` [PATCH v2 03/12] kas: Add mirror selection Uladzimir Bely
2023-09-19 11:56 ` Uladzimir Bely [this message]
2023-09-19 11:56 ` [PATCH v2 05/12] kas: Add COMPAT_ARCH support Uladzimir Bely
2023-09-19 11:56 ` [PATCH v2 06/12] kas: Add cross compilation mode selection support Uladzimir Bely
2023-09-19 11:56 ` [PATCH v2 07/12] kas: Add ccache option Uladzimir Bely
2023-09-19 11:56 ` [PATCH v2 08/12] kas: Add image type selection Uladzimir Bely
2023-09-19 11:56 ` [PATCH v2 09/12] kas: Add IMAGE_FSTYPES selection Uladzimir Bely
2023-09-19 11:56 ` [PATCH v2 10/12] kas: Support CACHE_DEB_SRC option in menu Uladzimir Bely
2023-09-19 11:56 ` [PATCH v2 11/12] kas: Add options to activate predefined users Uladzimir Bely
2023-09-19 11:56 ` [PATCH v2 12/12] kas: Add kas/README.md Uladzimir Bely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230919115640.18398-5-ubely@ilbers.de \
    --to=ubely@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox