Skip to content
2 changes: 1 addition & 1 deletion LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions LICENSES-AND-NOTICES/SPECS/data/licenses.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@
"calamares",
"capnproto",
"capstone",
"cargo-rpm-macros",
"cargo2rpm",
"catatonit",
"catch",
"catch1",
Expand Down Expand Up @@ -1697,6 +1699,7 @@
"python-evdev",
"python-extras",
"python-faker",
"python-fastbencode",
"python-fasteners",
"python-fastjsonschema",
"python-fields",
Expand Down Expand Up @@ -1774,6 +1777,7 @@
"python-oslo-sphinx",
"python-paramiko",
"python-pathspec",
"python-patiencediff",
"python-pefile",
"python-pexpect",
"python-pkgconfig",
Expand Down Expand Up @@ -1833,6 +1837,8 @@
"python-schedutils",
"python-scikit-build-core",
"python-semantic_version",
"python-setuptools-gettext",
"python-setuptools-rust",
"python-should_dsl",
"python-simpleline",
"python-slip",
Expand Down
38 changes: 38 additions & 0 deletions SPECS-EXTENDED/breezy/0001-fix-license-pep621.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

From 8ef4c35 Mon Sep 17 00:00:00 2001
From: Akarsh Chaudhary <akarsh@example.com>
Date: Thu, 8 Jan 2026 14:35:00 +0530
Subject: [PATCH] Fix pyproject license field for PEP621 compliance

PEP 621 does NOT allow a raw string for the `license` field.
It must be either:

license = { text = "…" }
OR
license = { file = "…" }

Azure Linux enforces strict setuptools validation, causing metadata
generation to fail.

This patch converts the invalid string license to a correct table format.

---
pyproject.toml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 1234567..abcdef0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -12,7 +12,8 @@ maintainers = [{name = "Breezy Developers", email = "team@breezy-vcs.org"}]
description = "Friendly distributed version control system"
readme = "README.rst"
-license = "GPL-2.0-or-later"
+# PEP621 requires license to be a table, not a string
+license = { text = "GPL-2.0-or-later" }

classifiers = [
"Development Status :: 6 - Mature",

--
2.34.1
6 changes: 3 additions & 3 deletions SPECS-EXTENDED/breezy/breezy.signatures.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Signatures": {
"breezy-3.0.2.tar.gz": "50f16bc7faf299f98fe58573da55b0664078f94b1a0e7f0ce9e1e6a0d47e68e0",
"breezy-3.0.2.tar.gz.asc": "740ac22ac6f66175ea89e660875660f0aa1c4d79dd2300497c203f3851bfb6fb",
"brz-icon-64.png": "b0ba52d07ffcd558a276053bf7c916dd9f1af4e162060367977129f3d6117ec6"
"brz-3.3.17.tar.gz": "87aa018059e94debf8a6bf27117f36570e89d412a467d2bc6a31fecb374110f5",
"brz-icon-64.png": "b0ba52d07ffcd558a276053bf7c916dd9f1af4e162060367977129f3d6117ec6",
"lib-rio-vendor.tar.gz": "aa68c3854e35d44f9e5a736c1be124a3e6c7967b57c26b85765e595bfa83dc04"
}
}
189 changes: 106 additions & 83 deletions SPECS-EXTENDED/breezy/breezy.spec
Original file line number Diff line number Diff line change
@@ -1,169 +1,192 @@
Vendor: Microsoft Corporation
Distribution: Azure Linux
# All package versioning is found here:
# the actual version is composed from these below, including leading 0 for release candidates
# the actual version is composed from these below
# bzrmajor: main bzr version
# Version: bzr version, add subrelease version here
# bzrrc: release candidate version, if any, line starts with % for rc, # for stable releas (no %).
%global brzmajor 3.0
%global brzminor .2
#global brzrc b6

# https://fedoraproject.org/wiki/Changes/ReplaceBazaarWithBreezy

%bcond_without replace_bzr




%global brzmajor 3.3
%global brzminor .17

Name: breezy
Version: %{brzmajor}%{?brzminor}
Release: 3%{?dist}
Release: 2%{?dist}
Summary: Friendly distributed version control system

License: GPLv2+
URL: https://launchpad.net/brz
Source0: https://launchpad.net/brz/%{brzmajor}/%{version}%{?brzrc}/+download/%{name}-%{version}%{?brzrc}.tar.gz
Source1: https://launchpad.net/brz/%{brzmajor}/%{version}%{?brzrc}/+download/%{name}-%{version}%{?brzrc}.tar.gz.asc
Source2: brz-icon-64.png
# breezy is GPL-2.0-or-later, but it has Rust dependencies
# see packaged LICENSE.dependencies for details
License: GPL-2.0-or-later AND (MIT OR Apache-2.0) AND Unicode-DFS-2016 AND MIT AND (Unlicense OR MIT)
URL: http://www.breezy-vcs.org/
Source0: https://github.com/breezy-team/breezy/archive/brz-%{version}%{?brzrc}.tar.gz
Source1: brz-icon-64.png
Source50: lib-rio-vendor.tar.gz

