Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 744808 - sys-kernel/rt-sources: depends on py2.7 (via deblob)
Summary: sys-kernel/rt-sources: depends on py2.7 (via deblob)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Alice Ferrazzi
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: py3-tracker, python-3-incompatible
  Show dependency tree
 
Reported: 2020-09-26 12:58 UTC by Michał Górny
Modified: 2021-08-23 09:55 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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-09-26 12:58:58 UTC
I suppose this one can easily be resolved via killing deblob support.
Comment 1 Michael 'veremitz' Everitt 2020-09-26 17:25:06 UTC
Some time ago I looked into deblobbing as part of kernel team. tl;dr there are a number of approaches to deblobbing and it seems linux-libre have moved away from python as being the definitive script source. The current version of deblob-check is at https://www.fsfla.org/svn/fsfla/software/linux-libre/scripts/deblob-check and includes support for python, sed, awk and perl.
I note in the script the following:
#    --use-python: Choose the internal python script for the bulk of
#		the work.  This is the fastest for cleaning up,
#		because of the fast startup time of the regular
#		expression engine.  This option is the default if
#		python is found.  Set PYTHON to override the python
#		interpreter.  The internal script works in both Python
#		2 and 3.

So I guess it's about time we re-visited the scripts we're using for this, to ensure they're up-to-date.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-06-20 06:46:14 UTC
Ping.
Comment 3 Alice Ferrazzi Gentoo Infrastructure gentoo-dev 2021-07-21 02:01:59 UTC
Testing deblob script against python 3.8 with all the current rt-sources
Comment 4 Alice Ferrazzi Gentoo Infrastructure gentoo-dev 2021-07-21 06:39:22 UTC
">=sys-kernel/rt-sources-5.10" works correctly with 
PYTHON_COMPAT=( python3_{7..10} )
Comment 5 Alice Ferrazzi Gentoo Infrastructure gentoo-dev 2021-07-22 15:01:26 UTC
From 76a21b0b6875209ecdcefe4876eaa7a879c95942 Mon Sep 17 00:00:00 2001
From: Alice Ferrazzi <alicef@gentoo.org>
Date: Thu, 22 Jul 2021 23:57:32 +0900
Subject: [PATCH] Add deblob support only for python3

Signed-off-by: Alice Ferrazzi <alicef@gentoo.org>
---
 eclass/kernel-2.eclass | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index f94dd9c..05f8161 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -605,7 +605,7 @@ if [[ ${ETYPE} == sources ]]; then
                                kernel_is le 2 6 ${DEBLOB_MAX_VERSION} && \
                                        K_DEBLOB_AVAILABLE=1
                if [[ ${K_DEBLOB_AVAILABLE} == 1 ]]; then
-                       PYTHON_COMPAT=( python2_7 )
+                       PYTHON_COMPAT=( python3_{7..10} )
 
                        inherit python-any-r1
 
@@ -1489,9 +1489,14 @@ kernel-2_src_compile() {
        [[ ${ETYPE} == headers ]] && compile_headers
 
        if [[ ${K_DEBLOB_AVAILABLE} == 1 ]] && use deblob; then
-               einfo ">>> Running deblob script ..."
-               python_setup
-               sh "${T}/${DEBLOB_A}" --force || die "Deblob script failed to run!!!"
+               # deblob less than 5.10 require python 2.7
+               if kernel_is lt 5 10; then
+                       ewarn "we don't support deblob for kernel less then 5.10"
+               else
+                       einfo ">>> Running deblob script ..."
+                       python_setup
+                       sh "${T}/${DEBLOB_A}" --force || die "Deblob script failed to run!!!"
+               fi
        fi
 }
 
-- 
2.25.3
Comment 6 Larry the Git Cow gentoo-dev 2021-08-23 09:55:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a99ab2b1d96d3f10258eb896ce61b7e7fc6160f

commit 7a99ab2b1d96d3f10258eb896ce61b7e7fc6160f
Author:     Alice Ferrazzi <alicef@gentoo.org>
AuthorDate: 2021-07-22 14:57:32 +0000
Commit:     Alice Ferrazzi <alicef@gentoo.org>
CommitDate: 2021-08-23 09:54:49 +0000

    kernel-2.eclass: Add deblob support only for python3
    
    Closes: https://bugs.gentoo.org/744808
    
    Signed-off-by: Alice Ferrazzi <alicef@gentoo.org>

 eclass/kernel-2.eclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)