Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 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 @@ -222,6 +222,7 @@
"fakechroot",
"fakeroot",
"fdupes",
"fedora-messaging",
"fence-virt",
"fetchmail",
"fftw",
Expand Down Expand Up @@ -1677,6 +1678,7 @@
"python-conda-package-streaming",
"python-configshell",
"python-cpuinfo",
"python-crochet",
"python-cups",
"python-curio",
"python-cytoolz",
Expand Down Expand Up @@ -1746,6 +1748,7 @@
"python-kdcproxy",
"python-kerberos",
"python-kmod",
"python-koji-fedoramessaging-messages",
"python-kubernetes",
"python-lark",
"python-lazy-object-proxy",
Expand Down Expand Up @@ -1780,6 +1783,7 @@
"python-pathspec",
"python-pefile",
"python-pexpect",
"python-pika",
"python-pkgconfig",
"python-platformdirs",
"python-pluggy",
Expand Down Expand Up @@ -1839,6 +1843,7 @@
"python-schedutils",
"python-scikit-build-core",
"python-semantic_version",
"python-service-identity",
"python-should_dsl",
"python-simpleline",
"python-slip",
Expand Down Expand Up @@ -3182,6 +3187,7 @@
"coreos-cloudinit",
"coreos-init",
"ignition-flatcar",
"koji-fedoramessaging",
"python-nocaselist",
"rust-afterburn",
"update-ssh-keys"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Signatures": {"fedora_messaging-3.9.0.tar.gz": "7eb861ff4404a8dcba4f11590874a66124cb4db32b7ff65356af6ffb0e3b0647"}}
115 changes: 115 additions & 0 deletions SPECS-EXTENDED/fedora-messaging/fedora-messaging.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Don't add -s to Python shebang. fedora-messaging must be able to load
# plugins from /usr/local; see https://bugzilla.redhat.com/show_bug.cgi?id=2272526
%undefine _py3_shebang_s

%global pkgname fedora-messaging
%global srcname fedora_messaging

Name: %{pkgname}
Version: 3.9.0
Release: 1%{?dist}
Summary: Set of tools for using Fedora's messaging infrastructure
Vendor: Microsoft Corporation
Distribution: Azure Linux
License: GPL-2.0-or-later
URL: https://github.com/fedora-infra/fedora-messaging
Source0: %{url}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz

BuildArch: noarch

BuildRequires: pyproject-rpm-macros
BuildRequires: python3-devel
BuildRequires: python3-pip
BuildRequires: python3-poetry-core
BuildRequires: systemd-rpm-macros

# Runtime dependencies needed for the offline-safe unit test subset in %%check.
BuildRequires: python3-blinker
BuildRequires: python3-click
BuildRequires: python3-crochet
BuildRequires: python3-jsonschema
BuildRequires: python3-pika
BuildRequires: python3-pyOpenSSL
BuildRequires: python3-pytest
BuildRequires: python3-requests
BuildRequires: python3-service-identity
BuildRequires: python3-tomli
BuildRequires: python3-twisted
# Twisted imports typing_extensions but python3-twisted does not pull it into
# the minimal %%check chroot; required for the offline unit tests that import
# the package's Twisted-based modules.
BuildRequires: python3-typing-extensions

Requires: python3-%{pkgname} = %{version}-%{release}

%global _description %{expand:
Tools and APIs to make working with AMQP in Fedora easier.}

%description %{_description}

%package -n python3-%{pkgname}
Summary: %{summary}
Requires: python3-blinker
Requires: python3-click
Requires: python3-crochet
Requires: python3-jsonschema
Requires: python3-pika
Requires: python3-pyOpenSSL
Requires: python3-requests
Requires: python3-service-identity
Requires: python3-tomli
Requires: python3-twisted
%{?python_provide:%python_provide python3-%{pkgname}}

%description -n python3-%{pkgname} %{_description}

%prep
%autosetup -n %{srcname}-%{version} -p0

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{srcname}
# Azure Linux ships only the generic example config. The Fedora-specific
# broker connection profiles (fedora.toml, fedora.stg.toml) and their
# bundled certificate/key files are intentionally omitted: they point at
# Fedora's public broker and are irrelevant to the Azure Linux Koji message
# bus, which is configured for its own in-cluster broker via site config.
install -D -p -m 0644 config.toml.example %{buildroot}%{_sysconfdir}/fedora-messaging/config.toml
install -D -p -m 0644 fm-consumer@.service %{buildroot}%{_unitdir}/fm-consumer@.service

