-
Notifications
You must be signed in to change notification settings - Fork 146
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
Added an Audit step for FreeBSD and DragonFly packagees. #640
Conversation
Allows for auditing the packages to be disabled since they are breaking steps. Current behaivor is the default, where if the audit fails topgrade stops. Can be disabled in the [misc] section independenly from other sections
BTW, tested in FreeBSD. With default configuration file, there is no change in behavior. When the following is added to the configuration file, the Audit step is removed. [misc]
disable = ["audit"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for this patch!
If you want to make audit a step, you should also call print_separator()
in that function:
pub fn audit_packages(ctx: &ExecutionContext) -> Result<()> {
let sudo = require_option(ctx.sudo().as_ref(), REQUIRE_SUDO.to_string())?;
print_separator("FreeBSD Audit");
Command::new(sudo)
.args(["/usr/sbin/pkg", "audit", "-Fr"])
.status_checked()
}
Good idea. Just updated with the change to both FreeBSD and DragonFly. Thanks! |
Lol, my bad. Thanks for catching! Co-authored-by: SteveLauC <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Allows for auditing the packages to be disabled since they are breaking steps. Current behaivor is the default, where if the audit fails topgrade stops. Can be disabled in the [misc] section independenly from other sections.
Probably we should have a document explaining all the Steps in the system. Maybe as a separate PR?
This is a potential fix for the bug I reported here: #639
Standards checklist:
CONTRIBUTING.md
cargo build
)cargo fmt
)cargo clippy
)cargo test
)For new steps
--dry-run
option works with this step--yes
option works with this step if it is supported bythe underlying command
If you developed a feature or a bug fix for someone else and you do not have the
means to test it, please tag this person here.