parent
f8d22b86b0
commit
0782ee11d6
@ -1,140 +0,0 @@
|
||||
From 66ba134859f268d36af6bfedf8e851959b06dd2d Mon Sep 17 00:00:00 2001
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Nov 27 2020 09:00:52 +0000
|
||||
Subject: Install into /usr/lib rather than /usr/lib64/
|
||||
|
||||
|
||||
In koji-1.22.0-129-g0ef3c751 I've changed the way how
|
||||
site-packages directory is obtained. What I did not realize back
|
||||
then is there can be multilib systems which will not search for
|
||||
packages in /usr/lib64. But 64bit systems do look into /usr/lib.
|
||||
Therefore, let's pick the location where both systems work.
|
||||
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1894261
|
||||
Fixes: #2578
|
||||
https://pagure.io/koji/issue/2578
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
|
||||
---
|
||||
|
||||
diff --git a/cli/Makefile b/cli/Makefile
|
||||
index ddaeba3..122a23f 100644
|
||||
--- a/cli/Makefile
|
||||
+++ b/cli/Makefile
|
||||
@@ -1,7 +1,7 @@
|
||||
SUBDIRS=koji_cli
|
||||
|
||||
PACKAGE = $(shell basename `pwd`)
|
||||
-PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE)
|
||||
+PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE)
|
||||
|
||||
FILES = koji
|
||||
|
||||
diff --git a/cli/koji_cli/Makefile b/cli/koji_cli/Makefile
|
||||
index fd66929..62b8b53 100644
|
||||
--- a/cli/koji_cli/Makefile
|
||||
+++ b/cli/koji_cli/Makefile
|
||||
@@ -1,7 +1,7 @@
|
||||
PYFILES = $(wildcard *.py)
|
||||
|
||||
PACKAGE = $(shell basename `pwd`)
|
||||
-PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE)
|
||||
+PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE)
|
||||
|
||||
_default:
|
||||
@echo "nothing to make. try make install"
|
||||
diff --git a/hub/Makefile b/hub/Makefile
|
||||
index 6881f63..a44e1c4 100644
|
||||
--- a/hub/Makefile
|
||||
+++ b/hub/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
PACKAGE = $(shell basename `pwd`)
|
||||
PYFILES = $(wildcard *.py)
|
||||
-PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE)
|
||||
+PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE)
|
||||
|
||||
SERVERDIR = /usr/share/koji-hub
|
||||
PYFILES = $(wildcard *.py)
|
||||
diff --git a/koji.spec b/koji.spec
|
||||
index 78d1863..7e0b6e7 100644
|
||||
--- a/koji.spec
|
||||
+++ b/koji.spec
|
||||
@@ -62,7 +62,7 @@
|
||||
# not yet to RHEL proper.
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1307190
|
||||
%{!?__python2: %global __python2 /usr/bin/python2}
|
||||
-%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||
+%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||
%{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}}
|
||||
%{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}}
|
||||
@@ -451,19 +451,19 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%if 0%{py2_support}
|
||||
%files -n python2-%{name}
|
||||
-%{python2_sitearch}/%{name}
|
||||
-%{python2_sitearch}/koji_cli
|
||||
+%{python2_sitelib}/%{name}
|
||||
+%{python2_sitelib}/koji_cli
|
||||
%endif
|
||||
|
||||
%if 0%{py3_support}
|
||||
%files -n python%{python3_pkgversion}-koji
|
||||
-%{python3_sitearch}/%{name}
|
||||
-%{python3_sitearch}/koji_cli
|
||||
+%{python3_sitelib}/%{name}
|
||||
+%{python3_sitelib}/koji_cli
|
||||
%endif
|
||||
|
||||
%if 0%{py2_support}
|
||||
%files -n python2-%{name}-cli-plugins
|
||||
-%{python2_sitearch}/koji_cli_plugins
|
||||
+%{python2_sitelib}/koji_cli_plugins
|
||||
# we don't have config files for default plugins yet
|
||||
#%%dir %%{_sysconfdir}/koji/plugins
|
||||
#%%config(noreplace) %%{_sysconfdir}/koji/plugins/*.conf
|
||||
@@ -471,7 +471,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%if 0%{py3_support}
|
||||
%files -n python%{python3_pkgversion}-%{name}-cli-plugins
|
||||
-%{python3_sitearch}/koji_cli_plugins
|
||||
+%{python3_sitelib}/koji_cli_plugins
|
||||
# we don't have config files for default plugins yet
|
||||
#%%dir %%{_sysconfdir}/koji/plugins
|
||||
#%%config(noreplace) %%{_sysconfdir}/koji/plugins/*.conf
|
||||
diff --git a/koji/Makefile b/koji/Makefile
|
||||
index 2b6f3d4..0064cdd 100644
|
||||
--- a/koji/Makefile
|
||||
+++ b/koji/Makefile
|
||||
@@ -2,7 +2,7 @@ PACKAGE = $(shell basename `pwd`)
|
||||
PYFILES = $(wildcard *.py)
|
||||
PYSCRIPTS =
|
||||
SUBDIRS =
|
||||
-PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE)
|
||||
+PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE)
|
||||
|
||||
_default:
|
||||
@echo "nothing to make. try make install"
|
||||
diff --git a/plugins/Makefile b/plugins/Makefile
|
||||
index 10f71e2..6ea1d2a 100644
|
||||
--- a/plugins/Makefile
|
||||
+++ b/plugins/Makefile
|
||||
@@ -1,4 +1,4 @@
|
||||
-PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE)
|
||||
+PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE)
|
||||
|
||||
CLIPLUGINDIR = $(PKGDIR)/koji_cli_plugins
|
||||
HUBPLUGINDIR = /usr/lib/koji-hub-plugins
|
||||
diff --git a/www/lib/kojiweb/Makefile b/www/lib/kojiweb/Makefile
|
||||
index 8ea3759..5fa67c0 100644
|
||||
--- a/www/lib/kojiweb/Makefile
|
||||
+++ b/www/lib/kojiweb/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
PACKAGE = $(shell basename `pwd`)
|
||||
PYFILES = $(wildcard *.py)
|
||||
-PKGDIR = $(shell $(PYTHON) -c "import site; print(site.getsitepackages()[0])")/$(PACKAGE)
|
||||
+PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE)
|
||||
|
||||
SERVERDIR = /kojiweb
|
||||
FILES = $(wildcard *.py *.chtml)
|
||||
|
@ -1,51 +0,0 @@
|
||||
From 7675881c5481d7157c64c6a2a008fac7fbf5c495 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Kopecek <tkopecek@redhat.com>
|
||||
Date: Jan 15 2021 11:56:31 +0000
|
||||
Subject: [PATCH 1/2] kojid: backward compatible hub call
|
||||
|
||||
|
||||
Fixes: https://pagure.io/koji/issue/2648
|
||||
|
||||
---
|
||||
|
||||
diff --git a/builder/kojid b/builder/kojid
|
||||
index 7f4557a..ca33a00 100755
|
||||
--- a/builder/kojid
|
||||
+++ b/builder/kojid
|
||||
@@ -1328,7 +1328,12 @@ class BuildArchTask(BaseBuildTask):
|
||||
weight is scaled from a minimum of 1.5 to a maximum of 6, based on
|
||||
the average duration of a build of this package.
|
||||
"""
|
||||
- avg = self.session.getAverageBuildDuration(name, age=6)
|
||||
+ try:
|
||||
+ avg = self.session.getAverageBuildDuration(name, age=6)
|
||||
+ except ParameterError:
|
||||
+ # for hub < 1.23
|
||||
+ avg = self.session.getAverageBuildDuration(name)
|
||||
+
|
||||
if not avg:
|
||||
return
|
||||
if avg < 0:
|
||||
|
||||
From a53aa56b87a569ccb8eb3173f7eddfe86b2dfea2 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Kopecek <tkopecek@redhat.com>
|
||||
Date: Jan 15 2021 15:23:44 +0000
|
||||
Subject: [PATCH 2/2] typo
|
||||
|
||||
|
||||
---
|
||||
|
||||
diff --git a/builder/kojid b/builder/kojid
|
||||
index ca33a00..b503405 100755
|
||||
--- a/builder/kojid
|
||||
+++ b/builder/kojid
|
||||
@@ -1330,7 +1330,7 @@ class BuildArchTask(BaseBuildTask):
|
||||
"""
|
||||
try:
|
||||
avg = self.session.getAverageBuildDuration(name, age=6)
|
||||
- except ParameterError:
|
||||
+ except koji.ParameterError:
|
||||
# for hub < 1.23
|
||||
avg = self.session.getAverageBuildDuration(name)
|
||||
|
||||
|
@ -1 +1 @@
|
||||
SHA512 (koji-1.23.0.tar.bz2) = e248e786b7f698da6a60b5fd38514b1bd650ff3009d835452a7e6eb5c9abf77cef6346792ab094be1dd5b965299de0d91eee9c712125d99f5a2546b038ca6095
|
||||
SHA512 (koji-1.23.1.tar.bz2) = ccc9bf93e14e26f575f9b4e3a236e04506331e0391c5f11f710ef29f77a1160a59e740b8d2373f6814f434d451cd62a620d88cf362f5cec9e5c485e3552b2a19
|
||||
|
Loading…
Reference in new issue