Drop chcat/chtail/chgrep symlink entrypoints; ship chlog subcommands only #3

Merged
benvin merged 1 commits from benvin/drop-symlinks into main 2026-08-23 21:45:40 +10:00
Member

Why

The clickhouse-tools RPM ships /usr/bin/chcat, which file-conflicts with SELinux's policycoreutils-python-utils package on Fedora (chcat is the SELinux category tool). Per Ben's decision the symlink entrypoints are dropped entirely — the package ships only the chlog binary with chlog cat|tail|grep subcommands.

Changes

  • Removes the chcat/chtail/chgrep symlinks and their bash/zsh/fish completion files from packaging/nfpm.yaml and scripts/build-rpm.sh; keeps chlog and its completions
  • Removes the argv[0] dispatch (entrypoint()) from main.go; the cat/tail/grep subcommands themselves are unchanged
  • Drops the LINKS symlink handling from the Makefile build and completions targets
  • Updates the completion test to cover chlog only
  • Updates README usage to chlog cat|tail|grep and notes why the symlinks were dropped
  • Cleans stale .gitignore entries and the release pipeline comment

Verification

gofmt/go vet/go test -race clean. Local scripts/build-rpm.sh 0.0.0-local + rpm -qlp:

/usr/bin/chlog
/usr/share/bash-completion/completions/chlog
/usr/share/fish/vendor_completions.d/chlog.fish
/usr/share/zsh/site-functions/_chlog

No /usr/bin/chcat|chtail|chgrep entries remain.

## Why The clickhouse-tools RPM ships `/usr/bin/chcat`, which file-conflicts with SELinux's `policycoreutils-python-utils` package on Fedora (`chcat` is the SELinux category tool). Per Ben's decision the symlink entrypoints are dropped entirely — the package ships only the `chlog` binary with `chlog cat|tail|grep` subcommands. ## Changes - Removes the `chcat`/`chtail`/`chgrep` symlinks and their bash/zsh/fish completion files from `packaging/nfpm.yaml` and `scripts/build-rpm.sh`; keeps `chlog` and its completions - Removes the argv[0] dispatch (`entrypoint()`) from `main.go`; the `cat`/`tail`/`grep` subcommands themselves are unchanged - Drops the `LINKS` symlink handling from the Makefile `build` and `completions` targets - Updates the completion test to cover `chlog` only - Updates README usage to `chlog cat|tail|grep` and notes why the symlinks were dropped - Cleans stale `.gitignore` entries and the release pipeline comment ## Verification `gofmt`/`go vet`/`go test -race` clean. Local `scripts/build-rpm.sh 0.0.0-local` + `rpm -qlp`: ``` /usr/bin/chlog /usr/share/bash-completion/completions/chlog /usr/share/fish/vendor_completions.d/chlog.fish /usr/share/zsh/site-functions/_chlog ``` No `/usr/bin/chcat|chtail|chgrep` entries remain.
unkin-agent added 1 commit 2026-08-23 21:39:36 +10:00
Drop chcat/chtail/chgrep symlink entrypoints; ship chlog subcommands only
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ee2f270abc
The RPM's /usr/bin/chcat conflicts with SELinux's
policycoreutils-python-utils on Fedora. Per Ben: remove the symlink
entrypoints entirely and ship only the chlog binary with cat/tail/grep
subcommands.

- Remove chcat/chtail/chgrep symlinks and their completions from
  nfpm.yaml, build-rpm.sh and the Makefile
- Remove the argv[0] dispatch in main.go; subcommands are unchanged
- Update the completion test to cover chlog only
- Update README usage to chlog cat|tail|grep
benvin merged commit c816909a76 into main 2026-08-23 21:45:40 +10:00
benvin deleted branch benvin/drop-symlinks 2026-08-23 21:45:40 +10:00
Sign in to join this conversation.