Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 708676 - sys-apps/elfix-0.9.5 should use python-single-r1.eclass
Summary: sys-apps/elfix-0.9.5 should use python-single-r1.eclass
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 803152
  Show dependency tree
 
Reported: 2020-02-08 03:25 UTC by Anton Bolshakov
Modified: 2021-07-21 01:27 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Bolshakov 2020-02-08 03:25:20 UTC
I'm compiling dev-qt/qtwebengine with "pax_kernel" use flag and facing this problem:

[11233/26168] /var/tmp/portage/dev-qt/qtwebengine-5.13.2/temp/python2.7/bin/python2 /usr/sbin/pypaxctl -sm ./mksnapshot
FAILED: obj/v8/mksnapshot 
/var/tmp/portage/dev-qt/qtwebengine-5.13.2/temp/python2.7/bin/python2 /usr/sbin/pypaxctl -sm ./mksnapshot
Traceback (most recent call last):
  File "/usr/sbin/pypaxctl", line 23, in <module>
    import pax
ImportError: No module named pax

That's because dev-python/pypax no longer supports python2

emerge --info
Portage 2.3.84 (python 3.6.9-final-0, default/linux/amd64/17.1/hardened, gcc-9.2.0, glibc-2.29-r7, 5.2.14-pentoo x86_64)
=================================================================
System uname: Linux-5.2.14-pentoo-x86_64-Intel-R-_Core-TM-_i5-3320M_CPU_@_2.60GHz-with-gentoo-2.6
KiB Mem:     7968740 total,   2148576 free
KiB Swap:    4194300 total,   4150148 free
Timestamp of repository gentoo: Fri, 07 Feb 2020 01:45:01 +0000
Head commit of repository gentoo: 64285aa9aa51ff8b5e42aae0644491544a88d9a1
Head commit of repository pentoo: da42a05fe276af06dde86cf74d32d0e9f1c2a2f8

Head commit of repository steam-overlay: d77d22779230e23014724e9046225b4f3124df34

sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17::gentoo, 3.6.9::gentoo, 3.7.5-r1::gentoo
dev-util/cmake:           3.14.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.16.1-r2::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            9.2.0-r2::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.asia.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 

local-overlay
    location: /var/db/overlays/local
    masters: gentoo
    priority: 0

pentoo
    location: /var/db/overlays/pentoo-overlay
    sync-type: git
    sync-uri: https://github.com/pentoo/pentoo-overlay
    masters: gentoo

steam-overlay
    location: /var/db/overlays/steam-overlay
    sync-type: git
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -frecord-gcc-switches"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -frecord-gcc-switches -frecord-gcc-switches"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -frecord-gcc-switches -frecord-gcc-switches"
GENTOO_MIRRORS="http://gentoo.aditsu.net:8000/"
INSTALL_MASK="*.la"
LANG="en_SG.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0"
LINGUAS="en ru"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_BINHOST="https://pentoo.emjay-embedded.co.uk/Packages/amd64-hardened/"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--omit-dir-times"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities alsa amd64 branding bzip2 cairo cdda crypt cups cxx dbus declarative dri dri3 dts dvdr elogind emboss encode exif ffmpeg flac gif gtk hackrf hardened iconv icu ipv6 jpeg kde kipi kwallet lcms libnotify libtirpc mad minipentoo mng mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ogg opengl openmp pam pango pax_kernel pcre pdf phonon pie plasma png policykit ppds qml qt5 readline samba sdl seccomp semantic-desktop spell split-usr ssl ssp startup-notification svg tiff truetype udev udisks unicode upower usb vaapi vlc vorbis widgets wxwidgets x264 xattr xcb xcomposite xinerama xml xtpax xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en ru" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" UNICORN_TARGETS="x86" USERLAND="GNU" VIDEO_CARDS="vesa intel i965" XFCE_PLUGINS="brightness menu logout trash" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Larry the Git Cow gentoo-dev 2020-02-08 21:34:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71b0725e2b295f383bdbe98571545aaf705c5a03

commit 71b0725e2b295f383bdbe98571545aaf705c5a03
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2020-02-08 20:23:27 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2020-02-08 21:34:20 +0000

    dev-qt/qtwebengine: pax_kernel is dead
    
    Closes: https://bugs.gentoo.org/708676
    Package-Manager: Portage-2.3.87, Repoman-2.3.20
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../qtwebengine-5.11.2-paxmark-mksnapshot.patch    | 41 ----------------------
 dev-qt/qtwebengine/metadata.xml                    |  1 -
 dev-qt/qtwebengine/qtwebengine-5.12.3.ebuild       | 11 ++----
 dev-qt/qtwebengine/qtwebengine-5.13.2.ebuild       | 11 ++----
 dev-qt/qtwebengine/qtwebengine-5.14.1.ebuild       | 11 ++----
 5 files changed, 9 insertions(+), 66 deletions(-)
Comment 2 Arfrever Frehtes Taifersar Arahesis 2020-02-09 00:54:26 UTC
Real problem is actually in sys-apps/elfix.

sys-apps/elfix needs to use python-single-r1.eclass properly.

sys-apps/elfix installs:
 /usr/sbin/migrate-pax
 /usr/sbin/pypaxctl
 /usr/sbin/revdep-pax
