[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian-based product build system



On Tue, Apr 12, 2016 at 03:54:59PM +0900, 山田 真大 wrote:
> Your goal is very similar to our meta-debian[1][2],
> but the approach is not same.

Isar's goals are to combine the advantages of source and binary distros for
building end products:

+ Debian has many packages.
+ Debian provides cross-compilers.
+ Debian's binary packages don't need to be re-built for every end product.
+ Debian has very rich tool ecosystem.
- Debian doesn't provide one-command, on-demand building of the whole project.
+ Yocto provides one-command, on-demand building.
+ Yocto's build process is fully customizable.
+ Yocto provides layering (multiple core / vendor / product layers possible).
- Yocto builds the whole project from scratch for every end product.
- Yocto builds cross-compilers from scratch for every end product.

Isar's goal is building images for particular end products using pre-built
binary upstream distros like Debian, without having to re-build many packages
for every product; the focus is on the project level. The vision is that
upstream distros are maintained at a higher level, community- or company-wide.
As I see it, meta-debian is a complete distro, and isar is a minimal build
system for end products; isar requires using upstreams without including them
in the end product repo.

In this way, end product repos are small, upstreams are in separate repos and
don't need to be re-built for every project. Major customizations should happen
at the upstream level. Isar supports package and rootfs customization mainly
for the following use cases:

* They are rather shorter-term exceptions for a particular project that should
  eventually be integrated to the upstream later, OR

* They are very product-specific and won't be integrated (e.g., fstab, etc.).

Based on the above criteria, meta-debian is a source distro with the following
features (please correct me if anything is wrong):

* Many generic packages
* Project packages and customizations in layers
* Builds cross-compilers
* Builds the whole distro from source
* One-command, on-demand build
* Provides layering

isar is a product build system relying on (and strictly separated from) a
binary distro. Features at the moment:

* Smaller number of project packages and customizations
* Relies on a separate, pre-built distro
* Relies on external cross-compilers
* Project packages built from source
* One-command, on-demand build
* Provides layering

Till now, isar works only with Debian as upstream. While there have been
efforts to bring Debian closer to the requirements in the embedded area [1],
it's very difficult to achieve that for the whole distro. Meta-debian does this
today, so I'm interested in trying meta-debian as an upstream. Does it generate
binary debs? One also needs an apt repo and debootstrap config.


> How do you achieve Products' modified Debian packages?
> 
> In meta-debian, package build follows poky framework.
> So, if product needs to customize a package,
> we will create bbappend recipe under meta-product layer
> and add some shell script functions (e.g. do_install_append)
> or python script to the recipe.
> Because of poky framework, we can customize each task
> (do_patch, do_configure, do_compile, do_install, etc...)
> for the package.
> 
> On the other hand,
> isar run do_fetch and dpkg-buildpackage for package build.
> When and how package customization is done?

We have two levels of customizations. At the company level, there is an
internal embedded Linux distro (like meta-debian, but binary). The distro team
creates source and binary debs and packs them into an apt archive, which is
versioned in a distro repo. Projects install them without re-building every
time.

At the project level, selected upstream packages are optionally customized as a
complete fork (separate package repo / branch with debian/). The project team
creates source and binary debs and packs them into the project's apt repo. The
project installs them without re-building every time.

This way of customization is rather simplistic; it duplicates the whole package
and requires repo / branch management. Now we would like to study your
experience in this area and try the debian/*.patch + bbappend way. Still, we
would like to keep source and binary deb pre-building by the respective team.
At the moment, apt archive generation isn't yet integrated into isar.

For completeness, there are product-specific packages. They are provided in
package repos together with debian/. The product repo is cloned from isar.
Product source and binary debs are re-built for every new release.


Does this answer your question? I'll study the other mail in the next days.


References:

1. Long-term mass bug filing for crossbuild support
   https://lists.debian.org/debian-devel/2007/11/msg00118.html


With kind regards,
Baurzhan.


Reply to: