Files
ingglish-hyperdope-gematria/packaging/rpm/ingglish-isopsephic-exegesis.spec

67 lines
2.8 KiB
RPMSpec

Name: ingglish-isopsephic-exegesis
Version: 0.1.0
Release: 1%{?dist}
Summary: Daily 00:00 GMT Current-Events Ingglish AQ & Hyperdope-Gematria CI Pipeline
License: MIT
URL: https://hermes-agent.nousresearch.com
BuildArch: noarch
Requires: python3 >= 3.10
Requires: nodejs >= 1:18.0
Requires: words
Requires: curl
Requires(pre): shadow-utils
Requires(post): systemd
Requires(post): policycoreutils-python-utils
%description
Deterministic phonetic Ingglish (CMU Pronouncing Dictionary) and Base-36
Alphanumeric Qabbala (AQ) current-events harvester, synchronic exegesis
skill bundle, and 4-gate hyperdope-gematria CI provisioning engine.
Includes systemd service/timer units pinned to 00:00:00 UTC (GMT), FIPS 140-3
compatible SHA-256 manifest auditing, and SELinux policy labeling for RHEL 8/9/10.
%install
install -d -m 0755 %{buildroot}/usr/share/hermes/skills
install -d -m 0755 %{buildroot}/usr/libexec/ingglish-exegesis/scripts
install -d -m 0755 %{buildroot}/usr/libexec/ingglish-exegesis/node_modules
install -d -m 0755 %{buildroot}/usr/lib/systemd/system
install -d -m 0755 %{buildroot}/usr/lib/sysusers.d
install -d -m 0755 %{buildroot}/var/lib/ingglish-aq-archive
cp -a skills/* %{buildroot}/usr/share/hermes/skills/
cp -a scripts/* %{buildroot}/usr/libexec/ingglish-exegesis/scripts/
cp -a node_modules/* %{buildroot}/usr/libexec/ingglish-exegesis/node_modules/
install -m 0644 systemd/ingglish-exegesis.service %{buildroot}/usr/lib/systemd/system/ingglish-exegesis.service
install -m 0644 systemd/ingglish-exegesis.timer %{buildroot}/usr/lib/systemd/system/ingglish-exegesis.timer
install -m 0644 sysusers.d/ingglish-exegesis.conf %{buildroot}/usr/lib/sysusers.d/ingglish-exegesis.conf
%pre
getent group ingglish >/dev/null || groupadd -r ingglish
getent passwd ingglish >/dev/null || \
useradd -r -g ingglish -d /var/lib/ingglish-aq-archive -s /sbin/nologin \
-c "Ingglish Isopsephic Exegesis Service" ingglish
exit 0
%post
%systemd_post ingglish-exegesis.service ingglish-exegesis.timer
if command -v semanage >/dev/null 2>&1 && command -v restorecon >/dev/null 2>&1; then
semanage fcontext -a -t var_lib_t '/var/lib/ingglish-aq-archive(/.*)?' 2>/dev/null || \
semanage fcontext -m -t var_lib_t '/var/lib/ingglish-aq-archive(/.*)?' 2>/dev/null || :
restorecon -Rv /var/lib/ingglish-aq-archive >/dev/null 2>&1 || :
fi
%preun
%systemd_preun ingglish-exegesis.service ingglish-exegesis.timer
%postun
%systemd_postun_with_restart ingglish-exegesis.timer
%files
/usr/share/hermes/skills/
/usr/libexec/ingglish-exegesis/
/usr/lib/systemd/system/ingglish-exegesis.service
/usr/lib/systemd/system/ingglish-exegesis.timer
/usr/lib/sysusers.d/ingglish-exegesis.conf
%attr(0755,ingglish,ingglish) %dir /var/lib/ingglish-aq-archive