diff options
Diffstat (limited to 'sys-boot')
133 files changed, 2479 insertions, 1734 deletions
diff --git a/sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild b/sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild index 94524795ae06..80ae29b8a244 100644 --- a/sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild +++ b/sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -48,7 +48,7 @@ src_prepare() { src_compile() { # too many problems with parallel building - emake -j1 AR=$(tc-getAR) CC=$(tc-getCC) LD=$(tc-getLD) + emake -j1 AR="$(tc-getAR)" CC="$(tc-getCC)" LD="$(tc-getLD)" } src_install() { diff --git a/sys-boot/aboot/aboot-2.0_pre20210801.ebuild b/sys-boot/aboot/aboot-2.0_pre20210801.ebuild index 925430679b65..0cb5a272325e 100644 --- a/sys-boot/aboot/aboot-2.0_pre20210801.ebuild +++ b/sys-boot/aboot/aboot-2.0_pre20210801.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -24,7 +24,7 @@ SLOT="0" BDEPEND="app-text/docbook-sgml-utils" src_compile() { - emake AR=$(tc-getAR) CC=$(tc-getCC) LD=$(tc-getLD) \ + emake AR="$(tc-getAR)" CC="$(tc-getCC)" LD="$(tc-getLD)" \ all netabootwrap einfo "Building man pages" diff --git a/sys-boot/aboot/aboot-9999.ebuild b/sys-boot/aboot/aboot-9999.ebuild index 2e29e829936e..494ceb2d395e 100644 --- a/sys-boot/aboot/aboot-9999.ebuild +++ b/sys-boot/aboot/aboot-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -22,7 +22,7 @@ SLOT="0" BDEPEND="app-text/docbook-sgml-utils" src_compile() { - emake AR=$(tc-getAR) CC=$(tc-getCC) LD=$(tc-getLD) \ + emake AR="$(tc-getAR)" CC="$(tc-getCC)" LD="$(tc-getLD)" \ all netabootwrap einfo "Building man pages" diff --git a/sys-boot/aboot/metadata.xml b/sys-boot/aboot/metadata.xml index 9c4a69912874..596881e8bc97 100644 --- a/sys-boot/aboot/metadata.xml +++ b/sys-boot/aboot/metadata.xml @@ -3,9 +3,10 @@ <pkgmetadata> <maintainer type="project"> <email>alpha@gentoo.org</email> - <name>Gentoo Linux Alpha Development</name> + <name>Alpha architecture team</name> </maintainer> <upstream> + <remote-id type="github">mattst88/aboot</remote-id> <remote-id type="sourceforge">aboot</remote-id> </upstream> </pkgmetadata> diff --git a/sys-boot/arcload/arcload-0.50-r3.ebuild b/sys-boot/arcload/arcload-0.50-r3.ebuild index 33e6d147541b..5374983af6f3 100644 --- a/sys-boot/arcload/arcload-0.50-r3.ebuild +++ b/sys-boot/arcload/arcload-0.50-r3.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit toolchain-funcs @@ -9,7 +9,7 @@ inherit toolchain-funcs MY_PV="${PV/50/5}" PATCHREV="1" -DESCRIPTION="ARCLoad - SGI Multi-bootloader. Able to bootload many different SGI Systems" +DESCRIPTION="ARCLoad - Bootloader for SGI IP22/IP32/IP27/IP28/IP30 Systems" HOMEPAGE="https://www.linux-mips.org/wiki/ARCLoad" SRC_URI="https://www.linux-mips.org/pub/linux/mips/people/skylark/${PN}-${MY_PV}.tar.bz2 mirror://gentoo/${P}-patches-v${PATCHREV}.tar.xz" @@ -62,7 +62,7 @@ src_compile() { # on the offchance that we're cross-compiling. echo -e "" einfo ">>> Building the 'wreckoff' utility with $(tc-getBUILD_CC) ..." - emake CC=$(tc-getBUILD_CC) tools_clean tools + emake CC="$(tc-getBUILD_CC)" tools_clean tools # 32bit copy (sashARCS for IP22/IP32) echo -e "" diff --git a/sys-boot/arcload/metadata.xml b/sys-boot/arcload/metadata.xml index 1d8148343664..3325920484ba 100644 --- a/sys-boot/arcload/metadata.xml +++ b/sys-boot/arcload/metadata.xml @@ -3,6 +3,6 @@ <pkgmetadata> <maintainer type="project"> <email>mips@gentoo.org</email> - <name>Gentoo/MIPS Port</name> + <name>MIPS architecture team</name> </maintainer> </pkgmetadata> diff --git a/sys-boot/bootcreator/metadata.xml b/sys-boot/bootcreator/metadata.xml index 4cca8acd5076..09592c79ae5d 100644 --- a/sys-boot/bootcreator/metadata.xml +++ b/sys-boot/bootcreator/metadata.xml @@ -3,6 +3,6 @@ <pkgmetadata> <maintainer type="project"> <email>ppc@gentoo.org</email> - <name>Gentoo Linux PowerPC Development</name> + <name>PowerPC architecture team</name> </maintainer> </pkgmetadata> diff --git a/sys-boot/colo/colo-1.22.ebuild b/sys-boot/colo/colo-1.22-r1.ebuild index 4593417c8e11..3bd8c4f9c121 100644 --- a/sys-boot/colo/colo-1.22.ebuild +++ b/sys-boot/colo/colo-1.22-r1.ebuild @@ -1,22 +1,23 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 -inherit epatch toolchain-funcs +EAPI=8 + +inherit toolchain-funcs DESCRIPTION="CObalt LOader - Modern bootloader for Cobalt MIPS machines" HOMEPAGE="https://www.colonel-panic.org/cobalt-mips/" SRC_URI="https://www.colonel-panic.org/cobalt-mips/colo/colo-${PV}.tar.gz" + LICENSE="GPL-2" SLOT="0" KEYWORDS="-* ~mips" -IUSE="" -DEPEND="" -RDEPEND="" + RESTRICT="strip" src_prepare() { - epatch "${FILESDIR}"/colo-stage2_src_heap-fix.patch + eapply "${FILESDIR}"/colo-stage2_src_heap-fix.patch + sed -E -i -e "s/CFLAGS_COLO=/CFLAGS_COLO:=/g" -e "/[A-Z]+= /d" Rules.mak || die # bug 725846 default } @@ -26,26 +27,27 @@ src_compile() { # Remove -Werror from CFLAGS # gcc-4.3.x is more strict; We'll go back and fix later - cd "${S}" + cd "${S}" || die + local x for x in $(grep -rl "Werror" "${S}"/*); do - sed -i -e 's/\-Werror//g' "${x}" + sed -i -e 's/\-Werror//g' "${x}" || die done # Keep elf2rfx from automatically building via the Makefile - sed -i -e 's/tools\/elf2rfx //' "${S}"/Makefile + sed -i -e 's/tools\/elf2rfx //' "${S}"/Makefile || die # Build it first with BUILD_CC in case of cross-compiles - cd "${S}"/tools/elf2rfx + cd "${S}"/tools/elf2rfx || die make CC="$(tc-getBUILD_CC)" || die # Build the rest - cd "${S}" - make clean || die # emake breaks the build + cd "${S}" || die + make clean || die # emake breaks the build make CC="$(tc-getCC)" OBJCOPY="$(tc-getOBJCOPY)" \ STRIP="$(tc-getSTRIP)" || die # Now rebuild elf2rfx again with CC so it can be installed - cd "${S}"/tools/elf2rfx + cd "${S}"/tools/elf2rfx || die make clean || die make CC="$(tc-getCC)" || die } @@ -53,8 +55,8 @@ src_compile() { src_install() { # bins dodir /usr/lib/colo - cp binaries/colo-chain.elf "${D}"/usr/lib/colo - cp binaries/colo-rom-image.bin "${D}"/usr/lib/colo + cp binaries/colo-chain.elf "${D}"/usr/lib/colo || die + cp binaries/colo-rom-image.bin "${D}"/usr/lib/colo || die # docs dodoc CHANGES INSTALL README README.{restore,shell,netcon} tools/README.tools TODO @@ -65,7 +67,7 @@ src_install() { einfo "Installing ${tool} binary to ${D}/usr/sbin" dosbin tools/${tool}/${tool} - if [ -f tools/${tool}/${tool}.8 ]; then + if [[ -f tools/${tool}/${tool}.8 ]]; then einfo "Installing ${tool} manpage to ${D}/usr/share/man" doman tools/flash-tool/flash-tool.8 fi @@ -82,7 +84,7 @@ src_install() { # bootscripts dodir /usr/lib/colo/scripts - cp "${FILESDIR}"/*.colo "${D}"/usr/lib/colo/scripts + cp "${FILESDIR}"/*.colo "${D}"/usr/lib/colo/scripts || die } pkg_postinst() { diff --git a/sys-boot/colo/metadata.xml b/sys-boot/colo/metadata.xml index 72d90a220166..3325920484ba 100644 --- a/sys-boot/colo/metadata.xml +++ b/sys-boot/colo/metadata.xml @@ -3,6 +3,6 @@ <pkgmetadata> <maintainer type="project"> <email>mips@gentoo.org</email> - <name>Mips Team</name> + <name>MIPS architecture team</name> </maintainer> </pkgmetadata> diff --git a/sys-boot/cromwell-bin/cromwell-bin-2.40-r2.ebuild b/sys-boot/cromwell-bin/cromwell-bin-2.40-r2.ebuild new file mode 100644 index 000000000000..62059734f721 --- /dev/null +++ b/sys-boot/cromwell-bin/cromwell-bin-2.40-r2.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit mount-boot + +DESCRIPTION="Xbox boot loader precompiled binaries from xbox-linux.org" +HOMEPAGE="https://sourceforge.net/projects/xbox-linux/" +SRC_URI="mirror://sourceforge/xbox-linux/cromwell-${PV}.tar.gz" +S="${WORKDIR}/cromwell-${PV}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* ~x86" +RESTRICT="${RESTRICT} strip" + +src_install() { + insinto /boot/${PN} + doins cromwell{,_1024}.bin xromwell.xbe +} diff --git a/sys-boot/dvhtool/dvhtool-1.0.1-r2.ebuild b/sys-boot/dvhtool/dvhtool-1.0.1-r2.ebuild index 01c70dd3d890..ba84fd2db50a 100644 --- a/sys-boot/dvhtool/dvhtool-1.0.1-r2.ebuild +++ b/sys-boot/dvhtool/dvhtool-1.0.1-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -7,7 +7,7 @@ inherit autotools toolchain-funcs DESCRIPTION="Tool to copy kernel(s) into the volume header on SGI MIPS-based workstations" HOMEPAGE="http://packages.debian.org/unstable/utils/dvhtool" -SRC_URI="mirror://debian/pool/main/d/dvhtool/dvhtool_1.0.1.orig.tar.gz" +SRC_URI="mirror://debian/pool/main/d/dvhtool/dvhtool_${PV}.orig.tar.gz" LICENSE="GPL-2" SLOT="0" @@ -37,11 +37,11 @@ src_prepare() { } src_configure() { - CC=$(tc-getCC) LD=$(tc-getLD) \ + CC="$(tc-getCC)" LD="$(tc-getLD)" \ econf } src_compile() { - CC=$(tc-getCC) LD=$(tc-getLD) \ + CC="$(tc-getCC)" LD="$(tc-getLD)" \ emake } diff --git a/sys-boot/dvhtool/metadata.xml b/sys-boot/dvhtool/metadata.xml index 060cff04b36d..3325920484ba 100644 --- a/sys-boot/dvhtool/metadata.xml +++ b/sys-boot/dvhtool/metadata.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<maintainer type="project"> - <email>mips@gentoo.org</email> - <name>Gentoo/MIPS Port</name> -</maintainer> + <maintainer type="project"> + <email>mips@gentoo.org</email> + <name>MIPS architecture team</name> + </maintainer> </pkgmetadata> diff --git a/sys-boot/efibootmgr/Manifest b/sys-boot/efibootmgr/Manifest index 9eb28d6dd160..07d8e0fab978 100644 --- a/sys-boot/efibootmgr/Manifest +++ b/sys-boot/efibootmgr/Manifest @@ -1,4 +1,2 @@ -DIST efibootmgr-14.tar.bz2 34972 BLAKE2B 78490756c5fd449f4319b79e0818e9d80340bd487f57d0de34f79f48cc24eb7b9c7309b535d00efad4babd40904d4cfb085cca278170625a1e875961e423f5dd SHA512 97935f8752440ce236162e174ea3404e907ebddc5877d597a97813da76ad580689fc2e97044885fc860a12a473af7183242b6120e78e53243d35e569fb002baf -DIST efibootmgr-15.tar.bz2 35476 BLAKE2B 19b7c9ce51f3b930b2d59fa4a594c7a8bf5f1c7aa3224049e88cdafe82991799b1b719ec68c80131027f70c16bd19e38157f5d0bc7761843959410c667aa4070 SHA512 d9d9eef14d373d5da88141e8105f754fea4c039755ed0a0cb9b3c9c2bb285733ad930fd912df42075fe2cf750585699307b067f594d8e65269b3b8a5a00b1cd1 -DIST efibootmgr-16.tar.bz2 36603 BLAKE2B 3d09a9d3c4ecd48010315fccae60ab408c0d08e9c734e86a944130ea03e038835fa08745819f5353efbbe36f5017be64faded4b625ef0a0b55d4ca0d612ef232 SHA512 936318c7163c07b716f89be3d830957d9db68ba1b059223f7ea3d9eafe0dbf1c91b9aee096f5aed70955c6052c3b8547295c0a47f17cdf43788259d87d1990b9 DIST efibootmgr-17.tar.gz 41643 BLAKE2B a1995a5df74766f762d2eb971fd6095edea8d0a498c9dd1100515866b40c38ae2f299aae51f12767850ec23fbe4709c2c7428dd48755fbec499669b69f6432c9 SHA512 10c7ad9a79f23dcd4708dc4f42701196af7aa11f5e9a6468ea51f7013d4caeba6c92527ba1304f6e3b2ef3b51b3b69ea1a30f81bb099a8aea49eeb30eb631e1d +DIST efibootmgr-18.tar.gz 45220 BLAKE2B 6bc3f39ee395d2045e78b19876fd9404ba41443259e9ad7446671d768a63dc1418d5a192600392fd95251159d80479008a2c22b4cd503bba2f4a869850cb3652 SHA512 04e40a705cb82440fd823043b598ef9fd1acc2ceda3e8d043a93e49d43ea9481b7386cad0f46de9862beff19b8a5480d79e7d6522ae584aff6655472f967764d diff --git a/sys-boot/efibootmgr/efibootmgr-14.ebuild b/sys-boot/efibootmgr/efibootmgr-14.ebuild deleted file mode 100644 index 8266a96d6802..000000000000 --- a/sys-boot/efibootmgr/efibootmgr-14.ebuild +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit toolchain-funcs - -DESCRIPTION="User-space application to modify the EFI boot manager" -HOMEPAGE="https://github.com/rhinstaller/efibootmgr" -SRC_URI="https://github.com/rhinstaller/efibootmgr/releases/download/${PV}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ~ia64 x86" -IUSE="" - -RDEPEND="sys-apps/pciutils - >=sys-libs/efivar-25:=" -DEPEND="${RDEPEND}" - -src_prepare() { - default - sed -i -e s/-Werror// Make.defaults || die -} - -src_configure() { - tc-export CC -} diff --git a/sys-boot/efibootmgr/efibootmgr-15.ebuild b/sys-boot/efibootmgr/efibootmgr-15.ebuild deleted file mode 100644 index b51f8d148de9..000000000000 --- a/sys-boot/efibootmgr/efibootmgr-15.ebuild +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit toolchain-funcs - -DESCRIPTION="User-space application to modify the EFI boot manager" -HOMEPAGE="https://github.com/rhinstaller/efibootmgr" -SRC_URI="https://github.com/rhinstaller/efibootmgr/releases/download/${PV}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ~ia64 x86" -IUSE="" - -RDEPEND="sys-apps/pciutils - >=sys-libs/efivar-25:=" -DEPEND="${RDEPEND}" - -src_prepare() { - default - sed -i -e s/-Werror// Make.defaults || die -} - -src_configure() { - tc-export CC - export EFIDIR="Gentoo" -} diff --git a/sys-boot/efibootmgr/efibootmgr-17.ebuild b/sys-boot/efibootmgr/efibootmgr-17-r1.ebuild index 4443462a56c3..4867892f28f8 100644 --- a/sys-boot/efibootmgr/efibootmgr-17.ebuild +++ b/sys-boot/efibootmgr/efibootmgr-17-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -11,9 +11,10 @@ SRC_URI="https://github.com/rhboot/efibootmgr/archive/${PV}.tar.gz -> ${P}.tar.g LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 ~arm arm64 ~ia64 ~riscv x86" +KEYWORDS="amd64 ~arm arm64 ~ia64 ~loong ~riscv x86" RDEPEND=" + dev-libs/popt sys-apps/pciutils >=sys-libs/efivar-37:= " diff --git a/sys-boot/efibootmgr/efibootmgr-16.ebuild b/sys-boot/efibootmgr/efibootmgr-18-r1.ebuild index d16655fc906e..05dc26fb19e5 100644 --- a/sys-boot/efibootmgr/efibootmgr-16.ebuild +++ b/sys-boot/efibootmgr/efibootmgr-18-r1.ebuild @@ -1,29 +1,29 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 inherit toolchain-funcs DESCRIPTION="User-space application to modify the EFI boot manager" HOMEPAGE="https://github.com/rhinstaller/efibootmgr" -SRC_URI="https://github.com/rhinstaller/efibootmgr/releases/download/${PV}/${P}.tar.bz2" +SRC_URI="https://github.com/rhboot/efibootmgr/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 ~arm arm64 ~ia64 x86" -IUSE="" - -RDEPEND="sys-apps/pciutils - >=sys-libs/efivar-25:=" -DEPEND=" - ${RDEPEND} - virtual/pkgconfig +KEYWORDS="amd64 arm arm64 ~ia64 ~loong ~riscv x86" + +RDEPEND=" + dev-libs/popt + sys-apps/pciutils + >=sys-libs/efivar-37:= " +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" src_prepare() { default - sed -i -e 's/-Werror //' Make.defaults || die + sed -i 's/-Werror //' Make.defaults || die } src_configure() { diff --git a/sys-boot/elilo/elilo-3.16-r5.ebuild b/sys-boot/elilo/elilo-3.16-r5.ebuild index fed811421390..1aa5387103e1 100644 --- a/sys-boot/elilo/elilo-3.16-r5.ebuild +++ b/sys-boot/elilo/elilo-3.16-r5.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -62,7 +62,7 @@ src_compile() { # "prefix" on the next line specifies where to find gcc, as, ld, # etc. It's not the usual meaning of "prefix". By blanking it we # allow PATH to be searched. - local libdir="${SYSROOT}${EPREFIX}/usr/$(get_libdir)" + local libdir="${ESYSROOT}/usr/$(get_libdir)" emake -j1 \ prefix= \ AS="$(tc-getAS)" \ @@ -71,7 +71,7 @@ src_compile() { OBJCOPY="$(tc-getOBJCOPY)" \ HOSTARCH=${iarch} \ ARCH=${iarch} \ - EFIINC="${SYSROOT}${EPREFIX}/usr/include/efi" \ + EFIINC="${ESYSROOT}/usr/include/efi" \ GNUEFILIB="${libdir}" \ EFILIB="${libdir}" \ EFICRT0="${libdir}" \ diff --git a/sys-boot/gnu-efi/Manifest b/sys-boot/gnu-efi/Manifest index 4379342f4ca7..8399a7affcd0 100644 --- a/sys-boot/gnu-efi/Manifest +++ b/sys-boot/gnu-efi/Manifest @@ -1,2 +1,3 @@ -DIST gnu-efi-3.0.12.tar.bz2 154575 BLAKE2B 264e04351cf1ef74956e65d209c00514c0f56c18427a87a894132e5a5b0b09b3ca992475a2f95aac42c8a26ff4977ec837ff473d76c1c766049e903f03bd9fff SHA512 cbec6f6e37271c22c71e3ce44d3579e48e7f3b797ec3946f56eb843ed3e472722763c566fc3b749f0c692ab6cb26e8909bb258cd164771a5b1eeff5c7cd51368 -DIST gnu-efi-3.0.14.tar.bz2 159295 BLAKE2B c7f9127d3bb7e5e2bc52f5fc7be3376ddc5076b262e5db5a30a997cf10bf10288da63ded64d11327fad09190a803ce26e82b32aea2d8525ee0d1e1a23ebadff2 SHA512 37420ba3804e8547451a7b143a689ceb6af0557234fa7801efdeba3c2fc581a5354fe34cbaacb338d7b394d913e7274098ebf07026b7c1d50b2236d7f86c470c +DIST gnu-efi-3.0.15.tar.bz2 159399 BLAKE2B 0df93d8cacfa1e6d4b7731e32287d4386da9375c5e5c5847df8a29c99d70f5c24b14abc5e44ab9d0a39a6ec96682eb2b5e84d81a5a142d44a50a522a4ae0e3c2 SHA512 64d408b6d115bdc6eebae12fbd6cd907ed5f847f54e506c1e8f8ea5de38a95cf6fac66ab1009bd1d0bd2d54ad45ad598d29bcc303926a5899bf5cc25448cbb2f +DIST gnu-efi-3.0.17.tar.bz2 165568 BLAKE2B 27f8171b411a6a8a138d44d91c7e4e4291aa399562825d51a398913572119482ffeb303d7508ae13eacd2cd10b8f5098405ab16eb56243587efe93235f661285 SHA512 0893ca234272584f889b1ae1c75341a9ceee60acfd32765daa5d704191ba00450536a287b949304c6d055d1bf125cc29e24fc41df8e5230e0da4f9d944876512 +DIST gnu-efi-3.0.18.tar.bz2 167567 BLAKE2B e080fa4c57a281452a6473304871304d1b5c30d42ee728b4c0c084258ed2f6f2099c068ec5841cee81ecf664dd658dee3b94d68324ebaa498cb49cec4f7f7df9 SHA512 39f9fa14b880441a94a04400ff8850efdd9474929e5501dfd05af06e7747b4d0f7cb742ac811c7026cf52d00508efb73018be4d61d63a1211de0cd931cbc473d diff --git a/sys-boot/gnu-efi/gnu-efi-3.0.14.ebuild b/sys-boot/gnu-efi/gnu-efi-3.0.15.ebuild index 44b683ddf6bf..77a14fb4a319 100644 --- a/sys-boot/gnu-efi/gnu-efi-3.0.14.ebuild +++ b/sys-boot/gnu-efi/gnu-efi-3.0.15.ebuild @@ -1,9 +1,9 @@ -# Copyright 2004-2021 Gentoo Authors +# Copyright 2004-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit flag-o-matic toolchain-funcs +inherit toolchain-funcs DESCRIPTION="Library for build EFI Applications" HOMEPAGE="https://sourceforge.net/projects/gnu-efi/" @@ -16,8 +16,12 @@ SRC_URI="mirror://sourceforge/gnu-efi/${P}.tar.bz2" # - GPL-2+ : setjmp_ia32.S LICENSE="GPL-2+ BSD BSD-2" SLOT="0" -KEYWORDS="-* ~amd64 ~arm ~arm64 ~ia64 ~x86" +KEYWORDS="-* amd64 arm arm64 ~ia64 ~riscv x86" IUSE="abi_x86_32 abi_x86_64 custom-cflags" +REQUIRED_USE=" + amd64? ( || ( abi_x86_32 abi_x86_64 ) ) + x86? ( || ( abi_x86_32 abi_x86_64 ) ) +" # These objects get run early boot (i.e. not inside of Linux), # so doing these QA checks on them doesn't make sense. @@ -38,6 +42,7 @@ efimake() { aarch64*) arch=aarch64 ;; ia64*) arch=ia64 ;; i?86*) arch=ia32 ;; + riscv64*) arch=riscv64;; x86_64*) arch=x86_64 ;; *) die "Unknown CHOST" ;; esac @@ -62,18 +67,18 @@ src_compile() { unset CFLAGS CPPFLAGS LDFLAGS fi - if [[ ${CHOST} == x86_64* ]]; then + if use amd64 || use x86; then use abi_x86_32 && CHOST=i686 ABI=x86 efimake - use abi_x86_64 && efimake + use abi_x86_64 && CHOST=x86_64 ABI=amd64 efimake else efimake fi } src_install() { - if [[ ${CHOST} == x86_64* ]]; then + if use amd64 || use x86; then use abi_x86_32 && CHOST=i686 ABI=x86 efimake INSTALLROOT="${D}" install - use abi_x86_64 && efimake INSTALLROOT="${D}" install + use abi_x86_64 && CHOST=x86_64 ABI=amd64 efimake INSTALLROOT="${D}" install else efimake INSTALLROOT="${D}" install fi diff --git a/sys-boot/gnu-efi/gnu-efi-3.0.12.ebuild b/sys-boot/gnu-efi/gnu-efi-3.0.17.ebuild index 8cf6e78f27e8..626e9f716ea1 100644 --- a/sys-boot/gnu-efi/gnu-efi-3.0.12.ebuild +++ b/sys-boot/gnu-efi/gnu-efi-3.0.17.ebuild @@ -1,9 +1,9 @@ -# Copyright 2004-2020 Gentoo Authors +# Copyright 2004-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit flag-o-matic toolchain-funcs +inherit toolchain-funcs DESCRIPTION="Library for build EFI Applications" HOMEPAGE="https://sourceforge.net/projects/gnu-efi/" @@ -16,8 +16,12 @@ SRC_URI="mirror://sourceforge/gnu-efi/${P}.tar.bz2" # - GPL-2+ : setjmp_ia32.S LICENSE="GPL-2+ BSD BSD-2" SLOT="0" -KEYWORDS="-* amd64 arm arm64 ~ia64 x86" +KEYWORDS="-* amd64 arm arm64 ~ia64 ~riscv x86" IUSE="abi_x86_32 abi_x86_64 custom-cflags" +REQUIRED_USE=" + amd64? ( || ( abi_x86_32 abi_x86_64 ) ) + x86? ( || ( abi_x86_32 abi_x86_64 ) ) +" # These objects get run early boot (i.e. not inside of Linux), # so doing these QA checks on them doesn't make sense. @@ -38,6 +42,7 @@ efimake() { aarch64*) arch=aarch64 ;; ia64*) arch=ia64 ;; i?86*) arch=ia32 ;; + riscv64*) arch=riscv64;; x86_64*) arch=x86_64 ;; *) die "Unknown CHOST" ;; esac @@ -49,6 +54,7 @@ efimake() { AS="${AS}" LD="${LD}" AR="${AR}" + OBJCOPY="${OBJCOPY}" PREFIX="${EPREFIX}/usr" LIBDIR='$(PREFIX)'/$(get_libdir) ) @@ -56,30 +62,24 @@ efimake() { } src_compile() { - tc-export BUILD_CC AR AS CC LD + tc-export BUILD_CC AR AS CC LD OBJCOPY - if use custom-cflags; then - # https://bugs.gentoo.org/607992 - filter-mfpmath sse - - # https://bugs.gentoo.org/619628 - append-flags $(test-flags-CC -mno-avx) - else + if ! use custom-cflags; then unset CFLAGS CPPFLAGS LDFLAGS fi - if [[ ${CHOST} == x86_64* ]]; then + if use amd64 || use x86; then use abi_x86_32 && CHOST=i686 ABI=x86 efimake - use abi_x86_64 && efimake + use abi_x86_64 && CHOST=x86_64 ABI=amd64 efimake else efimake fi } src_install() { - if [[ ${CHOST} == x86_64* ]]; then + if use amd64 || use x86; then use abi_x86_32 && CHOST=i686 ABI=x86 efimake INSTALLROOT="${D}" install - use abi_x86_64 && efimake INSTALLROOT="${D}" install + use abi_x86_64 && CHOST=x86_64 ABI=amd64 efimake INSTALLROOT="${D}" install else efimake INSTALLROOT="${D}" install fi diff --git a/sys-boot/gnu-efi/gnu-efi-3.0.18.ebuild b/sys-boot/gnu-efi/gnu-efi-3.0.18.ebuild new file mode 100644 index 000000000000..fe16fd82ea2f --- /dev/null +++ b/sys-boot/gnu-efi/gnu-efi-3.0.18.ebuild @@ -0,0 +1,85 @@ +# Copyright 2004-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Library for build EFI Applications" +HOMEPAGE="https://sourceforge.net/projects/gnu-efi/" +SRC_URI="mirror://sourceforge/gnu-efi/${P}.tar.bz2" + +# inc/, lib/ dirs (README.efilib) +# - BSD-2 +# gnuefi dir: +# - BSD (3-cluase): crt0-efi-ia32.S +# - GPL-2+ : setjmp_ia32.S +LICENSE="GPL-2+ BSD BSD-2" +SLOT="0" +KEYWORDS="-* ~amd64 ~arm ~arm64 ~ia64 ~riscv ~x86" +IUSE="abi_x86_32 abi_x86_64 custom-cflags" +REQUIRED_USE=" + amd64? ( || ( abi_x86_32 abi_x86_64 ) ) + x86? ( || ( abi_x86_32 abi_x86_64 ) ) +" + +# These objects get run early boot (i.e. not inside of Linux), +# so doing these QA checks on them doesn't make sense. +QA_EXECSTACK="usr/*/lib*efi.a:* usr/*/crt*.o" +RESTRICT="strip" + +src_prepare() { + default + sed -i -e "s/-Werror//" Make.defaults || die +} + +efimake() { + local arch= + case ${CHOST} in + arm*) arch=arm ;; + aarch64*) arch=aarch64 ;; + ia64*) arch=ia64 ;; + i?86*) arch=ia32 ;; + riscv64*) arch=riscv64;; + x86_64*) arch=x86_64 ;; + *) die "Unknown CHOST" ;; + esac + + local args=( + ARCH="${arch}" + HOSTCC="${BUILD_CC}" + CC="${CC}" + AS="${AS}" + LD="${LD}" + AR="${AR}" + OBJCOPY="${OBJCOPY}" + PREFIX="${EPREFIX}/usr" + LIBDIR='$(PREFIX)'/$(get_libdir) + ) + emake -j1 "${args[@]}" "$@" +} + +src_compile() { + tc-export BUILD_CC AR AS CC LD OBJCOPY + + if ! use custom-cflags; then + unset CFLAGS CPPFLAGS LDFLAGS + fi + + if use amd64 || use x86; then + use abi_x86_32 && CHOST=i686 ABI=x86 efimake + use abi_x86_64 && CHOST=x86_64 ABI=amd64 efimake + else + efimake + fi +} + +src_install() { + if use amd64 || use x86; then + use abi_x86_32 && CHOST=i686 ABI=x86 efimake INSTALLROOT="${D}" install + use abi_x86_64 && CHOST=x86_64 ABI=amd64 efimake INSTALLROOT="${D}" install + else + efimake INSTALLROOT="${D}" install + fi + einstalldocs +} diff --git a/sys-boot/gnu-efi/metadata.xml b/sys-boot/gnu-efi/metadata.xml index cf2580c0e58c..40e0d4d4861a 100644 --- a/sys-boot/gnu-efi/metadata.xml +++ b/sys-boot/gnu-efi/metadata.xml @@ -1,11 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> - <email>floppym@gentoo.org</email> - <name>Mike Gilbert</name> - </maintainer> + <!-- maintainer-needed --> <upstream> <remote-id type="sourceforge">gnu-efi</remote-id> + <remote-id type="github">ncroxon/gnu-efi</remote-id> </upstream> </pkgmetadata> diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest index 632fe8590e05..03be6d621874 100644 --- a/sys-boot/grub/Manifest +++ b/sys-boot/grub/Manifest @@ -1,3 +1,5 @@ DIST dejavu-sans-ttf-2.37.zip 417746 BLAKE2B c8904f3cd5a49370a7dc10e456684c88aeae998a99090bf4d0a5baa4f36cc8fb8f70586cf6d610a5ffeee97261d28c80f55bbe9dcfc3ed796d5c2d60e79adb58 SHA512 ede5899daa1984c5aa8cacb1c850eb53f189dddef3d9bb78bf9774d8976b7c0d6eb0bcf86237cd7d11f5b36cf5b5058d42cd94d3bd76f2bd0931c7ceb1271fae -DIST grub-2.06.tar.xz 6581924 BLAKE2B 2a40b9b03d7bb3b9e7b1309ab274d686f01b3c42e7035ebc6e5a0e59a59c3b7362ba518341664b314cb0dbc8222bb10ea05ce09f08ce9d58a293207cb909e417 SHA512 4f11c648f3078567e53fc0c74d5026fdc6da4be27d188975e79d9a4df817ade0fe5ad2ddd694238a07edc45adfa02943d83c57767dd51548102b375e529e8efe -DIST unifont-12.1.02.pcf.gz 1335424 BLAKE2B 97080312468e3f3c8aa6f49cef08f5622641e8c9c035f3ede1e09d8d98de4e78d3b23c8aba2e8070eb46cbebd2d55e8568e467d7f15f35aa8fc8db792b7e5f14 SHA512 b280b2db7cf5f480b0668c331130dede2c0cc87d5e02e44566b77787113d0f6604d0105522858288f2ac6b8e77df7a2d9878725013a6c778dc5bfb183156e2f0 +DIST grub-2.12-bash-completion.patch.gz 3627 BLAKE2B 6ba80fd4fb4b28ae2e5a2387133d815da126a4eaa4b5cb24b13f4ba5a2499ab4099d10ada366ed39f84be2c38774122f48e1a1894768c5bee29149528610d095 SHA512 a9ee6d2253ae48d7f90907a9e975a3a1d01346bc621d8b8cddf7cc815cd91e078f6c61392724d13556ee64f099fa15c94fcb88a49ff02d4a90ebd376252cea5c +DIST grub-2.12.tar.xz 6675608 BLAKE2B a678f7fafb945d325c8cf47aa086f48357a8f6335b762f77038c30a3896b3b05491598d9931d5335841d224fffcbe4a9a43ca1479057c1f1ce52b8d2a952c431 SHA512 761c060a4c3da9c0e810b0ea967e3ebc66baa4ddd682a503ae3d30a83707626bccaf49359304a16b3a26fc4435fe6bea1ee90be910c84de3c2b5485a31a15be3 +DIST grub-2.12.tar.xz.sig 566 BLAKE2B 9b77fe53041b99f1196743aa6d9fc9c727b17c6512129bab2b35005f2c70f371e30521ddd804bf0c666e36cf2667247980f385ca1ac911fa9b8e0311427dc01c SHA512 fbe971d8c382578b49d33902234edd9cbd084b70820a1a56a59df4ec30874c0dd4fe27f8dc44bb380716bb7480ca68a87d120a25b92a6a10ff6c8ec1b60548d3 +DIST unifont-15.0.06.pcf.gz 1358322 BLAKE2B 81811e3de390ca35d1a2dc1f1dee73464e97f44907ba522c218ba9c5e39ca3c9d767552780a257a97c156eb623c17786d9c0d2b67786d61df5ca33a1e10db7ca SHA512 0a28a406629c604f5cbf51f501528239a7ed50d19f93ea505bc5bdc72639e4b926b03f4b8782a5733041f7cdb4aebb9948ac7cfd5a8ad9a0fe309944e595517b diff --git a/sys-boot/grub/files/grub-2.06-xfs-v4.patch b/sys-boot/grub/files/grub-2.06-xfs-v4.patch deleted file mode 100644 index fe8223780384..000000000000 --- a/sys-boot/grub/files/grub-2.06-xfs-v4.patch +++ /dev/null @@ -1,120 +0,0 @@ -From a4b495520e4dc41a896a8b916a64eda9970c50ea Mon Sep 17 00:00:00 2001 -From: Erwan Velu <erwanaliasr1@gmail.com> -Date: Wed, 25 Aug 2021 15:31:52 +0200 -Subject: fs/xfs: Fix unreadable filesystem with v4 superblock - -The commit 8b1e5d193 (fs/xfs: Add bigtime incompat feature support) -introduced the bigtime support by adding some features in v3 inodes. -This change extended grub_xfs_inode struct by 76 bytes but also changed -the computation of XFS_V2_INODE_SIZE and XFS_V3_INODE_SIZE. Prior this -commit, XFS_V2_INODE_SIZE was 100 bytes. After the commit it's 84 bytes -XFS_V2_INODE_SIZE becomes 16 bytes too small. - -As a result, the data structures aren't properly aligned and the GRUB -generates "attempt to read or write outside of partition" errors when -trying to read the XFS filesystem: - - GNU GRUB version 2.11 - .... - grub> set debug=efi,gpt,xfs - grub> insmod part_gpt - grub> ls (hd0,gpt1)/ - partmap/gpt.c:93: Read a valid GPT header - partmap/gpt.c:115: GPT entry 0: start=4096, length=1953125 - fs/xfs.c:931: Reading sb - fs/xfs.c:270: Validating superblock - fs/xfs.c:295: XFS v4 superblock detected - fs/xfs.c:962: Reading root ino 128 - fs/xfs.c:515: Reading inode (128) - 64, 0 - fs/xfs.c:515: Reading inode (739521961424144223) - 344365866970255880, 3840 - error: attempt to read or write outside of partition. - -This commit change the XFS_V2_INODE_SIZE computation by subtracting 76 -bytes instead of 92 bytes from the actual size of grub_xfs_inode struct. -This 76 bytes value comes from added members: - 20 grub_uint8_t unused5 - 1 grub_uint64_t flags2 - 48 grub_uint8_t unused6 - -This patch explicitly splits the v2 and v3 parts of the structure. -The unused4 is still ending of the v2 structures and the v3 starts -at unused5. Thanks to this we will avoid future corruptions of v2 -or v3 inodes. - -The XFS_V2_INODE_SIZE is returning to its expected size and the -filesystem is back to a readable state: - - GNU GRUB version 2.11 - .... - grub> set debug=efi,gpt,xfs - grub> insmod part_gpt - grub> ls (hd0,gpt1)/ - partmap/gpt.c:93: Read a valid GPT header - partmap/gpt.c:115: GPT entry 0: start=4096, length=1953125 - fs/xfs.c:931: Reading sb - fs/xfs.c:270: Validating superblock - fs/xfs.c:295: XFS v4 superblock detected - fs/xfs.c:962: Reading root ino 128 - fs/xfs.c:515: Reading inode (128) - 64, 0 - fs/xfs.c:515: Reading inode (128) - 64, 0 - fs/xfs.c:931: Reading sb - fs/xfs.c:270: Validating superblock - fs/xfs.c:295: XFS v4 superblock detected - fs/xfs.c:962: Reading root ino 128 - fs/xfs.c:515: Reading inode (128) - 64, 0 - fs/xfs.c:515: Reading inode (128) - 64, 0 - fs/xfs.c:515: Reading inode (128) - 64, 0 - fs/xfs.c:515: Reading inode (131) - 64, 768 - efi/ fs/xfs.c:515: Reading inode (3145856) - 1464904, 0 - grub2/ fs/xfs.c:515: Reading inode (132) - 64, 1024 - grub/ fs/xfs.c:515: Reading inode (139) - 64, 2816 - grub> - -Fixes: 8b1e5d193 (fs/xfs: Add bigtime incompat feature support) - -Signed-off-by: Erwan Velu <e.velu@criteo.com> -Tested-by: Carlos Maiolino <cmaiolino@redhat.com> -Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> ---- - grub-core/fs/xfs.c | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c -index 0f524c3a8..e3816d1ec 100644 ---- a/grub-core/fs/xfs.c -+++ b/grub-core/fs/xfs.c -@@ -192,6 +192,11 @@ struct grub_xfs_time_legacy - grub_uint32_t nanosec; - } GRUB_PACKED; - -+/* -+ * The struct grub_xfs_inode layout was taken from the -+ * struct xfs_dinode_core which is described here: -+ * https://mirrors.edge.kernel.org/pub/linux/utils/fs/xfs/docs/xfs_filesystem_structure.pdf -+ */ - struct grub_xfs_inode - { - grub_uint8_t magic[2]; -@@ -208,14 +213,15 @@ struct grub_xfs_inode - grub_uint32_t nextents; - grub_uint16_t unused3; - grub_uint8_t fork_offset; -- grub_uint8_t unused4[37]; -+ grub_uint8_t unused4[17]; /* Last member of inode v2. */ -+ grub_uint8_t unused5[20]; /* First member of inode v3. */ - grub_uint64_t flags2; -- grub_uint8_t unused5[48]; -+ grub_uint8_t unused6[48]; /* Last member of inode v3. */ - } GRUB_PACKED; - - #define XFS_V3_INODE_SIZE sizeof(struct grub_xfs_inode) --/* Size of struct grub_xfs_inode until fork_offset (included). */ --#define XFS_V2_INODE_SIZE (XFS_V3_INODE_SIZE - 92) -+/* Size of struct grub_xfs_inode v2, up to unused4 member included. */ -+#define XFS_V2_INODE_SIZE (XFS_V3_INODE_SIZE - 76) - - struct grub_xfs_dirblock_tail - { --- -cgit v1.2.1 - diff --git a/sys-boot/grub/files/grub-2.12-fwsetup.patch b/sys-boot/grub/files/grub-2.12-fwsetup.patch new file mode 100644 index 000000000000..d328d3f110ae --- /dev/null +++ b/sys-boot/grub/files/grub-2.12-fwsetup.patch @@ -0,0 +1,38 @@ +From 6e0b2277eba062bf7950536cd27f9789c545d20f Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Thu, 11 Apr 2024 15:33:45 -0400 +Subject: [PATCH] grub.d: avoid calling fwsetup unconditionally + +This causes grub to enter the firmware setup on boot when using a +grub core that does not support the 'fwsetup --is-supported' option. + +Upstream has rejected attempts to resolve this, so we will carry this as +a distro patch for a bit. + +Bug: https://bugs.gentoo.org/925370 +--- + util/grub.d/30_uefi-firmware.in | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/util/grub.d/30_uefi-firmware.in b/util/grub.d/30_uefi-firmware.in +index 1c2365ddb..b6041b55e 100644 +--- a/util/grub.d/30_uefi-firmware.in ++++ b/util/grub.d/30_uefi-firmware.in +@@ -32,11 +32,8 @@ gettext_printf "Adding boot menu entry for UEFI Firmware Settings ...\n" >&2 + + cat << EOF + if [ "\$grub_platform" = "efi" ]; then +- fwsetup --is-supported +- if [ "\$?" = 0 ]; then +- menuentry '$LABEL' \$menuentry_id_option 'uefi-firmware' { +- fwsetup +- } +- fi ++ menuentry '$LABEL' \$menuentry_id_option 'uefi-firmware' { ++ fwsetup ++ } + fi + EOF +-- +2.44.0 + diff --git a/sys-boot/grub/files/grub.default-3 b/sys-boot/grub/files/grub.default-4 index 3faabf9c6ea9..35d3060137a9 100644 --- a/sys-boot/grub/files/grub.default-3 +++ b/sys-boot/grub/files/grub.default-4 @@ -58,6 +58,9 @@ GRUB_DISTRIBUTOR="Gentoo" # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel #GRUB_DISABLE_LINUX_UUID=true +# Comment if you don't want GRUB to pass "root=PARTUUID=xxx" parameter to kernel +GRUB_DISABLE_LINUX_PARTUUID=false + # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY=true diff --git a/sys-boot/grub/files/sbat.csv b/sys-boot/grub/files/sbat.csv new file mode 100644 index 000000000000..2b87b532556c --- /dev/null +++ b/sys-boot/grub/files/sbat.csv @@ -0,0 +1,3 @@ +sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md +grub,3,Free Software Foundation,grub,%PV%,https//www.gnu.org/software/grub/ +grub.gentoo,1,Gentoo,grub,%PV%,https://bugs.gentoo.org/ diff --git a/sys-boot/grub/grub-2.06-r1.ebuild b/sys-boot/grub/grub-2.12-r4.ebuild index d80b215cc471..4be3b08984b6 100644 --- a/sys-boot/grub/grub-2.06-r1.ebuild +++ b/sys-boot/grub/grub-2.12-r4.ebuild @@ -1,28 +1,25 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 # This ebuild uses 3 special global variables: # GRUB_BOOTSTRAP: Depend on python and invoke bootstrap (gnulib). -# GRUB_AUTOGEN: Depend on python and invoke the autogen.sh. +# GRUB_AUTOGEN: Depend on python and invoke autogen.sh. # GRUB_AUTORECONF: Inherit autotools and invoke eautoreconf. # # When applying patches: # If gnulib is updated, set GRUB_BOOTSTRAP=1 -# If *.def is updated, set GRUB_AUTOGEN=1 -# If gnulib, *.def, or any autotools files are updated, set GRUB_AUTORECONF=1 +# If gentpl.py or *.def is updated, set GRUB_AUTOGEN=1 +# If gnulib, gentpl.py, *.def, or any autotools files are updated, set GRUB_AUTORECONF=1 # # If any of the above applies to a user patch, the user should set the # corresponding variable in make.conf or the environment. -if [[ ${PV} == 9999 ]]; then - GRUB_AUTORECONF=1 - GRUB_BOOTSTRAP=1 -fi - -PYTHON_COMPAT=( python{2_7,3_{6,7,8,9}} ) +GRUB_AUTORECONF=1 +PYTHON_COMPAT=( python3_{10..12} ) WANT_LIBTOOL=none +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/dkiper.gpg if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then inherit python-any-r1 @@ -34,43 +31,48 @@ fi inherit bash-completion-r1 flag-o-matic multibuild optfeature toolchain-funcs +DESCRIPTION="GNU GRUB boot loader" +HOMEPAGE="https://www.gnu.org/software/grub/" + +MY_P=${P} if [[ ${PV} != 9999 ]]; then + inherit verify-sig + if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then # The quote style is to work with <=bash-4.2 and >=bash-4.3 #503860 MY_P=${P/_/'~'} - SRC_URI="https://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz" + SRC_URI=" + https://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz + verify-sig? ( https://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz.sig ) + " S=${WORKDIR}/${MY_P} else - SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + SRC_URI=" + mirror://gnu/${PN}/${P}.tar.xz + https://dev.gentoo.org/~floppym/dist/${P}-bash-completion.patch.gz + verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig ) + " S=${WORKDIR}/${P%_*} fi - KEYWORDS="amd64 ~arm arm64 ~ia64 ppc ppc64 ~riscv sparc x86" + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-danielkiper )" + KEYWORDS="amd64 arm arm64 ~ia64 ~loong ppc ppc64 ~riscv sparc x86" else inherit git-r3 EGIT_REPO_URI="https://git.savannah.gnu.org/git/grub.git" fi -PATCHES=( - "${FILESDIR}"/grub-2.06-xfs-v4.patch - "${FILESDIR}"/gfxpayload.patch - "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch - "${FILESDIR}"/grub-2.06-test-words.patch -) - DEJAVU=dejavu-sans-ttf-2.37 -UNIFONT=unifont-12.1.02 +UNIFONT=unifont-15.0.06 SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz ) themes? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )" -DESCRIPTION="GNU GRUB boot loader" -HOMEPAGE="https://www.gnu.org/software/grub/" - # Includes licenses for dejavu and unifont LICENSE="GPL-3+ BSD MIT fonts? ( GPL-2-with-font-exception ) themes? ( CC-BY-SA-3.0 BitstreamVera )" SLOT="2/${PVR}" IUSE="device-mapper doc efiemu +fonts mount nls sdl test +themes truetype libzfs" -GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot qemu qemu-mips pc uboot xen xen-32 xen-pvh ) +GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot + qemu qemu-mips pc uboot xen xen-32 xen-pvh ) IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}" REQUIRED_USE=" @@ -80,9 +82,9 @@ REQUIRED_USE=" grub_platforms_loongson? ( fonts ) " -BDEPEND=" +BDEPEND+=" ${PYTHON_DEPS} - sys-devel/flex + >=sys-devel/flex-2.5.35 sys-devel/bison sys-apps/help2man sys-apps/texinfo @@ -92,7 +94,7 @@ BDEPEND=" ) test? ( app-admin/genromfs - app-arch/cpio + app-alternatives/cpio app-arch/lzop app-emulation/qemu dev-libs/libisoburn @@ -111,11 +113,11 @@ DEPEND=" app-arch/xz-utils >=sys-libs/ncurses-5.2-r5:0= grub_platforms_emu? ( - sdl? ( media-libs/libsdl ) + sdl? ( media-libs/libsdl2 ) ) device-mapper? ( >=sys-fs/lvm2-2.02.45 ) libzfs? ( sys-fs/zfs:= ) - mount? ( sys-fs/fuse:0 ) + mount? ( sys-fs/fuse:3 ) truetype? ( media-libs/freetype:2= ) ppc? ( >=sys-apps/ibm-powerpc-utils-1.3.5 ) ppc64? ( >=sys-apps/ibm-powerpc-utils-1.3.5 ) @@ -129,7 +131,7 @@ RDEPEND="${DEPEND} nls? ( sys-devel/gettext ) " -RESTRICT="!test? ( test )" +RESTRICT="!test? ( test ) test? ( userpriv )" QA_EXECSTACK="usr/bin/grub-emu* usr/lib/grub/*" QA_PRESTRIPPED="usr/lib/grub/.*" @@ -149,14 +151,22 @@ src_unpack() { git-r3_fetch "${GNULIB_URI}" "${GNULIB_REVISION}" git-r3_checkout "${GNULIB_URI}" gnulib popd >/dev/null || die + elif use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sig} fi default } src_prepare() { - default + local PATCHES=( + "${FILESDIR}"/gfxpayload.patch + "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch + "${FILESDIR}"/grub-2.06-test-words.patch + "${FILESDIR}"/grub-2.12-fwsetup.patch + "${WORKDIR}"/grub-2.12-bash-completion.patch + ) - sed -i -e /autoreconf/d autogen.sh || die + default if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then python_setup @@ -168,12 +178,16 @@ src_prepare() { eautopoint --force AUTOPOINT=: AUTORECONF=: ./bootstrap || die elif [[ -n ${GRUB_AUTOGEN} ]]; then - ./autogen.sh || die + FROM_BOOTSTRAP=1 ./autogen.sh || die fi if [[ -n ${GRUB_AUTORECONF} ]]; then eautoreconf fi + + # Avoid error due to extra_deps.lst missing from source tarball: + # make[3]: *** No rule to make target 'grub-core/extra_deps.lst', needed by 'syminfo.lst'. Stop. + echo "depends bli part_gpt" > grub-core/extra_deps.lst || die } grub_do() { @@ -218,7 +232,8 @@ grub_configure() { $(use_enable themes grub-themes) $(use_enable truetype grub-mkfont) $(use_enable libzfs) - $(use_enable sdl grub-emu-sdl) + --enable-grub-emu-sdl=no + $(use_enable sdl grub-emu-sdl2) ${platform:+--with-platform=}${platform} # Let configure detect this where supported @@ -241,6 +256,9 @@ src_configure() { # Bug 508758. replace-flags -O3 -O2 + # Workaround for bug 829165. + filter-ldflags -pie + # We don't want to leak flags onto boot code. export HOST_CCASFLAGS=${CCASFLAGS} export HOST_CFLAGS=${CFLAGS} @@ -255,6 +273,10 @@ src_configure() { tc-export CC NM OBJCOPY RANLIB STRIP tc-export BUILD_CC BUILD_PKG_CONFIG + # Force configure to use flex & bison, bug 887211. + export LEX=flex + unset YACC + MULTIBUILD_VARIANTS=() local p for p in "${GRUB_ALL_PLATFORMS[@]}"; do @@ -266,7 +288,7 @@ src_configure() { src_compile() { # Sandbox bug 404013. - use libzfs && addpredict /etc/dfs:/dev/zfs + use libzfs && { addpredict /etc/dfs; addpredict /dev/zfs; } grub_do emake use doc && grub_do_once emake -C docs html @@ -275,7 +297,9 @@ src_compile() { src_test() { # The qemu dependency is a bit complex. # You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform. - grub_do emake check + local SANDBOX_WRITE=${SANDBOX_WRITE} + addwrite /dev + grub_do emake -j1 check } src_install() { @@ -285,26 +309,47 @@ src_install() { einstalldocs insinto /etc/default - newins "${FILESDIR}"/grub.default-3 grub + newins "${FILESDIR}"/grub.default-4 grub # https://bugs.gentoo.org/231935 dostrip -x /usr/lib/grub + + sed -e "s/%PV%/${PV}/" "${FILESDIR}/sbat.csv" > "${T}/sbat.csv" || die + insinto /usr/share/grub + doins "${T}/sbat.csv" + + if use elibc_musl; then + # https://bugs.gentoo.org/900348 + QA_CONFIG_IMPL_DECL_SKIP=( re_{compile_pattern,match,search,set_syntax} ) + fi } pkg_postinst() { elog "For information on how to configure GRUB2 please refer to the guide:" elog " https://wiki.gentoo.org/wiki/GRUB2_Quick_Start" - if has_version 'sys-boot/grub:0'; then - elog "A migration guide for GRUB Legacy users is available:" - elog " https://wiki.gentoo.org/wiki/GRUB2_Migration" - fi - - if [[ -z ${REPLACING_VERSIONS} ]]; then + if [[ -n ${REPLACING_VERSIONS} ]]; then + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test -gt ${v}; then + ewarn + ewarn "Re-run grub-install to update installed boot code!" + ewarn "Re-run grub-mkconfig to update grub.cfg!" + ewarn + break + fi + done + else elog optfeature "detecting other operating systems (grub-mkconfig)" sys-boot/os-prober optfeature "creating rescue media (grub-mkrescue)" dev-libs/libisoburn optfeature "enabling RAID device detection" sys-fs/mdadm + optfeature "automatically updating GRUB's configuration on each kernel installation" "sys-kernel/installkernel[grub]" + fi + + if has_version 'sys-boot/grub:0'; then + elog "A migration guide for GRUB Legacy users is available:" + elog " https://wiki.gentoo.org/wiki/GRUB2_Migration" fi if has_version sys-boot/os-prober; then diff --git a/sys-boot/grub/grub-9999.ebuild b/sys-boot/grub/grub-9999.ebuild index 7ba93a504196..688a7f51bb8a 100644 --- a/sys-boot/grub/grub-9999.ebuild +++ b/sys-boot/grub/grub-9999.ebuild @@ -1,17 +1,17 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 # This ebuild uses 3 special global variables: # GRUB_BOOTSTRAP: Depend on python and invoke bootstrap (gnulib). -# GRUB_AUTOGEN: Depend on python and invoke the autogen.sh. +# GRUB_AUTOGEN: Depend on python and invoke autogen.sh. # GRUB_AUTORECONF: Inherit autotools and invoke eautoreconf. # # When applying patches: # If gnulib is updated, set GRUB_BOOTSTRAP=1 -# If *.def is updated, set GRUB_AUTOGEN=1 -# If gnulib, *.def, or any autotools files are updated, set GRUB_AUTORECONF=1 +# If gentpl.py or *.def is updated, set GRUB_AUTOGEN=1 +# If gnulib, gentpl.py, *.def, or any autotools files are updated, set GRUB_AUTORECONF=1 # # If any of the above applies to a user patch, the user should set the # corresponding variable in make.conf or the environment. @@ -21,8 +21,9 @@ if [[ ${PV} == 9999 ]]; then GRUB_BOOTSTRAP=1 fi -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{10..12} ) WANT_LIBTOOL=none +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/dkiper.gpg if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then inherit python-any-r1 @@ -34,42 +35,47 @@ fi inherit bash-completion-r1 flag-o-matic multibuild optfeature toolchain-funcs +DESCRIPTION="GNU GRUB boot loader" +HOMEPAGE="https://www.gnu.org/software/grub/" + +MY_P=${P} if [[ ${PV} != 9999 ]]; then + inherit verify-sig + if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then # The quote style is to work with <=bash-4.2 and >=bash-4.3 #503860 MY_P=${P/_/'~'} - SRC_URI="https://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz" + SRC_URI=" + https://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz + verify-sig? ( https://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz.sig ) + " S=${WORKDIR}/${MY_P} else - SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + SRC_URI=" + mirror://gnu/${PN}/${P}.tar.xz + verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig ) + " S=${WORKDIR}/${P%_*} fi - KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-danielkiper )" + KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" else inherit git-r3 EGIT_REPO_URI="https://git.savannah.gnu.org/git/grub.git" fi -PATCHES=( - "${FILESDIR}"/gfxpayload.patch - "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch - "${FILESDIR}"/grub-2.06-test-words.patch -) - DEJAVU=dejavu-sans-ttf-2.37 -UNIFONT=unifont-12.1.02 +UNIFONT=unifont-15.0.06 SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz ) themes? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )" -DESCRIPTION="GNU GRUB boot loader" -HOMEPAGE="https://www.gnu.org/software/grub/" - # Includes licenses for dejavu and unifont LICENSE="GPL-3+ BSD MIT fonts? ( GPL-2-with-font-exception ) themes? ( CC-BY-SA-3.0 BitstreamVera )" SLOT="2/${PVR}" IUSE="device-mapper doc efiemu +fonts mount nls sdl test +themes truetype libzfs" -GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot qemu qemu-mips pc uboot xen xen-32 xen-pvh ) +GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot + qemu qemu-mips pc uboot xen xen-32 xen-pvh ) IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}" REQUIRED_USE=" @@ -79,9 +85,9 @@ REQUIRED_USE=" grub_platforms_loongson? ( fonts ) " -BDEPEND=" +BDEPEND+=" ${PYTHON_DEPS} - sys-devel/flex + >=sys-devel/flex-2.5.35 sys-devel/bison sys-apps/help2man sys-apps/texinfo @@ -91,7 +97,7 @@ BDEPEND=" ) test? ( app-admin/genromfs - app-arch/cpio + app-alternatives/cpio app-arch/lzop app-emulation/qemu dev-libs/libisoburn @@ -110,11 +116,11 @@ DEPEND=" app-arch/xz-utils >=sys-libs/ncurses-5.2-r5:0= grub_platforms_emu? ( - sdl? ( media-libs/libsdl ) + sdl? ( media-libs/libsdl2 ) ) device-mapper? ( >=sys-fs/lvm2-2.02.45 ) libzfs? ( sys-fs/zfs:= ) - mount? ( sys-fs/fuse:0 ) + mount? ( sys-fs/fuse:3 ) truetype? ( media-libs/freetype:2= ) ppc? ( >=sys-apps/ibm-powerpc-utils-1.3.5 ) ppc64? ( >=sys-apps/ibm-powerpc-utils-1.3.5 ) @@ -128,7 +134,7 @@ RDEPEND="${DEPEND} nls? ( sys-devel/gettext ) " -RESTRICT="!test? ( test )" +RESTRICT="!test? ( test ) test? ( userpriv )" QA_EXECSTACK="usr/bin/grub-emu* usr/lib/grub/*" QA_PRESTRIPPED="usr/lib/grub/.*" @@ -148,14 +154,20 @@ src_unpack() { git-r3_fetch "${GNULIB_URI}" "${GNULIB_REVISION}" git-r3_checkout "${GNULIB_URI}" gnulib popd >/dev/null || die + elif use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sig} fi default } src_prepare() { - default + local PATCHES=( + "${FILESDIR}"/gfxpayload.patch + "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch + "${FILESDIR}"/grub-2.06-test-words.patch + ) - sed -i -e /autoreconf/d autogen.sh || die + default if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then python_setup @@ -167,7 +179,7 @@ src_prepare() { eautopoint --force AUTOPOINT=: AUTORECONF=: ./bootstrap || die elif [[ -n ${GRUB_AUTOGEN} ]]; then - ./autogen.sh || die + FROM_BOOTSTRAP=1 ./autogen.sh || die fi if [[ -n ${GRUB_AUTORECONF} ]]; then @@ -217,7 +229,8 @@ grub_configure() { $(use_enable themes grub-themes) $(use_enable truetype grub-mkfont) $(use_enable libzfs) - $(use_enable sdl grub-emu-sdl) + --enable-grub-emu-sdl=no + $(use_enable sdl grub-emu-sdl2) ${platform:+--with-platform=}${platform} # Let configure detect this where supported @@ -240,6 +253,9 @@ src_configure() { # Bug 508758. replace-flags -O3 -O2 + # Workaround for bug 829165. + filter-ldflags -pie + # We don't want to leak flags onto boot code. export HOST_CCASFLAGS=${CCASFLAGS} export HOST_CFLAGS=${CFLAGS} @@ -254,6 +270,10 @@ src_configure() { tc-export CC NM OBJCOPY RANLIB STRIP tc-export BUILD_CC BUILD_PKG_CONFIG + # Force configure to use flex & bison, bug 887211. + export LEX=flex + unset YACC + MULTIBUILD_VARIANTS=() local p for p in "${GRUB_ALL_PLATFORMS[@]}"; do @@ -265,7 +285,7 @@ src_configure() { src_compile() { # Sandbox bug 404013. - use libzfs && addpredict /etc/dfs:/dev/zfs + use libzfs && { addpredict /etc/dfs; addpredict /dev/zfs; } grub_do emake use doc && grub_do_once emake -C docs html @@ -274,7 +294,9 @@ src_compile() { src_test() { # The qemu dependency is a bit complex. # You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform. - grub_do emake check + local SANDBOX_WRITE=${SANDBOX_WRITE} + addwrite /dev + grub_do emake -j1 check } src_install() { @@ -284,26 +306,47 @@ src_install() { einstalldocs insinto /etc/default - newins "${FILESDIR}"/grub.default-3 grub + newins "${FILESDIR}"/grub.default-4 grub # https://bugs.gentoo.org/231935 dostrip -x /usr/lib/grub + + sed -e "s/%PV%/${PV}/" "${FILESDIR}/sbat.csv" > "${T}/sbat.csv" || die + insinto /usr/share/grub + doins "${T}/sbat.csv" + + if use elibc_musl; then + # https://bugs.gentoo.org/900348 + QA_CONFIG_IMPL_DECL_SKIP=( re_{compile_pattern,match,search,set_syntax} ) + fi } pkg_postinst() { elog "For information on how to configure GRUB2 please refer to the guide:" elog " https://wiki.gentoo.org/wiki/GRUB2_Quick_Start" - if has_version 'sys-boot/grub:0'; then - elog "A migration guide for GRUB Legacy users is available:" - elog " https://wiki.gentoo.org/wiki/GRUB2_Migration" - fi - - if [[ -z ${REPLACING_VERSIONS} ]]; then + if [[ -n ${REPLACING_VERSIONS} ]]; then + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test -gt ${v}; then + ewarn + ewarn "Re-run grub-install to update installed boot code!" + ewarn "Re-run grub-mkconfig to update grub.cfg!" + ewarn + break + fi + done + else elog optfeature "detecting other operating systems (grub-mkconfig)" sys-boot/os-prober optfeature "creating rescue media (grub-mkrescue)" dev-libs/libisoburn optfeature "enabling RAID device detection" sys-fs/mdadm + optfeature "automatically updating GRUB's configuration on each kernel installation" "sys-kernel/installkernel[grub]" + fi + + if has_version 'sys-boot/grub:0'; then + elog "A migration guide for GRUB Legacy users is available:" + elog " https://wiki.gentoo.org/wiki/GRUB2_Migration" fi if has_version sys-boot/os-prober; then diff --git a/sys-boot/lilo/lilo-24.2.ebuild b/sys-boot/lilo/lilo-24.2-r1.ebuild index 9ae96a087bd0..a1e7a24913fd 100644 --- a/sys-boot/lilo/lilo-24.2.ebuild +++ b/sys-boot/lilo/lilo-24.2-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" -inherit flag-o-matic toolchain-funcs +inherit flag-o-matic optfeature toolchain-funcs DOLILO_V="0.6" IUSE="static minimal pxeserial device-mapper" @@ -162,7 +162,7 @@ pkg_postinst() { ln -snf boot-menu.b "${ROOT}/boot/boot.b" fi - if [ "${ROOT}" = "/" ] && use !minimal; + if [[ -z "${ROOT}" ]] && use !minimal; then if lilocheck then @@ -184,4 +184,7 @@ pkg_postinst() { einfo "edit /etc/conf.d/dolilo to harness its full potential." echo fi + + optfeature "automatically updating lilo's configuration on each kernel installation" \ + "sys-kernel/installkernel[-systemd]" } diff --git a/sys-boot/mbr-gpt/Manifest b/sys-boot/mbr-gpt/Manifest deleted file mode 100644 index 11ccdc8ea92d..000000000000 --- a/sys-boot/mbr-gpt/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST mbr-gpt_0.0.1.tar.gz 15861 BLAKE2B 00c6741fa5543af435cee97132510126d0301db2fb50712d438703165507125b4981844cb4a841b11bad075af5effb746fd3aa04e6834fb051536b250c01f7ad SHA512 eaabd84fc749ddee8fa40632ad49e15e894bf35a881fb7c35ba22796c2459a886e9bda601595e58d29567ff26959ae2befe6aec5db397d15e1dc5a292dafe165 diff --git a/sys-boot/mbr-gpt/mbr-gpt-0.0.1-r1.ebuild b/sys-boot/mbr-gpt/mbr-gpt-0.0.1-r1.ebuild deleted file mode 100644 index 3073a1e1cfed..000000000000 --- a/sys-boot/mbr-gpt/mbr-gpt-0.0.1-r1.ebuild +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs - -DESCRIPTION="An MBR that can handle BIOS-based boot on GPT" -MY_P="${PN}_${PV}" -HOMEPAGE="https://web.archive.org/web/20080704173538/http://aybabtu.com/mbr-gpt/" -SRC_URI="https://dev.gentoo.org/~robbat2/distfiles/${MY_P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -# This should probably NEVER go to stable. It's crazy advanced dangerous magic. -# It's also pure ASM, so not suitable for elsewhere anyway. -# Please don't remove it, robbat2 has a box that depends on it for # booting! -KEYWORDS="~amd64 ~x86" - -# It only depends on binutils/gcc/make, and doesn't link against libc even. -DEPEND="" -RDEPEND="" - -# It's a mostly an MBR block and it does use the executable stack. -QA_WX_LOAD="usr/lib/${PN}/boot.elf" -QA_PRESTRIPPED="${QA_WX_LOAD}" -QA_FLAGS_IGNORED="${QA_WX_LOAD}" - -# Don't strip it either; this binary reboots your host! -RESTRICT="binchecks strip" - -src_prepare() { - default - - # Messy upstream - emake clean - - # Need to build it 32-bit for the MBR - # Btw, no CFLAGS are respected, it's ASM! - if use amd64 ; then - sed -i -e 's/-Wall/-Wall -m32/g' "${S}"/Makefile || die - fi -} - -src_compile() { - emake CC="$(tc-getCC)" -} - -src_install() { - # get_libdir is not correct here. We want this to go into a 32-bit library - # location. - insinto /usr/lib/${PN} - doins mbr - - exeinto /usr/lib/${PN} - exeopts -m 700 - doexe boot.elf - - dodoc AUTHORS -} - -pkg_postinst() { - einfo "See the instructions on the homepage, and make sure you know what" - einfo "you are doing before touching this. The mbr file does into your" - einfo "MBR, or alternatively you can do a creative reboot utilizing the" - einfo "boot.elf binary." -} diff --git a/sys-boot/mbr-gpt/metadata.xml b/sys-boot/mbr-gpt/metadata.xml deleted file mode 100644 index f29fedf971f0..000000000000 --- a/sys-boot/mbr-gpt/metadata.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="person"> - <email>robbat2@gentoo.org</email> -</maintainer> -<maintainer type="project"> - <email>base-system@gentoo.org</email> - <name>Gentoo Base System</name> -</maintainer> -<longdescription lang="en"> - Bootable MBR including fake partition records, for legacy BIOS without any GPT support, and usable without hybrid disk layouts. - Install directly at the start of a disk, create GPT, ensure at least one partition has GUID set to BIOS Boot Partition (21686148-6449-6e6f-744e-656564454649). -</longdescription> -</pkgmetadata> diff --git a/sys-boot/milo/metadata.xml b/sys-boot/milo/metadata.xml index dbb5ddd83c67..1d059ea1880b 100644 --- a/sys-boot/milo/metadata.xml +++ b/sys-boot/milo/metadata.xml @@ -3,7 +3,7 @@ <pkgmetadata> <maintainer type="project"> <email>alpha@gentoo.org</email> - <name>Gentoo Linux Alpha Development</name> + <name>Alpha architecture team</name> </maintainer> <longdescription lang="en"> On Intel based PC systems, the BIOS firmware sets up the system and diff --git a/sys-boot/milo/milo-2.4.18.ebuild b/sys-boot/milo/milo-2.4.18.ebuild index 0501252aa338..9ee907054222 100644 --- a/sys-boot/milo/milo-2.4.18.ebuild +++ b/sys-boot/milo/milo-2.4.18.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -48,8 +48,7 @@ SLOT="0" KEYWORDS="-* ~alpha" IUSE="" -DEPEND="sys-apps/kbd - >=sys-apps/sed-4" +DEPEND="sys-apps/kbd" RDEPEND="sys-fs/mtools" S=${WORKDIR}/milo-${milo_version} @@ -93,9 +92,9 @@ src_unpack() { src_prepare() { # gcc3 fixes, and some tweaks to get a build, also # reiserfs support for the kernel (and milo). - cd ${WORKDIR}/linux; eapply "${FILESDIR}"/linux-${kernel_version}-gcc3-milo.diff || die - cd ${WORKDIR}/linux; eapply "${WORKDIR}"/linux-2.2.20-reiserfs-3.5.35.diff || die - cd ${S}; eapply "${FILESDIR}"/milo-${milo_version}-gcc3-gentoo.diff || die + cd "${WORKDIR}"/linux; eapply "${FILESDIR}"/linux-${kernel_version}-gcc3-milo.diff || die + cd "${WORKDIR}"/linux; eapply "${WORKDIR}"/linux-2.2.20-reiserfs-3.5.35.diff || die + cd "${S}"; eapply "${FILESDIR}"/milo-${milo_version}-gcc3-gentoo.diff || die eapply_user } @@ -138,7 +137,7 @@ src_compile() { die "${MILO_IMAGE} not supported, or not recognised." fi - sed -i "s!__MILO_ARCHES__!${MILO_ARCH}!g" ${S}/tools/scripts/build + sed -i "s!__MILO_ARCHES__!${MILO_ARCH}!g" "${S}"/tools/scripts/build ewarn ewarn "seriously, this is going to take a while, go get some coffee..." @@ -154,9 +153,9 @@ src_compile() { ewarn # get kernel configured - cp ${custom_milo_kernel_config:-${S}/Documentation/config/linux-2.2.19-SuSE.config} \ - ${WORKDIR}/linux/.config - cd ${WORKDIR}/linux; yes n | make oldconfig || die "unable to configure kernel." + cp ${custom_milo_kernel_config:-"${S}"/Documentation/config/linux-2.2.19-SuSE.config} \ + "${WORKDIR}"/linux/.config + cd "${WORKDIR}"/linux; yes n | make oldconfig || die "unable to configure kernel." # we're building a generic kernel that defaults to ev5, but theres no # reason why we cant tweak the instruction set. @@ -165,7 +164,7 @@ src_compile() { mcpu_flag="`get-flag mcpu`" if [ ! -z "${mcpu_flag}" ]; then sed -i "s/\(CFLAGS := \$(CFLAGS) \)-mcpu=ev5$/\1-mcpu=${mcpu_flag:-ev5}/g" \ - ${WORKDIR}/linux/arch/alpha/Makefile + "${WORKDIR}"/linux/arch/alpha/Makefile fi # build the generic linux kernel, of course if you have @@ -173,11 +172,11 @@ src_compile() { # to hack it (or the .config used here). einfo "building a generic kernel for use with milo..." unset CC DISTCC_HOSTS; make dep vmlinux || die "unable to build generic kernel for milo." - cat ${FILESDIR}/objstrip.c > ${WORKDIR}/linux/arch/alpha/boot/tools/objstrip.c + cat "${FILESDIR}"/objstrip.c > "${WORKDIR}"/linux/arch/alpha/boot/tools/objstrip.c # make the objstrip utility. - gcc ${WORKDIR}/linux/arch/alpha/boot/tools/objstrip.c -o \ - ${WORKDIR}/linux/arch/alpha/boot/tools/objstrip || die "couldnt build objstrip." + gcc "${WORKDIR}"/linux/arch/alpha/boot/tools/objstrip.c -o \ + "${WORKDIR}"/linux/arch/alpha/boot/tools/objstrip || die "couldnt build objstrip." einfo "kernel build complete." einfo "building milo images..." @@ -191,20 +190,19 @@ src_compile() { append-flags -DMILO_SERIAL_NUMBER1="${milo_serial_number1:-0x002174616572475f}" # the Makefile missed this :-/ - cd ${S}/tools/common; make || die "couldnt make commonlib." + cd "${S}"/tools/common; make || die "couldnt make commonlib." # build all the milo images. - cd ${S}; tools/scripts/build || die "failed to build milo images." + cd "${S}"; tools/scripts/build || die "failed to build milo images." # put the ldmilo utility there. - cp ${DISTDIR}/ldmilo-patched-${ldmilo_patch} ${S}/binaries/ldmilo.exe - cp ${DISTDIR}/linload.exe ${S}/binaries/linload.exe + cp "${DISTDIR}"/ldmilo-patched-${ldmilo_patch} "${S}"/binaries/ldmilo.exe + cp "${DISTDIR}"/linload.exe "${S}"/binaries/linload.exe } src_install() { - - cd ${S}; dodir /opt/milo + cd "${S}"; dodir /opt/milo insinto /opt/milo einfo "Installing MILO images..." @@ -214,10 +212,10 @@ src_install() { doins ${i} done - cd ${S}/Documentation + cd "${S}"/Documentation dodoc ChangeLog filesystem Nikita.Todo README.milo Todo README.BSD Stuff WhatIsMilo \ - ${FILESDIR}/README-gentoo ${FILESDIR}/mkserial_no.c ${DISTDIR}/MILO-HOWTO + "${FILESDIR}"/README-gentoo "${FILESDIR}"/mkserial_no.c "${DISTDIR}"/MILO-HOWTO } diff --git a/sys-boot/mokutil/Manifest b/sys-boot/mokutil/Manifest index c1c7ed4b466f..24fa911ab2e8 100644 --- a/sys-boot/mokutil/Manifest +++ b/sys-boot/mokutil/Manifest @@ -1,2 +1 @@ -DIST mokutil-0.3.0_p20170405.tar.gz 32590 BLAKE2B 867574b05a7a7c842869f75bd3b6a0cd0af083862ffc912b25b12fe6283946968ac6872b25a727d37185fb821871d5a2f958afddbb7e2bfefde854c6f434ab8f SHA512 ee64627089efe341bff466249a126dcdcc4a53878b17f651b17423650c3aea76d52dcae01ed689ba5bd317125dd9a669816563aa676d46d8ac36863f38f9ea16 -DIST mokutil-0.5.0.tar.gz 37181 BLAKE2B 6bd74e4ef2777afcd80cfe1d56dba7c861b9cb7bb957db19529dc36df7d6172c1d43870b80fbacd5f2bf20dbe9c8174be0d4cb5ce3638ce83a99795ae7627c4b SHA512 600c142fcc44e33efd307341b814018ef956668790b56d42a523140e81098746d14ae096fc6c93985b3c26bb414b8b6862f59312f2c4bd9d657a11e4becc6ea7 +DIST mokutil-0.6.0.tar.gz 38047 BLAKE2B f2307807c700091f1e5a783b3ad8e7b3eaa17e05580b2c24fd0e92433c6b9bedfb51e9eb2d5d1c71448623b12b6667a573dd51ed03fc738aaf9815083e118ca0 SHA512 11a9d172dba4fbb674e58e5d82cb1dc65a80cff844c0eaebd106b4d4608b24a8207e0cfabf36fe1eedb67f68a8a18db2136c7b62aa3230ac104615e8284dbd7d diff --git a/sys-boot/mokutil/files/mokutil-0.6.0-conflict.patch b/sys-boot/mokutil/files/mokutil-0.6.0-conflict.patch new file mode 100644 index 000000000000..6283fa331635 --- /dev/null +++ b/sys-boot/mokutil/files/mokutil-0.6.0-conflict.patch @@ -0,0 +1,38 @@ +From dd55c28236809fc30a7f079882914cde45560277 Mon Sep 17 00:00:00 2001 +From: Gary Lin <glin@suse.com> +Date: Fri, 30 Jun 2023 10:36:54 +0800 +Subject: [PATCH] Avoid conflicting efi_char16_t type definitions + +It's not necessary to define 'efi_char16_t' as 'wchar_t' since we don't +need any wchar functions. Besides, it may conflict with efivar-38. This +commit defines 'efi_char16_t' as 'uint16_t' and adds the conditional +check to avoid the potential conflict. + +Fixes: https://github.com/lcp/mokutil/issues/66 + +Signed-off-by: Gary Lin <glin@suse.com> +--- + src/mokutil.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/mokutil.h b/src/mokutil.h +index d47a380..bd02608 100644 +--- a/src/mokutil.h ++++ b/src/mokutil.h +@@ -33,13 +33,14 @@ + #define __MOKUTIL_H__ + + #include <ctype.h> +-#include <wchar.h> + + #include "signature.h" + + typedef unsigned long efi_status_t; + typedef uint8_t efi_bool_t; +-typedef wchar_t efi_char16_t; /* UNICODE character */ ++#ifndef efi_char16_t ++typedef uint16_t efi_char16_t; /* UNICODE character */ ++#endif + + typedef enum { + DELETE_MOK = 0, diff --git a/sys-boot/mokutil/mokutil-0.3.0_p20170405.ebuild b/sys-boot/mokutil/mokutil-0.3.0_p20170405.ebuild deleted file mode 100644 index c83be9c0cdf4..000000000000 --- a/sys-boot/mokutil/mokutil-0.3.0_p20170405.ebuild +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools - -# This corresponds to a commit between 0.3.0 and 0.4.0! -GIT_HASH="e19adc575c1f9d8f08b7fbc594a0887ace63f83f" -DESCRIPTION="The utility to manipulate machines owner keys which managed in shim" -HOMEPAGE="https://github.com/lcp/mokutil" -SRC_URI="https://github.com/lcp/mokutil/archive/${GIT_HASH}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/${PN}-${GIT_HASH}" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -DEPEND="dev-libs/openssl:= - sys-libs/efivar:= - virtual/libcrypt:=" -RDEPEND="${DEPEND}" -BDEPEND="virtual/pkgconfig" - -src_prepare() { - default - eautoreconf -} diff --git a/sys-boot/mokutil/mokutil-0.5.0-r1.ebuild b/sys-boot/mokutil/mokutil-0.6.0.ebuild index 560c290cb156..b57693258f14 100644 --- a/sys-boot/mokutil/mokutil-0.5.0-r1.ebuild +++ b/sys-boot/mokutil/mokutil-0.6.0.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit autotools @@ -20,6 +20,8 @@ DEPEND="dev-libs/openssl:= RDEPEND="${DEPEND}" BDEPEND="virtual/pkgconfig" +PATCHES=( "${FILESDIR}"/mokutil-0.6.0-conflict.patch ) + src_prepare() { default eautoreconf diff --git a/sys-boot/netboot/Manifest b/sys-boot/netboot/Manifest deleted file mode 100644 index 7ba28c1e5c8b..000000000000 --- a/sys-boot/netboot/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST netboot-0.10.2.tar.gz 1457791 BLAKE2B bd7fbaa1c87990ebac3dfb22f947146b19c199ceb579d32ded9a58bed6bcae34b02a1bf9cf5c079ba389ba24ca6f89fb6b4faf0b3ed028f9fe56b8dc083d8507 SHA512 422e78833c36e9975a77226523e14ebf8b5af5c02e98628ee030459ebf9f26d020551265899e84ea27bf6ab43c4d9bf8edc6722f942f49103bac897c7cc4fa3e diff --git a/sys-boot/netboot/files/netboot-0.10.2-ldflags.patch b/sys-boot/netboot/files/netboot-0.10.2-ldflags.patch deleted file mode 100644 index 2cb245076d90..000000000000 --- a/sys-boot/netboot/files/netboot-0.10.2-ldflags.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- netboot-0.10.2/make.config.in.org 2007-02-01 13:09:18.000000000 +0100 -+++ netboot-0.10.2/make.config.in 2010-02-09 00:34:15.000000000 +0100 -@@ -105,7 +105,7 @@ - INCLUDE = $(patsubst %,-I%,$(subst :, ,$(VPATH))) - CDEFS = @DEFS@ -DNETBOOT - CFLAGS = @CFLAGS@ $(CDEBUG) $(CDEFS) $(INCLUDE) --LDFLAGS = -s -+LDFLAGS = @LDFLAGS@ - SYSLIBS = @LIBS@ - BDBLIB = @BDBLIB@ - ODBCLIB = @ODBCLIB@ ---- netboot-0.10.2/misc/Makefile.org 2007-02-01 19:42:10.000000000 +0100 -+++ netboot-0.10.2/misc/Makefile 2010-02-09 00:39:21.000000000 +0100 -@@ -76,7 +76,7 @@ - - gccrules: $(LIBTOOL) gccrules.o $(LIBNBA) - @$(LIBTOOL) --mode=link \ -- $(CC) $(CFLAGS) -o gccrules gccrules.o $(LIBS) \ -+ $(CC) $(CFLAGS) $(LDFLAGS) -o gccrules gccrules.o $(LIBS) \ - -no-install - - -@@ -89,13 +89,13 @@ - - gccopt: $(LIBTOOL) gccopt.o $(LIBNBA) - @$(LIBTOOL) --mode=link \ -- $(CC) $(CFLAGS) -o gccopt gccopt.o $(LIBS) \ -+ $(CC) $(CFLAGS) $(LDFLAGS) -o gccopt gccopt.o $(LIBS) \ - -no-install - - - nbmd5: $(LIBTOOL) nbmd5.o $(LIBNBA) - @$(LIBTOOL) --mode=link \ -- $(CC) $(CFLAGS) -o nbmd5 nbmd5.o $(LIBS) -+ $(CC) $(CFLAGS) $(LDFLAGS) -o nbmd5 nbmd5.o $(LIBS) - - - instdrv: instdrv.in diff --git a/sys-boot/netboot/files/netboot-0.10.2-slibtool.patch b/sys-boot/netboot/files/netboot-0.10.2-slibtool.patch deleted file mode 100644 index 82b83f9b5888..000000000000 --- a/sys-boot/netboot/files/netboot-0.10.2-slibtool.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/misc/instdrv.in -+++ b/misc/instdrv.in -@@ -296,7 +296,7 @@ - # - test -n "$MD5PROG" || MD5PROG="$DEFAULT_MD5PROG" - case $MD5PROG in -- */libtool*) -+ *libtool*) - # It's OK when calling MD5PROG through libtool - ;; - /*) diff --git a/sys-boot/netboot/metadata.xml b/sys-boot/netboot/metadata.xml deleted file mode 100644 index 8b89cc3f76f1..000000000000 --- a/sys-boot/netboot/metadata.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="person"> - <email>conikost@gentoo.org</email> - <name>Conrad Kostecki</name> - </maintainer> - <longdescription> - Netboot enables a computer with a compatible CPU to boot without access to a hdd or floppy. - The computer has to be equipped so it can load the operating system over an IP network from a server. - All tools required for this are included in the netboot package. - </longdescription> - <upstream> - <bugs-to>https://sourceforge.net/p/netboot/bugs/</bugs-to> - <remote-id type="sourceforge">netboot</remote-id> - </upstream> - <use> - <flag name="bootrom">Install the bootrom binary for creation of rom files, which can be used for booting via floppy or rom.</flag> - </use> -</pkgmetadata> diff --git a/sys-boot/netboot/netboot-0.10.2-r2.ebuild b/sys-boot/netboot/netboot-0.10.2-r2.ebuild deleted file mode 100644 index 13f09cb9284e..000000000000 --- a/sys-boot/netboot/netboot-0.10.2-r2.ebuild +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs - -DESCRIPTION="Allows to remote boot a computer over an IP network" -HOMEPAGE="http://netboot.sourceforge.net/" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="berkdb +bootrom +lzo odbc static-libs" - -DEPEND=" - berkdb? ( sys-libs/db:= ) - lzo? ( dev-libs/lzo:2= ) - odbc? ( dev-db/unixODBC:= ) -" - -RDEPEND="${DEPEND}" - -PATCHES=( - "${FILESDIR}/${P}-ldflags.patch" - "${FILESDIR}/${P}-slibtool.patch" -) - -src_prepare() { - default - - # Don't install support binaries into libdir - sed -e "152s:nblibdir:bindir:" -e "153s:nblibdir:bindir:" -i misc/Makefile || die - - # Don't install perl script into libdir - sed -e 's/nblibdir/nbmiscdir/g' -i mknbi-dos/utils/Makefile || die - - # Don't install vim syntax file, as it will be installed manually - sed -e '/mgl.vim/d' -i mknbi-mgl/Makefile || die -} - -src_configure() { - local myeconfargs=( - --datadir="/usr/share/netboot" - $(use_with berkdb berkeley-db) - $(use_enable bootrom) - $(use_with lzo) - $(use_with odbc) - $(use_enable static-libs static) - # Disable compilation of 16-bit assembler files, - # since it's broken on x86 and not supported on x86_64. - --with-gnu-as86="no" - --with-gnu-cc86="no" - --with-gnu-ld86="no" - ) - - econf "${myeconfargs[@]}" -} - -src_compile() { - # mknbi fails with parallel build - emake -j1 -} - -src_install() { - emake DESTDIR="${ED}" install - - insinto /usr/share/vim/vimfiles/syntax - doins "${S}"/mknbi-mgl/misc/mgl.vim - - dodoc README doc/{HISTORY,PROBLEMS,README.*,Spec.doc} - - docinto flashcard - dodoc FlashCard/README FlashCard/*.ps - - find "${D}" -name '*.la' -type f -delete || die -} diff --git a/sys-boot/os-prober/Manifest b/sys-boot/os-prober/Manifest index 3d27c08a60fe..83a974b2e30d 100644 --- a/sys-boot/os-prober/Manifest +++ b/sys-boot/os-prober/Manifest @@ -1 +1,2 @@ -DIST os-prober_1.78.tar.xz 26848 BLAKE2B eee68ab9be36807d86e8bda831cfd490a01d20d9cc3f84ca50d5e1143e5a2dd66e47d3bdf2b4780cf73cc692f0ffc9497c6cbf13ce7aa0057e996b13d706c8f7 SHA512 7a0425130d17ce8554e7d0797b53e3a984f63a2fdcf8e668c83d357418d8c68259ada25bc350b199adece2e683d9014f234e3a83ce5ab7485be2e69c45874640 +DIST os-prober_1.80.tar.xz 27400 BLAKE2B 56883c7d3f4c5dde2904cffc77fdf6a2c1caf230f9e84197e8d976e446815838448bb42afd18d4c9526efac9907db3d2e77c6f54889011d2d03d284a44ff4cbd SHA512 51b4fefb784d5ecf34f5148157ef233e2979c4a679a54600144be473bb6ccaf263c9121701a1ecc7523c7e3bfc439a4e3a92a5eb92431ead99cbe666b0f0e6f5 +DIST os-prober_1.81.tar.xz 27448 BLAKE2B 0159870612d265c5e610e093a8839129aa9dc111a6f3abee65a6044b4c997ba65a69f70deca246bde53c1cf5314812312178e82c0893093d9f23ced3b0176f9d SHA512 ffb0e618f9e58a7a8e4a265d253bad4e168c220697216684acb38dbfa20680e552eb7c5f3d2186cd750c61a8929bf152527aa85c39318ed8b025a4ffffadde50 diff --git a/sys-boot/os-prober/files/os-prober-1.76-exherbo.patch b/sys-boot/os-prober/files/os-prober-1.76-exherbo.patch deleted file mode 100644 index 6ef83dca223f..000000000000 --- a/sys-boot/os-prober/files/os-prober-1.76-exherbo.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 09fefdb360b69c2de03a2f1c881db87f924d3c76 Mon Sep 17 00:00:00 2001 -From: Timo Gurr <timo.gurr@gmail.com> -Date: Mon, 20 Feb 2017 17:33:14 +0100 -Subject: [PATCH] Add Exherbo Linux detection - ---- - os-probes/mounted/common/90linux-distro | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/os-probes/mounted/common/90linux-distro b/os-probes/mounted/common/90linux-distro -index badfbb1..41a5553 100755 ---- a/os-probes/mounted/common/90linux-distro -+++ b/os-probes/mounted/common/90linux-distro -@@ -137,6 +137,9 @@ if (ls "$dir"/lib*/ld*.so* && [ -d "$dir/boot" ] || ls "$dir"/usr/lib*/ld*.so*) - elif [ -e "$dir/etc/devuan_version" ]; then - short="Devuan" - long="$(printf "Devuan GNU/Linux (%s)\n" "$(cat "$dir/etc/devuan_version")")" -+ elif [ -e "$dir/etc/exherbo-release" ]; then -+ short="Exherbo" -+ long="Exherbo Linux" - else - short="Linux" - long="unknown Linux distribution" --- -2.11.1 - diff --git a/sys-boot/os-prober/files/os-prober-1.78-btrfsfix.patch b/sys-boot/os-prober/files/os-prober-1.79-btrfs-subvolume-detection.patch index 5a74285dc73f..61337661401f 100644 --- a/sys-boot/os-prober/files/os-prober-1.78-btrfsfix.patch +++ b/sys-boot/os-prober/files/os-prober-1.79-btrfs-subvolume-detection.patch @@ -1,13 +1,17 @@ -Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688336 +Fixes detection of multiple linux installations on different subvolumes of the +same partition. This patch is a combination of https://src.fedoraproject.org/rpms/os-prober/blob/a27e5121193e2222ada672db3521a7d9de70991b/f/os-prober-btrfsfix.patch and https://build.opensuse.org/package/view_file/openSUSE:Factory/os-prober/Improve-btrfs-handling-on-os-probing-for-grub2.patch?rev=56 . + +Bug: https://bugs.gentoo.org/790434 + https://bugs.gentoo.org/817905 + https://bugs.debian.org/688336 + https://bugzilla.redhat.com/888341 -diff --git a/common.sh b/common.sh -index c2c5f46..8fb3c5f 100644 --- a/common.sh +++ b/common.sh @@ -155,6 +155,7 @@ parse_proc_mounts () { done } - + +# add forth parameter to pickup btrfs subvol info parsefstab () { while read -r line; do @@ -22,7 +26,7 @@ index c2c5f46..8fb3c5f 100644 esac done } - + +#check_btrfs_mounted $bootsv $bootuuid) +check_btrfs_mounted () { + bootsv="$1" @@ -36,12 +40,10 @@ index c2c5f46..8fb3c5f 100644 unescape_mount () { printf %s "$1" | \ sed 's/\\011/ /g; s/\\012/\n/g; s/\\040/ /g; s/\\134/\\/g' -diff --git a/linux-boot-prober b/linux-boot-prober -index e32dc84..2a60fa2 100755 --- a/linux-boot-prober +++ b/linux-boot-prober @@ -5,16 +5,143 @@ set -e - + newns "$@" require_tmpdir +ERR="n" @@ -55,9 +57,9 @@ index e32dc84..2a60fa2 100755 +bootmnt= +bootsv= +bootuuid= - + grep "^/dev/" /proc/mounts | parse_proc_mounts >"$OS_PROBER_TMP/mounted-map" || true - + -partition="$1" +if [ -z "$1" ]; then + ERR=y @@ -77,14 +79,14 @@ index e32dc84..2a60fa2 100755 + partition="$1" + type=other +fi - + -if [ -z "$partition" ]; then +if [ "x$ERR" != xn ]; then echo "usage: linux-boot-prober partition" >&2 + echo " linux-boot-prober btrfs UUID=<> subvol=<>" >&2 exit 1 fi - + +if [ "$type" = btrfs ]; then + # handle all of the btrfs stuff here + if [ ! -e "/proc/self/mountinfo" ]; then @@ -187,7 +189,7 @@ index e32dc84..2a60fa2 100755 log "Device '$partition' does not exist; skipping" continue @@ -22,8 +149,8 @@ fi - + if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map"; then for test in /usr/lib/linux-boot-probes/*; do - debug "running $test" @@ -196,14 +198,12 @@ index e32dc84..2a60fa2 100755 if $test "$partition"; then debug "linux detected by $test" break -diff --git a/linux-boot-probes/mounted/common/40grub2 b/linux-boot-probes/mounted/common/40grub2 -index 885614e..db5cbfd 100755 --- a/linux-boot-probes/mounted/common/40grub2 +++ b/linux-boot-probes/mounted/common/40grub2 -@@ -2,17 +2,30 @@ +@@ -2,17 +2,42 @@ . /usr/share/os-prober/common.sh set -e - + +# add support for btrfs with no separate /boot +# that is, rootsv = bootsv partition="$1" @@ -212,16 +212,28 @@ index 885614e..db5cbfd 100755 type="$4" +rootsv="$5" +bootsv="$6" - + found_item=0 - + entry_result () { -+ if [ "x$type" = "xbtrfs" -a "$partition" = "$bootpart" ]; then -+ # trim off the leading subvol -+ kernelfile=$(echo "$kernel" | cut -d '/' -f 2- | cut -d '/' -f 2-) -+ if [ "x$rootsv" != "x$bootsv" ]; then -+ kernelfile="/boot/$kernelfile" ++ if [ "x$type" = "xbtrfs" ]; then ++ bsv=${bootsv:+/}${bootsv} ++ # if path is not relative to subvolume make it relative ++ kernel=${kernel#${bsv}} ++ kernelfile=$kernel ++ initrd=${initrd#${bsv}} ++ if [ "x$GRUB_FS" != "xbtrfs" ]; then ++ # absolute path needed: prepend subvolume if $kernel isn't empty ++ kernel=${kernel:+${bsv}}${kernel} ++ # handle multiple initrd paths ++ local initrd_path= ++ for path in ${initrd}; do ++ initrd_path+="${bsv}${path} " ++ done ++ initrd="${initrd_path% }" + fi ++ # assumed: rootsv != bootsv if rootsv isn't ancestor of bootsv ++ [ "$partition" != "$bootpart" -o "$rootsv" != "$bootsv" ] && kernelfile="/boot${kernelfile}" + else + kernelfile=$kernel + fi @@ -232,12 +244,41 @@ index 885614e..db5cbfd 100755 result "$rootpart:$bootpart:$title:$kernel:$initrd:$parameters" found_item=1 fi -diff --git a/os-prober b/os-prober -index 8852887..482c3c2 100755 +@@ -64,7 +88,7 @@ parse_grub_menu () { + ignore_item=1 + fi + ;; +- linux) ++ linux|linuxefi|linux16) + # Hack alert: sed off any (hdn,n) but + # assume the kernel is on the same + # partition. +@@ -73,18 +98,18 @@ parse_grub_menu () { + parameters="$@" + # Systems with a separate /boot will not have + # the path to the kernel in grub.cfg. +- if [ "$partition" != "$bootpart" ]; then ++ if [ "$partition" != "$bootpart" -a "$type" != "btrfs" ]; then + kernel="/boot$kernel" + fi + ;; +- initrd) ++ initrd|initrdefi|initrd16) + shift + initrd="" + for initrd_path in "$@"; do + # sed hack, as above + initrd_path="$(echo "$initrd_path" | sed 's/(.*)//')" + # Initrd same. +- if [ "$partition" != "$bootpart" ]; then ++ if [ "$partition" != "$bootpart" -a "$type" != "btrfs" ]; then + initrd_path="/boot$initrd_path" + fi + if [ -z "$initrd" ]; then --- a/os-prober +++ b/os-prober @@ -76,9 +76,12 @@ partitions () { - + # Also detect OSes on LVM volumes (assumes LVM is active) if type lvs >/dev/null 2>&1; then - echo "$(LVM_SUPPRESS_FD_WARNINGS=1 log_output lvs --noheadings --separator : -o vg_name,lv_name | @@ -248,12 +289,12 @@ index 8852887..482c3c2 100755 + # now lets make sure we got all of the btrfs partitions and disks + blkid | grep 'TYPE="btrfs"' | cut -d ':' -f 1 } - + parse_proc_swaps () { @@ -136,6 +139,8 @@ if [ -f /proc/mdstat ] ; then grep "^md" /proc/mdstat | cut -d: -f2- | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true fi - + +: >"$OS_PROBER_TMP/btrfs-vols" + for partition in $(partitions); do @@ -262,7 +303,7 @@ index 8852887..482c3c2 100755 @@ -154,7 +159,26 @@ for partition in $(partitions); do continue fi - + - if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map" ; then + # do btrfs processing here; both mounted and unmounted will + # be handled by 50mounted-tests so we can do a subvol only once. @@ -287,14 +328,12 @@ index 8852887..482c3c2 100755 for test in /usr/lib/os-probes/*; do if [ -f "$test" ] && [ -x "$test" ]; then debug "running $test on $partition" -diff --git a/os-probes/common/50mounted-tests b/os-probes/common/50mounted-tests -index 2951ef9..e33eb82 100755 --- a/os-probes/common/50mounted-tests +++ b/os-probes/common/50mounted-tests -@@ -19,19 +19,31 @@ do_unmount() { +@@ -14,19 +14,31 @@ do_unmount() { rmdir "$tmpmnt" || true } - + -types="$(fs_type "$partition")" +if [ "x$1" = xbtrfs ]; then + types=btrfs @@ -328,7 +367,7 @@ index 2951ef9..e33eb82 100755 elif [ "$types" = ntfs ]; then if type ntfs-3g >/dev/null 2>&1; then types='ntfs-3g ntfs' -@@ -40,7 +52,7 @@ elif [ -z "$types" ]; then +@@ -35,7 +47,7 @@ elif [ -z "$types" ]; then if type cryptsetup >/dev/null 2>&1 && \ cryptsetup luksDump "$partition" >/dev/null 2>&1; then debug "$1 is a LUKS partition; skipping" @@ -337,9 +376,9 @@ index 2951ef9..e33eb82 100755 fi for type in $(grep -v nodev /proc/filesystems); do # hfsplus filesystems are mountable as hfs. Try hfs last so -@@ -63,6 +75,108 @@ if [ ! -d "$tmpmnt" ]; then +@@ -58,6 +70,108 @@ if [ ! -d "$tmpmnt" ]; then fi - + mounted= + +# all btrfs processing here. Handle both unmounted and @@ -381,7 +420,7 @@ index 2951ef9..e33eb82 100755 + mpoint="$tmpmnt" + fi + -+ test="/usr/libexec/os-probes/mounted/90linux-distro" ++ test="/usr/lib/os-probes/mounted/90linux-distro" + if [ -f "$test" ] && [ -x "$test" ]; then + debug "running subtest $test" + if "$test" "$partition" "$mpoint" btrfs "UUID=$UUID"; then @@ -446,8 +485,6 @@ index 2951ef9..e33eb82 100755 if type grub-mount >/dev/null 2>&1 && \ type grub-probe >/dev/null 2>&1 && \ grub-mount "$partition" "$tmpmnt" 2>/dev/null; then -diff --git a/os-probes/mounted/common/90linux-distro b/os-probes/mounted/common/90linux-distro -index badfbb1..9bc5154 100755 --- a/os-probes/mounted/common/90linux-distro +++ b/os-probes/mounted/common/90linux-distro @@ -7,6 +7,8 @@ set -e @@ -456,7 +493,7 @@ index badfbb1..9bc5154 100755 type="$3" +uuid="$4" +subvol="$5" - + # This test is inaccurate, but given separate / and /boot partitions and the # fact that only some architectures have ld-linux.so, I can't see anything @@ -143,7 +145,11 @@ if (ls "$dir"/lib*/ld*.so* && [ -d "$dir/boot" ] || ls "$dir"/usr/lib*/ld*.so*) diff --git a/sys-boot/os-prober/files/os-prober-1.79-efi-chroot-blkid-fallback.patch b/sys-boot/os-prober/files/os-prober-1.79-efi-chroot-blkid-fallback.patch new file mode 100644 index 000000000000..b5b90b2214da --- /dev/null +++ b/sys-boot/os-prober/files/os-prober-1.79-efi-chroot-blkid-fallback.patch @@ -0,0 +1,24 @@ +Fixes missing entries when os-prober is run in a chroot environment by falling back +to blkid if udev isn't available or if /run/udev isn't bind mounted. Modified from +https://build.opensuse.org/package/view_file/Base:System/os-prober/os-prober-05efi-blkid.patch?rev=103 + +Bug: https://bugs.gentoo.org/761475 + https://bugzilla.opensuse.org/1076779 + +--- a/os-probes/mounted/x86/05efi ++++ b/os-probes/mounted/x86/05efi +@@ -46,6 +46,14 @@ if type udevinfo > /dev/null 2>&1; then + fi + + eval "$(udevinfo -q property -n "$partition" | grep -E '^ID_PART_ENTRY_(TYPE|SCHEME)=')" ++ ++ # udev may not work in chroot as its db may not be there, bailout that by blkid (bsc#1076779) ++ if [ -z "$ID_PART_ENTRY_TYPE" -a -z "$ID_PART_ENTRY_SCHEME" ] && ++ type blkid > /dev/null 2>&1; then ++ debug "fallback to blkid" ++ eval "$(blkid -p -o udev "$partition" | grep -E '^(ID_PART_ENTRY_(TYPE|SCHEME))=')" ++ fi ++ + debug "$partition partition scheme is $ID_PART_ENTRY_SCHEME" + debug "$partition partition type is $ID_PART_ENTRY_TYPE" + diff --git a/sys-boot/os-prober/files/os-prober-1.79-fix-busy-umount-message.patch b/sys-boot/os-prober/files/os-prober-1.79-fix-busy-umount-message.patch new file mode 100644 index 000000000000..a9859f5005ab --- /dev/null +++ b/sys-boot/os-prober/files/os-prober-1.79-fix-busy-umount-message.patch @@ -0,0 +1,21 @@ +Fixes errors like "umount: /var/lib/os-prober/mount: target is busy." +which can appear in some corner-cases. + +Bug: https://bugzilla.redhat.com/903906 + +--- a/common.sh ++++ b/common.sh +@@ -336,3 +336,13 @@ linux_mount_boot () { + + mountboot="$bootpart $mounted" + } ++ ++umount_exec=$(which umount) ++umount() { ++ if ! $umount_exec $@ 2> /dev/null; then ++ error "umount error, retrying after 1 sec" ++ sleep 1 ++ $umount_exec $@ ++ fi ++} ++ diff --git a/sys-boot/os-prober/files/os-prober-1.79-mdraid-detection.patch b/sys-boot/os-prober/files/os-prober-1.79-mdraid-detection.patch new file mode 100644 index 000000000000..15b9de5117a9 --- /dev/null +++ b/sys-boot/os-prober/files/os-prober-1.79-mdraid-detection.patch @@ -0,0 +1,28 @@ +Fixes OS detection on mdraid devices + +Bug: https://bugs.debian.org/648251 + https://bugzilla.redhat.com/752402 + +--- a/os-prober ++++ b/os-prober +@@ -64,6 +64,11 @@ partitions () { + exit 0 + fi + ++ # Add MD RAID devices ++ if [ -f /proc/mdstat ] ; then ++ awk '/^md/ {printf "/dev/"$1"\n"}' /proc/mdstat ++ fi ++ + # Also detect OSes on LVM volumes (assumes LVM is active) + if type lvs >/dev/null 2>&1; then + echo "$(LVM_SUPPRESS_FD_WARNINGS=1 log_output lvs --noheadings --separator : -o vg_name,lv_name | +@@ -123,7 +128,7 @@ if [ -f /proc/swaps ]; then + fi + : >"$OS_PROBER_TMP/raided-map" + if [ -f /proc/mdstat ] ; then +- grep "^md" /proc/mdstat | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true ++ grep "^md" /proc/mdstat | cut -d: -f2- | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true + fi + + for partition in $(partitions); do diff --git a/sys-boot/os-prober/files/os-prober-1.79-mounted-boot-partition-fix.patch b/sys-boot/os-prober/files/os-prober-1.79-mounted-boot-partition-fix.patch new file mode 100644 index 000000000000..1be8c810ddf5 --- /dev/null +++ b/sys-boot/os-prober/files/os-prober-1.79-mounted-boot-partition-fix.patch @@ -0,0 +1,17 @@ +Fixes the problem of the root partition being returned instead of the boot +partition when both are already mounted somewhere. + +Bug: https://bugs.debian.org/699840 + https://bugzilla.redhat.com/906886 + +--- a/linux-boot-prober ++++ b/linux-boot-prober +@@ -167,7 +167,7 @@ else + bootpart="${mountboot%% *}" + bootmounted="${mountboot#* }" + else +- bootpart="$partition" ++ bootpart="$(grep " $mpoint/boot " "$OS_PROBER_TMP/mounted-map" | head -n1 | cut -d " " -f 4)" + bootmounted=0 + fi + for test in /usr/lib/linux-boot-probes/mounted/*; do diff --git a/sys-boot/os-prober/files/os-prober-1.79-use-fstab-name.patch b/sys-boot/os-prober/files/os-prober-1.79-use-fstab-name.patch new file mode 100644 index 000000000000..e38d85a77feb --- /dev/null +++ b/sys-boot/os-prober/files/os-prober-1.79-use-fstab-name.patch @@ -0,0 +1,34 @@ +For symlinks to partions in fstab, returns the partition name from fstab instead +of the name of its resolved destination, eg., for /dev/mapper/mylvmvol in fstab, +linked to /dev/dm-2, return "mylvmvol" instead of "dm-2". + +Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699839 + https://bugzilla.redhat.com/show_bug.cgi?id=893472 + +--- a/common.sh ++++ b/common.sh +@@ -269,7 +269,7 @@ linux_mount_boot () { + if [ "$bindfrom" != "$tmpmnt/boot" ]; then + if mount --bind "$bindfrom" "$tmpmnt/boot"; then + mounted=1 +- bootpart="$1" ++ bootpart="$tmppart" + else + debug "failed to bind-mount $bindfrom onto $tmpmnt/boot" + fi +@@ -277,6 +277,15 @@ linux_mount_boot () { + fi + if [ "$mounted" ]; then + : ++ elif [ -e "$tmppart" ]; then ++ bootpart="$tmppart" ++ boottomnt="$tmppart" ++ elif [ -e "$tmpmnt/$tmppart" ]; then ++ bootpart="$tmppart" ++ boottomnt="$tmpmnt/$tmppart" ++ elif [ -e "/target/$tmppart" ]; then ++ bootpart="$tmppart" ++ boottomnt="/target/$tmppart" + elif [ -e "$1" ]; then + bootpart="$1" + boottomnt="$1" diff --git a/sys-boot/os-prober/files/os-prober-1.81-boot-detected-twice.patch b/sys-boot/os-prober/files/os-prober-1.81-boot-detected-twice.patch new file mode 100644 index 000000000000..b06b31d0077e --- /dev/null +++ b/sys-boot/os-prober/files/os-prober-1.81-boot-detected-twice.patch @@ -0,0 +1,46 @@ +diff -urN o/common.sh os-prober-1.81/common.sh +--- o/common.sh 2023-01-22 13:43:23.333123217 -0800 ++++ os-prober-1.81/common.sh 2023-01-22 13:44:49.408153101 -0800 +@@ -326,3 +326,18 @@ + fi + } + ++list_mounts() { ++ if [ -f /proc/self/mountinfo ]; then ++ local x dev mount devs found ++ found=: ++ while read -r x x dev x mount x x fs x; do ++ if [ -L "/sys/dev/block/$dev" ]; then ++ devs="/dev/`readlink \"/sys/dev/block/$dev\" | rev | cut -d/ -f1 | rev`" ++ printf '%s %s %s\n' "$(mapdevfs "$devs")" "$mount" "$fs" ++ found="return 0" ++ fi ++ done < /proc/self/mountinfo ++ $found ++ fi ++ grep "^/dev/" /proc/mounts | parse_proc_mounts ++} +diff -urN o/linux-boot-prober os-prober-1.81/linux-boot-prober +--- o/linux-boot-prober 2023-01-22 13:43:23.334123229 -0800 ++++ os-prober-1.81/linux-boot-prober 2023-01-22 13:43:34.897260733 -0800 +@@ -17,7 +17,7 @@ + bootsv= + bootuuid= + +-grep "^/dev/" /proc/mounts | parse_proc_mounts >"$OS_PROBER_TMP/mounted-map" || true ++list_mounts >"$OS_PROBER_TMP/mounted-map" || true + + if [ -z "$1" ]; then + ERR=y +diff -urN o/os-prober os-prober-1.81/os-prober +--- o/os-prober 2023-01-22 13:43:23.334123229 -0800 ++++ os-prober-1.81/os-prober 2023-01-22 13:43:34.897260733 -0800 +@@ -128,7 +128,7 @@ + + # We need to properly canonicalize partitions with mount points and partitions + # used in RAID +-grep "^/dev/" /proc/mounts | parse_proc_mounts >"$OS_PROBER_TMP/mounted-map" || true ++list_mounts >"$OS_PROBER_TMP/mounted-map" || true + : >"$OS_PROBER_TMP/swaps-map" + if [ -f /proc/swaps ]; then + grep "^/dev/" /proc/swaps | parse_proc_swaps >"$OS_PROBER_TMP/swaps-map" || true diff --git a/sys-boot/os-prober/os-prober-1.78.ebuild b/sys-boot/os-prober/os-prober-1.80.ebuild index 0ee253a646f7..39b187859a6e 100644 --- a/sys-boot/os-prober/os-prober-1.78.ebuild +++ b/sys-boot/os-prober/os-prober-1.80.ebuild @@ -1,16 +1,22 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit readme.gentoo-r1 toolchain-funcs DESCRIPTION="Utility to detect other OSs on a set of drives" -HOMEPAGE="https://packages.debian.org/source/sid/os-prober" -SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${PN}_${PV}.tar.xz" +HOMEPAGE="https://salsa.debian.org/installer-team/os-prober" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://salsa.debian.org/installer-team/${PN}.git" +else + SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${PN}_${PV}.tar.xz" + KEYWORDS="amd64 x86" +fi LICENSE="GPL-3" SLOT="0" -KEYWORDS="amd64 x86" # grub-mount needed per bug #607518 RDEPEND="sys-boot/grub:2[mount]" @@ -19,16 +25,18 @@ RDEPEND="sys-boot/grub:2[mount]" QA_MULTILIB_PATHS="usr/lib/os-prober/.*" PATCHES=( - "${FILESDIR}"/${PN}-1.76-exherbo.patch - "${FILESDIR}"/${PN}-1.78-btrfsfix.patch + "${FILESDIR}"/${PN}-1.79-mdraid-detection.patch + "${FILESDIR}"/${PN}-1.79-btrfs-subvolume-detection.patch + "${FILESDIR}"/${PN}-1.79-use-fstab-name.patch + "${FILESDIR}"/${PN}-1.79-mounted-boot-partition-fix.patch + "${FILESDIR}"/${PN}-1.79-fix-busy-umount-message.patch + "${FILESDIR}"/${PN}-1.79-efi-chroot-blkid-fallback.patch ) DOC_CONTENTS=" If you intend for os-prober to detect versions of Windows installed on NTFS-formatted partitions, your system must be capable of reading the NTFS filesystem. One way to do this is by installing sys-fs/ntfs3g. - Also, in a chroot environment, it is necessary to bind mount /run/udev - (see https://wiki.gentoo.org/wiki/GRUB2#os-prober_and_UEFI_in_chroot). NOTE: Since sys-boot/grub-2.06-rc1, grub-mkconfig disables os-prober by default. To enable it, add GRUB_DISABLE_OS_PROBER=false to /etc/default/grub. diff --git a/sys-boot/os-prober/os-prober-1.81-r1.ebuild b/sys-boot/os-prober/os-prober-1.81-r1.ebuild new file mode 100644 index 000000000000..924b7251237a --- /dev/null +++ b/sys-boot/os-prober/os-prober-1.81-r1.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit readme.gentoo-r1 toolchain-funcs + +DESCRIPTION="Utility to detect other OSs on a set of drives" +HOMEPAGE="https://salsa.debian.org/installer-team/os-prober" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://salsa.debian.org/installer-team/${PN}.git" +else + SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${PN}_${PV}.tar.xz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-3" +SLOT="0" + +# grub-mount needed per bug #607518 +RDEPEND="sys-boot/grub:2[mount]" + +# bug 594250 +QA_MULTILIB_PATHS="usr/lib/os-prober/.*" + +PATCHES=( + "${FILESDIR}"/${PN}-1.79-mdraid-detection.patch + "${FILESDIR}"/${PN}-1.79-btrfs-subvolume-detection.patch + "${FILESDIR}"/${PN}-1.79-use-fstab-name.patch + "${FILESDIR}"/${PN}-1.79-mounted-boot-partition-fix.patch + "${FILESDIR}"/${PN}-1.79-fix-busy-umount-message.patch + "${FILESDIR}"/${PN}-1.79-efi-chroot-blkid-fallback.patch + "${FILESDIR}"/${PN}-1.81-boot-detected-twice.patch +) + +DOC_CONTENTS=" + If you intend for os-prober to detect versions of Windows installed on + NTFS-formatted partitions, your system must be capable of reading the + NTFS filesystem. One way to do this is by installing sys-fs/ntfs3g. + + NOTE: Since sys-boot/grub-2.06-rc1, grub-mkconfig disables os-prober by default. + To enable it, add GRUB_DISABLE_OS_PROBER=false to /etc/default/grub. +" + +src_prepare() { + default + # use default GNU rules + rm Makefile || die 'rm Makefile failed' +} + +src_compile() { + tc-export CC + emake newns +} + +src_install() { + dobin os-prober linux-boot-prober + + # Note: as no shared libraries are installed, /usr/lib is correct + exeinto /usr/lib/os-prober + doexe newns + + insinto /usr/share/os-prober + doins common.sh + + keepdir /var/lib/os-prober + + local debarch=${ARCH%-*} dir + + case ${debarch} in + amd64) debarch=x86 ;; + ppc|ppc64) debarch=powerpc ;; + esac + + for dir in os-probes{,/mounted,/init} linux-boot-probes{,/mounted}; do + exeinto /usr/lib/${dir} + doexe ${dir}/common/* + if [[ -d ${dir}/${debarch} ]]; then + for exe in ${dir}/${debarch}/*; do + [[ ! -d "${exe}" ]] && doexe "${exe}" + done + fi + if [[ -d ${dir}/${debarch}/efi ]]; then + exeinto /usr/lib/${dir}/efi + doexe ${dir}/${debarch}/efi/* + fi + done + + if use amd64 || use x86; then + exeinto /usr/lib/os-probes/mounted + doexe os-probes/mounted/powerpc/20macosx + fi + + einstalldocs + dodoc debian/changelog + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/sys-boot/os-prober/os-prober-1.81.ebuild b/sys-boot/os-prober/os-prober-1.81.ebuild new file mode 100644 index 000000000000..39b187859a6e --- /dev/null +++ b/sys-boot/os-prober/os-prober-1.81.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit readme.gentoo-r1 toolchain-funcs + +DESCRIPTION="Utility to detect other OSs on a set of drives" +HOMEPAGE="https://salsa.debian.org/installer-team/os-prober" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://salsa.debian.org/installer-team/${PN}.git" +else + SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${PN}_${PV}.tar.xz" + KEYWORDS="amd64 x86" +fi + +LICENSE="GPL-3" +SLOT="0" + +# grub-mount needed per bug #607518 +RDEPEND="sys-boot/grub:2[mount]" + +# bug 594250 +QA_MULTILIB_PATHS="usr/lib/os-prober/.*" + +PATCHES=( + "${FILESDIR}"/${PN}-1.79-mdraid-detection.patch + "${FILESDIR}"/${PN}-1.79-btrfs-subvolume-detection.patch + "${FILESDIR}"/${PN}-1.79-use-fstab-name.patch + "${FILESDIR}"/${PN}-1.79-mounted-boot-partition-fix.patch + "${FILESDIR}"/${PN}-1.79-fix-busy-umount-message.patch + "${FILESDIR}"/${PN}-1.79-efi-chroot-blkid-fallback.patch +) + +DOC_CONTENTS=" + If you intend for os-prober to detect versions of Windows installed on + NTFS-formatted partitions, your system must be capable of reading the + NTFS filesystem. One way to do this is by installing sys-fs/ntfs3g. + + NOTE: Since sys-boot/grub-2.06-rc1, grub-mkconfig disables os-prober by default. + To enable it, add GRUB_DISABLE_OS_PROBER=false to /etc/default/grub. +" + +src_prepare() { + default + # use default GNU rules + rm Makefile || die 'rm Makefile failed' +} + +src_compile() { + tc-export CC + emake newns +} + +src_install() { + dobin os-prober linux-boot-prober + + # Note: as no shared libraries are installed, /usr/lib is correct + exeinto /usr/lib/os-prober + doexe newns + + insinto /usr/share/os-prober + doins common.sh + + keepdir /var/lib/os-prober + + local debarch=${ARCH%-*} dir + + case ${debarch} in + amd64) debarch=x86 ;; + ppc|ppc64) debarch=powerpc ;; + esac + + for dir in os-probes{,/mounted,/init} linux-boot-probes{,/mounted}; do + exeinto /usr/lib/${dir} + doexe ${dir}/common/* + if [[ -d ${dir}/${debarch} ]]; then + for exe in ${dir}/${debarch}/*; do + [[ ! -d "${exe}" ]] && doexe "${exe}" + done + fi + if [[ -d ${dir}/${debarch}/efi ]]; then + exeinto /usr/lib/${dir}/efi + doexe ${dir}/${debarch}/efi/* + fi + done + + if use amd64 || use x86; then + exeinto /usr/lib/os-probes/mounted + doexe os-probes/mounted/powerpc/20macosx + fi + + einstalldocs + dodoc debian/changelog + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/sys-boot/os-prober/os-prober-9999.ebuild b/sys-boot/os-prober/os-prober-9999.ebuild new file mode 100644 index 000000000000..60466c142031 --- /dev/null +++ b/sys-boot/os-prober/os-prober-9999.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit readme.gentoo-r1 toolchain-funcs + +DESCRIPTION="Utility to detect other OSs on a set of drives" +HOMEPAGE="https://salsa.debian.org/installer-team/os-prober" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://salsa.debian.org/installer-team/${PN}.git" +else + SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${PN}_${PV}.tar.xz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-3" +SLOT="0" + +# grub-mount needed per bug #607518 +RDEPEND="sys-boot/grub:2[mount]" + +# bug 594250 +QA_MULTILIB_PATHS="usr/lib/os-prober/.*" + +PATCHES=( + "${FILESDIR}"/${PN}-1.79-mdraid-detection.patch + "${FILESDIR}"/${PN}-1.79-btrfs-subvolume-detection.patch + "${FILESDIR}"/${PN}-1.79-use-fstab-name.patch + "${FILESDIR}"/${PN}-1.79-mounted-boot-partition-fix.patch + "${FILESDIR}"/${PN}-1.79-fix-busy-umount-message.patch + "${FILESDIR}"/${PN}-1.79-efi-chroot-blkid-fallback.patch +) + +DOC_CONTENTS=" + If you intend for os-prober to detect versions of Windows installed on + NTFS-formatted partitions, your system must be capable of reading the + NTFS filesystem. One way to do this is by installing sys-fs/ntfs3g. + + NOTE: Since sys-boot/grub-2.06-rc1, grub-mkconfig disables os-prober by default. + To enable it, add GRUB_DISABLE_OS_PROBER=false to /etc/default/grub. +" + +src_prepare() { + default + # use default GNU rules + rm Makefile || die 'rm Makefile failed' +} + +src_compile() { + tc-export CC + emake newns +} + +src_install() { + dobin os-prober linux-boot-prober + + # Note: as no shared libraries are installed, /usr/lib is correct + exeinto /usr/lib/os-prober + doexe newns + + insinto /usr/share/os-prober + doins common.sh + + keepdir /var/lib/os-prober + + local debarch=${ARCH%-*} dir + + case ${debarch} in + amd64) debarch=x86 ;; + ppc|ppc64) debarch=powerpc ;; + esac + + for dir in os-probes{,/mounted,/init} linux-boot-probes{,/mounted}; do + exeinto /usr/lib/${dir} + doexe ${dir}/common/* + if [[ -d ${dir}/${debarch} ]]; then + for exe in ${dir}/${debarch}/*; do + [[ ! -d "${exe}" ]] && doexe "${exe}" + done + fi + if [[ -d ${dir}/${debarch}/efi ]]; then + exeinto /usr/lib/${dir}/efi + doexe ${dir}/${debarch}/efi/* + fi + done + + if use amd64 || use x86; then + exeinto /usr/lib/os-probes/mounted + doexe os-probes/mounted/powerpc/20macosx + fi + + einstalldocs + dodoc debian/changelog + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/sys-boot/palo/Manifest b/sys-boot/palo/Manifest index cc5d02da506f..402a7081d8c8 100644 --- a/sys-boot/palo/Manifest +++ b/sys-boot/palo/Manifest @@ -1 +1 @@ -DIST palo-2.14.tar.gz 125207 BLAKE2B fcbc7e59552d83828c07acb055429c1155b738dd12e22c9fc81759b9f84382e3ea793e957421d420c93fa5818d5ad8f12b5317cfe6d5d45d95fc15b272c6fe8c SHA512 9d22ea2826a69a9bb661a4c17aaa78d648f0684b96c2dc0f164d2086f48fc85207e40c69227dd76d153dd171574dd62f6e5e90dd415209de372b4d7d8ab40f57 +DIST palo-2.24.tar.gz 132587 BLAKE2B a24bd6b70cf395b1254c280821f92eb00e02cb2dc0cc142e7bb706361c86a2fd45424f832d6c3ff383f02bde3eccc6e250a7ee279af3977b5bc2b2576e6ac9d0 SHA512 e520eff46798b7b94eed081c6310b1dfda07918e5f31ce140095b6742d81b85e62a657aa3761f9a3819ad7c8897d548af8fdd85b43997386c2ec6ace6fbf1b2e diff --git a/sys-boot/palo/metadata.xml b/sys-boot/palo/metadata.xml index c4de8de83386..26861344b531 100644 --- a/sys-boot/palo/metadata.xml +++ b/sys-boot/palo/metadata.xml @@ -3,6 +3,6 @@ <pkgmetadata> <maintainer type="project"> <email>hppa@gentoo.org</email> -<name>Gentoo Linux HPPA Development</name> +<name>HPPA architecture team</name> </maintainer> </pkgmetadata> diff --git a/sys-boot/palo/palo-2.14.ebuild b/sys-boot/palo/palo-2.24.ebuild index 0a94f5679bf1..967e766b9dee 100644 --- a/sys-boot/palo/palo-2.14.ebuild +++ b/sys-boot/palo/palo-2.24.ebuild @@ -1,16 +1,22 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 + inherit toolchain-funcs -DESCRIPTION="PALO : PArisc Linux Loader" -HOMEPAGE="http://parisc-linux.org/ https://parisc.wiki.kernel.org/" -SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/deller/${PN}.git/snapshot/${P}.tar.gz" +DESCRIPTION="PALO: PArisc Linux Loader" +HOMEPAGE="https://parisc.wiki.kernel.org/ https://git.kernel.org/pub/scm/linux/kernel/git/deller/palo.git/" +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/deller/palo.git" + inherit git-r3 +else + SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/deller/${PN}.git/snapshot/${P}.tar.gz" + KEYWORDS="-* hppa" +fi LICENSE="GPL-2" SLOT="0" -KEYWORDS="-* hppa" PATCHES=( "${FILESDIR}"/${PN}-2.00-toolchain.patch @@ -19,7 +25,7 @@ PATCHES=( src_compile() { local target for target in '-C palo' '-C ipl' 'iplboot'; do - emake AR=$(tc-getAR) CC=$(tc-getCC) LD=$(tc-getLD) ${target} + emake AR="$(tc-getAR)" CC="$(tc-getCC)" LD="$(tc-getLD)" ${target} done } diff --git a/sys-boot/palo/palo-9999.ebuild b/sys-boot/palo/palo-9999.ebuild index 1c733273f096..6eae2c2820e0 100644 --- a/sys-boot/palo/palo-9999.ebuild +++ b/sys-boot/palo/palo-9999.ebuild @@ -1,16 +1,22 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 -inherit git-r3 toolchain-funcs +EAPI=8 -DESCRIPTION="PALO : PArisc Linux Loader" -HOMEPAGE="http://parisc-linux.org/ https://parisc.wiki.kernel.org/" -EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/deller/palo.git" +inherit toolchain-funcs + +DESCRIPTION="PALO: PArisc Linux Loader" +HOMEPAGE="https://parisc.wiki.kernel.org/ https://git.kernel.org/pub/scm/linux/kernel/git/deller/palo.git/" +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/deller/palo.git" + inherit git-r3 +else + SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/deller/${PN}.git/snapshot/${P}.tar.gz" + KEYWORDS="-* ~hppa" +fi LICENSE="GPL-2" SLOT="0" -KEYWORDS="" PATCHES=( "${FILESDIR}"/${PN}-2.00-toolchain.patch @@ -19,7 +25,7 @@ PATCHES=( src_compile() { local target for target in '-C palo' '-C ipl' 'iplboot'; do - emake AR=$(tc-getAR) CC=$(tc-getCC) LD=$(tc-getLD) ${target} + emake AR="$(tc-getAR)" CC="$(tc-getCC)" LD="$(tc-getLD)" ${target} done } diff --git a/sys-boot/plymouth-openrc-plugin/metadata.xml b/sys-boot/plymouth-openrc-plugin/metadata.xml index 4a15a0e8e586..5f0cea7780d7 100644 --- a/sys-boot/plymouth-openrc-plugin/metadata.xml +++ b/sys-boot/plymouth-openrc-plugin/metadata.xml @@ -1,17 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person" proxied="yes"> - <email>Kangie@footclan.ninja</email> + <maintainer type="person"> + <email>kangie@gentoo.org</email> <name>Matt Jolly</name> </maintainer> - <maintainer type="project" proxied="proxy"> - <email>proxy-maint@gentoo.org</email> - <name>Proxy Maintainers</name> - </maintainer> <upstream> <maintainer status="active"> - <email>Kagnie@footclan.ninja</email> + <email>kangie@gentoo.org</email> <name>Matt Jolly</name> </maintainer> <remote-id type="github">Kangie/plymouth-openrc-plugin</remote-id> diff --git a/sys-boot/plymouth/Manifest b/sys-boot/plymouth/Manifest index 15fafdde46ea..6eb0a48b567b 100644 --- a/sys-boot/plymouth/Manifest +++ b/sys-boot/plymouth/Manifest @@ -1,2 +1,2 @@ DIST gentoo-logo.png 14501 BLAKE2B e7236c16b96a2d35a6f062b89bc0a6c6fc696a803b7da734ff9ae255fcd65e549d9bc3d510c283e235a770f42edcbdffc1d5cc4c2fcdec9cc931eb0acf504859 SHA512 059a555931b6d2a910bcd887f5ea0cc17c6edf2d2d45c03a1fec1bdda0138ba6bca6bdf90a65c6520a3f8f1b51ecf6f7956098f45ed6c1276f29c835e729163c -DIST plymouth-0.9.5.tar.xz 1186200 BLAKE2B 8fd073703773fcf7f3e26454c860f094fb4b3d712c56c9df6716ef11815a79f7d5b078ab6c6567b76421026d84a086f95865bf9f3e4ae6363cb1ffc2caa68537 SHA512 686220e8d5b1a8be298156786d979d0e3fb9e010b930d0e8082a2bb152cf07c1bf493d820c243838a1771ee859dc0b4723bd9f10ee434a94a096ce9236c36ce9 +DIST plymouth-22.02.122.tar.xz 1183608 BLAKE2B 8bb1362fcaa7d4c0fb1b69729a8a681d992a5d2abc07644d3be5cc0b19df2cac83df031165a65fa06f95042f619b9f4b7a7e1f3816528f6623473a2b1303e1be SHA512 9f2f5a7121b431f16561d6b5f31177ff06cf1e6bdffaa68c1fe08aa3c765a96dee745824aae8eaac9a0b4a08f0a17a9ae79a82bd0826fcc3fe14d8553635f817 diff --git a/sys-boot/plymouth/files/plymouth-22.02.122-glibc-2.36.patch b/sys-boot/plymouth/files/plymouth-22.02.122-glibc-2.36.patch new file mode 100644 index 000000000000..b1da112732e3 --- /dev/null +++ b/sys-boot/plymouth/files/plymouth-22.02.122-glibc-2.36.patch @@ -0,0 +1,25 @@ +https://gitlab.freedesktop.org/plymouth/plymouth/-/commit/5f1e43c00039a7fe1fff768b91a05a695fb4a53d +https://bugs.gentoo.org/863839 + +From 5f1e43c00039a7fe1fff768b91a05a695fb4a53d Mon Sep 17 00:00:00 2001 +From: Ray Strode <rstrode@redhat.com> +Date: Wed, 3 Aug 2022 15:23:33 -0400 +Subject: [PATCH] ply-utils: Drop linux/fs.h include + +It was needed long ago for a function we no longer even have. + +Now it's causing compile errors on Fedora 37 because it's conflicting +with sys/mount.h. + +This commit drops it. +--- a/src/libply/ply-utils.c ++++ b/src/libply/ply-utils.c +@@ -46,7 +46,6 @@ + #include <sys/user.h> + #include <sys/wait.h> + #include <time.h> +-#include <linux/fs.h> + #include <linux/vt.h> + + #include <dlfcn.h> +GitLab diff --git a/sys-boot/plymouth/metadata.xml b/sys-boot/plymouth/metadata.xml index 3c5e3d8bbaf5..5900b9002bfe 100644 --- a/sys-boot/plymouth/metadata.xml +++ b/sys-boot/plymouth/metadata.xml @@ -6,7 +6,7 @@ <name>Matthew Thode</name> </maintainer> <use> - <flag name="libkms">Provides abstraction to the DRM drivers (intel, + <flag name="drm">Provides abstraction to the DRM drivers (intel, nouveau and vmwgfx at this moment)</flag> <flag name="pango">Adds support for printing text on splash screen and text prompts, e.g. for password</flag> diff --git a/sys-boot/plymouth/plymouth-0.9.5-r1.ebuild b/sys-boot/plymouth/plymouth-22.02.122-r1.ebuild index 62560bb5edb7..1489deec6cd0 100644 --- a/sys-boot/plymouth/plymouth-0.9.5-r1.ebuild +++ b/sys-boot/plymouth/plymouth-22.02.122-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -11,26 +11,26 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://gitlab.freedesktop.org/plymouth/plymouth" else SRC_URI="${SRC_URI} https://www.freedesktop.org/software/plymouth/releases/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 ~ia64 ppc ppc64 ~riscv sparc x86" + KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~loong ppc ppc64 ~riscv sparc x86" fi -inherit autotools readme.gentoo-r1 systemd toolchain-funcs +inherit autotools readme.gentoo-r1 systemd DESCRIPTION="Graphical boot animation (splash) and logger" HOMEPAGE="https://cgit.freedesktop.org/plymouth/" LICENSE="GPL-2" SLOT="0" -IUSE="debug +gtk +libkms +pango +split-usr static-libs +udev" +IUSE="debug +drm +gtk +pango selinux +split-usr static-libs +udev" CDEPEND=" >=media-libs/libpng-1.2.16:= + drm? ( x11-libs/libdrm ) gtk? ( dev-libs/glib:2 >=x11-libs/gtk+-3.14:3 x11-libs/cairo ) - libkms? ( x11-libs/libdrm[libkms] ) pango? ( >=x11-libs/pango-1.21 ) " DEPEND="${CDEPEND} @@ -41,6 +41,7 @@ DEPEND="${CDEPEND} " # Block due bug #383067 RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-plymouthd ) udev? ( virtual/udev ) !<sys-kernel/dracut-0.37-r3 " @@ -52,6 +53,7 @@ DOC_CONTENTS=" PATCHES=( "${FILESDIR}"/0.9.3-glibc-sysmacros.patch + "${FILESDIR}"/${P}-glibc-2.36.patch ) src_prepare() { @@ -71,8 +73,8 @@ src_configure() { $(use_enable !static-libs shared) $(use_enable static-libs static) $(use_enable debug tracing) - $(use_enable gtk gtk) - $(use_enable libkms drm) + $(use_enable drm) + $(use_enable gtk) $(use_enable pango) $(use_with udev) ) @@ -105,8 +107,8 @@ src_install() { pkg_postinst() { readme.gentoo_print_elog - if ! has_version "sys-kernel/dracut" && ! has_version "sys-kernel/genkernel-next[plymouth]"; then + if ! has_version "sys-kernel/dracut"; then ewarn "If you want initramfs builder with plymouth support, please emerge" - ewarn "sys-kernel/dracut or sys-kernel/genkernel-next[plymouth]." + ewarn "sys-kernel/dracut." fi } diff --git a/sys-boot/plymouth/plymouth-9999.ebuild b/sys-boot/plymouth/plymouth-9999.ebuild index 3c47d67a881e..5710db2e9511 100644 --- a/sys-boot/plymouth/plymouth-9999.ebuild +++ b/sys-boot/plymouth/plymouth-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -11,26 +11,26 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://gitlab.freedesktop.org/plymouth/plymouth" else SRC_URI="${SRC_URI} https://www.freedesktop.org/software/plymouth/releases/${P}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" fi -inherit autotools readme.gentoo-r1 systemd toolchain-funcs +inherit autotools readme.gentoo-r1 systemd DESCRIPTION="Graphical boot animation (splash) and logger" HOMEPAGE="https://cgit.freedesktop.org/plymouth/" LICENSE="GPL-2" SLOT="0" -IUSE="debug +gtk +libkms +pango +split-usr static-libs +udev" +IUSE="debug +drm +gtk +pango selinux +split-usr static-libs +udev" CDEPEND=" >=media-libs/libpng-1.2.16:= + drm? ( x11-libs/libdrm ) gtk? ( dev-libs/glib:2 >=x11-libs/gtk+-3.14:3 x11-libs/cairo ) - libkms? ( x11-libs/libdrm[libkms] ) pango? ( >=x11-libs/pango-1.21 ) " DEPEND="${CDEPEND} @@ -41,6 +41,7 @@ DEPEND="${CDEPEND} " # Block due bug #383067 RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-plymouthd ) udev? ( virtual/udev ) !<sys-kernel/dracut-0.37-r3 " @@ -71,8 +72,8 @@ src_configure() { $(use_enable !static-libs shared) $(use_enable static-libs static) $(use_enable debug tracing) - $(use_enable gtk gtk) - $(use_enable libkms drm) + $(use_enable drm) + $(use_enable gtk) $(use_enable pango) $(use_with udev) ) @@ -105,8 +106,8 @@ src_install() { pkg_postinst() { readme.gentoo_print_elog - if ! has_version "sys-kernel/dracut" && ! has_version "sys-kernel/genkernel-next[plymouth]"; then + if ! has_version "sys-kernel/dracut"; then ewarn "If you want initramfs builder with plymouth support, please emerge" - ewarn "sys-kernel/dracut or sys-kernel/genkernel-next[plymouth]." + ewarn "sys-kernel/dracut." fi } diff --git a/sys-boot/raspberrypi-firmware/Manifest b/sys-boot/raspberrypi-firmware/Manifest index b2ca71d4111b..03f30c77745e 100644 --- a/sys-boot/raspberrypi-firmware/Manifest +++ b/sys-boot/raspberrypi-firmware/Manifest @@ -1,4 +1,2 @@ -DIST raspberrypi-firmware-1.20201022.tar.gz 189827375 BLAKE2B 94c38f60d688c8e3ebab830912daccbb6c04bdd3d88f6ca0d07d85be0a6b12c53f0266b4c258ed4694f30bad5db30fb6d30feabfd0b7668735a9a806b820d325 SHA512 876758179df27109984b6c3f4849fdcdc6bdcc2769495fcc83c97fc3ff4d07b9f3cd58086be877503f72c9e5417d2be6d6c33bce4cbb3b862055117c9cc26db8 -DIST raspberrypi-firmware-1.20201201.tar.gz 189332299 BLAKE2B b3ec91f07b4713d26c29be5412d018a220129eef7ddf7c5c09d85e645c2c5754a95f13be7e690ab40648a982e3974cc760aa5b33c76612da836227d38c4ee3a5 SHA512 a7f4591552718956bd7f2d0d377234277e2e6f18cc9714ea30fe13f26d5ae1164b982f39dcf72ae4a18663369ef06d0187d8182713763262371c13107aac4c65 -DIST raspberrypi-firmware-1.20210108.tar.gz 189334002 BLAKE2B 254e8bf644b2b3773ff5ec9ffb47eeb84e0a149e9a74a18a9c6c39db03610fdd3a42f455a9e8935aa4afa4ee21ed098237d4a4e431c401a919c833372e729fa5 SHA512 3c8759e7d6cce597fcbab80e0cd9fd6d528ed2c956452e902f08509169181d703895298a71b8be76d6734f128f85e36d54a149ff9cd735ca44cf8416917ed172 -DIST raspberrypi-firmware-1.20210527.tar.gz 192247084 BLAKE2B 329707dfb2905b36926a3f0ecf1a8e3bc2b52e1a376f98ca7cfe9ec7b69d0fb370d8e23907f5bbd9ea75cf7fed5babd6fe54934919995dec6914e888d95e5fbe SHA512 5a48d1fae768c30528359a14371f59564447d2fb8a145cafa89d7d29352095c5b7ac33bfcbc8da494284c9d41e7dbafe4e863e8efd963a17ea6b6b9699b814a7 +DIST raspberrypi-firmware-1.20221104.tar.gz 184890613 BLAKE2B 51901015d10f7f06504a1cd4eaf50788065f78d806293e5cb40e930c926ad3f76688684b2333c87fd6528418372ac3b5f8f7ad32595a09d4f896717ebea51d29 SHA512 6662f3fdeffbf98819dd57d1c3d8571d7c8bd7d69a8eb5e38823e4ef2857ebfa4e550735f9488e10719a261a0cdcb99cb7f3fb765d674459d42737f4e2cfd357 +DIST raspberrypi-firmware-1.20230106.tar.gz 185087907 BLAKE2B 656cc8325aa96d11f44419e871141beba95172b5c0c96e4b0a4cccca51127040328dc9f6c70cbba0248f8404ce0cf390e4bf937db7e0506c286db5adc4e56eef SHA512 41492a90da91d29e1025deeaad452c6b485f5412ff375b2fc144c2630afcdfef99ecbf701ca5e1afc5bb41bd6f2413b239257f1734dfe17084210e96b28eda7a diff --git a/sys-boot/raspberrypi-firmware/metadata.xml b/sys-boot/raspberrypi-firmware/metadata.xml index ec9b51cbe4e3..7dc1cd3ab167 100644 --- a/sys-boot/raspberrypi-firmware/metadata.xml +++ b/sys-boot/raspberrypi-firmware/metadata.xml @@ -2,10 +2,13 @@ <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> - <email>sam@gentoo.org</email> - <name>Sam James</name> + <email>expeditioneer@gentoo.org</email> + <name>Dennis Lamm</name> </maintainer> <upstream> + <bugs-to>https://github.com/raspberrypi/firmware/issues</bugs-to> <remote-id type="github">raspberrypi/firmware</remote-id> + <remote-id type="cpe">cpe:/o:raspberrypi:raspberry_pi_4_model_b_firmware</remote-id> + <remote-id type="cpe">cpe:/o:raspberrypi:raspberry_pi_3_model_b%2b_firmware</remote-id> </upstream> </pkgmetadata> diff --git a/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20201022.ebuild b/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20201022.ebuild deleted file mode 100644 index 9ed770d2e9df..000000000000 --- a/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20201022.ebuild +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit mount-boot readme.gentoo-r1 - -if [[ "${PV}" == 9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/raspberrypi/firmware" - EGIT_CLONE_TYPE="shallow" -else - SRC_URI="https://github.com/raspberrypi/firmware/archive/${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="-* arm arm64" - S="${WORKDIR}/firmware-${PV}" -fi - -DESCRIPTION="Raspberry Pi (all versions) bootloader and GPU firmware" -HOMEPAGE="https://github.com/raspberrypi/firmware" - -LICENSE="GPL-2 raspberrypi-videocore-bin" -SLOT="0" -RESTRICT="binchecks strip" - -DOC_CONTENTS="Please configure your ram setup by editing /boot/config.txt" - -src_prepare() { - default - - cp "${FILESDIR}"/${PN}-1.20201022-config.txt "${WORKDIR}" || die - - if use arm64; then - # Force selection of the 64-bit kernel8.img to match our userland - echo "arm_64bit=1" >> "${WORKDIR}"/${PN}-1.20201022-config.txt || die - fi -} - -src_install() { - insinto /boot - cd boot || die - doins bootcode.bin fixup*.dat start*elf - newins "${WORKDIR}"/${PN}-1.20201022-config.txt config.txt - newins "${FILESDIR}"/${PN}-1.20201022-cmdline.txt cmdline.txt - newenvd "${FILESDIR}"/${PN}-0_p20130711-envd 90${PN} - readme.gentoo_create_doc -} - -pkg_preinst() { - if [[ -z "${REPLACING_VERSIONS}" ]] ; then - local msg="" - - if [[ -e "${ED}"/boot/cmdline.txt ]] && [[ -e /boot/cmdline.txt ]] ; then - msg+="/boot/cmdline.txt " - fi - - if [[ -e "${ED}"/boot/config.txt ]] && [[ -e /boot/config.txt ]] ; then - msg+="/boot/config.txt " - fi - - if [[ -n "${msg}" ]] ; then - msg="This package installs following files: ${msg}." - msg="${msg} Please remove (backup) your copies durning install" - msg="${msg} and merge settings afterwards." - msg="${msg} Further updates will be CONFIG_PROTECTed." - die "${msg}" - fi - fi -} - -pkg_postinst() { - readme.gentoo_print_elog -} diff --git a/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20210527.ebuild b/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20210527.ebuild deleted file mode 100644 index 263276be82c7..000000000000 --- a/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20210527.ebuild +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit mount-boot readme.gentoo-r1 - -if [[ "${PV}" == 9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/raspberrypi/firmware" - EGIT_CLONE_TYPE="shallow" -else - SRC_URI="https://github.com/raspberrypi/firmware/archive/${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="-* ~arm ~arm64" - S="${WORKDIR}/firmware-${PV}" -fi - -DESCRIPTION="Raspberry Pi (all versions) bootloader and GPU firmware" -HOMEPAGE="https://github.com/raspberrypi/firmware" - -LICENSE="GPL-2 raspberrypi-videocore-bin" -SLOT="0" -RESTRICT="binchecks strip" - -DOC_CONTENTS="Please configure your ram setup by editing /boot/config.txt" - -src_prepare() { - default - - cp "${FILESDIR}"/${PN}-1.20201022-config.txt "${WORKDIR}" || die - - if use arm64; then - # Force selection of the 64-bit kernel8.img to match our userland - echo "arm_64bit=1" >> "${WORKDIR}"/${PN}-1.20201022-config.txt || die - fi -} - -src_install() { - insinto /boot - cd boot || die - doins bootcode.bin fixup*.dat start*elf - newins "${WORKDIR}"/${PN}-1.20201022-config.txt config.txt - newins "${FILESDIR}"/${PN}-1.20201022-cmdline.txt cmdline.txt - newenvd "${FILESDIR}"/${PN}-0_p20130711-envd 90${PN} - readme.gentoo_create_doc -} - -pkg_preinst() { - if [[ -z "${REPLACING_VERSIONS}" ]] ; then - local msg="" - - if [[ -e "${ED}"/boot/cmdline.txt ]] && [[ -e /boot/cmdline.txt ]] ; then - msg+="/boot/cmdline.txt " - fi - - if [[ -e "${ED}"/boot/config.txt ]] && [[ -e /boot/config.txt ]] ; then - msg+="/boot/config.txt " - fi - - if [[ -n "${msg}" ]] ; then - msg="This package installs following files: ${msg}." - msg="${msg} Please remove (backup) your copies during install" - msg="${msg} and merge settings afterwards." - msg="${msg} Further updates will be CONFIG_PROTECTed." - die "${msg}" - fi - fi -} - -pkg_postinst() { - readme.gentoo_print_elog -} diff --git a/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20201201.ebuild b/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20221104.ebuild index 43c2288dc321..dbe8072f5d1d 100644 --- a/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20201201.ebuild +++ b/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20221104.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit mount-boot readme.gentoo-r1 diff --git a/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20210108.ebuild b/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20230106.ebuild index 43c2288dc321..dbe8072f5d1d 100644 --- a/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20210108.ebuild +++ b/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20230106.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit mount-boot readme.gentoo-r1 diff --git a/sys-boot/raspberrypi-firmware/raspberrypi-firmware-9999.ebuild b/sys-boot/raspberrypi-firmware/raspberrypi-firmware-9999.ebuild index 7fe926ad7820..595de0624e7e 100644 --- a/sys-boot/raspberrypi-firmware/raspberrypi-firmware-9999.ebuild +++ b/sys-boot/raspberrypi-firmware/raspberrypi-firmware-9999.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit mount-boot readme.gentoo-r1 @@ -59,7 +59,7 @@ pkg_preinst() { if [[ -n "${msg}" ]] ; then msg="This package installs following files: ${msg}." - msg="${msg} Please remove (backup) your copies durning install" + msg="${msg} Please remove (backup) your copies during install" msg="${msg} and merge settings afterwards." msg="${msg} Further updates will be CONFIG_PROTECTed." die "${msg}" diff --git a/sys-boot/refind/Manifest b/sys-boot/refind/Manifest index 99f58f7bb053..d538cc085ff8 100644 --- a/sys-boot/refind/Manifest +++ b/sys-boot/refind/Manifest @@ -1,3 +1,3 @@ -DIST refind-src-0.11.4.tar.gz 3812192 BLAKE2B 7219eeffffb63961a7ba8f7617546a12021cfe80df80a83c4dbd47cd40b0d8afbdc510abb44de3029ff15ed49372bd59e0b156f4c27eab3ef7bd6ccc3c7e02db SHA512 529962ae432edaf1895ba98deb00a23c66bd742578e1a367f70f7ed22dd7be7daf1960df8af410fba79ca775169120499a4c10119331b2b12b55a002d4354de1 -DIST refind-src-0.12.0.tar.gz 3898337 BLAKE2B 1197049fb7d91db64135dafda7488bdb1da4997ce6a6d49dfe635526240e3193d8c7c22597aee0f2d6754ce6061b4127d8aa21d43c9f061501de98e25de609d3 SHA512 3ade9642d7acf31097daa5308acb96a9fa3371314073b5a09601a886fc30444752efa08ed9fb35e421efb0b4eb9efbccd7b5c9bd6b3b9ed4af74c58f22a74729 DIST refind-src-0.13.2.tar.gz 4554759 BLAKE2B 2c3b1daf5fa100dcd4e1c801aa625e269ae9c1a99b567a271d7cdd30f95fa1e041e22984623b9a0e61f8af45966919f4b9f3a5b6c2026271d1bc37c6925f1e70 SHA512 e671d44385297295c143824dd95593f2e7bc8e282745d127b041a645aa27003467a3a23f368fd30297f33faa06bd914540d7bdc3c71ec42f6b7a38d7ee8e0ddb +DIST refind-src-0.13.3.1.tar.gz 4550242 BLAKE2B ab8dd27f82954ea6f9831f827550f27b5ca426b7783e918311ba7e178fc3509698a0107f61d0394a7893318528cb3e0c8491f4522de0a4aca6a40e0749f5a6f9 SHA512 7966df5dd8dc66cc49a329ed722a567672da8e2fa3f2334d53db65357cea17cba5a4dc5459e358de1079a938da3c63dc626d096ce28b6bf1fa2964be7359dbd1 +DIST refind-src-0.14.0.2.tar.gz 4648958 BLAKE2B 02019ddb872ce44d2a2119902edebd633f925d49634e3bcc6bfb2c9dedb8ce213166909395a333d3a37e95c67720e31b1f5fcf25083801c17d645372aa54a06a SHA512 41c120c1afec37c508aa5c0ec09a6563c3047ef84932308c91701795b950431dfad17d25cf664039b490a302d475add98441b75f90ff71cadce41febedc68a9e diff --git a/sys-boot/refind/files/makefile.patch b/sys-boot/refind/files/makefile.patch deleted file mode 100644 index 5db6f75b1919..000000000000 --- a/sys-boot/refind/files/makefile.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/Makefile b/Makefile ---- a/Makefile -+++ b/Makefile -@@ -161,8 +161,9 @@ fs_edk2: build_edk2 - done - - build_edk2: $(EDK2BASE)/RefindPkg -- cd $(EDK2BASE) && \ -- . ./edksetup.sh BaseTools && \ -+ +cd $(EDK2BASE) && \ -+ . udk-workspace && \ -+ build -a $(UC_ARCH) -p MdePkg/MdePkg.dsc && \ - build -a $(UC_ARCH) -p RefindPkg/RefindPkg.dsc - mkdir -p ./drivers_$(FILENAME_CODE) - -diff --git a/filesystems/Makefile b/filesystems/Makefile -index 99452ed..9bc984d 100644 ---- a/filesystems/Makefile -+++ b/filesystems/Makefile -@@ -5,6 +5,7 @@ - # name of the driver to be built. This is done because of a dependency - # in the fsw_efi.c file on the filesystem type; this file must be - # recompiled for each new filesystem built. -+.NOTPARALLEL: - - # This program is licensed under the terms of the GNU GPL, version 3, - # or (at your option) any later version. diff --git a/sys-boot/refind/files/refind-0.12.0-gcc10.patch b/sys-boot/refind/files/refind-0.12.0-gcc10.patch deleted file mode 100644 index 1f2e2bc0a5de..000000000000 --- a/sys-boot/refind/files/refind-0.12.0-gcc10.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Make.common -+++ b/Make.common -@@ -60,7 +60,7 @@ - # - - # ...for both GNU-EFI and TianoCore.... --OPTIMFLAGS = -Os -fno-strict-aliasing -+OPTIMFLAGS = -Os -fno-strict-aliasing -fno-tree-loop-distribute-patterns - CFLAGS = $(OPTIMFLAGS) -fno-stack-protector -fshort-wchar -Wall - - # ...for GNU-EFI.... diff --git a/sys-boot/refind/files/refind-0.13.2-gnuefi-3.0.14.patch b/sys-boot/refind/files/refind-0.13.2-gnuefi-3.0.14.patch new file mode 100644 index 000000000000..751a8e838dfa --- /dev/null +++ b/sys-boot/refind/files/refind-0.13.2-gnuefi-3.0.14.patch @@ -0,0 +1,51 @@ +https://bugs.gentoo.org/810907 +https://sources.debian.org/patches/refind/0.13.2-1/gnu-efi.patch/ + +Origin: https://sourceforge.net/p/refind/code/ci/10f838a4cd132a5595acaf3c54c15782151a61df +Applied-Upstream: 0.13.3 +From 10f838a4cd132a5595acaf3c54c15782151a61df Mon Sep 17 00:00:00 2001 +From: Rod Smith <rodsmith@rodsbooks.com> +Date: Sat, 23 Oct 2021 10:17:23 -0400 +Subject: [PATCH] Fix compile problems with recent GNU-EFI versions + +--- + EfiLib/DevicePathUtilities.h | 13 ------------- + EfiLib/gnuefi-helper.c | 1 - + NEWS.txt | 3 +++ + include/version.h | 2 +- + 4 files changed, 4 insertions(+), 15 deletions(-) + +diff --git a/EfiLib/DevicePathUtilities.h b/EfiLib/DevicePathUtilities.h +index b559671..14ed797 100644 +--- a/EfiLib/DevicePathUtilities.h ++++ b/EfiLib/DevicePathUtilities.h +@@ -217,17 +217,4 @@ EFIAPI + --*/
+ ;
+
+-typedef struct {
+- EFI_DEVICE_PATH_UTILS_GET_DEVICE_PATH_SIZE GetDevicePathSize;
+- EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH DuplicateDevicePath;
+- EFI_DEVICE_PATH_UTILS_APPEND_PATH AppendDevicePath;
+- EFI_DEVICE_PATH_UTILS_APPEND_NODE AppendDeviceNode;
+- EFI_DEVICE_PATH_UTILS_APPEND_INSTANCE AppendDevicePathInstance;
+- EFI_DEVICE_PATH_UTILS_GET_NEXT_INSTANCE GetNextDevicePathInstance;
+- EFI_DEVICE_PATH_UTILS_IS_MULTI_INSTANCE IsDevicePathMultiInstance;
+- EFI_DEVICE_PATH_UTILS_CREATE_NODE CreateDeviceNode;
+-} EFI_DEVICE_PATH_UTILITIES_PROTOCOL;
+-
+-extern EFI_GUID gEfiDevicePathUtilitiesProtocolGuid;
+-
+ #endif
+diff --git a/EfiLib/gnuefi-helper.c b/EfiLib/gnuefi-helper.c +index 246c261..8730403 100644 +--- a/EfiLib/gnuefi-helper.c ++++ b/EfiLib/gnuefi-helper.c +@@ -20,7 +20,6 @@ + #include "refit_call_wrapper.h" + #include "LegacyBios.h" + +-EFI_GUID gEfiDevicePathUtilitiesProtocolGuid = { 0x09576E91, 0x6D3F, 0x11D2, { 0x8E, 0x39, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }}; + EFI_GUID gEfiLegacyBiosProtocolGuid = { 0xdb9a1e3d, 0x45cb, 0x4abb, { 0x85, 0x3b, 0xe5, 0x38, 0x7f, 0xdb, 0x2e, 0x2d }}; + + /** diff --git a/sys-boot/refind/files/refind-0.14.0.2-clang.patch b/sys-boot/refind/files/refind-0.14.0.2-clang.patch new file mode 100644 index 000000000000..fe2323390355 --- /dev/null +++ b/sys-boot/refind/files/refind-0.14.0.2-clang.patch @@ -0,0 +1,62 @@ +Fix compilation with clang. + +Clang does not support nested functions (a gcc extension), so move it outside. + +Compiling with _FORTIFY_SOURCE and -ffreestanding results in +nanojpeg.c:(.text+0xa28): undefined reference to `__memset_chk' + +See also: https://bugs.gentoo.org/881131 + +--- a/filesystems/crc32c.c ++++ b/filesystems/crc32c.c +@@ -22,25 +22,24 @@ + + static uint32_t crc32c_table [256]; + +-static void +-init_crc32c_table (void) ++uint32_t reflect (uint32_t ref, int len) + { +- auto uint32_t reflect (uint32_t ref, int len); +- uint32_t reflect (uint32_t ref, int len) +- { +- uint32_t result = 0; +- int i; ++ uint32_t result = 0; ++ int i; + +- for (i = 1; i <= len; i++) +- { +- if (ref & 1) +- result |= 1 << (len - i); +- ref >>= 1; +- } +- +- return result; ++ for (i = 1; i <= len; i++) ++ { ++ if (ref & 1) ++ result |= 1 << (len - i); ++ ref >>= 1; + } + ++ return result; ++} ++ ++static void ++init_crc32c_table (void) ++{ + static int crc32c_table_inited; + if(crc32c_table_inited) + return; +--- a/libeg/nanojpeg.c ++++ b/libeg/nanojpeg.c +@@ -112,6 +112,8 @@ + #ifndef _NANOJPEG_H + #define _NANOJPEG_H + ++#undef _FORTIFY_SOURCE ++ + // Modified: Map libc-style free() and malloc() to their EFI equivalents.... + #define free MyFreePool + #define malloc AllocatePool diff --git a/sys-boot/refind/files/refind-sbat-gentoo-0.14.0.2.csv b/sys-boot/refind/files/refind-sbat-gentoo-0.14.0.2.csv new file mode 100644 index 000000000000..1062bd271dd1 --- /dev/null +++ b/sys-boot/refind/files/refind-sbat-gentoo-0.14.0.2.csv @@ -0,0 +1,3 @@ +sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md +refind,1,Roderick W. Smith,refind,0.14.0,https://www.rodsbooks.com/refind +refind.gentoo,1,Gentoo Linux,refind,0.14.0,https://packages.gentoo.org/packages/sys-boot/refind diff --git a/sys-boot/refind/metadata.xml b/sys-boot/refind/metadata.xml index 39c685e1f5b5..7d82e5d26db3 100644 --- a/sys-boot/refind/metadata.xml +++ b/sys-boot/refind/metadata.xml @@ -1,6 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> + <maintainer type="person"> + <email>ceamac@gentoo.org</email> + <name>Viorel Munteanu</name> + </maintainer> <maintainer type="person" proxied="yes"> <email>sveyret@gmail.com</email> <name>Stéphane Veyret</name> @@ -40,24 +44,22 @@ d'amorçage au moment de l'exécution le rend très facile à utiliser, en particulier associé à des noyau Linux qui fournissent un support EFI stub. </longdescription> <use lang="en"> + <flag name="btrfs">Builds the EFI binary btrfs filesystem driver</flag> <flag name="ext2">Builds the EFI binary ext2 filesystem driver</flag> <flag name="ext4">Builds the EFI binary ext4 filesystem driver</flag> - <flag name="reiserfs">Builds the EFI binary reiserfs filesystem driver</flag> - <flag name="iso9660">Builds the EFI binary iso9660 filesystem driver</flag> <flag name="hfs">Builds the EFI binary hfs filesystem driver</flag> - <flag name="btrfs">Builds the EFI binary btrfs filesystem driver</flag> + <flag name="iso9660">Builds the EFI binary iso9660 filesystem driver</flag> <flag name="ntfs">Builds the EFI binary ntfs filesystem driver</flag> - <flag name="gnuefi">Compile using GNU-EFI instead of Tianocore</flag> + <flag name="reiserfs">Builds the EFI binary reiserfs filesystem driver</flag> </use> <use lang="fr"> + <flag name="btrfs">Construire le gestionnaire EFI pour le système de fichier btrfs</flag> <flag name="ext2">Construire le gestionnaire EFI pour le système de fichier ext2</flag> <flag name="ext4">Construire le gestionnaire EFI pour le système de fichier ext4</flag> - <flag name="reiserfs">Construire le gestionnaire EFI pour le système de fichier reiserfs</flag> - <flag name="iso9660">Construire le gestionnaire EFI pour le système de fichier iso9660</flag> <flag name="hfs">Construire le gestionnaire EFI pour le système de fichier hfs</flag> - <flag name="btrfs">Construire le gestionnaire EFI pour le système de fichier btrfs</flag> + <flag name="iso9660">Construire le gestionnaire EFI pour le système de fichier iso9660</flag> <flag name="ntfs">Construire le gestionnaire EFI pour le système de fichier ntfs</flag> - <flag name="gnuefi">Compiler en utilisant GNU-EFI au lieu de Tianocore</flag> + <flag name="reiserfs">Construire le gestionnaire EFI pour le système de fichier reiserfs</flag> </use> <upstream> <remote-id type="sourceforge">refind</remote-id> diff --git a/sys-boot/refind/refind-0.11.4.ebuild b/sys-boot/refind/refind-0.11.4.ebuild deleted file mode 100644 index 37ad051eba4d..000000000000 --- a/sys-boot/refind/refind-0.11.4.ebuild +++ /dev/null @@ -1,168 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit multiprocessing toolchain-funcs - -DESCRIPTION="The UEFI Boot Manager by Rod Smith" -HOMEPAGE="https://www.rodsbooks.com/refind/" -SRC_URI="mirror://sourceforge/project/${PN}/${PV}/${PN}-src-${PV}.tar.gz" - -LICENSE="BSD GPL-2 GPL-3 FDL-1.3" -SLOT="0" -KEYWORDS="amd64 x86" -FS_USE="btrfs +ext2 +ext4 hfs +iso9660 ntfs reiserfs" -IUSE="${FS_USE} custom-cflags doc gnuefi" - -DEPEND="gnuefi? ( >=sys-boot/gnu-efi-3.0.2 ) - !gnuefi? ( >=sys-boot/udk-2018-r1 )" - -DOCS=(README.txt) -PATCHES=("${FILESDIR}/makefile.patch") -UDK_WORKSPACE="${T}/udk" - -pkg_pretend() { - if use custom-cflags; then - ewarn - ewarn "You have enabled building with USE=custom-cflags. Be aware that" - ewarn "using this can result in EFI binaries that fail to run and may" - ewarn "fail to build at all. This is strongly advised against by upstream." - ewarn - ewarn "See https://bugs.gentoo.org/598587#c3 for more information" - ewarn - fi -} - -pkg_setup() { - if use x86; then - export EFIARCH=ia32 - export BUILDARCH=ia32 - elif use amd64; then - export EFIARCH=x64 - export BUILDARCH=x86_64 - fi -} - -src_prepare() { - default - - # bug 598647 - PIE not supported - sed -e '/^CFLAGS/s:$: -fno-PIE:' -i Make.common || die - - # Prepare UDK workspace - if ! use gnuefi; then - mkdir "${UDK_WORKSPACE}" || die - ln -s "${EPREFIX}/usr/lib/udk/"{Mde,IntelFramework}{,Module}Pkg \ - "${UDK_WORKSPACE}" || die "Could not link UDK files" - fi -} - -src_configure() { - if ! use gnuefi; then - # Use the side effect of the script which will create configuration files - (. udk-workspace "${UDK_WORKSPACE}" || die) - sed -e "s:^#\?\s*\(MAX_CONCURRENT_THREAD_NUMBER\s*=\).*$:\1 $(makeopts_jobs):" \ - -i "${UDK_WORKSPACE}/Conf/target.txt" || die "Failed to configure target file" - sed -e "s:\(_\(CC\|ASM\|PP\|VFRPP\|ASLCC\|ASLPP\|DLINK\)_PATH\s*=\).*$:\1 $(tc-getCC):" \ - -e "s:\(_ASLDLINK_PATH\s*=\).*$:\1 $(tc-getLD):" \ - -e "s:\(_OBJCOPY_PATH\s*=\).*$:\1 $(tc-getOBJCOPY):" \ - -e "s:\(_RC_PATH\s*=\).*$:\1 $(tc-getOBJCOPY):" \ - -e "s:\(_SLINK_PATH\s*=\).*$:\1 $(tc-getAR):" \ - -e "s:-Werror::" \ - -i "${UDK_WORKSPACE}/Conf/tools_def.txt" \ - || die "Failed to prepare tools definition file" - fi -} - -src_compile() { - # Update fs targets depending on uses - local fs fs_names=() - for fs in ${FS_USE}; do - fs=${fs#+} - if use "${fs}"; then - fs_names+=(${fs}) - fi - done - use gnuefi && fs_names=("${fs_names[@]/%/_gnuefi}") - - # Prepare flags - local make_flags=( - ARCH="${BUILDARCH}" - CC="$(tc-getCC)" - AS="$(tc-getAS)" - LD="$(tc-getLD)" - AR="$(tc-getAR)" - RANLIB="$(tc-getRANLIB)" - OBJCOPY="$(tc-getOBJCOPY)" - GNUEFILIB="/usr/$(get_libdir)" - EFILIB="/usr/$(get_libdir)" - EFICRT0="/usr/$(get_libdir)" - EDK2BASE="${UDK_WORKSPACE}" - EDK2_DRIVER_BASENAMES="${fs_names[*]}" - FILESYSTEMS="${fs_names[*]}" - FILESYSTEMS_GNUEFI="${fs_names[*]}" - ) - if use custom-cflags; then - make_flags=(CFLAGS="${CFLAGS}" "${make_flags[@]}") - fi - - emake "${make_flags[@]}" all_$(usex gnuefi gnuefi edk2) -} - -src_install() { - exeinto "/usr/lib/${PN}" - doexe refind-install - dosym "../lib/${PN}/refind-install" "/usr/sbin/refind-install" - - if use doc; then - doman "docs/man/"* - DOCS+=(NEWS.txt docs/refind docs/Styles) - fi - einstalldocs - - insinto "/usr/lib/${PN}/refind" - doins "refind/refind_${EFIARCH}.efi" - doins "refind.conf-sample" - doins -r images icons fonts banners - - if [[ -d "drivers_${EFIARCH}" ]]; then - doins -r "drivers_${EFIARCH}" - fi - - insinto "/usr/lib/${PN}/refind/tools_${EFIARCH}" - doins "gptsync/gptsync_${EFIARCH}.efi" - - insinto "/etc/refind.d" - doins -r "keys" - - dosbin "mkrlconf" - dosbin "mvrefind" - dosbin "refind-mkdefault" -} - -pkg_postinst() { - elog "rEFInd has been built and installed into ${EROOT}/usr/lib/${PN}" - elog "You will need to use the command 'refind-install' to install" - elog "the binaries into your EFI System Partition" - elog "" - if [[ -z "${REPLACING_VERSIONS}" ]]; then - elog "refind-install requires additional packages to be fully functional:" - elog " app-crypt/sbsigntools for binary signing for use with SecureBoot" - elog " sys-boot/efibootmgr for writing to NVRAM" - elog " sys-block/parted for automatic ESP location and mount" - elog "" - elog "refind-mkdefault requires >=dev-lang/python-3" - elog "" - elog "A sample configuration can be found at" - elog "${EROOT}/usr/lib/${PN}/refind/refind.conf-sample" - else - if ver_test "${REPLACING_VERSIONS}" -lt "0.10.3"; then - elog "The new refind-mkdefault script requires >=dev-lang/python-3" - elog "to be installed" - elog "" - fi - ewarn "Note that this installation will not update any EFI binaries" - ewarn "on your EFI System Partition - this needs to be done manually" - fi -} diff --git a/sys-boot/refind/refind-0.13.2.ebuild b/sys-boot/refind/refind-0.13.2.ebuild index 6ac73e61dca8..68c1950f9e8c 100644 --- a/sys-boot/refind/refind-0.13.2.ebuild +++ b/sys-boot/refind/refind-0.13.2.ebuild @@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge/project/${PN}/${PV}/${PN}-src-${PV}.tar.gz" LICENSE="BSD GPL-2 GPL-3 FDL-1.3" SLOT="0" -KEYWORDS="~amd64 ~x86" +KEYWORDS="amd64 x86" FS_USE="btrfs +ext2 +ext4 hfs +iso9660 ntfs reiserfs" IUSE="${FS_USE} custom-cflags doc" @@ -19,6 +19,10 @@ DEPEND="sys-boot/gnu-efi" DOCS=( README.txt ) +PATCHES=( + "${FILESDIR}"/${P}-gnuefi-3.0.14.patch +) + pkg_pretend() { if use custom-cflags; then ewarn diff --git a/sys-boot/refind/refind-0.12.0-r1.ebuild b/sys-boot/refind/refind-0.13.3.1.ebuild index 39004c2d0093..327f17b7022b 100644 --- a/sys-boot/refind/refind-0.12.0-r1.ebuild +++ b/sys-boot/refind/refind-0.13.3.1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit multiprocessing toolchain-funcs +inherit toolchain-funcs secureboot DESCRIPTION="The UEFI Boot Manager by Rod Smith" HOMEPAGE="https://www.rodsbooks.com/refind/" @@ -11,17 +11,12 @@ SRC_URI="mirror://sourceforge/project/${PN}/${PV}/${PN}-src-${PV}.tar.gz" LICENSE="BSD GPL-2 GPL-3 FDL-1.3" SLOT="0" -KEYWORDS="amd64 x86" +KEYWORDS="~amd64 ~x86" FS_USE="btrfs +ext2 +ext4 hfs +iso9660 ntfs reiserfs" IUSE="${FS_USE} custom-cflags doc" DEPEND="sys-boot/gnu-efi" -PATCHES=( - "${FILESDIR}/makefile.patch" - "${FILESDIR}/${P}-gcc10.patch" # Bug 723244 -) - DOCS=( README.txt ) pkg_pretend() { @@ -44,13 +39,15 @@ pkg_setup() { export EFIARCH=x64 export BUILDARCH=x86_64 fi + secureboot_pkg_setup } src_prepare() { default # bug 598647 - PIE not supported - sed -e '/^CFLAGS/s:$: -fno-PIE:' -i Make.common || die + sed -e '/^CFLAGS/s/$/ -fno-PIE/' -i Make.common || die + sed -e '1 i\.NOTPARALLEL:' -i filesystems/Makefile || die } src_compile() { @@ -76,8 +73,6 @@ src_compile() { GNUEFILIB="/usr/$(get_libdir)" EFILIB="/usr/$(get_libdir)" EFICRT0="/usr/$(get_libdir)" - EDK2BASE="${UDK_WORKSPACE}" - EDK2_DRIVER_BASENAMES="${fs_names[*]}" FILESYSTEMS="${fs_names[*]}" FILESYSTEMS_GNUEFI="${fs_names[*]}" ) @@ -89,9 +84,9 @@ src_compile() { } src_install() { - exeinto "/usr/lib/${PN}" + exeinto "/usr/$(get_libdir)/${PN}" doexe refind-install - dosym "../lib/${PN}/refind-install" "/usr/sbin/refind-install" + dosym "../$(get_libdir)/${PN}/refind-install" "/usr/sbin/refind-install" if use doc; then doman "docs/man/"* @@ -99,7 +94,7 @@ src_install() { fi einstalldocs - insinto "/usr/lib/${PN}/refind" + insinto "/usr/$(get_libdir)/${PN}/refind" doins "refind/refind_${EFIARCH}.efi" doins "refind.conf-sample" doins -r images icons fonts banners @@ -108,7 +103,7 @@ src_install() { doins -r "drivers_${EFIARCH}" fi - insinto "/usr/lib/${PN}/refind/tools_${EFIARCH}" + insinto "/usr/$(get_libdir)/${PN}/refind/tools_${EFIARCH}" doins "gptsync/gptsync_${EFIARCH}.efi" insinto "/etc/refind.d" @@ -117,10 +112,12 @@ src_install() { dosbin "mkrlconf" dosbin "mvrefind" dosbin "refind-mkdefault" + + secureboot_auto_sign --in-place } pkg_postinst() { - elog "rEFInd has been built and installed into ${EROOT}/usr/lib/${PN}" + elog "rEFInd has been built and installed into ${EROOT}/usr/$(get_libdir)/${PN}" elog "You will need to use the command 'refind-install' to install" elog "the binaries into your EFI System Partition" elog "" @@ -133,7 +130,7 @@ pkg_postinst() { elog "" if [[ -z "${REPLACING_VERSIONS}" ]]; then elog "A sample configuration can be found at" - elog "${EROOT}/usr/lib/${PN}/refind/refind.conf-sample" + elog "${EROOT}/usr/$(get_libdir)/${PN}/refind/refind.conf-sample" else if ver_test "${REPLACING_VERSIONS}" -lt "0.12.0"; then ewarn "This new version uses sys-apps/gptfdisk instead of sys-block/parted" diff --git a/sys-boot/refind/refind-0.14.0.2-r1.ebuild b/sys-boot/refind/refind-0.14.0.2-r1.ebuild new file mode 100644 index 000000000000..5a9f350b47e9 --- /dev/null +++ b/sys-boot/refind/refind-0.14.0.2-r1.ebuild @@ -0,0 +1,160 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit optfeature secureboot toolchain-funcs + +DESCRIPTION="The UEFI Boot Manager by Rod Smith" +HOMEPAGE="https://www.rodsbooks.com/refind/" +SRC_URI="mirror://sourceforge/project/${PN}/${PV}/${PN}-src-${PV}.tar.gz" + +LICENSE="BSD GPL-2 GPL-3 FDL-1.3" +SLOT="0" +KEYWORDS="amd64 x86" +FS_USE="btrfs +ext2 +ext4 hfs +iso9660 ntfs reiserfs" +IUSE="${FS_USE} doc" + +DEPEND="sys-boot/gnu-efi" + +# for ld.bfd and objcopy +BDEPEND="sys-devel/binutils" + +DOCS=( README.txt NEWS.txt ) + +PATCHES=( "${FILESDIR}"/${P}-clang.patch ) + +checktools() { + if [[ ${MERGE_TYPE} != "binary" ]]; then + # bug #832018 + tc-export LD + tc-ld-force-bfd + # the makefile calls LD directly, so try to fix LD too + LD="${LD/.lld/.bfd}" + tc-ld-is-lld "${LD}" && die "Linking with lld produces broken executables and may lead to unbootable system" + + # bug #732256 + # llvm-objcopy does not support EFI target, try to use binutils objcopy or fail + tc-export OBJCOPY + OBJCOPY="${OBJCOPY/llvm-/}" + LANG=C LC_ALL=C "${OBJCOPY}" --help | grep -q '\<pei-' || die "${OBJCOPY} (objcopy) does not support EFI target" + fi +} + +pkg_pretend() { + checktools +} + +pkg_setup() { + if use x86; then + export EFIARCH=ia32 + export BUILDARCH=ia32 + elif use amd64; then + export EFIARCH=x64 + export BUILDARCH=x86_64 + fi + secureboot_pkg_setup + + # this does not only check, but also exports LD and OBJCOPY + checktools +} + +src_prepare() { + default + + # bug #598647 - PIE not supported + sed -e '/^CFLAGS/s/$/ -fno-PIE/' -i Make.common || die + sed -e '1 i\.NOTPARALLEL:' -i filesystems/Makefile || die + + # bug #881131, bug #832018 + sed -e 's/-fno-tree-loop-distribute-patterns/-ffreestanding/' -i Make.common || die + + cp "${FILESDIR}"/refind-sbat-gentoo-${PV}.csv refind-sbat-gentoo.csv || die +} + +src_compile() { + # Update fs targets depending on uses + local fs fs_names=() + for fs in ${FS_USE}; do + fs=${fs#+} + if use "${fs}"; then + fs_names+=( ${fs} ) + fi + done + fs_names=( "${fs_names[@]/%/_gnuefi}" ) + + # Prepare flags + local make_flags=( + ARCH="${BUILDARCH}" + CC="$(tc-getCC)" + AS="$(tc-getAS)" + LD="${LD}" + AR="$(tc-getAR)" + RANLIB="$(tc-getRANLIB)" + OBJCOPY="${OBJCOPY}" + GNUEFILIB="${ESYSROOT}/usr/$(get_libdir)" + EFILIB="${ESYSROOT}/usr/$(get_libdir)" + EFICRT0="${ESYSROOT}/usr/$(get_libdir)" + FILESYSTEMS="${fs_names[*]}" + FILESYSTEMS_GNUEFI="${fs_names[*]}" + REFIND_SBAT_CSV=refind-sbat-gentoo.csv + ) + + emake "${make_flags[@]}" all_gnuefi +} + +src_install() { + exeinto "/usr/$(get_libdir)/${PN}" + doexe refind-install + dosym -r "/usr/$(get_libdir)/${PN}/refind-install" "/usr/sbin/refind-install" + + doman "docs/man/"* + use doc && DOCS+=( docs/refind docs/Styles ) + einstalldocs + + insinto "/usr/$(get_libdir)/${PN}/refind" + doins "refind/refind_${EFIARCH}.efi" + doins "refind.conf-sample" + doins -r images icons fonts banners + + if [[ -d "drivers_${EFIARCH}" ]]; then + doins -r "drivers_${EFIARCH}" + fi + + insinto "/usr/$(get_libdir)/${PN}/refind/tools_${EFIARCH}" + doins "gptsync/gptsync_${EFIARCH}.efi" + + insinto "/etc/refind.d" + doins -r "keys" + + dosbin "mkrlconf" + dosbin "mvrefind" + dosbin "refind-mkdefault" + + secureboot_auto_sign --in-place +} + +pkg_postinst() { + elog "rEFInd has been built and installed into ${EROOT}/usr/$(get_libdir)/${PN}" + elog "You will need to use the command 'refind-install' to install" + elog "the binaries into your EFI System Partition" + + optfeature_header "refind-install requires additional packages to be fully functional:" + optfeature "binary signing for use with SecureBoot" app-crypt/sbsigntools + optfeature "writing to NVRAM" sys-boot/efibootmgr + optfeature "ESP management" sys-apps/gptfdisk + elog "" + + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "A sample configuration can be found at" + elog "${EROOT}/usr/$(get_libdir)/${PN}/refind/refind.conf-sample" + else + if ver_test "${REPLACING_VERSIONS}" -lt "0.12.0"; then + ewarn "This new version uses sys-apps/gptfdisk instead of sys-block/parted" + ewarn "to manage ESP" + ewarn "" + fi + ewarn "Note that this installation will not update any EFI binaries" + ewarn "on your EFI System Partition - this needs to be done manually" + fi +} diff --git a/sys-boot/refind/refind-0.14.0.2.ebuild b/sys-boot/refind/refind-0.14.0.2.ebuild new file mode 100644 index 000000000000..3193d0592d07 --- /dev/null +++ b/sys-boot/refind/refind-0.14.0.2.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs secureboot + +DESCRIPTION="The UEFI Boot Manager by Rod Smith" +HOMEPAGE="https://www.rodsbooks.com/refind/" +SRC_URI="mirror://sourceforge/project/${PN}/${PV}/${PN}-src-${PV}.tar.gz" + +LICENSE="BSD GPL-2 GPL-3 FDL-1.3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +FS_USE="btrfs +ext2 +ext4 hfs +iso9660 ntfs reiserfs" +IUSE="${FS_USE} custom-cflags doc" + +DEPEND="sys-boot/gnu-efi" + +DOCS=( README.txt ) + +pkg_pretend() { + if use custom-cflags; then + ewarn + ewarn "You have enabled building with USE=custom-cflags. Be aware that" + ewarn "using this can result in EFI binaries that fail to run and may" + ewarn "fail to build at all. This is strongly advised against by upstream." + ewarn + ewarn "See https://bugs.gentoo.org/598587#c3 for more information" + ewarn + fi +} + +pkg_setup() { + if use x86; then + export EFIARCH=ia32 + export BUILDARCH=ia32 + elif use amd64; then + export EFIARCH=x64 + export BUILDARCH=x86_64 + fi + secureboot_pkg_setup +} + +src_prepare() { + default + + # bug 598647 - PIE not supported + sed -e '/^CFLAGS/s/$/ -fno-PIE/' -i Make.common || die + sed -e '1 i\.NOTPARALLEL:' -i filesystems/Makefile || die + + cp "${FILESDIR}"/refind-sbat-gentoo-${PV}.csv refind-sbat-gentoo.csv || die +} + +src_compile() { + # Update fs targets depending on uses + local fs fs_names=() + for fs in ${FS_USE}; do + fs=${fs#+} + if use "${fs}"; then + fs_names+=(${fs}) + fi + done + fs_names=("${fs_names[@]/%/_gnuefi}") + + # Prepare flags + local make_flags=( + ARCH="${BUILDARCH}" + CC="$(tc-getCC)" + AS="$(tc-getAS)" + LD="$(tc-getLD)" + AR="$(tc-getAR)" + RANLIB="$(tc-getRANLIB)" + OBJCOPY="$(tc-getOBJCOPY)" + GNUEFILIB="/usr/$(get_libdir)" + EFILIB="/usr/$(get_libdir)" + EFICRT0="/usr/$(get_libdir)" + FILESYSTEMS="${fs_names[*]}" + FILESYSTEMS_GNUEFI="${fs_names[*]}" + REFIND_SBAT_CSV=refind-sbat-gentoo.csv + ) + if use custom-cflags; then + make_flags=(CFLAGS="${CFLAGS} -fno-tree-loop-distribute-patterns" "${make_flags[@]}") + fi + + emake "${make_flags[@]}" all_gnuefi +} + +src_install() { + exeinto "/usr/$(get_libdir)/${PN}" + doexe refind-install + dosym "../$(get_libdir)/${PN}/refind-install" "/usr/sbin/refind-install" + + if use doc; then + doman "docs/man/"* + DOCS+=(NEWS.txt docs/refind docs/Styles) + fi + einstalldocs + + insinto "/usr/$(get_libdir)/${PN}/refind" + doins "refind/refind_${EFIARCH}.efi" + doins "refind.conf-sample" + doins -r images icons fonts banners + + if [[ -d "drivers_${EFIARCH}" ]]; then + doins -r "drivers_${EFIARCH}" + fi + + insinto "/usr/$(get_libdir)/${PN}/refind/tools_${EFIARCH}" + doins "gptsync/gptsync_${EFIARCH}.efi" + + insinto "/etc/refind.d" + doins -r "keys" + + dosbin "mkrlconf" + dosbin "mvrefind" + dosbin "refind-mkdefault" + + secureboot_auto_sign --in-place +} + +pkg_postinst() { + elog "rEFInd has been built and installed into ${EROOT}/usr/$(get_libdir)/${PN}" + elog "You will need to use the command 'refind-install' to install" + elog "the binaries into your EFI System Partition" + elog "" + elog "refind-install requires additional packages to be fully functional:" + elog " app-crypt/sbsigntools for binary signing for use with SecureBoot" + elog " sys-boot/efibootmgr for writing to NVRAM" + elog " sys-apps/gptfdisk for ESP management" + elog "" + elog "refind-mkdefault requires >=dev-lang/python-3" + elog "" + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "A sample configuration can be found at" + elog "${EROOT}/usr/$(get_libdir)/${PN}/refind/refind.conf-sample" + else + if ver_test "${REPLACING_VERSIONS}" -lt "0.12.0"; then + ewarn "This new version uses sys-apps/gptfdisk instead of sys-block/parted" + ewarn "to manage ESP" + ewarn "" + fi + ewarn "Note that this installation will not update any EFI binaries" + ewarn "on your EFI System Partition - this needs to be done manually" + fi +} diff --git a/sys-boot/sgibootcd/metadata.xml b/sys-boot/sgibootcd/metadata.xml index 3cc699b0f184..619dc7007bd4 100644 --- a/sys-boot/sgibootcd/metadata.xml +++ b/sys-boot/sgibootcd/metadata.xml @@ -3,7 +3,7 @@ <pkgmetadata> <maintainer type="project"> <email>mips@gentoo.org</email> - <name>Mips Team</name> + <name>MIPS architecture team</name> </maintainer> <longdescription> diff --git a/sys-boot/shim/Manifest b/sys-boot/shim/Manifest index 1271dd5a569d..b21e245961bc 100644 --- a/sys-boot/shim/Manifest +++ b/sys-boot/shim/Manifest @@ -1,3 +1,6 @@ -DIST shim-aa64-15-5.aarch64.rpm 397028 BLAKE2B 4e89dd2029238e9b455c469b2857610bfa0d686c43a6f93b7daa70625317c68552967e6761e2c4912b098880c2ccf04278736ca51b7c2e95bcfc700a716bf69d SHA512 1d27ec70bf8b18777bb38cec6769172bd56aa72e9f910e9fa21039dc1c133ebf789fe46fbfe079df6167c3982f6c47bdcad26d3175d6cf9494f89dc9a8a0c823 -DIST shim-ia32-15-5.x86_64.rpm 1026312 BLAKE2B 42f018888463b0da1edbb2ae7379e63b79cea84208ef7ce069c3753bad2f232cb156d73e16864da279c31e8f8f25daa01d6ccc16a6fd13daa286d88460232f9b SHA512 a5d297265480b6a77f05050ecb31b31d2275df0b2f9bfa5ef1a4851163501f295fb81c142aa9fd30826b9e001f876c3d864b3d7b2f89575e6839f3939bca4755 -DIST shim-x64-15-5.x86_64.rpm 669944 BLAKE2B 25d7fb6a4869212610158313f9b8d55f102d6d4e8fc562a43b4654e29fcdb6cef4ba4421d56afb1ad98b7df1c7fe121558a757f06db86cc391ea0ad3e2f9982e SHA512 4888e9422d71f4f8f05343e8dc161f8e48a31ba28469fe3671ce20283e5f7fced656f2d0583d76532dddecc49c2a8504a504b5da951a1e2c6302bf38fac5048e +DIST shim-aa64-15.6-2.aarch64.rpm 466804 BLAKE2B 706f31835be24fee7202b8f8eb49204741d7726f106fad993ff524f475434ab3f23bebcd427f8a2aa4cd9a9c2494fdec9c2a49c29025364f0ebe989786f74c2f SHA512 72c2a62f380e76c3ea0fe5b13ef4e4bcd5e62e1b26b0b277c6ed8dd5d5e76f0f92770497da09e8ce12e6c60ee57d679d134f960a10639644dd751811563f1f29 +DIST shim-aa64-15.8-3.aarch64.rpm 466590 BLAKE2B ebd77148d363020d14b418dbb3107981b213b39914daa80765cc2db16c7b365eaebcbcba19b88459364967f2764f417aeffd34754aa92c2efc7aaa4e9d45b712 SHA512 d9b879706f7f6c7f7bfea92a443191811d39835074b3b6db3979c707b406b00884baff66ac79bf9bd66869240f668c6e6f987f8954a570d648933c85ea0da1c2 +DIST shim-ia32-15.6-2.x86_64.rpm 419081 BLAKE2B f7160dd1330bfd7ad2d64cfe370750f576f1e3291aa8bc8313d52869f3dd23228db8514e7578c2609428479e430a1d39c1992450f4f42197216c00c420a0a150 SHA512 045325802474f53c6e86eff1166f1a966268c9ad706fac4c08966f211dbc32fba21ed3a07c46445ec579ac1e2819a1313ff54d6169737806954962945c61bdc2 +DIST shim-ia32-15.8-3.x86_64.rpm 422489 BLAKE2B 00aa14d10ac0351e39f2b7bb2da6b31e048757ee9413b73f5a1638688e2b242c161b39b5d897c9414e435caab13456763dbe2c6bc46061ab3c29e14ab487e587 SHA512 10ef47014637f9df9f199d90e3869e96341723c23628cfd22465638028cc38b006a003c41ea7fd7f1885e4cb573a2f23034a237ea03ba231f8f0d37573bb2e23 +DIST shim-x64-15.6-2.x86_64.rpm 479835 BLAKE2B 7d12b97275c25659f94a8dd4c8678eb7df9e11fd3258966cb65c762467f28744b9403e13d5b5c98d6d6a5244ce4d81ef31b9d802040be99da03c1bb56be21275 SHA512 971978bddee95a6a134ef05c4d88cf5df41926e631de863b74ef772307f3e106c82c8f6889c18280d47187986abd774d8671c5be4b85b1b0bb3d1858b65d02cf +DIST shim-x64-15.8-3.x86_64.rpm 478432 BLAKE2B cf1a032af75fc17e09444aae488c2921a8f0868d91ceb427835cd0378f6c7369e223b7fc08f0a596774b374e3f800b9ec941792e522d8c5281a395cf800c642a SHA512 4c3635d82980ccb604b568f072f30ac0c0055c6ed2985dade6a28c9070852a240bb33f15f9ef42c83fa46d212c18ae6f17abca9f3adda0a332b908ceda537e87 diff --git a/sys-boot/shim/metadata.xml b/sys-boot/shim/metadata.xml index 97eff4632a18..be6f6f5712cf 100644 --- a/sys-boot/shim/metadata.xml +++ b/sys-boot/shim/metadata.xml @@ -5,4 +5,8 @@ <email>zerochaos@gentoo.org</email> <name>Rick Farina</name> </maintainer> + <upstream> + <remote-id type="cpe">cpe:/a:redhat:shim</remote-id> + <remote-id type="github">rhboot/shim</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-boot/shim/shim-15.5-r1.ebuild b/sys-boot/shim/shim-15.5-r1.ebuild deleted file mode 100644 index 0cb553a678af..000000000000 --- a/sys-boot/shim/shim-15.5-r1.ebuild +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit rpm - -DESCRIPTION="Fedora's signed UEFI shim" -HOMEPAGE="https://apps.fedoraproject.org/packages/shim/" -MY_PV="${PV/./-}" -SRC_URI="amd64? ( https://kojipkgs.fedoraproject.org//packages/shim/15/5/x86_64/shim-x64-${MY_PV}.x86_64.rpm - https://kojipkgs.fedoraproject.org//packages/shim/15/5/x86_64/shim-ia32-${MY_PV}.x86_64.rpm ) - x86? ( https://kojipkgs.fedoraproject.org//packages/shim/15/5/x86_64/shim-x64-${MY_PV}.x86_64.rpm - https://kojipkgs.fedoraproject.org//packages/shim/15/5/x86_64/shim-ia32-${MY_PV}.x86_64.rpm ) - arm64? ( https://kojipkgs.fedoraproject.org//packages/shim/15/5/aarch64/shim-aa64-${MY_PV}.aarch64.rpm )" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="amd64 arm64 x86" -IUSE="" - -S="${WORKDIR}/boot/efi/EFI" - -src_install() { - insinto /usr/share/${PN} - doins BOOT/BOOT*.EFI - doins fedora/mm*.efi -} diff --git a/sys-boot/shim/shim-15.6.ebuild b/sys-boot/shim/shim-15.6.ebuild new file mode 100644 index 000000000000..fc117bf9f5c5 --- /dev/null +++ b/sys-boot/shim/shim-15.6.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit rpm secureboot + +DESCRIPTION="Fedora's signed UEFI shim" +HOMEPAGE="https://src.fedoraproject.org/rpms/shim" +SRC_URI="amd64? ( https://kojipkgs.fedoraproject.org/packages/shim/${PV}/2/x86_64/shim-x64-${PV}-2.x86_64.rpm + https://kojipkgs.fedoraproject.org/packages/shim/${PV}/2/x86_64/shim-ia32-${PV}-2.x86_64.rpm ) + x86? ( https://kojipkgs.fedoraproject.org/packages/shim/${PV}/2/x86_64/shim-x64-${PV}-2.x86_64.rpm + https://kojipkgs.fedoraproject.org/packages/shim/${PV}/2/x86_64/shim-ia32-${PV}-2.x86_64.rpm ) + arm64? ( https://kojipkgs.fedoraproject.org/packages/shim/${PV}/2/aarch64/shim-aa64-${PV}-2.aarch64.rpm )" +S="${WORKDIR}/boot/efi/EFI" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 arm64 x86" + +src_install() { + insinto /usr/share/${PN} + doins BOOT/BOOT*.EFI + doins fedora/mm*.efi + + # Shim is already signed with Microsoft keys, but MokManager still needs + # signing with our key otherwise we have to enrol the Fedora key in Mok list + secureboot_auto_sign --in-place +} diff --git a/sys-boot/shim/shim-15.8.ebuild b/sys-boot/shim/shim-15.8.ebuild new file mode 100644 index 000000000000..cc0241858af6 --- /dev/null +++ b/sys-boot/shim/shim-15.8.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit rpm secureboot + +DESCRIPTION="Fedora's signed UEFI shim" +HOMEPAGE="https://src.fedoraproject.org/rpms/shim" +SRC_URI="amd64? ( https://kojipkgs.fedoraproject.org/packages/shim/${PV}/3/x86_64/shim-x64-${PV}-3.x86_64.rpm + https://kojipkgs.fedoraproject.org/packages/shim/${PV}/3/x86_64/shim-ia32-${PV}-3.x86_64.rpm ) + x86? ( https://kojipkgs.fedoraproject.org/packages/shim/${PV}/3/x86_64/shim-x64-${PV}-3.x86_64.rpm + https://kojipkgs.fedoraproject.org/packages/shim/${PV}/3/x86_64/shim-ia32-${PV}-3.x86_64.rpm ) + arm64? ( https://kojipkgs.fedoraproject.org/packages/shim/${PV}/3/aarch64/shim-aa64-${PV}-3.aarch64.rpm )" +S="${WORKDIR}/boot/efi/EFI" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" + +src_install() { + insinto /usr/share/${PN} + doins BOOT/BOOT*.EFI + doins fedora/mm*.efi + + # Shim is already signed with Microsoft keys, but MokManager still needs + # signing with our key otherwise we have to enrol the Fedora key in Mok list + secureboot_auto_sign --in-place +} diff --git a/sys-boot/silo/metadata.xml b/sys-boot/silo/metadata.xml index 74463e4b646a..81daa9304f4e 100644 --- a/sys-boot/silo/metadata.xml +++ b/sys-boot/silo/metadata.xml @@ -3,7 +3,7 @@ <pkgmetadata> <maintainer type="project"> <email>sparc@gentoo.org</email> - <name>Gentoo Linux SPARC Development</name> + <name>SPARC architecture team</name> </maintainer> <use> <flag name="tilo-only">Install only the tilo netboot tool</flag> diff --git a/sys-boot/syslinux/Manifest b/sys-boot/syslinux/Manifest index 10c5556ec517..199f8fc51470 100644 --- a/sys-boot/syslinux/Manifest +++ b/sys-boot/syslinux/Manifest @@ -1 +1,2 @@ DIST syslinux-6.04-pre1.tar.xz 5283272 BLAKE2B 800e5977ed13b26a1756c33d8625e850631b642e26a86e3328196ddd998596693c3a26db0ada4c0ba78a4ba692a1cc01886b6eb693d877ddafcfb325ecdeb639 SHA512 7927dd39be8e2dcf4138a6fea33def67d19d938379d694f15b48fdd2f5924c028b7a9e7bd71d0c7c6630c203e9e2a54296628e530632ad5e6f55b1ebefe8fc98 +DIST syslinux-6.04-pre3.tar.gz 10760898 BLAKE2B 708bb7f3ecbe1888471f3be0102270c056bf8c5be22013f36b56c90f13f5358ce1853722b14b962d8156cd1f045b9687166b98a1d7ad2853acbe6303fa40fae9 SHA512 0619a25347f3964e0c7c6ff629b2f59f01bd9e0afd822f46b67f26b8c84cbc55534cf7b22ff1bf83eec4986fd2d8f1646a3d750190a7c6c50251affc0b62594d diff --git a/sys-boot/syslinux/files/6.04_pre1/0001-Strip-the-.note.gnu.property-section-for-the-mbr.patch b/sys-boot/syslinux/files/6.04_pre1/0001-Strip-the-.note.gnu.property-section-for-the-mbr.patch new file mode 100644 index 000000000000..5d823436bec8 --- /dev/null +++ b/sys-boot/syslinux/files/6.04_pre1/0001-Strip-the-.note.gnu.property-section-for-the-mbr.patch @@ -0,0 +1,47 @@ +From 60fef313164d1048cf11423656732953776e5e2f Mon Sep 17 00:00:00 2001 +From: Lukas Schwaighofer <lukas@schwaighofer.name> +Date: Sat, 18 Aug 2018 12:48:21 +0200 +Subject: [PATCH 1/5] Strip the .note.gnu.property section for the mbr + +This section is added since binutils Debian version 2.31.1-2 and causes mbr.bin +to grow in size beyond what can fit into the master boot record. + +Forwarded: https://www.syslinux.org/archives/2018-August/026168.html +--- + mbr/i386/mbr.ld | 6 +++++- + mbr/x86_64/mbr.ld | 6 +++++- + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/mbr/i386/mbr.ld b/mbr/i386/mbr.ld +index d14ba802..6d489904 100644 +--- a/mbr/i386/mbr.ld ++++ b/mbr/i386/mbr.ld +@@ -69,5 +69,9 @@ SECTIONS + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } +- /DISCARD/ : { *(.note.GNU-stack) } ++ /DISCARD/ : ++ { ++ *(.note.GNU-stack) ++ *(.note.gnu.property) ++ } + } +diff --git a/mbr/x86_64/mbr.ld b/mbr/x86_64/mbr.ld +index ae27d49a..5b46db66 100644 +--- a/mbr/x86_64/mbr.ld ++++ b/mbr/x86_64/mbr.ld +@@ -68,5 +68,9 @@ SECTIONS + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } +- /DISCARD/ : { *(.note.GNU-stack) } ++ /DISCARD/ : ++ { ++ *(.note.GNU-stack) ++ *(.note.gnu.property) ++ } + } +-- +2.35.1 + diff --git a/sys-boot/syslinux/files/syslinux-6.04_pre1-singleloadsegment.patch b/sys-boot/syslinux/files/6.04_pre1/0002-Force-the-linker-to-put-all-sections-into-a-single-P.patch index db9b7d0a137b..33b6a36c63ea 100644 --- a/sys-boot/syslinux/files/syslinux-6.04_pre1-singleloadsegment.patch +++ b/sys-boot/syslinux/files/6.04_pre1/0002-Force-the-linker-to-put-all-sections-into-a-single-P.patch @@ -1,17 +1,21 @@ -Author: Lukas Schwaighofer <lukas@schwaighofer.name> -Description: Force the linker to put all sections into a single PT_LOAD - segment. This is required when using binutils >= 2.31 which writes two PT_LOAD - segments by default. This is not supported by the wrapper.c script used to - convert the shared object into an elf binary. -Forwarded: https://www.syslinux.org/archives/2018-August/026167.html +From 0c646f067a6b766a5ce0434e5e4e7b839b511331 Mon Sep 17 00:00:00 2001 +From: Lukas Schwaighofer <lukas@schwaighofer.name> +Date: Sat, 18 Aug 2018 16:56:35 +0200 +Subject: [PATCH 2/5] Force the linker to put all sections into a single + PT_LOAD segment + +This is required when using binutils >= 2.31 which writes two PT_LOAD segments +by default. This is not supported by the wrapper.c script used to convert the +shared object into an elf binary. +Forwarded: https://www.syslinux.org/archives/2018-August/026167.html --- efi/i386/syslinux.ld | 37 +++++++++++++++++++++---------------- efi/x86_64/syslinux.ld | 37 +++++++++++++++++++++---------------- 2 files changed, 42 insertions(+), 32 deletions(-) diff --git a/efi/i386/syslinux.ld b/efi/i386/syslinux.ld -index bab3fc7..5b4589d 100644 +index bab3fc74..19c16479 100644 --- a/efi/i386/syslinux.ld +++ b/efi/i386/syslinux.ld @@ -19,6 +19,11 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") @@ -157,7 +161,7 @@ index bab3fc7..5b4589d 100644 _end = .; diff --git a/efi/x86_64/syslinux.ld b/efi/x86_64/syslinux.ld -index 450641c..cad28a8 100644 +index 450641c6..a2c124fd 100644 --- a/efi/x86_64/syslinux.ld +++ b/efi/x86_64/syslinux.ld @@ -19,6 +19,11 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") @@ -302,3 +306,6 @@ index 450641c..cad28a8 100644 _end = .; +-- +2.35.1 + diff --git a/sys-boot/syslinux/files/6.04_pre1/0003-GCC-10-compatibility-patch.patch b/sys-boot/syslinux/files/6.04_pre1/0003-GCC-10-compatibility-patch.patch new file mode 100644 index 000000000000..6d60eab14bbb --- /dev/null +++ b/sys-boot/syslinux/files/6.04_pre1/0003-GCC-10-compatibility-patch.patch @@ -0,0 +1,99 @@ +From b92e6e8f624c96acf2ce80192a893ee25de527a1 Mon Sep 17 00:00:00 2001 +From: Lukas Schwaighofer <lukas@schwaighofer.name> +Date: Sun, 16 Aug 2020 15:23:21 +0200 +Subject: [PATCH 3/5] GCC-10 compatibility patch + +* Add `-fcommon` to most gcc invocations to allow duplicate definitions +* __builtin_strlen is not really a "builtin" an implementation still + needs to be provided (source: + https://bugzilla.suse.com/show_bug.cgi?id=1166605#c5). Work around the + issue by supplying an inline function. The strlen function added to + dos/string.h was copied from com32/lib/strlen.c. +--- + dos/string.h | 11 ++++++++++- + mk/efi.mk | 1 + + mk/elf.mk | 1 + + mk/embedded.mk | 2 +- + mk/lib.mk | 2 +- + 5 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/dos/string.h b/dos/string.h +index f648de2d..c4649f5f 100644 +--- a/dos/string.h ++++ b/dos/string.h +@@ -5,12 +5,21 @@ + #ifndef _STRING_H + #define _STRING_H + ++#include <stddef.h> ++ + /* Standard routines */ + #define memcpy(a,b,c) __builtin_memcpy(a,b,c) + #define memmove(a,b,c) __builtin_memmove(a,b,c) + #define memset(a,b,c) __builtin_memset(a,b,c) + #define strcpy(a,b) __builtin_strcpy(a,b) +-#define strlen(a) __builtin_strlen(a) ++ ++static inline size_t strlen(const char *s) ++{ ++ const char *ss = s; ++ while (*ss) ++ ss++; ++ return ss - s; ++} + + /* This only returns true or false */ + static inline int memcmp(const void *__m1, const void *__m2, unsigned int __n) +diff --git a/mk/efi.mk b/mk/efi.mk +index f097ad22..407bc077 100644 +--- a/mk/efi.mk ++++ b/mk/efi.mk +@@ -25,6 +25,7 @@ FORMAT=efi-app-$(EFI_SUBARCH) + + CFLAGS = -I$(EFIINC) -I$(EFIINC)/$(EFI_SUBARCH) \ + -DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding \ ++ -fcommon \ + -Wall -I$(com32)/include -I$(com32)/include/sys \ + -I$(core)/include -I$(core)/ $(ARCHOPT) \ + -I$(com32)/lib/ -I$(com32)/libutil/include -std=gnu99 \ +diff --git a/mk/elf.mk b/mk/elf.mk +index b46dbd06..dc265ce9 100644 +--- a/mk/elf.mk ++++ b/mk/elf.mk +@@ -55,6 +55,7 @@ GPLINCLUDE = + endif + + CFLAGS = $(GCCOPT) $(GCCWARN) -W -Wall \ ++ -fcommon \ + -fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ -DDYNAMIC_MODULE \ + -nostdinc -iwithprefix include \ + -I$(com32)/libutil/include -I$(com32)/include \ +diff --git a/mk/embedded.mk b/mk/embedded.mk +index 488dc0fc..fae13e20 100644 +--- a/mk/embedded.mk ++++ b/mk/embedded.mk +@@ -57,7 +57,7 @@ LIBGCC := $(shell $(CC) $(GCCOPT) --print-libgcc) + LD += -m elf_$(ARCH) + + # Note: use += for CFLAGS and SFLAGS in case something is set in MCONFIG.local +-CFLAGS += $(GCCOPT) -g $(GCCWARN) -Wno-sign-compare $(OPTFLAGS) $(INCLUDES) ++CFLAGS += $(GCCOPT) -g $(GCCWARN) -Wno-sign-compare -fcommon $(OPTFLAGS) $(INCLUDES) + SFLAGS += $(CFLAGS) -D__ASSEMBLY__ + + .SUFFIXES: .c .o .S .s .i .elf .com .bin .asm .lst .c32 .lss +diff --git a/mk/lib.mk b/mk/lib.mk +index f8591e56..6dd54295 100644 +--- a/mk/lib.mk ++++ b/mk/lib.mk +@@ -49,7 +49,7 @@ OPTFLAGS = -Os -march=$(MARCH) -falign-functions=0 -falign-jumps=0 \ + -falign-labels=0 -ffast-math -fomit-frame-pointer + WARNFLAGS = $(GCCWARN) -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline + +-CFLAGS = $(OPTFLAGS) $(REQFLAGS) $(WARNFLAGS) $(LIBFLAGS) ++CFLAGS = $(OPTFLAGS) $(REQFLAGS) -fcommon $(WARNFLAGS) $(LIBFLAGS) + + ifeq ($(FWCLASS),EFI) + CFLAGS += -mno-red-zone +-- +2.35.1 + diff --git a/sys-boot/syslinux/files/6.04_pre1/0004-Inherit-toolchain-vars-from-environment.patch b/sys-boot/syslinux/files/6.04_pre1/0004-Inherit-toolchain-vars-from-environment.patch new file mode 100644 index 000000000000..40784f9b2698 --- /dev/null +++ b/sys-boot/syslinux/files/6.04_pre1/0004-Inherit-toolchain-vars-from-environment.patch @@ -0,0 +1,72 @@ +From 46d58e2b03e15a863aed8661b9ee922da4930a3e Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Mon, 30 May 2022 11:57:07 -0400 +Subject: [PATCH 4/5] Inherit toolchain vars from environment + +--- + mk/syslinux.mk | 36 ++++++++++++++++++------------------ + 1 file changed, 18 insertions(+), 18 deletions(-) + +diff --git a/mk/syslinux.mk b/mk/syslinux.mk +index 593ff75f..91d984e8 100644 +--- a/mk/syslinux.mk ++++ b/mk/syslinux.mk +@@ -37,7 +37,7 @@ ifdef DEBUG + DEBUGOPT = -DDEBUG=$(DEBUG) + endif + +-NASM = nasm ++NASM ?= nasm + NASMOPT = -Ox $(DEBUGOPT) + + PERL = perl +@@ -46,29 +46,29 @@ UPX = upx + + CHMOD = chmod + +-CC = gcc ++CC ?= gcc + gcc_ok = $(shell tmpf=gcc_ok.$$$$.tmp; \ + if $(CC) $(GCCOPT) $(1) -c $(topdir)/dummy.c \ + -o $$tmpf 2>/dev/null ; \ + then echo '$(1)'; else echo '$(2)'; fi; \ + rm -f $$tmpf) + +-LD = ld +-OBJDUMP = objdump +-OBJCOPY = objcopy +-STRIP = strip +-AR = ar +-NM = nm +-RANLIB = ranlib +-STRIP = strip +-GZIPPROG = gzip +-XZ = xz +-PNGTOPNM = pngtopnm +-MCOPY = mcopy +-MFORMAT = mformat +-MKISOFS = mkisofs +-SED = sed +-WGET = wget ++LD ?= ld ++OBJDUMP ?= objdump ++OBJCOPY ?= objcopy ++STRIP ?= strip ++AR ?= ar ++NM ?= nm ++RANLIB ?= ranlib ++STRIP ?= strip ++GZIPPROG ?= gzip ++XZ ?= xz ++PNGTOPNM ?= pngtopnm ++MCOPY ?= mcopy ++MFORMAT ?= mformat ++MKISOFS ?= mkisofs ++SED ?= sed ++WGET ?= wget + + com32 = $(topdir)/com32 + +-- +2.35.1 + diff --git a/sys-boot/syslinux/files/6.04_pre3/0005-Include-efisetjmp.h-from-efi.h.patch b/sys-boot/syslinux/files/6.04_pre3/0005-Include-efisetjmp.h-from-efi.h.patch new file mode 100644 index 000000000000..0d32d7167024 --- /dev/null +++ b/sys-boot/syslinux/files/6.04_pre3/0005-Include-efisetjmp.h-from-efi.h.patch @@ -0,0 +1,24 @@ +From 9889f441d006d11d0fb0b726b9f81396ce6fcfbd Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Mon, 30 May 2022 14:22:28 -0400 +Subject: [PATCH 5/5] Include efisetjmp.h from efi.h + +--- + efi/efi.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/efi/efi.h b/efi/efi.h +index c266532f..250c511e 100644 +--- a/efi/efi.h ++++ b/efi/efi.h +@@ -22,6 +22,7 @@ + + #include <efi.h> + #include <efilib.h> ++#include <efisetjmp.h> + #include <efistdarg.h> + + /* Delay for 100 ms */ +-- +2.35.1 + diff --git a/sys-boot/syslinux/files/syslinux-6.04-binutils-2.41.patch b/sys-boot/syslinux/files/syslinux-6.04-binutils-2.41.patch new file mode 100644 index 000000000000..56762aa756d5 --- /dev/null +++ b/sys-boot/syslinux/files/syslinux-6.04-binutils-2.41.patch @@ -0,0 +1,74 @@ +https://bugs.gentoo.org/913129 +--- a/gnu-efi/gnu-efi-3.0/Make.defaults ++++ b/gnu-efi/gnu-efi-3.0/Make.defaults +@@ -114,4 +114,4 @@ CFLAGS += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \ + -fno-merge-constants -ffreestanding -fno-stack-protector \ + -fno-stack-check + ASFLAGS += $(ARCH3264) +-LDFLAGS += -nostdlib --warn-common --no-undefined --fatal-warnings ++LDFLAGS += -nostdlib --warn-common --no-undefined --fatal-warnings -z notext +--- a/gnu-efi/gnu-efi-3.0/apps/Makefile ++++ b/gnu-efi/gnu-efi-3.0/apps/Makefile +@@ -52,7 +52,7 @@ ifneq (,$(findstring FreeBSD,$(OS))) + LDSCRIPT = $(TOPDIR)/gnuefi/elf_$(ARCH)_fbsd_efi.lds + endif + +-LDFLAGS += -shared -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS) ++LDFLAGS += -shared -z notext -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS) + + LOADLIBES += -lefi -lgnuefi + LOADLIBES += $(shell $(CC) $(ARCH3264) -print-libgcc-file-name) +--- a/mk/com32.mk ++++ b/mk/com32.mk +@@ -80,7 +80,7 @@ SFLAGS = $(GCCOPT) $(GCCWARN) \ + -I$(topdir)/core/include + + COM32LD = $(com32)/lib/$(ARCH)/elf.ld +-LDFLAGS = -m elf_$(ARCH) -shared --hash-style=gnu -T $(COM32LD) ++LDFLAGS = -m elf_$(ARCH) -shared -z notext --hash-style=gnu -T $(COM32LD) + LIBGCC := $(shell $(CC) $(GCCOPT) --print-libgcc) + + LNXCFLAGS = -I$(com32)/libutil/include $(GCCWARN) -O -g \ +--- a/mk/efi.mk ++++ b/mk/efi.mk +@@ -38,7 +38,7 @@ CRT0 := $(LIBDIR)/crt0-efi-$(EFI_SUBARCH).o + LDSCRIPT := $(LIBDIR)/elf_$(EFI_SUBARCH)_efi.lds + + LDFLAGS = -T $(SRC)/$(ARCH)/syslinux.ld -Bsymbolic -pie -nostdlib -znocombreloc \ +- -L$(LIBDIR) --hash-style=gnu -m elf_$(ARCH) $(CRT0) -E ++ -L$(LIBDIR) -z notext --hash-style=gnu -m elf_$(ARCH) $(CRT0) -E + + SFLAGS = $(GCCOPT) $(GCCWARN) $(ARCHOPT) \ + -fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ \ +--- a/mk/elf.mk ++++ b/mk/elf.mk +@@ -68,7 +68,7 @@ GCCOPT += -mregparm=3 -DREGPARM=3 + endif + + SFLAGS = $(GCCOPT) -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ +-LDFLAGS = -m elf_$(ARCH) -shared --hash-style=gnu -T $(com32)/lib/$(ARCH)/elf.ld --as-needed ++LDFLAGS = -m elf_$(ARCH) -shared -z notext --hash-style=gnu -T $(com32)/lib/$(ARCH)/elf.ld --as-needed + LIBGCC := $(shell $(CC) $(GCCOPT) --print-libgcc) + + LNXCFLAGS = -I$(com32)/libutil/include -W -Wall -O -g -D_GNU_SOURCE +--- a/mk/lib.mk ++++ b/mk/lib.mk +@@ -205,7 +205,7 @@ CORELIBOBJS = \ + $(LIBENTRY_OBJS) \ + $(LIBMODULE_OBJS) + +-LDFLAGS = -m elf_$(ARCH) --hash-style=gnu -T $(com32)/lib/$(ARCH)/elf.ld ++LDFLAGS = -m elf_$(ARCH) -z notext --hash-style=gnu -T $(com32)/lib/$(ARCH)/elf.ld + + .SUFFIXES: .c .o .a .so .lo .i .S .s .ls .ss .lss + +--- a/core/Makefile ++++ b/core/Makefile +@@ -158,6 +158,7 @@ NASM_ELF = elf + %.elf: %.o $(LIBDEP) $(LDSCRIPT) $(AUXLIBS) + $(LD) $(LDFLAGS) -pie -Bsymbolic \ + -T $(LDSCRIPT) \ ++ -z notext \ + --unresolved-symbols=report-all \ + -E --hash-style=gnu -M -o $@ $< \ + --start-group $(LIBS) $(subst $(*F).elf,lib$(*F).a,$@) --end-group \ diff --git a/sys-boot/syslinux/files/syslinux-6.04_pre1-fcommon.patch b/sys-boot/syslinux/files/syslinux-6.04_pre1-fcommon.patch deleted file mode 100644 index 7d061db26563..000000000000 --- a/sys-boot/syslinux/files/syslinux-6.04_pre1-fcommon.patch +++ /dev/null @@ -1,54 +0,0 @@ -https://bugs.gentoo.org/705730 - -gcc-10 enabled f-no-common by default. Broke syslinux linking. ---- a/mk/com32.mk -+++ b/mk/com32.mk -@@ -47,6 +47,7 @@ GCCOPT += $(call gcc_ok,-falign-functions=0,-malign-functions=0) - GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0) - GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0) - GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0) -+GCCOPT += $(call gcc_ok,-fcommon) - - ifeq ($(FWCLASS),EFI) - GCCOPT += -mno-red-zone ---- a/mk/elf.mk -+++ b/mk/elf.mk -@@ -42,6 +42,7 @@ GCCOPT += $(call gcc_ok,-falign-functions=0,-malign-functions=0) - GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0) - GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0) - GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0) -+GCCOPT += $(call gcc_ok,-fcommon) - - com32 = $(topdir)/com32 - core = $(topdir)/core ---- a/mk/embedded.mk -+++ b/mk/embedded.mk -@@ -51,6 +51,7 @@ GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0) - GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0) - GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0) - GCCOPT += $(call gcc_ok,-fvisibility=hidden) -+GCCOPT += $(call gcc_ok,-fcommon) - - LIBGCC := $(shell $(CC) $(GCCOPT) --print-libgcc) - ---- a/mk/lib.mk -+++ b/mk/lib.mk -@@ -28,6 +28,7 @@ GCCOPT += $(call gcc_ok,-falign-functions=0,-malign-functions=0) - GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0) - GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0) - GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0) -+GCCOPT += $(call gcc_ok,-fcommon) - - INCLUDE = -I$(SRC) - STRIP = strip --strip-all -R .comment -R .note ---- a/mk/efi.mk -+++ b/mk/efi.mk -@@ -7,7 +7,7 @@ core = $(topdir)/core - # Set up architecture specifics; for cross compilation, set ARCH as apt - # gnuefi sets up architecture specifics in ia32 or x86_64 sub directories - # set up the LIBDIR and EFIINC for building for the appropriate architecture --GCCOPT := $(call gcc_ok,-fno-stack-protector,) -+GCCOPT := $(call gcc_ok,-fno-stack-protector,) $(call gcc_ok,-fcommon) - EFIINC = $(objdir)/include/efi - LIBDIR = $(objdir)/lib - diff --git a/sys-boot/syslinux/metadata.xml b/sys-boot/syslinux/metadata.xml index 423c8b85ac5e..1ba8d83fd2b4 100644 --- a/sys-boot/syslinux/metadata.xml +++ b/sys-boot/syslinux/metadata.xml @@ -1,14 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<maintainer type="person"> - <email>chithanh@gentoo.org</email> -</maintainer> -<maintainer type="project"> - <email>base-system@gentoo.org</email> - <name>Gentoo Base System</name> -</maintainer> -<upstream> - <remote-id type="cpe">cpe:/a:gentoo:syslinux</remote-id> -</upstream> + <maintainer type="person"> + <email>chithanh@gentoo.org</email> + </maintainer> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> + <use> + <flag name="bios">Enable BIOS support</flag> + <flag name="uefi">Enable UEFI support</flag> + </use> + <upstream> + <remote-id type="cpe">cpe:/a:gentoo:syslinux</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-boot/syslinux/syslinux-6.04_pre1-r2.ebuild b/sys-boot/syslinux/syslinux-6.04_pre1-r2.ebuild deleted file mode 100644 index b0ed750f5a1e..000000000000 --- a/sys-boot/syslinux/syslinux-6.04_pre1-r2.ebuild +++ /dev/null @@ -1,120 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs - -DESCRIPTION="SYSLINUX, PXELINUX, ISOLINUX, EXTLINUX and MEMDISK bootloaders" -HOMEPAGE="https://www.syslinux.org/" -# Final releases in 6.xx/${PV}.tar.* (literal "xx") -# Testing releases in Testing/${PV}/${PV}.tar.* -SRC_URI_DIR=${PV:0:1}.xx -SRC_URI_TESTING=Testing/${PV:0:4} -[[ ${PV/_alpha} != ${PV} ]] && SRC_URI_DIR=${SRC_URI_TESTING} -[[ ${PV/_beta} != ${PV} ]] && SRC_URI_DIR=${SRC_URI_TESTING} -[[ ${PV/_pre} != ${PV} ]] && SRC_URI_DIR=${SRC_URI_TESTING} -[[ ${PV/_rc} != ${PV} ]] && SRC_URI_DIR=${SRC_URI_TESTING} -SRC_URI="https://www.kernel.org/pub/linux/utils/boot/syslinux/${SRC_URI_DIR}/${P/_/-}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="-* amd64 x86" -IUSE="custom-cflags" - -RDEPEND="sys-apps/util-linux - sys-fs/mtools - dev-perl/Crypt-PasswdMD5 - dev-perl/Digest-SHA1" -DEPEND="${RDEPEND} - dev-lang/nasm - >=sys-boot/gnu-efi-3.0u - virtual/os-headers" - -S=${WORKDIR}/${P/_/-} - -# This ebuild is a departure from the old way of rebuilding everything in syslinux -# This departure is necessary since hpa doesn't support the rebuilding of anything other -# than the installers. - -# These are executables which come precompiled and are run by the boot loader -QA_PREBUILT="usr/share/${PN}/*.c32" - -# removed all the unpack/patching stuff since we aren't rebuilding the core stuff anymore - -PATCHES=( - "${FILESDIR}"/${PN}-6.03-sysmacros.patch #579928 - "${FILESDIR}"/${P}-singleloadsegment.patch #662678 - "${FILESDIR}"/${P}-fcommon.patch #705730 -) - -src_prepare() { - default - - rm -f gethostip #bug 137081 - - # Don't prestrip or override user LDFLAGS, bug #305783 - local SYSLINUX_MAKEFILES="extlinux/Makefile linux/Makefile mtools/Makefile \ - sample/Makefile utils/Makefile" - sed -i ${SYSLINUX_MAKEFILES} -e '/^LDFLAGS/d' || die "sed failed" - - if use custom-cflags; then - sed -i ${SYSLINUX_MAKEFILES} \ - -e 's|-g -Os||g' \ - -e 's|-Os||g' \ - -e 's|CFLAGS[[:space:]]\+=|CFLAGS +=|g' \ - || die "sed custom-cflags failed" - else - QA_FLAGS_IGNORED=" - /sbin/extlinux - /usr/bin/memdiskfind - /usr/bin/gethostip - /usr/bin/isohybrid - /usr/bin/syslinux - " - fi - case ${ARCH} in - amd64) loaderarch="efi64" ;; - x86) loaderarch="efi32" ;; - *) ewarn "Unsupported architecture, building installers only." ;; - esac - - # building with ld.gold causes problems, bug #563364 - if tc-ld-is-gold; then - ewarn "Building syslinux with the gold linker may cause problems, see bug #563364" - if [[ -z "${I_KNOW_WHAT_I_AM_DOING}" ]]; then - tc-ld-disable-gold - ewarn "set I_KNOW_WHAT_I_AM_DOING=1 to override this." - else - ewarn "Continuing anyway as requested." - fi - fi - - tc-export AR CC LD OBJCOPY RANLIB -} - -_emake() { - emake \ - AR="${AR}" \ - CC="${CC}" \ - LD="${LD}" \ - OBJCOPY="${OBJCOPY}" \ - RANLIB="${RANLIB}" \ - "$@" -} - -src_compile() { - # build system abuses the LDFLAGS variable to pass arguments to ld - unset LDFLAGS - if [[ ! -z ${loaderarch} ]]; then - _emake ${loaderarch} - fi - _emake ${loaderarch} installer -} - -src_install() { - # parallel install fails sometimes - einfo "loaderarch=${loaderarch}" - _emake -j1 INSTALLROOT="${D}" MANDIR=/usr/share/man bios ${loaderarch} install - dodoc README NEWS doc/*.txt -} diff --git a/sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild b/sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild new file mode 100644 index 000000000000..cc03c3c95fd0 --- /dev/null +++ b/sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs flag-o-matic secureboot + +DESCRIPTION="SYSLINUX, PXELINUX, ISOLINUX, EXTLINUX and MEMDISK bootloaders" +HOMEPAGE="https://www.syslinux.org/" +MY_P=${P/_/-} +SRC_URI="https://www.kernel.org/pub/linux/utils/boot/syslinux/Testing/6.04/${MY_P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* amd64 x86" +IUSE="abi_x86_32 abi_x86_64 +bios +uefi" +REQUIRED_USE="|| ( bios uefi ) + uefi? ( || ( abi_x86_32 abi_x86_64 ) )" + +BDEPEND=" + dev-lang/perl + bios? ( dev-lang/nasm ) +" +RDEPEND=" + sys-apps/util-linux + sys-fs/mtools + dev-perl/Crypt-PasswdMD5 + dev-perl/Digest-SHA1 +" +DEPEND="${RDEPEND} + virtual/os-headers +" + +S=${WORKDIR}/${MY_P} + +QA_EXECSTACK="usr/share/syslinux/*" +QA_WX_LOAD="usr/share/syslinux/*" +QA_PRESTRIPPED="usr/share/syslinux/.*" +QA_FLAGS_IGNORED=".*" + +pkg_setup() { + use uefi && secureboot_pkg_setup +} + +src_prepare() { + local PATCHES=( + "${FILESDIR}/syslinux-6.03-sysmacros.patch" + "${FILESDIR}/${PV}" + "${FILESDIR}/syslinux-6.04-binutils-2.41.patch" + ) + default +} +src_compile() { + filter-lto #863722 + + local DATE=$(date -u -r NEWS +%Y%m%d) + local HEXDATE=$(printf '0x%08x' "${DATE}") + + tc-export AR CC LD OBJCOPY RANLIB + unset CFLAGS LDFLAGS + + if use bios; then + emake bios DATE="${DATE}" HEXDATE="${HEXDATE}" + fi + if use uefi; then + if use abi_x86_32; then + emake efi32 DATE="${DATE}" HEXDATE="${HEXDATE}" + fi + if use abi_x86_64; then + emake efi64 DATE="${DATE}" HEXDATE="${HEXDATE}" + fi + fi +} + +src_install() { + local firmware=( $(usev bios) ) + if use uefi; then + use abi_x86_32 && firmware+=( efi32 ) + use abi_x86_64 && firmware+=( efi64 ) + fi + local args=( + INSTALLROOT="${ED}" + MANDIR='$(DATADIR)/man' + "${firmware[@]}" + install + ) + emake -j1 "${args[@]}" + if use bios; then + mv "${ED}"/usr/bin/keytab-{lilo,syslinux} || die + fi + einstalldocs + dostrip -x /usr/share/syslinux + + use uefi && secureboot_auto_sign --in-place +} diff --git a/sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild b/sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild new file mode 100644 index 000000000000..36ba918ffe7b --- /dev/null +++ b/sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs flag-o-matic secureboot + +DESCRIPTION="SYSLINUX, PXELINUX, ISOLINUX, EXTLINUX and MEMDISK bootloaders" +HOMEPAGE="https://www.syslinux.org/" +MY_P=${P/_/-} +SRC_URI="https://git.zytor.com/syslinux/syslinux.git/snapshot/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +#KEYWORDS="-* ~amd64 ~x86" +IUSE="abi_x86_32 abi_x86_64 +bios +uefi" +REQUIRED_USE="|| ( bios uefi ) + uefi? ( || ( abi_x86_32 abi_x86_64 ) )" + +RESTRICT="test" + +BDEPEND=" + dev-lang/perl + bios? ( dev-lang/nasm ) +" +RDEPEND=" + sys-apps/util-linux + sys-fs/mtools + dev-perl/Crypt-PasswdMD5 + dev-perl/Digest-SHA1 +" +DEPEND="${RDEPEND} + uefi? ( sys-boot/gnu-efi[abi_x86_32(-)?,abi_x86_64(-)?] ) + virtual/os-headers +" + +S=${WORKDIR}/${MY_P} + +QA_EXECSTACK="usr/share/syslinux/*" +QA_WX_LOAD="usr/share/syslinux/*" +QA_PRESTRIPPED="usr/share/syslinux/.*" +QA_FLAGS_IGNORED=".*" + +pkg_setup() { + use uefi && secureboot_pkg_setup +} + +src_prepare() { + local PATCHES=( + "${FILESDIR}/6.04_pre1" + "${FILESDIR}/6.04_pre3" + ) + default +} + +efimake() { + local ABI="${1}" + local libdir="$(get_libdir)" + shift + local args=( + EFIINC="${ESYSROOT}/usr/include/efi" + LIBDIR="${ESYSROOT}/usr/${libdir}" + LIBEFI="${ESYSROOT}/usr/${libdir}/libefi.a" + "${@}" + ) + emake "${args[@]}" +} + +src_compile() { + filter-lto #863722 + + local DATE=$(date -u -r NEWS +%Y%m%d) + local HEXDATE=$(printf '0x%08x' "${DATE}") + + tc-export AR CC LD OBJCOPY RANLIB + unset CFLAGS LDFLAGS + + if use bios; then + emake bios DATE="${DATE}" HEXDATE="${HEXDATE}" + fi + if use uefi; then + if use abi_x86_32; then + efimake x86 efi32 DATE="${DATE}" HEXDATE="${HEXDATE}" + fi + if use abi_x86_64; then + efimake amd64 efi64 DATE="${DATE}" HEXDATE="${HEXDATE}" + fi + fi +} + +src_install() { + local firmware=( $(usev bios) ) + if use uefi; then + use abi_x86_32 && firmware+=( efi32 ) + use abi_x86_64 && firmware+=( efi64 ) + fi + local args=( + INSTALLROOT="${ED}" + MANDIR='$(DATADIR)/man' + "${firmware[@]}" + install + ) + emake -j1 "${args[@]}" + if use bios; then + mv "${ED}"/usr/bin/keytab-{lilo,syslinux} || die + fi + einstalldocs + dostrip -x /usr/share/syslinux + + use uefi && secureboot_auto_sign --in-place +} diff --git a/sys-boot/systemd-boot/Manifest b/sys-boot/systemd-boot/Manifest deleted file mode 100644 index 209a35c38f4e..000000000000 --- a/sys-boot/systemd-boot/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST systemd-249.tar.gz 10588828 BLAKE2B f7896dea0bdec25125188b94ee84270b972649b1eb16599bed1967ced79f62dbfd1494e22362934f418823c054b342fb24dc57706b49520814beb95b6956bf27 SHA512 0810d09cc32e4aaa4425ee5b7ddf129262b061ce159cbd43571fabda48285243d8f80b566379ece9215d531b9407ee45e1e72c71935644fea31c7bca1bbf540c diff --git a/sys-boot/systemd-boot/files/249-libshared-static.patch b/sys-boot/systemd-boot/files/249-libshared-static.patch deleted file mode 100644 index c08e451af9fc..000000000000 --- a/sys-boot/systemd-boot/files/249-libshared-static.patch +++ /dev/null @@ -1,27 +0,0 @@ -From eac425295227c5deda4536fd647ecf11b643e1ca Mon Sep 17 00:00:00 2001 -From: Mike Gilbert <floppym@gentoo.org> -Date: Sun, 29 Aug 2021 09:22:33 -0400 -Subject: [PATCH] Link bootctl against libshared_static - ---- - meson.build | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/meson.build b/meson.build -index 738879eb21..96042b6906 100644 ---- a/meson.build -+++ b/meson.build -@@ -2150,9 +2150,8 @@ if conf.get('ENABLE_EFI') == 1 and conf.get('HAVE_BLKID') == 1 - 'bootctl', - 'src/boot/bootctl.c', - include_directories : includes, -- link_with : [libshared], -+ link_with : [libshared_static, libsystemd_static], - dependencies : [libblkid], -- install_rpath : rootlibexecdir, - install : true) - - public_programs += executable( --- -2.33.0 - diff --git a/sys-boot/systemd-boot/metadata.xml b/sys-boot/systemd-boot/metadata.xml deleted file mode 100644 index 100c3014623c..000000000000 --- a/sys-boot/systemd-boot/metadata.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="person"> - <email>floppym@gentoo.org</email> - <name>Mike Gilbert</name> - </maintainer> - <upstream> - <remote-id type="github">systemd/systemd</remote-id> - </upstream> -</pkgmetadata> diff --git a/sys-boot/systemd-boot/systemd-boot-249.ebuild b/sys-boot/systemd-boot/systemd-boot-249.ebuild deleted file mode 100644 index d9ed991ef5c6..000000000000 --- a/sys-boot/systemd-boot/systemd-boot-249.ebuild +++ /dev/null @@ -1,126 +0,0 @@ -# Copyright 2016-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{7..10} ) - -inherit meson python-any-r1 toolchain-funcs - -DESCRIPTION="UEFI boot manager from systemd (formerly gummiboot)" -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/" -SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> systemd-${PV}.tar.gz" - -LICENSE="GPL-2 LGPL-2.1 MIT public-domain" -SLOT="0" -KEYWORDS="~amd64 ~arm64" -IUSE="" -RESTRICT="test" - -BDEPEND=" - app-text/docbook-xml-dtd:4.2 - app-text/docbook-xml-dtd:4.5 - app-text/docbook-xsl-stylesheets - dev-libs/libxslt:0 - sys-devel/gettext - dev-util/gperf - virtual/pkgconfig - ${PYTHON_DEPS} - $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]') -" - -python_check_deps() { - has_version -b "dev-python/jinja[${PYTHON_USEDEP}]" -} - -COMMON_DEPEND=" - >=sys-apps/util-linux-2.30 -" -DEPEND="${COMMON_DEPEND} - >=sys-boot/gnu-efi-3.0.2 - sys-libs/libcap -" -RDEPEND="${COMMON_DEPEND} - !sys-apps/systemd -" - -QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*" -QA_EXECSTACK="usr/lib/systemd/boot/efi/*" - -S="${WORKDIR}/systemd-${PV}" - -PATCHES=( - "${FILESDIR}/249-libshared-static.patch" -) - -src_configure() { - # https://bugs.gentoo.org/725794 - tc-export OBJCOPY - - local emesonargs=( - -Dblkid=true - -Defi=true - -Dgnu-efi=true - -Defi-cc="$(tc-getCC)" - -Defi-ld="$(tc-getLD)" - -Defi-libdir="/usr/$(get_libdir)" - -Dsplit-usr=true - -Drootprefix="${EPREFIX:-/}" - - -Dacl=false - -Dapparmor=false - -Daudit=false - -Dbzip2=false - -Delfutils=false - -Dgcrypt=false - -Dgnutls=false - -Dkmod=false - -Dlibcryptsetup=false - -Dlibcurl=false - -Dlibidn=false - -Dlibidn2=false - -Dlibiptc=false - -Dlz4=false - -Dmicrohttpd=false - -Dpam=false - -Dqrencode=false - -Dseccomp=false - -Dselinux=false - -Dxkbcommon=false - -Dxz=false - ) - meson_src_configure -} - -set_efi_arch() { - case "$(tc-arch)" in - amd64) efi_arch=x64 ;; - arm) efi_arch=arm ;; - arm64) efi_arch=aa64 ;; - x86) efi_arch=x86 ;; - esac -} - -src_compile() { - local efi_arch - set_efi_arch - local targets=( - bootctl - man/bootctl.1 - man/kernel-install.8 - src/boot/efi/linux${efi_arch}.{efi,elf}.stub - src/boot/efi/systemd-boot${efi_arch}.efi - ) - meson_src_compile "${targets[@]}" -} - -src_install() { - local efi_arch - set_efi_arch - dobin "${BUILD_DIR}"/bootctl src/kernel-install/kernel-install - doman "${BUILD_DIR}"/man/{bootctl.1,kernel-install.8} - exeinto usr/lib/kernel/install.d - doexe src/kernel-install/*.install - insinto usr/lib/systemd/boot/efi - doins "${BUILD_DIR}"/src/boot/efi/{linux${efi_arch}.{efi,elf}.stub,systemd-boot${efi_arch}.efi} - einstalldocs -} diff --git a/sys-boot/tboot/Manifest b/sys-boot/tboot/Manifest index e82f629d1eb6..7d038e2463ba 100644 --- a/sys-boot/tboot/Manifest +++ b/sys-boot/tboot/Manifest @@ -1 +1 @@ -DIST tboot-1.9.11.tar.gz 709092 BLAKE2B 97b6ea5a09e1adbf1fbdc36516e0e80d3acc67469f297603125542aed8235e6533afb96e6c38885b87e4584392da40d9f65d00eced2b8a87a2ecf61a17c3a985 SHA512 5c2466438ad3ab95ca66fe4d460f4e6b31ccd3c6ac79221b129883df4180fce4878dd07a5f180bb79fae13b59fa90c05aeda7339159d1d950011a59645024b8a +DIST tboot-1.10.5.tar.gz 907657 BLAKE2B f9e33c512fac304eba6cbf87b497c48ff52c5efdb47103f247e04c95f8e44230671c58811d7d58753cd9c49c53d9ad77a0c5c7fb7fcce5c94d48f8fcaa9ad1f7 SHA512 01a039e5612b6cca6f7558e93673ba50edfcfbf3f65e390ac64f4aa6ae0859a314676b20d722dcd41a7a3c940473fe7982e823c800a75bd26a5e8f956528f223 diff --git a/sys-boot/tboot/files/tboot-1.10.3-disable-Werror.patch b/sys-boot/tboot/files/tboot-1.10.3-disable-Werror.patch new file mode 100644 index 000000000000..5285227713ad --- /dev/null +++ b/sys-boot/tboot/files/tboot-1.10.3-disable-Werror.patch @@ -0,0 +1,12 @@ +diff -r 5a30b6b09e77 Config.mk +--- a/Config.mk Fri Dec 10 15:35:42 2021 +0100 ++++ b/Config.mk Sun Dec 12 14:53:57 2021 -0600 +@@ -39,7 +39,7 @@ + /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;) + + +-CFLAGS_WARN = -Wall -Wformat-security -Werror -Wstrict-prototypes \ ++CFLAGS_WARN = -Wall -Wformat-security -Wstrict-prototypes \ + -Wextra -Winit-self -Wswitch-default -Wunused-parameter \ + -Wwrite-strings \ + $(call cc-option,$(CC),-Wlogical-op,) \ diff --git a/sys-boot/tboot/files/tboot-1.10.3-disable-strip.patch b/sys-boot/tboot/files/tboot-1.10.3-disable-strip.patch new file mode 100644 index 000000000000..c7a7fd04c7b5 --- /dev/null +++ b/sys-boot/tboot/files/tboot-1.10.3-disable-strip.patch @@ -0,0 +1,14 @@ +diff -r 5a30b6b09e77 Config.mk +--- a/Config.mk Fri Dec 10 15:35:42 2021 +0100 ++++ b/Config.mk Sun Dec 12 14:52:19 2021 -0600 +@@ -56,10 +56,6 @@ + OBJCOPY ?= objcopy + OBJDUMP ?= objdump + +-ifeq ($(debug),n) +-INSTALL_STRIP ?= -s +-endif +- + INSTALL ?= install + INSTALL_DIR = $(INSTALL) -d -m0755 -p + INSTALL_DATA = $(INSTALL) -m0644 -p diff --git a/sys-boot/tboot/files/tboot-1.10.3-dont-call-toolchain-directly.patch b/sys-boot/tboot/files/tboot-1.10.3-dont-call-toolchain-directly.patch new file mode 100644 index 000000000000..29840e9113e4 --- /dev/null +++ b/sys-boot/tboot/files/tboot-1.10.3-dont-call-toolchain-directly.patch @@ -0,0 +1,24 @@ +diff -r 5a30b6b09e77 safestringlib/makefile +--- a/safestringlib/makefile Fri Dec 10 15:35:42 2021 +0100 ++++ b/safestringlib/makefile Tue Dec 21 12:40:01 2021 -0600 +@@ -29,7 +29,7 @@ + $(CC) $(LDFLAGS) -c -o $@ $< $(CFLAGS) + + libsafestring.a: $(OBJ) +- ar rcs $@ $^ ++ $(AR) rcs $@ $^ + + + _TESTFUNCS = Safe_String_UnitTestMain.c test_strcmp_s.c test_strnlen_s.c test_memcmp16_s.c test_strcpyfldin_s.c test_strnterminate_s.c test_memcmp32_s.c test_strcpyfldout_s.c test_strpbrk_s.c test_memcmp_s.c test_strcpyfld_s.c test_strprefix_s.c test_memcpy16_s.c test_strcpy_s.c test_strremovews_s.c test_memcpy32_s.c test_strcspn_s.c test_strspn_s.c test_memcpy_s.c test_strfirstchar_s.c test_strstr_s.c test_memmove16_s.c test_strfirstdiff_s.c test_strtok_s.c test_memmove32_s.c test_strfirstsame_s.c test_strtolowercase_s.c test_memmove_s.c test_strisalphanumeric_s.c test_strtouppercase_s.c test_memset16_s.c test_strisascii_s.c test_strzero_s.c test_memset32_s.c test_strisdigit_s.c test_wcpcpy_s.c test_memset_s.c test_strishex_s.c test_wcscat_s.c test_memzero16_s.c test_strislowercase_s.c test_wcscpy_s.c test_memzero32_s.c test_strismixed_s.c test_wcsncat_s.c test_memzero_s.c test_strispassword_s.c test_wcsncpy_s.c test_strisuppercase_s.c test_wcsnlen_s.c test_stpcpy_s.c test_strlastchar_s.c test_wmemcmp_s.c test_stpncpy_s.c test_strlastdiff_s.c test_wmemcpy_s.c test_strcasecmp_s.c test_strlastsame_s.c test_wmemmove_s.c test_strcasestr_s.c test_strljustify_s.c test_wmemset_s.c test_strcat_s.c test_strncat_s.c test_strcmpfld_s.c test_strncpy_s.c +diff -r 5a30b6b09e77 tboot/Makefile +--- a/tboot/Makefile Fri Dec 10 15:35:42 2021 +0100 ++++ b/tboot/Makefile Tue Dec 21 12:40:01 2021 -0600 +@@ -34,7 +34,7 @@ + TARGET_LDS := $(CURDIR)/common/tboot.lds + + $(TARGET).strip : $(TARGET) +- strip $< -o $@ ++ $(STRIP) $< -o $@ + + $(TARGET).gz : $(TARGET).strip + gzip -n -f -9 < $< > $@ diff --git a/sys-boot/tboot/files/tboot-1.10.5-fix-pconf-element.patch b/sys-boot/tboot/files/tboot-1.10.5-fix-pconf-element.patch new file mode 100644 index 000000000000..a3b5138c5de0 --- /dev/null +++ b/sys-boot/tboot/files/tboot-1.10.5-fix-pconf-element.patch @@ -0,0 +1,21 @@ +# HG changeset patch +# User Christopher Byrne <salah.coronya@gmail.com> +# Date 1645847383 21600 +# Fri Feb 25 21:49:43 2022 -0600 +# Node ID bbf8373779e4653be2e2cfbaf14e1abb1ae42af4 +# Parent 5941842afb661f0e78085cb1317781d362583a38 +lcptools-v2/pconf_legacy.c: Add missing BE size_of_pcrs to hash buffer + +Signed-of-by: Christopher Byrne <salah.coronya@gmail.com> + +diff --git a/lcptools-v2/pconf_legacy.c b/lcptools-v2/pconf_legacy.c +--- a/lcptools-v2/pconf_legacy.c ++++ b/lcptools-v2/pconf_legacy.c +@@ -241,6 +241,7 @@ + ERROR("Error: failed to allocate buffer for composite digest.\n"); + return false; + } ++ buff->size_of_pcrs = htonl(no_of_pcrs * SHA1_DIGEST_SIZE); + memcpy_s( + &buff->pcr_selection, + sizeof buff->pcr_selection, diff --git a/sys-boot/tboot/files/tboot-1.9.11-genkernel-path.patch b/sys-boot/tboot/files/tboot-1.9.11-genkernel-path.patch deleted file mode 100644 index b2459816068b..000000000000 --- a/sys-boot/tboot/files/tboot-1.9.11-genkernel-path.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff -r 9998b2fb83fd tboot/20_linux_tboot ---- a/tboot/20_linux_tboot Wed Apr 10 11:47:06 2019 +0200 -+++ b/tboot/20_linux_tboot Tue Jul 23 22:42:00 2019 -0500 -@@ -173,7 +173,16 @@ - EOF - } - --linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do -+machine=`uname -m` -+case "$machine" in -+ i?86) GENKERNEL_ARCH="x86" ;; -+ mips|mips64) GENKERNEL_ARCH="mips" ;; -+ mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;; -+ arm*) GENKERNEL_ARCH="arm" ;; -+ *) GENKERNEL_ARCH="$machine" ;; -+esac -+ -+linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do - basename=$(basename $i) - version=$(echo $basename | sed -e "s,^[^0-9]*-,,g") - if grub_file_is_not_garbage "$i" && grep -qx "CONFIG_INTEL_TXT=y" /boot/config-${version} 2> /dev/null ; then echo -n "$i " ; fi -@@ -219,7 +228,9 @@ - "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ - "initrd-${alt_version}" "initramfs-${alt_version}.img" \ - "initramfs-genkernel-${version}" \ -- "initramfs-genkernel-${alt_version}"; do -+ "initramfs-genkernel-${alt_version}" \ -+ "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ -+ "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do - if test -e "${dirname}/${i}" ; then - initrd="$i" - break -diff -r 9998b2fb83fd tboot/20_linux_xen_tboot ---- a/tboot/20_linux_xen_tboot Wed Apr 10 11:47:06 2019 +0200 -+++ b/tboot/20_linux_xen_tboot Tue Jul 23 22:42:00 2019 -0500 -@@ -167,6 +167,15 @@ - EOF - } - -+machine=`uname -m` -+case "$machine" in -+ i?86) GENKERNEL_ARCH="x86" ;; -+ mips|mips64) GENKERNEL_ARCH="mips" ;; -+ mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;; -+ arm*) GENKERNEL_ARCH="arm" ;; -+ *) GENKERNEL_ARCH="$machine" ;; -+esac -+ - linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do - if grub_file_is_not_garbage "$i"; then - basename=$(basename $i) -@@ -234,7 +243,9 @@ - "initrd-${version}" "initrd.img-${alt_version}" \ - "initrd-${alt_version}.img" "initrd-${alt_version}" \ - "initramfs-genkernel-${version}" \ -- "initramfs-genkernel-${alt_version}" ; do -+ "initramfs-genkernel-${alt_version}" \ -+ "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ -+ "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do - if test -e "${dirname}/${i}" ; then - initrd="$i" - break diff --git a/sys-boot/tboot/tboot-1.9.11-r1.ebuild b/sys-boot/tboot/tboot-1.10.5.ebuild index 64a972787d85..c36283eeb34a 100644 --- a/sys-boot/tboot/tboot-1.9.11-r1.ebuild +++ b/sys-boot/tboot/tboot-1.10.5.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit flag-o-matic mount-boot +inherit mount-boot toolchain-funcs DESCRIPTION="Performs a measured and verified boot using Intel Trusted Execution Technology" HOMEPAGE="https://sourceforge.net/projects/tboot/" @@ -17,21 +17,30 @@ IUSE="custom-cflags selinux" # requires patching the kernel src RESTRICT="test" -DEPEND="app-crypt/trousers -app-crypt/tpm-tools -dev-libs/openssl:0=[-bindist(-)] -" +DEPEND="dev-libs/openssl:0=[-bindist(-)]" RDEPEND="${DEPEND} -sys-boot/grub:2 -selinux? ( sec-policy/selinux-tboot )" - -DOCS=( README COPYING CHANGELOG ) -PATCHES=( "${FILESDIR}/${PN}-1.9.11-genkernel-path.patch" ) + sys-boot/grub:2 + selinux? ( sec-policy/selinux-tboot )" + +DOCS=( README.md COPYING CHANGELOG ) +PATCHES=( "${FILESDIR}/${PN}-1.10.3-disable-Werror.patch" + "${FILESDIR}/${PN}-1.10.3-disable-strip.patch" + "${FILESDIR}/${PN}-1.10.3-dont-call-toolchain-directly.patch" + "${FILESDIR}/${PN}-1.10.5-fix-pconf-element.patch" ) + +pkg_setup() { + if tc-is-clang; then + eerror "tboot is a freestanding application that uses gcc" + eerror "extensions in fundemental ways, include VLAIS" + eerror "(Variable Length Arrays in Structs) and will not" + eerror "compile with clang witout upstream action" + die "Cannot compile with clang. See bug #832020" + fi +} -src_prepare() { - sed -i 's/ -Werror//g' Config.mk || die - sed -i 's/^INSTALL_STRIP = -s$//' Config.mk || die # QA Errors +src_configure() { + tc-export AS LD CC CPP AR RANLIB NM OBJCOPY OBJDUMP STRIP default } @@ -52,15 +61,15 @@ src_install() { emake DISTDIR="${D}" install dodoc "${DOCS[@]}" - dodoc docs/*.txt lcptools/*.pdf + dodoc docs/*.{txt,md} - cd "${ED}" + cd "${ED}" || die mkdir -p usr/lib/tboot/ || die mv boot usr/lib/tboot/ || die } pkg_postinst() { - cp "${ROOT}/usr/lib/tboot/boot/*" "${ROOT}/boot/" || die + cp "${ROOT}/usr/lib/tboot/boot/"* "${ROOT}/boot/" || die ewarn "Please remember to download the SINIT AC Module relevant" ewarn "for your platform from:" diff --git a/sys-boot/uefi-mkconfig/Manifest b/sys-boot/uefi-mkconfig/Manifest new file mode 100644 index 000000000000..a88d8a60c4ff --- /dev/null +++ b/sys-boot/uefi-mkconfig/Manifest @@ -0,0 +1,2 @@ +DIST uefi-mkconfig-1.4.tar.gz 7844 BLAKE2B 4266c8c934f665c85d54699ebdd11648692b1eff2e0d4111de8329e01dee3342c760d772da27a8862e0427fcbecb38a9c0499ee482aa1ee0dcf72d0f30be97ef SHA512 47e096571899c18decd24c65df9bdd9da964e1e47120504d8c9761b7c2b80172b17a9259f229c267c95d7ee4ac24a1e79a3d0f13d15fc2effee7fcee8b1ce3ea +DIST uefi-mkconfig-1.5.tar.gz 8299 BLAKE2B f06ec90f298f2dcc5c3001f603b50c7521b5568272ba263b87f19ed45f5d10aec162b8ad909c9c5bbe72638559b9346f586063e7e25c33c7b41b3fe881bab35f SHA512 244d280a0b2b8e197b9d9a46e4db729efb5d568a0907c538aa1e27e0491eb12e2105bfc6d7b52c2a06f7fd53f7c5d339d680124a9dbfb5bd451b8659ea23752f diff --git a/sys-boot/uefi-mkconfig/metadata.xml b/sys-boot/uefi-mkconfig/metadata.xml new file mode 100644 index 000000000000..449694d29242 --- /dev/null +++ b/sys-boot/uefi-mkconfig/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM 'https://www.gentoo.org/dtd/metadata.dtd'> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>jakub@gdos.sk</email> + <name>Jakub Gajdoš</name> + </maintainer> + <maintainer type="person" proxied="proxy"> + <email>andrewammerlaan@gentoo.org</email> + <name>Andrew Ammerlaan</name> + </maintainer> + <upstream> + <remote-id type="github">Biosias/uefi-mkconfig</remote-id> + <bugs-to>https://github.com/Biosias/uefi-mkconfig/issues</bugs-to> + </upstream> +</pkgmetadata> diff --git a/sys-boot/uefi-mkconfig/uefi-mkconfig-1.4.ebuild b/sys-boot/uefi-mkconfig/uefi-mkconfig-1.4.ebuild new file mode 100644 index 000000000000..8e426c062c9c --- /dev/null +++ b/sys-boot/uefi-mkconfig/uefi-mkconfig-1.4.ebuild @@ -0,0 +1,35 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-info optfeature + +DESCRIPTION="Automatic management of UEFI entries" +HOMEPAGE="https://github.com/Biosias/uefi-mkconfig" +SRC_URI="https://github.com/Biosias/uefi-mkconfig/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" + +RDEPEND=" + app-shells/bash + sys-boot/efibootmgr +" + +CONFIG_CHECK="EFI_STUB" + +src_install() { + dobin uefi-mkconfig + einstalldocs +} + +pkg_postinst() { + elog "uefi-mkconfig: Automatic management of UEFI entries" + elog "Run uefi-mkconfig while having all efi partitions mounted" + elog "Please use with care, this package was tested on a limited number of machines" + elog "Some problems may arise due to different implementations of UEFI" + elog + optfeature "Add UEFI entries on kernel installation " \ "sys-kernel/installkernel[-systemd,efistub]" +} diff --git a/sys-boot/uefi-mkconfig/uefi-mkconfig-1.5.ebuild b/sys-boot/uefi-mkconfig/uefi-mkconfig-1.5.ebuild new file mode 100644 index 000000000000..8e426c062c9c --- /dev/null +++ b/sys-boot/uefi-mkconfig/uefi-mkconfig-1.5.ebuild @@ -0,0 +1,35 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-info optfeature + +DESCRIPTION="Automatic management of UEFI entries" +HOMEPAGE="https://github.com/Biosias/uefi-mkconfig" +SRC_URI="https://github.com/Biosias/uefi-mkconfig/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" + +RDEPEND=" + app-shells/bash + sys-boot/efibootmgr +" + +CONFIG_CHECK="EFI_STUB" + +src_install() { + dobin uefi-mkconfig + einstalldocs +} + +pkg_postinst() { + elog "uefi-mkconfig: Automatic management of UEFI entries" + elog "Run uefi-mkconfig while having all efi partitions mounted" + elog "Please use with care, this package was tested on a limited number of machines" + elog "Some problems may arise due to different implementations of UEFI" + elog + optfeature "Add UEFI entries on kernel installation " \ "sys-kernel/installkernel[-systemd,efistub]" +} diff --git a/sys-boot/unetbootin/Manifest b/sys-boot/unetbootin/Manifest index fd507164f4dd..bd4ee2186492 100644 --- a/sys-boot/unetbootin/Manifest +++ b/sys-boot/unetbootin/Manifest @@ -1 +1 @@ -DIST unetbootin-700.tar.gz 16694955 BLAKE2B d8c00b56c5ae2daac696b62ef207c62dc91f67699c8823e2a751eff536d03fd0a50a931e9a4598b05d99be968b7e895ab521f605b4e0080d591a34c9e67f685e SHA512 0d1b23dddf0e0e3eca81f8ef07fe375f0867ee3fa631c3a3cfe33a846b8d704b36e0efe4c947d7c68e5c1bff370ba87c34aa52c5bf8fc414cd89777f9f1858b7 +DIST unetbootin-702.tar.gz 16694922 BLAKE2B 4205b8e5a64ecbd95e3b5f3492a01333691768547e6dbe5f954982dfa35d0794bbf8b4bc7002ff62b13675e9beaa25caf83d999489c9fabd36acc8df171e5d05 SHA512 4794a1c5481a082ab589c213156501697a9c2262102e1d0ca882a6c757d388d0ca768ed9acff29aac89f17a4842a93ab25ecbfceaafa27ea91d578e16fabe153 diff --git a/sys-boot/unetbootin/unetbootin-700.ebuild b/sys-boot/unetbootin/unetbootin-702.ebuild index 59c833f0e6d9..400dd6cb5539 100644 --- a/sys-boot/unetbootin/unetbootin-700.ebuild +++ b/sys-boot/unetbootin/unetbootin-702.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit desktop flag-o-matic qmake-utils xdg-utils toolchain-funcs diff --git a/sys-boot/vboot-utils/Manifest b/sys-boot/vboot-utils/Manifest index 94f473c34d7f..3e0e45deb3f2 100644 --- a/sys-boot/vboot-utils/Manifest +++ b/sys-boot/vboot-utils/Manifest @@ -1,2 +1 @@ -DIST vboot-utils-72_p20181229.tar.xz 18489004 BLAKE2B 444eb0bc2c571ad79d26d473da724016d6d041207beaae161f6c1155768ff9d0b1c8b7b070b828083cc1396266cc77175a75e8067ce22613c75b4d77780dda75 SHA512 41df034dc5498bcbec0d49a472331ceb2fbc2eb3b4173d5c56e920d65ae485382b3d811e5f2c13cf45a1b05a5d6a24197924fa1c76ada9c3aac14fa3c4c363fe DIST vboot-utils-80_p20200108.tar.xz 18448212 BLAKE2B f7e375133fb6dc90def1e22c42c7511a3b649c34d067a447f44fb99c1ec37a73d034837c2212e5d6ad368a4f4b011c8cb9eb479e81db4a52b1160cda99382a77 SHA512 077d137d8fe89f35b6f7ec6408b2e9fc7a28765b0987646c1964e6e0c039e359711ab79958c45ee555a0fe810997217225d072a7f1011b1c73c4aefb4e57fcc1 diff --git a/sys-boot/vboot-utils/metadata.xml b/sys-boot/vboot-utils/metadata.xml index 2fa5d5a2afeb..9aecb1a77a6d 100644 --- a/sys-boot/vboot-utils/metadata.xml +++ b/sys-boot/vboot-utils/metadata.xml @@ -10,6 +10,6 @@ <email>zmedico@gentoo.org</email> </maintainer> <use> - <flag name="libzip">Use dev-libs/libzip.</flag> + <flag name="libzip">Use <pkg>dev-libs/libzip</pkg>.</flag> </use> </pkgmetadata> diff --git a/sys-boot/vboot-utils/vboot-utils-72_p20181229-r1.ebuild b/sys-boot/vboot-utils/vboot-utils-72_p20181229-r1.ebuild deleted file mode 100644 index caef3af6399f..000000000000 --- a/sys-boot/vboot-utils/vboot-utils-72_p20181229-r1.ebuild +++ /dev/null @@ -1,99 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit toolchain-funcs - -# This is the latest commit in the latest branch. -GIT_SHA1="a32c930e8c46424a3bba3c296fd78b3e60f50aeb" - -DESCRIPTION="Chrome OS verified boot tools" -HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform/vboot_reference/ http://dev.chromium.org/chromium-os/chromiumos-design-docs/verified-boot" -# Can't use gitiles directly until b/19710536 is fixed. -#SRC_URI="https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+archive/${GIT_SHA1}.tar.gz -> ${P}.tar.gz" -SRC_URI="mirror://gentoo/${P}.tar.xz - https://dev.gentoo.org/~zmedico/dist/${P}.tar.xz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86" -IUSE="minimal static" - -LIB_DEPEND=" - dev-libs/libyaml:=[static-libs(+)] - app-arch/xz-utils:=[static-libs(+)]" -LIB_DEPEND_MINIMAL=" - dev-libs/openssl:0=[static-libs(+)] - sys-apps/util-linux:=[static-libs(+)] - dev-libs/libzip:=[static-libs(+)]" -RDEPEND="!static? ( - ${LIB_DEPEND_MINIMAL//\[static-libs(+)]} - !minimal? ( ${LIB_DEPEND//\[static-libs(+)]} ) - ) - elibc_musl? ( sys-libs/fts-standalone )" -DEPEND="${RDEPEND} - static? ( - ${LIB_DEPEND_MINIMAL} - !minimal? ( ${LIB_DEPEND} ) - ) - app-crypt/trousers - virtual/pkgconfig" - -S=${WORKDIR} - -src_prepare() { - default - sed -i \ - -e 's:${DESTDIR}/\(bin\|${LIBDIR}\):${DESTDIR}/usr/\1:g' \ - -e 's:${DESTDIR}/default:${DESTDIR}/etc/default:g' \ - -e 's:${TEST_INSTALL_DIR}/bin:${TEST_INSTALL_DIR}/usr/bin:' \ - -e '/cgpt -D 358400/d' \ - Makefile || die - sed -e 's:^BIN_DIR=${BUILD_DIR}/install_for_test/bin:BIN_DIR=${BUILD_DIR}/install_for_test/usr/bin:' \ - -i tests/common.sh || die - sed -e "s:/mnt/host/source/src/platform/vboot_reference:${S}:" \ - -i tests/futility/expect_output/* || die -} - -_emake() { - local arch=$(tc-arch) - emake \ - V=1 \ - QEMU_ARCH= \ - ARCH=${arch} \ - HOST_ARCH=${arch} \ - LIBDIR="$(get_libdir)" \ - DEBUG_FLAGS= \ - WERROR= \ - MINIMAL=$(usev minimal) \ - STATIC=$(usev static) \ - $(usex elibc_musl HAVE_MUSL=1 "") \ - "$@" -} - -src_compile() { - tc-export CC AR CXX PKG_CONFIG - _emake TEST_BINS= all -} - -src_test() { - _emake runtests -} - -src_install() { - _emake DESTDIR="${ED}" install - - insinto /usr/share/vboot/devkeys - doins tests/devkeys/* - - insinto /usr/include/vboot - doins host/include/* \ - firmware/include/gpt.h \ - firmware/include/tlcl.h \ - firmware/include/tss_constants.h - - dolib.a build/libvboot_host.a - - dodoc README -} diff --git a/sys-boot/vboot-utils/vboot-utils-80_p20200108.ebuild b/sys-boot/vboot-utils/vboot-utils-80_p20200108.ebuild index 67f272d57fa0..e409d0298875 100644 --- a/sys-boot/vboot-utils/vboot-utils-80_p20200108.ebuild +++ b/sys-boot/vboot-utils/vboot-utils-80_p20200108.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit toolchain-funcs +inherit flag-o-matic toolchain-funcs # Can't use gitiles directly until b/19710536 is fixed. # This is the name of the latest release branch. @@ -69,6 +69,7 @@ src_prepare() { } _emake() { + local arch=$(tc-arch) emake \ V=1 \ @@ -85,6 +86,10 @@ _emake() { } src_compile() { + # -Werror=lto-type-mismatch in tests + # https://bugs.gentoo.org/880175 + filter-lto + tc-export CC AR CXX PKG_CONFIG _emake FUZZ_TEST_BINS= TEST_BINS= all } diff --git a/sys-boot/woeusb/Manifest b/sys-boot/woeusb/Manifest index df150530eef6..8af700a42c96 100644 --- a/sys-boot/woeusb/Manifest +++ b/sys-boot/woeusb/Manifest @@ -1,2 +1,3 @@ DIST woeusb-3.3.1.tar.gz 386399 BLAKE2B 1423ecca39018c674b0eea36de732f54cfcdd14b8cc465e6d3c0639192cbd8355436b7a39ba453b19fa6f1c5b1f6938ef12f49710bc2a4af0f2eaed967e03ce7 SHA512 e3460efabaee199eb5ffc73ca99fe2d9141ed3a5f72acd2f8910b093b2b3a93928ee4eeb27d634293448f036101d8bf24aef65dc338c80e6e3e1738004594d52 DIST woeusb-5.1.2.tar.gz 160660 BLAKE2B 86fd0581ea2524d61ef48d9adf633d350ae214842ee8f26c2937f312fce864fa188fb40dd35e8e9b15c3eef46869f0099ee005e3c49fc219486d006357f74f09 SHA512 ee1341cdcaf203e4c5007e3ac19deb0b3bbee9e7eeb5ca9a74742d107b1b3e77e5b938d2f7de9ce23b7fba51d6a266ea26fb221300613c1c4c8d0cd4f8299f8b +DIST woeusb-5.2.4.tar.gz 163043 BLAKE2B 101175b86d0798009a32b705bfd8e63597dd9a36dff3ce0afcdf72e26d3447ee898fdbf7c87b5f95bffde31736d5fb8c719484a47bf3c1bc0d91ee68a6a05573 SHA512 e44087ef4f0c69cb8378c6e398b3ae5e59f7f111442b3ef2d65f4bbf2dacab862c753f7afc10c9dbbf0541476ada218da3c0210cb569bb7edec606689a93ec0c diff --git a/sys-boot/woeusb/metadata.xml b/sys-boot/woeusb/metadata.xml index 8c8afcf15383..79a6fbb9aea2 100644 --- a/sys-boot/woeusb/metadata.xml +++ b/sys-boot/woeusb/metadata.xml @@ -1,7 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <!-- maintainer-needed --> + <maintainer type="person" proxied="yes"> + <email>petrus.zy.07@gmail.com</email> + <name>Petrus Zhao</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> <upstream> <remote-id type="github">WoeUSB/WoeUSB</remote-id> </upstream> diff --git a/sys-boot/woeusb/woeusb-5.1.2-r1.ebuild b/sys-boot/woeusb/woeusb-5.1.2-r1.ebuild index 4f1d25c96d02..880f376f6148 100644 --- a/sys-boot/woeusb/woeusb-5.1.2-r1.ebuild +++ b/sys-boot/woeusb/woeusb-5.1.2-r1.ebuild @@ -10,7 +10,7 @@ S="${WORKDIR}/WoeUSB-${PV}" LICENSE="CC-BY-SA-4.0 GPL-3+" SLOT="0" -KEYWORDS="~amd64 ~x86" +KEYWORDS="amd64 x86" RDEPEND=" app-arch/wimlib diff --git a/sys-boot/woeusb/woeusb-5.2.4.ebuild b/sys-boot/woeusb/woeusb-5.2.4.ebuild new file mode 100644 index 000000000000..84a8f2131b58 --- /dev/null +++ b/sys-boot/woeusb/woeusb-5.2.4.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Creates windows installer on usb media from an iso image" +HOMEPAGE="https://github.com/WoeUSB/WoeUSB" +SRC_URI="https://github.com/WoeUSB/WoeUSB/archive/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/WoeUSB-${PV}" + +LICENSE="CC-BY-SA-4.0 GPL-3+" +SLOT="0" +KEYWORDS="amd64 x86" + +RDEPEND=" + app-arch/wimlib + sys-apps/util-linux + sys-block/parted + sys-boot/grub:2[grub_platforms_pc] + sys-fs/dosfstools + sys-fs/ntfs3g" +DEPEND="${RDEPEND}" + +src_prepare() { + default + + sed -i "s/@@WOEUSB_VERSION@@/${PV}/" sbin/${PN} share/man/man1/${PN}.1 || die +} + +src_install() { + dosbin sbin/${PN} + doman share/man/man1/${PN}.1 + + einstalldocs +} diff --git a/sys-boot/yaboot-static/metadata.xml b/sys-boot/yaboot-static/metadata.xml index 16e1b863e296..675be6dd398c 100644 --- a/sys-boot/yaboot-static/metadata.xml +++ b/sys-boot/yaboot-static/metadata.xml @@ -3,6 +3,6 @@ <pkgmetadata> <maintainer type="project"> <email>ppc@gentoo.org</email> - <name>Gentoo Linux PowerPC Development</name> + <name>PowerPC architecture team</name> </maintainer> </pkgmetadata> diff --git a/sys-boot/yaboot/metadata.xml b/sys-boot/yaboot/metadata.xml index 16e1b863e296..675be6dd398c 100644 --- a/sys-boot/yaboot/metadata.xml +++ b/sys-boot/yaboot/metadata.xml @@ -3,6 +3,6 @@ <pkgmetadata> <maintainer type="project"> <email>ppc@gentoo.org</email> - <name>Gentoo Linux PowerPC Development</name> + <name>PowerPC architecture team</name> </maintainer> </pkgmetadata> |