Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# Build directories
/target
/output
/rpmbuild

# Vendor
/vendor

# OS Files
.DS_Store
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["Christopher Sardegna <[email protected]>"]
categories = ["command-line-interface", "command-line-utilities"]
description = "A powerful CLI tool that puts log analytics at your fingertips."
edition = "2024"
exclude = ["/resources", ".github", "docs", "build.sh"]
exclude = ["/resources", ".github", "docs", "build.sh", "packaging", "build-srpm.sh"]
keywords = ["cli", "tui", "logs", "log-parsing", "log-analytics"]
license = "GPL-3.0-or-later"
name = "logria"
Expand Down
28 changes: 28 additions & 0 deletions build-srpm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
#

set -e

source ./version.sh
TARBALL=logria-$VERSION.tar.gz

mkdir -p output
rm -rf rpmbuild

cargo vendor
tar -czf logria-$VERSION-vendor.tar.gz vendor
sed -e "s/@VERSION@/$VERSION/; s/@RELEASE@/$RELEASE/" ./packaging/logria.spec.in > logria.spec
find ./* \
! -name 'packaging' \
! -name 'rpmbuild' \
! -name 'exported-artifacts' \
! -name '.git' \
-type f | tar --files-from /proc/self/fd/0 -czf "$TARBALL" --transform "s,^,logria-$VERSION/,"

mkdir -p rpmbuild/{SPECS,SOURCES,BUILD,BUILDROOT,SRPMS}
mv *.tar.gz rpmbuild/SOURCES
mv logria.spec rpmbuild/SPECS

rpmbuild -bs --define "_topdir `pwd`/rpmbuild" `pwd`/rpmbuild/SPECS/logria.spec

mv rpmbuild/SRPMS/* output
37 changes: 37 additions & 0 deletions packaging/logria.spec.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Name: logria
Version: @VERSION@
Release: @RELEASE@%{?dist}
Summary: A powerful CLI tool that puts log aggregation at your fingertips

License: GPL-3.0
URL: https://github.com/ReagentX/Logria
Source0: %{name}-%{version}.tar.gz
Source1: %{name}-%{version}-vendor.tar.gz

BuildRequires: rust >= 1.88.0
BuildRequires: cargo

%description
Logria is best leveraged to watch live logs from multiple processes and filter them for events you want to see. My most common use case is watching logs from multiple Linode/EC2 instances via ssh or multiple CloudWatch streams using aws logs.


%prep
%autosetup

%build
cargo build --release

%install
mkdir -p %{buildroot}%{_bindir}
install -D -m 0755 target/release/%{name} %{buildroot}%{_bindir}


%files
%{_bindir}/%{name}
%license LICENSE
%doc README.md


%changelog
* Mon Nov 24 2025 Alexander Lushin <[email protected]> - 0.4.2-1
- Initial build
4 changes: 4 additions & 0 deletions version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

export VERSION=0.4.2
export RELEASE=1