%check
%pyproject_check_import -e '*.api' -e '*.cli'
# Only run the offline unit tests that do not import the Twisted reactor.
# tests/unit/test_cli.py, test_example.py and test_testing.py pull in
# fedora_messaging.api/cli, which import the Twisted reactor and therefore
# require Automat -- a Twisted runtime dependency that is not available as an
# RPM in the Azure Linux build environment (upstream Twisted pip-installs it
# in its own test venv). The retained tests cover configuration parsing,
# message schema/validation, and schema utilities.
%pytest -vv \
tests/unit/test_config.py \
tests/unit/test_message.py \
tests/unit/test_schema_utils.py

%files
%license LICENSES/GPL-2.0-or-later.txt
%doc README.rst
%dir %{_sysconfdir}/fedora-messaging/
%config(noreplace) %{_sysconfdir}/fedora-messaging/config.toml
%{_bindir}/fedora-messaging
%{_unitdir}/fm-consumer@.service

%files -n python3-%{pkgname} -f %{pyproject_files}
%license %{python3_sitelib}/%{srcname}-%{version}.dist-info/LICENSES/GPL-2.0-or-later.txt

%changelog
* Thu Jun 11 2026 Adit Jha <aditjha@microsoft.com> - 3.9.0-1
- Initial Azure Linux import from Fedora 41 (license: MIT).
- License verified.
- Omit Fedora-specific broker profiles (fedora.toml, fedora.stg.toml) and bundled cert/key files; ship only the generic example config.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Signatures": {
"koji-fedoramessaging-1.1.2.tar.gz": "2807bd3896ae429c38d479f1403bb08812f72131e3476f61f271203883853dc2"
}
}
57 changes: 57 additions & 0 deletions SPECS-EXTENDED/koji-fedoramessaging/koji-fedoramessaging.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
%global plugin_dir %{_prefix}/lib/koji-hub-plugins

Name: koji-fedoramessaging
Version: 1.1.2
Release: 1%{?dist}
Summary: Enable Koji to send Fedora Messaging messages
License: GPL-3.0-only
Vendor: Microsoft Corporation
Distribution: Azure Linux
URL: https://github.com/fedora-infra/koji-fedoramessaging
Source0: %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz

BuildArch: noarch
BuildRequires: python3-devel

Requires: python3-koji-hub
Requires: python3-fedora-messaging
Requires: python3-koji-fedoramessaging-messages

%description
Enable Koji to send Fedora Messaging messages.

%prep
%autosetup -p1

%build

%install
install -D -p -m 0644 koji-fedoramessaging/koji-fedoramessaging.py \
%{buildroot}%{plugin_dir}/koji_fedoramessaging.py
%py_byte_compile %{__python3} %{buildroot}%{plugin_dir}