These 3 files are Python scripts which import pax module.
Shebangs in these scripts need to be updated (using eclass functionality) from '#!/usr/bin/env python' to use Python interpreter selected using PYTHON_SINGLE_TARGET.

~dev-python/pypax-${PV}[ptpax=,xtpax=] dependency should be:
$(python_gen_cond_dep '~dev-python/pypax-${PV}[ptpax=,xtpax=,${PYTHON_MULTI_USEDEP}]')
Comment 3 Anthony Basile gentoo-dev 2020-02-12 15:36:46 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #2)

>  /usr/sbin/migrate-pax
>  /usr/sbin/pypaxctl
>  /usr/sbin/revdep-pax
> These 3 files are Python scripts which import pax module.
> Shebangs in these scripts need to be updated (using eclass functionality)
> from '#!/usr/bin/env python' to use Python interpreter selected using
> PYTHON_SINGLE_TARGET.

Arfrever, what needs to change?  Should I just change the shebang to '#!/usr/bin/python' ?
Comment 4 Arfrever Frehtes Taifersar Arahesis 2020-02-12 19:52:15 UTC
(In reply to Anthony Basile from comment #3)
> (In reply to Arfrever Frehtes Taifersar Arahesis from comment #2)
> 
> >  /usr/sbin/migrate-pax
> >  /usr/sbin/pypaxctl
> >  /usr/sbin/revdep-pax
> > These 3 files are Python scripts which import pax module.
> > Shebangs in these scripts need to be updated (using eclass functionality)
> > from '#!/usr/bin/env python' to use Python interpreter selected using
> > PYTHON_SINGLE_TARGET.
> 
> Arfrever, what needs to change?  Should I just change the shebang to
> '#!/usr/bin/python' ?

Use python_fix_shebang function.
Comment 5 Arfrever Frehtes Taifersar Arahesis 2020-02-13 17:29:06 UTC
Changes are needed in sys-apps/elfix, not dev-python/pypax.
Comment 6 Attila Tóth 2020-02-13 17:34:28 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #5)
> Changes are needed in sys-apps/elfix, not dev-python/pypax.

Are there anything I may help to solve this issue I also ran into? Thx: Dw.
Comment 7 Attila Tóth 2020-02-13 18:01:24 UTC
(In reply to Anthony Basile from comment #3)
> (In reply to Arfrever Frehtes Taifersar Arahesis from comment #2)
> 
> >  /usr/sbin/migrate-pax
> >  /usr/sbin/pypaxctl
> >  /usr/sbin/revdep-pax
> > These 3 files are Python scripts which import pax module.
> > Shebangs in these scripts need to be updated (using eclass functionality)
> > from '#!/usr/bin/env python' to use Python interpreter selected using
> > PYTHON_SINGLE_TARGET.
> 
> Arfrever, what needs to change?  Should I just change the shebang to
> '#!/usr/bin/python' ?

OK, listen to this one, gentelmen!

A couple of days ago, python2 support has been removed from pypax:
2020-02-05 20:53:19 +0100
dev-python/pypax: Remove py2
Signed-off-by: Michał Górny <mgorny@gentoo.org>
https://gitweb.gentoo.org/repo/gentoo.git/commit/dev-python/pypax?id=f700592b09cd09657f5ecaa2db0ffd0d23848772

The root of the problem in my opinion is, that qtwebengine and many other builds often still use python2, often their own compile-time internal instance (thunderbird, firefox for eg.).

No matter what shebang I sat the script misses the pax module and that's because it is looking for the python2 egg, IMHO.

After reintroducing 2_7 python compatibility to pypax, the compilation goes on flawlessly!

Additionally - to my disappointment - pax_kernel has been announced to be dead:
020-02-08 21:23:27 +0100
dev-qt/qtwebengine: pax_kernel is dead
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
https://gitweb.gentoo.org/repo/gentoo.git/commit/dev-qt/qtwebengine?id=71b0725e2b295f383bdbe98571545aaf705c5a03

I have a zombie in my hands, so I have to maintain another personal ebuild, because it needs those markings. Blueness: I'm happy to share, if you are interested.

BR: Dwokfur
Comment 8 Arfrever Frehtes Taifersar Arahesis 2020-02-13 18:05:30 UTC
Since sys-apps/elfix does not use any Python eclass, it is unknown which Python versions it supports.
If sys-apps/elfix does not yet support Python 3, then, in addition to starting to use proper eclass, sys-apps/elfix needs to be ported to Python 3 quickly, or sys-apps/elfix will be removed from the tree.
Comment 9 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2020-11-22 01:43:50 UTC
looks like this hits migrate-pax on new tarballs as well
Comment 10 Attila Tóth 2020-11-22 09:42:37 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #8)
> Since sys-apps/elfix does not use any Python eclass, it is unknown which
> Python versions it supports.
> If sys-apps/elfix does not yet support Python 3, then, in addition to
> starting to use proper eclass, sys-apps/elfix needs to be ported to Python 3
> quickly, or sys-apps/elfix will be removed from the tree.

Taking a look at on the source code, it considers both Python 2 and 3.
Ping: blueness