summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Heath <anheath@redhat.com>2023-09-11 08:48:57 -0400
committerAndrew Heath <anheath@redhat.com>2023-09-11 08:48:57 -0400
commitd8d8ceb741c46bfbaced60ed7ead99bb7704a302 (patch)
tree6bf230b2cf660d91e55b498ae782486e8643165b
parent06736a405cfebc513f264d391a03eb142e9eeba2 (diff)
downloadreceptor-d8d8ceb741c46bfbaced60ed7ead99bb7704a302.tar.gz
receptor-d8d8ceb741c46bfbaced60ed7ead99bb7704a302.tar.xz
receptor-d8d8ceb741c46bfbaced60ed7ead99bb7704a302.zip
Updated with the patch from Maxwell G
-rw-r--r--receptor-1.4.1-1.fc38.src.rpmbin11244130 -> 11245774 bytes
-rw-r--r--receptor.spec153
2 files changed, 11 insertions, 142 deletions
diff --git a/receptor-1.4.1-1.fc38.src.rpm b/receptor-1.4.1-1.fc38.src.rpm
index a016d63..656bb09 100644
--- a/receptor-1.4.1-1.fc38.src.rpm
+++ b/receptor-1.4.1-1.fc38.src.rpm
Binary files differ
diff --git a/receptor.spec b/receptor.spec
index 4cbe6d7..7cc1bab 100644
--- a/receptor.spec
+++ b/receptor.spec
@@ -3,54 +3,6 @@
%bcond bundled 1
%bcond golang_library %{without bundled}
-%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
@@ -161,79 +113,6 @@ Source7: receptor.pp
# 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
@@ -262,23 +141,17 @@ Summary: Python plugin called by Receptor
The receptor-python-worker command is called by Receptor to supervise the
operation of a Python worker plugin."
-%if %{without golang_library}
+%if %{with 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
+%autosetup -p1 %{forgesetupargs} %{?with_bundled:-a1}
+%goprep -e %{?with_bundled:-k}
+
+# Set versions
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}
@@ -291,8 +164,8 @@ cd ../receptor-python-worker
%build
%if %{with bundled}
-%global export GO111MODULE=on
-#export GOFLAGS=-mod=vendor
+%global gomodulesmode 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
@@ -304,7 +177,7 @@ pushd receptor-python-worker
popd
%install
-%if %{without golang_library}
+%if %{with golang_library}
%gopkginstall
%endif
install -m 0755 -vd %{buildroot}%{_bindir}
@@ -318,10 +191,6 @@ install -m 0644 -vp %{SOURCE6} %{buildroot}%{_sysconfdir}/receptor/rece
install -m 0755 -vd %{buildroot}%{_datadir}/selinux/packages
install -m 0600 -vp %{SOURCE7} %{buildroot}%{_datadir}/selinux/packages/receptor.pp
%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
%post
semodule -n -i %{_datadir}/selinux/packages/receptor.pp
@@ -361,18 +230,18 @@ popd
%{_unitdir}/receptor@.service
%files -n receptorctl
-%doc README-receptorctl.md
+%doc receptorctl/README.md
%{_bindir}/receptorctl
%{python3_sitelib}/receptorctl/
%{python3_sitelib}/receptorctl-%{version}.dist-info/
%files -n python3-receptor-python-worker
-%doc README-receptor-python-worker.md
+%doc receptor-python-worker/README.md
%{_bindir}/receptor-python-worker
%{python3_sitelib}/receptor_python_worker/
%{python3_sitelib}/receptor_python_worker-%{version}.dist-info/
-%if %{without golang_library}
+%if %{with golang_library}
%gopkgfiles
%endif