Gentoo Archives: gentoo-dev

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

Attachments

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

Replies