Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/genkernel/
Date: Sat, 25 Sep 2021 19:26:28
Message-Id: 1632597980.b4b808192b6f0218684e90d70673abccdd44c39f.whissi@gentoo
1 commit: b4b808192b6f0218684e90d70673abccdd44c39f
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 25 18:24:19 2021 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 25 19:26:20 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4b80819
7
8 sys-kernel/genkernel: bump to v4.2.4
9
10 Package-Manager: Portage-3.0.23, Repoman-3.0.3
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 sys-kernel/genkernel/Manifest | 1 +
14 sys-kernel/genkernel/genkernel-4.2.4.ebuild | 312 ++++++++++++++++++++++++++++
15 2 files changed, 313 insertions(+)
16
17 diff --git a/sys-kernel/genkernel/Manifest b/sys-kernel/genkernel/Manifest
18 index 084fd5395dc..7494f45e6b8 100644
19 --- a/sys-kernel/genkernel/Manifest
20 +++ b/sys-kernel/genkernel/Manifest
21 @@ -21,6 +21,7 @@ DIST expat-2.4.1.tar.xz 445024 BLAKE2B 2ae66d284a03176ef7290093f59bb7ad98011dfbf
22 DIST fuse-2.9.9.tar.gz 1813177 BLAKE2B 9e9141380bda46eb0bcce325c6fd293fe3844fe884a4952bb38d4b89dc48b728ffcc891038b3a7a861f05acfacce9dd7bb0e11d600609f3ad0ab278ccbe98847 SHA512 3d82fafd04f2924299bb09d2bb144935fa004a43fb9a6568e2e1cc5a60fded2efa1711029a0d7f12b3e6e4501f7217f2ee3545646d89da8dece083cb390f23e2
23 DIST genkernel-4.0.10.tar.xz 460816 BLAKE2B d5922eede1192bb95ca235106a70118826c2c4c078f741e25954485f142d858bf612f35b94553fc409e4f6641b256a2940f83131c5b4bc7d6dbae85019bee7ff SHA512 29dc29b346b132cc6e7ea5298e49c93d01ba28531928cb7a6125864c7d03b74f70bc74043b220dfbbb6651ad67fcbc3d8ed8a2d0f40d271b83e9a8ab0325a2dd
24 DIST genkernel-4.2.3.tar.xz 486688 BLAKE2B bd6546ef3c7205e14b8d7e563899fc13bd0c1f90e929c6a805f9e89758fb56fac5cc4ebf6f44d708cf199fc6e2a42704a9d4314bdcceb11e402afb9877608cc6 SHA512 a35b87931e080fe1b61032f8ea655b774c29d652086b7bf31f98aa829490edf8a9e9dbd41c5b8274b64db1946b162977d907f3665da1d99a62666f745f62b6f1
25 +DIST genkernel-4.2.4.tar.xz 472744 BLAKE2B 712edd219611ce2fa43ec5987ebeff0e21d96d2199fe9ab5d65bd957d20b15d8d9c8c61b8432e820afc70844888553b433c3acc59148fc1eb8aa2426027c5b65 SHA512 0c0638ad5b345cd9450fb28981939fdd9e31e55871c5fe73438ffb3067c50e6935b2bc0f8ce22af03153710e48063fd327ff64e9c34f59ee760917bde8c51578
26 DIST gnupg-1.4.23.tar.bz2 3749353 BLAKE2B ec5e6bef0c7bb2a65813d7852cebeaa24c4855f9d9d9e802070da50b89fff56b747682933aa766dd130f849efcfe28f7aa74f3153405429bcf3845ef29c6dd6e SHA512 78dc52a2010202a4afc8814b29fda657a6c9fe230d5e7db11ae040edd2b0ca819e1baa4dbd6c0d04d36cd353df484e83f52d17759d2891c2cf7025c0b5d36612
27 DIST hwids-20210613.tar.gz 3867741 BLAKE2B 64c4b0a83058a2052f7b132241008a3cc75452e93a9a57a9159c357c23fd09ee256abc2b94e700b5d8e8bd4e231ae12932d2c2f32fb03853207739cb3387047d SHA512 4568f6b8c0ca80ec772bd2785d4dc169d1d13a721472a15399158d9a7f31abbe414c5c8cfdf1a3b81cce4e33742a4b6e005e97e3e907643d0afdc8e953624fea
28 DIST json-c-0.13.1.tar.gz 639425 BLAKE2B 1da310309f9ce03306a9fd4a161670e460cf0b2222348df7c006902390f74a4cf100aab1ce6ac8a361a278dd917c114a278de5b3445817f3a40ae287478add46 SHA512 e984db2a42b9c95b52c798b2e8dd1b79951a8dcba27370af30c43b9549fbb00008dbcf052a535c528209aaee38e6d1f760168b706905ae72f3e704ed20f8a1a1
29
30 diff --git a/sys-kernel/genkernel/genkernel-4.2.4.ebuild b/sys-kernel/genkernel/genkernel-4.2.4.ebuild
31 new file mode 100644
32 index 00000000000..a7c583a33ed
33 --- /dev/null
34 +++ b/sys-kernel/genkernel/genkernel-4.2.4.ebuild
35 @@ -0,0 +1,312 @@
36 +# Copyright 1999-2021 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +# genkernel-9999 -> latest Git branch "master"
40 +# genkernel-VERSION -> normal genkernel release
41 +
42 +EAPI="7"
43 +
44 +PYTHON_COMPAT=( python3_{7..10} )
45 +
46 +inherit bash-completion-r1 python-single-r1
47 +
48 +# Whenever you bump a GKPKG, check if you have to move
49 +# or add new patches!
50 +VERSION_BCACHE_TOOLS="1.0.8_p20141204"
51 +VERSION_BOOST="1.76.0"
52 +VERSION_BTRFS_PROGS="5.12.1"
53 +VERSION_BUSYBOX="1.33.1"
54 +VERSION_COREUTILS="8.32"
55 +VERSION_CRYPTSETUP="2.3.6"
56 +VERSION_DMRAID="1.0.0.rc16-3"
57 +VERSION_DROPBEAR="2020.81"
58 +VERSION_EUDEV="3.2.10"
59 +VERSION_EXPAT="2.4.1"
60 +VERSION_E2FSPROGS="1.46.2"
61 +VERSION_FUSE="2.9.9"
62 +VERSION_GPG="1.4.23"
63 +VERSION_HWIDS="20210613"
64 +VERSION_ISCSI="2.0.878"
65 +VERSION_JSON_C="0.13.1"
66 +VERSION_KMOD="29"
67 +VERSION_LIBAIO="0.3.112"
68 +VERSION_LIBGCRYPT="1.9.3"
69 +VERSION_LIBGPGERROR="1.42"
70 +VERSION_LIBXCRYPT="4.4.23"
71 +VERSION_LVM="2.02.188"
72 +VERSION_LZO="2.10"
73 +VERSION_MDADM="4.1"
74 +VERSION_POPT="1.18"
75 +VERSION_STRACE="5.12"
76 +VERSION_THIN_PROVISIONING_TOOLS="0.9.0"
77 +VERSION_UNIONFS_FUSE="2.0"
78 +VERSION_UTIL_LINUX="2.37"
79 +VERSION_XFSPROGS="5.12.0"
80 +VERSION_XZ="5.2.5"
81 +VERSION_ZLIB="1.2.11"
82 +VERSION_ZSTD="1.5.0"
83 +
84 +COMMON_URI="
85 + https://github.com/g2p/bcache-tools/archive/399021549984ad27bf4a13ae85e458833fe003d7.tar.gz -> bcache-tools-${VERSION_BCACHE_TOOLS}.tar.gz
86 + https://dl.bintray.com/boostorg/release/${VERSION_BOOST}/source/boost_${VERSION_BOOST//./_}.tar.bz2
87 + https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${VERSION_BTRFS_PROGS}.tar.xz
88 + https://www.busybox.net/downloads/busybox-${VERSION_BUSYBOX}.tar.bz2
89 + mirror://gnu/coreutils/coreutils-${VERSION_COREUTILS}.tar.xz
90 + https://www.kernel.org/pub/linux/utils/cryptsetup/v$(ver_cut 1-2 ${VERSION_CRYPTSETUP})/cryptsetup-${VERSION_CRYPTSETUP}.tar.xz
91 + https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-${VERSION_DMRAID}.tar.bz2
92 + https://matt.ucc.asn.au/dropbear/releases/dropbear-${VERSION_DROPBEAR}.tar.bz2
93 + https://dev.gentoo.org/~blueness/eudev/eudev-${VERSION_EUDEV}.tar.gz
94 + https://github.com/libexpat/libexpat/releases/download/R_${VERSION_EXPAT//\./_}/expat-${VERSION_EXPAT}.tar.xz
95 + https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v${VERSION_E2FSPROGS}/e2fsprogs-${VERSION_E2FSPROGS}.tar.xz
96 + https://github.com/libfuse/libfuse/releases/download/fuse-${VERSION_FUSE}/fuse-${VERSION_FUSE}.tar.gz
97 + mirror://gnupg/gnupg/gnupg-${VERSION_GPG}.tar.bz2
98 + https://github.com/gentoo/hwids/archive/hwids-${VERSION_HWIDS}.tar.gz
99 + https://github.com/open-iscsi/open-iscsi/archive/${VERSION_ISCSI}.tar.gz -> open-iscsi-${VERSION_ISCSI}.tar.gz
100 + https://s3.amazonaws.com/json-c_releases/releases/json-c-${VERSION_JSON_C}.tar.gz
101 + https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-${VERSION_KMOD}.tar.xz
102 + https://releases.pagure.org/libaio/libaio-${VERSION_LIBAIO}.tar.gz
103 + mirror://gnupg/libgcrypt/libgcrypt-${VERSION_LIBGCRYPT}.tar.bz2
104 + mirror://gnupg/libgpg-error/libgpg-error-${VERSION_LIBGPGERROR}.tar.bz2
105 + https://github.com/besser82/libxcrypt/archive/v${VERSION_LIBXCRYPT}.tar.gz -> libxcrypt-${VERSION_LIBXCRYPT}.tar.gz
106 + https://mirrors.kernel.org/sourceware/lvm2/LVM2.${VERSION_LVM}.tgz
107 + https://www.oberhumer.com/opensource/lzo/download/lzo-${VERSION_LZO}.tar.gz
108 + https://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-${VERSION_MDADM}.tar.xz
109 + http://ftp.rpm.org/popt/releases/popt-1.x/popt-${VERSION_POPT}.tar.gz
110 + https://github.com/strace/strace/releases/download/v${VERSION_STRACE}/strace-${VERSION_STRACE}.tar.xz
111 + https://github.com/jthornber/thin-provisioning-tools/archive/v${VERSION_THIN_PROVISIONING_TOOLS}.tar.gz -> thin-provisioning-tools-${VERSION_THIN_PROVISIONING_TOOLS}.tar.gz
112 + https://github.com/rpodgorny/unionfs-fuse/archive/v${VERSION_UNIONFS_FUSE}.tar.gz -> unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.gz
113 + https://www.kernel.org/pub/linux/utils/util-linux/v${VERSION_UTIL_LINUX:0:4}/util-linux-${VERSION_UTIL_LINUX}.tar.xz
114 + https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-${VERSION_XFSPROGS}.tar.xz
115 + https://tukaani.org/xz/xz-${VERSION_XZ}.tar.gz
116 + https://zlib.net/zlib-${VERSION_ZLIB}.tar.gz
117 + https://github.com/facebook/zstd/archive/v${VERSION_ZSTD}.tar.gz -> zstd-${VERSION_ZSTD}.tar.gz
118 +"
119 +
120 +if [[ ${PV} == 9999* ]] ; then
121 + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
122 + inherit git-r3
123 + S="${WORKDIR}/${P}"
124 + SRC_URI="${COMMON_URI}"
125 +else
126 + SRC_URI="https://dev.gentoo.org/~whissi/dist/genkernel/${P}.tar.xz
127 + ${COMMON_URI}"
128 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
129 +fi
130 +
131 +DESCRIPTION="Gentoo automatic kernel building scripts"
132 +HOMEPAGE="https://wiki.gentoo.org/wiki/Genkernel https://gitweb.gentoo.org/proj/genkernel.git/"
133 +
134 +LICENSE="GPL-2"
135 +SLOT="0"
136 +RESTRICT=""
137 +IUSE="ibm +firmware"
138 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
139 +
140 +# Note:
141 +# We need sys-devel/* deps like autoconf or automake at _runtime_
142 +# because genkernel will usually build things like LVM2, cryptsetup,
143 +# mdadm... during initramfs generation which will require these
144 +# things.
145 +DEPEND=""
146 +RDEPEND="${PYTHON_DEPS}
147 + app-arch/cpio
148 + >=app-misc/pax-utils-1.2.2
149 + app-portage/elt-patches
150 + dev-util/gperf
151 + sys-apps/sandbox
152 + sys-devel/autoconf
153 + sys-devel/autoconf-archive
154 + sys-devel/automake
155 + sys-devel/libtool
156 + virtual/pkgconfig
157 + firmware? ( sys-kernel/linux-firmware )"
158 +
159 +if [[ ${PV} == 9999* ]]; then
160 + DEPEND="${DEPEND} app-text/asciidoc"
161 +fi
162 +
163 +src_unpack() {
164 + if [[ ${PV} == 9999* ]]; then
165 + git-r3_src_unpack
166 + else
167 + local gk_src_file
168 + for gk_src_file in ${A} ; do
169 + if [[ ${gk_src_file} == genkernel-* ]] ; then
170 + unpack "${gk_src_file}"
171 + fi
172 + done
173 + fi
174 +}
175 +
176 +src_prepare() {
177 + default
178 +
179 + if [[ ${PV} == 9999* ]] ; then
180 + einfo "Updating version tag"
181 + GK_V="$(git describe --tags | sed 's:^v::')-git"
182 + sed "/^GK_V/s,=.*,='${GK_V}',g" -i "${S}"/genkernel
183 + einfo "Producing ChangeLog from Git history..."
184 + pushd "${S}/.git" >/dev/null || die
185 + git log > "${S}"/ChangeLog || die
186 + popd >/dev/null || die
187 + fi
188 +
189 + # Update software.sh
190 + sed -i \
191 + -e "s:VERSION_BCACHE_TOOLS:${VERSION_BCACHE_TOOLS}:"\
192 + -e "s:VERSION_BOOST:${VERSION_BOOST}:"\
193 + -e "s:VERSION_BTRFS_PROGS:${VERSION_BTRFS_PROGS}:"\
194 + -e "s:VERSION_BUSYBOX:${VERSION_BUSYBOX}:"\
195 + -e "s:VERSION_COREUTILS:${VERSION_COREUTILS}:"\
196 + -e "s:VERSION_CRYPTSETUP:${VERSION_CRYPTSETUP}:"\
197 + -e "s:VERSION_DMRAID:${VERSION_DMRAID}:"\
198 + -e "s:VERSION_DROPBEAR:${VERSION_DROPBEAR}:"\
199 + -e "s:VERSION_EUDEV:${VERSION_EUDEV}:"\
200 + -e "s:VERSION_EXPAT:${VERSION_EXPAT}:"\
201 + -e "s:VERSION_E2FSPROGS:${VERSION_E2FSPROGS}:"\
202 + -e "s:VERSION_FUSE:${VERSION_FUSE}:"\
203 + -e "s:VERSION_GPG:${VERSION_GPG}:"\
204 + -e "s:VERSION_HWIDS:${VERSION_HWIDS}:"\
205 + -e "s:VERSION_ISCSI:${VERSION_ISCSI}:"\
206 + -e "s:VERSION_JSON_C:${VERSION_JSON_C}:"\
207 + -e "s:VERSION_KMOD:${VERSION_KMOD}:"\
208 + -e "s:VERSION_LIBAIO:${VERSION_LIBAIO}:"\
209 + -e "s:VERSION_LIBGCRYPT:${VERSION_LIBGCRYPT}:"\
210 + -e "s:VERSION_LIBGPGERROR:${VERSION_LIBGPGERROR}:"\
211 + -e "s:VERSION_LIBXCRYPT:${VERSION_LIBXCRYPT}:"\
212 + -e "s:VERSION_LVM:${VERSION_LVM}:"\
213 + -e "s:VERSION_LZO:${VERSION_LZO}:"\
214 + -e "s:VERSION_MDADM:${VERSION_MDADM}:"\
215 + -e "s:VERSION_MULTIPATH_TOOLS:${VERSION_MULTIPATH_TOOLS}:"\
216 + -e "s:VERSION_POPT:${VERSION_POPT}:"\
217 + -e "s:VERSION_STRACE:${VERSION_STRACE}:"\
218 + -e "s:VERSION_THIN_PROVISIONING_TOOLS:${VERSION_THIN_PROVISIONING_TOOLS}:"\
219 + -e "s:VERSION_UNIONFS_FUSE:${VERSION_UNIONFS_FUSE}:"\
220 + -e "s:VERSION_USERSPACE_RCU:${VERSION_USERSPACE_RCU}:"\
221 + -e "s:VERSION_UTIL_LINUX:${VERSION_UTIL_LINUX}:"\
222 + -e "s:VERSION_XFSPROGS:${VERSION_XFSPROGS}:"\
223 + -e "s:VERSION_XZ:${VERSION_XZ}:"\
224 + -e "s:VERSION_ZLIB:${VERSION_ZLIB}:"\
225 + -e "s:VERSION_ZSTD:${VERSION_ZSTD}:"\
226 + "${S}"/defaults/software.sh \
227 + || die "Could not adjust versions"
228 +}
229 +
230 +src_compile() {
231 + if [[ ${PV} == 9999* ]] ; then
232 + emake
233 + fi
234 +}
235 +
236 +src_install() {
237 + insinto /etc
238 + doins "${S}"/genkernel.conf
239 +
240 + doman genkernel.8
241 + dodoc AUTHORS ChangeLog README TODO
242 + dobin genkernel
243 + rm -f genkernel genkernel.8 AUTHORS ChangeLog README TODO genkernel.conf
244 +
245 + if use ibm ; then
246 + cp "${S}"/arch/ppc64/kernel-2.6{-pSeries,} || die
247 + else
248 + cp "${S}"/arch/ppc64/kernel-2.6{.g5,} || die
249 + fi
250 +
251 + insinto /usr/share/genkernel
252 + doins -r "${S}"/*
253 +
254 + fperms +x /usr/share/genkernel/gen_worker.sh
255 + fperms +x /usr/share/genkernel/path_expander.py
256 +
257 + python_fix_shebang "${ED}"/usr/share/genkernel/path_expander.py
258 +
259 + newbashcomp "${FILESDIR}"/genkernel-4.bash "${PN}"
260 + insinto /etc
261 + doins "${FILESDIR}"/initramfs.mounts
262 +
263 + pushd "${DISTDIR}" &>/dev/null || die
264 + insinto /usr/share/genkernel/distfiles
265 + doins ${A/${P}.tar.xz/}
266 + popd &>/dev/null || die
267 +}
268 +
269 +pkg_postinst() {
270 + # Wiki is out of date
271 + #echo
272 + #elog 'Documentation is available in the genkernel manual page'
273 + #elog 'as well as the following URL:'
274 + #echo
275 + #elog 'https://wiki.gentoo.org/wiki/Genkernel'
276 + #echo
277 +
278 + local replacing_version
279 + for replacing_version in ${REPLACING_VERSIONS} ; do
280 + if ver_test "${replacing_version}" -lt 4 ; then
281 + # This is an upgrade which requires user review
282 +
283 + ewarn ""
284 + ewarn "Genkernel v4.x is a new major release which touches"
285 + ewarn "nearly everything. Be careful, read updated manpage"
286 + ewarn "and pay special attention to program output regarding"
287 + ewarn "changed kernel command-line parameters!"
288 +
289 + # Show this elog only once
290 + break
291 + fi
292 + done
293 +
294 + if [[ $(find /boot -name 'kernel-genkernel-*' 2>/dev/null | wc -l) -gt 0 ]] ; then
295 + ewarn ''
296 + ewarn 'Default kernel filename was changed from "kernel-genkernel-<ARCH>-<KV>"'
297 + ewarn 'to "vmlinuz-<KV>". Please be aware that due to lexical ordering the'
298 + ewarn '*default* boot entry in your boot manager could still point to last kernel'
299 + ewarn 'built with genkernel before that name change, resulting in booting old'
300 + ewarn 'kernel when not paying attention on boot.'
301 + fi
302 +
303 + # Show special warning for users depending on remote unlock capabilities
304 + local gk_config="${EROOT}/etc/genkernel.conf"
305 + if [[ -f "${gk_config}" ]] ; then
306 + if grep -q -E "^SSH=[\"\']?yes" "${gk_config}" 2>/dev/null ; then
307 + if ! grep -q dosshd /proc/cmdline 2>/dev/null ; then
308 + ewarn ""
309 + ewarn "IMPORTANT: SSH is currently enabled in your genkernel config"
310 + ewarn "file (${gk_config}). However, 'dosshd' is missing from current"
311 + ewarn "kernel command-line. You MUST add 'dosshd' to keep sshd enabled"
312 + ewarn "in genkernel v4+ initramfs!"
313 + fi
314 + fi
315 +
316 + if grep -q -E "^CMD_CALLBACK=.*emerge.*@module-rebuild" "${gk_config}" 2>/dev/null ; then
317 + elog ""
318 + elog "Please remove 'emerge @module-rebuild' from genkernel config"
319 + elog "file (${gk_config}) and make use of new MODULEREBUILD option"
320 + elog "instead."
321 + fi
322 + fi
323 +
324 + local n_root_args=$(grep -o -- '\<root=' /proc/cmdline 2>/dev/null | wc -l)
325 + if [[ ${n_root_args} > 1 ]] ; then
326 + ewarn "WARNING: Multiple root arguments (root=) on kernel command-line detected!"
327 + ewarn "If you are appending non-persistent device names to kernel command-line,"
328 + ewarn "next reboot could fail in case running system and initramfs do not agree"
329 + ewarn "on detected root device name!"
330 + fi
331 +
332 + if [[ -d /run ]] ; then
333 + local permission_run_expected="drwxr-xr-x"
334 + local permission_run=$(stat -c "%A" /run)
335 + if [[ "${permission_run}" != "${permission_run_expected}" ]] ; then
336 + ewarn "Found the following problematic permissions:"
337 + ewarn ""
338 + ewarn " ${permission_run} /run"
339 + ewarn ""
340 + ewarn "Expected:"
341 + ewarn ""
342 + ewarn " ${permission_run_expected} /run"
343 + ewarn ""
344 + ewarn "This is known to be causing problems for any UDEV-enabled service."
345 + fi
346 + fi
347 +}