Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treewide: Develop a way to tag auxiliary dependencies (such as checkdeps for tests) for autobuild resolver purposes #2175

Open
ermo opened this issue Apr 7, 2024 · 3 comments
Assignees
Labels
Help Wanted Topic: Plumbing Core components Topic: Tooling Tools and scripts Type: Feature Something can be enhanced.

Comments

@ermo
Copy link
Contributor

ermo commented Apr 7, 2024

Now that @GZGavinZhao is putting the final touches on his autobuild dependency (and reverse dependency) resolver tool, he has begun doing some analysis runs on the package recipes in the monorepo.

As it turns out, there are quite a few dependencies that don't actually need to be included as builddeps in the forward and reverse dependency graph for packages, but should instead be moved to a separate kind of dependency and/or be put in a denylist so they don't get included in the buildgraph unnecessarily.

Here's a bit more context from a development discussion I had with Gavin on this:

ermo
Gavin: What is the overarching goal here for you re. checkdeps (and its ilk)?
(I'm asking in the hope that we might arrive on a better, more encompassing name than just checkdeps)
Gavin Zhao
checkdeps, at least in the way I'm currently using it, has sort of becoming an overarching term that encompass basically any dependency that the package doesn't strictly rely on and therefore can be tossed out when considering build order
so this includes not only dependencies for tests, but also for documentation generation
doxygen is a common one here
because it seems like the entire world depends on LLVM right now 😅
ermo
secondary deps?
no, that doesn't explain the issue
auxiliary deps?
Gavin Zhao
auxdeps?
ermo
yeah, let's go with that.
(if you wrote that before you saw my suggestion, then ^5)
Gavin Zhao

ermo
(if you wrote that before you saw my suggestion, then ^5)

I did write it before you lol, but maybe someone has an idea for a better name?
ermo
"The term 'Auxiliary Dependencies' (auxdeps for short) covers deps such as checkdeps and other auxiliary deps (such as doxygen) that aren't directly relevant to the dependency graph when figuring out what to build and what to rebuild" <- maybe something like that?
I think auxdeps is good. It's short and it covers everything that isn't a builddep or a rundep
Gavin Zhao

ermo
"The term 'Auxiliary Dependencies' (auxdeps for short) covers deps such as checkdeps and other auxiliary deps (such as doxygen) that aren't directly relevant to the dependency graph when figuring out what to build and what to rebuild" <- maybe something like that?

That sounds good!
ermo
OK. Let's run with that for now in the issue + related PR?
Gavin Zhao
Yep!
(...)
ermo
Gavin: Should we have a docdeps field? Meaning that auxdeps would be a term that covers both actual recipe docdeps and checkdeps keys?
ermo
Ikey: ^ Possibly relevant for serpent as well.
ermo
in terms of minimising build graphs.
i.e. legit "tooling that makes life easier for packagers and maintainers"-driven addition to the recipe format.
Gavin Zhao
That was my initial thought, the concern was maybe in the future we will discover additional types of dependencies that fit into neither checkdeps nor docdeps?

As can be seen above, for now (and to have a way to begin to refer to this concept), Gavin and I have tentatively settled on using the term 'Auxiliary Dependencies' (or auxdeps for short) to refer to these kinds of deps, which constitute e.g. checkdeps and other auxiliary deps (such as doxygen) that aren't directly relevant to the dependency graph when autobuild is resolving and planning forward and reverse build orders based on its dependency traversal code.

This term is mostly a "working term for now", so if we end deciding to adopt a better term for the concept, that's fine too.

This issue tracks the PRs and issues we will begin filing in relation to solving this problem on a treewide basis.

Proposed implementation:

Add the ability for ypkg (and boulder) to interpret "Auxiliary Dependencies" that have an annotation tacked on and can be put in existing dependency keys like so:

builddeps:
    - asciidoc: { docdep: true }
    - doxygen: { docdep: true }
    - git: { auxdep: true} # some build systems use this to embed the git ref next to the version displayed
    - python-pytest { checkdep: true }
    - python-sphinx: { docdep: true }

Here, the implication is that, though doxygen is used to generate API documentation etc. at build-time, it is not considered a part of the actual forward and reverse dependency chain as it pertains to planning build and revdep-rebuild orders

Issues:

PRs:

@ermo ermo added Topic: Plumbing Core components Type: Chore Not a feature or a bug Help Wanted Topic: Tooling Tools and scripts labels Apr 7, 2024
@ermo ermo added this to the Solus 4.7 milestone Apr 7, 2024
@github-project-automation github-project-automation bot moved this to Triage in Solus Apr 7, 2024
@ermo ermo moved this from Triage to Needs More Info in Solus Apr 7, 2024
@EbonJaeger
Copy link
Member

EbonJaeger commented Apr 7, 2024

Soo.... we're no longer having checkdeps?

When you say "we decided" I think it means "two people decided", and not "the project as a whole decided". I would like more of a discussion on this with more people that do packaging and work on packaging tools about all of this. I, for one, am not totally convinced about having a new prefix for existing deps or what it should be called, let alone a whole new key in the packaging spec. Prefixing dependencies with aux is not very intuitive; I'm finding it a bit confusing, so I worry that it will be even worse for packagers with even less experience, or new packagers.

@ermo
Copy link
Contributor Author

ermo commented Apr 7, 2024

@EbonJaeger
When you say "we decided" I think it means "two people decided", and not "the project as a whole decided".

Gavin and I decided to start referring to it as Auxiliary Deps or auxdeps for short to have a way to express and refer to the concept, based on Gavin's experience up until now with autobuild.

I would like more of a discussion on this with more people that do packaging and work on packaging tools about all of this.

This is what this issue is for.

I, for one, am not totally convinced about having a new prefix for existing deps or what it should be called, let alone a whole new key in the packaging spec. Prefixing dependencies with aux is not very intuitive; I'm finding it a bit confusing, so I worry that it will be even worse for packagers with even less experience, or new packagers.

What is your alternative proposal?

Soo.... we're no longer having checkdeps?

Checkdeps were introduced after Gavin pointed out some initial results of his autobuild research. Another way of solving the problem would be to use a prefix (similar to the suggested aux one), so maybe test(somedep) or check(somedep)?

I would like to note that Serpent uses prefixes extensively already as a well-established concept, so this would fit well with the Serpent tooling model that Solus has agreed to move towards...?

@ermo
Copy link
Contributor Author

ermo commented Apr 7, 2024

@EbonJaeger I have updated the initial text to better reflect the idea behind the auxdeps naming and the scope it covers.

We have to start somewhere. 🤔 😅

@ermo ermo changed the title Treewide: Move out auxiliary dependencies (such as checkdeps for tests) from builddeps (for autobuild resolver purposes) Treewide: Develop a way to tag auxiliary dependencies (such as checkdeps for tests) for autobuild resolver purposes Apr 7, 2024
@ermo ermo added Type: Feature Something can be enhanced. and removed Type: Chore Not a feature or a bug labels Apr 8, 2024
ermo added a commit that referenced this issue Apr 17, 2024
**Summary**
This is the initial attempt at showing how to use the power of autobuild
for getting the Solus monorepo under control re. dependency cycles.

The purely additive nature of the autobuild.yml configuration files added
with this commit, should make it trivial to modify and extend the ignored
set of dependencies for a package as our cycle-discovery journey
advances.

Massive props to @GZGavinZhao for his interest in and willingness to
not only study the necessary graph theory at my suggestion, but also for
his being ready, willing, and able to design and build this tool, and for
his willingness to take on board constructive feedback re. the
documentation and UX necessary to productise this solution for a wider
audience of Solus staff and community packagers.

To gain an appreciation of just how useful this tool might become for us,
consider the following:

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild -q query src:packages/ samba ldb tdb talloc tevent
talloc tdb cifs-utils notmuch tevent ldb samba acccheck ffmpeg \
python-pysmbc gvfs kio-extras kodi mpd rhythmbox vlc \
gnome-control-center nautilus-share nemo-extensions budgie-control-center
```

The above ^ shows how autobuild might resolve a build + rebuild order for
when someone is doing a samba stack upgrade and pushing it to a single
builder; like, say, the local packager's machine or the current Solus
build infrastructure, which is limited to one builder.

Note that autobuild also already supports committing+pushing to the Solus
builder, which implies that it can replace the current `build_pr.sh`
script in short order, if the the appetite to do so is present within
Solus as an organisation.

But that's not all!

In fact, `autobuild` also supports generating a "tiered" builder order
(notice the `-t` argument), which those of you packaging KDE might
already be familiar with:

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild query -t src:packages/ samba ldb tdb talloc tevent
 (.. some output omitted ..)
 🗸  Successfully parsed state!
 🗸  Found all requested packages in state!
 🗸  Successfully built dependency graph!
 🗸  Build order:
 🗸  Tier 1: talloc tdb
 🗸  Tier 2: cifs-utils notmuch tevent
 🗸  Tier 3: ldb
 🗸  Tier 4: samba
 🗸  Tier 5: acccheck ffmpeg python-pysmbc
 🗸  Tier 6: gvfs kio-extras kodi mpd rhythmbox vlc
 🗸  Tier 7: gnome-control-center nautilus-share nemo-extensions
 🗸  Tier 8: budgie-control-center
```

Tiers (called "Precedence Constraint Groups" in graph theory literature)
effectively show which packages can be built in parallel since they do
not interdepend on each other.

With the -q argument like above, this build order could potentially drive
a set of builders (like summit does in the Serpent infra currently):

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild -qt query src:packages/ samba ldb tdb talloc tevent
talloc tdb
cifs-utils notmuch tevent
ldb
samba
acccheck ffmpeg python-pysmbc
gvfs kio-extras kodi mpd rhythmbox vlc
budgie-control-center gnome-control-center nautilus-share nemo-extensions
```

I hope this serves to show how useful autobuild can potentially become
to Serpent and Solus in terms of automating the discovery of build and
rebuild orders.

This commit is mostly intended as a way to showcase how an autobuild-
driven packaging process might look like for Solus and Serpent, and as a
starting point for the discussion of how to tag "Auxiliary Dependencies"
in a way that's compatible with both the Solus and Serpent monorepos and
tooling.

See also: #2175 and #2176

Signed-off-by: Rune Morling <[email protected]>
ermo added a commit that referenced this issue Apr 17, 2024
**Summary**
This is the initial attempt at showing how to use the power of autobuild
for getting the Solus monorepo under control re. dependency cycles.

The purely additive nature of the autobuild.yml configuration files added
with this commit, should make it trivial to modify and extend the ignored
set of dependencies for a package as our cycle-discovery journey
advances.

Massive props to @GZGavinZhao for his interest in and willingness to
not only study the necessary graph theory at my suggestion, but also for
his being ready, willing, and able to design and build this tool, and for
his willingness to take on board constructive feedback re. the
documentation and UX necessary to productise this solution for a wider
audience of Solus staff and community packagers.

To gain an appreciation of just how useful this tool might become for us,
consider the following:

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild -q query src:packages/ samba ldb tdb talloc tevent
talloc tdb cifs-utils notmuch tevent ldb samba acccheck ffmpeg \
python-pysmbc gvfs kio-extras kodi mpd rhythmbox vlc \
gnome-control-center nautilus-share nemo-extensions budgie-control-center
```

The above ^ shows how autobuild might resolve a build + rebuild order for
when someone is doing a samba stack upgrade and pushing it to a single
builder; like, say, the local packager's machine or the current Solus
build infrastructure, which is limited to one builder.

Note that autobuild also already supports committing+pushing to the Solus
builder, which implies that it can replace the current `build_pr.sh`
script in short order, if the the appetite to do so is present within
Solus as an organisation.

But that's not all!

In fact, `autobuild` also supports generating a "tiered" builder order
(notice the `-t` argument), which those of you packaging KDE might
already be familiar with:

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild query -t src:packages/ samba ldb tdb talloc tevent
 (.. some output omitted ..)
 🗸  Successfully parsed state!
 🗸  Found all requested packages in state!
 🗸  Successfully built dependency graph!
 🗸  Build order:
 🗸  Tier 1: talloc tdb
 🗸  Tier 2: cifs-utils notmuch tevent
 🗸  Tier 3: ldb
 🗸  Tier 4: samba
 🗸  Tier 5: acccheck ffmpeg python-pysmbc
 🗸  Tier 6: gvfs kio-extras kodi mpd rhythmbox vlc
 🗸  Tier 7: gnome-control-center nautilus-share nemo-extensions
 🗸  Tier 8: budgie-control-center
```

Tiers (called "Precedence Constraint Groups" in graph theory literature)
effectively show which packages can be built in parallel since they do
not interdepend on each other.

With the -q argument like above, this build order could potentially drive
a set of builders (like summit does in the Serpent infra currently):

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild -qt query src:packages/ samba ldb tdb talloc tevent
talloc tdb
cifs-utils notmuch tevent
ldb
samba
acccheck ffmpeg python-pysmbc
gvfs kio-extras kodi mpd rhythmbox vlc
budgie-control-center gnome-control-center nautilus-share nemo-extensions
```

I hope this serves to show how useful autobuild can potentially become
to Serpent and Solus in terms of automating the discovery of build and
rebuild orders.

This commit is mostly intended as a way to showcase what an autobuild-
driven packaging process might look like for Solus and Serpent, and as a
starting point for the discussion of how to tag "Auxiliary Dependencies"
in a way that's compatible with both the Solus and Serpent monorepos and
tooling.

See also: #2175 and #2176

Signed-off-by: Rune Morling <[email protected]>
ermo added a commit that referenced this issue May 1, 2024
**Summary**
This is the initial attempt at showing how to use the power of autobuild
for getting the Solus monorepo under control re. dependency cycles.

The purely additive nature of the autobuild.yml configuration files added
with this commit, should make it trivial to modify and extend the ignored
set of dependencies for a package as our cycle-discovery journey
advances.

Massive props to @GZGavinZhao for his interest in and willingness to
not only study the necessary graph theory at my suggestion, but also for
his being ready, willing, and able to design and build this tool, and for
his willingness to take on board constructive feedback re. the
documentation and UX necessary to productise this solution for a wider
audience of Solus staff and community packagers.

To gain an appreciation of just how useful this tool might become for us,
consider the following:

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild -q query src:packages/ samba ldb tdb talloc tevent
talloc tdb cifs-utils notmuch tevent ldb samba acccheck ffmpeg \
python-pysmbc gvfs kio-extras kodi mpd rhythmbox vlc \
gnome-control-center nautilus-share nemo-extensions budgie-control-center
```

The above ^ shows how autobuild might resolve a build + rebuild order for
when someone is doing a samba stack upgrade and pushing it to a single
builder; like, say, the local packager's machine or the current Solus
build infrastructure, which is limited to one builder.

Note that autobuild also already supports committing+pushing to the Solus
builder, which implies that it can replace the current `build_pr.sh`
script in short order, if the the appetite to do so is present within
Solus as an organisation.

But that's not all!

In fact, `autobuild` also supports generating a "tiered" builder order
(notice the `-t` argument), which those of you packaging KDE might
already be familiar with:

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild query -t src:packages/ samba ldb tdb talloc tevent
 (.. some output omitted ..)
 🗸  Successfully parsed state!
 🗸  Found all requested packages in state!
 🗸  Successfully built dependency graph!
 🗸  Build order:
 🗸  Tier 1: talloc tdb
 🗸  Tier 2: cifs-utils notmuch tevent
 🗸  Tier 3: ldb
 🗸  Tier 4: samba
 🗸  Tier 5: acccheck ffmpeg python-pysmbc
 🗸  Tier 6: gvfs kio-extras kodi mpd rhythmbox vlc
 🗸  Tier 7: gnome-control-center nautilus-share nemo-extensions
 🗸  Tier 8: budgie-control-center
```

Tiers (called "Precedence Constraint Groups" in graph theory literature)
effectively show which packages can be built in parallel since they do
not interdepend on each other.

With the -q argument like above, this build order could potentially drive
a set of builders (like summit does in the Serpent infra currently):

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild -qt query src:packages/ samba ldb tdb talloc tevent
talloc tdb
cifs-utils notmuch tevent
ldb
samba
acccheck ffmpeg python-pysmbc
gvfs kio-extras kodi mpd rhythmbox vlc
budgie-control-center gnome-control-center nautilus-share nemo-extensions
```

I hope this serves to show how useful autobuild can potentially become
to Serpent and Solus in terms of automating the discovery of build and
rebuild orders.

This commit is mostly intended as a way to showcase what an autobuild-
driven packaging process might look like for Solus and Serpent, and as a
starting point for the discussion of how to tag "Auxiliary Dependencies"
in a way that's compatible with both the Solus and Serpent monorepos and
tooling.

See also: #2175 and #2176

Signed-off-by: Rune Morling <[email protected]>
ermo added a commit that referenced this issue May 1, 2024
**Summary**
This is the initial attempt at showing how to use the power of autobuild
for getting the Solus monorepo under control re. dependency cycles.

The purely additive nature of the autobuild.yml configuration files added
with this commit, should make it trivial to modify and extend the ignored
set of dependencies for a package as our cycle-discovery journey
advances.

To gain an appreciation of just how useful this tool might become for us,
consider the following:

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild -q query src:packages/ samba ldb tdb talloc tevent
talloc tdb cifs-utils notmuch tevent ldb samba acccheck ffmpeg \
python-pysmbc gvfs kio-extras kodi mpd rhythmbox vlc \
gnome-control-center nautilus-share nemo-extensions budgie-control-center
```

The above ^ shows how autobuild might resolve a build + rebuild order for
when someone is doing a samba stack upgrade and pushing it to a single
builder; like, say, the local packager's machine or the current Solus
build infrastructure, which is limited to one builder.

Note that autobuild also already supports committing+pushing to the Solus
builder, which implies that it can replace the current `build_pr.sh`
script in short order, if the the appetite to do so is present within
Solus as an organisation.

But that's not all!

In fact, `autobuild` also supports generating a "tiered" builder order
(notice the `-t` argument), which those of you packaging KDE might
already be familiar with:

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild query -t src:packages/ samba ldb tdb talloc tevent
 (.. some output omitted ..)
 🗸  Successfully parsed state!
 🗸  Found all requested packages in state!
 🗸  Successfully built dependency graph!
 🗸  Build order:
 🗸  Tier 1: talloc tdb
 🗸  Tier 2: cifs-utils notmuch tevent
 🗸  Tier 3: ldb
 🗸  Tier 4: samba
 🗸  Tier 5: acccheck ffmpeg python-pysmbc
 🗸  Tier 6: gvfs kio-extras kodi mpd rhythmbox vlc
 🗸  Tier 7: gnome-control-center nautilus-share nemo-extensions
 🗸  Tier 8: budgie-control-center
```

Tiers (called "Precedence Constraint Groups" in graph theory literature)
effectively show which packages can be built in parallel since they do
not interdepend on each other.

With the -q argument like above, this build order could potentially drive
a set of builders (like summit does in the Serpent infra currently):

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild -qt query src:packages/ samba ldb tdb talloc tevent
talloc tdb
cifs-utils notmuch tevent
ldb
samba
acccheck ffmpeg python-pysmbc
gvfs kio-extras kodi mpd rhythmbox vlc
budgie-control-center gnome-control-center nautilus-share nemo-extensions
```

I hope this serves to show how useful autobuild can potentially become
to Serpent and Solus in terms of automating the discovery of build and
rebuild orders.

This commit is mostly intended as a way to showcase what an autobuild-
driven packaging process might look like for Solus and Serpent, and as a
starting point for the discussion of how to tag "Auxiliary Dependencies"
in a way that's compatible with both the Solus and Serpent monorepos and
tooling.

See also: #2175 and #2176

Massive props to @GZGavinZhao for his interest in studying the necessary
graph theory at my suggestion, and also for his being ready, able, and
willing to design and build this tool, and for his willingness to take on
board constructive feedback re. the documentation and UX necessary to
productise this solution for a wider audience of Solus staff and
community packagers.

Signed-off-by: Rune Morling <[email protected]>
ermo added a commit that referenced this issue May 1, 2024
**Summary**
This is the initial attempt at showing how to use the power of autobuild
for getting the Solus monorepo under control re. dependency cycles.

The purely additive nature of the autobuild.yml configuration files added
with this commit, should make it trivial to modify and extend the ignored
set of dependencies for a package as our cycle-discovery journey
advances.

To gain an appreciation of just how useful this tool might become for us,
consider the following:

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild -q query src:packages/ samba ldb tdb talloc tevent
talloc tdb cifs-utils notmuch tevent ldb samba acccheck ffmpeg \
python-pysmbc gvfs kio-extras kodi mpd rhythmbox vlc \
gnome-control-center nautilus-share nemo-extensions budgie-control-center
```

The above ^ shows how autobuild might resolve a build + rebuild order for
when someone is doing a samba stack upgrade and pushing it to a single
builder; like, say, the local packager's machine or the current Solus
build infrastructure, which is limited to one builder.

Note that autobuild also already supports committing+pushing to the Solus
builder, which implies that it can replace the current `build_pr.sh`
script in short order, if the the appetite to do so is present within
Solus as an organisation.

But that's not all!

In fact, `autobuild` also supports generating a "tiered" builder order
(notice the `-t` argument), which those of you packaging KDE might
already be familiar with:

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild query -t src:packages/ samba ldb tdb talloc tevent
 (.. some output omitted ..)
 🗸  Successfully parsed state!
 🗸  Found all requested packages in state!
 🗸  Successfully built dependency graph!
 🗸  Build order:
 🗸  Tier 1: talloc tdb
 🗸  Tier 2: cifs-utils notmuch tevent
 🗸  Tier 3: ldb
 🗸  Tier 4: samba
 🗸  Tier 5: acccheck ffmpeg python-pysmbc
 🗸  Tier 6: gvfs kio-extras kodi mpd rhythmbox vlc
 🗸  Tier 7: gnome-control-center nautilus-share nemo-extensions
 🗸  Tier 8: budgie-control-center
```

Tiers (called "Precedence Constraint Groups" in graph theory literature)
effectively show which packages can be built in parallel since they do
not interdepend on each other.

With the -q argument like above, this build order could potentially drive
a set of builders (like summit does in the Serpent infra currently):

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild -qt query src:packages/ samba ldb tdb talloc tevent
talloc tdb
cifs-utils notmuch tevent
ldb
samba
acccheck ffmpeg python-pysmbc
gvfs kio-extras kodi mpd rhythmbox vlc
budgie-control-center gnome-control-center nautilus-share nemo-extensions
```

I hope this serves to show how useful autobuild can potentially become
to Serpent and Solus in terms of automating the discovery of build and
rebuild orders.

This commit is mostly intended as a way to showcase what an autobuild-
driven packaging process might look like for Solus and Serpent, and as a
starting point for the discussion of how to tag "Auxiliary Dependencies"
in a way that's compatible with both the Solus and Serpent monorepos and
tooling.

See also: #2175 and #2176

autobuild.yaml format design notes here:

GZGavinZhao/autobuild#16

Massive props to @GZGavinZhao for his interest in studying the necessary
graph theory at my suggestion, and also for his being ready, able, and
willing to design and build this tool, and for his willingness to take on
board constructive feedback re. the documentation and UX necessary to
productise this solution for a wider audience of Solus staff and
community packagers.

Signed-off-by: Rune Morling <[email protected]>
ermo added a commit that referenced this issue May 1, 2024
**Summary**
This is the initial attempt at showing how to use the power of autobuild
for getting the Solus monorepo under control re. dependency cycles. It
is based on [this
gist](https://gist.github.com/GZGavinZhao/4981fb5ba874ac82364b18b039e3f495).

The purely additive nature of the autobuild.yml configuration files
added with this commit, should make it trivial to modify and extend the
ignored set of dependencies for a package as our cycle-discovery journey
advances.

To gain an appreciation of just how useful this tool might become for
us, consider the following:

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild -q query src:packages/ samba ldb tdb talloc tevent
talloc tdb cifs-utils notmuch tevent ldb samba acccheck ffmpeg python-pysmbc gvfs kio-extras kodi mpd rhythmbox vlc gnome-control-center nautilus-share nemo-extensions budgie-control-center
```

The above ^ shows how autobuild might resolve a build + rebuild order
for when someone is doing a samba stack upgrade and pushing it to a
single builder; like, say, the local packager's machine or the current
Solus build infrastructure, which is limited to one builder.

Note that autobuild also already supports committing+pushing to the
Solus builder, which implies that it can replace the current
`build_pr.sh` script in short order, if the the appetite to do so is
present within Solus as an organisation.

But that's not all!

In fact, `autobuild` also supports generating a "tiered" builder order
(notice the `-t` argument), which those of you packaging KDE might
already be familiar with:

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild query -t src:packages/ samba ldb tdb talloc tevent
 (.. some output omitted ..)
 🗸  Successfully parsed state!
 🗸  Found all requested packages in state!
 🗸  Successfully built dependency graph!
 🗸  Build order:
 🗸  Tier 1: talloc tdb
 🗸  Tier 2: cifs-utils notmuch tevent
 🗸  Tier 3: ldb
 🗸  Tier 4: samba
 🗸  Tier 5: acccheck ffmpeg python-pysmbc
 🗸  Tier 6: gvfs kio-extras kodi mpd rhythmbox vlc
 🗸  Tier 7: gnome-control-center nautilus-share nemo-extensions
 🗸  Tier 8: budgie-control-center
```

Tiers (called "Precedence Constraint Groups" in graph theory literature)
effectively show which packages can be built in parallel since they do
not interdepend on each other.

With the -q argument like above, this build order could potentially
drive a set of builders (like summit does in the Serpent infra
currently):

```
ermo@solbox:~/repos/getsolus/soluspkgs
$ autobuild -qt query src:packages/ samba ldb tdb talloc tevent
talloc tdb
cifs-utils notmuch tevent
ldb
samba
acccheck ffmpeg python-pysmbc
gvfs kio-extras kodi mpd rhythmbox vlc
budgie-control-center gnome-control-center nautilus-share nemo-extensions
```

I hope this serves to show how useful autobuild can potentially become
to Serpent and Solus in terms of automating the discovery of build and
rebuild orders.

This commit is mostly intended as a way to showcase what an
autobuild-driven packaging process might look like for Solus and
Serpent, and as a starting point for the discussion of how to tag
"Auxiliary Dependencies" in a way that's compatible with both the Solus
and Serpent monorepos and tooling.

See also: #2175 and #2176

autobuild.yaml format design notes here: GZGavinZhao/autobuild#16

Massive props to @GZGavinZhao for his interest in studying the necessary
graph theory at my suggestion, and also for his being ready, able, and
willing to design and build this tool, and for his willingness to take
on board constructive feedback re. the documentation and UX necessary to
productise this solution for a wider audience of Solus staff and
community packagers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Topic: Plumbing Core components Topic: Tooling Tools and scripts Type: Feature Something can be enhanced.
Projects
Status: Needs More Info
Status: Todo
Development

No branches or pull requests

6 participants