| 1 | Name: sultree |
| 2 | Version: 0.0.8 |
| 3 | Release: 1%{?dist} |
| 4 | Summary: SELinux-aware tree command for displaying directory trees filtered by security contexts |
| 5 | |
| 6 | License: MIT |
| 7 | URL: https://github.com/username/sultree |
| 8 | Source0: %{name}-%{version}.tar.gz |
| 9 | |
| 10 | BuildArch: noarch |
| 11 | BuildRequires: python3-devel >= 3.8 |
| 12 | BuildRequires: python3-setuptools |
| 13 | BuildRequires: python3-pip |
| 14 | Requires: python3 >= 3.8 |
| 15 | Requires: attr |
| 16 | Requires: python3-pathlib |
| 17 | |
| 18 | %description |
| 19 | sultree is a SELinux-aware variant of the tree command that displays directory |
| 20 | trees filtered by SELinux security contexts. It provides all the functionality |
| 21 | of the standard tree command while adding powerful SELinux filtering capabilities |
| 22 | using the -S flag. |
| 23 | |
| 24 | Features: |
| 25 | - Full tree compatibility with standard tree command options |
| 26 | - SELinux filtering with wildcard pattern matching |
| 27 | - Security-focused design with input validation and safe error handling |
| 28 | - Memory-efficient iterative processing for large directory trees |
| 29 | - Caching for improved performance on repeated operations |
| 30 | |
| 31 | %prep |
| 32 | %autosetup |
| 33 | |
| 34 | %build |
| 35 | export PATH=$PATH:/home/espadon/.local/bin |
| 36 | %{python3} -m build --wheel --no-isolation |
| 37 | |
| 38 | %install |
| 39 | export PATH=$PATH:/home/espadon/.local/bin |
| 40 | %{python3} -m pip install --root %{buildroot} --no-deps --ignore-installed dist/*.whl |
| 41 | |
| 42 | # Install the standalone script |
| 43 | install -Dm755 sultree %{buildroot}%{_bindir}/sultree-standalone |
| 44 | |
| 45 | %files |
| 46 | %doc README.md |
| 47 | %{python3_sitelib}/%{name}/ |
| 48 | %{python3_sitelib}/%{name}-%{version}*.dist-info/ |
| 49 | %{_bindir}/sultree |
| 50 | %{_bindir}/sultree-standalone |
| 51 | |
| 52 | %changelog |
| 53 | * Sat Aug 24 2024 mfw <espadonne@outlook.com> - 0.0.8-1 |
| 54 | - Initial RPM release |
| 55 | - SELinux-aware tree command implementation |
| 56 | - Full tree command compatibility |
| 57 | - Performance optimizations with caching |
| 58 | - Security-focused design |