Files
inventory-collector/packaging/rpm/inventory-collector.spec
T
soda64 1dbbb1ce56
Build and Publish Release / Build Packages and Publish (push) Successful in 10s
feat: release v1.1.2 - hardened IP sorting with ipaddress and config sort defaults
2026-10-03 22:18:10 +02:00

92 lines
4.0 KiB
RPMSpec

Name: inventory-collector
Version: 1.1.2
Release: 1%{?dist}
Summary: Universal homelab and fleet inventory collector and deduplicator
License: MIT
URL: https://gitea.wired.synology.me/soda64/inventory-collector
Source0: inventory-collector-%{version}.tar.gz
BuildArch: noarch
Requires: python3 >= 3.8
Recommends: python3-pyyaml
%description
Universal homelab and fleet inventory collector and deduplicator for Ansible
and linux-connector. Gathers host definitions from Proxmox VE REST API and
static YAML/INI files, normalizes and deduplicates host records in memory with
group and tag set unions, and generates unified inventory files.
%prep
%setup -q
%build
# Pure Python package, no compilation required
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_prefix}/lib/inventory-collector
mkdir -p %{buildroot}%{_sysconfdir}/inventory-collector
mkdir -p %{buildroot}%{_mandir}/man1
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
mkdir -p %{buildroot}%{_datadir}/zsh/site-functions
mkdir -p %{buildroot}%{_datadir}/doc/inventory-collector
cp -r inventory_collector %{buildroot}%{_prefix}/lib/inventory-collector/
install -m 755 bin/inventory-collector %{buildroot}%{_bindir}/inventory-collector
if [ -f config.yaml.example ]; then
install -m 644 config.yaml.example %{buildroot}%{_sysconfdir}/inventory-collector/config.yaml.example
fi
if [ -f man/inventory-collector.1 ]; then
install -m 644 man/inventory-collector.1 %{buildroot}%{_mandir}/man1/inventory-collector.1
fi
if [ -f completions/bash/inventory-collector ]; then
install -m 644 completions/bash/inventory-collector %{buildroot}%{_datadir}/bash-completion/completions/inventory-collector
fi
if [ -f completions/zsh/_inventory-collector ]; then
install -m 644 completions/zsh/_inventory-collector %{buildroot}%{_datadir}/zsh/site-functions/_inventory-collector
fi
if [ -f README.md ]; then
install -m 644 README.md %{buildroot}%{_datadir}/doc/inventory-collector/README.md
fi
if [ -f docs/user-guide.md ]; then
install -m 644 docs/user-guide.md %{buildroot}%{_datadir}/doc/inventory-collector/user-guide.md
fi
%files
%defattr(-,root,root,-)
%attr(0755, root, root) %{_bindir}/inventory-collector
%{_prefix}/lib/inventory-collector
%dir %{_sysconfdir}/inventory-collector
%config(noreplace) %{_sysconfdir}/inventory-collector/config.yaml.example
%{_mandir}/man1/inventory-collector.1*
%{_datadir}/bash-completion/completions/inventory-collector
%{_datadir}/zsh/site-functions/_inventory-collector
%doc %{_datadir}/doc/inventory-collector
%changelog
* Sat Oct 03 2026 Mateusz Stomski <zbytatencyjny@gmail.com> - 1.1.2-1
- Use Python standard ipaddress module for robust numerical 32-bit/128-bit IP sorting.
- Handle CIDR notation (/24) and port numbers (:22) gracefully in IP sorting.
- Support default sort configuration (sort_by, sort_reverse) in config.yaml.
* Sat Oct 03 2026 Mateusz Stomski <zbytatencyjny@gmail.com> - 1.1.1-1
- Add host sorting by name and IP (--sort {name,ip}, -r/--reverse).
- Add destination override flags in --sync mode (--ansible-dest, --lc-dest, -o).
- Support ~ expansion in config destinations and CLI paths.
* Sat Oct 03 2026 Mateusz Stomski <zbytatencyjny@gmail.com> - 1.1.0-1
- Disable PyYAML anchors and aliases in YAML exporters for clean readability.
- Fix DNS wildcard collision false positives in Proxmox collector.
- Query Proxmox /nodes/{node}/network for physical node management IPs.
- Add filtering by tag (-t/--tag), group (-g/--group/--category), and source provider (--source-type/--filter-source/--origin).
- Auto-load environment variables from ~/.config/inventory-collector/env and /etc/inventory-collector/env.
* Sat Oct 03 2026 Mateusz Stomski <zbytatencyjny@gmail.com> - 1.0.1-1
- Silence info and warning stderr logs in --list dynamic inventory mode.
- Add -q/--quiet and -v/--verbose CLI flags.
* Sat Oct 03 2026 Mateusz Stomski <zbytatencyjny@gmail.com> - 1.0.0-1
- Initial release of inventory-collector.