• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

agama-project / agama / 12087749792
68%

Build:
DEFAULT BRANCH: master
Ran 29 Nov 2024 04:15PM UTC
Jobs 2
Files 637
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Nov 2024 04:05PM UTC coverage: 70.981% (-0.05%) from 71.031%
12087749792

push

github

web-flow
feat(rust): run postscripts in a chroot (#1792)

## Problem

https://trello.com/c/I8bWv2ZR

The current scripting support does not allow using [AutoYaST chroot-like
scripts](https://doc.opensuse.org/projects/autoyast/#chroot-scripts).
For instance, if you want to enable a system service at the end of the
installation, you need to deal with the chroot yourself.

## Solution

This change extends the post-scripts to run on a chroot on the target
system. A definition like the following will enable the sshd daemon at
the end of the installation:

```jsonnet
scripts: {
  post: [
    { name: 'test', body: '#!/bin/bash\nsystemctl enable sshd', chroot: true },
  ],
}
```

Now, chroot-ed postscripts are the default. Since you most likely want
to run postscripts on a chroot, we are supporting `chroot: false` for
backward compatibility reasons.

## Refactoring

The PR contains a heavy refactoring of the scripts model. Now, we are
using an enum-based approach that makes it easier to cope with the
potential differences between script types, given that not all are
equal. We followed that approach in the network area and it worked quite
well.

By now, the only difference is the `chroot` attribute. However, in the
future, we expect that prescripts and postscripts will get support for
additional features, like progress reporting, that will not be available
for init scripts.

## Testing

- *Tested manually*

41 of 94 new or added lines in 4 files covered. (43.62%)

16953 of 23884 relevant lines covered (70.98%)

35.96 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
0.0
0.0% rust/agama-lib/src/scripts/client.rs
2
0.0
0.0% rust/agama-server/src/scripts/web.rs
11
0.0
0.0% rust/agama-lib/src/scripts/store.rs
39
57.89
-34.79% rust/agama-lib/src/scripts/model.rs
Subprojects
ID Flag name Job ID Ran Files Coverage
2 rust 12087749792.2 29 Nov 2024 04:15PM UTC 123
24.67
GitHub Action Run
2 service 12013658788.2 25 Nov 2024 03:48PM UTC 514
89.28
GitHub Action Run
Source Files on build 12087749792
  • Tree
  • List 637
  • Changed 30
  • Source Changed 4
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #12087749792
  • dc02a507 on github
  • Prev Build on master (#12082384586)
  • Next Build on master (#12106281752)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc