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

Modularize trust system #43

Open
rossmeier opened this issue Oct 2, 2020 · 3 comments
Open

Modularize trust system #43

rossmeier opened this issue Oct 2, 2020 · 3 comments

Comments

@rossmeier
Copy link

Hi,

I would like to be able to manually review changes to packages, using a (Telegram/Slack/Whatever)Bot or a Webinterface with E-Mail notifications. To be able to do this: I propose the following trust system:
To determine if an update is trusted, a list of modules will be provided in the config. Then when an update is available, every trust module is executed with some metadata and the repo diff as arguments. Every module can return three values: "Trust", "Don't Trust", "Can't decide" and "WaitOnCallback". "Can't decide" will cause the next module in the list to be called. User prompts should be allowed to modules when a special argument is given. "WaitOnCallback" means that the module can't currently decide and will present it's decision in the future.

Example list of modules:

  • Trivialdiff: Accept any diff where only the package version and the hashes change
  • Maintainer: Accept any package by a trusted maintainer. This would be the only configured module by default, since it reflects the current behaviour. With the interactive flag set, this module can ask the user whether the maintainer should be trusted
  • Ask user: Ask the user via some kind of Notification system.
@alexheretic
Copy link
Owner

Interesting idea, thanks for raising this.

One general issue is that aurto is designed for unattended/automatic building. In use you don't directly interact with it, so when trust fails currently the packages are simply evicted from the aurto repo and you can see them with pacman -Qm and maybe re-add them etc.

Just thinking about that it would be cool to have more clarity/notifications when that happens. But user prompts are not really something aurto is equipped to do.

@rossmeier
Copy link
Author

If trust fails, of course there needs to be a notification. But for both trust failure and temporary failure, I would not remove the current package from the repo, but just not build the update. Adding a new package should almost always be done with user supervision anyway.

@alexheretic
Copy link
Owner

If trust fails, of course there needs to be a notification. But for both trust failure and temporary failure, I would not remove the current package from the repo, but just not build the update.

aurto removes them from the repo sort of as the way of notifying (you can run pacman -Qm / look at logs). But I think better & configurable notifications would be great to have.

Removing works fairly well as otherwise it would be more difficult to get aurutils to avoid rebuilding them & of course the packages do stay installed on actual systems they just need maintenance before becoming automatically updated in the aurto repo again.

Adding a new package should almost always be done with user supervision anyway.

Yep when you add packages is when you currently interact with the trust system, ie add trusted maintainers.

So I see some separate items from this:

  • Add new configurable trust mechanisms (currently we can do maintainer-trust or trust-everyone).

  • Add new ways for the aurto jobs to notify (particularly for when packages are evicted due to trust failure).

    I'm not sure the best way to do this avoiding specific integration with email/im services etc. Maybe there's a nice abstraction we can use that already exists, or we could just write notification to a file and end-users can sort out the pipe into their notification sink of choice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants