From: Henning Schild <henning.schild@siemens.com>
To: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>
Cc: <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 13:30:53 +0200 [thread overview]
Message-ID: <20190926133053.4bd7d4c5@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20190926110216.GA18169@lightning>
Am Thu, 26 Sep 2019 16:32:16 +0530
schrieb Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>:
> 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.
Locally created packages should imho not be mixed with mirrored ones.
So i would expect a modified upstream package to end up in isar-apt,
not base-apt.
> >
> > 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.
Hard to maintain and error-prone to allow toggling switches. I guess
being conservative and storing too much is better than not having
something years later. Storage and bandwidth are cheap enough.
> >
> > > 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.
As far as i remember that was a stand-alone bug fix that made total
sense and did not change the way things generally work. So easy to
merge, even before possibly rebuilding things here.
> >
> > 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.
That is what we do, the packages are signed by their maintainers.
> > 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.
Tell the vendor of that libssl1.0 package to finally get that sorted! I
guess i know that crap component too well ;).
Just have many bulky images to address that, in your case two should do.
But you are right, a set of packages going just into the download step
would work as well. I am just afraid of too many variations, of how
things get fetched and need to be mirrored/archived later.
Going back to 1 and to [1] you will need to answer questions like.
- what is the source to a .deb?
- what are sibbling debs for a .deb (same source)
- what are build deps (debs and sources)
And now you would have to answer this for installed and not installed.
Now the worst case is probably a custom debug tool in isar-apt, that
has deps and build-deps from upstream. i.e. the dbgsyms and headers of
your patched openssl
We should go step by step to understand what we need and how to
implement it when needed. I still think the additional image(s) sound
like a good pattern to get that done today.
> >
> > 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.
Yes i know. The code is also full of calls to apt-get with very similar
args, that are never consolidated anywhere.
If you see room for improvement send patches. But that is just style
and has little to do with the functional points, which to me seem to be
the main subject of this thread. Style is important and Isar needs to
improve here a lot!
Henning
> [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
> >
prev parent reply other threads:[~2019-09-26 11:30 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
2019-09-26 11:30 ` Henning Schild [this message]
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=20190926133053.4bd7d4c5@md1za8fc.ad001.siemens.net \
--to=henning.schild@siemens.com \
--cc=claudius.heine.ext@siemens.com \
--cc=ibr@radix50.net \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
--cc=vijaikumar.kanagarajan@gmail.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