# Generated by go2rpm 1.9.0 %bcond_without check %bcond_without bundled %bcond_without golang_library %if %{defined rhel} %bcond_without bundled %endif %if %{with bundled} %bcond_with golang_library %endif %define pyproject_install() %{expand:\\\ specifier=$(ls %{_pyproject_wheeldir}/*.whl | xargs basename --multiple | sed -E 's/([^-]+)-([^-]+)-.+\\\.whl/\\\1==\\\2/') TMPDIR="%{_pyproject_builddir}" %{__python3} -m pip install --root %{buildroot} --prefix %{_prefix} --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location --no-index --no-cache-dir --find-links %{_pyproject_wheeldir} $specifier if [ -d %{buildroot}%{_bindir} ]; then %py3_shebang_fix %{buildroot}%{_bindir}/* rm -rfv %{buildroot}%{_bindir}/__pycache__ fi rm -f %{_pyproject_ghost_distinfo} site_dirs=() # Process %%{python3_sitelib} if exists if [ -d %{buildroot}%{python3_sitelib} ]; then site_dirs+=( "%{python3_sitelib}" ) fi # Process %%{python3_sitearch} if exists and does not equal to %%{python3_sitelib} if [ %{buildroot}%{python3_sitearch} != %{buildroot}%{python3_sitelib} ] && [ -d %{buildroot}%{python3_sitearch} ]; then site_dirs+=( "%{python3_sitearch}" ) fi # Process all *.dist-info dirs in sitelib/sitearch for site_dir in ${site_dirs[@]}; do for distinfo in %{buildroot}$site_dir/*.dist-info; do project_name=$(basename "$distinfo" | cut -d'-' -f1) %global _pyproject_record %{_builddir}/%{_pyproject_files_prefix}-${project_name}-pyproject-record sed -i 's/pip/rpm/' ${distinfo}/INSTALLER PYTHONPATH=%{_rpmconfigdir}/redhat \\ %{__python3} -B %{_rpmconfigdir}/redhat/pyproject_preprocess_record.py \\ --buildroot %{buildroot} --record ${distinfo}/RECORD --output %{_pyproject_record} rm -fv ${distinfo}/RECORD rm -fv ${distinfo}/REQUESTED done done } %define pyproject_save_files() %{expand:\\\ %global _pyproject_record %{_builddir}/%{_pyproject_files_prefix}-%{*}-pyproject-record %global pyproject_files %{_builddir}/%{_pyproject_files_prefix}-%{*}-pyproject-files %{expr:0%{?fedora} >= 39 || 0%{?rhel} >= 10 ? "RPM_PERCENTAGES_COUNT=2" : "RPM_PERCENTAGES_COUNT=8" } \\ %{__python3} %{_rpmconfigdir}/redhat/pyproject_save_files.py \\ --output-files "%{pyproject_files}" \\ --output-modules "%{_pyproject_modules}" \\ --buildroot "%{buildroot}" \\ --sitelib "%{python3_sitelib}" \\ --sitearch "%{python3_sitearch}" \\ --python-version "%{python3_version}" \\ --pyproject-record "%{_pyproject_record}" \\ --prefix "%{_prefix}" \\ %{*} } # https://github.com/ansible/receptor %global goipath github.com/ansible/receptor Version: 1.4.1 %gometa -f %global goname receptor %global common_description %{expand: Receptor is an overlay network intended to ease the distribution of work across a large and dispersed collection of workers. Receptor nodes establish peer-to-peer connections with each other via existing networks. Once connected, the Receptor mesh provides datagram (UDP-like) and stream (TCP-like) capabilities to applications, as well as robust unit-of-work handling with resiliency against transient network failures. See the readthedocs page for Receptor at: https://receptor.readthedocs.io/en/latest} %global golicenses LICENSE.md %{?with_bundled:vendor/modules.txt} %global godocs docs tools README.md Name: %{goname} Release: %autorelease Summary: Multi-service relayer with remote execution and orchestration capabilities # License for github.com/ansible/receptor: Apache-2.0 # License for github.com/creack/pty: MIT # License for github.com/davecgh/go-spew: ISC # License for github.com/emicklei/go-restful/v3: MIT # License for github.com/fortytw2/leaktest: BSD-3-Clause # License for github.com/fsnotify/fsnotify: BSD-3-Clause # License for github.com/ghjm/cmdline: Apache-2.0 # License for github.com/go-logr/logr: Apache-2.0 # License for github.com/go-openapi/jsonpointer: Apache-2.0 # License for github.com/go-openapi/jsonreference: Apache-2.0 # License for github.com/go-openapi/swag: Apache-2.0 # License for github.com/go-task/slim-sprig: MIT # License for github.com/gogo/protobuf: BSD-3-Clause # License for github.com/golang-jwt/jwt/v4: MIT # License for github.com/golang/mock: Apache-2.0 # License for github.com/golang/protobuf: BSD-3-Clause # License for github.com/google/gnostic: Apache-2.0 # License for github.com/google/go-cmp: BSD-3-Clause # License for github.com/google/gofuzz: Apache-2.0 # License for github.com/google/pprof: Apache-2.0 # License for github.com/google/shlex: Apache-2.0 # License for github.com/google/uuid: BSD-3-Clause # License for github.com/gorilla/websocket: BSD-2-Clause # License for github.com/imdario/mergo: BSD-3-Clause # License for github.com/josharian/intern: MIT # License for github.com/json-iterator/go: MIT # License for github.com/jupp0r/go-priority-queue: MIT # License for github.com/mailru/easyjson: MIT # License for github.com/minio/highwayhash: Apache-2.0 # License for github.com/moby/spdystream: Apache-2.0 # License for github.com/modern-go/concurrent: Apache-2.0 # License for github.com/modern-go/reflect2: Apache-2.0 # License for github.com/munnerz/goautoneg: BSD-3-Clause # License for github.com/onsi/ginkgo/v2: MIT # License for github.com/pbnjay/memory: BSD-3-Clause # License for github.com/pmezard/go-difflib: BSD-3-Clause # License for github.com/prep/socketpair: BSD-3-Clause # License for github.com/quic-go/qtls-go1-19: BSD-3-Clause # License for github.com/quic-go/qtls-go1-20: BSD-3-Clause # License for github.com/quic-go/quic-go: MIT # License for github.com/rogpeppe/go-internal: BSD-3-Clause # License for github.com/songgao/water: BSD-3-Clause # License for github.com/spf13/pflag: BSD-3-Clause # License for github.com/stretchr/testify: MIT # License for github.com/vishvananda/netlink: Apache-2.0 # License for github.com/vishvananda/netns: Apache-2.0 # License for golang.org/x/crypto: BSD-3-Clause # License for golang.org/x/exp: BSD-3-Clause # License for golang.org/x/mod: BSD-3-Clause # License for golang.org/x/net: BSD-3-Clause # License for golang.org/x/oauth2: BSD-3-Clause # License for golang.org/x/sys: BSD-3-Clause # License for golang.org/x/term: BSD-3-Clause # License for golang.org/x/text: BSD-3-Clause # License for golang.org/x/time: BSD-3-Clause # License for golang.org/x/tools: BSD-3-Clause # License for google.golang.org/appengine: Apache-2.0 # License for google.golang.org/protobuf: BSD-3-Clause # License for gopkg.in/inf.v0: BSD-3-Clause # License for gopkg.in/yaml.v2: Apache-2.0 AND MIT # License for gopkg.in/yaml.v3: MIT AND Apache-2.0 # License for k8s.io/api: Apache-2.0 # License for k8s.io/apimachinery: Apache-2.0 # License for k8s.io/client-go: Apache-2.0 # License for k8s.io/klog/v2: Apache-2.0 # License for k8s.io/kube-openapi: Apache-2.0 # License for k8s.io/utils: Apache-2.0 # License for sigs.k8s.io/json: Apache-2.0 AND BSD-3-Clause # License for sigs.k8s.io/structured-merge-diff/v4: Apache-2.0 # License for sigs.k8s.io/yaml: MIT AND BSD-3-Clause License: Apache-2.0 AND ISC AND MIT AND BSD-3-Clause AND BSD-2-Clause URL: %{gourl} Source: %{gosource} Source: vendor-%{version}.tar.gz Source: bundle_go_deps_for_rpm.sh # https://github.com/ansible/receptor/pull/816 Patch: 0001-Bump-quic-go-to-0.37.4.patch %if %{with bundled} Provides: bundled(golang(github.com/ansible/receptor) = 1.4.1 Provides: bundled(golang(github.com/creack/pty) = 1.1.18 Provides: bundled(golang(github.com/davecgh/go-spew) = 1.1.1 Provides: bundled(golang(github.com/emicklei/go-restful/v3) = 3.10.2 Provides: bundled(golang(github.com/fortytw2/leaktest) = 1.3.0 Provides: bundled(golang(github.com/fsnotify/fsnotify) = 1.6.0 Provides: bundled(golang(github.com/ghjm/cmdline) = 0.1.2 Provides: bundled(golang(github.com/go-logr/logr) = 1.2.4 Provides: bundled(golang(github.com/go-openapi/jsonpointer) = 0.19.6 Provides: bundled(golang(github.com/go-openapi/jsonreference) = 0.20.2 Provides: bundled(golang(github.com/go-openapi/swag) = 0.22.3 Provides: bundled(golang(github.com/go-task/slim-sprig) = 0.0.0-20230315git52ccab3 Provides: bundled(golang(github.com/gogo/protobuf) = 1.3.2 Provides: bundled(golang(github.com/golang-jwt/jwt/v4) = 4.5.0 Provides: bundled(golang(github.com/golang/mock) = 1.6.0 Provides: bundled(golang(github.com/golang/protobuf) = 1.5.3 Provides: bundled(golang(github.com/google/gnostic) = 0.6.9 Provides: bundled(golang(github.com/google/go-cmp) = 0.5.9 Provides: bundled(golang(github.com/google/gofuzz) = 1.2.0 Provides: bundled(golang(github.com/google/pprof) = 0.0.0-20230502git255e3b9 Provides: bundled(golang(github.com/google/shlex) = 0.0.0-20191202gite7afc7f Provides: bundled(golang(github.com/google/uuid) = 1.3.0 Provides: bundled(golang(github.com/gorilla/websocket) = 1.5.0 Provides: bundled(golang(github.com/imdario/mergo) = 0.3.15 Provides: bundled(golang(github.com/josharian/intern) = 1.0.0 Provides: bundled(golang(github.com/json-iterator/go) = 1.1.12 Provides: bundled(golang(github.com/jupp0r/go-priority-queue) = 0.0.0-20160601gitab10738 Provides: bundled(golang(github.com/mailru/easyjson) = 0.7.7 Provides: bundled(golang(github.com/minio/highwayhash) = 1.0.2 Provides: bundled(golang(github.com/moby/spdystream) = 0.2.0 Provides: bundled(golang(github.com/modern-go/concurrent) = 0.0.0-20180306gitbacd9c7 Provides: bundled(golang(github.com/modern-go/reflect2) = 1.0.2 Provides: bundled(golang(github.com/munnerz/goautoneg) = 0.0.0-20191010gita7dc8b6 Provides: bundled(golang(github.com/onsi/ginkgo/v2) = 2.9.4 Provides: bundled(golang(github.com/pbnjay/memory) = 0.0.0-20210728git7b4eea6 Provides: bundled(golang(github.com/pmezard/go-difflib) = 1.0.0 Provides: bundled(golang(github.com/prep/socketpair) = 0.0.0-20171228gitc2c6a7f Provides: bundled(golang(github.com/quic-go/qtls-go1-19) = 0.3.2 Provides: bundled(golang(github.com/quic-go/qtls-go1-20) = 0.2.2 Provides: bundled(golang(github.com/quic-go/quic-go) = 0.34.0 Provides: bundled(golang(github.com/rogpeppe/go-internal) = 1.10.0 Provides: bundled(golang(github.com/songgao/water) = 0.0.0-20200317git2b4b6d7 Provides: bundled(golang(github.com/spf13/pflag) = 1.0.5 Provides: bundled(golang(github.com/stretchr/testify) = 1.8.1 Provides: bundled(golang(github.com/vishvananda/netlink) = 1.1.0 Provides: bundled(golang(github.com/vishvananda/netns) = 0.0.4 Provides: bundled(golang(golang.org/x/crypto) = 0.8.0 Provides: bundled(golang(golang.org/x/exp) = 0.0.0-20230425git47ecfdc Provides: bundled(golang(golang.org/x/mod) = 0.10.0 Provides: bundled(golang(golang.org/x/net) = 0.9.0 Provides: bundled(golang(golang.org/x/oauth2) = 0.7.0 Provides: bundled(golang(golang.org/x/sys) = 0.8.0 Provides: bundled(golang(golang.org/x/term) = 0.8.0 Provides: bundled(golang(golang.org/x/text) = 0.9.0 Provides: bundled(golang(golang.org/x/time) = 0.3.0 Provides: bundled(golang(golang.org/x/tools) = 0.8.0 Provides: bundled(golang(google.golang.org/appengine) = 1.6.7 Provides: bundled(golang(google.golang.org/protobuf) = 1.30.0 Provides: bundled(golang(gopkg.in/inf.v0) = 0.9.1 Provides: bundled(golang(gopkg.in/yaml.v2) = 2.4.0 Provides: bundled(golang(gopkg.in/yaml.v3) = 3.0.1 Provides: bundled(golang(k8s.io/api) = 0.27.1 Provides: bundled(golang(k8s.io/apimachinery) = 0.27.1 Provides: bundled(golang(k8s.io/client-go) = 0.27.1 Provides: bundled(golang(k8s.io/klog/v2) = 2.100.1 Provides: bundled(golang(k8s.io/kube-openapi) = 0.0.0-20230501git8b0f38b Provides: bundled(golang(k8s.io/utils) = 0.0.0-20230505git9f67429 Provides: bundled(golang(sigs.k8s.io/json) = 0.0.0-20221116gitbc3834c Provides: bundled(golang(sigs.k8s.io/structured-merge-diff/v4) = 4.2.3 Provides: bundled(golang(sigs.k8s.io/yaml) = 1.3.0 %endif BuildRequires: python3-devel # For Python tests BuildRequires: psmisc BuildRequires: openssh %description %{common_description} %package -n python3-receptorctl Summary: Front-end CLI and importable Python library that interacts with Receptor %description -n python3-receptorctl Receptorctl is a front-end CLI and importable Python library that interacts with Receptor over its control socket interface. %package -n python3-receptor-python-worker Summary: Python plugin called by Receptor %description -n python3-receptor-python-worker The receptor-python-worker command is called by Receptor to supervise the operation of a Python worker plugin." %if %{without golang_library} %gopkg %endif %prep %if %{with bundled} %goprep -k # unpack vendored dependencies %setup -q -T -D -a 1 -n %{name}-%{version} %else %goprep %endif %autopatch -p1 echo "%{version}" > receptor-python-worker/.VERSION echo "%{version}" > receptorctl/.VERSION mv receptor-python-worker/README.md README-receptor-python-worker.md mv receptorctl/README.md README-receptorctl.md %generate_buildrequires %if %{without bundled} %go_generate_buildrequires %endif cd receptorctl %pyproject_buildrequires -t cd ../receptor-python-worker %pyproject_buildrequires -t %build %if %{with bundled} export GO111MODULE=on export GOFLAGS=-mod=vendor %endif export LDFLAGS="-X 'github.com/ansible/receptor/internal/version.Version=%{VERSION}' " %gobuild -o %{gobuilddir}/bin/receptor %{goipath}/cmd/receptor-cl pushd receptorctl %pyproject_wheel popd pushd receptor-python-worker %pyproject_wheel popd %install %if %{without golang_library} %gopkginstall %endif install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %pyproject_install %pyproject_save_files receptorctl %pyproject_save_files receptor_python_worker %global receptorctl_pyproject_files %{_builddir}/%{_pyproject_files_prefix}-receptorctl-pyproject-files %global receptor_python_worker_pyproject_files %{_builddir}/%{_pyproject_files_prefix}-receptor_python_worker-pyproject-files %if %{with check} %check export PATH="%{gobuilddir}/bin:$PATH" # Disable various test relying on Kube and network %gocheck -t tests/functional/mesh pushd receptorctl rm -rfv tests/test_mesh.py %tox popd %endif %files %license LICENSE.md %{?with_bundled:vendor/modules.txt} %doc docs tools README.md %{_bindir}/receptor %files -n python3-receptorctl -f %{receptorctl_pyproject_files} %doc README-receptorctl.md %{_bindir}/receptorctl %files -n python3-receptor-python-worker -f %{receptor_python_worker_pyproject_files} %doc README-receptor-python-worker.md %{_bindir}/receptor-python-worker %if %{without golang_library} %gopkgfiles %endif %changelog %autochangelog