# nautilus-git-operations.spec # # Packaging for the upstream project: # https://github.com/SimBoi/nautilus-git-operations # # The upstream project has NO tags and NO releases. The package is therefore a # snapshot package built from a pinned commit. Per the Fedora "Versioning" # guidelines (snapshots): # * upstream has never chosen a version -> Version: 0 # * the snapshot information is appended to Version after a caret ("^") # in the form . # The sorting field is the monotone integer `snapshot` (commit date # YYYYMMDD + a per-day sequence, e.g. 2025071201), which guarantees that a # later snapshot always sorts strictly higher with the real RPM version # comparison -- even for two commits on the same day whose short hashes do not # sort (a plain field does NOT guarantee this). The # value is computed and persisted by ./update-copr.sh; docs/maintenance.md # documents the procedure. # # Dependency policy (decision of 2026-10-14): the runtime "Requires:" below are # explicit and reviewed by hand. Do NOT add an automatic Python dependency # generator / import scanner. New upstream dependencies are detected by human # review and by the fail-closed guard tests in tests/, then the Requires are # updated manually before any publication. %global commit f260765adc3c99121cc3887c5a371646406b99d2 %global shortcommit f260765 %global commitdate 20250712 %global snapshot 2025071201 %global extensionsdir %{_datadir}/nautilus-python/extensions Name: nautilus-git-operations Version: 0^%{snapshot}.git%{shortcommit} Release: %autorelease Summary: Nautilus context-menu extension for common Git operations License: MIT URL: https://github.com/SimBoi/nautilus-git-operations Source0: %{url}/archive/%{commit}/%{name}-%{commit}.tar.gz BuildArch: noarch BuildRequires: python3 # Runtime dependencies, reviewed manually against the upstream source # (nautilus-git-operations.py): # import gi + require_version('Gtk','4.0') -> python3-gobject-base + gtk4 # from gi.repository import GObject, Adw, Gtk, Nautilus # -> python3-gobject-base (GObject), # libadwaita (Adw-1.typelib), # gtk4 (Gtk-4.0.typelib), # nautilus-python (Nautilus typelib) # subprocess calls to the plain "git" binary -> git-core (/usr/bin/git) # the extension is loaded by Nautilus -> nautilus # python3-polib / curl are NOT used by the code and are intentionally absent. Requires: nautilus Requires: nautilus-python >= 4.0 Requires: python3-gobject-base Requires: gtk4 Requires: libadwaita Requires: git-core # This is a Nautilus (GNOME Files) Python extension: it must not be compiled to # bytecode. Installation is a plain 0644 .py file, like kde-connect-nautilus. # Belt and braces: neutralise the Python byte-compilation and dependency # generators even if python3-rpm-macros is present in the buildroot. %global __brp_python_bytecompile %{nil} %global __python_requires %{nil} %global __python_provides %{nil} %description Nautilus Git Operations adds a "Git" submenu to the Nautilus (GNOME Files) background context menu, offering common Git actions for the current directory: clone, status, switch branch, pull, stage all and commit, push, and saving credentials for a remote host. The extension is implemented in Python with GTK 4 / libadwaita and the Nautilus Python bindings. It calls the system "git" executable for every operation. %prep %autosetup -n %{name}-%{commit} %build # Nothing to build: the extension is installed as-is (pure Python). %check # Fail the build if the frozen upstream file is not the exact revision that was # reviewed and whose dependencies were validated by hand. Update this hash (and # re-review the Requires) whenever the pinned commit changes. echo "bf5cd2e9122ee27dc5240805800d0bcddb1c55a7db18b75916964bf515c9a54b %{name}.py" | sha256sum -c - python3 -c "import ast; ast.parse(open('%{name}.py', encoding='utf-8').read())" %install install -d %{buildroot}%{extensionsdir} install -pm 0644 %{name}.py %{buildroot}%{extensionsdir}/%{name}.py %files %license LICENSE %doc README.md %{extensionsdir}/%{name}.py %changelog * Thu Oct 15 2026 Automated update - 0^2025071201.gitf260765-1 - Snapshot of upstream nautilus-git-operations commit f260765adc3c99121cc3887c5a371646406b99d2 (20250712) * Wed Oct 14 2026 Packaging mission - 0^2025071201.gitf260765-1 - Initial snapshot package from upstream commit f260765adc3c99121cc3887c5a371646406b99d2 - Explicit runtime Requires: nautilus, nautilus-python >= 4.0, python3-gobject-base, gtk4, libadwaita, git-core; no python3-polib, no curl