BuildRequires: python3-devel
BuildRequires: python3-configobj
BuildRequires: python3-Cython
BuildRequires: python3-sphinx
BuildRequires: python3-sphinx-epytext
BuildRequires: python3-setuptools
BuildRequires: python3-pip
BuildRequires: python3-setuptools-rust
BuildRequires: cargo-rpm-macros >= 21
BuildRequires: cargo2rpm
BuildRequires: zlib-devel
BuildRequires: bash-completion
BuildRequires: gcc
BuildRequires: gettext

Requires: python3-paramiko
BuildRequires: python3-setuptools-gettext
BuildRequires: python3-wheel
BuildRequires: python3-semantic_version
BuildRequires: python3-configobj
BuildRequires: python3-yaml
BuildRequires: python3-fastbencode
BuildRequires: python3-dulwich
BuildRequires: python3-patiencediff
BuildRequires: make
BuildRequires: netavark
BuildRequires: python3-sphinx

# This is the name of the command, note that it is brz, not bzr
Provides: brz = %{version}-%{release}

%if %{with replace_bzr}
# breezy is a fork of bzr and replaces it
Provides: bzr = %{version}-%{release}
Obsoletes: bzr < 3
Provides: git-remote-bzr = %{version}-%{release}
Obsoletes: git-remote-bzr < 3
%endif

# This is needed for launchpad support
Recommends: python3-launchpadlib

# Docs are not needed, but some might want them
Suggests: %{name}-doc = %{version}-%{release}

%description
Breezy (brz) is a decentralized revision control system, designed to be easy
for developers and end users alike.

By default, Breezy provides support for both the Bazaar and Git file formats.


%package doc
Summary: Documentation for Breezy
BuildArch: noarch
%prep
%autosetup -p1 -n %{name}-brz-%{version}%{?brzrc}

# Unpack vendored Rust deps for lib-rio (offline build)
tar -xzf %{SOURCE50} -C lib-rio

%description doc
This package contains the documentation for the Breezy version control system.
# Place workspace lockfile at repo root where cargo expects it
cp -f lib-rio/Cargo.lock .

%prep
%autosetup -p0 -n %{name}-%{version}%{?brzrc}
ln -snf lib-rio/vendor vendor

%{__sed} -i -E 's|^license[[:space:]]*=[[:space:]]*"GPL-2\.0(-or-later)?"|license = { text = "GPL-2.0-or-later" }|' pyproject.toml

%cargo_prep
# Fix invalid TOML caused by unquoted RPM macros in Cargo config
if [ -f .cargo/config.toml ]; then
%{__sed} -i -E 's|^([[:space:]]*opt-level[[:space:]]*=[[:space:]]*)([^"#][^#[:space:]]*)|\1"\2"|' .cargo/config.toml
%{__sed} -i -E 's|^([[:space:]]*codegen-units[[:space:]]*=[[:space:]]*)([^"#][^#[:space:]]*)|\1"\2"|' .cargo/config.toml
%{__sed} -i -E 's|^([[:space:]]*lto[[:space:]]*=[[:space:]]*)([^"#][^#[:space:]]*)|\1"\2"|' .cargo/config.toml
%{__sed} -i -E 's|^([[:space:]]*debug[[:space:]]*=[[:space:]]*)([^"#][^#[:space:]]*)|\1"\2"|' .cargo/config.toml
fi
# Remove unused shebangs
sed -i '1{/#![[:space:]]*\/usr\/bin\/\(python\|env\)/d}' \
breezy/_patiencediff_py.py \
breezy/__main__.py \
breezy/git/git_remote_helper.py \
breezy/git/tests/test_git_remote_helper.py \
breezy/patiencediff.py \
breezy/plugins/bash_completion/bashcomp.py \
breezy/plugins/zsh_completion/zshcomp.py \
breezy/tests/ssl_certs/create_ssls.py \
contrib/brz_access

# Remove Cython generated .c files
find . -name '*_pyx.c' -exec rm \{\} \;
sed -i 's/Strip.All/Strip.No/' setup.py

mkdir -p .cargo
cat > .cargo/config.toml <<'EOF'
[source.crates-io]
replace-with = "vendored-sources"

[source.vendored-sources]
directory = "vendor"

[build]
rustc = "/usr/bin/rustc"
rustdoc = "/usr/bin/rustdoc"

[target.x86_64-unknown-linux-gnu]
linker = "/usr/bin/cc"
EOF

%build
%py3_build
export RUSTC=/usr/bin/rustc
export CARGO=/usr/bin/cargo
export RUSTDOC=/usr/bin/rustdoc
export CARGO_NET_OFFLINE=true

%pyproject_wheel

chmod a-x contrib/bash/brzbashprompt.sh

