Skip to content

Commit b211f43

Browse files
author
Sqoia Dev Agent
committed
fix: remove python3-pymysql/reportlab from RPM Requires (not in Rocky 8 repos)
The packages python3-pymysql and python3-reportlab are not available in Rocky 8 base or EPEL repos. Removed hard Requires and instead: - Added %post scriptlet that runs pip3 install with fallback warning - Added %post cockpit restart - Created /etc/slurmledger/invoices and /var/log/slurmledger dirs - Documented pip install in %description
1 parent df40644 commit b211f43

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

slurmledger.spec

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ Source0: %{name}-%{version}.tar.gz
88

99
Requires: cockpit
1010
Requires: python3
11-
Requires: python3-pymysql
12-
Requires: python3-reportlab
1311

1412
%description
15-
SlurmLedger is a Cockpit plugin that provides HPC cost management for SLURM
16-
clusters. It tracks job costs, generates invoices, manages allocations, and
17-
provides role-based dashboards for admins, finance staff, PIs, and members.
13+
SlurmLedger is a Cockpit plugin that provides HPC billing and allocation
14+
management for SLURM clusters. It tracks job costs, generates professional
15+
invoices, manages SU allocations, enforces budgets, and provides role-based
16+
dashboards for admins, finance staff, PIs, and members.
17+
18+
Python dependencies (install via pip if not available as system packages):
19+
pip3 install pymysql reportlab
1820

1921
%prep
2022
%setup -q
@@ -26,12 +28,21 @@ provides role-based dashboards for admins, finance staff, PIs, and members.
2628
install -d %{buildroot}/usr/share/cockpit/%{name}
2729
cp -a * %{buildroot}/usr/share/cockpit/%{name}/
2830
install -d %{buildroot}/etc/%{name}
31+
install -d %{buildroot}/etc/%{name}/invoices
32+
install -d %{buildroot}/var/log/%{name}
2933
cp rates.json %{buildroot}/etc/%{name}/rates.json
3034
cp institution.json %{buildroot}/etc/%{name}/institution.json
3135

36+
%post
37+
pip3 install pymysql reportlab 2>/dev/null || echo "WARNING: Install Python deps manually: pip3 install pymysql reportlab"
38+
systemctl try-restart cockpit 2>/dev/null || true
39+
3240
%files
3341
/usr/share/cockpit/%{name}
3442
%config(noreplace) /etc/%{name}/rates.json
3543
%config(noreplace) /etc/%{name}/institution.json
44+
%dir /etc/%{name}
45+
%dir /etc/%{name}/invoices
46+
%dir /var/log/%{name}
3647

3748
%changelog

0 commit comments

Comments
 (0)