Some checks failed
CI / security-codeql (push) Has been cancelled
CI / test-unit (push) Has been cancelled
CI / test-integration (push) Has been cancelled
CI / test-env-virtual (push) Has been cancelled
CI / test-env-nix (push) Has been cancelled
CI / test-e2e (push) Has been cancelled
CI / test-virgin-user (push) Has been cancelled
CI / test-virgin-root (push) Has been cancelled
CI / lint-shell (push) Has been cancelled
CI / lint-python (push) Has been cancelled
CI / lint-docker (push) Has been cancelled
347 lines
19 KiB
RPMSpec
347 lines
19 KiB
RPMSpec
Name: package-manager
|
||
Version: 1.15.2
|
||
Release: 1%{?dist}
|
||
Summary: Wrapper that runs Kevin's package-manager via Nix flake
|
||
|
||
License: MIT
|
||
URL: https://github.com/kevinveenbirkenbach/package-manager
|
||
Source0: %{name}-%{version}.tar.gz
|
||
|
||
BuildArch: noarch
|
||
|
||
# NOTE:
|
||
# Nix is a runtime requirement, but it is *not* declared here as a hard
|
||
# RPM dependency, because many distributions do not ship a "nix" RPM.
|
||
# Instead, Nix is installed and initialized by nix/init.sh, which is
|
||
# called in the %post scriptlet below.
|
||
|
||
%description
|
||
This package provides the `pkgmgr` command, which runs Kevin's package
|
||
manager via a local Nix flake:
|
||
|
||
nix run /usr/lib/package-manager#pkgmgr -- ...
|
||
|
||
Nix is a runtime requirement and is installed/initialized by the
|
||
nix/init.sh helper during package installation if it is not yet
|
||
available on the system.
|
||
|
||
%prep
|
||
%setup -q
|
||
|
||
%build
|
||
# No build step required; we ship the project tree as-is.
|
||
:
|
||
|
||
%install
|
||
rm -rf %{buildroot}
|
||
|
||
install -d %{buildroot}%{_bindir}
|
||
install -d %{buildroot}/usr/lib/package-manager
|
||
|
||
# Copy full project source into /usr/lib/package-manager
|
||
cp -a . %{buildroot}/usr/lib/package-manager/
|
||
|
||
# Wrapper
|
||
install -m0755 scripts/launcher.sh %{buildroot}%{_bindir}/pkgmgr
|
||
|
||
# Nix bootstrap (init + lib)
|
||
install -d %{buildroot}/usr/lib/package-manager/nix
|
||
cp -a scripts/nix/* %{buildroot}/usr/lib/package-manager/nix/
|
||
chmod 0755 %{buildroot}/usr/lib/package-manager/nix/init.sh
|
||
|
||
# Remove packaging-only and development artefacts from the installed tree
|
||
rm -rf \
|
||
%{buildroot}/usr/lib/package-manager/PKGBUILD \
|
||
%{buildroot}/usr/lib/package-manager/Dockerfile \
|
||
%{buildroot}/usr/lib/package-manager/debian \
|
||
%{buildroot}/usr/lib/package-manager/.git \
|
||
%{buildroot}/usr/lib/package-manager/.github \
|
||
%{buildroot}/usr/lib/package-manager/tests \
|
||
%{buildroot}/usr/lib/package-manager/.gitignore \
|
||
%{buildroot}/usr/lib/package-manager/__pycache__ \
|
||
%{buildroot}/usr/lib/package-manager/.gitkeep || true
|
||
|
||
%post
|
||
/usr/lib/package-manager/nix/init.sh
|
||
|
||
%postun
|
||
echo ">>> package-manager removed. Nix itself was not removed."
|
||
|
||
%files
|
||
%doc README.md
|
||
%license LICENSE
|
||
%{_bindir}/pkgmgr
|
||
/usr/lib/package-manager/
|
||
|
||
%changelog
|
||
* Thu May 28 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.15.2-1
|
||
- Restore `infinito` as an alias for the infinito-nexus/core repository so `pkgmgr install infinito` (and friends) resolves again.
|
||
|
||
* Thu May 28 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.15.1-1
|
||
- Insert pkgmgr release changelog entry under the H1 instead of above it. Fixes the markdownlint MD041 (first-line-h1) and MD012 (no-multiple-blanks) regressions that previously trashed every CHANGELOG.md after a release.
|
||
|
||
* Thu May 28 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.15.0-1
|
||
- Add pkgmgr archive subcommand: promote fully-checked NNN-topic.md spec files into the directorys README Archive section and delete the source files. Lookup pattern, README path, and template handling are configurable. Extracted from infinito-nexus-core so every kpmx-managed repo gets the same archival flow.
|
||
|
||
* Wed May 27 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.14.0-1
|
||
- Added
|
||
|
||
* New release --retry mode re-deploys the HEAD release without
|
||
re-tagging or modifying any files. It re-pushes the existing version
|
||
tag, re-aligns the floating latest tag, and (unless --no-publish)
|
||
re-runs publish. Use this to recover from a release whose post-tag
|
||
push or PyPI upload failed mid-flight. The release_type argument
|
||
becomes optional under --retry.
|
||
* New module pkgmgr.actions.release.retry hosts the retry_release
|
||
helper so the workflow orchestrator stays focused on the forward
|
||
path.
|
||
* RepoPaths now exposes a debian_control slot, discovered alongside
|
||
debian_changelog under both packaging/debian and the legacy debian
|
||
layout.
|
||
* pkgmgr.actions.release.package_name.resolve_package_name centralises
|
||
the distro-name lookup chain and is unit-tested under
|
||
tests/unit/pkgmgr/actions/release/test_package_name.py.
|
||
* tests/unit/pkgmgr/actions/release/test_retry.py covers routing,
|
||
idempotent push, latest-tag re-alignment, missing-tag error path,
|
||
and branch-detection fallback.
|
||
|
||
Changed
|
||
|
||
* pkgmgr release now derives the distro-package name from existing
|
||
packaging metadata instead of the repository folder name. The lookup
|
||
order is packaging/debian/control Package field, then
|
||
packaging/arch/PKGBUILD pkgname value, then RPM spec Name field,
|
||
then folder basename as legacy fallback. Renaming a repository
|
||
folder no longer silently flips the debian/changelog top entry and
|
||
the RPM changelog stanza to a new identifier. Those keep matching
|
||
the authoritative value in the packaging files, which is what apt,
|
||
pacman, and dnf index against.
|
||
|
||
Fixed
|
||
|
||
* dpkg-source --before-build no longer fails with the message about
|
||
source package having two conflicting values after a repo-folder
|
||
rename, because the changelog and control file stay in agreement
|
||
on the next release.
|
||
|
||
* Wed May 27 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.13.4-1
|
||
- Changed
|
||
|
||
* pkgmgr release now derives the distro-package name from existing
|
||
packaging metadata instead of the repository folder name. The lookup
|
||
order is packaging/debian/control Package field, then
|
||
packaging/arch/PKGBUILD pkgname value, then RPM spec Name field, then
|
||
folder basename as legacy fallback. Renaming a repository folder (for
|
||
example infinito-nexus to infinito-nexus-core) no longer silently
|
||
flips the debian/changelog top entry and the RPM changelog stanza to
|
||
a new identifier. Those keep matching the authoritative Package,
|
||
pkgname, or Name value in the packaging files, which is what apt,
|
||
pacman, and dnf index against.
|
||
|
||
Added
|
||
|
||
* RepoPaths gains a debian_control slot that is discovered alongside
|
||
debian_changelog under both packaging/debian (new layout) and debian
|
||
(legacy layout).
|
||
* pkgmgr.actions.release.package_name.resolve_package_name centralises
|
||
the priority chain and is unit-tested under
|
||
tests/unit/pkgmgr/actions/release/test_package_name.py.
|
||
|
||
Fixed
|
||
|
||
* dpkg-source --before-build no longer fails with the message about
|
||
source package having two conflicting values after a repo-folder
|
||
rename, because the changelog and control file stay in agreement.
|
||
|
||
* Thu Mar 26 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.13.3-1
|
||
- CI pipelines now include automated security scanning (CodeQL, Docker lint), increasing detection of vulnerabilities and misconfigurations
|
||
* Workflow permissions were tightened and fixed, ensuring secure and reliable execution of reusable workflows
|
||
* Publishing and “stable” tagging are now restricted to the `main` branch, preventing accidental releases from other branches
|
||
* Stale CI runs are automatically cancelled, reducing wasted resources and speeding up feedback cycles
|
||
* Overall CI reliability and security posture improved, with fewer false positives and more consistent pipeline results
|
||
|
||
* Thu Mar 26 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.13.2-1
|
||
- Fail fast with a clear error when the Nix bootstrap or nix binary is unavailable instead of continuing with a broken startup path.
|
||
|
||
* Fri Mar 20 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.13.1-1
|
||
- Fixed misleading GPG verification failures by adding explicit git and gnupg runtime dependencies and surfacing signing-key lookup errors accurately.
|
||
|
||
* Fri Mar 20 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.13.0-1
|
||
- Set CentOS docker image to latest
|
||
|
||
* Tue Feb 24 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.12.5-1
|
||
- The stable-tag workflow now waits up to two hours for a successful main-branch CI run on the same commit before updating stable.
|
||
|
||
* Tue Feb 24 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.12.4-1
|
||
- The release pipeline now updates the stable tag only for v* tags after a successful CI run on main for the same commit, while avoiding duplicate test executions.
|
||
|
||
* Tue Feb 24 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.12.3-1
|
||
- Stabilized Nix-based builds by switching to nixos-25.11 and committing flake.lock, ensuring reproducible pkgmgr test/runtime environments (with pip) and avoiding transient sphinx/Python 3.11 breakage.
|
||
|
||
* Tue Feb 24 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.12.2-1
|
||
- Removed infinito-sphinx package
|
||
|
||
* Sat Feb 14 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.12.1-1
|
||
- pkgmgr now prefers distro-managed nix binaries on Arch before profile/PATH resolution, preventing libllhttp mismatch failures after pacman system upgrades.
|
||
|
||
* Sun Feb 08 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.12.0-1
|
||
- Adds explicit concurrency groups to the CI and mark-stable workflows to prevent overlapping runs on the same branch and make pipeline execution more predictable.
|
||
|
||
* Sun Feb 08 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.11.2-1
|
||
- Removes the v* tag trigger from the mark-stable workflow so it runs only on branch pushes and avoids duplicate executions during releases.
|
||
|
||
* Sun Feb 08 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.11.1-1
|
||
- Implements pushing the branch and the version tag together in a single command so the CI release workflow can reliably detect the version tag on HEAD.
|
||
|
||
* Wed Jan 21 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.11.0-1
|
||
- Adds a dedicated slim Docker image for pkgmgr and publishes slim variants for all supported distros.
|
||
|
||
* Tue Jan 20 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.10.0-1
|
||
- Automated release.
|
||
|
||
* Fri Jan 16 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.9.5-1
|
||
- Release patch: improve git pull error diagnostics
|
||
|
||
* Tue Jan 13 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.9.4-1
|
||
- fix(ci): replace sudo with su for user switching to avoid PAM failures in minimal container images
|
||
|
||
* Wed Jan 07 2026 Kevin Veen-Birkenbach <kevin@veen.world> - 1.9.3-1
|
||
- Made the Nix dependency optional on non-x86_64 architectures to avoid broken Arch Linux ARM repository packages.
|
||
|
||
* Sun Dec 21 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 1.9.2-1
|
||
- Default configuration files are now packaged and loaded correctly when no user config exists, while fully preserving custom user configurations.
|
||
|
||
* Sun Dec 21 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 1.9.1-1
|
||
- Fixed installation issues and improved loading of default configuration files.
|
||
|
||
* Sat Dec 20 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 1.9.0-1
|
||
- * New ***mirror visibility*** command to set remote Git repositories to ***public*** or ***private***.
|
||
* New ***--public*** flag for ***mirror provision*** to create repositories and immediately make them public.
|
||
* All configured git mirrors are now provisioned.
|
||
|
||
* Fri Dec 19 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 1.8.7-1
|
||
- * **Release version updates now correctly modify ***pyproject.toml*** files that follow PEP 621**, ensuring the ***[project].version*** field is updated as expected.
|
||
* **Invalid or incomplete ***pyproject.toml*** files are now handled gracefully** with clear error messages instead of abrupt process termination.
|
||
* **RPM spec files remain compatible during releases**: existing macros such as ***%{?dist}*** are preserved and no longer accidentally modified.
|
||
|
||
* Wed Dec 17 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 1.8.6-1
|
||
- Prevent Rate Limits during GitHub Nix Setups
|
||
|
||
* Wed Dec 17 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 1.8.5-1
|
||
- * Clearer Git error handling, especially when a directory is not a Git repository.
|
||
* More reliable repository verification with improved commit and GPG signature checks.
|
||
* Better error messages and overall robustness when working with Git-based workflows.
|
||
|
||
* Wed Dec 17 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 1.9.0-1
|
||
- Automated release.
|
||
|
||
* Wed Dec 17 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 1.8.4-1
|
||
- * Made pkgmgr’s base-layer role explicit by standardizing the Docker/CI mount path to *`/opt/src/pkgmgr`*.
|
||
|
||
* Tue Dec 16 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 1.8.3-1
|
||
- MIRRORS now supports plain URL entries, ensuring metadata-only sources like PyPI are recorded without ever being added to the Git configuration.
|
||
|
||
* Tue Dec 16 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 1.8.2-1
|
||
- * ***pkgmgr tools code*** is more robust and predictable: it now fails early with clear errors if VS Code is not installed or a repository is not yet identified.
|
||
|
||
* Tue Dec 16 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 1.8.1-1
|
||
- * Improved stability and consistency of all Git operations (clone, pull, push, release, branch handling) with clearer error messages and predictable preview behavior.
|
||
* Mirrors are now handled cleanly: only valid Git remotes are used for Git operations, while non-Git URLs (e.g. PyPI) are excluded, preventing broken or confusing repository configs.
|
||
* GitHub authentication is more robust: tokens are automatically resolved via the GitHub CLI (`gh`), invalid stored tokens are replaced, and interactive prompts occur only when necessary.
|
||
* Repository creation and release workflows are more reliable, producing cleaner Git configurations and more predictable version handling.
|
||
|
||
* Mon Dec 15 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 1.8.0-1
|
||
- *** New Features: ***
|
||
- **Silent Updates**: You can now use the `--silent` flag during installs and updates to suppress error messages for individual repositories and get a single summary at the end. This ensures the process continues even if some repositories fail, while still preserving interactive checks when not in silent mode.
|
||
- **Repository Scaffolding**: The process for creating new repositories has been improved. You can now use templates to scaffold repositories with a preview and automatic mirror setup.
|
||
|
||
*** Bug Fixes: ***
|
||
- **Pip Installation**: Pip is now installed automatically on all supported systems. This includes `python-pip` for Arch and `python3-pip` for CentOS, Debian, Fedora, and Ubuntu, ensuring that pip is available for Python package installations.
|
||
- **Pacman Keyring**: Fixed an issue on Arch Linux where package installation would fail due to missing keys. The pacman keyring is now properly initialized before installing packages.
|
||
|
||
* Mon Dec 15 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 1.7.2-1
|
||
- * Git mirrors are now resolved consistently (origin → MIRRORS file → config → default).
|
||
* The `origin` remote is always enforced to use the primary URL for both fetch and push.
|
||
* Additional mirrors are added as extra push targets without duplication.
|
||
* Local and remote mirror setup behaves more predictably and consistently.
|
||
* Improved test coverage ensures stable origin and push URL handling.
|
||
|
||
* Sun Dec 14 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 1.7.1-1
|
||
- Patched package-manager to kpmx to publish on pypi
|
||
|
||
* Sun Dec 14 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 1.7.0-1
|
||
- * New *pkgmgr publish* command to publish repository artifacts to PyPI based on the *MIRRORS* file.
|
||
* Automatically selects the current repository when no explicit selection is given.
|
||
* Publishes only when a semantic version tag is present on *HEAD*; otherwise skips with a clear info message.
|
||
* Supports non-interactive mode for CI environments via *--non-interactive*.
|
||
|
||
* Sun Dec 14 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 1.6.4-1
|
||
- * Improved reliability of Nix installs and updates, including automatic resolution of profile conflicts and better handling of GitHub 403 rate limits.
|
||
* More stable launcher behavior in packaged and virtual-env setups.
|
||
* Enhanced mirror and remote handling: repository owner/name are derived from URLs, with smoother provisioning and clearer credential handling.
|
||
* More reliable releases and artifacts due to safer CI behavior when no version tag is present.
|
||
|
||
* Sun Dec 14 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 1.6.3-1
|
||
- ***Fixed:*** Corrected repository path resolution so release and version logic consistently use the canonical packaging/* layout, preventing changelog and packaging files from being read or updated from incorrect locations.
|
||
|
||
* Wed Dec 10 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.9.1-1
|
||
- * Refactored installer: new `venv-create.sh`, cleaner root/user setup flow, updated README with architecture map.
|
||
* Split virgin tests into root/user workflows; stabilized Nix installer across distros; improved test scripts with dynamic distro selection and isolated Nix stores.
|
||
* Fixed repository directory resolution; improved `pkgmgr path` and `pkgmgr shell`; added full unit/E2E coverage.
|
||
* Removed deprecated files and updated `.gitignore`.
|
||
|
||
* Wed Dec 10 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.9.0-1
|
||
- Introduce a virgin Arch-based Nix flake E2E workflow that validates pkgmgr’s full flake installation path using shared caches for faster and reproducible CI runs.
|
||
|
||
* Wed Dec 10 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.8.0-1
|
||
- **v0.7.15 — Installer & Command Resolution Improvements**
|
||
|
||
* Introduced a unified **layer-based installer pipeline** with clear precedence (OS-packages, Nix, Python, Makefile).
|
||
* Reworked installer structure and improved Python/Nix/Makefile installers, including isolated Python venvs and refined flake-output handling.
|
||
* Fully rewrote **command resolution** with stronger typing, safer fallbacks, and explicit support for `command: null` to mark library-only repositories.
|
||
* Added extensive **unit and integration tests** for installer capability ordering, command resolution, and Nix/Python installer behavior.
|
||
* Expanded documentation with capability hierarchy diagrams and scenario matrices.
|
||
* Removed deprecated repository entries and obsolete configuration files.
|
||
|
||
* Wed Dec 10 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.14-1
|
||
- Fixed the clone-all integration test so that `SystemExit(0)` from the proxy is treated as a successful command instead of a failure.
|
||
|
||
* Wed Dec 10 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.13-1
|
||
- Automated release.
|
||
|
||
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.12-1
|
||
- Fixed self refering alias during setup
|
||
|
||
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.11-1
|
||
- test: fix installer unit tests for OS packages and Nix dev shell
|
||
|
||
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.10-1
|
||
- Fixed test_install_pkgmgr_shallow.py
|
||
|
||
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.9-1
|
||
- 'main' and 'master' are now both accepted as branches for branch close merge
|
||
|
||
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.8-1
|
||
- Missing pyproject.toml doesn't lead to an error during release
|
||
|
||
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.7-1
|
||
- Added TEST_PATTERN parameter to execute dedicated tests
|
||
|
||
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.6-1
|
||
- Fixed pull --preview bug in e2e test
|
||
|
||
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.5-1
|
||
- Fixed wrong directory permissions for nix
|
||
|
||
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.4-1
|
||
- Fixed missing build in test workflow -> Tests pass now
|
||
|
||
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.3-1
|
||
- Fixed bug: Ignored packages are now ignored
|
||
|
||
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.2-1
|
||
- Implemented Changelog Support for Fedora and Debian
|
||
|
||
* Sat Dec 06 2025 Kevin Veen-Birkenbach <info@veen.world> - 0.1.1-1
|
||
- Initial RPM packaging for package-manager
|