Add chlog CLI with chcat/chtail/chgrep entrypoints
Single Go binary for the ClickHouse log store (logs.raw): chlog with cat/tail/grep subcommands, plus chcat/chtail/chgrep argv[0]-dispatched symlink entrypoints. Every query is time-bounded and fully parameterized; chgrep guards wide unfiltered scans. Ships nfpm RPM with completions and woodpecker PR/tag pipelines mirroring node-lookup.
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
# nfpm config for the clickhouse-tools RPM.
|
||||
# Rendered through envsubst (see scripts/build-rpm.sh) then fed to `nfpm pkg`.
|
||||
|
||||
name: ${PACKAGE_NAME}
|
||||
version: ${PACKAGE_VERSION}
|
||||
release: ${PACKAGE_RELEASE}
|
||||
arch: ${PACKAGE_ARCH}
|
||||
platform: ${PACKAGE_PLATFORM}
|
||||
section: default
|
||||
priority: extra
|
||||
description: "${PACKAGE_DESCRIPTION}"
|
||||
|
||||
maintainer: ${PACKAGE_MAINTAINER}
|
||||
homepage: ${PACKAGE_HOMEPAGE}
|
||||
license: ${PACKAGE_LICENSE}
|
||||
|
||||
disable_globbing: false
|
||||
|
||||
contents:
|
||||
- src: dist/chlog
|
||||
dst: /usr/bin/chlog
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
# chcat/chtail/chgrep dispatch on argv[0] inside the chlog binary.
|
||||
- src: /usr/bin/chlog
|
||||
dst: /usr/bin/chcat
|
||||
type: symlink
|
||||
- src: /usr/bin/chlog
|
||||
dst: /usr/bin/chtail
|
||||
type: symlink
|
||||
- src: /usr/bin/chlog
|
||||
dst: /usr/bin/chgrep
|
||||
type: symlink
|
||||
|
||||
# Shell completions (generated by scripts/build-rpm.sh before packaging).
|
||||
- src: dist/completions/chlog.bash
|
||||
dst: /usr/share/bash-completion/completions/chlog
|
||||
file_info:
|
||||
mode: 0644
|
||||
- src: dist/completions/_chlog
|
||||
dst: /usr/share/zsh/site-functions/_chlog
|
||||
file_info:
|
||||
mode: 0644
|
||||
- src: dist/completions/chlog.fish
|
||||
dst: /usr/share/fish/vendor_completions.d/chlog.fish
|
||||
file_info:
|
||||
mode: 0644
|
||||
- src: dist/completions/chcat.bash
|
||||
dst: /usr/share/bash-completion/completions/chcat
|
||||
file_info:
|
||||
mode: 0644
|
||||
- src: dist/completions/_chcat
|
||||
dst: /usr/share/zsh/site-functions/_chcat
|
||||
file_info:
|
||||
mode: 0644
|
||||
- src: dist/completions/chcat.fish
|
||||
dst: /usr/share/fish/vendor_completions.d/chcat.fish
|
||||
file_info:
|
||||
mode: 0644
|
||||
- src: dist/completions/chtail.bash
|
||||
dst: /usr/share/bash-completion/completions/chtail
|
||||
file_info:
|
||||
mode: 0644
|
||||
- src: dist/completions/_chtail
|
||||
dst: /usr/share/zsh/site-functions/_chtail
|
||||
file_info:
|
||||
mode: 0644
|
||||
- src: dist/completions/chtail.fish
|
||||
dst: /usr/share/fish/vendor_completions.d/chtail.fish
|
||||
file_info:
|
||||
mode: 0644
|
||||
- src: dist/completions/chgrep.bash
|
||||
dst: /usr/share/bash-completion/completions/chgrep
|
||||
file_info:
|
||||
mode: 0644
|
||||
- src: dist/completions/_chgrep
|
||||
dst: /usr/share/zsh/site-functions/_chgrep
|
||||
file_info:
|
||||
mode: 0644
|
||||
- src: dist/completions/chgrep.fish
|
||||
dst: /usr/share/fish/vendor_completions.d/chgrep.fish
|
||||
file_info:
|
||||
mode: 0644
|
||||
Reference in New Issue
Block a user