%files
%dir %{plugin_dir}
%{plugin_dir}/koji_fedoramessaging.py
%{plugin_dir}/__pycache__/*
%doc README.md

%changelog
* Thu Jun 11 2026 Adit Jha <aditjha@microsoft.com> - 1.1.2-1
- Initial Azure Linux import from the source project (license: same as "License" tag).
- License verified.

* Mon Jun 12 2023 Aurelien Bompard <abompard@fedoraproject.org> - 1.1.2-1
- The files_base_url is only relevant for build and task state changes

* Fri Jun 09 2023 Aurelien Bompard <abompard@fedoraproject.org> - 1.1.1-1
- Don't call get_message_body() needlessly

* Fri Jun 09 2023 Aurelien Bompard <abompard@fedoraproject.org> - 1.1.0-1
- Add more data in the task and build state change messages

* Thu Feb 09 2023 Ryan Lerch <rlerch@redhat.com> - 1.0.1-1
- Tweak logging so kojihub logger can find the logs

* Tue Feb 07 2023 Ryan Lerch <rlerch@redhat.com> - 1.0-1
- Initial Release
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Signatures": {
"crochet-2.1.1.tar.gz": "7ece69de1ce8e63ffc0af8e2331ec4eb898d91ed4271aafa4ccc398523b81cf9"
}
}
87 changes: 87 additions & 0 deletions SPECS-EXTENDED/python-crochet/python-crochet.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
Vendor: Microsoft Corporation
Distribution: Azure Linux

%bcond_without check

%global pypi_name crochet

Name: python-%{pypi_name}
Version: 2.1.1
Release: 1%{?dist}
Summary: A library that makes it easier to use Twisted from blocking code
License: MIT
URL: https://github.com/itamarst/crochet
Source0: https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch

BuildRequires: pyproject-rpm-macros
BuildRequires: python3-devel
BuildRequires: python3-pip
BuildRequires: python3-setuptools
BuildRequires: python3-wheel

%if %{with check}
BuildRequires: python3-twisted
# Twisted imports typing_extensions at runtime but python3-twisted does not
# pull it into the minimal %%check chroot, so require it explicitly for the
# import check.
BuildRequires: python3-typing-extensions
BuildRequires: python3-wrapt
%endif

%global _description %{expand:
Crochet is an MIT-licensed library that makes it easier to use Twisted from
regular blocking code. Some use cases include:

* Easily use Twisted from a blocking framework like Django or Flask.
* Write a library that provides a blocking API, but uses Twisted for its
implementation.
* Port blocking code to Twisted more easily, by keeping a backwards
compatibility layer.
* Allow normal Twisted programs that use threads to interact with Twisted more
cleanly from their threaded parts.}

%description %_description

%package -n python3-%{pypi_name}
Summary: %{summary}
Requires: python3-twisted
Requires: python3-wrapt
%{?python_provide:%python_provide python3-%{pypi_name}}

%description -n python3-%{pypi_name} %_description

%prep
%autosetup -p1 -n %{pypi_name}-%{version}
sed -i -e 's/configparser.SafeConfigParser()/configparser.ConfigParser()/' \
-e 's/parser.readfp(f)/parser.read_file(f)/' versioneer.py

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

%if %{with check}
%check
# Upstream ships its unit tests inside the crochet.tests subpackage, but the
# built wheel does not install that subpackage, so 'unittest discover
# crochet.tests' is not importable in the build root. Fall back to verifying
# the module imports cleanly with its real dependencies (Twisted, wrapt).
# Exclude crochet.mypy: it is an optional mypy type-checker plugin that
# imports mypy, which is not a runtime dependency.
%pyproject_check_import -e '*.mypy'
%endif

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.rst docs/news.rst

%changelog
* Thu Jun 11 2026 Adit Jha <aditjha@microsoft.com> - 2.1.1-1
- Initial Azure Linux import from Fedora 41 (license: MIT).
- License verified.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Signatures": {
"koji-fedoramessaging-messages-1.3.0.tar.gz": "69119ae3e47055edf7dc3418a063484cf57d658c9550e44b1d67a3eacf7b9424"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
%global srcname koji-fedoramessaging-messages
%global modname koji_fedoramessaging_messages

%bcond_without check

Name: python-koji-fedoramessaging-messages
Version: 1.3.0
Release: 1%{?dist}
Summary: A schema package for koji-fedoramessaging
Vendor: Microsoft Corporation
Distribution: Azure Linux
License: GPL-3.0-or-later
URL: https://github.com/fedora-infra/%{srcname}
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
BuildArch: noarch

BuildRequires: pyproject-rpm-macros
BuildRequires: python3-devel
BuildRequires: python3-pip
BuildRequires: python3-poetry-core
%if %{with check}
BuildRequires: python3-fedora-messaging
BuildRequires: python3-pytest
%endif

%global _description %{expand:
A schema package for koji-fedoramessaging, the fedora-messaging
plugin for Koji.}

%description %{_description}

%package -n python3-%{srcname}
Summary: %{summary}
Requires: python3-fedora-messaging
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname} %{_description}

%prep
%autosetup -p1 -n %{srcname}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{modname}

%if %{with check}
%check
# Three schema-validation tests reference the koji "task_info" definition via
# JSON Schema 2019-09 "$defs"/"$anchor" keywords. Azure Linux ships
# python-jsonschema 2.6.0 (draft-07 era), which cannot resolve those
# references and raises RefResolutionError. Deselect the affected tests; the
# remaining 27 tests (covering the other message schemas) pass.
%pytest -k "not (test_build_state_change_livecd or test_rpm_sign_message or test_task_state_change_message)"
%endif

%files -n python3-%{srcname} -f %{pyproject_files}
%license %{python3_sitelib}/%{modname}-%{version}.dist-info/LICENSES/GPL-3.0-or-later.txt
%doc README.md

%changelog
* Thu Jun 11 2026 Adit Jha <aditjha@microsoft.com> - 1.3.0-1
- Initial Azure Linux import from Fedora 41 (license: MIT).
- License verified.
Loading