%bcond check 1 Name: jj Version: 0.43.0 Release: 1%{?dist} Summary: Git-compatible distributed version control system # Cumulative SPDX over jj-cli and every statically-linked crate # (cargo2rpm license-summary over the default feature set). License: Apache-2.0 AND BSD-3-Clause AND MIT AND MPL-2.0 AND WTFPL AND Zlib AND (Apache-2.0 OR MIT) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR BSL-1.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR LGPL-2.1-or-later) AND (MIT OR Apache-2.0 OR Zlib) AND ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND ((MIT OR Apache-2.0) AND Unicode-3.0) AND ((MIT OR Apache-2.0) AND Unicode-DFS-2016) AND (MIT AND Unicode-DFS-2016) URL: https://github.com/jj-vcs/jj Source0: %{url}/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz Source1: %{name}-%{version}-vendor.tar.xz ExclusiveArch: %{rust_arches} BuildRequires: cargo-rpm-macros >= 24 # Vendoring turns off %%cargo_generate_buildrequires; the only native code in the # tree is mimalloc's bundled C allocator (libmimalloc-sys), so gcc is the sole # build dep -- git backend is gix and zlib is zlib-rs, both pure Rust. BuildRequires: gcc %description Jujutsu (jj) is a Git-compatible distributed version control system. It records the working copy as a commit, tracks every operation for undo, resolves conflicts lazily as first-class objects, and works directly against existing Git repositories and remotes. %prep %autosetup -n %{name}-%{version} -p1 tar -xJf %{SOURCE1} %cargo_prep -v vendor %build # Build only the CLI (jj-cli, binary `jj`); the workspace also holds jj-lib and # internal proc-macro/testutils crates that are not shipped separately. %cargo_build -- -p jj-cli %{cargo_vendor_manifest} # docs/ carries three symlinks pointing outside the tree; dereference them so # %%doc ships real files instead of dangling links. rm docs/config-schema.json docs/revsets.toml docs/governance/GOVERNANCE.md cp -p cli/src/config-schema.json docs/config-schema.json cp -p cli/src/config/revsets.toml docs/revsets.toml cp -p GOVERNANCE.md docs/governance/GOVERNANCE.md %install install -Dpm0755 target/rpm/%{name} %{buildroot}%{_bindir}/%{name} # Emits one man page per (sub)command, hence the jj*.1* glob in %%files. target/rpm/%{name} util install-man-pages %{buildroot}%{_mandir} # Completions are emitted by the freshly built binary (no Source file, no # Requires on the shell). install -d %{buildroot}%{bash_completions_dir} \ %{buildroot}%{zsh_completions_dir} \ %{buildroot}%{fish_completions_dir} target/rpm/%{name} util completion bash > %{buildroot}%{bash_completions_dir}/%{name} target/rpm/%{name} util completion zsh > %{buildroot}%{zsh_completions_dir}/_%{name} target/rpm/%{name} util completion fish > %{buildroot}%{fish_completions_dir}/%{name}.fish %check %if %{with check} # The suite drives the binary against a cargo dev layout with the test-fakes # helper binaries, so smoke-test the installed binary instead. %{buildroot}%{_bindir}/%{name} --version %endif %files %license LICENSE %license cargo-vendor.txt %doc README.md CHANGELOG.md # End-user docs: tutorial, config, revsets, templates, FAQ, git comparison, etc. %doc docs %{_bindir}/%{name} %{_mandir}/man1/%{name}*.1* %{bash_completions_dir}/%{name} %{zsh_completions_dir}/_%{name} %{fish_completions_dir}/%{name}.fish %changelog * Mon Jul 06 2026 Bahtiar `kalkin-` Gadimov - 0.43.0-1 - Initial package