vectordotdev / vectordotdev/vector

Generate & distribute man pages

Open
#1,658 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

domain: external docs domain: releasing domain: setup have: nice
Dominant language
Rust
Stars
22.6k
Forks
2.3k
Avg merge
1d 7h
Merged PRs (30d)
146

Description

Currently if you download Vector debian packages from Vector.dev they don't include man pages.

operator@OBSIDIAN:~/vector$ curl -O https://packages.timber.io/vector/0.7.1/vector-amd64.deb
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 7381k  100 7381k    0     0  6866k      0  0:00:01  0:00:01 --:--:-- 6866k
operator@OBSIDIAN:~/vector$ sudo dpkg -i vector-amd64.deb 
Selecting previously unselected package vector.
(Reading database ... 37114 files and directories currently installed.)
Preparing to unpack vector-amd64.deb ...
Unpacking vector (0.7.1) ...
Setting up vector (0.7.1) ...
operator@OBSIDIAN:~/vector$ man vector
No manual entry for vector

According to the Debian maintainer guidelines, it's suggested to include these.

It looks like we can generate man pages using something like this (source) in our build.rs.

use clap::IntoApp;
use clap_generate::gen_manuals;

#[path="src/cli.rs"]
mod cli;

fn main() {
    let app = cli::Head::into_app();
    for man in gen_manuals(&app) {
        let name = "head.1";
        let mut out = fs::File::create("head.1").unwrap();
        use std::io::Write;
        out.write_all(man.render().as_bytes()).unwrap();
    }
}

Since this solution is agnostic, we could use this for all packages.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the CLI entry point in src/cli.rs and the proposed build.rs integration, using the rust-cli man-page generation example as reference. Confirm how generated pages can be included in the Debian package and other packages. Done means installing the vector-amd64.deb and successfully opening the Vector manual with man vector.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, cli, release
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.