From: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>
To: Henning Schild <henning.schild@siemens.com>
Cc: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>,
isar-users@googlegroups.com, claudius.heine.ext@siemens.com,
jan.kiszka@siemens.com, ibr@radix50.net
Subject: Re: Discussion: Base-apt features
Date: Thu, 26 Sep 2019 16:32:16 +0530 [thread overview]
Message-ID: <20190926110216.GA18169@lightning> (raw)
In-Reply-To: <20190926114026.182600d1@md1za8fc.ad001.siemens.net>
On Thu, Sep 26, 2019 at 11:40:26AM +0200, Henning Schild wrote:
> Hi Vijai Kumar K,
>
> that is a lot of points at once, we should probably go step by step
> since they are all more complicated than just one bullet-point on a
> TODO-list.
>
> Let me start off with a pragmatic "solution" that is easy to implement
> and likely to solve a lot or problems at once.
>
> Instead of relying on Isar to get you a partial debian mirror, you you
> just mirror upstream and freeze it for a product. You would end up with
> a consistent mirror that will contain all you might ever need, all
> signed with sources etc. A little big ... yes, but easy.
> If you decide to trust in the availability of
> https://snapshot.debian.org/ that might also be a path to address some
> problems you might be seeing today.
We could do that but would be an overhead considering we have only close to
200 packages which we need. Also there might be cases where in we patch
a package locally for a CVE(like openssl) and include it in repo. Maintaining
changes like those becomes complicated.
>
> But yes, we probably still want a partial mirroring mechanism inside
> Isar.
>
> Am Wed, 25 Sep 2019 13:11:22 +0530
> schrieb Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>:
>
> > Hi All,
> >
> > Starting this thread to discuss the base-apt features and limitations.
> >
> > Here I am listing down some of the issues/features and possibly the
> > need for them.
> >
> >
> > 1. Support for adding source packages.
> >
> > Currently we have support only for binaries. The corresponding source
> > files could also be added.
>
> It goes even further. You probably want the sources for every binary
> you install.
> + all the other binaries coming from those sources
> + all build deps, again sources and all binaries
> + recursion of the former
>
> We would have to see how big that gets ;).
Agreed. The repo size might get compounded. How about we keep it as an optional
feature so in case some one needs it, they could bring in all the sources and
their dependencies.
>
> > 2. Support for using password protected keys.
> >
> > It is a good practice to have the gpg key protected to have an
> > additional level of security. Right now ISAR does not have provisions
> > to use password protected keys.
>
> Let us put this aside for now, is is technically just something small
> on top of signing.
Agreed. We have bigger things to do and this could wait till we piece in the
rest of the things.
>
> > 3. Support for specifying the signing key.
> >
> > Right now, the signing mechanism uses the default gpg key of the
> > system. This is problematic in many ways. Especially for CI. In the
> > current implementation, eventhough we specify the key, we are not
> > really using it.
>
> Did you not have a patch for that "=yes" bug? Anyways signing is not
> trivial and we need revisit that anyways.
Yes. It was proposed by Amy Fong. However I was into the idea of using
KeyID instead of key file. Later decided instead of doing a incremental
change to fix it, will wait for to freeze the new design if any.
>
> There are package-level signatures and repo signatures. For the partial
> debian-mirror we just need to take care of the repo-level.
>
Yes. We could just have the metadata signed.
> All customizations are currently coming out of isar-apt, which is
> totally unsigned.
>
> > 4. Support for adding packages only to base-apt.
> >
> > Sometimes, we might need a package to be present in base-apt but not
> > in the target yet. Things like dev & dbg packages. It would be good
> > if we have something like BASE_APT_INSTALL which contains the list
> > which would be populated only in base-apt.
>
> I would suggest to have another image to do that. You can do that
> today already.
>
> bulky-image_0.1.bb:
> require my-image
> BASE_APT_INSTALL = "strace gdb"
> IMAGE_INSTALL += BASE_APT_INSTALL
>
> Now you build that and ship my-image. I assume that my-image will be
> able to apt-get from base-apt later.
Thanks for the pointer. There is a catch though. Not all images can be
installed simultaneously to the image. Some may conflict.
For example I would not be able to install libssl1.0-dev and libssl-dev
together. But one might need them to co-exist in the repo like how they do
now in upstream. So what I thought was that BASE_APT_INSTALL shall be
processed by a task which calls apt with --download-only to download these
and include it in the local partial repo.
>
> If that pattern works we can probably add an example, support-code and
> test cases to make that the "supported pattern".
>
> > 5. Refactoring code to consolidate reprepro calls.
> >
> > Right now, reprepro calls are spread across the build system. Its
> > dependencies are spread across too(Handling envs like GNUPGHOME,
> > distributions file etc). My first thought is to have a seperate
> > module implemented to handle these calls.
>
> I think that is not too related. The calls for isar-apt are spread and
> will probably stay that way, but they should currently not deal with
> anything around signing.
>
> For base-apt i envision a post-process task (like implemented today) as
> a first implementation. If we decide to build it up on the fly, those
> reprepro calls, downloads, signing will shift forward in the buildchain
> and will spread like we have it for isar-apt.
Even if isar-apt and base-apt have their own differences, the tools used
to generate them is same. There might be some differences in options.
Bringing those tools(right now reprepro) under one roof would make the code
easier to maintain. Otherwise things like GNUPGHOME patch[1] would show up
and lead to more duplication and difficult maintainence.
[1]
https://github.com/ilbers/isar/commit/b8a2c6020ccb1b85cc4d0f6b75bc3ac090c24dc7
Thanks,
Vijai Kumar K
>
> Next steps:
> - try the idea in 4.
> - implement 1 with revisiting [1]
>
> [1]
> https://groups.google.com/forum/#!searchin/isar-users/base-apt$20caching$20improvements|sort:date/isar-users/_dqKYWUtTa0/velGfVg0BgAJ
>
> Henning
>
> > Like how
> > https://github.com/openembedded/openembedded-core/blob/master/meta/lib/oe/gpg_sign.py
> > is used for all signing purpose.
> >
> > Please add more if you have some features/limitations which needs to
> > be addressed.
> >
> > Thanks,
> > Vijai Kumar K
>
next prev parent reply other threads:[~2019-09-26 11:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-25 7:41 Vijai Kumar K
2019-09-25 8:12 ` Baurzhan Ismagulov
2019-09-25 9:02 ` Vijai Kumar K
2019-09-25 9:51 ` Baurzhan Ismagulov
2019-09-25 10:14 ` Claudius Heine
2019-09-25 10:26 ` Baurzhan Ismagulov
2019-09-25 11:56 ` Claudius Heine
2019-09-25 12:19 ` Baurzhan Ismagulov
2019-09-25 12:29 ` Jan Kiszka
2019-09-25 12:39 ` Claudius Heine
2019-09-26 9:40 ` Henning Schild
2019-09-26 11:02 ` Vijai Kumar K [this message]
2019-09-26 11:30 ` Henning Schild
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=20190926110216.GA18169@lightning \
--to=vijaikumar.kanagarajan@gmail.com \
--cc=claudius.heine.ext@siemens.com \
--cc=henning.schild@siemens.com \
--cc=ibr@radix50.net \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.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