A command-line tool to extract and filter CDRs from Cirpack grnti log files.
For the "grep"-Part in cgrep to work, ripgrep (rg) is required.
Please make sure it is installed on the system and in PATH.
Install instructions: https://github.com/BurntSushi/ripgrep/
If no Package for your distribution is available, you can try to use the binary in the ripgrep-AA.B.C-x86_64-unknown-linux-musl.tar.gz version on the git Releases Page
cargo build --releaseIf the system on which you compile has a newer version of glibc than the one you plan to run cgrep on you can try two things:
- Use
muslinstead of the defualtglibc. - Spin up a Docker container with an envoirement using an older
glibcversion.
To check your glibc-version: ldd --version
- Install the MUSL component with rustup:
rustup component add rust-std-x86_64-unknown-linux-musl- Build using it:
cargo build --release --target x86_64-unknown-linux-musl- Spin up a Docker container. Example Dockerfile:
# Start with a CentOS 7 base image
FROM centos:7
# Switch to CentOS Vault repositories
RUN sed -i 's|mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/CentOS-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
# Install necessary development tools and Rustup
RUN yum update -y && \
yum groupinstall -y "Development Tools" && \
yum install -y wget curl gcc gcc-c++ git make && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# Set Rust environment variables
ENV PATH="/root/.cargo/bin:$PATH"
# Default command to start a shell
CMD ["/bin/bash"]- Build Docker image
docker build -t rust-glibc-2.17 .- Run Docker image, Mount your Repo and connect to it interactivly
docker run -it --rm -v "$HOME/Path/to/Repo:/root/RustRepo" rust-glibc-2.17- Build using installed
glibcversion
cargo build --releaseTo deploy the program, simply upload the binary to a directory listed in PATH.
Note: For the colors to display as expected you need to be using a Terminal that has TrueColor-Support.
You can check if your terminal supports true color by checking the value of the environment variable $COLORTERM on your terminal. A value of truecolor or 24bit indicates that it should work.