From: Benedikt Niedermayr <benbrenson89@googlemail.com>
To: isar-users@googlegroups.com
Cc: Benedikt Niedermayr <Benedikt.Niedermayr@mixed-mode.de>
Subject: [PATCH v2 0/7] Local apt cache with aptly V2
Date: Thu, 8 Feb 2018 11:40:05 +0100 [thread overview]
Message-ID: <1518086412-12567-1-git-send-email-Benedikt.Niedermayr@mixed-mode.de> (raw)
Hi all,
this series implements a PoC for running reproducible builds.
The core is based on aptly, which is a nice mirroring tool for debian repositories.
The mirroring solution does the following:
- Aptly generates a mirrors for upstream repositories as well as snapshots and also a local repository for isar packages.
- Get a list of all packages for mirroring before rootfs and buildchroot is beeing created.
This is done by running an own bitbake cooker for parsing the recipes by taking append files,
configs, datastore and also selected layers(bblayers) into account.
This solves the problem when upstream repos getting updates between rootfs and buildchroot creation.
- Aptly will recieve the list of packages and calculates all further required dependencies for the mirror.
- Rootfs and buildchroot will never pull from upstream repos but instead from the local mirrors.
- The following dependencies will be collected:
* Depends
* Build-Depends
* Build-Depends-Indep
Open Questions:
- Think about a more dynamic multistrap.conf generation. Ŕunning sed to multiconfig templates is not really flexible.
- Get a better naming convention for aptly mirrors, snapshots and repos. This will help to get multiconfig compatible.
Where are pros and cons here?
- Where to store the cache? TMPDIR might not be the best location.
- Finding Build-Depends for packages build with dpkg-raw is not supported, yet.
Howto test:
Prefetching of Build-Depends requires all debian control files to be available, therefore two things have to be done:
- Run unpackall task: bitbake isar-image-base:do_unpackall
- Provide a debian/control file at ${WORKDIR}/${SRC_DIR}/debian/control
- Overload the do_unpack_debian hook to make this possible(only for non debianized packages).
I know not everbody will like this more complicated way, and first I was with them.
But now I don't see any possibility to run real deterministic builds.
Benedikt Niedermayr (7):
Implement support for setting up the local apt mirror and isar
repository with aptly.
Added API class for apt cache.
Added apt-cache functionality for buildchroot.
Added apt-cache functionality for image rootfs.
Added do_finalize_image task.
Added support for installing isar packages to local isar repository.
Introducing fetchall, unpackall and unpack_debian tasks.
.../recipes-core/images/files/multistrap.conf.in | 8 +-
meta-isar/recipes-core/images/isar-image-base.bb | 25 ++-
meta/classes/apt-cache.bbclass | 237 +++++++++++++++++++++
meta/classes/base.bbclass | 20 ++
meta/classes/dpkg-base.bbclass | 15 +-
meta/classes/image.bbclass | 23 +-
meta/recipes-devtools/buildchroot/buildchroot.bb | 36 +++-
.../buildchroot/files/configscript.sh | 1 +
.../buildchroot/files/multistrap.conf.in | 17 +-
meta/recipes-devtools/isar-apt/files/aptly.conf.in | 17 ++
meta/recipes-devtools/isar-apt/isar-apt.bb | 174 +++++++++++++--
11 files changed, 524 insertions(+), 49 deletions(-)
create mode 100644 meta/classes/apt-cache.bbclass
create mode 100644 meta/recipes-devtools/isar-apt/files/aptly.conf.in
--
2.7.4
next reply other threads:[~2018-02-08 10:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 10:40 Benedikt Niedermayr [this message]
2018-02-08 10:40 ` [PATCH v2 1/7] Implement support for setting up the local apt mirror and isar repository with aptly Benedikt Niedermayr
2018-02-08 10:40 ` [PATCH v2 2/7] Added API class for apt cache Benedikt Niedermayr
2018-02-08 10:40 ` [PATCH v2 3/7] Added apt-cache functionality for buildchroot Benedikt Niedermayr
2018-02-08 10:40 ` [PATCH v2 4/7] Added apt-cache functionality for image rootfs Benedikt Niedermayr
2018-02-08 10:40 ` [PATCH v2 5/7] Added do_finalize_image task Benedikt Niedermayr
2018-02-08 10:40 ` [PATCH v2 6/7] Added support for installing isar packages to local isar repository Benedikt Niedermayr
2018-02-08 10:40 ` [PATCH v2 7/7] Introducing fetchall, unpackall and unpack_debian tasks Benedikt Niedermayr
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=1518086412-12567-1-git-send-email-Benedikt.Niedermayr@mixed-mode.de \
--to=benbrenson89@googlemail.com \
--cc=Benedikt.Niedermayr@mixed-mode.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