rust-secure-code / cargo-auditable

Make production Rust binaries auditable
Apache License 2.0
646 stars 28 forks source link

generate a man page for cargo auditable #105

Closed alexanderkjall closed 1 year ago

alexanderkjall commented 1 year ago

I needed a man page for cargo auditable, and thought it would be good form to also contribute it back upstream.

All of the content is taken from the README.md file

Shnatsel commented 1 year ago

You will also need to commit the changes to Cargo.lock to make CI pass - the Cargo.lock being up to date is a requirement for packaging in some other distributions.

alexanderkjall commented 1 year ago

sorry for not adding Cargo.lock, was in Debian mode :)

Shnatsel commented 1 year ago

That's quite alright. CI checks for it because I forget too.

I'll merge this in the next few days, maybe make some changes to expand on the usage. Thanks for the contribution!

If it's somehow not merged within a week, please prod me.

Shnatsel commented 1 year ago

I'm going to merge this, then make a few manual changes on top, and make a release. Is that alright?

Shnatsel commented 1 year ago

I've merged this, but then had to revert because it turned out the file is written to the wrong place.

In my case it was target/release/build/cargo-auditable-c1c528449aed5093/out/man-page/cargo-auditable/cargo-auditable.1 but that path is rather unpredictable.

I'm also not sure I want to put this in build.rs specifically. Would just shipping this in the Git source tree work for you? Are there any constraints on where the file should be placed?

Shnatsel commented 1 year ago

It may be wise to look at how other Rust CLI applications such as ripgrep or fd-find handle this. I feel like we're reinventing the wheel here.

alexanderkjall commented 1 year ago

One pattern I have seen is to have it generated in build.rs, but also checked into git, here for example: https://github.com/bootandy/dust/blob/master/build.rs same with ripgrep: https://github.com/BurntSushi/ripgrep/blob/master/build.rs#L82

Shnatsel commented 1 year ago

Thanks for the links. I'll get it working during the weekend.