From: Baurzhan Ismagulov <ibr@radix50.net>
To: isar-users <isar-users@googlegroups.com>
Subject: Re: Idea for implementing reproducible builds
Date: Wed, 23 May 2018 00:32:24 +0200 [thread overview]
Message-ID: <20180522223224.GE5882@yssyq.radix50.net> (raw)
In-Reply-To: <3467a5ec-182e-8c9a-cd19-7ad898323be7@siemens.com>
Hello Claudius,
On Tue, May 22, 2018 at 01:55:21PM +0200, Claudius Heine wrote:
> I am still working on reproducible builds and here is my current idea to
> solve this.
>
> Simple put: Mount the /var/cache/apt/archives of the images and buildchroot
> to the isar-bootstrap root file system and then create a tarball of it. This
> way we have a tarball of the build just after debootstrap + upgrade with the
> one 'apt update' step done, but without any other changes to it and all used
> packages already in the apt package cache.
>
> When restoring just skip most of the isar-bootstrap steps and extract the
> tarball instead, since the packages are available in the package cache and
> the package index is not updated it will use the packages from the cache.
>
> This way we would side step the obstacle to make debootstrap reproducible by
> just using its product while the reset of the process can be redone by isar.
Thanks for sharing.
As I understand it:
1. The user runs bitbake isar-image-base, which
1. Debootstraps a rootfs
2. Tars it
3. Unpacks the tar into buildchroot/rootfs and isar-image-base/rootfs
2. The user adds the tarball to the product repo
Is this correct?
In this scenario:
* Step 1: How does bitbake decide whether to debootstrap or use the tarball?
* Step 2: If I have the following repo, where should the tar file be located
and versioned?
myrepo
- meta
- meta-isar
- product1
- product2
* If two products built from one repo have non-identical rootfses, what does
the tarball contain?
* What is the user supposed to do if he wants to update the tar to the current
upstream, fully or in part?
Considering our existing use cases, I'd suggest a couple of changes to your
concept.
Let's abbreviate our copy of Debian artifacts as "debian-mirror" (be it in form
of a tarball or anything else).
I see the following use cases:
U1. debian-mirror doesn't exist. Create debian-mirror from upstream.
U2.1. debian-mirror is versioned, e.g. in git.
U2.2. Use debian-mirror for buildchroot/rootfs and isar-image-base/rootfs.
U2.3. Don't use upstream for building buildchroot/rootfs and
isar-image-base/rootfs.
U3.1. debian-mirror exists. Update all packages from upstream into
debian-mirror.
U3.2. debian-mirror exists. Update chosen packages from upstream into
debian-mirror. E.g., openssl, optionally its dependencies, optionally its
dependents.
U3.3. debian-mirror exists and is used by two products. One product has to be
updated. The other one will be updated later. For product 1, update
chosen or all packages from upstream to debian-mirror. Product 2 should
still use the old packages.
U3.4. Remove packages not used in any previous commit.
Given those, I'd suggest using debs as versioned entities instead of the rootfs
tarball.
Create an apt repo with dpkg-scanpackages and dpkg-scansources and use it to
debootstrap buildchroot and isar-image-base.
This would address U2.3 and U3.3. This has been tested in practice, works
well, and is in my opinion the best way to solve the problem.
With versioned tarballs, an update of a single package would make the whole
tarball change. This makes the history unreadable, wastes disk space, and many
tools (including git) have problems with big files.
>From the UX perspective, I'd prefer to separate building images from preparing
debian-mirror if possible. A separate command / task / bitbake run with a var
set / unset, etc. E.g., bitbake -C createmirror isar-image-base, bitbake -C
updatemirror isar-image-base, etc.
Please include user documentation when you provide patches.
I think that in the end, we'll have to providing specialized infrastructure for
managing debian-mirror(s). It may or may not be based on anything from
https://wiki.debian.org/DebianRepository/Setup?action=show&redirect=HowToSetupADebianRepository
.
With kind regards,
Baurzhan.
next prev parent reply other threads:[~2018-05-22 22:32 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-22 11:55 Claudius Heine
2018-05-22 13:47 ` Andreas Reichel
2018-05-22 14:24 ` Claudius Heine
2018-05-22 22:32 ` Baurzhan Ismagulov [this message]
2018-05-23 8:22 ` Claudius Heine
2018-05-23 11:34 ` Claudius Heine
2018-06-04 11:48 ` Baurzhan Ismagulov
2018-05-23 6:32 ` [RFC PATCH 0/3] Reproducible build claudius.heine.ext
2018-05-23 6:32 ` [RFC PATCH 1/3] meta/isar-bootstrap-helper+dpkg.bbclass: bind mount /var/cache/apt/archives claudius.heine.ext
2018-05-23 6:32 ` [RFC PATCH 2/3] meta/classes/image: added isar_bootstrap_tarball task claudius.heine.ext
2018-05-23 6:32 ` [RFC PATCH 3/3] meta/isar-bootstrap: add 'do_restore_from_tarball' task claudius.heine.ext
2018-05-23 14:30 ` [RFC PATCH 0/3] Reproducible build Maxim Yu. Osipov
2018-05-23 15:20 ` Claudius Heine
2018-05-24 16:00 ` Henning Schild
2018-05-25 8:10 ` Claudius Heine
2018-05-25 11:57 ` Maxim Yu. Osipov
2018-05-25 17:04 ` Claudius Heine
2018-06-04 11:37 ` Baurzhan Ismagulov
2018-06-04 16:05 ` Claudius Heine
2018-06-05 10:42 ` Claudius Heine
2018-06-06 9:17 ` Claudius Heine
2018-06-06 14:20 ` Claudius Heine
2018-06-07 8:50 ` Baurzhan Ismagulov
2018-06-07 8:08 ` Maxim Yu. Osipov
2018-06-11 8:45 ` Claudius Heine
2018-06-11 13:51 ` Claudius Heine
2018-06-14 8:50 ` Claudius Heine
2018-06-20 4:20 ` Maxim Yu. Osipov
2018-06-20 8:12 ` Claudius Heine
2018-05-23 13:26 ` [RFC PATCH v2 " claudius.heine.ext
2018-05-23 13:26 ` [RFC PATCH v2 1/3] meta/isar-bootstrap-helper+dpkg.bbclass: bind mount /var/cache/apt/archives claudius.heine.ext
2018-05-23 13:26 ` [RFC PATCH v2 2/3] meta/classes/image: added isar_bootstrap_tarball task claudius.heine.ext
2018-05-23 13:26 ` [RFC PATCH v2 3/3] meta/isar-bootstrap: add 'do_restore_from_tarball' task claudius.heine.ext
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=20180522223224.GE5882@yssyq.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