From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7278939938131804160 X-Received: by 2002:a19:ad4c:0:b0:4fb:9477:f713 with SMTP id s12-20020a19ad4c000000b004fb9477f713mr6688147lfd.6.1695373823619; Fri, 22 Sep 2023 02:10:23 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6512:534:b0:500:80c9:a128 with SMTP id o20-20020a056512053400b0050080c9a128ls550847lfc.0.-pod-prod-03-eu; Fri, 22 Sep 2023 02:10:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHf4XxjOWVpcXbU83Dcjptoz1iav2CAFcJC08hxI+0u3/oFXdcjPy+dpRsos3songKuJXtc X-Received: by 2002:a19:5f15:0:b0:4ff:7602:5879 with SMTP id t21-20020a195f15000000b004ff76025879mr6573258lfb.55.1695373821419; Fri, 22 Sep 2023 02:10:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695373821; cv=none; d=google.com; s=arc-20160816; b=lueojsK2r0U7ZozUJ1xJbzgOSD8mHyjcV9J9XeAd0awD2HXCHIl3yIRpaPAxCK5jGh jtATKQgRhPXgAfd7mLA0t9NMqWY6hysIzsv7PJ55Hs6ILmokNVhIsU4ksaYSaU6biEdz Rwgoj9gwDrnkna6Nl0s1AozJFgUZv31+tGlkzkfN26LGjnIvkNY0iaposBpRlenh3Y7T BJTrBmIYO/JaFobMoEFcGZHp69zEkUBu2IcH3F/RJ8h7MTn0iJKfgbgv2JRAiL3CF4vZ YZ5GtQqBB4FXfTdwJQIIc3hFcK9TxLO0c/aNRMGEBHw+tLnz8ahBzSLkukmDMuvrfuYy 095w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=1fLMmt3+ajPOypDDpcqcrKxjWB1AgC2Tftxb5D33FwE=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=xwga7KDYT+t4OE3weocq5hjOStwhMIZLbpXHmyG8Ha8NVqGhHZdB9ZjUlDt79P6ZoQ 0TSqbHJnshW/PsLyjesJd6ioxY14DWu5SB83/s0GFoo2ZrEq9Ya9N36lkG+EPVIqcl2h cb7IRiv6yKC+rUwsvYKXdv0G6TuBzBBK8ZuhSCu7Xlk+wCYVDJBt64YxPj9aPRhuXizL J1/q2b7/SHX+jGvzbAsezZ3XkMmPxeM1pLJGji1V7K8qjxAblDRk0QT+bkb+3/gVjvRp jB+TZ1YYVp3XK0BVuoqcX4mVxtuG1t+kLLbwl39vDCPC3mrT/hc3oUvK4ucbw4RiO+bf tTZA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id v21-20020ac258f5000000b004fbcd4b8b84si262072lfo.0.2023.09.22.02.10.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Sep 2023 02:10:21 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from baighyz.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 38M9A3Z7031991 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 22 Sep 2023 11:10:20 +0200 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH v4 04/13] kas: Add packages selection Date: Fri, 22 Sep 2023 11:09:54 +0200 Message-Id: <20230922091003.20763-5-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230922091003.20763-1-ubely@ilbers.de> References: <20230922091003.20763-1-ubely@ilbers.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: k96EsN/Ny2ET 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 --- Kconfig | 1 + kas/package/Kconfig | 154 ++++++++++++++++++++ kas/package/packages-distro.yaml | 9 ++ kas/package/pkg_cowsay.yaml | 9 ++ kas/package/pkg_enable-fsck.yaml | 9 ++ kas/package/pkg_example-module.yaml | 9 ++ kas/package/pkg_example-prebuilt.yaml | 9 ++ kas/package/pkg_example-raw.yaml | 9 ++ kas/package/pkg_expand-on-first-boot.yaml | 9 ++ kas/package/pkg_hello-isar.yaml | 9 ++ kas/package/pkg_hello.yaml | 9 ++ kas/package/pkg_isar-disable-apt-cache.yaml | 9 ++ kas/package/pkg_isar-exclude-docs.yaml | 9 ++ kas/package/pkg_kselftest.yaml | 9 ++ kas/package/pkg_samefile.yaml | 9 ++ kas/package/pkg_sshd-regen-keys.yaml | 9 ++ 16 files changed, 281 insertions(+) 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 a62fbf6c..5a3050a4 100644 --- a/Kconfig +++ b/Kconfig @@ -16,4 +16,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/package/Kconfig b/kas/package/Kconfig new file mode 100644 index 00000000..139651cd --- /dev/null +++ b/kas/package/Kconfig @@ -0,0 +1,154 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH +# +# Authors: +# Uladzimir Bely + +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..a4bf9149 --- /dev/null +++ b/kas/package/packages-distro.yaml @@ -0,0 +1,9 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +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..1b1a174d --- /dev/null +++ b/kas/package/pkg_cowsay.yaml @@ -0,0 +1,9 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +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..2ea836d0 --- /dev/null +++ b/kas/package/pkg_enable-fsck.yaml @@ -0,0 +1,9 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +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..f756d681 --- /dev/null +++ b/kas/package/pkg_example-module.yaml @@ -0,0 +1,9 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +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..81800d85 --- /dev/null +++ b/kas/package/pkg_example-prebuilt.yaml @@ -0,0 +1,9 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +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..65298e70 --- /dev/null +++ b/kas/package/pkg_example-raw.yaml @@ -0,0 +1,9 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +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..d5dea83d --- /dev/null +++ b/kas/package/pkg_expand-on-first-boot.yaml @@ -0,0 +1,9 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +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..391707ea --- /dev/null +++ b/kas/package/pkg_hello-isar.yaml @@ -0,0 +1,9 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +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..9bb35486 --- /dev/null +++ b/kas/package/pkg_hello.yaml @@ -0,0 +1,9 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +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..bca3a6e9 --- /dev/null +++ b/kas/package/pkg_isar-disable-apt-cache.yaml @@ -0,0 +1,9 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +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..5eca26fa --- /dev/null +++ b/kas/package/pkg_isar-exclude-docs.yaml @@ -0,0 +1,9 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +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..f87080aa --- /dev/null +++ b/kas/package/pkg_kselftest.yaml @@ -0,0 +1,9 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +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..9738cf64 --- /dev/null +++ b/kas/package/pkg_samefile.yaml @@ -0,0 +1,9 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +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..94fe6e47 --- /dev/null +++ b/kas/package/pkg_sshd-regen-keys.yaml @@ -0,0 +1,9 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +header: + version: 14 + +local_conf_header: + package-sshd-regen-keys: | + IMAGE_INSTALL:append = " sshd-regen-keys" -- 2.20.1