Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 835733

Summary: sys-apps/dtc: install libfdt python bindings
Product: Gentoo Linux Reporter: LABBE Corentin <clabbe.montjoie>
Component: Current packagesAssignee: Luca Barbato <lu_zero>
Status: RESOLVED FIXED    
Severity: enhancement CC: embedded, jstein, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description LABBE Corentin 2022-03-21 11:03:04 UTC
The dtc sources contains python bindings that could be installed.
They are necessary for working on dt-schema for Linux development.

The emake command should have:
NO_PYTHON=$(usex !python 1 0)
instead of just NO_PYTHON=1

But Makefile check for python3 pkg_config which do not exists (gentoo use python-3.x)

Fixing that lead to another error I fail to fix.


Reproducible: Always
Comment 1 LABBE Corentin 2022-03-21 11:47:26 UTC
It fail when doing install phase:
make[1] : on quitte le répertoire « /var/tmp/portage/sys-apps/dtc-1.6.1/work/dtc-1.6.1 »
pylibfdt/setup.py --top-builddir . install --prefix=/usr
/usr/bin/install -d /var/tmp/portage/sys-apps/dtc-1.6.1/image/usr/bin
/usr/bin/install -d /var/tmp/portage/sys-apps/dtc-1.6.1/image/usr/lib64
/usr/bin/install convert-dtsv0 dtc fdtdump fdtget fdtput fdtoverlay /var/tmp/portage/sys-apps/dtc-1.6.1/image/usr/bin
/usr/bin/install libfdt/libfdt-1.6.1.so /var/tmp/portage/sys-apps/dtc-1.6.1/image/usr/lib64
ln -sf libfdt-1.6.1.so /var/tmp/portage/sys-apps/dtc-1.6.1/image/usr/lib64/libfdt.so.1
/usr/bin/install dtdiff /var/tmp/portage/sys-apps/dtc-1.6.1/image/usr/bin
ln -sf libfdt.so.1 /var/tmp/portage/sys-apps/dtc-1.6.1/image/usr/lib64/libfdt.so
/usr/bin/install -m 644 libfdt/libfdt.a /var/tmp/portage/sys-apps/dtc-1.6.1/image/usr/lib64
running install
/usr/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/lib/python3.9/site-packages/setuptools/command/easy_install.py:160: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
 * ACCESS DENIED:  open_wr:      /usr/lib/python3.9/site-packages/test-easy-install-121.write-test
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/usr/lib/python3.9/site-packages/test-easy-install-121.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /usr/lib/python3.9/site-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://setuptools.pypa.io/en/latest/deprecated/easy_install.html

Please make the appropriate changes for your system and try again.
Comment 2 LABBE Corentin 2022-03-21 15:27:11 UTC
I succeed to support it
https://github.com/montjoie/gentoo/commit/31d60db3761a09e34c76514fe166d7fc00b5b7ae
but the workaround for pkg-config is not pretty.
Any advice ?
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-06 03:16:53 UTC
I'll take a look.
Comment 4 Larry the Git Cow gentoo-dev 2023-06-06 08:48:27 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c55f366b8e8e45125dfd3c115e5a60b513790de

commit 9c55f366b8e8e45125dfd3c115e5a60b513790de
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-06-06 08:43:46 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-06-06 08:48:05 +0000

    sys-apps/dtc: install Python bindings
    
    Closes: https://bugs.gentoo.org/835733
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/dtc/dtc-1.7.0.ebuild | 18 ++++++++++++++----
 sys-apps/dtc/dtc-9999.ebuild  | 18 ++++++++++++++----
 2 files changed, 28 insertions(+), 8 deletions(-)
Comment 5 LABBE Corentin 2023-06-06 08:59:54 UTC
Thanks!
Comment 6 Larry the Git Cow gentoo-dev 2023-06-07 01:51:02 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d4d6bd4de28a5f9efc783d947397dabe7ffd568

commit 8d4d6bd4de28a5f9efc783d947397dabe7ffd568
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-06-07 01:50:27 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-06-07 01:50:27 +0000

    sys-apps/dtc: set SETUPTOOLS_SCM_PRETEND_VERSION
    
    I test with a git repo in WORKDIR so I didn't hit this myself before.
    
    Bug: https://bugs.gentoo.org/835733
    Closes: https://bugs.gentoo.org/907960
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/dtc/dtc-1.7.0.ebuild | 5 ++++-
 sys-apps/dtc/dtc-9999.ebuild  | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)