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

Move the location for generated man pages inside target dir #612

Closed
wants to merge 1 commit into from

Conversation

shssoichiro
Copy link
Owner

@shssoichiro shssoichiro commented Apr 22, 2024

The cargo release process expects that the build.rs file will not modify anything outside of the target directory. Currently, we are doing this for the man pages, which results in the following error when running cargo publish:

  Source directory was modified by build.rs during cargo publish. Build scripts should not modify anything outside of OUT_DIR.
  Added: /home/soichiro/repos/oxipng/target/package/oxipng-9.1.0/generated
        /home/soichiro/repos/oxipng/target/package/oxipng-9.1.0/generated/assets
        /home/soichiro/repos/oxipng/target/package/oxipng-9.1.0/generated/assets/oxipng.1

This change moves the generated directory to within target in order to resolve this.

Fixes #611 (will need to tag a 9.1.1 and cargo publish after)

@ace-dent
Copy link

Issue was noted by @andrews05 here.

@andrews05
Copy link
Collaborator

andrews05 commented Apr 22, 2024

Thanks @shssoichiro, nice to see you're still active here 🙂
Very unfortunate to have this issue, apologies for the mess we've made.

I think we need to make the assets relative to OUT_DIR though, as in examples such as https://github.com/kornelski/cargo-deb/blob/main/example/build.rs, especially as the target dir may be overridden.
The cargo-deb read me notes: You can use target/release/ in asset paths, even if Cargo is configured to cross-compile or use custom CARGO_TARGET_DIR. The target dir paths will be automatically corrected. So it should be pretty safe to do it this way, at least until rust/cargo come up with something better.

I've been working on making this change, I'm currently just making sure we still get the man page on deploy...

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

Successfully merging this pull request may close these issues.

9.1.0 Release missing on crates.io
3 participants