#2579 Install into /usr/lib rather than /usr/lib64/
Merged 2 years ago by tkopecek. Opened 2 years ago by mprivozn.
mprivozn/koji fix_32bits  into  master

file modified
+1 -1
@@ -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

  

file modified
+1 -1
@@ -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"

file modified
+1 -1
@@ -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)

file modified
+7 -7
@@ -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 @@ 

  

  %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 @@ 

  

  %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

file modified
+1 -1
@@ -2,7 +2,7 @@ 

  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"

file modified
+1 -1
@@ -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

file modified
+1 -1
@@ -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)

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

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

2 years ago

Thanks!

Is there an eta for a 1.23.1 with this patch?

Metadata Update from @jcupova:
- Pull-request untagged with: testing-ready

2 years ago

hmm, back - it doesn't build on f33 - mismatch between spec and Makefile

1.23.1 is planned somewhere in the beginning of January due to Christmas. So, backporting it makes sense (when it will work correctly).

rebased onto 856373bddb6802962ef574fe3eef33959a32d918

2 years ago

hmm, back - it doesn't build on f33 - mismatch between spec and Makefile

Fixed.

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

2 years ago

Metadata Update from @jcupova:
- Pull-request untagged with: testing-ready

2 years ago

Metadata Update from @jcupova:
- Pull-request tagged with: testing-ready

2 years ago

Ok, few more problems - this doesn't work for Rhel7 and f32. :-(

Metadata Update from @jcupova:
- Pull-request untagged with: testing-ready

2 years ago

rebased onto 66ba134

2 years ago

Alright. I've done some more analysis and something else must have changed, because when I reverted my original commit then I still wasn't able to build. Nevertheless, I've fixed the build and tested successfully on rhel7, f32 and rawhide.

Metadata Update from @jcupova:
- Pull-request tagged with: testing-ready

2 years ago

Great, we built it for F33, F32, F31, rawhide, RHEL7 and RHEL8 without problems now. Thank you for fix!.

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

2 years ago

Commit 2fa1f05 fixes this pull-request

Pull-Request has been merged by tkopecek

2 years ago