Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 1/1] kernel-2.eclass: Remove DEBLOB support.
Date: Sun, 19 Feb 2017 21:11:27
Message-Id: 1487538666.13337.0.camel@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/1] kernel-2.eclass: Remove DEBLOB support. by Mike Pagano
1 W dniu 19.02.2017, nie o godzinie 12∶32 -0500, użytkownik Mike Pagano
2 napisał:
3 > Upstream does not version patches and every change breaks the manifest
4 > which
5 > breaks the tree. This results in a constant chasing of bugs since we can't
6 > predict the breakage.
7
8 Shouldn't you also remove python-any-r1 and related code? I think that's
9 the only thing using Python in there.
10
11 >
12 > Signed-off-by: Mike Pagano <mpagano@g.o>
13 > ---
14 > eclass/kernel-2.eclass | 102
15 > +------------------------------------------------
16 > 1 file changed, 2 insertions(+), 100 deletions(-)
17 >
18 > diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
19 > index 0c9ce04..dcf94f4 100644
20 > --- a/eclass/kernel-2.eclass
21 > +++ b/eclass/kernel-2.eclass
22 > @@ -129,26 +129,6 @@
23 > # If set, this kernel is unsupported by Gentoo Security
24 > # to the current eclass maintainer :)
25 >
26 > -# @ECLASS-VARIABLE: K_DEBLOB_AVAILABLE
27 > -# @DEFAULT_UNSET
28 > -# @DESCRIPTION:
29 > -# A value of "0" will disable all of the optional deblob
30 > -# code. If empty, will be set to "1" if deblobbing is
31 > -# possible. Test ONLY for "1".
32 > -
33 > -# @ECLASS-VARIABLE: K_DEBLOB_TAG
34 > -# @DEFAULT_UNSET
35 > -# @DESCRIPTION:
36 > -# This will be the version of deblob script. It's a upstream SVN tag
37 > -# such asw -gnu or -gnu1.
38 > -
39 > -# @ECLASS-VARIABLE: K_PREDEBLOBBED
40 > -# @DEFAULT_UNSET
41 > -# @DESCRIPTION:
42 > -# This kernel was already deblobbed elsewhere.
43 > -# If false, either optional deblobbing will be available
44 > -# or the license will note the inclusion of freedist code.
45 > -
46 > # @ECLASS-VARIABLE: K_LONGTERM
47 > # @DEFAULT_UNSET
48 > # @DESCRIPTION:
49 > @@ -219,11 +199,6 @@ HOMEPAGE="https://www.kernel.org/
50 > https://www.gentoo.org/ ${HOMEPAGE}"
51 >
52 > has "${EAPI:-0}" 0 1 2 && ED=${D} EPREFIX= EROOT=${ROOT}
53 >
54 > -# This is the latest KV_PATCH of the deblob tool available from the
55 > -# libre-sources upstream. If you bump this, you MUST regenerate the
56 > Manifests
57 > -# for ALL kernel-2 consumer packages where deblob is available.
58 > -: ${DEBLOB_MAX_VERSION:=38}
59 > -
60 > # No need to run scanelf/strip on kernel sources/headers (bug #134453).
61 > RESTRICT="binchecks strip"
62 >
63 > @@ -603,59 +578,6 @@ if [[ ${ETYPE} == sources ]]; then
64 > DESCRIPTION="Sources based on the Linux Kernel."
65 > IUSE="symlink build"
66 >
67 > - # Bug #266157, deblob for libre support
68 > - if [[ -z ${K_PREDEBLOBBED} ]] ; then
69 > - # Bug #359865, force a call to detect_version if needed
70 > - kernel_is ge 2 6 27 && \
71 > - [[ -z "${K_DEBLOB_AVAILABLE}" ]] && \
72 > - kernel_is le 2 6 ${DEBLOB_MAX_VERSION} && \
73 > - K_DEBLOB_AVAILABLE=1
74 > - if [[ ${K_DEBLOB_AVAILABLE} == "1" ]] ; then
75 > - IUSE="${IUSE} deblob"
76 > -
77 > - # Reflect that kernels contain firmware blobs unless otherwise
78 > - # stripped
79 > - LICENSE="${LICENSE} !deblob? ( freedist )"
80 > -
81 > - DEPEND+=" deblob? ( ${PYTHON_DEPS} )"
82 > -
83 > - if [[ -n KV_MINOR ]]; then
84 > - DEBLOB_PV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
85 > - else
86 > - DEBLOB_PV="${KV_MAJOR}.${KV_PATCH}"
87 > - fi
88 > -
89 > - if [[ ${KV_MAJOR} -ge 3 ]]; then
90 > - DEBLOB_PV="${KV_MAJOR}.${KV_MINOR}"
91 > - fi
92 > -
93 > - # deblob svn tag, default is -gnu, to change, use K_DEBLOB_TAG in ebuild
94 > - K_DEBLOB_TAG=${K_DEBLOB_TAG:--gnu}
95 > - DEBLOB_A="deblob-${DEBLOB_PV}"
96 > - DEBLOB_CHECK_A="deblob-check-${DEBLOB_PV}"
97 > -
98 > DEBLOB_HOMEPAGE="http://www.fsfla.org/svn/fsfla/software/linux-libre/releases/tags"
99 > - DEBLOB_URI_PATH="${DEBLOB_PV}${K_DEBLOB_TAG}"
100 > - if ! has "${EAPI:-0}" 0 1 ; then
101 > -
102 > DEBLOB_CHECK_URI="${DEBLOB_HOMEPAGE}/${DEBLOB_URI_PATH}/deblob-check ->
103 > ${DEBLOB_CHECK_A}"
104 > - else
105 > - DEBLOB_CHECK_URI="mirror://gentoo/${DEBLOB_CHECK_A}"
106 > - fi
107 > -
108 > - DEBLOB_URI="${DEBLOB_HOMEPAGE}/${DEBLOB_URI_PATH}/${DEBLOB_A}"
109 > - HOMEPAGE="${HOMEPAGE} ${DEBLOB_HOMEPAGE}"
110 > -
111 > - KERNEL_URI="${KERNEL_URI}
112 > - deblob? (
113 > - ${DEBLOB_URI}
114 > - ${DEBLOB_CHECK_URI}
115 > - )"
116 > - else
117 > - # We have no way to deblob older kernels, so just mark them as
118 > - # tainted with non-libre materials.
119 > - LICENSE="${LICENSE} freedist"
120 > - fi
121 > - fi
122 > -
123 > elif [[ ${ETYPE} == headers ]]; then
124 > DESCRIPTION="Linux system headers"
125 > IUSE="crosscompile_opts_headers-only"
126 > @@ -999,14 +921,6 @@ postinst_sources() {
127 > # if we have USE=symlink, then force K_SYMLINK=1
128 > use symlink && K_SYMLINK=1
129 >
130 > - # We do support security on a deblobbed kernel, bug #555878.
131 > - # If some particular kernel version doesn't have security
132 > - # supported because of USE=deblob or otherwise, one can still
133 > - # set K_SECURITY_UNSUPPORTED on a per ebuild basis.
134 > - #[[ $K_DEBLOB_AVAILABLE == 1 ]] && \
135 > - # use deblob && \
136 > - # K_SECURITY_UNSUPPORTED=deblob
137 > -
138 > # if we are to forcably symlink, delete it if it already exists first.
139 > if [[ ${K_SYMLINK} > 0 ]]; then
140 > [[ -h ${EROOT}usr/src/linux ]] && { rm "${EROOT}"usr/src/linux || die; }
141 > @@ -1439,7 +1353,7 @@ headers___fix() {
142 > # @FUNCTION: kernel-2_src_unpack()
143 > # @USAGE:
144 > # @DESCRIPTION:
145 > -# unpack sources, handle genpatches, deblob
146 > +# unpack sources, handle genpatches
147 >
148 > kernel-2_src_unpack() {
149 > universal_unpack
150 > @@ -1478,12 +1392,6 @@ kernel-2_src_unpack() {
151 > kernel_is 2 6 && unpack_2_6
152 > fi
153 >
154 > - if [[ $K_DEBLOB_AVAILABLE == 1 ]] && use deblob ; then
155 > - cp "${DISTDIR}/${DEBLOB_A}" "${T}" || die "cp ${DEBLOB_A} failed"
156 > - cp "${DISTDIR}/${DEBLOB_CHECK_A}" "${T}/deblob-check" || die "cp
157 > ${DEBLOB_CHECK_A} failed"
158 > - chmod +x "${T}/${DEBLOB_A}" "${T}/deblob-check" || die "chmod deblob
159 > scripts failed"
160 > - fi
161 > -
162 > # fix a problem on ppc where TOUT writes to /usr/src/linux breaking
163 > sandbox
164 > # only do this for kernel < 2.6.27 since this file does not exist in later
165 > # kernels
166 > @@ -1517,17 +1425,11 @@ kernel-2_src_prepare() {
167 > # @FUNCTION: kernel-2_src_compile
168 > # @USAGE:
169 > # @DESCRIPTION:
170 > -# conpile headers or run deblob script
171 > +# conpile headers
172 >
173 > kernel-2_src_compile() {
174 > cd "${S}"
175 > [[ ${ETYPE} == headers ]] && compile_headers
176 > -
177 > - if [[ $K_DEBLOB_AVAILABLE == 1 ]] && use deblob ; then
178 > - echo ">>> Running deblob script ..."
179 > - python_setup
180 > - sh "${T}/${DEBLOB_A}" --force || die "Deblob script failed to run!!!"
181 > - fi
182 > }
183 >
184 > # @FUNCTION: kernel-2_src_test
185
186 --
187 Best regards,
188 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature