From: Baurzhan Ismagulov <ibr@radix50.net>
To: isar-users@googlegroups.com
Subject: [PATCH] base-apt, isar-apt: Split code and configuration
Date: Sun, 15 Mar 2020 18:02:15 +0100 [thread overview]
Message-ID: <20200315170215.13524-1-ibr@radix50.net> (raw)
In-Reply-To: <20200315165852.nb4okarmcw5pwwnv@yssyq.m.ilbers.de>
From: Baurzhan Ismagulov <ibr@ilbers.de>
Signed-off-by: Baurzhan Ismagulov <ibr@ilbers.de>
---
meta/classes/repository.bbclass | 10 ++++------
meta/recipes-devtools/base-apt/base-apt.bb | 3 +++
meta/recipes-devtools/base-apt/files/distributions.in | 3 +++
meta/recipes-devtools/isar-apt/files/distributions.in | 3 +++
meta/recipes-devtools/isar-apt/isar-apt.bb | 5 ++++-
5 files changed, 17 insertions(+), 7 deletions(-)
create mode 100644 meta/recipes-devtools/base-apt/files/distributions.in
create mode 100644 meta/recipes-devtools/isar-apt/files/distributions.in
diff --git a/meta/classes/repository.bbclass b/meta/classes/repository.bbclass
index 80502dc..c70138f 100644
--- a/meta/classes/repository.bbclass
+++ b/meta/classes/repository.bbclass
@@ -8,7 +8,8 @@ repo_create() {
local dir="$1"
local dbdir="$2"
local codename="$3"
- local keyfiles="$4"
+ local distros_in="$4"
+ local keyfiles="$5"
if [ -n "${GNUPGHOME}" ]; then
export GNUPGHOME="${GNUPGHOME}"
@@ -16,11 +17,8 @@ repo_create() {
if [ ! -f "${dir}"/conf/distributions ]; then
mkdir -p "${dir}"/conf/
- cat <<EOF > "${dir}"/conf/distributions
-Codename: ${codename}
-Architectures: i386 armhf arm64 amd64 mipsel riscv64 source
-Components: main
-EOF
+ sed -e "s#{CODENAME}#${codename}#g" ${distros_in} \
+ >"${dir}"/conf/distributions
if [ -n "${keyfiles}" ] ; then
local option=""
for key in ${keyfiles}; do
diff --git a/meta/recipes-devtools/base-apt/base-apt.bb b/meta/recipes-devtools/base-apt/base-apt.bb
index 408dd63..da3e32e 100644
--- a/meta/recipes-devtools/base-apt/base-apt.bb
+++ b/meta/recipes-devtools/base-apt/base-apt.bb
@@ -6,6 +6,8 @@
inherit repository
+SRC_URI = "file://distributions.in"
+
BASE_REPO_KEY ?= ""
KEYFILES ?= ""
@@ -50,6 +52,7 @@ repo() {
repo_create "${REPO_BASE_DIR}"/"${BASE_DISTRO}" \
"${REPO_BASE_DB_DIR}"/"${BASE_DISTRO}" \
"${BASE_DISTRO_CODENAME}" \
+ "${WORKDIR}/distributions.in" \
"${KEYFILES}"
if [ -d '${BUILDCHROOT_HOST_DIR}/var/cache/apt' ] &&
diff --git a/meta/recipes-devtools/base-apt/files/distributions.in b/meta/recipes-devtools/base-apt/files/distributions.in
new file mode 100644
index 0000000..3cf7ea5
--- /dev/null
+++ b/meta/recipes-devtools/base-apt/files/distributions.in
@@ -0,0 +1,3 @@
+Codename: {CODENAME}
+Architectures: i386 armhf arm64 amd64 mipsel riscv64 source
+Components: main
diff --git a/meta/recipes-devtools/isar-apt/files/distributions.in b/meta/recipes-devtools/isar-apt/files/distributions.in
new file mode 100644
index 0000000..3cf7ea5
--- /dev/null
+++ b/meta/recipes-devtools/isar-apt/files/distributions.in
@@ -0,0 +1,3 @@
+Codename: {CODENAME}
+Architectures: i386 armhf arm64 amd64 mipsel riscv64 source
+Components: main
diff --git a/meta/recipes-devtools/isar-apt/isar-apt.bb b/meta/recipes-devtools/isar-apt/isar-apt.bb
index c53b01f..0458bac 100644
--- a/meta/recipes-devtools/isar-apt/isar-apt.bb
+++ b/meta/recipes-devtools/isar-apt/isar-apt.bb
@@ -6,6 +6,8 @@
inherit repository
+SRC_URI = "file://distributions.in"
+
do_cache_config[stamp-extra-info] = "${DISTRO}"
do_cache_config[lockfiles] = "${REPO_ISAR_DIR}/isar.lock"
@@ -14,7 +16,8 @@ do_cache_config[lockfiles] = "${REPO_ISAR_DIR}/isar.lock"
do_cache_config() {
repo_create "${REPO_ISAR_DIR}"/"${DISTRO}" \
"${REPO_ISAR_DB_DIR}"/"${DISTRO}" \
- "${DEBDISTRONAME}"
+ "${DEBDISTRONAME}" \
+ "${WORKDIR}/distributions.in"
}
addtask cache_config after do_unpack before do_build
--
2.20.1
next prev parent reply other threads:[~2020-03-15 17:02 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 21:56 [PATCHv5 00/29] base-apt-rework Henning Schild
2020-03-10 21:56 ` [PATCHv5 01/29] repository: new class to deal with repos Henning Schild
2020-03-10 21:56 ` [PATCHv5 02/29] dpkg-base: add download caching of apt:// downloads Henning Schild
2020-03-10 21:56 ` [PATCHv5 03/29] meta: dpkg-base: convert "exit" into "return 0" Henning Schild
2020-03-10 21:56 ` [PATCHv5 04/29] base-apt: change the sources.list to also offer deb-src Henning Schild
2020-03-10 21:56 ` [PATCHv5 05/29] base-apt: add deb-src packages as well Henning Schild
2020-03-10 21:56 ` [PATCHv5 06/29] base-apt: do not skip gpg check when it is signed Henning Schild
2020-03-10 21:56 ` [PATCHv5 07/29] ci: conf: add "hello" to the sample config and every build Henning Schild
2020-03-10 21:56 ` [PATCHv5 08/29] meta: split all apt-get invocations into download and execution Henning Schild
2020-03-10 21:56 ` [PATCHv5 09/29] meta: create DL_DIR support for all apt-get downloaded .debs Henning Schild
2020-03-10 21:56 ` [PATCHv5 10/29] meta: import DL_DIR debs before apt-get download steps Henning Schild
2020-03-10 21:56 ` [PATCHv5 11/29] meta: include DL_DIR deb import/export into bootstrap Henning Schild
2020-03-10 21:56 ` [PATCHv5 12/29] base-apt: populate from DEBDIR as well Henning Schild
2020-03-10 21:56 ` [PATCHv5 13/29] base-apt: drop the "apt_cache" feature Henning Schild
2020-03-10 21:56 ` [PATCHv5 14/29] base-apt: do not copy debs directly out of rootfss anymore Henning Schild
2020-03-10 21:56 ` [PATCHv5 15/29] base-apt: rework base-apt population Henning Schild
2020-03-10 21:56 ` [PATCHv5 16/29] base-apt: move class "base-apt-helper" into only user Henning Schild
2020-03-10 21:56 ` [PATCHv5 17/29] CI: include "isar-disable-apt-cache" into all CI images Henning Schild
2020-03-10 21:56 ` [PATCHv5 18/29] CI: include "cowsay" into default build to test dpkg-gbp Henning Schild
2020-03-10 21:56 ` [PATCHv5 19/29] CI: set BB_NO_NETWORK for cached rebuild Henning Schild
2020-03-10 21:56 ` [PATCHv5 20/29] meta: repository: implement repo_contains_package and use it in base_apt Henning Schild
2020-03-10 21:56 ` [PATCHv5 21/29] meta: repository: simplify the matching of packages Henning Schild
2020-03-10 21:56 ` [PATCHv5 22/29] meta: deb-dl-dir: do not cache debs from isar-apt Henning Schild
2020-03-10 21:56 ` [PATCHv5 23/29] base-apt: pull base-apt population to the front of the build chain Henning Schild
2020-03-10 21:56 ` [PATCHv5 24/29] meta: base-apt: remove isar-apt check from population Henning Schild
2020-03-10 21:56 ` [PATCHv5 25/29] meta: deb-dl-dir: only export newly downloaded files Henning Schild
2020-03-18 7:59 ` Henning Schild
2020-03-20 9:27 ` Henning Schild
2020-03-20 13:47 ` Baurzhan Ismagulov
2020-03-10 21:56 ` [PATCHv5 26/29] CI: test a custom kernel build in the base-apt offline rebuild Henning Schild
2020-03-10 21:56 ` [PATCHv5 27/29] meta/deb-dl-dir: make subshell verbose and fail on error Henning Schild
2020-03-10 21:56 ` [PATCHv5 28/29] meta: deb-dl-dir: fix "command not found" error when excluding pkgs Henning Schild
2020-03-10 21:56 ` [PATCHv5 29/29] RECIPE-API-CHANGELOG: add a few bits on the base-apt caching changes Henning Schild
2020-03-15 16:58 ` [PATCHv5 00/29] base-apt-rework Baurzhan Ismagulov
2020-03-15 17:02 ` Baurzhan Ismagulov [this message]
2020-03-30 20:26 ` [PATCH] base-apt, isar-apt: Split code and configuration Baurzhan Ismagulov
2020-03-17 8:04 ` [PATCHv5 00/29] base-apt-rework Henning Schild
2020-03-20 13:38 ` [PATCH v6 20/29] meta: repository: implement repo_contains_package and use it in base_apt Baurzhan Ismagulov
2020-03-20 13:38 ` [PATCH v6 23/29] base-apt: pull base-apt population to the front of the build chain Baurzhan Ismagulov
2020-03-20 13:39 ` [PATCH v6 24/29] meta: base-apt: remove isar-apt check from population Baurzhan Ismagulov
2020-03-20 13:39 ` [PATCH v6 28/29] meta: deb-dl-dir: fix "command not found" error when excluding pkgs Baurzhan Ismagulov
2020-03-20 13:41 ` [PATCH v6 29/29] RECIPE-API-CHANGELOG: add a few bits on the base-apt caching changes Baurzhan Ismagulov
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=20200315170215.13524-1-ibr@radix50.net \
--to=ibr@radix50.net \
--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