Name: goose-proxy Version: 0.1.0 Release: 7%{?dist} Summary: A proxy API for RHEL command line assistant License: Apache-2.0 URL: https://github.com/rhel-lightspeed/goose-proxy Source0: goose-proxy-%{version}.tar.gz Source1: goose-proxy-vendor-%{version}.tar.gz BuildArch: noarch # Build dependencies BuildRequires: python3-devel BuildRequires: python3-pip BuildRequires: python3-setuptools BuildRequires: python3-wheel BuildRequires: python3-build BuildRequires: systemd-rpm-macros # Docs dependencies BuildRequires: python3-sphinx %global _description %{expand: A lightweight API translation proxy that bridges Goose with backend servers that speak the Responses API from OpenAI, such as Lightspeed Stack.} %description %_description %prep %autosetup -p1 # Extract vendored wheels tar -xzf %{SOURCE1} -C %{_builddir} # EPEL 10 adaptations - fix pyproject.toml without tomcli sed -i '/^license-files = /d' pyproject.toml sed -i '/^dynamic = /d' pyproject.toml sed -i 's/^name = /version = "%{version}"\nname = /' pyproject.toml sed -i 's/fastapi\[standard-no-fastapi-cloud-cli\]/fastapi/g' pyproject.toml sed -i '/addopts = \[/,/\]/d' pyproject.toml %build # Install vendored deps to temp location for build export VENDORDIR=$(mktemp -d) pip3 install --no-index --find-links=%{_builddir}/vendor-wheels \ --target=$VENDORDIR --no-deps \ fastapi pydantic uvicorn httpx pydantic-core httpcore \ annotated-doc annotated-types click h11 starlette anyio \ idna typing-extensions typing-inspection certifi sniffio # Build wheel with vendored deps available export PYTHONPATH=$VENDORDIR:$PYTHONPATH python3 -m build --wheel --no-isolation # Build the manpages PYTHONPATH=$VENDORDIR sphinx-build -b man docs/man docs/build/man %install # Install main package pip3 install --root=%{buildroot} --no-deps dist/*.whl # Install vendored dependencies pip3 install --root=%{buildroot} --no-index \ --find-links=%{_builddir}/vendor-wheels --no-deps \ fastapi pydantic uvicorn httpx pydantic-core httpcore \ annotated-doc annotated-types click h11 starlette anyio \ idna typing-extensions typing-inspection certifi sniffio # Install the manpages for goose-proxy and goose-proxy-config %{__install} -D -m 0644 docs/build/man/%{name}-config.5 %{buildroot}%{_mandir}/man5/%{name}-config.5 %{__install} -D -m 0644 docs/build/man/%{name}.7 %{buildroot}%{_mandir}/man7/%{name}.7 # System units %{__install} -D -m 0644 data/release/systemd/%{name}.service %{buildroot}/%{_unitdir}/%{name}.service # Config file %{__install} -d -m 0700 %{buildroot}/%{_sysconfdir}/xdg/%{name} %{__install} -D -m 0600 data/release/xdg/config.toml %{buildroot}/%{_sysconfdir}/xdg/%{name}/config.toml # Red Hat specific configs # Install the goose-init shell script inside /etc/profile.d for automatic # placement of the goose-config and custom_goose-proxy on user home directory. %{__install} -Dpm 0755 data/release/goose/goose-init.sh %{buildroot}%{_sysconfdir}/profile.d/goose-init.sh # Install the sources into /usr/share/goose-redhat %{__install} -Dpm 0644 data/release/goose/config.yaml %{buildroot}%{_datadir}/goose-redhat/config.yaml %{__install} -Dpm 0644 data/release/goose/custom_goose-proxy.json %{buildroot}%{_datadir}/goose-redhat/custom_goose-proxy.json %check # Tests disabled for EPEL 10 build : %files %license LICENSE %doc README.md %{_bindir}/goose-proxy %{python3_sitelib}/goose_proxy/ %{python3_sitelib}/goose_proxy-*.dist-info/ # Vendored dependencies %{python3_sitelib}/fastapi/ %{python3_sitelib}/fastapi-*.dist-info/ %{python3_sitelib}/pydantic* %{python3_sitelib}/uvicorn* %{python3_sitelib}/httpx* %{python3_sitelib}/httpcore* %{python3_sitelib}/starlette* %{python3_sitelib}/anyio* %{python3_sitelib}/h11* %{python3_sitelib}/click* %{python3_sitelib}/annotated_* %{python3_sitelib}/typing_* %{python3_sitelib}/certifi* %{python3_sitelib}/sniffio* # Manpages %{_mandir}/man5/%{name}-config.5* %{_mandir}/man7/%{name}.7* # Needed directories %dir %attr(0700, root, root) %{_sysconfdir}/xdg/%{name} # System units %{_unitdir}/%{name}.service # Config file %config(noreplace) %attr(0600, root, root) %{_sysconfdir}/xdg/%{name}/config.toml # ---------------- Red Hat package %package -n goose-redhat Summary: %{summary} Requires: goose Requires: %{name} = %{version}-%{release} %description -n goose-redhat This package contains Red Hat specific configurations for %{name}, which enable the communication with RHEL Lightspeed services. %files -n goose-redhat %{_sysconfdir}/profile.d/goose-init.sh %{_datadir}/goose-redhat/config.yaml %{_datadir}/goose-redhat/custom_goose-proxy.json %changelog * Thu Apr 16 2026 Priscila Gutierres - 0.1.0-7 - Remove problematic deps from %files (idna, _pydantic_core) * Thu Apr 16 2026 Priscila Gutierres - 0.1.0-6 - Simplify %files wildcards to catch all vendored files * Thu Apr 16 2026 Priscila Gutierres - 0.1.0-5 - Fix %files wildcards for vendored dependencies * Thu Apr 16 2026 Priscila Gutierres - 0.1.0-4 - Properly disable tests in %check section * Thu Apr 16 2026 Priscila Gutierres - 0.1.0-3 - Add python3-build BuildRequires * Thu Apr 16 2026 Priscila Gutierres - 0.1.0-2 - EPEL 10 backport with vendored Python dependencies - Vendor: fastapi, pydantic, uvicorn, httpx and all transitive deps * Thu Apr 16 2026 Priscila Gutierres - 0.1.0-1 - Initial EPEL 10 backport