# Build documents
make docs-sphinx PYTHON=%{__python3}
rm doc/*/_build/html/.buildinfo
rm -f doc/*/_build/html/_static/*/Makefile
pushd doc
for dir in *; do
test -d $dir/_build/html && mv $dir/_build/html ../$dir
done
popd
# Generate man pages
%{__python3} tools/generate_docs.py man

# Add Rust licenses
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies

%install
%py3_install
%pyproject_install
%pyproject_save_files breezy
chmod -R a+rX contrib
chmod 0644 contrib/debian/init.d
chmod 0644 contrib/bzr_ssh_path_limiter # note the bzr here
chmod 0644 contrib/brz_access
chmod 0755 %{buildroot}%{python3_sitearch}/%{name}/*.so
find %{buildroot}%{python3_sitearch}/%{name}/ -name '*.so' -exec chmod 0755 {} \;

bashcompdir=$(pkg-config --variable=completionsdir bash-completion)
install -Dpm 0644 contrib/bash/brz %{buildroot}$bashcompdir/brz
install -Dpm 0644 contrib/bash/brz %{buildroot}%{_sysconfdir}/bash_completion.d/brz
rm contrib/bash/brz

install -d %{buildroot}%{_datadir}/pixmaps
install -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/brz.png
install -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/brz.png

# weird man page location
mv %{buildroot}%{_prefix}/man %{buildroot}%{_datadir}
# Install man pages manually
install -d %{buildroot}%{_mandir}/man1
[ -f brz.1 ] && install -m 0644 brz.1 %{buildroot}%{_mandir}/man1/
[ -f breezy/git/git-remote-bzr.1 ] && install -m 0644 breezy/git/git-remote-bzr.1 %{buildroot}%{_mandir}/man1/

# move git-remote-bzr to avoid conflict
mv %{buildroot}%{_bindir}/git-remote-bzr %{buildroot}%{_bindir}/git-remote-brz
mv %{buildroot}%{_mandir}/man1/git-remote-bzr.1 %{buildroot}%{_mandir}/man1/git-remote-brz.1

%if %{with replace_bzr}
# backwards compatible symbolic links
ln -s brz %{buildroot}%{_bindir}/bzr
ln -s git-remote-brz %{buildroot}%{_bindir}/git-remote-bzr
echo ".so man1/brz.1" > %{buildroot}%{_mandir}/man1/bzr.1
echo ".so man1/git-remote-brz.1" > %{buildroot}%{_mandir}/man1/git-remote-bzr.1
%endif



# locales: all the .po files have empty msgstrs, so this doesn't do anything
#mv %%{name}/locale %%{buildroot}%%{_datadir}
#%%find_lang %%{name}


%files
# ... -f %%{name}.lang
%license COPYING.txt
# With older versions of setuptools-gettext, locales are generated to a weird
# directory; move them to datadir.
if [ -d %{buildroot}%{buildroot}%{_datadir}/locale ]
then
mv %{buildroot}%{buildroot}%{_datadir}/locale %{buildroot}%{_datadir}
fi
%find_lang %{name}
cat %{name}.lang >> %{pyproject_files}

%check
# for now, at least run a basic smoke test to prevent undetected major breakages
# like https://bugzilla.redhat.com/2366194
export %{py3_test_envvars}
brz init-repo testrepo

%files -f %{pyproject_files}
# %license LICENSE.dependencies
%doc NEWS README.rst TODO contrib/
%{_bindir}/brz
%{_bindir}/bzr-*-pack
%{_bindir}/git-remote-brz
%if %{with replace_bzr}
%{_bindir}/bzr
%{_bindir}/git-remote-bzr
%endif
%{_mandir}/man1/*
%{python3_sitearch}/%{name}/
%{python3_sitearch}/*.egg-info/
%{_datadir}/bash-completion/
%{_sysconfdir}/bash_completion.d/brz
%{_datadir}/pixmaps/brz.png


%files doc
%license COPYING.txt
%doc en developers


%changelog
* Sat Dec 20 2025 Akarsh Chaudhary <v-akarshc@microsoft.com> - 3.3.17-1
- Upgrade to version 3.3.17 (license: MIT).
- License verified

* Thu Oct 14 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 3.0.2-3
- Initial CBL-Mariner import from Fedora 32 (license: MIT).
- Converting the 'Release' tag to the '[number].[distribution]' format.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From c1cb014722147a3373a7d7ebbf99781cbb335cbf Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Fri, 13 Oct 2023 00:31:15 +0200
Subject: [PATCH] Temporarily accept cargo_prep -V flag for spec compatibiltiy
with RHEL

---
macros.d/macros.cargo | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/macros.d/macros.cargo b/macros.d/macros.cargo
index e99f5a6..05159d8 100644
--- a/macros.d/macros.cargo
+++ b/macros.d/macros.cargo
@@ -54,7 +54,8 @@
# -v <directory> - use vendored sources from <directory> instead of
# %%cargo_registry
# -N - Don't set up any registry. Only set up the build configuration.
-%cargo_prep(v:N)\
+%cargo_prep(V:v:N)\
+%{-V:%{?fedora:%{error:The -V flag for cargo_prep is not supported in Fedora}}}\
%{-v:%{-N:%{error:-v and -N are mutually exclusive!}}}\
(\
set -euo pipefail\
--
2.41.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Signatures": {
"v28.4.tar.gz": "7fdb64171a37b45869d16c04efbf0620a0e9045137fbc12d4d123d1c6ed108e1"
}
}
Loading
Loading