%global debug_package %{nil} Name: mx-rpm Version: 3.9.6 Release: 1%{?dist} Summary: Discover, fetch sources for, build, and publish RPM spec files with mock License: MIT URL: https://github.com/lacamar/mx-rpm Source0: %{name}-%{version}.tar.gz BuildRequires: cargo-rpm-macros >= 26 BuildRequires: gcc BuildRequires: systemd-rpm-macros # %%check runs rpmspec, rpm's lua vercmp, git and rpmdev-packager for real BuildRequires: rpm-build BuildRequires: rpmdevtools BuildRequires: git-core Requires: rpm-build Requires: rpmdevtools Requires: mock Requires: git Requires: curl Requires: cpio Recommends: libnotify %description Discovers RPM .spec files (by path, bare stem, or directory), downloads their Source/Patch URLs with curl, builds them with mock (SRPM-only or full binary, optionally N packages in parallel), and on success optionally git-commits the spec and/or uploads the SRPM to COPR (v3 API, with duplicate-NVR detection). `--update`/`-U` checks upstream for a newer tag or commit, bumps the spec and builds it. Failed builds leave JSON records in failures.json; --autofix (daily user timer) hands them to Claude. %prep %autosetup -n %{name}-%{version} %cargo_prep -N # build online: the crates are not packaged for Fedora sed -i 's/^offline = true$//' .cargo/config.toml %build %{__cargo} build %{__cargo_common_opts} --profile rpm %install install -Dpsm0755 target/rpm/mx-rpm %{buildroot}%{_bindir}/mx-rpm install -Dm755 autobuild-wrapper.sh %{buildroot}%{_bindir}/autobuild install -Dm644 packaging/mx-rpm-autofix.{service,timer} -t %{buildroot}%{_userunitdir} install -Dm644 completions/mx-rpm.bash %{buildroot}%{_datadir}/bash-completion/completions/%{name} install -Dm644 assets/mx-rpm.jpg %{buildroot}%{_datadir}/%{name}/mx-rpm.jpg %check %{__cargo} test %{__cargo_common_opts} --profile rpm --no-fail-fast %files %license LICENSE %doc README.md %{_bindir}/mx-rpm %{_bindir}/autobuild %{_userunitdir}/mx-rpm-autofix.service %{_userunitdir}/mx-rpm-autofix.timer %{_datadir}/bash-completion/completions/%{name} %{_datadir}/%{name}/ %changelog * Fri Nov 20 2026 lacamar - 3.9.6-1 - Skip -U bumps to unpublished GitHub releases * Fri Nov 20 2026 lacamar - 3.9.5-1 - Fix -U patch check for specs that grep %{_specdir} * Wed Nov 18 2026 lacamar - 3.9.4-1 - Rank path-scoped tags after plain tags - Record update hook stderr in failures * Tue Nov 17 2026 lacamar - 3.9.3-1 - Retry source downloads on connection resets * Tue Nov 17 2026 lacamar - 3.9.2-1 - Route a directly passed autobuild/ dir * Mon Nov 16 2026 lacamar - 3.9.1-1 - xz-pack COPR scripts over 4 kB - --autofix: bump Release on fixes * Mon Nov 16 2026 lacamar - 3.9.0-1 - -U: .update hook replaces tag/commit check * Mon Nov 16 2026 lacamar - 3.8.2-1 - Fall back to local SRPM when COPR script exceeds 4 kB * Mon Nov 16 2026 lacamar - 3.8.1-1 - Build SRPMs on COPR via custom method - Log SRPM-step failures - Tag hook: accept tag on identical spec * Mon Nov 16 2026 lacamar - 3.7.3-1 - No notification for successful SRPM builds * Mon Nov 16 2026 lacamar - 3.7.2-1 - --autofix: read claude token from imported credential - Timer imports claude-oauth-token credential * Sun Nov 15 2026 lacamar - 3.7.1-1 - No notification on patch failures - Keep -S/--copr-wait in -U retry command * Sun Nov 15 2026 lacamar - 3.7.0-1 - -U honours -P - Rebuild specs lacking a live COPR build - Per-repo git lock - Clean isolated chroots - --copr-wait: state changes, 30s poll, give-up - Timer: -P 4 * Sun Nov 15 2026 lacamar - 3.6.1-1 - --autofix: pass prompt to claude on stdin - Retry upstream git lookups on network errors * Sun Nov 15 2026 lacamar - 3.6.0-1 - Skip tag lookup when upstream is the own repo - Forward interrupt to mock on non-tty runs - Expire notify-send action waiters after 1h - Timer runs -U -S --copr-wait --autofix - Test COPR upload request shape * Sun Nov 15 2026 lacamar - 3.5.0-1 - Add --fetch-only - Reset Release on tag bump - Re-pin Lua submodule tables on bump * Sun Nov 15 2026 lacamar - 3.4.1-1 - Skip commit hashes and in-name digits in tag versions - Bump Release on commit-only update without bumpver * Sat Nov 14 2026 lacamar - 3.4.0-1 - Wait on COPR builds in parallel at end of run * Sat Nov 14 2026 lacamar - 3.3.0-1 - Add --autofix flag - Drop mx-rpm-autofix script * Fri Nov 13 2026 lacamar - 3.2.0-1 - Record COPR build and failed-chroot log URLs on failure - Retry command keeps -S and --copr-wait - Autofix reads COPR logs * Fri Nov 13 2026 lacamar - 3.1.1-1 - Resolve codeload.github.com sub-repo sources on --update * Fri Nov 13 2026 lacamar - 3.1.0-1 - Bare -U scans specs/autobuild - COPR owner from ~/.config/copr username * Fri Nov 13 2026 lacamar - 3.0.2-1 - Fix COPR upload: send json as file part * Fri Nov 13 2026 lacamar - 3.0.1-1 - Fetch tags without trees on --update * Fri Nov 13 2026 lacamar - 3.0.0-1 - Rewrite in Rust - Parse specs via rpmspec; COPR v3 API via curl - Drop python3-rpm, python3-copr dependencies * Fri Nov 13 2026 lacamar - 2.5.0-1 - Write JSON failure records to failures.json - Print summary on --update runs - Add mx-rpm-autofix daily timer: update, then Claude files and fixes beads * Thu Nov 12 2026 lacamar - 2.4.6-1 - Add rpm-build, rpmdevtools BuildRequires * Thu Nov 12 2026 lacamar - 2.4.5-1 - Bump secondary %%global _commit pins on --update * Thu Nov 12 2026 lacamar - 2.4.4-1 - Skip --update tag bumps to older versions * Mon Oct 26 2026 lacamar - 2.4.3-1 - Lint fixes * Thu Oct 22 2026 Lachlan Marie - 2.4.2-1 - Honor "# copr-exclude-chroots:" spec line * Mon Oct 19 2026 Lachlan Marie - 2.4.1-1 - Serialize mock runs per chroot * Mon Oct 19 2026 Lachlan Marie - 2.4.0-1 - Add --tag / mxrpm.tag - Help text for all flags - Per-chroot COPR results - Lock concurrent COPR submits - -S --copr-wait --install from COPR - Fix changelog bullet indent * Tue Oct 13 2026 Lachlan Marie - 2.3.3-1 - Fix -P dropping default addrepos - Ctrl-C stops mock under pty - COPR failure fails the run - Re-upload after failed COPR build - Restore spec on update crash - Complete -i/--install * Fri Oct 09 2026 Lachlan Marie - 2.3.2-1 - Bare --copr name uses COPR_OWNER - check-patches names the failing patch * Fri Oct 09 2026 Lachlan Marie - 2.3.1-1 - Fix notification action buttons - Open files with gio, drop xdg-utils * Fri Oct 02 2026 Lachlan Marie - 2.3.0-1 - Drop requests, download via curl - Use copr.v3 wait() for --copr-wait - Remove dead code and dry-run paths * Fri Oct 02 2026 Lachlan Marie - 2.2.0-2 - BuildRequire git-core for tests * Fri Oct 02 2026 Lachlan Marie - 2.2.0-1 - Check patches apply before --update builds - Add --check-patches * Sun Aug 30 2026 Lachlan Marie - 2.1.0-2 - A plain (non -P) build that hits mock's "Build root is locked" error now retries once with an isolated buildroot (--uniqueext), so two separate mx-rpm invocations targeting the same chroot actually build concurrently instead of one just failing. - New --copr-upload-only flag resubmits the most recently built SRPM to --copr PROJECT without rebuilding. - Fixed a latent bug where rpm's process-global macro table leaked a %%global set while parsing one spec into the next spec parsed in the same process, corrupting its Source0/URL macro expansion. - --update can now rewrite an opt-in %%global tag_ref line alongside the numeric-normalized %%global tag. - --install now falls back to `dnf reinstall` when the freshly built RPM's NVRA is unchanged from what's already installed - `dnf install` was silently no-op'ing in that case and leaving the old bits in place (confirmed live: installing this exact package after code changes but no Release bump didn't actually update /usr/bin/mx-rpm, and separately left two same-NVRA builds with different content sitting in the lacamar/ arm64-misc COPR repo at once). * Tue Aug 18 2026 Lachlan Marie - 2.1.0-1 - Handle concurrent builds against the same mock chroot: -P N now gives each concurrently-building package its own isolated buildroot (mock --uniqueext), confirmed live with a real -P 2 build (two packages building at once, each in its own bootstrap dir). Separately, if two builds do collide on the exact same chroot+package, mock's own "Build root is locked" failure is now caught and turned into a distinct "chroot busy, not a build failure" skip (with its own desktop notification and summary bucket) instead of a raw error. Also fixes a latent bug found while testing this: a local (no-URL-scheme) Source that's actually missing was silently reported as fetched-OK instead of failing mx-rpm's own pre-flight check. - Fixed this spec's own %%install: %%pyproject_save_files leaves the shell cwd somewhere other than the extracted source tree, so the bash- completion/autobuild-wrapper install lines needed absolute paths; and %%pyproject_save_files doesn't capture the console_scripts binary itself, so %%{_bindir}/mx-rpm needed to be listed in %%files explicitly. Both found via a real mock build, not rpmspec -P/rpmlint. * Tue Aug 18 2026 Lachlan Marie - 2.0.0-1 - Initial packaging of the Python reimplementation (see CLAUDE.md for the full rationale): own source downloader replacing a broken spectool copy, COPR uploads via the copr.v3 API instead of copr-cli + HTML-scrape dedup, PTY output passthrough via the stdlib pty module instead of `script`, and autobuild's upstream tag/commit-check-and-build folded in as --update.