In case any of the source files changed, openSUSE Build Service rebuilds the dependent packages regardless of whether that particular modification affects the dependency. This makes our resources footprint bigger (and the electrical power bills higher). It also affects users, because every new package build causes the package manager to include that package in the next update thus consuming network bandwidth and resources of users' computers.

Current OBS controls for package rebuild triggers

It is possible to control dependent packages build triggers on a per repository basis (see OBS build scheduling strategies). You will find an explanation on that page that any setting other than the default, which is "always rebuild", is not safe and should not be used if the packages are to be distributed. Apparently, the concern is more of a "this repository is official/testing" kind.

Which modifications justify rebuilding

First, we need to define the modifications which justify rebuilding the dependencies. This is a list which should be amended by the more knowledgeable on software builds:

  • new library versions or binary API changes (the latter should always cause the former?)

  • changes in #includes files (in case of library development packages); it is preferable to verify if the dependencies can build with these modifications sooner rather than later

Possible improvements

Extend the checkin command

I suppose that this is a hard problem to solve automatically, so it is good to start small with some infrastructure to allow managing the dependencies rebuild process. We could add the "don't rebuild/must rebuild dependencies" option to the checkin command.

Make builds reproducible

There are ongoing efforts to get reproducible builds, that is if the source has not changed, then the built package should be exactly equal to the previous build too.

According to osc triggerreason on several packages in the openSUSE Build Service reference instance, quite a few rebuilds were due to md5 sum not matching. If more builds were reproducible that would obviously reduce the total number of builds. More, a reproducible build would (almost) completely remove transitive builds (see the build project attribute).

See the following pages for more information:

Questions

  • Is there a facility in OBS similar to the Debian's dh_buildinfo? Would that be useful in OBS? Is there a way to keep that information within the existing infrastructure?

  • How are md5 sums produced?

Resources

  • osc triggerreason --help

  • osc jobhistory --help

Looking for hackers with the skills:

obs perl buildservice parsing

This project is part of:

Hack Week 10 Hack Week 11

Activity

  • almost 5 years ago: aspiers liked Reduce the number of builds in the openSUSE Build Service
  • almost 6 years ago: im_unbob liked Reduce the number of builds in the openSUSE Build Service
  • almost 6 years ago: dmuhamedagic added keyword "parsing" to Reduce the number of builds in the openSUSE Build Service
  • almost 6 years ago: dmuhamedagic added keyword "buildservice" to Reduce the number of builds in the openSUSE Build Service
  • almost 6 years ago: dmuhamedagic added keyword "perl" to Reduce the number of builds in the openSUSE Build Service
  • almost 6 years ago: dmuhamedagic added keyword "obs" to Reduce the number of builds in the openSUSE Build Service
  • almost 6 years ago: dmuhamedagic added keyword "obs" to Reduce the number of builds in the openSUSE Build Service
  • almost 6 years ago: dmuhamedagic started Reduce the number of builds in the openSUSE Build Service
  • almost 7 years ago: keichwa liked Reduce the number of builds in the openSUSE Build Service
  • almost 7 years ago: dmuhamedagic added keyword "obs" to Reduce the number of builds in the openSUSE Build Service
  • All Activity

    Comments

    Similar Projects

    MicroOS Desktop by RBrownSUSE

    [Video Recording of openSUSE Conference sessio...


    Migrate more OBS service scripts to pure systemd by enavarro_suse

    Following the work started in the last hackweek...


    Modernize Mash deployment by seanmarlow

    Mash is a Python based CI/CD pipeline for aut...


    OBS Project Monitor page redesign by vpereirabr

    Exactly what problem will this solve?

    Th...


    distributed build for Ceph in containers by denisok

    Investigate possibilities for the distributed b...


    Design patterns for os-autoinst-distri-opensuse by ybonatakis

    The idea is to hack os-autoinst-distri-opensuse...