<div dir="auto">Hello,<div dir="auto"><br></div><div dir="auto">I'm the author of configure_me (<a href="https://github.com/Kixunil/configure_me">https://github.com/Kixunil/configure_me</a> ), a crate that helps with loading application configuration from config files, env vars and arguments.</div><div dir="auto"><br></div><div dir="auto">The crate is capable of generating man pages from the specification. I would love to integrate it into Debian ecosystem! I'm now seeking for advice on how to do it the best possible way.</div><div dir="auto"><br></div><div dir="auto">Previously the man page was generated by the build script, but after some discussion with Rust devs and my own thinking, I decided to redesign it and provide a separate tool for generating the man page and other files (I plan to do shell completions at some point and I also started experimenting with debconf). The tool is nearly finished and I plan to release it soon (hopefully today).</div><div dir="auto"><br></div><div dir="auto">The ideal end result would be if the manpage was generated for all dependent packages without any other interaction. I don't think it'd be good to tie it to configure_me, but allow other crates to define their integrations too. So my idea is this:</div><div dir="auto"><br></div><div dir="auto">Whenever Cargo.toml contains:</div><div dir="auto">[package.metadata.debcargo.postbuild-dep]</div><div dir="auto">crate = foo</div><div dir="auto">run = { "bar" = ["--arg"] }</div><div dir="auto"><br></div><div dir="auto">(Alternatively, this could be in debcargo.toml, I'm not sure which is better.)</div><div dir="auto"><br></div><div dir="auto">All it's dependencies will get Build-Depends: foo</div><div dir="auto"><br></div><div dir="auto">The rule to run bar with argument --arg after build is added to rules.</div><div dir="auto"><br></div><div dir="auto">There's a special exception: if it would cause the dependency to depend on itself (if foo itself depends on the crate which specified postbuild-dep on foo) debcargo will require the maintainer to resolve the situation manually.</div><div dir="auto"><br></div><div dir="auto">The exception resolves the problem that the man page generator itself uses configure_me for its own configuration. This shouldn't be a huge issue as for every tool it will happen at most once. In my case, I would just include the generated man page in the overlay. </div><div dir="auto"><br></div><div dir="auto">Note that running built binary from the package would break cross compilation. If specifying something like Build-Depends: foo:build-arch ![build-arch] was possible, it could be completely automated, but my understanding is that nothing like that is possible.</div><div dir="auto"><br></div><div dir="auto">I hope it all makes sense to you, please let me know what do you think.</div><div dir="auto"><br></div><div dir="auto">Have a nice day!</div><div dir="auto"><br></div><div dir="auto">Martin</div></div>