Upgrading the ufw package throws the following error: ModuleNotFoundError: No module named 'distutils' It's worth mentioning that I am still on the "default/linux/amd64/17.1/systemd/merged-usr" profile. I didn't upgrade to "default/linux/amd64/23.0/systemd" yet. Should this is the cause please let me know. Reproducible: Always Steps to Reproduce: emerge net-firewall/ufw Actual Results: ModuleNotFoundError: No module named 'distutils' * ERROR: net-firewall/ufw-0.36.1::gentoo failed (compile phase): * (no error message) * * Call stack: * ebuild.sh, line 136: Called src_compile * environment, line 4747: Called distutils-r1_src_compile * environment, line 2187: Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile' * environment, line 773: Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 4271: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 3718: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 3716: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 1242: Called distutils-r1_run_phase 'distutils-r1_python_compile' * environment, line 2169: Called distutils-r1_python_compile * environment, line 1955: Called esetup.py 'build' '-j' '5' * environment, line 2869: Called die * The specific snippet of code: * "${@}" || die -n; * * If you need support, post the output of `emerge --info '=net-firewall/ufw-0.36.1::gentoo'`, * the complete build log and the output of `emerge -pqv '=net-firewall/ufw-0.36.1::gentoo'`. * The complete build log is located at '/var/tmp/portage/net-firewall/ufw-0.36.1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-firewall/ufw-0.36.1/temp/environment'. * Working directory: '/var/tmp/portage/net-firewall/ufw-0.36.1/work/ufw-0.36.1-python3_12' * S: '/var/tmp/portage/net-firewall/ufw-0.36.1/work/ufw-0.36.1' * Messages for package net-firewall/ufw-0.36.1: * ERROR: net-firewall/ufw-0.36.1::gentoo failed (compile phase): * (no error message) * * Call stack: * ebuild.sh, line 136: Called src_compile * environment, line 4747: Called distutils-r1_src_compile * environment, line 2187: Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile' * environment, line 773: Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 4271: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 3718: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 3716: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 1242: Called distutils-r1_run_phase 'distutils-r1_python_compile' * environment, line 2169: Called distutils-r1_python_compile * environment, line 1955: Called esetup.py 'build' '-j' '5' * environment, line 2869: Called die * The specific snippet of code: * "${@}" || die -n; * * If you need support, post the output of `emerge --info '=net-firewall/ufw-0.36.1::gentoo'`, * the complete build log and the output of `emerge -pqv '=net-firewall/ufw-0.36.1::gentoo'`. * The complete build log is located at '/var/tmp/portage/net-firewall/ufw-0.36.1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-firewall/ufw-0.36.1/temp/environment'. * Working directory: '/var/tmp/portage/net-firewall/ufw-0.36.1/work/ufw-0.36.1-python3_12' * S: '/var/tmp/portage/net-firewall/ufw-0.36.1/work/ufw-0.36.1' emerge -pqv '=net-firewall/ufw-0.36.1::gentoo' [ebuild R ] net-firewall/ufw-0.36.1 USE="ipv6 -examples" PYTHON_TARGETS="python3_12%* -python3_10 -python3_11* ********** emerge --info '=net-firewall/ufw-0.36.1::gentoo' Portage 3.0.63 (python 3.11.9-final-0, default/linux/amd64/17.1/systemd/merged-usr, gcc-13, glibc-2.39-r6, 5.15.158-gentoo-x86_64 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.15.158-gentoo-x86_64-x86_64-Intel-R-_Xeon-R-_CPU_E3-1226_v3_@_3.30GHz-with-glibc2.39 KiB Mem: 24541364 total, 2045296 free KiB Swap: 8388604 total, 8381692 free Timestamp of repository gentoo: Mon, 03 Jun 2024 16:00:01 +0000 Head commit of repository gentoo: 182b76a54b267df1ee45f39883302414886d5765 Timestamp of repository php-72: Mon Jul 3 04:41:18 PM EEST 2023 sh bash 5.1_p16-r6 ld GNU ld (Gentoo 2.42 p3) 2.42.0 app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.1_p16-r6::gentoo dev-build/autoconf: 2.71-r7::gentoo dev-build/automake: 1.16.5-r2::gentoo dev-build/cmake: 3.28.5::gentoo dev-build/libtool: 2.4.7-r4::gentoo dev-build/make: 4.4.1-r1::gentoo dev-build/meson: 1.4.0-r1::gentoo dev-java/java-config: 2.3.3-r1::gentoo dev-lang/perl: 5.38.2-r3::gentoo dev-lang/python: 3.11.9::gentoo, 3.12.3::gentoo dev-lang/rust-bin: 1.77.1::gentoo sys-apps/baselayout: 2.15::gentoo sys-apps/sandbox: 2.38::gentoo sys-apps/systemd: 255.4::gentoo sys-devel/binutils: 2.42-r1::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/gcc: 13.2.1_p20240210::gentoo sys-devel/gcc-config: 2.11::gentoo sys-kernel/linux-headers: 5.15-r3::gentoo (virtual/os-headers) sys-libs/glibc: 2.39-r6::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 volatile: False sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 sync-rsync-verify-max-age: 24 sync-rsync-verify-metamanifest: yes php-72 location: /var/db/repos/php-72 masters: gentoo volatile: False ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=haswell -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d" CXXFLAGS="-march=haswell -O2 -pipe" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME" FCFLAGS="-march=haswell -O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=haswell -O2 -pipe" GENTOO_MIRRORS="http://ftp.romnet.org/gentoo/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LEX="flex" MAKEOPTS="-j5" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" 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" SHELL="/bin/bash" USE="acl amd64 apache2 bzip2 cli crypt dri fortran gdbm iconv ipv6 libtirpc multilib mysql ncurses nls ocamlopt openmp pam pcre readline seccomp snmp ssl systemd test-rust threads udev unicode xattr zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS ================================================================= Package Settings ================================================================= net-firewall/ufw-0.36.1::gentoo was built with the following: USE="ipv6 userland_GNU -examples" ABI_X86="(64)" PYTHON_TARGETS="python3_11 -python3_10" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live 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 qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
Missing setuptools[python_targets_python3_12] dependency. As an immediate workaround you can install setuptools with PYTHON_TARGETS: python3_12
Created attachment 894996 [details] emerge conflicts (In reply to Alfred Wingate from comment #1) > Missing setuptools[python_targets_python3_12] dependency. > > As an immediate workaround you can install setuptools with PYTHON_TARGETS: > python3_12 Thank you for the reply. It doesn't work. I added "dev-python/setuptools python_targets_python3_12" to package.use and got the attached conflicts when tried to emerge it.
You have three approaches available. A) Stay on python3_11 until python3_12 is in a better state for your package needs. B) Enable python3_11 and python3_12 to allow a transition. C) Go through through all those dependencies and enable python3_12 in all packages so that setuptools can be installed with that.
(In reply to Alfred Wingate from comment #3) > You have three approaches available. > > A) Stay on python3_11 until python3_12 is in a better state for your package > needs. > B) Enable python3_11 and python3_12 to allow a transition. > C) Go through through all those dependencies and enable python3_12 in all > packages so that setuptools can be installed with that. I would go for option A). Do you know when I should expect python3_12 to be in a better state? Also, could you please elaborate on option B)? What exactly should I do?
(In reply to Victor Costache from comment #4) > I would go for option A). Do you know when I should expect python3_12 to be > in a better state? I can't unfortunately say anything definitive, this is a human problem where someone has go through the packages and check that python3.12 works and push it. I'd look at what packages you use and don't have python3.12, then look out for when they get support. For following changes you could use an rss reader and either follow the feeds from the git repo or package.gentoo.org per package. (In reply to Victor Costache from comment #4) > Also, could you please elaborate on option B)? What exactly should I do? I'm referring to the fourth option in the news item. So "Safer upgrade procedure" and just holding off on removing python3.11 support until you feel ready. https://www.gentoo.org/support/news-items/2024-05-09-python3-12.html
(In reply to Alfred Wingate from comment #5) > I'm referring to the fourth option in the news item. So "Safer upgrade > procedure" and just holding off on removing python3.11 support until you > feel ready. > > https://www.gentoo.org/support/news-items/2024-05-09-python3-12.html I followed the described procedure and added */* PYTHON_TARGETS: -* python3_11 python3_12 */* PYTHON_SINGLE_TARGET: -* python3_11 to package.use and upgraded the world, but I got the same error when reached net-firewall/ufw-0.36.1
Did you have setuptools installed with the python3.12 target at the time? The issue hasnt been addressed yet in the tree so you would have to make sure manually. Otherwise you could disable python3_12 for ufw specifically until it has been handled.
(In reply to Alfred Wingate from comment #7) > Did you have setuptools installed with the python3.12 target at the time? > > The issue hasnt been addressed yet in the tree so you would have to make > sure manually. > > Otherwise you could disable python3_12 for ufw specifically until it has > been handled. No, the workaround was adding the following to package.use: net-firewall/ufw PYTHON_TARGETS: -python3_12
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef05fb48597a890fe15a75f1b78a179e2fe2e8d9 commit ef05fb48597a890fe15a75f1b78a179e2fe2e8d9 Author: Alfred Wingate <parona@protonmail.com> AuthorDate: 2024-06-03 16:35:21 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-06-04 07:12:22 +0000 net-firewall/ufw: add missing dependency for setuptools * With python3.12 distutils isnt included with the interpeter but is instead bundled in setuptools. Closes: https://bugs.gentoo.org/933481 Signed-off-by: Alfred Wingate <parona@protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/37000 Signed-off-by: Sam James <sam@gentoo.org> net-firewall/ufw/ufw-0.36.1.ebuild | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)