From 12de753360d109e574fa0d0bf23c624d4db5451f Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Thu, 20 Oct 2022 16:33:38 +0200 Subject: [PATCH 01/38] app-emulation/qemu: Sync with Gentoo It's from Gentoo commit f91f43c34d93c3d9ea4fb703e1bd29531b1fe563. --- .../app-emulation/qemu/Manifest | 7 +- .../qemu-2.11.1-capstone_include_path.patch | 11 - ...6.2.0-also-build-virtfs-proxy-helper.patch | 34 - ....0-glibc-2.35-rseq-seccomp-virtiofsd.patch | 61 -- .../files/qemu-6.2.0-user-SLIC-crash.patch | 173 ---- ....1.0-also-build-virtfs-proxy-helper.patch} | 10 +- .../qemu-7.1.0-capstone-include-path.patch | 31 + .../qemu/files/qemu-7.1.0-faccessat2.patch | 78 ++ .../qemu/files/qemu-7.1.0-loong-stat.patch | 98 ++ .../files/qemu-7.1.0-mips-n32-syscalls.patch | 94 ++ ...strings.patch => qemu-7.1.0-strings.patch} | 8 +- .../app-emulation/qemu/metadata.xml | 25 +- .../app-emulation/qemu/qemu-6.2.0.ebuild | 913 ------------------ ...u-6.2.0-r3.ebuild => qemu-7.1.0-r2.ebuild} | 197 ++-- ...qemu-6.2.0-r4.ebuild => qemu-7.1.0.ebuild} | 198 ++-- ...u-7.0.0-r1.ebuild => qemu-7.2.0-r1.ebuild} | 171 ++-- ...emu-7.0.0_rc4.ebuild => qemu-7.2.0.ebuild} | 175 ++-- .../app-emulation/qemu/qemu-9999.ebuild | 178 ++-- 18 files changed, 911 insertions(+), 1551 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-2.11.1-capstone_include_path.patch delete mode 100644 sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.2.0-also-build-virtfs-proxy-helper.patch delete mode 100644 sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.2.0-glibc-2.35-rseq-seccomp-virtiofsd.patch delete mode 100644 sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.2.0-user-SLIC-crash.patch rename sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/{qemu-7.0.0-also-build-virtfs-proxy-helper.patch => qemu-7.1.0-also-build-virtfs-proxy-helper.patch} (77%) create mode 100644 sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-capstone-include-path.patch create mode 100644 sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-faccessat2.patch create mode 100644 sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-loong-stat.patch create mode 100644 sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-mips-n32-syscalls.patch rename sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/{qemu-6.1.0-strings.patch => qemu-7.1.0-strings.patch} (80%) delete mode 100644 sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-6.2.0.ebuild rename sdk_container/src/third_party/portage-stable/app-emulation/qemu/{qemu-6.2.0-r3.ebuild => qemu-7.1.0-r2.ebuild} (85%) rename sdk_container/src/third_party/portage-stable/app-emulation/qemu/{qemu-6.2.0-r4.ebuild => qemu-7.1.0.ebuild} (83%) rename sdk_container/src/third_party/portage-stable/app-emulation/qemu/{qemu-7.0.0-r1.ebuild => qemu-7.2.0-r1.ebuild} (86%) rename sdk_container/src/third_party/portage-stable/app-emulation/qemu/{qemu-7.0.0_rc4.ebuild => qemu-7.2.0.ebuild} (86%) diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/Manifest b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/Manifest index df41329778..12a458ea48 100644 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/Manifest +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/Manifest @@ -1,3 +1,4 @@ -DIST qemu-6.2.0.tar.xz 115667324 BLAKE2B 3f2f02e5c36113df6231a9474c6d5db774e541312173813c28f578d669a51f391695d364dc806f5906d9e3c2796bb20b2606fcd46a247eb751ea517de9d7ce15 SHA512 e9f8231c9e1cfcc41cb47f10a55d63f6b8aee307af00cf6acf64acb7aa4f49fa7e9d6330703a2abea15d8b7bbaba7d3cb08c83edd98d82642367b527df730817 -DIST qemu-7.0.0-rc4.tar.xz 125126604 BLAKE2B e1614daf71ff2625cdd8307812d6dfc4103c7c8a981b49fdda7409b8b4749e2d8354d3f8e903791100e966744485148c9b70ff046c0f8c2b1259a4997a245248 SHA512 ca0e8f5f1608b36f8ad8d9e6aeeb00e07af23e59ffecbda84c4c34bbe686a53c481e26bcedd13165363057cab063dcda7e5191dd5aff2798fde5be711c6dd2ff -DIST qemu-7.0.0.tar.xz 125117636 BLAKE2B ceda6d9f1a585298bd49fed61e8bb35f0064ad8388a9f979c8bd68a38bfe1a47c5bb055e5f74f970c2c440957042b9de4a861524120040c56e4cd8b56c5cfb68 SHA512 44ecd10c018a3763e1bc87d1d35b98890d0d5636acd69fe9b5cadf5024d5af6a31684d60cbe1c3370e02986434c1fb0ad99224e0e6f6fe7eda169992508157b1 +DIST qemu-7.1.0-docs.tar.xz 2016780 BLAKE2B 1b84361fe58d504ab740a0b805a25d02f497ca776e7251a99f0e98e3720d1a2029b7a171f9d79dd128ba17a82c72d497e09baa1a4b2f192ba390f0f3b1950792 SHA512 7a328303b8af0ab63aa1f0fe07a121d3ca459d00fca817412e645416af795930dbea0a3e60f4ca006a74d1672e84fa4e626e4d83918e0b685b601043d0d8159e +DIST qemu-7.1.0.tar.xz 121833004 BLAKE2B e05f91ce4993c7591a2df08b5fb017f8b8ec2141ab7bfd55d14730ea6b793ac1091de539992058392a5522d4e58beee92a87752707be58e3619b8213ef9f35bf SHA512 c60c5ff8ec99b7552e485768908920658fdd8035ff7a6fa370fb6881957dc8b7e5f18ff1a8f49bd6aa22909ede2a7c084986d8244f12074ccd33ebe40a0c411f +DIST qemu-7.2.0-docs.tar.xz 1984184 BLAKE2B 103900fb7903ed8d75f7f012bf61fa2d6fce345b657c851d0437c3384f5735bd1cfd3129320683ea7846ea0b0940e5af5b2663c9320f12fee74b058523a8ea06 SHA512 a7edd448982865e07533c300d3e44a8b50cefbdde1982b73c24d0b2aa74315439252c59b634c75de312860874c7b06c75aa72629da681b5105f28ee936794585 +DIST qemu-7.2.0.tar.xz 122408576 BLAKE2B 415ff621356c59f88b29cfe3ef5db1e282b26bbafbee3d535477c6125ccb060ec9762d9e3ab9f70ce5478804dca0a46a59bcf12c112a2462029a93e578e61530 SHA512 f3cfa00da739ba819a218d7e6e95c77fb79a8e0f487b024ddd281602e785249b81144595e3f8c746c32a4f5c4d1a88c6aebae3c162603edfbb50ae3722d7ed13 diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-2.11.1-capstone_include_path.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-2.11.1-capstone_include_path.patch deleted file mode 100644 index d79570ebb8..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-2.11.1-capstone_include_path.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- qemu-2.11.1/include/disas/capstone.h 2018-02-14 22:53:22.000000000 +0100 -+++ qemu-2.11.1/include/disas/capstone.h 2018-02-17 20:12:12.754703951 +0100 -@@ -3,7 +3,7 @@ - - #ifdef CONFIG_CAPSTONE - --#include -+#include - - #else - diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.2.0-also-build-virtfs-proxy-helper.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.2.0-also-build-virtfs-proxy-helper.patch deleted file mode 100644 index af22080206..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.2.0-also-build-virtfs-proxy-helper.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 42e53a0aadb76dfa7c11cd3b14eb4a41efba9bbe Mon Sep 17 00:00:00 2001 -From: Matthias Maier -Date: Tue, 11 Jan 2022 07:20:31 -0600 -Subject: [PATCH] also build virtfs-proxy-helper - -The Gentoo ebuild splits the qemu build into a softmmu, user and tool -phase in order to be able to build and link some of the qemu emulators -statically. This unfortunately has the consequence that we never -configure with "have_virtfs" and "have_tools" at the same time. - -As a workaround, simply build the virtfs userland unconditionally. After -all, it is a tiny executable ---- - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index fbe856700..d6918b04c 100644 ---- a/meson.build -+++ b/meson.build -@@ -1390,7 +1390,7 @@ have_virtfs = (targetos == 'linux' and - libattr.found() and - libcap_ng.found()) - --have_virtfs_proxy_helper = have_virtfs and have_tools -+have_virtfs_proxy_helper = have_tools and libcap_ng.found() - - - - if get_option('virtfs').enabled() - if not have_virtfs --- -2.34.1 - diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.2.0-glibc-2.35-rseq-seccomp-virtiofsd.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.2.0-glibc-2.35-rseq-seccomp-virtiofsd.patch deleted file mode 100644 index 156d94b0f5..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.2.0-glibc-2.35-rseq-seccomp-virtiofsd.patch +++ /dev/null @@ -1,61 +0,0 @@ -https://gitlab.com/qemu/qemu/-/commit/7b223e38603de3a75602e14914d26f9d4baf52eb.patch -https://bugs.gentoo.org/836300 - -From 7b223e38603de3a75602e14914d26f9d4baf52eb Mon Sep 17 00:00:00 2001 -From: Christian Ehrhardt -Date: Wed, 9 Feb 2022 12:14:56 +0100 -Subject: [PATCH] tools/virtiofsd: Add rseq syscall to the seccomp allowlist - -The virtiofsd currently crashes when used with glibc 2.35. -That is due to the rseq system call being added to every thread -creation [1][2]. - -[1]: https://www.efficios.com/blog/2019/02/08/linux-restartable-sequences/ -[2]: https://sourceware.org/pipermail/libc-alpha/2022-February/136040.html - -This happens not at daemon start, but when a guest connects - - /usr/lib/qemu/virtiofsd -f --socket-path=/tmp/testvfsd -o sandbox=chroot \ - -o source=/var/guests/j-virtiofs --socket-group=kvm - virtio_session_mount: Waiting for vhost-user socket connection... - # start ok, now guest will connect - virtio_session_mount: Received vhost-user socket connection - virtio_loop: Entry - fv_queue_set_started: qidx=0 started=1 - fv_queue_set_started: qidx=1 started=1 - Bad system call (core dumped) - -We have to put rseq on the seccomp allowlist to avoid that the daemon -is crashing in this case. - -Reported-by: Michael Hudson-Doyle -Signed-off-by: Christian Ehrhardt -Reviewed-by: Dr. David Alan Gilbert -Message-id: 20220209111456.3328420-1-christian.ehrhardt@canonical.com - -[Moved rseq to its alphabetically ordered position in the seccomp -allowlist. ---Stefan] -Signed-off-by: Stefan Hajnoczi ---- - tools/virtiofsd/passthrough_seccomp.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/tools/virtiofsd/passthrough_seccomp.c b/tools/virtiofsd/passthrough_seccomp.c -index a3ce9f898d..2bc0127b69 100644 ---- a/tools/virtiofsd/passthrough_seccomp.c -+++ b/tools/virtiofsd/passthrough_seccomp.c -@@ -91,6 +91,9 @@ static const int syscall_allowlist[] = { - SCMP_SYS(renameat2), - SCMP_SYS(removexattr), - SCMP_SYS(restart_syscall), -+#ifdef __NR_rseq -+ SCMP_SYS(rseq), /* required since glibc 2.35 */ -+#endif - SCMP_SYS(rt_sigaction), - SCMP_SYS(rt_sigprocmask), - SCMP_SYS(rt_sigreturn), --- -GitLab - - diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.2.0-user-SLIC-crash.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.2.0-user-SLIC-crash.patch deleted file mode 100644 index 76809782b5..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.2.0-user-SLIC-crash.patch +++ /dev/null @@ -1,173 +0,0 @@ -Gentoo bug: https://bugs.gentoo.org/830170 -Upstream bug: https://gitlab.com/qemu-project/qemu/-/issues/786 -Patches taken from -https://lore.kernel.org/qemu-devel/20211227193120.1084176-1-imammedo@redhat.com/ - -commit dce6c86f54eab61028e110497c222e73381379df -Author: Igor Mammedov -Date: Mon Dec 27 14:31:17 2021 -0500 - - acpi: fix QEMU crash when started with SLIC table - - if QEMU is started with used provided SLIC table blob, - - -acpitable sig=SLIC,oem_id='CRASH ',oem_table_id="ME",oem_rev=00002210,asl_compiler_id="",asl_compiler_rev=00000000,data=/dev/null - it will assert with: - - hw/acpi/aml-build.c:61:build_append_padded_str: assertion failed: (len <= maxlen) - - and following backtrace: - - ... - build_append_padded_str (array=0x555556afe320, str=0x555556afdb2e "CRASH ME", maxlen=0x6, pad=0x20) at hw/acpi/aml-build.c:61 - acpi_table_begin (desc=0x7fffffffd1b0, array=0x555556afe320) at hw/acpi/aml-build.c:1727 - build_fadt (tbl=0x555556afe320, linker=0x555557ca3830, f=0x7fffffffd318, oem_id=0x555556afdb2e "CRASH ME", oem_table_id=0x555556afdb34 "ME") at hw/acpi/aml-build.c:2064 - ... - - which happens due to acpi_table_begin() expecting NULL terminated - oem_id and oem_table_id strings, which is normally the case, but - in case of user provided SLIC table, oem_id points to table's blob - directly and as result oem_id became longer than expected. - - Fix issue by handling oem_id consistently and make acpi_get_slic_oem() - return NULL terminated strings. - - PS: - After [1] refactoring, oem_id semantics became inconsistent, where - NULL terminated string was coming from machine and old way pointer - into byte array coming from -acpitable option. That used to work - since build_header() wasn't expecting NULL terminated string and - blindly copied the 1st 6 bytes only. - - However commit [2] broke that by replacing build_header() with - acpi_table_begin(), which was expecting NULL terminated string - and was checking oem_id size. - - 1) 602b45820 ("acpi: Permit OEM ID and OEM table ID fields to be changed") - 2) - Fixes: 4b56e1e4eb08 ("acpi: build_fadt: use acpi_table_begin()/acpi_table_end() instead of build_header()") - Resolves: https://gitlab.com/qemu-project/qemu/-/issues/786 - Signed-off-by: Igor Mammedov - -diff --git a/hw/acpi/core.c b/hw/acpi/core.c -index 1e004d0078..3e811bf03c 100644 ---- a/hw/acpi/core.c -+++ b/hw/acpi/core.c -@@ -345,8 +345,8 @@ int acpi_get_slic_oem(AcpiSlicOem *oem) - struct acpi_table_header *hdr = (void *)(u - sizeof(hdr->_length)); - - if (memcmp(hdr->sig, "SLIC", 4) == 0) { -- oem->id = hdr->oem_id; -- oem->table_id = hdr->oem_table_id; -+ oem->id = g_strndup(hdr->oem_id, 6); -+ oem->table_id = g_strndup(hdr->oem_table_id, 8); - return 0; - } - } -diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c -index a99c6e4fe3..570f82997b 100644 ---- a/hw/i386/acpi-build.c -+++ b/hw/i386/acpi-build.c -@@ -2721,6 +2721,8 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) - - /* Cleanup memory that's no longer used. */ - g_array_free(table_offsets, true); -+ g_free(slic_oem.id); -+ g_free(slic_oem.table_id); - } - - static void acpi_ram_update(MemoryRegion *mr, GArray *data) - -commit a22de122ad03ea40953ad0328b2c3e31002d8052 -Author: Igor Mammedov -Date: Mon Dec 27 14:31:18 2021 -0500 - - tests: acpi: whitelist expected blobs before changing them - - Signed-off-by: Igor Mammedov - -diff --git a/tests/data/acpi/q35/FACP.slic b/tests/data/acpi/q35/FACP.slic -new file mode 100644 -index 0000000000..f6a864cc86 -Binary files /dev/null and b/tests/data/acpi/q35/FACP.slic differ -diff --git a/tests/data/acpi/q35/SLIC.slic b/tests/data/acpi/q35/SLIC.slic -new file mode 100644 -index 0000000000..e69de29bb2 -diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h -index dfb8523c8b..49dbf8fa3e 100644 ---- a/tests/qtest/bios-tables-test-allowed-diff.h -+++ b/tests/qtest/bios-tables-test-allowed-diff.h -@@ -1 +1,3 @@ - /* List of comma-separated changed AML files to ignore */ -+"tests/data/acpi/q35/FACP.slic", -+"tests/data/acpi/q35/SLIC.slic", - -commit cb913395d76f8fdfd7f1d0c8ea77d4710821bbd3 -Author: Igor Mammedov -Date: Mon Dec 27 14:31:19 2021 -0500 - - tests: acpi: add SLIC table test - - When user uses '-acpitable' to add SLIC table, some ACPI - tables (FADT) will change its 'Oem ID'/'Oem Table ID' fields to - match that of SLIC. Test makes sure thati QEMU handles - those fields correctly when SLIC table is added with - '-acpitable' option. - - Signed-off-by: Igor Mammedov - -diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c -index 258874167e..ae7ef13ec7 100644 ---- a/tests/qtest/bios-tables-test.c -+++ b/tests/qtest/bios-tables-test.c -@@ -1567,6 +1567,19 @@ static void test_acpi_oem_fields_virt(void) - g_free(args); - } - -+static void test_acpi_q35_slic(void) -+{ -+ test_data data = { -+ .machine = MACHINE_Q35, -+ .variant = ".slic", -+ }; -+ -+ test_acpi_one("-acpitable sig=SLIC,oem_id='CRASH ',oem_table_id='ME'," -+ "oem_rev=00002210,asl_compiler_id='qemu'," -+ "asl_compiler_rev=00000000,data=/dev/null", -+ &data); -+ free_test_data(&data); -+} - - int main(int argc, char *argv[]) - { -@@ -1639,6 +1652,7 @@ int main(int argc, char *argv[]) - qtest_add_func("acpi/q35/kvm/xapic", test_acpi_q35_kvm_xapic); - qtest_add_func("acpi/q35/kvm/dmar", test_acpi_q35_kvm_dmar); - } -+ qtest_add_func("acpi/q35/slic", test_acpi_q35_slic); - } else if (strcmp(arch, "aarch64") == 0) { - if (has_tcg) { - qtest_add_func("acpi/virt", test_acpi_virt_tcg); - -commit ffba261306370e0ad8506401b104be5fa4749ade -Author: Igor Mammedov -Date: Mon Dec 27 14:31:20 2021 -0500 - - tests: acpi: SLIC: update expected blobs - - Signed-off-by: Igor Mammedov - -diff --git a/tests/data/acpi/q35/FACP.slic b/tests/data/acpi/q35/FACP.slic -index f6a864cc86..891fd4b784 100644 -Binary files a/tests/data/acpi/q35/FACP.slic and b/tests/data/acpi/q35/FACP.slic differ -diff --git a/tests/data/acpi/q35/SLIC.slic b/tests/data/acpi/q35/SLIC.slic -index e69de29bb2..fd26592e24 100644 -Binary files a/tests/data/acpi/q35/SLIC.slic and b/tests/data/acpi/q35/SLIC.slic differ -diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h -index 49dbf8fa3e..dfb8523c8b 100644 ---- a/tests/qtest/bios-tables-test-allowed-diff.h -+++ b/tests/qtest/bios-tables-test-allowed-diff.h -@@ -1,3 +1 @@ - /* List of comma-separated changed AML files to ignore */ --"tests/data/acpi/q35/FACP.slic", --"tests/data/acpi/q35/SLIC.slic", diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.0.0-also-build-virtfs-proxy-helper.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-also-build-virtfs-proxy-helper.patch similarity index 77% rename from sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.0.0-also-build-virtfs-proxy-helper.patch rename to sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-also-build-virtfs-proxy-helper.patch index ca2e943379..b6f3078a69 100644 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.0.0-also-build-virtfs-proxy-helper.patch +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-also-build-virtfs-proxy-helper.patch @@ -1,4 +1,4 @@ -From c1093041466772f4b62961bcc5a354801d41355d Mon Sep 17 00:00:00 2001 +From d02ea89239768c93651a161d057f2bf04d56a024 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Mon, 4 Apr 2022 12:56:59 +0200 Subject: [PATCH] also build virtfs-proxy-helper @@ -15,18 +15,18 @@ all, it is a tiny executable 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build -index 861de93c4f..a8d29be3aa 100644 +index 65a885ea69..29ce7a5a8e 100644 --- a/meson.build +++ b/meson.build -@@ -1474,7 +1474,7 @@ have_virtfs = get_option('virtfs') \ +@@ -1684,7 +1684,7 @@ have_virtfs = get_option('virtfs') \ .disable_auto_if(not have_tools and not have_system) \ .allowed() -have_virtfs_proxy_helper = targetos != 'darwin' and have_virtfs and have_tools +have_virtfs_proxy_helper = have_tools and libattr.found() and libcap_ng.found() - foreach k : get_option('trace_backends') - config_host_data.set('CONFIG_TRACE_' + k.to_upper(), true) + if get_option('block_drv_ro_whitelist') == '' + config_host_data.set('CONFIG_BDRV_RO_WHITELIST', '') -- 2.35.1 diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-capstone-include-path.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-capstone-include-path.patch new file mode 100644 index 0000000000..585e798345 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-capstone-include-path.patch @@ -0,0 +1,31 @@ +Forward ported from qemu-2.11.1-capstone_include_path.patch. +This time also fix the capstone.h header check to use the path we're +already patching in. + +Bug: https://bugs.gentoo.org/873157 +diff --git a/include/disas/capstone.h b/include/disas/capstone.h +index e29068dd97..d8fdc5d537 100644 +--- a/include/disas/capstone.h ++++ b/include/disas/capstone.h +@@ -3,7 +3,7 @@ + + #ifdef CONFIG_CAPSTONE + +-#include ++#include + + #else + +diff --git a/meson.build b/meson.build +index 20fddbd707..50ce96bbd1 100644 +--- a/meson.build ++++ b/meson.build +@@ -2605,7 +2605,7 @@ if not get_option('capstone').auto() or have_system or have_user + # that reports a wrong -I path, causing the #include to + # fail later. If the system has such a broken version + # do not use it. +- if capstone.found() and not cc.compiles('#include ', ++ if capstone.found() and not cc.compiles('#include ', + dependencies: [capstone]) + capstone = not_found + if get_option('capstone').enabled() diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-faccessat2.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-faccessat2.patch new file mode 100644 index 0000000000..ea168f609f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-faccessat2.patch @@ -0,0 +1,78 @@ +From 35a2c85f7d691db7aa2c47181902ac87478eef7a Mon Sep 17 00:00:00 2001 +From: WANG Xuerui +Date: Sun, 9 Oct 2022 14:08:13 +0800 +Subject: [PATCH] linux-user: Implement faccessat2 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +User space has been preferring this syscall for a while, due to its +closer match with C semantics, and newer platforms such as LoongArch +apparently have libc implementations that don't fallback to faccessat +so normal access checks are failing without the emulation in place. + +Tested by successfully emerging several packages within a Gentoo loong +stage3 chroot, emulated on amd64 with help of static qemu-loongarch64. + +Reported-by: Andreas K. Hüttel +Signed-off-by: WANG Xuerui +Message-Id: <20221009060813.2289077-1-xen0n@gentoo.org> +[lv: removing defined(__NR_faccessat2) in syscall.c, + adding defined(TARGET_NR_faccessat2) on print_faccessat()] +Signed-off-by: Laurent Vivier +--- + linux-user/strace.c | 2 +- + linux-user/strace.list | 3 +++ + linux-user/syscall.c | 9 +++++++++ + 3 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/linux-user/strace.c b/linux-user/strace.c +index 86c081c83f..9ae5a812cd 100644 +--- a/linux-user/strace.c ++++ b/linux-user/strace.c +@@ -1969,7 +1969,7 @@ print_execv(CPUArchState *cpu_env, const struct syscallname *name, + } + #endif + +-#ifdef TARGET_NR_faccessat ++#if defined(TARGET_NR_faccessat) || defined(TARGET_NR_faccessat2) + static void + print_faccessat(CPUArchState *cpu_env, const struct syscallname *name, + abi_long arg0, abi_long arg1, abi_long arg2, +diff --git a/linux-user/strace.list b/linux-user/strace.list +index a87415bf3d..3df2184580 100644 +--- a/linux-user/strace.list ++++ b/linux-user/strace.list +@@ -178,6 +178,9 @@ + #ifdef TARGET_NR_faccessat + { TARGET_NR_faccessat, "faccessat" , NULL, print_faccessat, NULL }, + #endif ++#ifdef TARGET_NR_faccessat2 ++{ TARGET_NR_faccessat2, "faccessat2" , NULL, print_faccessat, NULL }, ++#endif + #ifdef TARGET_NR_fadvise64 + { TARGET_NR_fadvise64, "fadvise64" , NULL, NULL, NULL }, + #endif +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index d499cac1d5..e985ad167f 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -9143,6 +9143,15 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, + unlock_user(p, arg2, 0); + return ret; + #endif ++#if defined(TARGET_NR_faccessat2) ++ case TARGET_NR_faccessat2: ++ if (!(p = lock_user_string(arg2))) { ++ return -TARGET_EFAULT; ++ } ++ ret = get_errno(faccessat(arg1, p, arg3, arg4)); ++ unlock_user(p, arg2, 0); ++ return ret; ++#endif + #ifdef TARGET_NR_nice /* not on alpha */ + case TARGET_NR_nice: + return get_errno(nice(arg1)); +-- +2.37.4 + diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-loong-stat.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-loong-stat.patch new file mode 100644 index 0000000000..85fd2c9891 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-loong-stat.patch @@ -0,0 +1,98 @@ +From xen0n@gentoo.org Thu Oct 06 10:07:10 2022 +Return-Path: +X-Original-To: dilfridge@gentoo.org +Delivered-To: dilfridge@gentoo.org +From: WANG Xuerui +To: qemu-devel@nongnu.org +Cc: Richard Henderson , + =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , + WANG Xuerui , + Song Gao , + Xiaojuan Yang , + =?UTF-8?q?Andreas=20K=20=2E=20H=C3=BCttel?= +Subject: [PATCH RESEND] linux-user: Fix struct statfs ABI on loongarch64 +Date: Thu, 6 Oct 2022 18:07:10 +0800 +Message-Id: <20221006100710.427252-1-xen0n@gentoo.org> +X-Mailer: git-send-email 2.38.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Previously the 32-bit version was incorrectly chosen, leading to funny +but incorrect output from e.g. df(1). Simply select the version +corresponding to the 64-bit asm-generic definition. + +For reference, this program should produce the same output no matter +natively compiled or not, for loongarch64 or not: + +```c +#include +#include + +int main(int argc, const char *argv[]) +{ + struct statfs b; + if (statfs(argv[0], &b)) + return 1; + + printf("f_type = 0x%lx\n", b.f_type); + printf("f_bsize = %ld\n", b.f_bsize); + printf("f_blocks = %ld\n", b.f_blocks); + printf("f_bfree = %ld\n", b.f_bfree); + printf("f_bavail = %ld\n", b.f_bavail); + + return 0; +} + +// Example output on my amd64 box, with the test binary residing on a +// btrfs partition. + +// Native and emulated output after the fix: +// +// f_type = 0x9123683e +// f_bsize = 4096 +// f_blocks = 268435456 +// f_bfree = 168406890 +// f_bavail = 168355058 + +// Output before the fix, note the messed layout: +// +// f_type = 0x10009123683e +// f_bsize = 723302085239504896 +// f_blocks = 168355058 +// f_bfree = 2250817541779750912 +// f_bavail = 1099229433104 +``` + +Fixes: 1f63019632 ("linux-user: Add LoongArch syscall support") +Signed-off-by: WANG Xuerui +Cc: Song Gao +Cc: Xiaojuan Yang +Cc: Andreas K. Hüttel +--- + +Resend with amended commit message to 100% clarify the example output +are generated on my box and will differ for everyone else. Sorry for +the noise. + + linux-user/syscall_defs.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h +index 01ee10a88f..77864de57f 100644 +--- a/linux-user/syscall_defs.h ++++ b/linux-user/syscall_defs.h +@@ -2262,7 +2262,8 @@ struct target_statfs64 { + }; + #elif (defined(TARGET_PPC64) || defined(TARGET_X86_64) || \ + defined(TARGET_SPARC64) || defined(TARGET_AARCH64) || \ +- defined(TARGET_RISCV)) && !defined(TARGET_ABI32) ++ defined(TARGET_RISCV) || defined(TARGET_LOONGARCH64)) && \ ++ !defined(TARGET_ABI32) + struct target_statfs { + abi_long f_type; + abi_long f_bsize; +-- +2.38.0 + + diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-mips-n32-syscalls.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-mips-n32-syscalls.patch new file mode 100644 index 0000000000..5ed67668d0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-mips-n32-syscalls.patch @@ -0,0 +1,94 @@ +From xen0n@gentoo.org Thu Oct 06 08:55:00 2022 +Return-Path: +X-Original-To: dilfridge@gentoo.org +Delivered-To: dilfridge@gentoo.org +From: WANG Xuerui +To: qemu-devel@nongnu.org +Cc: WANG Xuerui , + =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , + Jiaxun Yang , + =?UTF-8?q?Andreas=20K=20=2E=20H=C3=BCttel?= , + Joshua Kinard +Subject: [PATCH] linux-user: Fix more MIPS n32 syscall ABI issues +Date: Thu, 6 Oct 2022 16:55:00 +0800 +Message-Id: <20221006085500.290341-1-xen0n@gentoo.org> +X-Mailer: git-send-email 2.38.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In commit 80f0fe3a85 ("linux-user: Fix syscall parameter handling for +MIPS n32") the ABI problem regarding offset64 on MIPS n32 was fixed, +but still some cases remain where the n32 is incorrectly treated as any +other 32-bit ABI that passes 64-bit arguments in pairs of GPRs. Fix by +excluding TARGET_ABI_MIPSN32 from various TARGET_ABI_BITS == 32 checks. + +Closes: https://gitlab.com/qemu-project/qemu/-/issues/1238 +Signed-off-by: WANG Xuerui +Cc: Philippe Mathieu-Daudé +Cc: Jiaxun Yang +Cc: Andreas K. Hüttel +Cc: Joshua Kinard +--- + +Note: I can't reproduce the crash with neither MIPS n32 sysroot at my hand +(a self-built one for Loongson-2F, and stage3-mips64_n32-openrc-20221001T170527Z), +so I can only verify by looking at the (host and qemu) strace outputs, and +would have to ask you to review/test this harder. Thanks. + + linux-user/syscall.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index 2e954d8dbd..8b2d39fe73 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -11793,7 +11793,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, + return -host_to_target_errno(ret); + #endif + +-#if TARGET_ABI_BITS == 32 ++#if TARGET_ABI_BITS == 32 && !defined(TARGET_ABI_MIPSN32) + + #ifdef TARGET_NR_fadvise64_64 + case TARGET_NR_fadvise64_64: +@@ -11920,7 +11920,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, + return get_errno(sys_gettid()); + #ifdef TARGET_NR_readahead + case TARGET_NR_readahead: +-#if TARGET_ABI_BITS == 32 ++#if TARGET_ABI_BITS == 32 && !defined(TARGET_ABI_MIPSN32) + if (regpairs_aligned(cpu_env, num)) { + arg2 = arg3; + arg3 = arg4; +@@ -12612,7 +12612,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, + #endif /* CONFIG_EVENTFD */ + #if defined(CONFIG_FALLOCATE) && defined(TARGET_NR_fallocate) + case TARGET_NR_fallocate: +-#if TARGET_ABI_BITS == 32 ++#if TARGET_ABI_BITS == 32 && !defined(TARGET_ABI_MIPSN32) + ret = get_errno(fallocate(arg1, arg2, target_offset64(arg3, arg4), + target_offset64(arg5, arg6))); + #else +@@ -12623,7 +12623,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, + #if defined(CONFIG_SYNC_FILE_RANGE) + #if defined(TARGET_NR_sync_file_range) + case TARGET_NR_sync_file_range: +-#if TARGET_ABI_BITS == 32 ++#if TARGET_ABI_BITS == 32 && !defined(TARGET_ABI_MIPSN32) + #if defined(TARGET_MIPS) + ret = get_errno(sync_file_range(arg1, target_offset64(arg3, arg4), + target_offset64(arg5, arg6), arg7)); +@@ -12645,7 +12645,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, + case TARGET_NR_arm_sync_file_range: + #endif + /* This is like sync_file_range but the arguments are reordered */ +-#if TARGET_ABI_BITS == 32 ++#if TARGET_ABI_BITS == 32 && !defined(TARGET_ABI_MIPSN32) + ret = get_errno(sync_file_range(arg1, target_offset64(arg3, arg4), + target_offset64(arg5, arg6), arg2)); + #else +-- +2.38.0 + + diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.1.0-strings.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-strings.patch similarity index 80% rename from sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.1.0-strings.patch rename to sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-strings.patch index 2efe7b2933..01f235b9a3 100644 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.1.0-strings.patch +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-strings.patch @@ -4,15 +4,15 @@ diff --git a/configure b/configure index da2501489f..4660ee3ee5 100755 --- a/configure +++ b/configure -@@ -516,6 +516,7 @@ ld="${LD-${cross_prefix}ld}" - ranlib="${RANLIB-${cross_prefix}ranlib}" +@@ -400,6 +400,7 @@ ld="${LD-${cross_prefix}ld}" nm="${NM-${cross_prefix}nm}" + smbd="$SMBD" strip="${STRIP-${cross_prefix}strip}" +strings="${STRINGS-${cross_prefix}strings}" + widl="${WIDL-${cross_prefix}widl}" windres="${WINDRES-${cross_prefix}windres}" pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}" - query_pkg_config() { -@@ -2380,9 +2381,9 @@ int main(int argc, char *argv[]) +@@ -1466,9 +1467,9 @@ int main(int argc, char *argv[]) EOF if compile_prog ; then diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/metadata.xml b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/metadata.xml index 380994d168..bdb00757ca 100644 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/metadata.xml @@ -1,26 +1,14 @@ - - ajak@gentoo.org - John Helmert III - - - sam@gentoo.org - Sam James - - - tamiko@gentoo.org - Matthias Maier - - - zlogene@gentoo.org - Mikle Kolyada - virtualization@gentoo.org Gentoo Virtualization Project + + dilfridge@gentoo.org + Andreas K. Hüttel + Adds support for braille displays using brltty Enables support for Linux's Async IO @@ -72,7 +60,8 @@ Add support for getting and setting POSIX extended attributes, through sys-apps/attr. Requisite for the virtfs backend. Enables support for Xen backends - Support xfsctl() notification and syncing for XFS backed - virtual disks. + + qemu-project/qemu + diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-6.2.0.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-6.2.0.ebuild deleted file mode 100644 index 6706d55c77..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-6.2.0.ebuild +++ /dev/null @@ -1,913 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8,9,10} ) -PYTHON_REQ_USE="ncurses,readline" - -FIRMWARE_ABI_VERSION="6.2.0" - -inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \ - pax-utils xdg-utils - -if [[ ${PV} = *9999* ]]; then - EGIT_REPO_URI="https://git.qemu.org/git/qemu.git" - EGIT_SUBMODULES=( - meson - tests/fp/berkeley-softfloat-3 - tests/fp/berkeley-testfloat-3 - ui/keycodemapdb - ) - inherit git-r3 - SRC_URI="" -else - SRC_URI="https://download.qemu.org/${P}.tar.xz" - KEYWORDS="amd64 arm64 ~ppc ppc64 x86" -fi - -DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" -HOMEPAGE="https://www.qemu.org https://www.linux-kvm.org" - -LICENSE="GPL-2 LGPL-2 BSD-2" -SLOT="0" - -IUSE="accessibility +aio alsa bpf bzip2 capstone +caps +curl debug +doc - +fdt fuse glusterfs +gnutls gtk infiniband iscsi io-uring - jack jemalloc +jpeg - lzo multipath - ncurses nfs nls numa opengl +oss +pin-upstream-blobs - plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux - +slirp - smartcard snappy spice ssh static static-user systemtap test udev usb - usbredir vde +vhost-net vhost-user-fs virgl virtfs +vnc vte xattr xen - xfs zstd" - -COMMON_TARGETS=" - aarch64 - alpha - arm - cris - hppa - i386 - m68k - microblaze - microblazeel - mips - mips64 - mips64el - mipsel - nios2 - or1k - ppc - ppc64 - riscv32 - riscv64 - s390x - sh4 - sh4eb - sparc - sparc64 - x86_64 - xtensa - xtensaeb -" -IUSE_SOFTMMU_TARGETS=" - ${COMMON_TARGETS} - avr - rx - tricore -" -IUSE_USER_TARGETS=" - ${COMMON_TARGETS} - aarch64_be - armeb - hexagon - mipsn32 - mipsn32el - ppc64abi32 - ppc64le - sparc32plus -" - -use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) -use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) -IUSE+=" ${use_softmmu_targets} ${use_user_targets}" - -RESTRICT="!test? ( test )" -# Allow no targets to be built so that people can get a tools-only build. -# Block USE flag configurations known to not work. -REQUIRED_USE="${PYTHON_REQUIRED_USE} - qemu_softmmu_targets_arm? ( fdt ) - qemu_softmmu_targets_microblaze? ( fdt ) - qemu_softmmu_targets_mips64el? ( fdt ) - qemu_softmmu_targets_ppc64? ( fdt ) - qemu_softmmu_targets_ppc? ( fdt ) - qemu_softmmu_targets_riscv32? ( fdt ) - qemu_softmmu_targets_riscv64? ( fdt ) - qemu_softmmu_targets_x86_64? ( fdt ) - sdl-image? ( sdl ) - static? ( static-user !alsa !gtk !jack !opengl !pulseaudio !plugins !rbd !snappy !udev ) - static-user? ( !plugins ) - vhost-user-fs? ( caps seccomp ) - virgl? ( opengl ) - virtfs? ( caps xattr ) - vnc? ( gnutls ) - vte? ( gtk ) - multipath? ( udev ) - plugins? ( !static !static-user ) -" - -# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) -# and user/softmmu targets (qemu-*, qemu-system-*). -# -# Yep, you need both libcap and libcap-ng since virtfs only uses libcap. -# -# The attr lib isn't always linked in (although the USE flag is always -# respected). This is because qemu supports using the C library's API -# when available rather than always using the external library. -ALL_DEPEND=" - >=dev-libs/glib-2.0[static-libs(+)] - sys-libs/zlib[static-libs(+)] - python? ( ${PYTHON_DEPS} ) - systemtap? ( dev-util/systemtap ) - xattr? ( sys-apps/attr[static-libs(+)] )" - -# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) -# softmmu targets (qemu-system-*). -SOFTMMU_TOOLS_DEPEND=" - dev-libs/libxml2[static-libs(+)] - >=x11-libs/pixman-0.28.0[static-libs(+)] - accessibility? ( - app-accessibility/brltty[api] - app-accessibility/brltty[static-libs(+)] - ) - aio? ( dev-libs/libaio[static-libs(+)] ) - alsa? ( >=media-libs/alsa-lib-1.0.13 ) - bpf? ( dev-libs/libbpf:= ) - bzip2? ( app-arch/bzip2[static-libs(+)] ) - capstone? ( dev-libs/capstone:= ) - caps? ( sys-libs/libcap-ng[static-libs(+)] ) - curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) - fdt? ( >=sys-apps/dtc-1.5.0[static-libs(+)] ) - fuse? ( >=sys-fs/fuse-3.1:3[static-libs(+)] ) - glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) - gnutls? ( - dev-libs/nettle:=[static-libs(+)] - >=net-libs/gnutls-3.0:=[static-libs(+)] - ) - gtk? ( - x11-libs/gtk+:3 - vte? ( x11-libs/vte:2.91 ) - ) - infiniband? ( - sys-cluster/rdma-core[static-libs(+)] - ) - iscsi? ( net-libs/libiscsi ) - io-uring? ( sys-libs/liburing:=[static-libs(+)] ) - jack? ( virtual/jack ) - jemalloc? ( dev-libs/jemalloc ) - jpeg? ( virtual/jpeg:0=[static-libs(+)] ) - lzo? ( dev-libs/lzo:2[static-libs(+)] ) - multipath? ( sys-fs/multipath-tools ) - ncurses? ( - sys-libs/ncurses:=[unicode(+)] - sys-libs/ncurses:=[static-libs(+)] - ) - nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] ) - numa? ( sys-process/numactl[static-libs(+)] ) - opengl? ( - virtual/opengl - media-libs/libepoxy[static-libs(+)] - media-libs/mesa[static-libs(+)] - media-libs/mesa[egl(+),gbm(+)] - ) - png? ( media-libs/libpng:0=[static-libs(+)] ) - pulseaudio? ( media-sound/pulseaudio ) - rbd? ( sys-cluster/ceph ) - sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) - sdl? ( - media-libs/libsdl2[video] - media-libs/libsdl2[static-libs(+)] - ) - sdl-image? ( media-libs/sdl2-image[static-libs(+)] ) - seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) - slirp? ( net-libs/libslirp[static-libs(+)] ) - smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] ) - snappy? ( app-arch/snappy:= ) - spice? ( - >=app-emulation/spice-protocol-0.12.3 - >=app-emulation/spice-0.12.0[static-libs(+)] - ) - ssh? ( >=net-libs/libssh-0.8.6[static-libs(+)] ) - udev? ( virtual/libudev:= ) - usb? ( >=virtual/libusb-1-r2[static-libs(+)] ) - usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] ) - vde? ( net-misc/vde[static-libs(+)] ) - virgl? ( media-libs/virglrenderer[static-libs(+)] ) - virtfs? ( sys-libs/libcap ) - xen? ( app-emulation/xen-tools:= ) - xfs? ( sys-fs/xfsprogs[static-libs(+)] ) - zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] ) -" - -EDK2_OVMF_VERSION="202105" -SEABIOS_VERSION="1.14.0" - -X86_FIRMWARE_DEPEND=" - pin-upstream-blobs? ( - ~sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION}[binary] - ~sys-firmware/ipxe-1.21.1[binary,qemu] - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios] - ~sys-firmware/sgabios-0.1_pre10[binary] - ) - !pin-upstream-blobs? ( - >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} - sys-firmware/ipxe[qemu] - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] - sys-firmware/sgabios - )" -PPC_FIRMWARE_DEPEND=" - pin-upstream-blobs? ( - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios] - ) - !pin-upstream-blobs? ( - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] - ) -" - -BDEPEND=" - $(python_gen_impl_dep) - dev-lang/perl - sys-apps/texinfo - virtual/pkgconfig - doc? ( - dev-python/sphinx[${PYTHON_USEDEP}] - dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}] - ) - gtk? ( nls? ( sys-devel/gettext ) ) - test? ( - dev-libs/glib[utils] - sys-devel/bc - ) -" -CDEPEND=" - !static? ( - ${ALL_DEPEND//\[static-libs(+)]} - ${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]} - ) - qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} ) - qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} ) - qemu_softmmu_targets_ppc? ( ${PPC_FIRMWARE_DEPEND} ) - qemu_softmmu_targets_ppc64? ( ${PPC_FIRMWARE_DEPEND} ) -" -DEPEND="${CDEPEND} - kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 ) - static? ( - ${ALL_DEPEND} - ${SOFTMMU_TOOLS_DEPEND} - ) - static-user? ( ${ALL_DEPEND} )" -RDEPEND="${CDEPEND} - acct-group/kvm - selinux? ( sec-policy/selinux-qemu )" - -PATCHES=( - "${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch - "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch - "${FILESDIR}"/${PN}-6.0.0-make.patch - "${FILESDIR}"/${PN}-6.1.0-strings.patch -) - -QA_PREBUILT=" - usr/share/qemu/hppa-firmware.img - usr/share/qemu/openbios-ppc - usr/share/qemu/openbios-sparc64 - usr/share/qemu/openbios-sparc32 - usr/share/qemu/opensbi-riscv64-generic-fw_dynamic.elf - usr/share/qemu/opensbi-riscv32-generic-fw_dynamic.elf - usr/share/qemu/palcode-clipper - usr/share/qemu/s390-ccw.img - usr/share/qemu/s390-netboot.img - usr/share/qemu/u-boot.e500 -" - -QA_WX_LOAD="usr/bin/qemu-i386 - usr/bin/qemu-x86_64 - usr/bin/qemu-alpha - usr/bin/qemu-arm - usr/bin/qemu-cris - usr/bin/qemu-m68k - usr/bin/qemu-microblaze - usr/bin/qemu-microblazeel - usr/bin/qemu-mips - usr/bin/qemu-mipsel - usr/bin/qemu-or1k - usr/bin/qemu-ppc - usr/bin/qemu-ppc64 - usr/bin/qemu-ppc64abi32 - usr/bin/qemu-sh4 - usr/bin/qemu-sh4eb - usr/bin/qemu-sparc - usr/bin/qemu-sparc64 - usr/bin/qemu-armeb - usr/bin/qemu-sparc32plus - usr/bin/qemu-s390x - usr/bin/qemu-unicore32 -" - -DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the -kernel module loaded before running kvm. The easiest way to ensure that the -kernel module is loaded is to load it on boot. - For AMD CPUs the module is called 'kvm-amd'. - For Intel CPUs the module is called 'kvm-intel'. -Please review /etc/conf.d/modules for how to load these. - -Make sure your user is in the 'kvm' group. Just run - $ gpasswd -a kvm -then have re-login. - -For brand new installs, the default permissions on /dev/kvm might not let -you access it. You can tell udev to reset ownership/perms: - $ udevadm trigger -c add /dev/kvm - -If you want to register binfmt handlers for qemu user targets: -For openrc: - # rc-update add qemu-binfmt -For systemd: - # ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf" - -pkg_pretend() { - if use kernel_linux && kernel_is lt 2 6 25; then - eerror "This version of KVM requires a host kernel of 2.6.25 or higher." - elif use kernel_linux; then - if ! linux_config_exists; then - eerror "Unable to check your kernel for KVM support" - else - CONFIG_CHECK="~KVM ~TUN ~BRIDGE" - ERROR_KVM="You must enable KVM in your kernel to continue" - ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in" - ERROR_KVM_AMD+=" your kernel configuration." - ERROR_KVM_INTEL="If you have an Intel CPU, you must enable" - ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration." - ERROR_TUN="You will need the Universal TUN/TAP driver compiled" - ERROR_TUN+=" into your kernel or loaded as a module to use the" - ERROR_TUN+=" virtual network device if using -net tap." - ERROR_BRIDGE="You will also need support for 802.1d" - ERROR_BRIDGE+=" Ethernet Bridging for some network configurations." - use vhost-net && CONFIG_CHECK+=" ~VHOST_NET" - ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net" - ERROR_VHOST_NET+=" support" - - if use amd64 || use x86 || use amd64-linux || use x86-linux; then - if grep -q AuthenticAMD /proc/cpuinfo; then - CONFIG_CHECK+=" ~KVM_AMD" - elif grep -q GenuineIntel /proc/cpuinfo; then - CONFIG_CHECK+=" ~KVM_INTEL" - fi - fi - - use python && CONFIG_CHECK+=" ~DEBUG_FS" - ERROR_DEBUG_FS="debugFS support required for kvm_stat" - - # Now do the actual checks setup above - check_extra_config - fi - fi - - if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then - eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt" - eerror "instances are still pointing to it. Please update your" - eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag" - eerror "and the right system binary (e.g. qemu-system-x86_64)." - die "update your virt configs to not use qemu-kvm" - fi -} - -# Sanity check to make sure target lists are kept up-to-date. -check_targets() { - local var=$1 mak=$2 - local detected sorted - - pushd "${S}"/configs/targets/ >/dev/null || die - - # Force C locale until glibc is updated. #564936 - detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u)) - sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u)) - if [[ ${sorted} != "${detected}" ]] ; then - eerror "The ebuild needs to be kept in sync." - eerror "${var}: ${sorted}" - eerror "$(printf '%-*s' ${#var} configure): ${detected}" - die "sync ${var} to the list of targets" - fi - - popd >/dev/null -} - -src_prepare() { - check_targets IUSE_SOFTMMU_TARGETS softmmu - check_targets IUSE_USER_TARGETS linux-user - - default - - # Use correct toolchain to fix cross-compiling - tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS - export WINDRES=${CHOST}-windres - - # Verbose builds - MAKEOPTS+=" V=1" - - # Remove bundled copy of libfdt - rm -r dtc || die -} - -## -# configures qemu based on the build directory and the build type -# we are using. -# -qemu_src_configure() { - debug-print-function ${FUNCNAME} "$@" - - local buildtype=$1 - local builddir="${S}/${buildtype}-build" - - mkdir "${builddir}" - - local conf_opts=( - --prefix=/usr - --sysconfdir=/etc - --bindir=/usr/bin - --libdir=/usr/$(get_libdir) - --datadir=/usr/share - --docdir=/usr/share/doc/${PF}/html - --mandir=/usr/share/man - --localstatedir=/var - --disable-bsd-user - --disable-containers # bug #732972 - --disable-guest-agent - --disable-strip - - # bug #746752: TCG interpreter has a few limitations: - # - it does not support FPU - # - it's generally slower on non-self-modifying code - # It's advantage is support for host architectures - # where native codegeneration is not implemented. - # Gentoo has qemu keyworded only on targets with - # native code generation available. Avoid the interpreter. - --disable-tcg-interpreter - - --disable-werror - # We support gnutls/nettle for crypto operations. It is possible - # to use gcrypt when gnutls/nettle are disabled (but not when they - # are enabled), but it's not really worth the hassle. Disable it - # all the time to avoid automatically detecting it. #568856 - --disable-gcrypt - --python="${PYTHON}" - --cc="$(tc-getCC)" - --cxx="$(tc-getCXX)" - --host-cc="$(tc-getBUILD_CC)" - $(use_enable debug debug-info) - $(use_enable debug debug-tcg) - $(use_enable doc docs) - $(use_enable nls gettext) - $(use_enable plugins) - $(use_enable xattr attr) - ) - - # Disable options not used by user targets. This simplifies building - # static user targets (USE=static-user) considerably. - conf_notuser() { - if [[ ${buildtype} == "user" ]] ; then - echo "--disable-${2:-$1}" - else - use_enable "$@" - fi - } - # Enable option only for softmmu build, but not 'user' or 'tools' - conf_softmmu() { - if [[ ${buildtype} == "softmmu" ]] ; then - use_enable "$@" - else - echo "--disable-${2:-$1}" - fi - } - # Enable option only for tools build, but not 'user' or 'softmmu' - conf_tools() { - if [[ ${buildtype} == "tools" ]] ; then - use_enable "$@" - else - echo "--disable-${2:-$1}" - fi - } - # Special case for the malloc flag, because the --disable flag does - # not exist and trying like above will break configuring. - conf_malloc() { - if [[ ! ${buildtype} == "user" ]] ; then - usex "${1}" "--enable-malloc=${1}" "" - fi - } - conf_opts+=( - $(conf_notuser accessibility brlapi) - $(conf_notuser aio linux-aio) - $(conf_softmmu bpf) - $(conf_notuser bzip2) - $(conf_notuser capstone) - $(conf_notuser caps cap-ng) - $(conf_notuser curl) - $(conf_notuser fdt) - $(conf_notuser fuse) - $(conf_notuser glusterfs) - $(conf_notuser gnutls) - $(conf_notuser gnutls nettle) - $(conf_notuser gtk) - $(conf_notuser infiniband rdma) - $(conf_notuser iscsi libiscsi) - $(conf_notuser io-uring linux-io-uring) - $(conf_malloc jemalloc) - $(conf_notuser jpeg vnc-jpeg) - $(conf_notuser kernel_linux kvm) - $(conf_notuser lzo) - $(conf_notuser multipath mpath) - $(conf_notuser ncurses curses) - $(conf_notuser nfs libnfs) - $(conf_notuser numa) - $(conf_notuser opengl) - $(conf_notuser png vnc-png) - $(conf_notuser rbd) - $(conf_notuser sasl vnc-sasl) - $(conf_notuser sdl) - $(conf_softmmu sdl-image) - $(conf_notuser seccomp) - $(conf_notuser slirp slirp system) - $(conf_notuser smartcard) - $(conf_notuser snappy) - $(conf_notuser spice) - $(conf_notuser ssh libssh) - $(conf_notuser udev libudev) - $(conf_notuser usb libusb) - $(conf_notuser usbredir usb-redir) - $(conf_notuser vde) - $(conf_notuser vhost-net) - $(conf_notuser vhost-user-fs) - $(conf_tools vhost-user-fs virtiofsd) - $(conf_notuser virgl virglrenderer) - $(conf_softmmu virtfs) - $(conf_notuser vnc) - $(conf_notuser vte) - $(conf_notuser xen) - $(conf_notuser xen xen-pci-passthrough) - $(conf_notuser xfs xfsctl) - # use prebuilt keymaps, bug #759604 - --disable-xkbcommon - $(conf_notuser zstd) - ) - - if [[ ${buildtype} == "user" ]] ; then - conf_opts+=( --disable-libxml2 ) - else - conf_opts+=( --enable-libxml2 ) - fi - - if [[ ! ${buildtype} == "user" ]] ; then - # audio options - local audio_opts=( - # Note: backend order matters here: #716202 - # We iterate from higher-level to lower level. - $(usex pulseaudio pa "") - $(usev jack) - $(usev sdl) - $(usev alsa) - $(usev oss) - ) - conf_opts+=( - --audio-drv-list="${audio_opts// /,}" - ) - fi - - case ${buildtype} in - user) - conf_opts+=( - --enable-linux-user - --disable-system - --disable-blobs - --disable-tools - ) - local static_flag="static-user" - ;; - softmmu) - conf_opts+=( - --disable-linux-user - --enable-system - --disable-tools - ) - local static_flag="static" - ;; - tools) - conf_opts+=( - --disable-linux-user - --disable-system - --disable-blobs - --enable-tools - ) - local static_flag="static" - ;; - esac - - local targets="${buildtype}_targets" - [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" ) - - # Add support for SystemTAP - use systemtap && conf_opts+=( --enable-trace-backend=dtrace ) - - # We always want to attempt to build with PIE support as it results - # in a more secure binary. But it doesn't work with static or if - # the current GCC doesn't have PIE support. - if use ${static_flag}; then - conf_opts+=( --static --disable-pie ) - else - tc-enables-pie && conf_opts+=( --enable-pie ) - fi - - # Meson will not use a cross-file unless cross_prefix is set. - tc-is-cross-compiler && conf_opts+=( --cross-prefix="${CHOST}-" ) - - # Plumb through equivalent of EXTRA_ECONF to allow experiments - # like bug #747928. - conf_opts+=( ${EXTRA_CONF_QEMU} ) - - echo "../configure ${conf_opts[*]}" - cd "${builddir}" - ../configure "${conf_opts[@]}" || die "configure failed" -} - -src_configure() { - local target - - python_setup - - softmmu_targets= softmmu_bins=() - user_targets= user_bins=() - - for target in ${IUSE_SOFTMMU_TARGETS} ; do - if use "qemu_softmmu_targets_${target}"; then - softmmu_targets+=",${target}-softmmu" - softmmu_bins+=( "qemu-system-${target}" ) - fi - done - - for target in ${IUSE_USER_TARGETS} ; do - if use "qemu_user_targets_${target}"; then - user_targets+=",${target}-linux-user" - user_bins+=( "qemu-${target}" ) - fi - done - - softmmu_targets=${softmmu_targets#,} - user_targets=${user_targets#,} - - [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu" - [[ -n ${user_targets} ]] && qemu_src_configure "user" - qemu_src_configure "tools" -} - -src_compile() { - if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" - default - fi - - if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" - default - fi - - cd "${S}/tools-build" - default -} - -src_test() { - if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" - pax-mark m */qemu-system-* #515550 - emake check - fi -} - -qemu_python_install() { - python_domodule "${S}/python/qemu" - - python_doscript "${S}/scripts/kvm/vmxcap" - python_doscript "${S}/scripts/qmp/qmp-shell" - python_doscript "${S}/scripts/qmp/qemu-ga-client" -} - -# Generate binfmt support files. -# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc) -# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt) -generate_initd() { - local out="${T}/qemu-binfmt" - local out_systemd="${T}/qemu.conf" - local d="${T}/binfmt.d" - - einfo "Generating qemu binfmt scripts and configuration files" - - # Generate the debian fragments first. - mkdir -p "${d}" - "${S}"/scripts/qemu-binfmt-conf.sh \ - --debian \ - --exportdir "${d}" \ - --qemu-path "${EPREFIX}/usr/bin" \ - || die - # Then turn the fragments into a shell script we can source. - sed -E -i \ - -e 's:^([^ ]+) (.*)$:\1="\2":' \ - "${d}"/* || die - - # Generate the init.d script by assembling the fragments from above. - local f qcpu package interpreter magic mask - cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die - for f in "${d}"/qemu-* ; do - source "${f}" - - # Normalize the cpu logic like we do in the init.d for the native cpu. - qcpu=${package#qemu-} - case ${qcpu} in - arm*) qcpu="arm";; - mips*) qcpu="mips";; - ppc*) qcpu="ppc";; - s390*) qcpu="s390";; - sh*) qcpu="sh";; - sparc*) qcpu="sparc";; - esac - - # we use 'printf' here to be portable across 'sh' - # implementations: #679168 - cat <>"${out}" - if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then - printf '%s\n' ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register - fi -EOF - - echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}" - - done - cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die -} - -src_install() { - if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" - emake DESTDIR="${ED}" install - - # Install binfmt handler init script for user targets. - generate_initd - doinitd "${T}/qemu-binfmt" - - # Install binfmt/qemu.conf. - insinto "/usr/share/qemu/binfmt.d" - doins "${T}/qemu.conf" - fi - - if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" - emake DESTDIR="${ED}" install - - # This might not exist if the test failed. #512010 - [[ -e check-report.html ]] && dodoc check-report.html - - if use kernel_linux; then - udev_newrules "${FILESDIR}"/65-kvm.rules-r2 65-kvm.rules - fi - - if use python; then - python_foreach_impl qemu_python_install - fi - fi - - cd "${S}/tools-build" - emake DESTDIR="${ED}" install - - # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 - pushd "${ED}"/usr/bin >/dev/null - pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 - popd >/dev/null - - # Install config file example for qemu-bridge-helper - insinto "/etc/qemu" - doins "${FILESDIR}/bridge.conf" - - cd "${S}" - dodoc MAINTAINERS docs/specs/pci-ids.txt - newdoc pc-bios/README README.pc-bios - - # Disallow stripping of prebuilt firmware files. - dostrip -x ${QA_PREBUILT} - - if [[ -n ${softmmu_targets} ]]; then - # Remove SeaBIOS since we're using the SeaBIOS packaged one - rm "${ED}/usr/share/qemu/bios.bin" - rm "${ED}/usr/share/qemu/bios-256k.bin" - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../seabios/bios.bin /usr/share/qemu/bios.bin - dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin - fi - - # Remove vgabios since we're using the seavgabios packaged one - rm "${ED}/usr/share/qemu/vgabios.bin" - rm "${ED}/usr/share/qemu/vgabios-cirrus.bin" - rm "${ED}/usr/share/qemu/vgabios-qxl.bin" - rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" - rm "${ED}/usr/share/qemu/vgabios-virtio.bin" - rm "${ED}/usr/share/qemu/vgabios-vmware.bin" - # PPC/PPC64 loads vgabios-stdvga - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then - dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin - dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin - dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin - dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin - dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin - dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin - fi - - # Remove sgabios since we're using the sgabios packaged one - rm "${ED}/usr/share/qemu/sgabios.bin" - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin - fi - - # Remove iPXE since we're using the iPXE packaged one - rm "${ED}"/usr/share/qemu/pxe-*.rom - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom - dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom - dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom - dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom - dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom - dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom - fi - fi - - DISABLE_AUTOFORMATTING=true - readme.gentoo_create_doc -} - -firmware_abi_change() { - local pv - for pv in ${REPLACING_VERSIONS}; do - if ver_test ${pv} -lt ${FIRMWARE_ABI_VERSION}; then - return 0 - fi - done - return 1 -} - -pkg_postinst() { - if [[ -n ${softmmu_targets} ]] && use kernel_linux; then - udev_reload - fi - - xdg_icon_cache_update - - [[ -z ${EPREFIX} ]] && [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \ - fcaps cap_net_admin ${EROOT}/usr/libexec/qemu-bridge-helper - - DISABLE_AUTOFORMATTING=true - readme.gentoo_print_elog - - if use pin-upstream-blobs && firmware_abi_change; then - ewarn "This version of qemu pins new versions of firmware blobs:" - ewarn " $(best_version sys-firmware/edk2-ovmf)" - ewarn " $(best_version sys-firmware/ipxe)" - ewarn " $(best_version sys-firmware/seabios)" - ewarn " $(best_version sys-firmware/sgabios)" - ewarn "This might break resume of hibernated guests (started with a different" - ewarn "firmware version) and live migration to/from qemu versions with different" - ewarn "firmware. Please (cold) restart all running guests. For functional" - ewarn "guest migration ensure that all" - ewarn "hosts run at least" - ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}." - fi -} - -pkg_info() { - echo "Using:" - echo " $(best_version app-emulation/spice-protocol)" - echo " $(best_version sys-firmware/edk2-ovmf)" - if has_version 'sys-firmware/edk2-ovmf[binary]'; then - echo " USE=binary" - else - echo " USE=''" - fi - echo " $(best_version sys-firmware/ipxe)" - echo " $(best_version sys-firmware/seabios)" - if has_version 'sys-firmware/seabios[binary]'; then - echo " USE=binary" - else - echo " USE=''" - fi - echo " $(best_version sys-firmware/sgabios)" -} - -pkg_postrm() { - xdg_icon_cache_update -} diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-6.2.0-r3.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.1.0-r2.ebuild similarity index 85% rename from sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-6.2.0-r3.ebuild rename to sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.1.0-r2.ebuild index db762f2990..d3ffa41c14 100644 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-6.2.0-r3.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.1.0-r2.ebuild @@ -1,20 +1,31 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{8,9,10} ) +# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-qemu-docs +# Set to 1 if prebuilt, 0 if not +# (the construct below is to allow overriding from env for script) +QEMU_DOCS_PREBUILT=${QEMU_DOCS_PREBUILT:-1} +QEMU_DOCS_PREBUILT_DEV=ajak +QEMU_DOCS_VERSION="${PV}" +# Default to generating docs (inc. man pages) if no prebuilt; overridden later +# bug #830088 +QEMU_DOC_USEFLAG="+doc" + +PYTHON_COMPAT=( python3_{9,10,11} ) PYTHON_REQ_USE="ncurses,readline" -FIRMWARE_ABI_VERSION="6.2.0" +FIRMWARE_ABI_VERSION="7.1.0" inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \ pax-utils xdg-utils -if [[ ${PV} = *9999* ]]; then - EGIT_REPO_URI="https://git.qemu.org/git/qemu.git" +if [[ ${PV} == *9999* ]]; then + QEMU_DOCS_PREBUILT=0 + + EGIT_REPO_URI="https://gitlab.com/qemu-project/qemu.git/" EGIT_SUBMODULES=( - meson tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3 ui/keycodemapdb @@ -22,8 +33,15 @@ if [[ ${PV} = *9999* ]]; then inherit git-r3 SRC_URI="" else - SRC_URI="https://download.qemu.org/${P}.tar.xz" - KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" + MY_P="${PN}-${PV/_rc/-rc}" + SRC_URI="https://download.qemu.org/${MY_P}.tar.xz" + + if [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + SRC_URI+=" !doc? ( https://dev.gentoo.org/~${QEMU_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${QEMU_DOCS_VERSION}-docs.tar.xz )" + fi + + S="${WORKDIR}/${MY_P}" + KEYWORDS="amd64 ~arm arm64 ~loong ~ppc ppc64 ~riscv x86" fi DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" @@ -32,16 +50,18 @@ HOMEPAGE="https://www.qemu.org https://www.linux-kvm.org" LICENSE="GPL-2 LGPL-2 BSD-2" SLOT="0" -IUSE="accessibility +aio alsa bpf bzip2 capstone +caps +curl debug +doc +[[ ${QEMU_DOCS_PREBUILT} == 1 ]] && QEMU_DOC_USEFLAG="doc" + +IUSE="accessibility +aio alsa bpf bzip2 capstone +curl debug ${QEMU_DOC_USEFLAG} +fdt fuse glusterfs +gnutls gtk infiniband iscsi io-uring jack jemalloc +jpeg lzo multipath ncurses nfs nls numa opengl +oss pam +pin-upstream-blobs - plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux + plugins +png pulseaudio python rbd sasl sdl sdl-image selinux +slirp smartcard snappy spice ssh static static-user systemtap test udev usb - usbredir vde +vhost-net vhost-user-fs virgl virtfs +vnc vte xattr xen - xfs zstd" + usbredir vde +vhost-net virgl virtfs +vnc vte xattr xen + zstd" COMMON_TARGETS=" aarch64 @@ -50,6 +70,7 @@ COMMON_TARGETS=" cris hppa i386 + loongarch64 m68k microblaze microblazeel @@ -85,7 +106,6 @@ IUSE_USER_TARGETS=" hexagon mipsn32 mipsn32el - ppc64abi32 ppc64le sparc32plus " @@ -97,7 +117,8 @@ IUSE+=" ${use_softmmu_targets} ${use_user_targets}" RESTRICT="!test? ( test )" # Allow no targets to be built so that people can get a tools-only build. # Block USE flag configurations known to not work. -REQUIRED_USE="${PYTHON_REQUIRED_USE} +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} qemu_softmmu_targets_arm? ( fdt ) qemu_softmmu_targets_microblaze? ( fdt ) qemu_softmmu_targets_mips64el? ( fdt ) @@ -109,9 +130,8 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE} sdl-image? ( sdl ) static? ( static-user !alsa !gtk !jack !opengl !pam !pulseaudio !plugins !rbd !snappy !udev ) static-user? ( !plugins ) - vhost-user-fs? ( caps seccomp ) virgl? ( opengl ) - virtfs? ( caps xattr ) + virtfs? ( xattr ) vnc? ( gnutls ) vte? ( gtk ) multipath? ( udev ) @@ -136,7 +156,8 @@ ALL_DEPEND=" # Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) # softmmu targets (qemu-system-*). SOFTMMU_TOOLS_DEPEND=" - dev-libs/libxml2[static-libs(+)] + sys-libs/libcap-ng[static-libs(+)] + >=sys-libs/libseccomp-2.1.0[static-libs(+)] >=x11-libs/pixman-0.28.0[static-libs(+)] accessibility? ( app-accessibility/brltty[api] @@ -147,9 +168,8 @@ SOFTMMU_TOOLS_DEPEND=" bpf? ( dev-libs/libbpf:= ) bzip2? ( app-arch/bzip2[static-libs(+)] ) capstone? ( dev-libs/capstone:= ) - caps? ( sys-libs/libcap-ng[static-libs(+)] ) curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) - fdt? ( >=sys-apps/dtc-1.5.0[static-libs(+)] ) + fdt? ( >=sys-apps/dtc-1.5.1[static-libs(+)] ) fuse? ( >=sys-fs/fuse-3.1:3[static-libs(+)] ) glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) gnutls? ( @@ -165,7 +185,7 @@ SOFTMMU_TOOLS_DEPEND=" io-uring? ( sys-libs/liburing:=[static-libs(+)] ) jack? ( virtual/jack ) jemalloc? ( dev-libs/jemalloc ) - jpeg? ( virtual/jpeg:0=[static-libs(+)] ) + jpeg? ( media-libs/libjpeg-turbo:=[static-libs(+)] ) lzo? ( dev-libs/lzo:2[static-libs(+)] ) multipath? ( sys-fs/multipath-tools ) ncurses? ( @@ -190,7 +210,6 @@ SOFTMMU_TOOLS_DEPEND=" media-libs/libsdl2[static-libs(+)] ) sdl-image? ( media-libs/sdl2-image[static-libs(+)] ) - seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) slirp? ( net-libs/libslirp[static-libs(+)] ) smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] ) snappy? ( app-arch/snappy:= ) @@ -206,38 +225,47 @@ SOFTMMU_TOOLS_DEPEND=" virgl? ( media-libs/virglrenderer[static-libs(+)] ) virtfs? ( sys-libs/libcap ) xen? ( app-emulation/xen-tools:= ) - xfs? ( sys-fs/xfsprogs[static-libs(+)] ) zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] ) " -EDK2_OVMF_VERSION="202105" -SEABIOS_VERSION="1.14.0" +EDK2_OVMF_VERSION="202202" +SEABIOS_VERSION="1.16.0" X86_FIRMWARE_DEPEND=" pin-upstream-blobs? ( - ~sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION}[binary] + ~sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} ~sys-firmware/ipxe-1.21.1[binary,qemu] - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} ~sys-firmware/sgabios-0.1_pre10[binary] ) !pin-upstream-blobs? ( - >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} + || ( + >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} + >=sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} + ) sys-firmware/ipxe[qemu] - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) sys-firmware/sgabios )" PPC_FIRMWARE_DEPEND=" pin-upstream-blobs? ( - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} ) !pin-upstream-blobs? ( - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) ) " BDEPEND=" $(python_gen_impl_dep) dev-lang/perl + dev-util/meson sys-apps/texinfo virtual/pkgconfig doc? ( @@ -275,12 +303,14 @@ RDEPEND="${CDEPEND} )" PATCHES=( - "${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch "${FILESDIR}"/${PN}-6.0.0-make.patch - "${FILESDIR}"/${PN}-6.1.0-strings.patch - "${FILESDIR}"/${PN}-6.2.0-user-SLIC-crash.patch - "${FILESDIR}"/${PN}-6.2.0-also-build-virtfs-proxy-helper.patch + "${FILESDIR}"/${PN}-7.1.0-also-build-virtfs-proxy-helper.patch + "${FILESDIR}"/${PN}-7.1.0-strings.patch + "${FILESDIR}"/${PN}-7.1.0-capstone-include-path.patch + "${FILESDIR}"/${PN}-7.1.0-mips-n32-syscalls.patch + "${FILESDIR}"/${PN}-7.1.0-loong-stat.patch + "${FILESDIR}"/${PN}-7.1.0-faccessat2.patch ) QA_PREBUILT=" @@ -309,7 +339,6 @@ QA_WX_LOAD="usr/bin/qemu-i386 usr/bin/qemu-or1k usr/bin/qemu-ppc usr/bin/qemu-ppc64 - usr/bin/qemu-ppc64abi32 usr/bin/qemu-sh4 usr/bin/qemu-sh4eb usr/bin/qemu-sparc @@ -421,8 +450,13 @@ src_prepare() { # Verbose builds MAKEOPTS+=" V=1" - # Remove bundled copy of libfdt - rm -r dtc || die + # We already force -D_FORTIFY_SOURCE=2 (or 3) in our toolchain, but + # this setting (-U then -D..=2) will prevent us from trying out 3, so + # drop it. No change to level of protection b/c we patch our toolchain. + sed -i -e 's/-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2//' configure || die + + # Remove bundled modules + rm -r dtc meson roms/*/ slirp || die } ## @@ -435,7 +469,7 @@ qemu_src_configure() { local buildtype=$1 local builddir="${S}/${buildtype}-build" - mkdir "${builddir}" + mkdir "${builddir}" || die local conf_opts=( --prefix=/usr @@ -467,10 +501,10 @@ qemu_src_configure() { # are enabled), but it's not really worth the hassle. Disable it # all the time to avoid automatically detecting it. #568856 --disable-gcrypt - --python="${PYTHON}" --cc="$(tc-getCC)" --cxx="$(tc-getCXX)" --host-cc="$(tc-getBUILD_CC)" + $(use_enable alsa) $(use_enable debug debug-info) $(use_enable debug debug-tcg) @@ -521,7 +555,6 @@ qemu_src_configure() { $(conf_softmmu bpf) $(conf_notuser bzip2) $(conf_notuser capstone) - $(conf_notuser caps cap-ng) $(conf_notuser curl) $(conf_tools doc docs) $(conf_notuser fdt) @@ -543,12 +576,11 @@ qemu_src_configure() { $(conf_notuser numa) $(conf_notuser opengl) $(conf_notuser pam auth-pam) - $(conf_notuser png vnc-png) + $(conf_notuser png) $(conf_notuser rbd) $(conf_notuser sasl vnc-sasl) $(conf_notuser sdl) $(conf_softmmu sdl-image) - $(conf_notuser seccomp) $(conf_notuser slirp slirp system) $(conf_notuser smartcard) $(conf_notuser snappy) @@ -559,26 +591,17 @@ qemu_src_configure() { $(conf_notuser usbredir usb-redir) $(conf_notuser vde) $(conf_notuser vhost-net) - $(conf_notuser vhost-user-fs) - $(conf_tools vhost-user-fs virtiofsd) $(conf_notuser virgl virglrenderer) $(conf_softmmu virtfs) $(conf_notuser vnc) $(conf_notuser vte) $(conf_notuser xen) $(conf_notuser xen xen-pci-passthrough) - $(conf_notuser xfs xfsctl) # use prebuilt keymaps, bug #759604 --disable-xkbcommon $(conf_notuser zstd) ) - if [[ ${buildtype} == "user" ]] ; then - conf_opts+=( --disable-libxml2 ) - else - conf_opts+=( --enable-libxml2 ) - fi - if [[ ! ${buildtype} == "user" ]] ; then # audio options local audio_opts=( @@ -602,6 +625,8 @@ qemu_src_configure() { --disable-system --disable-blobs --disable-tools + --disable-cap-ng + --disable-seccomp ) local static_flag="static-user" ;; @@ -610,6 +635,8 @@ qemu_src_configure() { --disable-linux-user --enable-system --disable-tools + --enable-cap-ng + --enable-seccomp ) local static_flag="static" ;; @@ -618,6 +645,8 @@ qemu_src_configure() { --disable-linux-user --disable-system --disable-blobs + --enable-cap-ng + --enable-seccomp --enable-tools ) local static_flag="static" @@ -683,22 +712,22 @@ src_configure() { src_compile() { if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" + cd "${S}/user-build" || die default fi if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" + cd "${S}/softmmu-build" || die default fi - cd "${S}/tools-build" + cd "${S}/tools-build" || die default } src_test() { if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" + cd "${S}/softmmu-build" || die pax-mark m */qemu-system-* #515550 emake check fi @@ -795,19 +824,24 @@ src_install() { fi fi - cd "${S}/tools-build" + cd "${S}/tools-build" || die emake DESTDIR="${ED}" install + # If USE=doc, there'll be newly generated docs which we install instead. + if ! use doc && [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + doman "${WORKDIR}"/${PN}-${QEMU_DOCS_VERSION}-docs/docs/*.[0-8] + fi + # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 - pushd "${ED}"/usr/bin >/dev/null + pushd "${ED}"/usr/bin >/dev/null || die pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 - popd >/dev/null + popd >/dev/null || die # Install config file example for qemu-bridge-helper insinto "/etc/qemu" doins "${FILESDIR}/bridge.conf" - cd "${S}" + cd "${S}" || die dodoc MAINTAINERS docs/specs/pci-ids.txt newdoc pc-bios/README README.pc-bios @@ -816,10 +850,7 @@ src_install() { if [[ -n ${softmmu_targets} ]]; then # Remove SeaBIOS since we're using the SeaBIOS packaged one - rm "${ED}/usr/share/qemu/bios.bin" - rm "${ED}/usr/share/qemu/bios-256k.bin" if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../seabios/bios.bin /usr/share/qemu/bios.bin dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin fi @@ -830,6 +861,7 @@ src_install() { rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" rm "${ED}/usr/share/qemu/vgabios-virtio.bin" rm "${ED}/usr/share/qemu/vgabios-vmware.bin" + # PPC/PPC64 loads vgabios-stdvga if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin @@ -841,13 +873,11 @@ src_install() { fi # Remove sgabios since we're using the sgabios packaged one - rm "${ED}/usr/share/qemu/sgabios.bin" if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin fi # Remove iPXE since we're using the iPXE packaged one - rm "${ED}"/usr/share/qemu/pxe-*.rom if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom @@ -880,16 +910,27 @@ pkg_postinst() { xdg_icon_cache_update [[ -z ${EPREFIX} ]] && [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \ - fcaps cap_net_admin ${EROOT}/usr/libexec/qemu-bridge-helper + fcaps cap_net_admin "${EROOT}"/usr/libexec/qemu-bridge-helper DISABLE_AUTOFORMATTING=true readme.gentoo_print_elog if use pin-upstream-blobs && firmware_abi_change; then ewarn "This version of qemu pins new versions of firmware blobs:" - ewarn " $(best_version sys-firmware/edk2-ovmf)" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + ewarn " $(best_version sys-firmware/edk2-ovmf-bin)" + else + ewarn " $(best_version sys-firmware/edk2-ovmf)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + ewarn " $(best_version sys-firmware/seabios-bin)" + else + ewarn " $(best_version sys-firmware/seabios)" + fi + ewarn " $(best_version sys-firmware/ipxe)" - ewarn " $(best_version sys-firmware/seabios)" ewarn " $(best_version sys-firmware/sgabios)" ewarn "This might break resume of hibernated guests (started with a different" ewarn "firmware version) and live migration to/from qemu versions with different" @@ -903,22 +944,24 @@ pkg_postinst() { pkg_info() { echo "Using:" echo " $(best_version app-emulation/spice-protocol)" - echo " $(best_version sys-firmware/edk2-ovmf)" - if has_version 'sys-firmware/edk2-ovmf[binary]'; then - echo " USE=binary" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + echo " $(best_version sys-firmware/edk2-ovmf-bin)" else - echo " USE=''" + echo " $(best_version sys-firmware/edk2-ovmf)" fi + + if has_version 'sys-firmware/seabios-bin'; then + echo " $(best_version sys-firmware/seabios-bin)" + else + echo " $(best_version sys-firmware/seabios)" + fi + echo " $(best_version sys-firmware/ipxe)" - echo " $(best_version sys-firmware/seabios)" - if has_version 'sys-firmware/seabios[binary]'; then - echo " USE=binary" - else - echo " USE=''" - fi echo " $(best_version sys-firmware/sgabios)" } pkg_postrm() { xdg_icon_cache_update + udev_reload } diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-6.2.0-r4.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.1.0.ebuild similarity index 83% rename from sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-6.2.0-r4.ebuild rename to sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.1.0.ebuild index e981bb09ad..b1ff815a7c 100644 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-6.2.0-r4.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.1.0.ebuild @@ -1,20 +1,31 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{8,9,10} ) +# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-qemu-docs +# Set to 1 if prebuilt, 0 if not +# (the construct below is to allow overriding from env for script) +QEMU_DOCS_PREBUILT=${QEMU_DOCS_PREBUILT:-1} +QEMU_DOCS_PREBUILT_DEV=ajak +QEMU_DOCS_VERSION="${PV}" +# Default to generating docs (inc. man pages) if no prebuilt; overridden later +# bug #830088 +QEMU_DOC_USEFLAG="+doc" + +PYTHON_COMPAT=( python3_{9,10,11} ) PYTHON_REQ_USE="ncurses,readline" -FIRMWARE_ABI_VERSION="6.2.0" +FIRMWARE_ABI_VERSION="7.1.0" inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \ pax-utils xdg-utils -if [[ ${PV} = *9999* ]]; then - EGIT_REPO_URI="https://git.qemu.org/git/qemu.git" +if [[ ${PV} == *9999* ]]; then + QEMU_DOCS_PREBUILT=0 + + EGIT_REPO_URI="https://gitlab.com/qemu-project/qemu.git/" EGIT_SUBMODULES=( - meson tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3 ui/keycodemapdb @@ -22,8 +33,15 @@ if [[ ${PV} = *9999* ]]; then inherit git-r3 SRC_URI="" else - SRC_URI="https://download.qemu.org/${P}.tar.xz" - KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" + MY_P="${PN}-${PV/_rc/-rc}" + SRC_URI="https://download.qemu.org/${MY_P}.tar.xz" + + if [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + SRC_URI+=" !doc? ( https://dev.gentoo.org/~${QEMU_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${QEMU_DOCS_VERSION}-docs.tar.xz )" + fi + + S="${WORKDIR}/${MY_P}" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" fi DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" @@ -32,7 +50,9 @@ HOMEPAGE="https://www.qemu.org https://www.linux-kvm.org" LICENSE="GPL-2 LGPL-2 BSD-2" SLOT="0" -IUSE="accessibility +aio alsa bpf bzip2 capstone +caps +curl debug +doc +[[ ${QEMU_DOCS_PREBUILT} == 1 ]] && QEMU_DOC_USEFLAG="doc" + +IUSE="accessibility +aio alsa bpf bzip2 capstone +caps +curl debug ${QEMU_DOC_USEFLAG} +fdt fuse glusterfs +gnutls gtk infiniband iscsi io-uring jack jemalloc +jpeg lzo multipath @@ -41,7 +61,7 @@ IUSE="accessibility +aio alsa bpf bzip2 capstone +caps +curl debug +doc +slirp smartcard snappy spice ssh static static-user systemtap test udev usb usbredir vde +vhost-net vhost-user-fs virgl virtfs +vnc vte xattr xen - xfs zstd" + zstd" COMMON_TARGETS=" aarch64 @@ -50,6 +70,7 @@ COMMON_TARGETS=" cris hppa i386 + loongarch64 m68k microblaze microblazeel @@ -85,7 +106,6 @@ IUSE_USER_TARGETS=" hexagon mipsn32 mipsn32el - ppc64abi32 ppc64le sparc32plus " @@ -136,7 +156,6 @@ ALL_DEPEND=" # Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) # softmmu targets (qemu-system-*). SOFTMMU_TOOLS_DEPEND=" - dev-libs/libxml2[static-libs(+)] >=x11-libs/pixman-0.28.0[static-libs(+)] accessibility? ( app-accessibility/brltty[api] @@ -149,7 +168,7 @@ SOFTMMU_TOOLS_DEPEND=" capstone? ( dev-libs/capstone:= ) caps? ( sys-libs/libcap-ng[static-libs(+)] ) curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) - fdt? ( >=sys-apps/dtc-1.5.0[static-libs(+)] ) + fdt? ( >=sys-apps/dtc-1.5.1[static-libs(+)] ) fuse? ( >=sys-fs/fuse-3.1:3[static-libs(+)] ) glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) gnutls? ( @@ -165,7 +184,7 @@ SOFTMMU_TOOLS_DEPEND=" io-uring? ( sys-libs/liburing:=[static-libs(+)] ) jack? ( virtual/jack ) jemalloc? ( dev-libs/jemalloc ) - jpeg? ( virtual/jpeg:0=[static-libs(+)] ) + jpeg? ( media-libs/libjpeg-turbo:=[static-libs(+)] ) lzo? ( dev-libs/lzo:2[static-libs(+)] ) multipath? ( sys-fs/multipath-tools ) ncurses? ( @@ -206,38 +225,47 @@ SOFTMMU_TOOLS_DEPEND=" virgl? ( media-libs/virglrenderer[static-libs(+)] ) virtfs? ( sys-libs/libcap ) xen? ( app-emulation/xen-tools:= ) - xfs? ( sys-fs/xfsprogs[static-libs(+)] ) zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] ) " -EDK2_OVMF_VERSION="202105" -SEABIOS_VERSION="1.14.0" +EDK2_OVMF_VERSION="202202" +SEABIOS_VERSION="1.16.0" X86_FIRMWARE_DEPEND=" pin-upstream-blobs? ( - ~sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION}[binary] + ~sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} ~sys-firmware/ipxe-1.21.1[binary,qemu] - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} ~sys-firmware/sgabios-0.1_pre10[binary] ) !pin-upstream-blobs? ( - >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} + || ( + >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} + >=sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} + ) sys-firmware/ipxe[qemu] - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) sys-firmware/sgabios )" PPC_FIRMWARE_DEPEND=" pin-upstream-blobs? ( - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} ) !pin-upstream-blobs? ( - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) ) " BDEPEND=" $(python_gen_impl_dep) dev-lang/perl + dev-util/meson sys-apps/texinfo virtual/pkgconfig doc? ( @@ -275,13 +303,11 @@ RDEPEND="${CDEPEND} )" PATCHES=( - "${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch "${FILESDIR}"/${PN}-6.0.0-make.patch - "${FILESDIR}"/${PN}-6.1.0-strings.patch - "${FILESDIR}"/${PN}-6.2.0-user-SLIC-crash.patch - "${FILESDIR}"/${PN}-6.2.0-also-build-virtfs-proxy-helper.patch - "${FILESDIR}"/${PN}-6.2.0-glibc-2.35-rseq-seccomp-virtiofsd.patch + "${FILESDIR}"/${PN}-7.1.0-also-build-virtfs-proxy-helper.patch + "${FILESDIR}"/${PN}-7.1.0-strings.patch + "${FILESDIR}"/${PN}-7.1.0-capstone-include-path.patch ) QA_PREBUILT=" @@ -310,7 +336,6 @@ QA_WX_LOAD="usr/bin/qemu-i386 usr/bin/qemu-or1k usr/bin/qemu-ppc usr/bin/qemu-ppc64 - usr/bin/qemu-ppc64abi32 usr/bin/qemu-sh4 usr/bin/qemu-sh4eb usr/bin/qemu-sparc @@ -422,8 +447,13 @@ src_prepare() { # Verbose builds MAKEOPTS+=" V=1" - # Remove bundled copy of libfdt - rm -r dtc || die + # We already force -D_FORTIFY_SOURCE=2 (or 3) in our toolchain, but + # this setting (-U then -D..=2) will prevent us from trying out 3, so + # drop it. No change to level of protection b/c we patch our toolchain. + sed -i -e 's/-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2//' configure || die + + # Remove bundled modules + rm -r dtc meson roms/*/ slirp || die } ## @@ -436,7 +466,7 @@ qemu_src_configure() { local buildtype=$1 local builddir="${S}/${buildtype}-build" - mkdir "${builddir}" + mkdir "${builddir}" || die local conf_opts=( --prefix=/usr @@ -468,10 +498,10 @@ qemu_src_configure() { # are enabled), but it's not really worth the hassle. Disable it # all the time to avoid automatically detecting it. #568856 --disable-gcrypt - --python="${PYTHON}" --cc="$(tc-getCC)" --cxx="$(tc-getCXX)" --host-cc="$(tc-getBUILD_CC)" + $(use_enable alsa) $(use_enable debug debug-info) $(use_enable debug debug-tcg) @@ -544,7 +574,7 @@ qemu_src_configure() { $(conf_notuser numa) $(conf_notuser opengl) $(conf_notuser pam auth-pam) - $(conf_notuser png vnc-png) + $(conf_notuser png) $(conf_notuser rbd) $(conf_notuser sasl vnc-sasl) $(conf_notuser sdl) @@ -560,26 +590,17 @@ qemu_src_configure() { $(conf_notuser usbredir usb-redir) $(conf_notuser vde) $(conf_notuser vhost-net) - $(conf_notuser vhost-user-fs) - $(conf_tools vhost-user-fs virtiofsd) $(conf_notuser virgl virglrenderer) $(conf_softmmu virtfs) $(conf_notuser vnc) $(conf_notuser vte) $(conf_notuser xen) $(conf_notuser xen xen-pci-passthrough) - $(conf_notuser xfs xfsctl) # use prebuilt keymaps, bug #759604 --disable-xkbcommon $(conf_notuser zstd) ) - if [[ ${buildtype} == "user" ]] ; then - conf_opts+=( --disable-libxml2 ) - else - conf_opts+=( --enable-libxml2 ) - fi - if [[ ! ${buildtype} == "user" ]] ; then # audio options local audio_opts=( @@ -613,6 +634,16 @@ qemu_src_configure() { --disable-tools ) local static_flag="static" + + for target in ${IUSE_SOFTMMU_TARGETS}; do + if use "qemu_softmmu_targets_${target}"; then + conf_opts+=( + # For some reason, adding this with the setting set + # to on *or* off makes the build always fail. + # --with-devices-${target}=gentoo + ) + fi + done ;; tools) conf_opts+=( @@ -664,6 +695,21 @@ src_configure() { if use "qemu_softmmu_targets_${target}"; then softmmu_targets+=",${target}-softmmu" softmmu_bins+=( "qemu-system-${target}" ) + + # Needed to rework vhost-user-fs handling thanks to https://gitlab.com/qemu-project/qemu/-/commit/5166dab + # The option was converted into being configurable by + # Kconfig's. So, to enable it, we insert the necessary + # options into each arch's softmmu target gentoo.mak file, + # then configure with --with-devices-${target}=gentoo. + if use vhost-user-fs; then + echo "CONFIG_VHOST_USER_FS=y for ${target}-softmmu" || die + echo "CONFIG_VIRTIO=y" >> "configs/devices/${target}-softmmu/gentoo.mak" || die + echo "CONFIG_VHOST_USER_FS=y" >> "configs/devices/${target}-softmmu/gentoo.mak" || die + else + echo "CONFIG_VHOST_USER_FS=n for ${target}-softmmu" || die + echo "CONFIG_VIRTIO=n" >> "configs/devices/${target}-softmmu/gentoo.mak" || die + echo "CONFIG_VHOST_USER_FS=n" >> "configs/devices/${target}-softmmu/gentoo.mak" || die + fi fi done @@ -684,22 +730,22 @@ src_configure() { src_compile() { if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" + cd "${S}/user-build" || die default fi if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" + cd "${S}/softmmu-build" || die default fi - cd "${S}/tools-build" + cd "${S}/tools-build" || die default } src_test() { if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" + cd "${S}/softmmu-build" || die pax-mark m */qemu-system-* #515550 emake check fi @@ -796,19 +842,24 @@ src_install() { fi fi - cd "${S}/tools-build" + cd "${S}/tools-build" || die emake DESTDIR="${ED}" install + # If USE=doc, there'll be newly generated docs which we install instead. + if ! use doc && [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + doman "${WORKDIR}"/${PN}-${QEMU_DOCS_VERSION}-docs/docs/*.[0-8] + fi + # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 - pushd "${ED}"/usr/bin >/dev/null + pushd "${ED}"/usr/bin >/dev/null || die pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 - popd >/dev/null + popd >/dev/null || die # Install config file example for qemu-bridge-helper insinto "/etc/qemu" doins "${FILESDIR}/bridge.conf" - cd "${S}" + cd "${S}" || die dodoc MAINTAINERS docs/specs/pci-ids.txt newdoc pc-bios/README README.pc-bios @@ -817,10 +868,7 @@ src_install() { if [[ -n ${softmmu_targets} ]]; then # Remove SeaBIOS since we're using the SeaBIOS packaged one - rm "${ED}/usr/share/qemu/bios.bin" - rm "${ED}/usr/share/qemu/bios-256k.bin" if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../seabios/bios.bin /usr/share/qemu/bios.bin dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin fi @@ -831,6 +879,7 @@ src_install() { rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" rm "${ED}/usr/share/qemu/vgabios-virtio.bin" rm "${ED}/usr/share/qemu/vgabios-vmware.bin" + # PPC/PPC64 loads vgabios-stdvga if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin @@ -842,13 +891,11 @@ src_install() { fi # Remove sgabios since we're using the sgabios packaged one - rm "${ED}/usr/share/qemu/sgabios.bin" if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin fi # Remove iPXE since we're using the iPXE packaged one - rm "${ED}"/usr/share/qemu/pxe-*.rom if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom @@ -881,16 +928,27 @@ pkg_postinst() { xdg_icon_cache_update [[ -z ${EPREFIX} ]] && [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \ - fcaps cap_net_admin ${EROOT}/usr/libexec/qemu-bridge-helper + fcaps cap_net_admin "${EROOT}"/usr/libexec/qemu-bridge-helper DISABLE_AUTOFORMATTING=true readme.gentoo_print_elog if use pin-upstream-blobs && firmware_abi_change; then ewarn "This version of qemu pins new versions of firmware blobs:" - ewarn " $(best_version sys-firmware/edk2-ovmf)" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + ewarn " $(best_version sys-firmware/edk2-ovmf-bin)" + else + ewarn " $(best_version sys-firmware/edk2-ovmf)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + ewarn " $(best_version sys-firmware/seabios-bin)" + else + ewarn " $(best_version sys-firmware/seabios)" + fi + ewarn " $(best_version sys-firmware/ipxe)" - ewarn " $(best_version sys-firmware/seabios)" ewarn " $(best_version sys-firmware/sgabios)" ewarn "This might break resume of hibernated guests (started with a different" ewarn "firmware version) and live migration to/from qemu versions with different" @@ -904,22 +962,24 @@ pkg_postinst() { pkg_info() { echo "Using:" echo " $(best_version app-emulation/spice-protocol)" - echo " $(best_version sys-firmware/edk2-ovmf)" - if has_version 'sys-firmware/edk2-ovmf[binary]'; then - echo " USE=binary" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + echo " $(best_version sys-firmware/edk2-ovmf-bin)" else - echo " USE=''" + echo " $(best_version sys-firmware/edk2-ovmf)" fi + + if has_version 'sys-firmware/seabios-bin'; then + echo " $(best_version sys-firmware/seabios-bin)" + else + echo " $(best_version sys-firmware/seabios)" + fi + echo " $(best_version sys-firmware/ipxe)" - echo " $(best_version sys-firmware/seabios)" - if has_version 'sys-firmware/seabios[binary]'; then - echo " USE=binary" - else - echo " USE=''" - fi echo " $(best_version sys-firmware/sgabios)" } pkg_postrm() { xdg_icon_cache_update + udev_reload } diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.0.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.2.0-r1.ebuild similarity index 86% rename from sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.0.0-r1.ebuild rename to sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.2.0-r1.ebuild index c9cb42eece..7d6949eb5d 100644 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.0.0-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.2.0-r1.ebuild @@ -1,20 +1,31 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{8,9,10} ) +# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-qemu-docs +# Set to 1 if prebuilt, 0 if not +# (the construct below is to allow overriding from env for script) +QEMU_DOCS_PREBUILT=${QEMU_DOCS_PREBUILT:-1} +QEMU_DOCS_PREBUILT_DEV=ajak +QEMU_DOCS_VERSION="${PV}" +# Default to generating docs (inc. man pages) if no prebuilt; overridden later +# bug #830088 +QEMU_DOC_USEFLAG="+doc" + +PYTHON_COMPAT=( python3_{9,10,11} ) PYTHON_REQ_USE="ncurses,readline" -FIRMWARE_ABI_VERSION="7.0.0" +FIRMWARE_ABI_VERSION="7.2.0" inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \ pax-utils xdg-utils -if [[ ${PV} = *9999* ]]; then +if [[ ${PV} == *9999* ]]; then + QEMU_DOCS_PREBUILT=0 + EGIT_REPO_URI="https://gitlab.com/qemu-project/qemu.git/" EGIT_SUBMODULES=( - meson tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3 ui/keycodemapdb @@ -24,8 +35,13 @@ if [[ ${PV} = *9999* ]]; then else MY_P="${PN}-${PV/_rc/-rc}" SRC_URI="https://download.qemu.org/${MY_P}.tar.xz" - KEYWORDS="amd64 ~arm ~arm64 ~ppc ppc64 ~riscv ~x86" + + if [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + SRC_URI+=" !doc? ( https://dev.gentoo.org/~${QEMU_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${QEMU_DOCS_VERSION}-docs.tar.xz )" + fi + S="${WORKDIR}/${MY_P}" + # [[ "${PV}" != *_rc* ]] && KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" fi DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" @@ -34,7 +50,9 @@ HOMEPAGE="https://www.qemu.org https://www.linux-kvm.org" LICENSE="GPL-2 LGPL-2 BSD-2" SLOT="0" -IUSE="accessibility +aio alsa bpf bzip2 capstone +caps +curl debug +doc +[[ ${QEMU_DOCS_PREBUILT} == 1 ]] && QEMU_DOC_USEFLAG="doc" + +IUSE="accessibility +aio alsa bpf bzip2 capstone +curl debug ${QEMU_DOC_USEFLAG} +fdt fuse glusterfs +gnutls gtk infiniband iscsi io-uring jack jemalloc +jpeg lzo multipath @@ -42,7 +60,7 @@ IUSE="accessibility +aio alsa bpf bzip2 capstone +caps +curl debug +doc plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux +slirp smartcard snappy spice ssh static static-user systemtap test udev usb - usbredir vde +vhost-net vhost-user-fs virgl virtfs +vnc vte xattr xen + usbredir vde +vhost-net virgl virtfs +vnc vte xattr xen zstd" COMMON_TARGETS=" @@ -52,6 +70,7 @@ COMMON_TARGETS=" cris hppa i386 + loongarch64 m68k microblaze microblazeel @@ -96,9 +115,11 @@ use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) IUSE+=" ${use_softmmu_targets} ${use_user_targets}" RESTRICT="!test? ( test )" + # Allow no targets to be built so that people can get a tools-only build. # Block USE flag configurations known to not work. -REQUIRED_USE="${PYTHON_REQUIRED_USE} +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} qemu_softmmu_targets_arm? ( fdt ) qemu_softmmu_targets_microblaze? ( fdt ) qemu_softmmu_targets_mips64el? ( fdt ) @@ -110,14 +131,16 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE} sdl-image? ( sdl ) static? ( static-user !alsa !gtk !jack !opengl !pam !pulseaudio !plugins !rbd !snappy !udev ) static-user? ( !plugins ) - vhost-user-fs? ( caps seccomp ) virgl? ( opengl ) - virtfs? ( caps xattr ) + virtfs? ( xattr ) vnc? ( gnutls ) vte? ( gtk ) multipath? ( udev ) plugins? ( !static !static-user ) " +for smname in ${IUSE_SOFTMMU_TARGETS} ; do + REQUIRED_USE+=" qemu_softmmu_targets_${smname}? ( seccomp ) " +done # Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) # and user/softmmu targets (qemu-*, qemu-system-*). @@ -137,6 +160,7 @@ ALL_DEPEND=" # Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) # softmmu targets (qemu-system-*). SOFTMMU_TOOLS_DEPEND=" + sys-libs/libcap-ng[static-libs(+)] >=x11-libs/pixman-0.28.0[static-libs(+)] accessibility? ( app-accessibility/brltty[api] @@ -147,7 +171,6 @@ SOFTMMU_TOOLS_DEPEND=" bpf? ( dev-libs/libbpf:= ) bzip2? ( app-arch/bzip2[static-libs(+)] ) capstone? ( dev-libs/capstone:= ) - caps? ( sys-libs/libcap-ng[static-libs(+)] ) curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) fdt? ( >=sys-apps/dtc-1.5.1[static-libs(+)] ) fuse? ( >=sys-fs/fuse-3.1:3[static-libs(+)] ) @@ -165,7 +188,7 @@ SOFTMMU_TOOLS_DEPEND=" io-uring? ( sys-libs/liburing:=[static-libs(+)] ) jack? ( virtual/jack ) jemalloc? ( dev-libs/jemalloc ) - jpeg? ( virtual/jpeg:0=[static-libs(+)] ) + jpeg? ( media-libs/libjpeg-turbo:=[static-libs(+)] ) lzo? ( dev-libs/lzo:2[static-libs(+)] ) multipath? ( sys-fs/multipath-tools ) ncurses? ( @@ -209,34 +232,44 @@ SOFTMMU_TOOLS_DEPEND=" zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] ) " -EDK2_OVMF_VERSION="202105" -SEABIOS_VERSION="1.14.0" +EDK2_OVMF_VERSION="202202" +SEABIOS_VERSION="1.16.0" X86_FIRMWARE_DEPEND=" pin-upstream-blobs? ( - ~sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION}[binary] + ~sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} ~sys-firmware/ipxe-1.21.1[binary,qemu] - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} ~sys-firmware/sgabios-0.1_pre10[binary] ) !pin-upstream-blobs? ( - >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} + || ( + >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} + >=sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} + ) sys-firmware/ipxe[qemu] - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) sys-firmware/sgabios )" PPC_FIRMWARE_DEPEND=" pin-upstream-blobs? ( - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} ) !pin-upstream-blobs? ( - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) ) " BDEPEND=" $(python_gen_impl_dep) dev-lang/perl + dev-util/meson sys-apps/texinfo virtual/pkgconfig doc? ( @@ -274,11 +307,10 @@ RDEPEND="${CDEPEND} )" PATCHES=( - "${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch "${FILESDIR}"/${PN}-6.0.0-make.patch - "${FILESDIR}"/${PN}-6.1.0-strings.patch - "${FILESDIR}"/${PN}-7.0.0-also-build-virtfs-proxy-helper.patch + "${FILESDIR}"/${PN}-7.1.0-also-build-virtfs-proxy-helper.patch + "${FILESDIR}"/${PN}-7.1.0-capstone-include-path.patch ) QA_PREBUILT=" @@ -418,8 +450,13 @@ src_prepare() { # Verbose builds MAKEOPTS+=" V=1" - # Remove bundled copy of libfdt - rm -r dtc || die + # We already force -D_FORTIFY_SOURCE=2 (or 3) in our toolchain, but + # this setting (-U then -D..=2) will prevent us from trying out 3, so + # drop it. No change to level of protection b/c we patch our toolchain. + sed -i -e 's/-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2//' configure || die + + # Remove bundled modules + rm -r dtc meson roms/*/ || die } ## @@ -432,7 +469,7 @@ qemu_src_configure() { local buildtype=$1 local builddir="${S}/${buildtype}-build" - mkdir "${builddir}" + mkdir "${builddir}" || die local conf_opts=( --prefix=/usr @@ -464,10 +501,10 @@ qemu_src_configure() { # are enabled), but it's not really worth the hassle. Disable it # all the time to avoid automatically detecting it. #568856 --disable-gcrypt - --python="${PYTHON}" --cc="$(tc-getCC)" --cxx="$(tc-getCXX)" --host-cc="$(tc-getBUILD_CC)" + $(use_enable alsa) $(use_enable debug debug-info) $(use_enable debug debug-tcg) @@ -518,7 +555,6 @@ qemu_src_configure() { $(conf_softmmu bpf) $(conf_notuser bzip2) $(conf_notuser capstone) - $(conf_notuser caps cap-ng) $(conf_notuser curl) $(conf_tools doc docs) $(conf_notuser fdt) @@ -540,13 +576,13 @@ qemu_src_configure() { $(conf_notuser numa) $(conf_notuser opengl) $(conf_notuser pam auth-pam) - $(conf_notuser png vnc-png) + $(conf_notuser png) $(conf_notuser rbd) $(conf_notuser sasl vnc-sasl) $(conf_notuser sdl) $(conf_softmmu sdl-image) $(conf_notuser seccomp) - $(conf_notuser slirp slirp system) + $(conf_notuser slirp) $(conf_notuser smartcard) $(conf_notuser snappy) $(conf_notuser spice) @@ -556,8 +592,6 @@ qemu_src_configure() { $(conf_notuser usbredir usb-redir) $(conf_notuser vde) $(conf_notuser vhost-net) - $(conf_notuser vhost-user-fs) - $(conf_tools vhost-user-fs virtiofsd) $(conf_notuser virgl virglrenderer) $(conf_softmmu virtfs) $(conf_notuser vnc) @@ -592,6 +626,8 @@ qemu_src_configure() { --disable-system --disable-blobs --disable-tools + --disable-cap-ng + --disable-seccomp ) local static_flag="static-user" ;; @@ -600,6 +636,8 @@ qemu_src_configure() { --disable-linux-user --enable-system --disable-tools + --enable-cap-ng + --enable-seccomp ) local static_flag="static" ;; @@ -609,6 +647,7 @@ qemu_src_configure() { --disable-system --disable-blobs --enable-tools + --enable-cap-ng ) local static_flag="static" ;; @@ -673,22 +712,22 @@ src_configure() { src_compile() { if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" + cd "${S}/user-build" || die default fi if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" + cd "${S}/softmmu-build" || die default fi - cd "${S}/tools-build" + cd "${S}/tools-build" || die default } src_test() { if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" + cd "${S}/softmmu-build" || die pax-mark m */qemu-system-* #515550 emake check fi @@ -785,19 +824,24 @@ src_install() { fi fi - cd "${S}/tools-build" + cd "${S}/tools-build" || die emake DESTDIR="${ED}" install + # If USE=doc, there'll be newly generated docs which we install instead. + if ! use doc && [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + doman "${WORKDIR}"/${PN}-${QEMU_DOCS_VERSION}-docs/docs/*.[0-8] + fi + # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 - pushd "${ED}"/usr/bin >/dev/null + pushd "${ED}"/usr/bin >/dev/null || die pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 - popd >/dev/null + popd >/dev/null || die # Install config file example for qemu-bridge-helper insinto "/etc/qemu" doins "${FILESDIR}/bridge.conf" - cd "${S}" + cd "${S}" || die dodoc MAINTAINERS docs/specs/pci-ids.txt newdoc pc-bios/README README.pc-bios @@ -806,10 +850,7 @@ src_install() { if [[ -n ${softmmu_targets} ]]; then # Remove SeaBIOS since we're using the SeaBIOS packaged one - rm "${ED}/usr/share/qemu/bios.bin" - rm "${ED}/usr/share/qemu/bios-256k.bin" if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../seabios/bios.bin /usr/share/qemu/bios.bin dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin fi @@ -820,6 +861,7 @@ src_install() { rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" rm "${ED}/usr/share/qemu/vgabios-virtio.bin" rm "${ED}/usr/share/qemu/vgabios-vmware.bin" + # PPC/PPC64 loads vgabios-stdvga if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin @@ -831,13 +873,11 @@ src_install() { fi # Remove sgabios since we're using the sgabios packaged one - rm "${ED}/usr/share/qemu/sgabios.bin" if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin fi # Remove iPXE since we're using the iPXE packaged one - rm "${ED}"/usr/share/qemu/pxe-*.rom if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom @@ -870,16 +910,27 @@ pkg_postinst() { xdg_icon_cache_update [[ -z ${EPREFIX} ]] && [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \ - fcaps cap_net_admin ${EROOT}/usr/libexec/qemu-bridge-helper + fcaps cap_net_admin "${EROOT}"/usr/libexec/qemu-bridge-helper DISABLE_AUTOFORMATTING=true readme.gentoo_print_elog if use pin-upstream-blobs && firmware_abi_change; then ewarn "This version of qemu pins new versions of firmware blobs:" - ewarn " $(best_version sys-firmware/edk2-ovmf)" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + ewarn " $(best_version sys-firmware/edk2-ovmf-bin)" + else + ewarn " $(best_version sys-firmware/edk2-ovmf)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + ewarn " $(best_version sys-firmware/seabios-bin)" + else + ewarn " $(best_version sys-firmware/seabios)" + fi + ewarn " $(best_version sys-firmware/ipxe)" - ewarn " $(best_version sys-firmware/seabios)" ewarn " $(best_version sys-firmware/sgabios)" ewarn "This might break resume of hibernated guests (started with a different" ewarn "firmware version) and live migration to/from qemu versions with different" @@ -893,22 +944,24 @@ pkg_postinst() { pkg_info() { echo "Using:" echo " $(best_version app-emulation/spice-protocol)" - echo " $(best_version sys-firmware/edk2-ovmf)" - if has_version 'sys-firmware/edk2-ovmf[binary]'; then - echo " USE=binary" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + echo " $(best_version sys-firmware/edk2-ovmf-bin)" else - echo " USE=''" + echo " $(best_version sys-firmware/edk2-ovmf)" fi + + if has_version 'sys-firmware/seabios-bin'; then + echo " $(best_version sys-firmware/seabios-bin)" + else + echo " $(best_version sys-firmware/seabios)" + fi + echo " $(best_version sys-firmware/ipxe)" - echo " $(best_version sys-firmware/seabios)" - if has_version 'sys-firmware/seabios[binary]'; then - echo " USE=binary" - else - echo " USE=''" - fi echo " $(best_version sys-firmware/sgabios)" } pkg_postrm() { xdg_icon_cache_update + udev_reload } diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.0.0_rc4.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.2.0.ebuild similarity index 86% rename from sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.0.0_rc4.ebuild rename to sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.2.0.ebuild index ef1f8a3498..53e3c04ee8 100644 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.0.0_rc4.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.2.0.ebuild @@ -1,20 +1,31 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{8,9,10} ) +# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-qemu-docs +# Set to 1 if prebuilt, 0 if not +# (the construct below is to allow overriding from env for script) +QEMU_DOCS_PREBUILT=${QEMU_DOCS_PREBUILT:-1} +QEMU_DOCS_PREBUILT_DEV=ajak +QEMU_DOCS_VERSION="${PV}" +# Default to generating docs (inc. man pages) if no prebuilt; overridden later +# bug #830088 +QEMU_DOC_USEFLAG="+doc" + +PYTHON_COMPAT=( python3_{9,10,11} ) PYTHON_REQ_USE="ncurses,readline" -FIRMWARE_ABI_VERSION="6.2.0" +FIRMWARE_ABI_VERSION="7.2.0" inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \ pax-utils xdg-utils -if [[ ${PV} = *9999* ]]; then +if [[ ${PV} == *9999* ]]; then + QEMU_DOCS_PREBUILT=0 + EGIT_REPO_URI="https://gitlab.com/qemu-project/qemu.git/" EGIT_SUBMODULES=( - meson tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3 ui/keycodemapdb @@ -24,8 +35,13 @@ if [[ ${PV} = *9999* ]]; then else MY_P="${PN}-${PV/_rc/-rc}" SRC_URI="https://download.qemu.org/${MY_P}.tar.xz" - #KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86" + + if [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + SRC_URI+=" !doc? ( https://dev.gentoo.org/~${QEMU_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${QEMU_DOCS_VERSION}-docs.tar.xz )" + fi + S="${WORKDIR}/${MY_P}" + [[ "${PV}" != *_rc* ]] && KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ppc64 ~riscv ~x86" fi DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" @@ -34,15 +50,17 @@ HOMEPAGE="https://www.qemu.org https://www.linux-kvm.org" LICENSE="GPL-2 LGPL-2 BSD-2" SLOT="0" -IUSE="accessibility +aio alsa bpf bzip2 capstone +caps +curl debug +doc +[[ ${QEMU_DOCS_PREBUILT} == 1 ]] && QEMU_DOC_USEFLAG="doc" + +IUSE="accessibility +aio alsa bpf bzip2 capstone +curl debug ${QEMU_DOC_USEFLAG} +fdt fuse glusterfs +gnutls gtk infiniband iscsi io-uring jack jemalloc +jpeg lzo multipath ncurses nfs nls numa opengl +oss pam +pin-upstream-blobs - plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux + plugins +png pulseaudio python rbd sasl sdl sdl-image selinux +slirp smartcard snappy spice ssh static static-user systemtap test udev usb - usbredir vde +vhost-net vhost-user-fs virgl virtfs +vnc vte xattr xen + usbredir vde +vhost-net virgl virtfs +vnc vte xattr xen zstd" COMMON_TARGETS=" @@ -52,6 +70,7 @@ COMMON_TARGETS=" cris hppa i386 + loongarch64 m68k microblaze microblazeel @@ -98,7 +117,8 @@ IUSE+=" ${use_softmmu_targets} ${use_user_targets}" RESTRICT="!test? ( test )" # Allow no targets to be built so that people can get a tools-only build. # Block USE flag configurations known to not work. -REQUIRED_USE="${PYTHON_REQUIRED_USE} +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} qemu_softmmu_targets_arm? ( fdt ) qemu_softmmu_targets_microblaze? ( fdt ) qemu_softmmu_targets_mips64el? ( fdt ) @@ -110,9 +130,8 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE} sdl-image? ( sdl ) static? ( static-user !alsa !gtk !jack !opengl !pam !pulseaudio !plugins !rbd !snappy !udev ) static-user? ( !plugins ) - vhost-user-fs? ( caps seccomp ) virgl? ( opengl ) - virtfs? ( caps xattr ) + virtfs? ( xattr ) vnc? ( gnutls ) vte? ( gtk ) multipath? ( udev ) @@ -137,6 +156,8 @@ ALL_DEPEND=" # Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) # softmmu targets (qemu-system-*). SOFTMMU_TOOLS_DEPEND=" + sys-libs/libcap-ng[static-libs(+)] + >=sys-libs/libseccomp-2.1.0[static-libs(+)] >=x11-libs/pixman-0.28.0[static-libs(+)] accessibility? ( app-accessibility/brltty[api] @@ -147,9 +168,8 @@ SOFTMMU_TOOLS_DEPEND=" bpf? ( dev-libs/libbpf:= ) bzip2? ( app-arch/bzip2[static-libs(+)] ) capstone? ( dev-libs/capstone:= ) - caps? ( sys-libs/libcap-ng[static-libs(+)] ) curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) - fdt? ( >=sys-apps/dtc-1.5.0[static-libs(+)] ) + fdt? ( >=sys-apps/dtc-1.5.1[static-libs(+)] ) fuse? ( >=sys-fs/fuse-3.1:3[static-libs(+)] ) glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) gnutls? ( @@ -165,7 +185,7 @@ SOFTMMU_TOOLS_DEPEND=" io-uring? ( sys-libs/liburing:=[static-libs(+)] ) jack? ( virtual/jack ) jemalloc? ( dev-libs/jemalloc ) - jpeg? ( virtual/jpeg:0=[static-libs(+)] ) + jpeg? ( media-libs/libjpeg-turbo:=[static-libs(+)] ) lzo? ( dev-libs/lzo:2[static-libs(+)] ) multipath? ( sys-fs/multipath-tools ) ncurses? ( @@ -190,7 +210,6 @@ SOFTMMU_TOOLS_DEPEND=" media-libs/libsdl2[static-libs(+)] ) sdl-image? ( media-libs/sdl2-image[static-libs(+)] ) - seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) slirp? ( net-libs/libslirp[static-libs(+)] ) smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] ) snappy? ( app-arch/snappy:= ) @@ -209,34 +228,44 @@ SOFTMMU_TOOLS_DEPEND=" zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] ) " -EDK2_OVMF_VERSION="202105" -SEABIOS_VERSION="1.14.0" +EDK2_OVMF_VERSION="202202" +SEABIOS_VERSION="1.16.0" X86_FIRMWARE_DEPEND=" pin-upstream-blobs? ( - ~sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION}[binary] + ~sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} ~sys-firmware/ipxe-1.21.1[binary,qemu] - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} ~sys-firmware/sgabios-0.1_pre10[binary] ) !pin-upstream-blobs? ( - >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} + || ( + >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} + >=sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} + ) sys-firmware/ipxe[qemu] - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) sys-firmware/sgabios )" PPC_FIRMWARE_DEPEND=" pin-upstream-blobs? ( - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} ) !pin-upstream-blobs? ( - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) ) " BDEPEND=" $(python_gen_impl_dep) dev-lang/perl + dev-util/meson sys-apps/texinfo virtual/pkgconfig doc? ( @@ -274,11 +303,10 @@ RDEPEND="${CDEPEND} )" PATCHES=( - "${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch "${FILESDIR}"/${PN}-6.0.0-make.patch - "${FILESDIR}"/${PN}-6.1.0-strings.patch - "${FILESDIR}"/${PN}-7.0.0-also-build-virtfs-proxy-helper.patch + "${FILESDIR}"/${PN}-7.1.0-also-build-virtfs-proxy-helper.patch + "${FILESDIR}"/${PN}-7.1.0-capstone-include-path.patch ) QA_PREBUILT=" @@ -418,8 +446,13 @@ src_prepare() { # Verbose builds MAKEOPTS+=" V=1" - # Remove bundled copy of libfdt - rm -r dtc || die + # We already force -D_FORTIFY_SOURCE=2 (or 3) in our toolchain, but + # this setting (-U then -D..=2) will prevent us from trying out 3, so + # drop it. No change to level of protection b/c we patch our toolchain. + sed -i -e 's/-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2//' configure || die + + # Remove bundled modules + rm -r dtc meson roms/*/ || die } ## @@ -432,7 +465,7 @@ qemu_src_configure() { local buildtype=$1 local builddir="${S}/${buildtype}-build" - mkdir "${builddir}" + mkdir "${builddir}" || die local conf_opts=( --prefix=/usr @@ -464,10 +497,10 @@ qemu_src_configure() { # are enabled), but it's not really worth the hassle. Disable it # all the time to avoid automatically detecting it. #568856 --disable-gcrypt - --python="${PYTHON}" --cc="$(tc-getCC)" --cxx="$(tc-getCXX)" --host-cc="$(tc-getBUILD_CC)" + $(use_enable alsa) $(use_enable debug debug-info) $(use_enable debug debug-tcg) @@ -518,7 +551,6 @@ qemu_src_configure() { $(conf_softmmu bpf) $(conf_notuser bzip2) $(conf_notuser capstone) - $(conf_notuser caps cap-ng) $(conf_notuser curl) $(conf_tools doc docs) $(conf_notuser fdt) @@ -540,13 +572,12 @@ qemu_src_configure() { $(conf_notuser numa) $(conf_notuser opengl) $(conf_notuser pam auth-pam) - $(conf_notuser png vnc-png) + $(conf_notuser png) $(conf_notuser rbd) $(conf_notuser sasl vnc-sasl) $(conf_notuser sdl) $(conf_softmmu sdl-image) - $(conf_notuser seccomp) - $(conf_notuser slirp slirp system) + $(conf_notuser slirp) $(conf_notuser smartcard) $(conf_notuser snappy) $(conf_notuser spice) @@ -556,8 +587,6 @@ qemu_src_configure() { $(conf_notuser usbredir usb-redir) $(conf_notuser vde) $(conf_notuser vhost-net) - $(conf_notuser vhost-user-fs) - $(conf_tools vhost-user-fs virtiofsd) $(conf_notuser virgl virglrenderer) $(conf_softmmu virtfs) $(conf_notuser vnc) @@ -592,6 +621,8 @@ qemu_src_configure() { --disable-system --disable-blobs --disable-tools + --disable-cap-ng + --disable-seccomp ) local static_flag="static-user" ;; @@ -600,6 +631,8 @@ qemu_src_configure() { --disable-linux-user --enable-system --disable-tools + --enable-cap-ng + --enable-seccomp ) local static_flag="static" ;; @@ -609,6 +642,8 @@ qemu_src_configure() { --disable-system --disable-blobs --enable-tools + --enable-cap-ng + --enable-seccomp ) local static_flag="static" ;; @@ -673,22 +708,22 @@ src_configure() { src_compile() { if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" + cd "${S}/user-build" || die default fi if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" + cd "${S}/softmmu-build" || die default fi - cd "${S}/tools-build" + cd "${S}/tools-build" || die default } src_test() { if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" + cd "${S}/softmmu-build" || die pax-mark m */qemu-system-* #515550 emake check fi @@ -785,19 +820,24 @@ src_install() { fi fi - cd "${S}/tools-build" + cd "${S}/tools-build" || die emake DESTDIR="${ED}" install + # If USE=doc, there'll be newly generated docs which we install instead. + if ! use doc && [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + doman "${WORKDIR}"/${PN}-${QEMU_DOCS_VERSION}-docs/docs/*.[0-8] + fi + # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 - pushd "${ED}"/usr/bin >/dev/null + pushd "${ED}"/usr/bin >/dev/null || die pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 - popd >/dev/null + popd >/dev/null || die # Install config file example for qemu-bridge-helper insinto "/etc/qemu" doins "${FILESDIR}/bridge.conf" - cd "${S}" + cd "${S}" || die dodoc MAINTAINERS docs/specs/pci-ids.txt newdoc pc-bios/README README.pc-bios @@ -806,10 +846,7 @@ src_install() { if [[ -n ${softmmu_targets} ]]; then # Remove SeaBIOS since we're using the SeaBIOS packaged one - rm "${ED}/usr/share/qemu/bios.bin" - rm "${ED}/usr/share/qemu/bios-256k.bin" if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../seabios/bios.bin /usr/share/qemu/bios.bin dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin fi @@ -820,6 +857,7 @@ src_install() { rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" rm "${ED}/usr/share/qemu/vgabios-virtio.bin" rm "${ED}/usr/share/qemu/vgabios-vmware.bin" + # PPC/PPC64 loads vgabios-stdvga if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin @@ -831,13 +869,11 @@ src_install() { fi # Remove sgabios since we're using the sgabios packaged one - rm "${ED}/usr/share/qemu/sgabios.bin" if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin fi # Remove iPXE since we're using the iPXE packaged one - rm "${ED}"/usr/share/qemu/pxe-*.rom if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom @@ -870,16 +906,27 @@ pkg_postinst() { xdg_icon_cache_update [[ -z ${EPREFIX} ]] && [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \ - fcaps cap_net_admin ${EROOT}/usr/libexec/qemu-bridge-helper + fcaps cap_net_admin "${EROOT}"/usr/libexec/qemu-bridge-helper DISABLE_AUTOFORMATTING=true readme.gentoo_print_elog if use pin-upstream-blobs && firmware_abi_change; then ewarn "This version of qemu pins new versions of firmware blobs:" - ewarn " $(best_version sys-firmware/edk2-ovmf)" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + ewarn " $(best_version sys-firmware/edk2-ovmf-bin)" + else + ewarn " $(best_version sys-firmware/edk2-ovmf)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + ewarn " $(best_version sys-firmware/seabios-bin)" + else + ewarn " $(best_version sys-firmware/seabios)" + fi + ewarn " $(best_version sys-firmware/ipxe)" - ewarn " $(best_version sys-firmware/seabios)" ewarn " $(best_version sys-firmware/sgabios)" ewarn "This might break resume of hibernated guests (started with a different" ewarn "firmware version) and live migration to/from qemu versions with different" @@ -893,22 +940,24 @@ pkg_postinst() { pkg_info() { echo "Using:" echo " $(best_version app-emulation/spice-protocol)" - echo " $(best_version sys-firmware/edk2-ovmf)" - if has_version 'sys-firmware/edk2-ovmf[binary]'; then - echo " USE=binary" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + echo " $(best_version sys-firmware/edk2-ovmf-bin)" else - echo " USE=''" + echo " $(best_version sys-firmware/edk2-ovmf)" fi + + if has_version 'sys-firmware/seabios-bin'; then + echo " $(best_version sys-firmware/seabios-bin)" + else + echo " $(best_version sys-firmware/seabios)" + fi + echo " $(best_version sys-firmware/ipxe)" - echo " $(best_version sys-firmware/seabios)" - if has_version 'sys-firmware/seabios[binary]'; then - echo " USE=binary" - else - echo " USE=''" - fi echo " $(best_version sys-firmware/sgabios)" } pkg_postrm() { xdg_icon_cache_update + udev_reload } diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-9999.ebuild index b927c59815..a9019ee984 100644 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-9999.ebuild @@ -1,20 +1,32 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{8,9,10} ) +# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-qemu-docs +# Set to 1 if prebuilt, 0 if not +# (the construct below is to allow overriding from env for script) +: ${QEMU_DOCS_PREBUILT:=1} + +QEMU_DOCS_PREBUILT_DEV=sam +QEMU_DOCS_VERSION=$(ver_cut 1-3) +# Default to generating docs (inc. man pages) if no prebuilt; overridden later +# bug #830088 +QEMU_DOC_USEFLAG="+doc" + +PYTHON_COMPAT=( python3_{9,10,11} ) PYTHON_REQ_USE="ncurses,readline" -FIRMWARE_ABI_VERSION="6.2.0" +FIRMWARE_ABI_VERSION="7.2.0" inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \ pax-utils xdg-utils -if [[ ${PV} = *9999* ]]; then +if [[ ${PV} == *9999* ]]; then + QEMU_DOCS_PREBUILT=0 + EGIT_REPO_URI="https://gitlab.com/qemu-project/qemu.git/" EGIT_SUBMODULES=( - meson tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3 ui/keycodemapdb @@ -22,8 +34,15 @@ if [[ ${PV} = *9999* ]]; then inherit git-r3 SRC_URI="" else - SRC_URI="https://download.qemu.org/${P}.tar.xz" - KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" + MY_P="${PN}-${PV/_rc/-rc}" + SRC_URI="https://download.qemu.org/${MY_P}.tar.xz" + + if [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + SRC_URI+=" !doc? ( https://dev.gentoo.org/~${QEMU_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${QEMU_DOCS_VERSION}-docs.tar.xz )" + fi + + S="${WORKDIR}/${MY_P}" + [[ "${PV}" != *_rc* ]] && KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" fi DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" @@ -32,7 +51,9 @@ HOMEPAGE="https://www.qemu.org https://www.linux-kvm.org" LICENSE="GPL-2 LGPL-2 BSD-2" SLOT="0" -IUSE="accessibility +aio alsa bpf bzip2 capstone +caps +curl debug +doc +[[ ${QEMU_DOCS_PREBUILT} == 1 ]] && QEMU_DOC_USEFLAG="doc" + +IUSE="accessibility +aio alsa bpf bzip2 capstone +curl debug ${QEMU_DOC_USEFLAG} +fdt fuse glusterfs +gnutls gtk infiniband iscsi io-uring jack jemalloc +jpeg lzo multipath @@ -40,7 +61,7 @@ IUSE="accessibility +aio alsa bpf bzip2 capstone +caps +curl debug +doc plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux +slirp smartcard snappy spice ssh static static-user systemtap test udev usb - usbredir vde +vhost-net vhost-user-fs virgl virtfs +vnc vte xattr xen + usbredir vde +vhost-net virgl virtfs +vnc vte xattr xen zstd" COMMON_TARGETS=" @@ -50,6 +71,7 @@ COMMON_TARGETS=" cris hppa i386 + loongarch64 m68k microblaze microblazeel @@ -94,9 +116,11 @@ use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) IUSE+=" ${use_softmmu_targets} ${use_user_targets}" RESTRICT="!test? ( test )" + # Allow no targets to be built so that people can get a tools-only build. # Block USE flag configurations known to not work. -REQUIRED_USE="${PYTHON_REQUIRED_USE} +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} qemu_softmmu_targets_arm? ( fdt ) qemu_softmmu_targets_microblaze? ( fdt ) qemu_softmmu_targets_mips64el? ( fdt ) @@ -108,14 +132,16 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE} sdl-image? ( sdl ) static? ( static-user !alsa !gtk !jack !opengl !pam !pulseaudio !plugins !rbd !snappy !udev ) static-user? ( !plugins ) - vhost-user-fs? ( caps seccomp ) virgl? ( opengl ) - virtfs? ( caps xattr ) + virtfs? ( xattr ) vnc? ( gnutls ) vte? ( gtk ) multipath? ( udev ) plugins? ( !static !static-user ) " +for smname in ${IUSE_SOFTMMU_TARGETS} ; do + REQUIRED_USE+=" qemu_softmmu_targets_${smname}? ( seccomp ) " +done # Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) # and user/softmmu targets (qemu-*, qemu-system-*). @@ -135,6 +161,7 @@ ALL_DEPEND=" # Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) # softmmu targets (qemu-system-*). SOFTMMU_TOOLS_DEPEND=" + sys-libs/libcap-ng[static-libs(+)] >=x11-libs/pixman-0.28.0[static-libs(+)] accessibility? ( app-accessibility/brltty[api] @@ -145,9 +172,8 @@ SOFTMMU_TOOLS_DEPEND=" bpf? ( dev-libs/libbpf:= ) bzip2? ( app-arch/bzip2[static-libs(+)] ) capstone? ( dev-libs/capstone:= ) - caps? ( sys-libs/libcap-ng[static-libs(+)] ) curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) - fdt? ( >=sys-apps/dtc-1.5.0[static-libs(+)] ) + fdt? ( >=sys-apps/dtc-1.5.1[static-libs(+)] ) fuse? ( >=sys-fs/fuse-3.1:3[static-libs(+)] ) glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) gnutls? ( @@ -163,7 +189,7 @@ SOFTMMU_TOOLS_DEPEND=" io-uring? ( sys-libs/liburing:=[static-libs(+)] ) jack? ( virtual/jack ) jemalloc? ( dev-libs/jemalloc ) - jpeg? ( virtual/jpeg:0=[static-libs(+)] ) + jpeg? ( media-libs/libjpeg-turbo:=[static-libs(+)] ) lzo? ( dev-libs/lzo:2[static-libs(+)] ) multipath? ( sys-fs/multipath-tools ) ncurses? ( @@ -207,34 +233,44 @@ SOFTMMU_TOOLS_DEPEND=" zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] ) " -EDK2_OVMF_VERSION="202105" -SEABIOS_VERSION="1.14.0" +EDK2_OVMF_VERSION="202202" +SEABIOS_VERSION="1.16.0" X86_FIRMWARE_DEPEND=" pin-upstream-blobs? ( - ~sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION}[binary] + ~sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} ~sys-firmware/ipxe-1.21.1[binary,qemu] - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} ~sys-firmware/sgabios-0.1_pre10[binary] ) !pin-upstream-blobs? ( - >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} + || ( + >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} + >=sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} + ) sys-firmware/ipxe[qemu] - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) sys-firmware/sgabios )" PPC_FIRMWARE_DEPEND=" pin-upstream-blobs? ( - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} ) !pin-upstream-blobs? ( - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) ) " BDEPEND=" $(python_gen_impl_dep) dev-lang/perl + dev-util/meson sys-apps/texinfo virtual/pkgconfig doc? ( @@ -272,11 +308,10 @@ RDEPEND="${CDEPEND} )" PATCHES=( - "${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch "${FILESDIR}"/${PN}-6.0.0-make.patch - "${FILESDIR}"/${PN}-6.1.0-strings.patch - "${FILESDIR}"/${PN}-7.0.0-also-build-virtfs-proxy-helper.patch + "${FILESDIR}"/${PN}-7.1.0-also-build-virtfs-proxy-helper.patch + "${FILESDIR}"/${PN}-7.1.0-capstone-include-path.patch ) QA_PREBUILT=" @@ -416,8 +451,13 @@ src_prepare() { # Verbose builds MAKEOPTS+=" V=1" - # Remove bundled copy of libfdt - rm -r dtc || die + # We already force -D_FORTIFY_SOURCE=2 (or 3) in our toolchain, but + # this setting (-U then -D..=2) will prevent us from trying out 3, so + # drop it. No change to level of protection b/c we patch our toolchain. + sed -i -e 's/-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2//' configure || die + + # Remove bundled modules + rm -r dtc meson roms/*/ || die } ## @@ -430,7 +470,7 @@ qemu_src_configure() { local buildtype=$1 local builddir="${S}/${buildtype}-build" - mkdir "${builddir}" + mkdir "${builddir}" || die local conf_opts=( --prefix=/usr @@ -462,10 +502,10 @@ qemu_src_configure() { # are enabled), but it's not really worth the hassle. Disable it # all the time to avoid automatically detecting it. #568856 --disable-gcrypt - --python="${PYTHON}" --cc="$(tc-getCC)" --cxx="$(tc-getCXX)" --host-cc="$(tc-getBUILD_CC)" + $(use_enable alsa) $(use_enable debug debug-info) $(use_enable debug debug-tcg) @@ -516,7 +556,6 @@ qemu_src_configure() { $(conf_softmmu bpf) $(conf_notuser bzip2) $(conf_notuser capstone) - $(conf_notuser caps cap-ng) $(conf_notuser curl) $(conf_tools doc docs) $(conf_notuser fdt) @@ -538,13 +577,13 @@ qemu_src_configure() { $(conf_notuser numa) $(conf_notuser opengl) $(conf_notuser pam auth-pam) - $(conf_notuser png vnc-png) + $(conf_notuser png) $(conf_notuser rbd) $(conf_notuser sasl vnc-sasl) $(conf_notuser sdl) $(conf_softmmu sdl-image) $(conf_notuser seccomp) - $(conf_notuser slirp slirp system) + $(conf_notuser slirp) $(conf_notuser smartcard) $(conf_notuser snappy) $(conf_notuser spice) @@ -554,8 +593,6 @@ qemu_src_configure() { $(conf_notuser usbredir usb-redir) $(conf_notuser vde) $(conf_notuser vhost-net) - $(conf_notuser vhost-user-fs) - $(conf_tools vhost-user-fs virtiofsd) $(conf_notuser virgl virglrenderer) $(conf_softmmu virtfs) $(conf_notuser vnc) @@ -590,6 +627,8 @@ qemu_src_configure() { --disable-system --disable-blobs --disable-tools + --disable-cap-ng + --disable-seccomp ) local static_flag="static-user" ;; @@ -598,6 +637,8 @@ qemu_src_configure() { --disable-linux-user --enable-system --disable-tools + --enable-cap-ng + --enable-seccomp ) local static_flag="static" ;; @@ -607,6 +648,7 @@ qemu_src_configure() { --disable-system --disable-blobs --enable-tools + --enable-cap-ng ) local static_flag="static" ;; @@ -671,22 +713,22 @@ src_configure() { src_compile() { if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" + cd "${S}/user-build" || die default fi if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" + cd "${S}/softmmu-build" || die default fi - cd "${S}/tools-build" + cd "${S}/tools-build" || die default } src_test() { if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" + cd "${S}/softmmu-build" || die pax-mark m */qemu-system-* #515550 emake check fi @@ -783,19 +825,24 @@ src_install() { fi fi - cd "${S}/tools-build" + cd "${S}/tools-build" || die emake DESTDIR="${ED}" install + # If USE=doc, there'll be newly generated docs which we install instead. + if ! use doc && [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + doman "${WORKDIR}"/${PN}-${QEMU_DOCS_VERSION}-docs/docs/*.[0-8] + fi + # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 - pushd "${ED}"/usr/bin >/dev/null + pushd "${ED}"/usr/bin >/dev/null || die pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 - popd >/dev/null + popd >/dev/null || die # Install config file example for qemu-bridge-helper insinto "/etc/qemu" doins "${FILESDIR}/bridge.conf" - cd "${S}" + cd "${S}" || die dodoc MAINTAINERS docs/specs/pci-ids.txt newdoc pc-bios/README README.pc-bios @@ -804,10 +851,7 @@ src_install() { if [[ -n ${softmmu_targets} ]]; then # Remove SeaBIOS since we're using the SeaBIOS packaged one - rm "${ED}/usr/share/qemu/bios.bin" - rm "${ED}/usr/share/qemu/bios-256k.bin" if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../seabios/bios.bin /usr/share/qemu/bios.bin dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin fi @@ -818,6 +862,7 @@ src_install() { rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" rm "${ED}/usr/share/qemu/vgabios-virtio.bin" rm "${ED}/usr/share/qemu/vgabios-vmware.bin" + # PPC/PPC64 loads vgabios-stdvga if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin @@ -829,13 +874,11 @@ src_install() { fi # Remove sgabios since we're using the sgabios packaged one - rm "${ED}/usr/share/qemu/sgabios.bin" if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin fi # Remove iPXE since we're using the iPXE packaged one - rm "${ED}"/usr/share/qemu/pxe-*.rom if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom @@ -868,16 +911,27 @@ pkg_postinst() { xdg_icon_cache_update [[ -z ${EPREFIX} ]] && [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \ - fcaps cap_net_admin ${EROOT}/usr/libexec/qemu-bridge-helper + fcaps cap_net_admin "${EROOT}"/usr/libexec/qemu-bridge-helper DISABLE_AUTOFORMATTING=true readme.gentoo_print_elog if use pin-upstream-blobs && firmware_abi_change; then ewarn "This version of qemu pins new versions of firmware blobs:" - ewarn " $(best_version sys-firmware/edk2-ovmf)" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + ewarn " $(best_version sys-firmware/edk2-ovmf-bin)" + else + ewarn " $(best_version sys-firmware/edk2-ovmf)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + ewarn " $(best_version sys-firmware/seabios-bin)" + else + ewarn " $(best_version sys-firmware/seabios)" + fi + ewarn " $(best_version sys-firmware/ipxe)" - ewarn " $(best_version sys-firmware/seabios)" ewarn " $(best_version sys-firmware/sgabios)" ewarn "This might break resume of hibernated guests (started with a different" ewarn "firmware version) and live migration to/from qemu versions with different" @@ -891,22 +945,24 @@ pkg_postinst() { pkg_info() { echo "Using:" echo " $(best_version app-emulation/spice-protocol)" - echo " $(best_version sys-firmware/edk2-ovmf)" - if has_version 'sys-firmware/edk2-ovmf[binary]'; then - echo " USE=binary" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + echo " $(best_version sys-firmware/edk2-ovmf-bin)" else - echo " USE=''" + echo " $(best_version sys-firmware/edk2-ovmf)" fi + + if has_version 'sys-firmware/seabios-bin'; then + echo " $(best_version sys-firmware/seabios-bin)" + else + echo " $(best_version sys-firmware/seabios)" + fi + echo " $(best_version sys-firmware/ipxe)" - echo " $(best_version sys-firmware/seabios)" - if has_version 'sys-firmware/seabios[binary]'; then - echo " USE=binary" - else - echo " USE=''" - fi echo " $(best_version sys-firmware/sgabios)" } pkg_postrm() { xdg_icon_cache_update + udev_reload } From 7c740e1cb0bd82d4bd573d54f970eff86a5893a3 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 16 Jan 2023 15:47:17 +0100 Subject: [PATCH 02/38] app-portage/elt-patches: Sync with Gentoo It's from Gentoo commit 66ef9c583a0688d3d9ade0a6d6ba81f921d2a9ac. --- .../app-portage/elt-patches/Manifest | 5 ++-- .../elt-patches/elt-patches-20201205.ebuild | 23 ------------------- ...104.ebuild => elt-patches-20220831.ebuild} | 4 ++-- ...924.ebuild => elt-patches-20221210.ebuild} | 9 ++++---- .../app-portage/elt-patches/metadata.xml | 4 ++++ 5 files changed, 13 insertions(+), 32 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20201205.ebuild rename sdk_container/src/third_party/portage-stable/app-portage/elt-patches/{elt-patches-20211104.ebuild => elt-patches-20220831.ebuild} (71%) rename sdk_container/src/third_party/portage-stable/app-portage/elt-patches/{elt-patches-20210924.ebuild => elt-patches-20221210.ebuild} (53%) diff --git a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/Manifest b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/Manifest index 4cd226b41e..e7c3087e8d 100644 --- a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/Manifest +++ b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/Manifest @@ -1,3 +1,2 @@ -DIST elt-patches-20201205.tar.xz 39240 BLAKE2B aa2e2377f0d0cba14f38c59664174d066eff04c9d2a71346c998c4324987fbce25cfd91b79e8e40bde0d81bf7d3c43126bffd0a6b0b219aaad11f4f9f22abde4 SHA512 67e199f060e2c93e01b7a7809f52c0a18d82e86f1b1eb34b965c2acd24e5538a874b820028e363d3002cf58b43c2fe3376ae28d2bef0ca81feabb90c83ae47c2 -DIST elt-patches-20210924.tar.xz 40140 BLAKE2B 81970936e9a362cb9ee51a381e4fd2f888c62df2fdcf7af419c3574d37857988c92daa3b1b90530f453aa532161dd0bdd3697d4c3b0a0a47a05a7546e7fd5052 SHA512 3a55d053e488590a78bbfe0a4eb3153ea51ca70784708e0131016771a1c1dab591a42442b2d97d1a335c9a209fc03410df3cd56741d6f7cffb92d0737c5944c2 -DIST elt-patches-20211104.tar.xz 41608 BLAKE2B 971ec0f6753267d49a64ab65645ac547322fa4cfe64b3102bbaa4419c0ed0973c0ee44e40c15b2d34e94979cbe9c64b027f4bb7c5adf3d3acee07f3f98bd7704 SHA512 c583bfa45eb16835f83a881eb587c81f0fb2cfd3eff5239e794efb83c046f5cecceeee3f5387585b9d7f68efe5f439344d2cdfc83c9fad5b207e82dff3d8cc67 +DIST elt-patches-20220831.tar.xz 41696 BLAKE2B c328faac2bc837fff5b9ec7dd2a891d3ab08ee30fb38d838fa6aeebbb832eb30db1f3d3b05e64c14f9cef27a21516cb6d960d7afe2314f37e25a0f77ef5d2862 SHA512 3cced1f515533ce65cef42a3c697ad0686a6c41a1b734c4558690cbdee4ebe60214b3d7f8dbb81974fc100a6882d83599f2dc77c206d9beea2449b2614319d1c +DIST elt-patches-20221210.tar.xz 42080 BLAKE2B abcdae6dedac89bd913d6809d335c13cd59b675c4b68198925bf758013e988a9bf82e9f6ccc3a70ac1c49775bb7579addda6c0bb7ea4ceea3c4b8e4acf0d65ea SHA512 3dad3c0be8d69de731bb10d5a6007539c2966f8a370a3dee27faf9655a38e39f272a9059cd98c8b6f32c2495143667f8b28a6a3425f22c0c5421f3969b417cf7 diff --git a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20201205.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20201205.ebuild deleted file mode 100644 index 2723789299..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20201205.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Collection of patches for libtool.eclass" -HOMEPAGE="https://gitweb.gentoo.org/proj/elt-patches.git/" -SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" - -RDEPEND="sys-apps/gentoo-functions" -BDEPEND="app-arch/xz-utils" - -src_compile() { - emake rootprefix="${EPREFIX}" libdirname="$(get_libdir)" -} - -src_install() { - emake DESTDIR="${D}" rootprefix="${EPREFIX}" install -} diff --git a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20211104.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20220831.ebuild similarity index 71% rename from sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20211104.ebuild rename to sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20220831.ebuild index 9cf32e76ec..2e87d726f4 100644 --- a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20211104.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20220831.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI=8 DESCRIPTION="Collection of patches for libtool.eclass" HOMEPAGE="https://gitweb.gentoo.org/proj/elt-patches.git/" @@ -11,7 +11,7 @@ SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" RDEPEND="sys-apps/gentoo-functions" BDEPEND="app-arch/xz-utils" diff --git a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20210924.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20221210.ebuild similarity index 53% rename from sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20210924.ebuild rename to sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20221210.ebuild index b228aabe08..e9ea9fdac8 100644 --- a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20210924.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20221210.ebuild @@ -1,16 +1,17 @@ -# 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 DESCRIPTION="Collection of patches for libtool.eclass" HOMEPAGE="https://gitweb.gentoo.org/proj/elt-patches.git/" SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz - https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" + https://dev.gentoo.org/~vapier/dist/${P}.tar.xz + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" RDEPEND="sys-apps/gentoo-functions" BDEPEND="app-arch/xz-utils" diff --git a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/metadata.xml b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/metadata.xml index 65e1fc82d8..03193409a7 100644 --- a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/metadata.xml @@ -4,4 +4,8 @@ base-system@gentoo.org + + proj/elt-patches + gentoo/elt-patches + From 1f6ba36d827ffae74b4d358771e10fbdbcb62094 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 11:04:40 +0200 Subject: [PATCH 03/38] dev-libs/elfutils: Sync with Gentoo It's from Gentoo commit 741a870f29fe2b0927e6f5b80edd72593a72991d. --- .../portage-stable/dev-libs/elfutils/Manifest | 7 +- .../dev-libs/elfutils/elfutils-0.185.ebuild | 95 ------------------- ...ils-0.186.ebuild => elfutils-0.188.ebuild} | 77 ++++++++++----- .../dev-libs/elfutils/metadata.xml | 1 - 4 files changed, 55 insertions(+), 125 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/elfutils/elfutils-0.185.ebuild rename sdk_container/src/third_party/portage-stable/dev-libs/elfutils/{elfutils-0.186.ebuild => elfutils-0.188.ebuild} (52%) diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/elfutils/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/elfutils/Manifest index 6af4e92e7b..98e41ab110 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/elfutils/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/elfutils/Manifest @@ -1,4 +1,3 @@ -DIST elfutils-0.185-patches.tar.gz 7625 BLAKE2B 92aff147aa7e45976863e8129e25ecad74ad9bca231c9223897094c5933c3b350eb525a203b492d80c1eabee3b3808b43e30bdb879d7173eac968afa2005e97c SHA512 3f253c4de97190731ac157044572912b76df80f9473f3df335f0383dad6409f987593a749c5284672cf1b20241ac3ed9d77b126f730aaf594725703b6a426906 -DIST elfutils-0.185.tar.bz2 9187627 BLAKE2B 57cfa7e4060975c4bf6170dbd354687a19a92f7069c060db1ac2fa4da5a9d34e8bddd07c7ce376b5c28b5670ad5b8c1df795164cbcfb600a44cf1db60c20c4af SHA512 34de0de1355b11740e036e0fc64f2fc063587c8eb121b19216ee5548d3f0f268d8fc3995176c47190466b9d881007cfa11a9d01e9a50e38af6119492bf8bb47f -DIST elfutils-0.186-patches.tar.gz 3323 BLAKE2B 360365597d3a08d6f4fe843d04bcddd07a44ca93dae2034615abc450517e1be21c81a55aa379c409902e134ae795b38bb7461c65cdba3934ac7ef1e4e0e53091 SHA512 e2d427be505fdc416751a1fbc3bb4f39577859d94ce43990faa83c135fe36be2ddb3a2ef0f1020cfa37060e6d43dc7b8cf3db0d07d62b31bf29cb9a4a5945ce1 -DIST elfutils-0.186.tar.bz2 9230491 BLAKE2B 49573d0a1f3519eab81d1ba3e94354cbc0935a36a94a3fdb22fe223a47b78cca8fd6e322870b0e335a809529fa6f54180b13c67936dec0242123c54ba20c9fc9 SHA512 c9180b27ec62935f18b9431268d176f6023d1bb938731d2af6e7626ae460af6608a70ba68483aa1ec7e6cb0fa0528b661ca8b68bc4f58ea8e18af527c5950c78 +DIST elfutils-0.187-patches.tar.xz 2804 BLAKE2B 77cbd0666d8da3d5229baaba6605c84e7990200f39bfb72b2008eb2527e4567abd90c93c291cc0c8f3c10bbf97758ccf5877cbdae823780cf8dc97ff4ff2f932 SHA512 d056fdd6ae0e71471087af472a72384d6e73ff2d7fe1b708b5ec9f091a913c8327197660132b7a6619a0db86534715507ef67ee91691a00a591c1d24c55a99f4 +DIST elfutils-0.188.tar.bz2 9112977 BLAKE2B 6b0474f1436eaf6af73b735b9b2ddd5448ab9c03fbaa0be745a31c89ae8f15b0e21a651409c38643ca125794ce82c19d7b46db4a079f3e72cb919d643560e7a4 SHA512 585551b2d937d19d1becfc2f28935db1dd1a3d25571a62f322b70ac8da98c1a741a55d070327705df6c3e2ee026652e0b9a3c733b050a0b0ec5f2fc75d5b74b5 +DIST elfutils-0.188.tar.bz2.sig 310 BLAKE2B c8d9135cffde3b1dd337b692d5351855cf799915d3ebd553327febaac192bd2f108b3f45a6376d458e179390a1ceaf4809762cdc40ea1e05fed0214ac33ed56e SHA512 4cc8a7417d244e319a1650d71b1831660cfe41afc7c73e9c83d1f076f4013fe15247e8b4f5e12a5396d83c4f1c7663ca4be5ea42bff3dc23263f85331fd9d566 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/elfutils/elfutils-0.185.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/elfutils/elfutils-0.185.ebuild deleted file mode 100644 index 26aeca00e2..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/elfutils/elfutils-0.185.ebuild +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright 2003-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit flag-o-matic multilib-minimal - -DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)" -HOMEPAGE="http://elfutils.org/" -SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2" -SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-0.185-patches.tar.gz" - -LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" -IUSE="bzip2 lzma nls static-libs test +threads +utils valgrind zstd" - -RDEPEND=">=sys-libs/zlib-1.2.8-r1[static-libs?,${MULTILIB_USEDEP}] - bzip2? ( >=app-arch/bzip2-1.0.6-r4[static-libs?,${MULTILIB_USEDEP}] ) - lzma? ( >=app-arch/xz-utils-5.0.5-r1[static-libs?,${MULTILIB_USEDEP}] ) - zstd? ( app-arch/zstd:=[static-libs?,${MULTILIB_USEDEP}] ) - elibc_musl? ( - dev-libs/libbsd - sys-libs/argp-standalone - sys-libs/fts-standalone - sys-libs/obstack-standalone - ) - !dev-libs/libelf -" -DEPEND="${RDEPEND} - valgrind? ( dev-util/valgrind ) -" -BDEPEND="nls? ( sys-devel/gettext ) - >=sys-devel/flex-2.5.4a - sys-devel/m4 -" -RESTRICT="!test? ( test )" - -PATCHES=( - "${WORKDIR}"/${PN}-0.185-patches/ -) - -src_prepare() { - default - - if use elibc_musl; then - eapply "${WORKDIR}"/${PN}-0.185-patches/musl/ - fi - - if ! use static-libs; then - sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in || die - fi - # https://sourceware.org/PR23914 - sed -i 's:-Werror::' */Makefile.in || die -} - -src_configure() { - use test && append-flags -g #407135 - - # Symbol aliases are implemented as asm statements. - # Will require porting: https://gcc.gnu.org/PR48200 - filter-flags '-flto*' - - multilib-minimal_src_configure -} - -multilib_src_configure() { - ECONF_SOURCE="${S}" econf \ - $(use_enable nls) \ - $(use_enable threads thread-safety) \ - $(use_enable valgrind) \ - --disable-debuginfod \ - --disable-libdebuginfod \ - --program-prefix="eu-" \ - --with-zlib \ - $(use_with bzip2 bzlib) \ - $(use_with lzma) \ - $(use_with zstd) -} - -multilib_src_test() { - env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \ - LC_ALL="C" \ - emake check VERBOSE=1 -} - -multilib_src_install_all() { - einstalldocs - dodoc NOTES - # These build quick, and are needed for most tests, so don't - # disable their building when the USE flag is disabled. - if ! use utils; then - rm -rf "${ED}"/usr/bin || die - fi -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/elfutils/elfutils-0.186.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/elfutils/elfutils-0.188.ebuild similarity index 52% rename from sdk_container/src/third_party/portage-stable/dev-libs/elfutils/elfutils-0.186.ebuild rename to sdk_container/src/third_party/portage-stable/dev-libs/elfutils/elfutils-0.188.ebuild index 1cb0347622..77b5fbb7fb 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/elfutils/elfutils-0.186.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/elfutils/elfutils-0.188.ebuild @@ -1,21 +1,26 @@ # Copyright 2003-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit flag-o-matic multilib-minimal +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/elfutils.gpg +inherit flag-o-matic multilib-minimal verify-sig DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)" -HOMEPAGE="https://elfutils.org/" +HOMEPAGE="https://sourceware.org/elfutils/" SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2" -SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-0.186-patches.tar.gz" +SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-0.187-patches.tar.xz" +SRC_URI+=" verify-sig? ( https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2.sig )" LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" -IUSE="bzip2 lzma nls static-libs test +threads +utils valgrind zstd" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +IUSE="bzip2 lzma nls static-libs test +utils valgrind zstd" +RESTRICT="!test? ( test )" -RDEPEND=">=sys-libs/zlib-1.2.8-r1[static-libs?,${MULTILIB_USEDEP}] +RDEPEND=" + !dev-libs/libelf + >=sys-libs/zlib-1.2.8-r1[static-libs?,${MULTILIB_USEDEP}] bzip2? ( >=app-arch/bzip2-1.0.6-r4[static-libs?,${MULTILIB_USEDEP}] ) lzma? ( >=app-arch/xz-utils-5.0.5-r1[static-libs?,${MULTILIB_USEDEP}] ) zstd? ( app-arch/zstd:=[static-libs?,${MULTILIB_USEDEP}] ) @@ -25,26 +30,36 @@ RDEPEND=">=sys-libs/zlib-1.2.8-r1[static-libs?,${MULTILIB_USEDEP}] sys-libs/fts-standalone sys-libs/obstack-standalone ) - !dev-libs/libelf " -DEPEND="${RDEPEND} +DEPEND=" + ${RDEPEND} valgrind? ( dev-util/valgrind ) " -BDEPEND="nls? ( sys-devel/gettext ) +BDEPEND=" >=sys-devel/flex-2.5.4a sys-devel/m4 + nls? ( sys-devel/gettext ) + verify-sig? ( sec-keys/openpgp-keys-elfutils ) " -RESTRICT="!test? ( test )" PATCHES=( - "${WORKDIR}"/${PN}-0.186-patches/ + "${WORKDIR}"/${PN}-0.187-patches/ ) +src_unpack() { + if use verify-sig ; then + # Needed for downloaded patch (which is unsigned, which is fine) + verify-sig_verify_detached "${DISTDIR}"/${P}.tar.bz2{,.sig} + fi + + default +} + src_prepare() { default if use elibc_musl; then - eapply "${WORKDIR}"/${PN}-0.186-patches/musl/ + eapply "${WORKDIR}"/${PN}-0.187-patches/musl/ fi if ! use static-libs; then @@ -56,7 +71,8 @@ src_prepare() { } src_configure() { - use test && append-flags -g #407135 + # bug #407135 + use test && append-flags -g # Symbol aliases are implemented as asm statements. # Will require porting: https://gcc.gnu.org/PR48200 @@ -66,28 +82,39 @@ src_configure() { } multilib_src_configure() { - ECONF_SOURCE="${S}" econf \ - $(use_enable nls) \ - $(use_enable threads thread-safety) \ - $(use_enable valgrind) \ - --disable-debuginfod \ - --disable-libdebuginfod \ - --program-prefix="eu-" \ - --with-zlib \ - $(use_with bzip2 bzlib) \ - $(use_with lzma) \ + local myeconfargs=( + $(use_enable nls) + --disable-debuginfod + --disable-libdebuginfod + + # explicitly disable thread safety, it's not recommended by upstream + # doesn't build either on musl. + --disable-thread-safety + + # Valgrind option is just for running tests under it; dodgy under sandbox + # and indeed even w/ glibc with newer instructions. + --disable-valgrind + --program-prefix="eu-" + --with-zlib + $(use_with bzip2 bzlib) + $(use_with lzma) $(use_with zstd) + ) + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" } multilib_src_test() { - env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \ + env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \ LC_ALL="C" \ emake check VERBOSE=1 } multilib_src_install_all() { einstalldocs + dodoc NOTES + # These build quick, and are needed for most tests, so don't # disable their building when the USE flag is disabled. if ! use utils; then diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/elfutils/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/elfutils/metadata.xml index a420f7e0a9..d91314ed4c 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/elfutils/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-libs/elfutils/metadata.xml @@ -7,7 +7,6 @@ Support automatic decompression of LZMA-compressed files and kernel images - Build the libraries with thread safe support Install command-line utilities (all the eu-* programs) Add support for memory debugging using dev-util/valgrind From 39469ca19ea23fe4f4abea16607e4f75b429aff6 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:48:11 +0200 Subject: [PATCH 04/38] dev-libs/gmp: Sync with Gentoo It's from Gentoo commit bddccb7e144cb5fd20c2e775a228e16702083fe2. --- .../portage-stable/dev-libs/gmp/Manifest | 1 + .../gmp/files/gmp-6.2.1-CVE-2021-43618.patch | 17 ++ ...mp-6.2.1-r1.ebuild => gmp-6.2.1-r2.ebuild} | 20 +- .../dev-libs/gmp/gmp-6.2.1-r5.ebuild | 178 ++++++++++++++++++ .../portage-stable/dev-libs/gmp/metadata.xml | 34 ++-- 5 files changed, 229 insertions(+), 21 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/gmp/files/gmp-6.2.1-CVE-2021-43618.patch rename sdk_container/src/third_party/portage-stable/dev-libs/gmp/{gmp-6.2.1-r1.ebuild => gmp-6.2.1-r2.ebuild} (81%) create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/gmp/gmp-6.2.1-r5.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/gmp/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/gmp/Manifest index 4db6b7b967..846b78dc76 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/gmp/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/gmp/Manifest @@ -1,2 +1,3 @@ +DIST gmp-6.2.1-arm64-darwin.patch.bz2 2520 BLAKE2B 3d4e9dbd29dc9aa81f0c9e0de4a5904c989d54148c9e3dcc5097a43b3fb1ecd17802dacfc71ee131c0805a345f5dce9009e88439758d3a0ed8b3a88526353b4a SHA512 72d49f09c3facd75036c945e076207e72e5673ba9605999c32a122e43e8b970ed646c8ca8f07acbb62bff5e7c387d4c8e1f73ca73e50ac3f574b5f6471d66d56 DIST gmp-6.2.1.tar.xz 2027316 BLAKE2B c0d85f175392a50cfa01bc6b0a312b235946ad8b4f6f84f6dabd33d7a6f2cc75c9b0e1e33057be07750bfa0145b7c4cf3b6188a5be6ca9d7271ec2276c84ebcb SHA512 c99be0950a1d05a0297d65641dd35b75b74466f7bf03c9e8a99895a3b2f9a0856cd17887738fa51cf7499781b65c049769271cbcb77d057d2e9f1ec52e07dd84 DIST gmp-man-6.2.1.pdf 827583 BLAKE2B 9aa25457a3c488e37cc7d54d825253ab749a3780919570579b319cf607001de50b212ca387b70213abcc5ab428b4525bdb9cd8ae932798a2d7928da98ce3f353 SHA512 f2d9d02e97975355ef490e921fedc94fb7687c3661eec8fa2e94a1622b6e59b17b3879eb3ec1f2df8edac100f727175144d107f4c49c602b773c43bc9e91dbcb diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/gmp/files/gmp-6.2.1-CVE-2021-43618.patch b/sdk_container/src/third_party/portage-stable/dev-libs/gmp/files/gmp-6.2.1-CVE-2021-43618.patch new file mode 100644 index 0000000000..90129ec5b2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/gmp/files/gmp-6.2.1-CVE-2021-43618.patch @@ -0,0 +1,17 @@ +https://bugs.gentoo.org/823804 +https://gmplib.org/repo/gmp-6.2/rev/561a9c25298e +--- a/mpz/inp_raw.c ++++ b/mpz/inp_raw.c +@@ -88,8 +88,11 @@ mpz_inp_raw (mpz_ptr x, FILE *fp) + + abs_csize = ABS (csize); + ++ if (UNLIKELY (abs_csize > ~(mp_bitcnt_t) 0 / 8)) ++ return 0; /* Bit size overflows */ ++ + /* round up to a multiple of limbs */ +- abs_xsize = BITS_TO_LIMBS (abs_csize*8); ++ abs_xsize = BITS_TO_LIMBS ((mp_bitcnt_t) abs_csize * 8); + + if (abs_xsize != 0) + { diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/gmp/gmp-6.2.1-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/gmp/gmp-6.2.1-r2.ebuild similarity index 81% rename from sdk_container/src/third_party/portage-stable/dev-libs/gmp/gmp-6.2.1-r1.ebuild rename to sdk_container/src/third_party/portage-stable/dev-libs/gmp/gmp-6.2.1-r2.ebuild index 2b5f277c70..ae2140240b 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/gmp/gmp-6.2.1-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/gmp/gmp-6.2.1-r2.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 -inherit flag-o-matic libtool multilib-minimal toolchain-funcs +inherit libtool multilib-minimal toolchain-funcs MY_PV=${PV/_p*} MY_PV=${MY_PV/_/-} @@ -13,14 +13,17 @@ MY_P=${PN}-${MY_PV} PLEVEL=${PV/*p} DESCRIPTION="Library for arbitrary-precision arithmetic on different type of numbers" HOMEPAGE="https://gmplib.org/" -SRC_URI="ftp://ftp.gmplib.org/pub/${MY_P}/${MY_P}.tar.xz +SRC_URI=" + https://gmplib.org/download/gmp/${MY_P}.tar.xz mirror://gnu/${PN}/${MY_P}.tar.xz - doc? ( https://gmplib.org/${PN}-man-${MANUAL_PV}.pdf )" + doc? ( https://gmplib.org/${PN}-man-${MANUAL_PV}.pdf ) +" +SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-arm64-darwin.patch.bz2" LICENSE="|| ( LGPL-3+ GPL-2+ )" # The subslot reflects the C & C++ SONAMEs. SLOT="0/10.4" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="+asm doc +cxx pic static-libs" BDEPEND="sys-devel/m4 @@ -35,6 +38,8 @@ MULTILIB_WRAPPED_HEADERS=( /usr/include/gmp.h ) PATCHES=( "${FILESDIR}"/${PN}-6.1.0-noexecstack-detect.patch "${FILESDIR}"/${PN}-6.2.1-no-zarch.patch + "${WORKDIR}"/${P}-arm64-darwin.patch + "${FILESDIR}"/${P}-CVE-2021-43618.patch ) src_prepare() { @@ -75,11 +80,6 @@ multilib_src_configure() { esac export GMPABI - # bug #367719 - if [[ ${CHOST} == *-mint* ]]; then - filter-flags -O? - fi - tc-export CC # --with-pic forces static libraries to be built as PIC diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/gmp/gmp-6.2.1-r5.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/gmp/gmp-6.2.1-r5.ebuild new file mode 100644 index 0000000000..566858f65c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/gmp/gmp-6.2.1-r5.ebuild @@ -0,0 +1,178 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit gnuconfig libtool multilib-minimal toolchain-funcs + +MY_PV=${PV/_p*} +MY_PV=${MY_PV/_/-} + +MANUAL_PV=${MY_PV} +MANUAL_PV=6.2.1 + +MY_P=${PN}-${MY_PV} +PLEVEL=${PV/*p} + +DESCRIPTION="Library for arbitrary-precision arithmetic on different type of numbers" +HOMEPAGE="https://gmplib.org/" +SRC_URI=" + https://gmplib.org/download/gmp/${MY_P}.tar.xz + mirror://gnu/${PN}/${MY_P}.tar.xz + doc? ( https://gmplib.org/${PN}-man-${MANUAL_PV}.pdf ) +" +SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-arm64-darwin.patch.bz2" +S="${WORKDIR}"/${MY_P%a} + +LICENSE="|| ( LGPL-3+ GPL-2+ )" +# The subslot reflects the C & C++ SONAMEs. +SLOT="0/10.4" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="+asm doc +cpudetection +cxx pic static-libs" +REQUIRED_USE="cpudetection? ( asm )" +RESTRICT="!cpudetection? ( bindist )" + +BDEPEND=" + app-arch/xz-utils + sys-devel/m4 +" + +DOCS=( AUTHORS ChangeLog NEWS README doc/configuration doc/isa_abi_headache ) +HTML_DOCS=( doc ) + +MULTILIB_WRAPPED_HEADERS=( /usr/include/gmp.h ) + +PATCHES=( + "${FILESDIR}"/${PN}-6.1.0-noexecstack-detect.patch + "${FILESDIR}"/${PN}-6.2.1-no-zarch.patch + "${WORKDIR}"/${P}-arm64-darwin.patch + "${FILESDIR}"/${P}-CVE-2021-43618.patch +) + +pkg_pretend() { + if use cpudetection && ! use amd64 && ! use x86 ; then + elog "Using generic C implementation on non-amd64/x86 with USE=cpudetection" + elog "--enable-fat is a no-op on alternative arches." + elog "To obtain an optimized build, set USE=-cpudetection, but binpkgs should not then be made." + fi +} + +src_prepare() { + default + + # We cannot run autotools here as gcc depends on this package + elibtoolize + + # bug #536894 + if [[ ${CHOST} == *-darwin* ]] ; then + eapply "${FILESDIR}"/${PN}-6.1.2-gcc-apple-4.0.1.patch + fi + + # GMP uses the "ABI" env var during configure as does Gentoo (econf). + # So, to avoid patching the source constantly, wrap things up. + mv configure configure.wrapped || die + cat <<-\EOF > configure + #!/usr/bin/env sh + exec env ABI="${GMPABI}" "$0.wrapped" "$@" + EOF + + # Patches to original configure might have lost the +x bit. + chmod a+rx configure{,.wrapped} || die + + # Save the upstream files named config.{guess,sub} which are + # wrappers around the gnuconfig versions. + mkdir "${T}"/gmp-gnuconfig || die + mv config.guess "${T}"/gmp-gnuconfig/config.guess || die + mv config.sub "${T}"/gmp-gnuconfig/config.sub || die + # Grab fresh copies from gnuconfig. + touch config.guess config.sub || die + gnuconfig_update + # Rename the fresh copies to the filenames the wrappers from GMP + # expect. + mv config.guess configfsf.guess || die + mv config.sub configfsf.sub || die +} + +multilib_src_configure() { + # Because of our 32-bit userland, 1.0 is the only HPPA ABI that works + # https://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613) + if [[ ${CHOST} == hppa2.0-* ]] ; then + GMPABI="1.0" + fi + + # ABI mappings (needs all architectures supported) + case ${ABI} in + 32|x86) GMPABI=32;; + 64|amd64|n64) GMPABI=64;; + [onx]32) GMPABI=${ABI};; + esac + export GMPABI + + tc-export CC + + # https://gmplib.org/manual/Notes-for-Package-Builds + local myeconfargs=( + CC_FOR_BUILD="$(tc-getBUILD_CC)" + + --localstatedir="${EPREFIX}"/var/state/gmp + --enable-shared + + $(use_enable asm assembly) + # fat is needed to avoid gmp installing either purely generic + # or specific-to-used-CPU (which our config.guess refresh prevents at the moment). + # Both Fedora and opensuse use this option to tackle the issue, bug #883201. + # + # This only works for amd64/x86, so to get accelerated performance + # (i.e. not using the generic C), one needs USE=-cpudetection if + # on non-amd64/x86. + # + # (We do not mask USE=cpudetection on !amd64/x86 because we want + # the flag to be useful on other arches to allow opting out of the + # config.guess logic below.) + $(use_enable cpudetection fat) + $(use_enable cxx) + $(use_enable static-libs static) + + # --with-pic forces static libraries to be built as PIC + # and without TEXTRELs. musl does not support TEXTRELs: bug #707332 + $(use pic && echo --with-pic) + ) + + # Move the wrappers from GMP back into place (may have been destroyed by previous econf run) + cp "${T}"/gmp-gnuconfig/config.guess "${S}"/config.guess || die + cp "${T}"/gmp-gnuconfig/config.sub "${S}"/config.sub || die + + # See bug #883201 again. + if ! use cpudetection && ! tc-is-cross-compiler ; then + local gmp_host=$("${S}"/config.guess || die "failed to run config.guess") + + if [[ -z ${gmp_host} ]] ; then + die "Empty result from GMP's custom config.guess!" + fi + + einfo "GMP guessed processor type: ${gmp_host}" + ewarn "This build will only work on this machine. Enable USE=cpudetection for binary packages!" + export ac_cv_build="${gmp_host}" + export ac_cv_host="${gmp_host}" + fi + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_install() { + emake DESTDIR="${D}" install + + # Should be a standalone lib + rm -f "${ED}"/usr/$(get_libdir)/libgmp.la + + # This requires libgmp + local la="${ED}/usr/$(get_libdir)/libgmpxx.la" + if ! use static-libs ; then + rm -f "${la}" || die + fi +} + +multilib_src_install_all() { + einstalldocs + use doc && cp "${DISTDIR}"/gmp-man-${MANUAL_PV}.pdf "${ED}"/usr/share/doc/${PF}/ +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/gmp/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/gmp/metadata.xml index e98fbcba68..591e777c61 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/gmp/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-libs/gmp/metadata.xml @@ -1,15 +1,27 @@ - - toolchain@gentoo.org - Gentoo Toolchain Project - - - Enable use of hand optimized assembly routines (faster execution) - Force static libraries to be built as PIC to avoid TEXTRELs. - - - cpe:/a:gmplib:gmp - + + toolchain@gentoo.org + Gentoo Toolchain Project + + + Enable use of hand optimized assembly routines (faster execution) + + Enables runtime CPU detection (useful for binpkgs, compatibility on other CPUs). + + This only works on amd64/x86 at present. + + If this flag is enabled, GMP will work on a variety of amd64/x86 CPUs and load accelerated + routines for use at runtime depending on the CPU in use. This makes it suitable + for binary packages (binpkgs). + + If this flag is disabled, GMP will be tuned for the CPU being used at build-time + and may not be usable on other machines. + + Force static libraries to be built as PIC to avoid TEXTRELs. + + + cpe:/a:gmplib:gmp + From 079ab0679fce70573034fba1413f67a493c67133 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:22:13 +0200 Subject: [PATCH 05/38] dev-libs/libaio: Sync with Gentoo It's from Gentoo commit 28dbca461e35f42c1159d62a7613b0a56e98110a. --- .../portage-stable/dev-libs/libaio/Manifest | 2 +- .../libaio-0.3.111-optional-werror.patch | 30 ------------------ .../files/libaio-0.3.113-32-bit-tests.patch | 31 +++++++++++++++++++ ...h => libaio-0.3.113-respect-LDFLAGS.patch} | 3 +- ...o-0.3.112.ebuild => libaio-0.3.113.ebuild} | 29 ++++++++++------- .../dev-libs/libaio/libaio-9999.ebuild | 28 ++++++++++------- .../dev-libs/libaio/metadata.xml | 3 ++ 7 files changed, 69 insertions(+), 57 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.111-optional-werror.patch create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.113-32-bit-tests.patch rename sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/{libaio-0.3.112-respect-LDFLAGS.patch => libaio-0.3.113-respect-LDFLAGS.patch} (92%) rename sdk_container/src/third_party/portage-stable/dev-libs/libaio/{libaio-0.3.112.ebuild => libaio-0.3.113.ebuild} (73%) diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/Manifest index e956615f88..9c1b05bdcf 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/Manifest @@ -1 +1 @@ -DIST libaio-0.3.112.tar.gz 46977 BLAKE2B 088f3b195a65bdc97ae2318e47af17c65259ed3208dca7bfef93c81a800602085e5b2078dbd436c740be316d0ebd923a1b3b7c0808257e2e7c7fb0f7ae1e0dba SHA512 5f984529c9f747a6c82f1e4457fc0832bb1fc299ae6e700f2ac5a8ea7b9bfc6ea1e75809728cc115a020cff6685ed1f4e38c6aeacc1ea98dfccce04dd19dafaa +DIST libaio-0.3.113.tar.gz 49980 BLAKE2B 2379c88670310b36942563d10f29dfcba0f49391952ffe7fe18b0c917f33ef610405fe13297d1dbb34b7ad1d3066d4a32587a7fb20babba2f264cfc2ab289e57 SHA512 65c30a102433bf8386581b03fc706d84bd341be249fbdee11a032b237a7b239e8c27413504fef15e2797b1acd67f752526637005889590ecb380e2e120ab0b71 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.111-optional-werror.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.111-optional-werror.patch deleted file mode 100644 index 5b6f91e56d..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.111-optional-werror.patch +++ /dev/null @@ -1,30 +0,0 @@ -From ebe62b178f3e5fcde8a311e64aaffe62099204a5 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger -Date: Sun, 21 Apr 2019 12:44:26 +0200 -Subject: [PATCH] make -Werror into an optional flag - -This lets distros disable the flag as random errors might come up with -different compiler flags and older/newer toolchain versions. - -Signed-off-by: Mike Frysinger ---- - harness/Makefile | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/harness/Makefile b/harness/Makefile -index f477737..a155c4b 100644 ---- a/harness/Makefile -+++ b/harness/Makefile -@@ -6,7 +6,8 @@ PROGS:=$(PARTPROGS) $(EXTRAPROGS) - HARNESS_SRCS:=main.c - # io_queue.c - --CFLAGS+=-Wall -Werror -I../src -g -O2 -DPAGE_SIZE=$(shell getconf PAGESIZE) -+CFLAGS_WERROR?=-Werror -+CFLAGS+=-Wall $(CFLAGS_WERROR) -I../src -g -O2 -DPAGE_SIZE=$(shell getconf PAGESIZE) - #-lpthread -lrt - - all: $(PROGS) --- -2.21.0 - diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.113-32-bit-tests.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.113-32-bit-tests.patch new file mode 100644 index 0000000000..e8ad07a5cd --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.113-32-bit-tests.patch @@ -0,0 +1,31 @@ +https://pagure.io/libaio/pull-request/22.patch +https://pagure.io/libaio/pull-request/22 +https://pagure.io/libaio/issue/21 + +From b8eadc9f89e8f7ab0338eacda9f98a6caea76883 Mon Sep 17 00:00:00 2001 +From: Andreas Baumann +Date: Jun 02 2022 11:33:11 +0000 +Subject: harness: use off64_t instead of off_t in test 23.t (EINVAL on 32-bit) + +--- a/harness/cases/23.t ++++ b/harness/cases/23.t +@@ -72,7 +72,7 @@ static void fail_errno(const char *format, ...) + static void *thrproc2(void *arg) + { + for (;;) { +- off_t offset = 0; ++ off64_t offset = 0; + + pthread_barrier_wait(&barrier); + if (exiting) +@@ -92,7 +92,7 @@ static void *thrproc3(void *arg) + { + for (;;) { + char c; +- off_t offset = 0; ++ off64_t offset = 0; + + pthread_barrier_wait(&barrier); + if (exiting) + + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.112-respect-LDFLAGS.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.113-respect-LDFLAGS.patch similarity index 92% rename from sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.112-respect-LDFLAGS.patch rename to sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.113-respect-LDFLAGS.patch index 20e23874fb..f9ac2037ff 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.112-respect-LDFLAGS.patch +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.113-respect-LDFLAGS.patch @@ -2,12 +2,11 @@ We need to place LDFLAGS earlier to ensure e.g. as-needed works correctly. --- a/src/Makefile +++ b/src/Makefile @@ -56,7 +56,7 @@ libaio.a: $(libaio_objs) - $(RANLIB) libaio.a $(libname): $(libaio_sobjs) libaio.map + $(CC) $(CFLAGS) -c struct_offsets.c - $(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS) + $(CC) $(SO_CFLAGS) $(LINK_FLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) install: $(all_targets) install -D -m 644 libaio.h $(includedir)/libaio.h - diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-0.3.112.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-0.3.113.ebuild similarity index 73% rename from sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-0.3.112.ebuild rename to sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-0.3.113.ebuild index a83b08bd98..b622dac3a8 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-0.3.112.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-0.3.113.ebuild @@ -1,18 +1,18 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI=7 inherit multilib-minimal toolchain-funcs flag-o-matic usr-ldscript DESCRIPTION="Asynchronous input/output library that uses the kernels native interface" HOMEPAGE="https://pagure.io/libaio" -if [[ "${PV}" == 9999 ]] ; then +if [[ ${PV} == 9999 ]] ; then inherit git-r3 EGIT_REPO_URI="https://pagure.io/libaio.git" else SRC_URI="https://releases.pagure.org/${PN}/${P}.tar.gz" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" fi LICENSE="LGPL-2" SLOT="0" @@ -21,8 +21,8 @@ RESTRICT="!test? ( test )" PATCHES=( "${FILESDIR}"/${PN}-0.3.112-cppflags.patch - "${FILESDIR}"/${PN}-0.3.111-optional-werror.patch - "${FILESDIR}"/${PN}-0.3.112-respect-LDFLAGS.patch + "${FILESDIR}"/${PN}-0.3.113-respect-LDFLAGS.patch + "${FILESDIR}"/${PN}-0.3.113-32-bit-tests.patch ) src_prepare() { @@ -31,18 +31,22 @@ src_prepare() { local sed_args=( -e "/^prefix=/s:/usr:${EPREFIX}/usr:" -e '/^libdir=/s:lib$:$(ABI_LIBDIR):' + -e 's:-Werror ::' ) if ! use static-libs; then sed_args+=( -e '/\tinstall .*\/libaio.a/d' ) # Tests require the static library to be built. use test || sed_args+=( -e '/^all_targets +=/s/ libaio.a//' ) fi - sed -i "${sed_args[@]}" src/Makefile Makefile || die + sed -i "${sed_args[@]}" src/Makefile harness/Makefile Makefile || die multilib_copy_sources } multilib_src_configure() { + # Upstream aren't interested in fixing: bug #855698 + filter-lto + if use arm ; then # When building for thumb, we can't allow frame pointers. # http://crbug.com/464517 @@ -53,10 +57,10 @@ multilib_src_configure() { } _emake() { - CC=$(tc-getCC) \ - AR=$(tc-getAR) \ - RANLIB=$(tc-getRANLIB) \ - ABI_LIBDIR=$(get_libdir) \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR)" \ + RANLIB="$(tc-getRANLIB)" \ + ABI_LIBDIR="$(get_libdir)" \ CFLAGS_WERROR= \ emake "$@" } @@ -67,6 +71,7 @@ multilib_src_compile() { multilib_src_test() { mkdir -p testdir || die + # 'make check' breaks with sandbox, 'make partcheck' works _emake partcheck prefix="${S}/src" libdir="${S}/src" } @@ -79,7 +84,7 @@ multilib_src_install_all() { doman man/* dodoc ChangeLog TODO - # move crap to / for multipath-tools #325355 + # move to / for multipath-tools, bug #325355 gen_usr_ldscript -a aio # This lib is a bare minimal shim on top of kernel syscalls. diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-9999.ebuild index 232c536818..db2f93f975 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-9999.ebuild @@ -1,18 +1,18 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI=7 inherit multilib-minimal toolchain-funcs flag-o-matic usr-ldscript DESCRIPTION="Asynchronous input/output library that uses the kernels native interface" HOMEPAGE="https://pagure.io/libaio" -if [[ "${PV}" == 9999 ]] ; then +if [[ ${PV} == 9999 ]] ; then inherit git-r3 EGIT_REPO_URI="https://pagure.io/libaio.git" else SRC_URI="https://releases.pagure.org/${PN}/${P}.tar.gz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" fi LICENSE="LGPL-2" SLOT="0" @@ -21,8 +21,7 @@ RESTRICT="!test? ( test )" PATCHES=( "${FILESDIR}"/${PN}-0.3.112-cppflags.patch - "${FILESDIR}"/${PN}-0.3.111-optional-werror.patch - "${FILESDIR}"/${PN}-0.3.112-respect-LDFLAGS.patch + "${FILESDIR}"/${PN}-0.3.113-respect-LDFLAGS.patch ) src_prepare() { @@ -31,18 +30,22 @@ src_prepare() { local sed_args=( -e "/^prefix=/s:/usr:${EPREFIX}/usr:" -e '/^libdir=/s:lib$:$(ABI_LIBDIR):' + -e 's:-Werror ::' ) if ! use static-libs; then sed_args+=( -e '/\tinstall .*\/libaio.a/d' ) # Tests require the static library to be built. use test || sed_args+=( -e '/^all_targets +=/s/ libaio.a//' ) fi - sed -i "${sed_args[@]}" src/Makefile Makefile || die + sed -i "${sed_args[@]}" src/Makefile harness/Makefile Makefile || die multilib_copy_sources } multilib_src_configure() { + # Upstream aren't interested in fixing: bug #855698 + filter-lto + if use arm ; then # When building for thumb, we can't allow frame pointers. # http://crbug.com/464517 @@ -53,10 +56,10 @@ multilib_src_configure() { } _emake() { - CC=$(tc-getCC) \ - AR=$(tc-getAR) \ - RANLIB=$(tc-getRANLIB) \ - ABI_LIBDIR=$(get_libdir) \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR)" \ + RANLIB="$(tc-getRANLIB)" \ + ABI_LIBDIR="$(get_libdir)" \ CFLAGS_WERROR= \ emake "$@" } @@ -67,6 +70,7 @@ multilib_src_compile() { multilib_src_test() { mkdir -p testdir || die + # 'make check' breaks with sandbox, 'make partcheck' works _emake partcheck prefix="${S}/src" libdir="${S}/src" } @@ -79,7 +83,7 @@ multilib_src_install_all() { doman man/* dodoc ChangeLog TODO - # move crap to / for multipath-tools #325355 + # move to / for multipath-tools, bug #325355 gen_usr_ldscript -a aio # This lib is a bare minimal shim on top of kernel syscalls. diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/metadata.xml index 8035a4003e..9a4bc45597 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/metadata.xml @@ -5,6 +5,9 @@ base-system@gentoo.org Gentoo Base System + + cpe:/a:libaio_project:libaio + Library to provide user-level kernel Asynchronous I/O (AIO) support for Linux (needs kernel patches as of 2.6.12) From 42a19dc5aa15c368f1ff1c515059ac12494b4cb2 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:27:14 +0200 Subject: [PATCH 06/38] dev-libs/nettle: Sync with Gentoo It's from Gentoo commit 5cbd73313ea7907047e614d4b3009eea044f0fad. --- .../portage-stable/dev-libs/nettle/Manifest | 3 +- .../dev-libs/nettle/metadata.xml | 1 + .../dev-libs/nettle/nettle-3.7.3.ebuild | 67 --------------- .../dev-libs/nettle/nettle-3.8.1.ebuild | 84 +++++++++++++++++++ 4 files changed, 87 insertions(+), 68 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/nettle/nettle-3.7.3.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/nettle/nettle-3.8.1.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/nettle/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/nettle/Manifest index bdf71382ac..e7503051d5 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/nettle/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/nettle/Manifest @@ -1 +1,2 @@ -DIST nettle-3.7.3.tar.gz 2383985 BLAKE2B 8d8efbbff98fc1f3eff3296681d3d72346e78392f356aebfe80138ae6ae1ebf3695bd7f74b906beef0cf3625ba6d84bdb43c0f6707f54f4d98870d50c90ac9a3 SHA512 9901eba305421adff6d551ac7f478dff3f68a339d444c776724ab0b977fe6be792b1d2950c8705acbe76bd924fd6d898a65eded546777884be3b436d0e052437 +DIST nettle-3.8.1.tar.gz 2406251 BLAKE2B 22b4ec81645b579504356597ba87b637e46285682020c90e03ecaea386ac9b48eaf91ee76ae3b86b6060be355de20c320ab3b74958074ad23fc08ad9ab6a4cbb SHA512 a405da3438d185d96917b03b00abb9ab43e04f58f770f657f716c25d64bb258ee170a71328e74736caa7121f50c0c89d3cc840c1201d2a92cfaf1357d24bdc6a +DIST nettle-3.8.1.tar.gz.sig 374 BLAKE2B e2bfce4aaa1be114fb9bf8724f25db75c69c3b98538df46e9b1428ce615f7db3b9e9f9240d232fddac195db4568439b3f58989c20beca82aa6db79f4956db547 SHA512 978304b1faa5adc3b0d6ea7e9597af6154ad5d6e328913ac19184ece94771fdb2a7d5ce0af535ae8d28cb6ccd94fb3d4ef2613c0356df9e08b5d4c26ea646e09 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/nettle/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/nettle/metadata.xml index a654b0cda0..62b7968b92 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/nettle/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-libs/nettle/metadata.xml @@ -7,6 +7,7 @@ cpe:/a:nettle_project:nettle + gnutls/nettle Support assembly hand optimized crypto functions (i.e. faster run time) diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/nettle/nettle-3.7.3.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/nettle/nettle-3.7.3.ebuild deleted file mode 100644 index 88f5f2c3fe..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/nettle/nettle-3.7.3.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 autotools multilib-build multilib-minimal toolchain-funcs - -DESCRIPTION="Low-level cryptographic library" -HOMEPAGE="http://www.lysator.liu.se/~nisse/nettle/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" - -LICENSE="|| ( LGPL-3 LGPL-2.1 )" -SLOT="0/8-6" # subslot = libnettle - libhogweed soname version -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="+asm doc +gmp static-libs test cpu_flags_x86_aes cpu_flags_arm_neon cpu_flags_x86_sha" -RESTRICT="!test? ( test )" - -DEPEND="gmp? ( >=dev-libs/gmp-6.1:0=[static-libs?,${MULTILIB_USEDEP}] )" -RDEPEND="${DEPEND}" -BDEPEND="doc? ( sys-apps/texinfo )" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/nettle/version.h -) - -DOCS=() -HTML_DOCS=() - -pkg_setup() { - use doc && DOCS+=( - nettle.pdf - ) - use doc && HTML_DOCS+=( - nettle.html - ) -} - -src_prepare() { - default - - # I do not see in config.sub reference to sunldsolaris. - # if someone complains readd - # -e 's/solaris\*)/sunldsolaris*)/' \ - sed -e '/CFLAGS=/s: -ggdb3::' \ - -i configure.ac || die - - eautoreconf -} - -multilib_src_configure() { - local myeconfargs=( - CC_FOR_BUILD="$(tc-getBUILD_CC)" - $(tc-is-static-only && echo --disable-shared) - $(use_enable cpu_flags_x86_aes x86-aesni) - $(use_enable cpu_flags_x86_sha x86-sha-ni) - $(use_enable asm assembler) - $(use_enable doc documentation) - $(use_enable gmp public-key) - $(use_enable cpu_flags_arm_neon arm-neon) - $(use_enable static-libs static) - --disable-fat - # --disable-openssl bug #427526 - --disable-openssl - --libdir="${EPREFIX}"/usr/$(get_libdir) - ) - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/nettle/nettle-3.8.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/nettle/nettle-3.8.1.ebuild new file mode 100644 index 0000000000..b342934797 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/nettle/nettle-3.8.1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/nettle.asc +inherit multilib-build multilib-minimal toolchain-funcs verify-sig + +DESCRIPTION="Low-level cryptographic library" +HOMEPAGE="http://www.lysator.liu.se/~nisse/nettle/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" +SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.gz.sig )" + +LICENSE="|| ( LGPL-3 LGPL-2.1 )" +# Subslot = libnettle - libhogweed soname version +SLOT="0/8-6" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="+asm doc +gmp static-libs cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_ppc_altivec cpu_flags_x86_aes cpu_flags_x86_sha cpu_flags_x86_pclmul" +# The arm64 crypto option controls AES, SHA1, and SHA2 usage. +REQUIRED_USE="cpu_flags_arm_aes? ( cpu_flags_arm_sha1 cpu_flags_arm_sha2 ) + cpu_flags_arm_sha1? ( cpu_flags_arm_aes cpu_flags_arm_sha2 ) + cpu_flags_arm_sha2? ( cpu_flags_arm_aes cpu_flags_arm_sha1 )" + +DEPEND="gmp? ( >=dev-libs/gmp-6.1:0=[static-libs?,${MULTILIB_USEDEP}] )" +RDEPEND="${DEPEND}" +BDEPEND=" + sys-devel/m4 + doc? ( sys-apps/texinfo ) + verify-sig? ( sec-keys/openpgp-keys-nettle ) +" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/nettle/version.h +) + +DOCS=() +HTML_DOCS=() + +src_prepare() { + default + + # I do not see in config.sub reference to sunldsolaris. + # if someone complains readd + # -e 's/solaris\*)/sunldsolaris*)/' \ + sed -e '/CFLAGS=/s: -ggdb3::' \ + -i configure.ac configure || die + + if use doc ; then + DOCS+=( nettle.pdf ) + HTML_DOCS+=( nettle.html ) + fi +} + +multilib_src_configure() { + local myeconfargs=( + CC_FOR_BUILD="$(tc-getBUILD_CC)" + + $(tc-is-static-only && echo --disable-shared) + + # Intrinsics + $(use_enable cpu_flags_arm_neon arm-neon) + $(use_enable cpu_flags_arm_aes arm64-crypto) + $(use_enable cpu_flags_ppc_altivec power-altivec) + $(use_enable cpu_flags_x86_aes x86-aesni) + $(use_enable cpu_flags_x86_sha x86-sha-ni) + $(use_enable cpu_flags_x86_pclmul x86-pclmul) + # TODO: PPC crypto flag? + --disable-power-crypto-ext + # TODO: cpu_flags_s390? + --disable-s390x-vf + --disable-s390x-msa + + $(use_enable asm assembler) + $(multilib_native_use_enable doc documentation) + $(use_enable gmp public-key) + $(use_enable static-libs static) + --disable-fat + + # openssl is just used for benchmarks (bug #427526) + --disable-openssl + ) + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} From 20946607012acce79ef53159ff7eee02670739e8 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 16 Jan 2023 16:00:13 +0100 Subject: [PATCH 07/38] eclass/desktop: Sync with Gentoo It's from Gentoo commit 60f30e1ae6f8aa1d3dc75424acb4a030679b22fb. --- .../portage-stable/eclass/desktop.eclass | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/desktop.eclass b/sdk_container/src/third_party/portage-stable/eclass/desktop.eclass index 82e764e2a1..aa1b9ac68d 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/desktop.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/desktop.eclass @@ -1,11 +1,17 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: desktop.eclass # @MAINTAINER: # base-system@gentoo.org +# @SUPPORTED_EAPIS: 6 7 8 # @BLURB: support for desktop files, menus, and icons +case ${EAPI} in + 6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_DESKTOP_ECLASS} ]]; then _DESKTOP_ECLASS=1 @@ -156,19 +162,18 @@ make_desktop_entry() { ;; esac fi - local slot=${SLOT%/*} - if [[ ${slot} == "0" ]] ; then - local desktop_name="${PN}" - else - local desktop_name="${PN}-${slot}" - fi + local desktop_exec="${exec%%[[:space:]]*}" desktop_exec="${desktop_exec##*/}" + local desktop_suffix="-${PN}" + [[ ${SLOT%/*} != 0 ]] && desktop_suffix+="-${SLOT%/*}" + # Replace foo-foo.desktop by foo.desktop + [[ ${desktop_suffix#-} == "${desktop_exec}" ]] && desktop_suffix="" # Prevent collisions if a file with the same name already exists #771708 - local desktop="${desktop_exec}-${desktop_name}" count=0 + local desktop="${desktop_exec}${desktop_suffix}" count=0 while [[ -e ${ED}/usr/share/applications/${desktop}.desktop ]]; do - desktop="${desktop_exec}-$((++count))-${desktop_name}" + desktop="${desktop_exec}-$((++count))${desktop_suffix}" done desktop="${T}/${desktop}.desktop" @@ -308,7 +313,7 @@ _iconins() { case ${size} in 16|22|24|32|36|48|64|72|96|128|192|256|512) size=${size}x${size};; - scalable) + symbolic|scalable) ;; *) eerror "${size} is an unsupported icon size!" From c660c19d295627f1885891d4e7c559e27c7e9a57 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 16 Jan 2023 16:01:00 +0100 Subject: [PATCH 08/38] eclass/epatch: Sync with Gentoo It's from Gentoo commit 2a6897bf5a3ac6b8b8c16aa4a330b17edf994566. --- .../portage-stable/eclass/epatch.eclass | 108 ++---------------- 1 file changed, 9 insertions(+), 99 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/epatch.eclass b/sdk_container/src/third_party/portage-stable/eclass/epatch.eclass index 5d18befe55..07f802583f 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/epatch.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/epatch.eclass @@ -1,10 +1,10 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: epatch.eclass # @MAINTAINER: # base-system@gentoo.org -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 +# @SUPPORTED_EAPIS: 6 # @BLURB: easy patch application functions # @DEPRECATED: eapply from EAPI 7 # @DESCRIPTION: @@ -13,11 +13,9 @@ if [[ -z ${_EPATCH_ECLASS} ]]; then -case ${EAPI:-0} in - 0|1|2|3|4|5|6) - ;; - *) - die "${ECLASS}: banned in EAPI=${EAPI}; use eapply* instead";; +case ${EAPI} in + 6) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac inherit estack @@ -52,10 +50,6 @@ EPATCH_COMMON_OPTS="-g0 -E --no-backup-if-mismatch" # List of patches not to apply. Note this is only file names, # and not the full path. Globs accepted. EPATCH_EXCLUDE="" -# @VARIABLE: EPATCH_SINGLE_MSG -# @DESCRIPTION: -# Change the printed message for a single patch. -EPATCH_SINGLE_MSG="" # @VARIABLE: EPATCH_MULTI_MSG # @DESCRIPTION: # Change the printed message for multiple patches. @@ -235,13 +229,9 @@ epatch() { fi if [[ ${SINGLE_PATCH} == "yes" ]] ; then - if [[ -n ${EPATCH_SINGLE_MSG} ]] ; then - einfo "${EPATCH_SINGLE_MSG}" - else - einfo "Applying ${patchname} ..." - fi + ebegin "Applying ${patchname}" else - einfo " ${patchname} ..." + ebegin " ${patchname}" fi # Handle aliased patch command #404447 #461568 @@ -285,13 +275,13 @@ epatch() { # people could (accidently) patch files in the root filesystem. # Or trigger other unpleasantries #237667. So disallow -p0 on # such patches. - local abs_paths=$(egrep -n '^[-+]{3} /' "${PATCH_TARGET}" | awk '$2 != "/dev/null" { print }') + local abs_paths=$(grep -E -n '^[-+]{3} /' "${PATCH_TARGET}" | awk '$2 != "/dev/null" { print }') if [[ -n ${abs_paths} ]] ; then count=1 printf "NOTE: skipping -p0 due to absolute paths in patch:\n%s\n" "${abs_paths}" >> "${STDERR_TARGET}" fi # Similar reason, but with relative paths. - local rel_paths=$(egrep -n '^[-+]{3} [^ ]*[.][.]/' "${PATCH_TARGET}") + local rel_paths=$(grep -E -n '^[-+]{3} [^ ]*[.][.]/' "${PATCH_TARGET}") if [[ -n ${rel_paths} ]] ; then echo eerror "Rejected Patch: ${patchname}!" @@ -386,85 +376,5 @@ epatch() { : # everything worked } -case ${EAPI:-0} in -0|1|2|3|4|5) - -# @ECLASS_VARIABLE: EPATCH_USER_SOURCE -# @USER_VARIABLE -# @DESCRIPTION: -# Location for user patches, see the epatch_user function. -# Should be set by the user. Don't set this in ebuilds. -: ${EPATCH_USER_SOURCE:=${PORTAGE_CONFIGROOT%/}/etc/portage/patches} - -# @FUNCTION: epatch_user -# @USAGE: -# @DESCRIPTION: -# Applies user-provided patches to the source tree. The patches are -# taken from /etc/portage/patches//[:SLOT]/, where the first -# of these three directories to exist will be the one to use, ignoring -# any more general directories which might exist as well. They must end -# in ".patch" to be applied. -# -# User patches are intended for quick testing of patches without ebuild -# modifications, as well as for permanent customizations a user might -# desire. Obviously, there can be no official support for arbitrarily -# patched ebuilds. So whenever a build log in a bug report mentions that -# user patches were applied, the user should be asked to reproduce the -# problem without these. -# -# Not all ebuilds do call this function, so placing patches in the -# stated directory might or might not work, depending on the package and -# the eclasses it inherits and uses. It is safe to call the function -# repeatedly, so it is always possible to add a call at the ebuild -# level. The first call is the time when the patches will be -# applied. -# -# Ideally, this function should be called after gentoo-specific patches -# have been applied, so that their code can be modified as well, but -# before calls to e.g. eautoreconf, as the user patches might affect -# autotool input files as well. -epatch_user() { - [[ $# -ne 0 ]] && die "epatch_user takes no options" - - # Allow multiple calls to this function; ignore all but the first - local applied="${T}/epatch_user.log" - [[ -e ${applied} ]] && return 2 - - # don't clobber any EPATCH vars that the parent might want - local EPATCH_SOURCE check - for check in ${CATEGORY}/{${P}-${PR},${P},${PN}}{,:${SLOT%/*}}; do - EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${CTARGET}/${check} - [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${CHOST}/${check} - [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${check} - if [[ -d ${EPATCH_SOURCE} ]] ; then - local old_n_applied_patches=${EPATCH_N_APPLIED_PATCHES:-0} - EPATCH_SOURCE=${EPATCH_SOURCE} \ - EPATCH_SUFFIX="patch" \ - EPATCH_FORCE="yes" \ - EPATCH_MULTI_MSG="Applying user patches from ${EPATCH_SOURCE} ..." \ - epatch - echo "${EPATCH_SOURCE}" > "${applied}" - if [[ ${old_n_applied_patches} -lt ${EPATCH_N_APPLIED_PATCHES} ]]; then - has epatch_user_death_notice ${EBUILD_DEATH_HOOKS} || \ - EBUILD_DEATH_HOOKS+=" epatch_user_death_notice" - fi - return 0 - fi - done - echo "none" > "${applied}" - return 1 -} - -# @FUNCTION: epatch_user_death_notice -# @INTERNAL -# @DESCRIPTION: -# Include an explicit notice in the die message itself that user patches were -# applied to this build. -epatch_user_death_notice() { - ewarn "!!! User patches were applied to this build!" -} - -esac - _EPATCH_ECLASS=1 fi #_EPATCH_ECLASS From dfb818cb2d888c52e8604219afa199495265eb12 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 16 Jan 2023 16:01:28 +0100 Subject: [PATCH 09/38] eclass/eqawarn: Add from Gentoo It's from Gentoo commit c54b9fc0e02e07d4af019d81de611c865521b369. --- .../portage-stable/eclass/eqawarn.eclass | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/eclass/eqawarn.eclass diff --git a/sdk_container/src/third_party/portage-stable/eclass/eqawarn.eclass b/sdk_container/src/third_party/portage-stable/eclass/eqawarn.eclass new file mode 100644 index 0000000000..288976182f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/eclass/eqawarn.eclass @@ -0,0 +1,26 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: eqawarn.eclass +# @MAINTAINER: +# base-system@gentoo.org +# @SUPPORTED_EAPIS: 6 +# @BLURB: output a QA warning + +case ${EAPI} in + 6) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +# @FUNCTION: eqawarn +# @USAGE: [message] +# @DESCRIPTION: +# Proxy to ewarn for package managers that don't provide eqawarn and +# use the PM implementation if available. Reuses PORTAGE_ELOG_CLASSES +# as set by the dev profile. +if ! declare -F eqawarn >/dev/null ; then + eqawarn() { + has qa ${PORTAGE_ELOG_CLASSES} && ewarn "$@" + : + } +fi From 4935a404f3e7e6a52bf149b10d67c36bd73e406e Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 16 Jan 2023 15:45:00 +0100 Subject: [PATCH 10/38] eclass/eutils: Sync with Gentoo It's from Gentoo commit 77b4d89d0fa056317e53d8a80e216531ee192f8e. --- .../portage-stable/eclass/eutils.eclass | 176 ++---------------- 1 file changed, 12 insertions(+), 164 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/eutils.eclass b/sdk_container/src/third_party/portage-stable/eclass/eutils.eclass index 207d05e7f9..3b6a90fecb 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/eutils.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/eutils.eclass @@ -1,72 +1,28 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: eutils.eclass # @MAINTAINER: # base-system@gentoo.org -# @SUPPORTED_EAPIS: 5 6 7 +# @SUPPORTED_EAPIS: 6 7 # @BLURB: many extra (but common) functions that are used in ebuilds -# @DESCRIPTION: -# The eutils eclass contains a suite of functions that complement -# the ones that ebuild.sh already contain. The idea is that the functions -# are not required in all ebuilds but enough utilize them to have a common -# home rather than having multiple ebuilds implementing the same thing. -# -# Due to the nature of this eclass, some functions may have maintainers -# different from the overall eclass! -# -# This eclass is DEPRECATED and must not be inherited by any new ebuilds -# or eclasses. Use the more specific split eclasses instead, or native -# package manager functions when available. +# @DEPRECATED: native package manager functions, more specific eclasses if [[ -z ${_EUTILS_ECLASS} ]]; then _EUTILS_ECLASS=1 # implicitly inherited (now split) eclasses case ${EAPI} in - 5|6) - inherit desktop edos2unix epatch estack ltprune multilib \ - preserve-libs strip-linguas toolchain-funcs vcs-clean wrapper - ;; + 6) inherit desktop edos2unix epatch eqawarn estack ltprune multilib \ + preserve-libs strip-linguas toolchain-funcs vcs-clean wrapper ;; 7) inherit edos2unix strip-linguas wrapper ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac -# @FUNCTION: emktemp -# @USAGE: [temp dir] -# @DESCRIPTION: -# Cheap replacement for when coreutils (and thus mktemp) does not exist -# on the user's system. emktemp() { - eqawarn "emktemp is deprecated. Create a temporary file in \${T} instead." - - local exe="touch" - [[ $1 == -d ]] && exe="mkdir" && shift - local topdir=$1 - - if [[ -z ${topdir} ]] ; then - [[ -z ${T} ]] \ - && topdir="/tmp" \ - || topdir=${T} - fi - - if ! type -P mktemp > /dev/null ; then - # system lacks `mktemp` so we have to fake it - local tmp=/ - while [[ -e ${tmp} ]] ; do - tmp=${topdir}/tmp.${RANDOM}.${RANDOM}.${RANDOM} - done - ${exe} "${tmp}" || ${exe} -p "${tmp}" - echo "${tmp}" - else - # the args here will give slightly wierd names on BSD, - # but should produce a usable file on all userlands - if [[ ${exe} == "touch" ]] ; then - TMPDIR="${topdir}" mktemp -t tmp.XXXXXXXXXX - else - TMPDIR="${topdir}" mktemp -dt tmp.XXXXXXXXXX - fi - fi + eerror "emktemp has been removed." + eerror "Create a temporary file in \${T} instead." + die "emktemp is banned" } path_exists() { @@ -76,119 +32,11 @@ path_exists() { die "path_exists is banned" } -# @FUNCTION: use_if_iuse -# @USAGE: -# @DESCRIPTION: -# Return true if the given flag is in USE and IUSE. -# -# Note that this function should not be used in the global scope. use_if_iuse() { - eqawarn "use_if_iuse is deprecated." - eqawarn "Define it as a local function, or inline it:" - eqawarn " in_iuse foo && use foo" - in_iuse $1 || return 1 - use $1 + eerror "use_if_iuse has been removed." + eerror "Define it as a local function, or inline it:" + eerror " in_iuse foo && use foo" + die "use_if_iuse is banned" } -if [[ ${EAPI} == 5 ]] ; then - -# @FUNCTION: einstalldocs -# @DESCRIPTION: -# Install documentation using DOCS and HTML_DOCS, in EAPIs that do not -# provide this function. When available (i.e., in EAPI 6 or later), -# the package manager implementation should be used instead. -# -# If DOCS is declared and non-empty, all files listed in it are -# installed. The files must exist, otherwise the function will fail. -# In EAPI 4 and 5, DOCS may specify directories as well; in earlier -# EAPIs using directories is unsupported. -# -# If DOCS is not declared, the files matching patterns given -# in the default EAPI implementation of src_install will be installed. -# If this is undesired, DOCS can be set to empty value to prevent any -# documentation from being installed. -# -# If HTML_DOCS is declared and non-empty, all files and/or directories -# listed in it are installed as HTML docs (using dohtml). -# -# Both DOCS and HTML_DOCS can either be an array or a whitespace- -# separated list. Whenever directories are allowed, '/.' may -# be specified in order to install all files within the directory -# without creating a sub-directory in docdir. -# -# Passing additional options to dodoc and dohtml is not supported. -# If you needed such a thing, you need to call those helpers explicitly. -einstalldocs() { - debug-print-function ${FUNCNAME} "${@}" - - local dodoc_opts=-r - - if ! declare -p DOCS &>/dev/null ; then - local d - for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \ - THANKS BUGS FAQ CREDITS CHANGELOG ; do - if [[ -s ${d} ]] ; then - dodoc "${d}" || die - fi - done - elif [[ $(declare -p DOCS) == "declare -a"* ]] ; then - if [[ ${DOCS[@]} ]] ; then - dodoc ${dodoc_opts} "${DOCS[@]}" || die - fi - else - if [[ ${DOCS} ]] ; then - dodoc ${dodoc_opts} ${DOCS} || die - fi - fi - - if [[ $(declare -p HTML_DOCS 2>/dev/null) == "declare -a"* ]] ; then - if [[ ${HTML_DOCS[@]} ]] ; then - dohtml -r "${HTML_DOCS[@]}" || die - fi - else - if [[ ${HTML_DOCS} ]] ; then - dohtml -r ${HTML_DOCS} || die - fi - fi - - return 0 -} - -# @FUNCTION: in_iuse -# @USAGE: -# @DESCRIPTION: -# Determines whether the given flag is in IUSE. Strips IUSE default -# prefixes as necessary. In EAPIs where it is available (i.e., EAPI 6 -# or later), the package manager implementation should be used instead. -# -# Note that this function must not be used in the global scope. -in_iuse() { - debug-print-function ${FUNCNAME} "${@}" - [[ ${#} -eq 1 ]] || die "Invalid args to ${FUNCNAME}()" - - local flag=${1} - local liuse=( ${IUSE} ) - - has "${flag}" "${liuse[@]#[+-]}" -} - -fi # EAPI 5 - -if [[ ${EAPI} == [56] ]] ; then - -# @FUNCTION: eqawarn -# @USAGE: [message] -# @DESCRIPTION: -# Proxy to ewarn for package managers that don't provide eqawarn and use the PM -# implementation if available. Reuses PORTAGE_ELOG_CLASSES as set by the dev -# profile. -if ! declare -F eqawarn >/dev/null ; then - eqawarn() { - has qa ${PORTAGE_ELOG_CLASSES} && ewarn "$@" - : - } -fi - -fi # EAPI [56] - fi From 9e7df3d422f31ec70962596ffdfa5193f6f2f08f Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:57:15 +0200 Subject: [PATCH 11/38] eclass/kernel-2: Sync with Gentoo It's from Gentoo commit c47ceebdc3239de7b1f5acda4ce8882c850779b4. --- .../portage-stable/eclass/kernel-2.eclass | 371 +++++++++++------- 1 file changed, 226 insertions(+), 145 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/kernel-2.eclass b/sdk_container/src/third_party/portage-stable/eclass/kernel-2.eclass index 6d5dcca6e3..873d4a2046 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/kernel-2.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/kernel-2.eclass @@ -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 # @ECLASS: kernel-2.eclass @@ -8,7 +8,7 @@ # John Mylchreest # Mike Pagano # -# @SUPPORTED_EAPIS: 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: Eclass for kernel packages # @DESCRIPTION: # This is the kernel.eclass rewrite for a clean base regarding the 2.6 @@ -17,40 +17,144 @@ # added functionality: # unipatch - a flexible, singular method to extract, add and remove patches. -# @ECLASS-VARIABLE: K_USEPV +# @ECLASS_VARIABLE: CTARGET +# @INTERNAL +# @DESCRIPTION: +# Utilized for 32-bit userland on ppc64. + +# @ECLASS_VARIABLE: CKV # @DEFAULT_UNSET # @DESCRIPTION: -# When setting the EXTRAVERSION variable, it should -# add PV to the end. -# this is useful for things like wolk. IE: -# EXTRAVERSION would be something like : -wolk-4.19-r1 +# Used as a comparison kernel version, which is used when +# PV doesnt reflect the genuine kernel version. +# This gets set to the portage style versioning. ie: +# CKV=2.6.11_rc4 -# @ECLASS-VARIABLE: K_NODRYRUN +# @ECLASS_VARIABLE: EXTRAVERSION +# @DEFAULT_UNSET +# @DESCRIPTION: +# The additional version appended to OKV (-gentoo/-gentoo-r1) + +# @ECLASS_VARIABLE: H_SUPPORTEDARCH +# @DEFAULT_UNSET +# @DESCRIPTION: +# this should be a space separated list of ARCH's which +# can be supported by the headers ebuild + +# @ECLASS_VARIABLE: K_BASE_VER +# @DEFAULT_UNSET +# @DESCRIPTION: +# for git-sources, declare the base version this patch is +# based off of. + +# @ECLASS_VARIABLE: K_DEBLOB_AVAILABLE +# @DEFAULT_UNSET +# @DESCRIPTION: +# A value of "0" will disable all of the optional deblob +# code. If empty, will be set to "1" if deblobbing is +# possible. Test ONLY for "1". + +# @ECLASS_VARIABLE: K_DEBLOB_TAG +# @DEFAULT_UNSET +# @DESCRIPTION: +# This will be the version of deblob script. It's a upstream SVN tag +# such asw -gnu or -gnu1. + +# @ECLASS_VARIABLE: K_DEFCONFIG +# @DEFAULT_UNSET +# @DESCRIPTION: +# Allow specifying a different defconfig target. +# If length zero, defaults to "defconfig". + +# @ECLASS_VARIABLE: K_EXP_GENPATCHES_PULL +# @DEFAULT_UNSET +# @DESCRIPTION: +# If set, we pull "experimental" regardless of the USE FLAG +# but expect the ebuild maintainer to use K_EXP_GENPATCHES_LIST. + +# @ECLASS_VARIABLE: K_EXP_GENPATCHES_NOUSE +# @DEFAULT_UNSET +# @DESCRIPTION: +# If set, no USE flag will be provided for "experimental"; +# as a result the user cannot choose to apply those patches. + +# @ECLASS_VARIABLE: K_EXP_GENPATCHES_LIST +# @DEFAULT_UNSET +# @DESCRIPTION: +# A list of patches to pick from "experimental" to apply when +# the USE flag is unset and K_EXP_GENPATCHES_PULL is set. + +# @ECLASS_VARIABLE: K_EXTRAEINFO +# @DEFAULT_UNSET +# @DESCRIPTION: +# this is a new-line seperated list of einfo displays in +# postinst and can be used to carry additional postinst +# messages + +# @ECLASS_VARIABLE: K_EXTRAELOG +# @DEFAULT_UNSET +# @DESCRIPTION: +# same as K_EXTRAEINFO except using elog instead of einfo + +# @ECLASS_VARIABLE: K_EXTRAEWARN +# @DEFAULT_UNSET +# @DESCRIPTION: +# same as K_EXTRAEINFO except using ewarn instead of einfo + +# @ECLASS_VARIABLE: K_FROM_GIT +# @DEFAULT_UNSET +# @DESCRIPTION: +# If set, this variable signals that the kernel sources derives +# from a git tree and special handling will be applied so that +# any patches that are applied will actually apply. + +# @ECLASS_VARIABLE: K_GENPATCHES_VER +# @DEFAULT_UNSET +# @DESCRIPTION: +# The version of the genpatches tarball(s) to apply. +# A value of "5" would apply genpatches-2.6.12-5 to +# my-sources-2.6.12.ebuild + +# @ECLASS_VARIABLE: K_LONGTERM +# @DEFAULT_UNSET +# @DESCRIPTION: +# If set, the eclass will search for the kernel source +# in the long term directories on the upstream servers +# as the location has been changed by upstream + +# @ECLASS_VARIABLE: K_NODRYRUN # @DEFAULT_UNSET # @DESCRIPTION: # if this is set then patch --dry-run will not # be run. Certain patches will fail with this parameter # See bug #507656 -# @ECLASS-VARIABLE: K_NOSETEXTRAVERSION +# @ECLASS_VARIABLE: K_NOSETEXTRAVERSION # @DEFAULT_UNSET # @DESCRIPTION: # if this is set then EXTRAVERSION will not be # automatically set within the kernel Makefile -# @ECLASS-VARIABLE: K_NOUSENAME +# @ECLASS_VARIABLE: K_NOUSENAME # @DEFAULT_UNSET # @DESCRIPTION: # if this is set then EXTRAVERSION will not include the # first part of ${PN} in EXTRAVERSION -# @ECLASS-VARIABLE: K_NOUSEPR +# @ECLASS_VARIABLE: K_NOUSEPR # @DEFAULT_UNSET # @DESCRIPTION: # if this is set then EXTRAVERSION will not include the # anything based on ${PR}. -# @ECLASS-VARIABLE: K_PREPATCHED +# @ECLASS_VARIABLE: K_PREDEBLOBBED +# @DEFAULT_UNSET +# @DESCRIPTION: +# This kernel was already deblobbed elsewhere. +# If false, either optional deblobbing will be available +# or the license will note the inclusion of linux-firmware code. + +# @ECLASS_VARIABLE: K_PREPATCHED # @DEFAULT_UNSET # @DESCRIPTION: # if the patchset is prepatched (ie: pf-sources, @@ -58,123 +162,93 @@ # patchset version for and not use it as a true package # revision -# @ECLASS-VARIABLE: K_EXTRAEINFO -# @DEFAULT_UNSET -# @DESCRIPTION: -# this is a new-line seperated list of einfo displays in -# postinst and can be used to carry additional postinst -# messages - -# @ECLASS-VARIABLE: K_EXTRAELOG -# @DEFAULT_UNSET -# @DESCRIPTION: -# same as K_EXTRAEINFO except using elog instead of einfo - -# @ECLASS-VARIABLE: K_EXTRAEWARN -# @DEFAULT_UNSET -# @DESCRIPTION: -# same as K_EXTRAEINFO except using ewarn instead of einfo - -# @ECLASS-VARIABLE: K_SYMLINK -# @DEFAULT_UNSET -# @DESCRIPTION: -# if this is set, then forcably create symlink anyway - -# @ECLASS-VARIABLE: K_BASE_VER -# @DEFAULT_UNSET -# @DESCRIPTION: -# for git-sources, declare the base version this patch is -# based off of. - -# @ECLASS-VARIABLE: K_DEFCONFIG -# @DEFAULT_UNSET -# @DESCRIPTION: -# Allow specifying a different defconfig target. -# If length zero, defaults to "defconfig". - -# @ECLASS-VARIABLE: K_WANT_GENPATCHES -# @DEFAULT_UNSET -# @DESCRIPTION: -# Apply genpatches to kernel source. Provide any -# combination of "base", "extras" or "experimental". - -# @ECLASS-VARIABLE: K_EXP_GENPATCHES_PULL -# @DEFAULT_UNSET -# @DESCRIPTION: -# If set, we pull "experimental" regardless of the USE FLAG -# but expect the ebuild maintainer to use K_EXP_GENPATCHES_LIST. - -# @ECLASS-VARIABLE: K_EXP_GENPATCHES_NOUSE -# @DEFAULT_UNSET -# @DESCRIPTION: -# If set, no USE flag will be provided for "experimental"; -# as a result the user cannot choose to apply those patches. - -# @ECLASS-VARIABLE: K_EXP_GENPATCHES_LIST -# @DEFAULT_UNSET -# @DESCRIPTION: -# A list of patches to pick from "experimental" to apply when -# the USE flag is unset and K_EXP_GENPATCHES_PULL is set. - -# @ECLASS-VARIABLE: K_FROM_GIT -# @DEFAULT_UNSET -# @DESCRIPTION: -# If set, this variable signals that the kernel sources derives -# from a git tree and special handling will be applied so that -# any patches that are applied will actually apply. - -# @ECLASS-VARIABLE: K_GENPATCHES_VER -# @DEFAULT_UNSET -# @DESCRIPTION: -# The version of the genpatches tarball(s) to apply. -# A value of "5" would apply genpatches-2.6.12-5 to -# my-sources-2.6.12.ebuild - -# @ECLASS-VARIABLE: K_SECURITY_UNSUPPORTED +# @ECLASS_VARIABLE: K_SECURITY_UNSUPPORTED # @DEFAULT_UNSET # @DESCRIPTION: # If set, this kernel is unsupported by Gentoo Security # to the current eclass maintainer :) -# @ECLASS-VARIABLE: K_DEBLOB_AVAILABLE +# @ECLASS_VARIABLE: K_SYMLINK # @DEFAULT_UNSET # @DESCRIPTION: -# A value of "0" will disable all of the optional deblob -# code. If empty, will be set to "1" if deblobbing is -# possible. Test ONLY for "1". +# if this is set, then forcably create symlink anyway -# @ECLASS-VARIABLE: K_DEBLOB_TAG +# @ECLASS_VARIABLE: K_USEPV # @DEFAULT_UNSET # @DESCRIPTION: -# This will be the version of deblob script. It's a upstream SVN tag -# such asw -gnu or -gnu1. +# When setting the EXTRAVERSION variable, it should +# add PV to the end. +# this is useful for things like wolk. IE: +# EXTRAVERSION would be something like : -wolk-4.19-r1 -# @ECLASS-VARIABLE: K_PREDEBLOBBED +# @ECLASS_VARIABLE: K_WANT_GENPATCHES # @DEFAULT_UNSET # @DESCRIPTION: -# This kernel was already deblobbed elsewhere. -# If false, either optional deblobbing will be available -# or the license will note the inclusion of linux-firmware code. +# Apply genpatches to kernel source. Provide any +# combination of "base", "extras" or "experimental". -# @ECLASS-VARIABLE: K_LONGTERM +# @ECLASS_VARIABLE: KERNEL_URI # @DEFAULT_UNSET # @DESCRIPTION: -# If set, the eclass will search for the kernel source -# in the long term directories on the upstream servers -# as the location has been changed by upstream +# Upstream kernel src URI -# @ECLASS-VARIABLE: H_SUPPORTEDARCH +# @ECLASS_VARIABLE: KV +# @DEFAULT_UNSET +# @OUTPUT_VARIABLE +# @DESCRIPTION: +# Kernel Version (2.6.0-gentoo/2.6.0-test11-gentoo-r1) + +# @ECLASS_VARIABLE: KV_FULL +# @DEFAULT_UNSET +# @OUTPUT_VARIABLE +# @DESCRIPTION: +# Kernel full version + +# @ECLASS_VARIABLE: KV_MAJOR +# @DEFAULT_UNSET +# @OUTPUT_VARIABLE +# @DESCRIPTION: +# Kernel major version from ....../dev/null; then xmakeopts="${xmakeopts} CROSS_COMPILE=${CHOST}-" fi - xmakeopts="${xmakeopts} HOSTCC=$(tc-getBUILD_CC)" + xmakeopts="${xmakeopts} HOSTCC=$(tc-getBUILD_CC) CC=$(tc-getCC) LD=$(tc-getLD) AR=$(tc-getAR) NM=$(tc-getNM) OBJCOPY=$(tc-getOBJCOPY) READELF=$(tc-getREADELF) STRIP=$(tc-getSTRIP)" export xmakeopts } @@ -780,10 +850,10 @@ install_headers() { local ddir=$(kernel_header_destdir) env_setup_xmakeopts - emake headers_install INSTALL_HDR_PATH="${ED%/}"${ddir}/.. ${xmakeopts} + emake headers_install INSTALL_HDR_PATH="${ED}"${ddir}/.. ${xmakeopts} # let other packages install some of these headers - rm -rf "${ED%/}"${ddir}/scsi || die #glibc/uclibc/etc... + rm -rf "${ED}"${ddir}/scsi || die #glibc/uclibc/etc... return 0 } @@ -810,7 +880,7 @@ install_sources() { done fi - mv "${WORKDIR}"/linux* "${ED%/}"/usr/src || die + mv "${WORKDIR}"/linux* "${ED}"/usr/src || die if [[ -n ${UNIPATCH_DOCS} ]]; then for i in ${UNIPATCH_DOCS}; do @@ -850,15 +920,15 @@ postinst_sources() { # if we are to forcably symlink, delete it if it already exists first. if [[ ${K_SYMLINK} -gt 0 ]]; then - if [[ -e ${EROOT%/}/usr/src/linux && ! -L ${EROOT%/}/usr/src/linux ]] ; then - die "${EROOT%/}/usr/src/linux exist and is not a symlink" + if [[ -e ${EROOT}/usr/src/linux && ! -L ${EROOT}/usr/src/linux ]] ; then + die "${EROOT}/usr/src/linux exists and is not a symlink" fi - ln -snf linux-${KV_FULL} "${EROOT%/}"/usr/src/linux || die + ln -snf linux-${KV_FULL} "${EROOT}"/usr/src/linux || die fi # Don't forget to make directory for sysfs - [[ ! -d ${EROOT%/}/sys ]] && kernel_is 2 6 && { mkdir "${EROOT%/}"/sys || die ; } + [[ ! -d ${EROOT}/sys ]] && kernel_is 2 6 && { mkdir "${EROOT}"/sys || die ; } elog "If you are upgrading from a previous kernel, you may be interested" elog "in the following document:" @@ -994,7 +1064,7 @@ unipatch() { extention=${extention/:*/} PIPE_CMD="" case ${extention} in - xz) PIPE_CMD="xz -dc";; + xz) PIPE_CMD="xz -T$(makeopts_jobs) -dc";; lzma) PIPE_CMD="lzma -dc";; bz2) PIPE_CMD="bzip2 -dc";; patch*) PIPE_CMD="cat";; @@ -1074,7 +1144,7 @@ unipatch() { UNIPATCH_DROP+=" 5011_enable-cpu-optimizations-for-gcc8.patch" UNIPATCH_DROP+=" 5012_enable-cpu-optimizations-for-gcc91.patch" UNIPATCH_DROP+=" 5013_enable-cpu-optimizations-for-gcc10.patch" - if [[ ${GCC_MAJOR_VER} -lt 9 ]]; then + if [[ ${GCC_MAJOR_VER} -lt 9 ]] && ! tc-is-clang; then UNIPATCH_DROP+=" 5010_enable-cpu-optimizations-universal.patch" fi # this legacy section should be targeted for removal @@ -1120,14 +1190,14 @@ unipatch() { fi done - #populate KPATCH_DIRS so we know where to look to remove the excludes + # Populate KPATCH_DIRS so we know where to look to remove the excludes x=${KPATCH_DIR} KPATCH_DIR="" for i in $(find ${x} -type d | sort -n); do KPATCH_DIR="${KPATCH_DIR} ${i}" done - #so now lets get rid of the patchno's we want to exclude + # So now lets get rid of the patch numbers we want to exclude UNIPATCH_DROP="${UNIPATCH_EXCLUDE} ${UNIPATCH_DROP}" for i in ${UNIPATCH_DROP}; do ebegin "Excluding Patch #${i}" @@ -1154,7 +1224,7 @@ unipatch() { # addition of a file with the same name as the symlink in the # # same location; this causes the dry-run to fail, see bug #507656. # # # - # https://bugs.gentoo.org/show_bug.cgi?id=507656 # + # https://bugs.gentoo.org/507656 # #################################################################### if [[ -n ${K_NODRYRUN} ]]; then ebegin "Applying ${i/*\//} (-p1)" @@ -1330,7 +1400,16 @@ kernel-2_src_unpack() { # allow ebuilds to massage the source tree after patching but before # we run misc `make` functions below - [[ $(type -t kernel-2_hook_premake) == "function" ]] && kernel-2_hook_premake + if [[ $(type -t kernel-2_hook_premake) == "function" ]]; then + ewarn "The function name: kernel-2_hook_premake is being deprecated and" + ewarn "being changed to: kernel-2_insert_premake to comply with pms policy." + ewarn "See bug #843686 " + ewarn "The call to the old function name will be removed on or about July 1st, 2022 " + ewarn "Please update your ebuild before this date." + kernel-2_hook_premake + else + [[ $(type -t kernel-2_insert_premake) == "function" ]] && kernel-2_insert_premake + fi debug-print "Doing unpack_set_extraversion" @@ -1380,8 +1459,10 @@ kernel-2_src_compile() { cd "${S}" || die if [[ ${K_DEBLOB_AVAILABLE} == 1 ]] && use deblob; then + einfo ">>> Patching deblob script for forcing awk ..." + sed -i '/check="\/bin\/sh $check"/a \ check="$check --use-awk"' \ + "${T}/${DEBLOB_A}" || die "Failed to patch ${DEBLOB_A}" einfo ">>> Running deblob script ..." - python_setup sh "${T}/${DEBLOB_A}" --force || die "Deblob script failed to run!!!" fi } @@ -1454,10 +1535,10 @@ kernel-2_pkg_postrm() { [[ ${ETYPE} == headers ]] && return 0 # If there isn't anything left behind, then don't complain. - [[ -e ${EROOT%/}/usr/src/linux-${KV_FULL} ]] || return 0 + [[ -e ${EROOT}/usr/src/linux-${KV_FULL} ]] || return 0 ewarn "Note: Even though you have successfully unmerged " ewarn "your kernel package, directories in kernel source location: " - ewarn "${EROOT%/}/usr/src/linux-${KV_FULL}" + ewarn "${EROOT}/usr/src/linux-${KV_FULL}" ewarn "with modified files will remain behind. By design, package managers" ewarn "will not remove these modified files and the directories they reside in." ewarn "For more detailed kernel removal instructions, please see: " From 4362090122a458928938f00434bc855e1e74cf8c Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:53:42 +0200 Subject: [PATCH 12/38] eclass/meson-multilib: Sync with Gentoo It's from Gentoo commit 6cfbfa98d0ce5a33a608d1357643ad6642a01921. --- .../src/third_party/portage-stable/eclass/meson-multilib.eclass | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk_container/src/third_party/portage-stable/eclass/meson-multilib.eclass b/sdk_container/src/third_party/portage-stable/eclass/meson-multilib.eclass index 1ed95f99fa..49c6441872 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/meson-multilib.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/meson-multilib.eclass @@ -8,6 +8,7 @@ # Michał Górny # Matt Turner # @SUPPORTED_EAPIS: 7 8 +# @PROVIDES: meson multilib-minimal # @BLURB: meson wrapper for multilib builds # @DESCRIPTION: # The meson-multilib.eclass provides a glue between meson.eclass(5) From f5c8846f8c1412076ede3677a959ca5982d82efa Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 16 Jan 2023 15:50:44 +0100 Subject: [PATCH 13/38] eclass/multibuild: Sync with Gentoo It's from Gentoo commit 68b99c1c59935641b354ae51fa6a1762d6316c2d. --- .../portage-stable/eclass/multibuild.eclass | 27 ++++--------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/multibuild.eclass b/sdk_container/src/third_party/portage-stable/eclass/multibuild.eclass index 7ae03adbe1..33edb9312a 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/multibuild.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/multibuild.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: multibuild.eclass @@ -14,7 +14,10 @@ # implementations). case ${EAPI} in - 6|7|8) ;; + 6|7|8) + # backwards compatibility for run_in_build_dir + inherit out-of-source-utils + ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -175,26 +178,6 @@ multibuild_copy_sources() { multibuild_foreach_variant _multibuild_create_source_copy } -# @FUNCTION: run_in_build_dir -# @USAGE: ... -# @DESCRIPTION: -# Run the given command in the directory pointed by BUILD_DIR. -run_in_build_dir() { - debug-print-function ${FUNCNAME} "${@}" - local ret - - [[ ${#} -ne 0 ]] || die "${FUNCNAME}: no command specified." - [[ ${BUILD_DIR} ]] || die "${FUNCNAME}: BUILD_DIR not set." - - mkdir -p "${BUILD_DIR}" || die - pushd "${BUILD_DIR}" >/dev/null || die - "${@}" - ret=${?} - popd >/dev/null || die - - return ${ret} -} - # @FUNCTION: multibuild_merge_root # @USAGE: # @DESCRIPTION: From 8de2e550e1dbfed29b06496d9e17540e708d61bf Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 16 Jan 2023 16:06:55 +0100 Subject: [PATCH 14/38] eclass/out-of-source-utils: Add from Gentoo It's from Gentoo commit 579b4fc3cc9e0f055eb5cc257b822358dddf7fb8. --- .../eclass/out-of-source-utils.eclass | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/eclass/out-of-source-utils.eclass diff --git a/sdk_container/src/third_party/portage-stable/eclass/out-of-source-utils.eclass b/sdk_container/src/third_party/portage-stable/eclass/out-of-source-utils.eclass new file mode 100644 index 0000000000..d68b210889 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/eclass/out-of-source-utils.eclass @@ -0,0 +1,43 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: out-of-source-utils.eclass +# @MAINTAINER: +# Michał Górny +# @AUTHOR: +# Michał Górny +# @SUPPORTED_EAPIS: 6 7 8 +# @BLURB: Utility functions for building packages out-of-source +# @DESCRIPTION: +# This eclass provides a run_in_build_dir() helper that can be used +# to execute specified command inside BUILD_DIR. + +case ${EAPI} in + 6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ ! ${_OUT_OF_SOURCE_UTILS_ECLASS} ]]; then +_OUT_OF_SOURCE_UTILS_ECLASS=1 + +# @FUNCTION: run_in_build_dir +# @USAGE: ... +# @DESCRIPTION: +# Run the given command in the directory pointed by BUILD_DIR. +run_in_build_dir() { + debug-print-function ${FUNCNAME} "${@}" + local ret + + [[ ${#} -eq 0 ]] && die "${FUNCNAME}: no command specified." + [[ -z ${BUILD_DIR} ]] && die "${FUNCNAME}: BUILD_DIR not set." + + mkdir -p "${BUILD_DIR}" || die + pushd "${BUILD_DIR}" >/dev/null || die + "${@}" + ret=${?} + popd >/dev/null || die + + return ${ret} +} + +fi From 5f2d1bf2d95c86d35a8e02aa70e637ff19b01fc6 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 16 Jan 2023 16:05:20 +0100 Subject: [PATCH 15/38] eclass/perl-module: Sync with Gentoo It's from Gentoo commit 972e7788b4720c18da02ec164bbb16126e5c3f5e. --- .../portage-stable/eclass/perl-module.eclass | 347 +++++------------- 1 file changed, 101 insertions(+), 246 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/perl-module.eclass b/sdk_container/src/third_party/portage-stable/eclass/perl-module.eclass index cff6f203ab..d4f6bdc519 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/perl-module.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/perl-module.eclass @@ -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 # @ECLASS: perl-module.eclass @@ -7,7 +7,7 @@ # @AUTHOR: # Seemant Kulleen # Andreas K. Hüttel -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @PROVIDES: perl-functions # @BLURB: eclass for installing Perl module distributions # @DESCRIPTION: @@ -19,12 +19,8 @@ # ExtUtils::MakeMaker or Module::Build), we recommend to use perl-functions.eclass # instead. -case ${EAPI:-0} in - 5) - inherit eutils multiprocessing unpacker perl-functions - PERL_EXPF="src_unpack src_prepare src_configure src_compile src_test src_install" - ;; - 6|7) +case ${EAPI} in + 7) inherit multiprocessing perl-functions PERL_EXPF="src_prepare src_configure src_compile src_test src_install" ;; @@ -33,79 +29,22 @@ case ${EAPI:-0} in PERL_EXPF="src_prepare src_configure src_compile src_test src_install" ;; *) - die "EAPI=${EAPI} is not supported by perl-module.eclass" + die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac -# @ECLASS-VARIABLE: GENTOO_DEPEND_ON_PERL +# @ECLASS_VARIABLE: GENTOO_DEPEND_ON_PERL # @DEFAULT_UNSET # @DESCRIPTION: # This variable controls whether a runtime and build time dependency on # dev-lang/perl is automatically added by the eclass. It defaults to yes. # Set to no to disable, set to noslotop to add a perl dependency without -# slot operator (EAPI=6). All packages installing into the vendor_perl +# slot operator. All packages installing into the vendor_perl # path must use yes here. (EAPI=8 and later) Also adds a test useflag, # a use-conditional build time dependency on virtual/perl-Test-Simple, and # the required RESTRICT setting. -case ${EAPI:-0} in - 5) - [[ ${CATEGORY} == perl-core ]] && \ - PERL_EXPF+=" pkg_postinst pkg_postrm" - - case "${GENTOO_DEPEND_ON_PERL:-yes}" in - yes) - case "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" in - yes) - DEPEND="dev-lang/perl:=[-build(-)]" - ;; - *) - DEPEND="dev-lang/perl[-build(-)]" - ;; - esac - RDEPEND="${DEPEND}" - ;; - esac - - case "${PERL_EXPORT_PHASE_FUNCTIONS:-yes}" in - yes) - EXPORT_FUNCTIONS ${PERL_EXPF} - ;; - no) - debug-print "PERL_EXPORT_PHASE_FUNCTIONS=no" - ;; - *) - die "PERL_EXPORT_PHASE_FUNCTIONS=${PERL_EXPORT_PHASE_FUNCTIONS} is not supported by perl-module.eclass" - ;; - esac - ;; - 6) - [[ ${CATEGORY} == perl-core ]] && \ - PERL_EXPF+=" pkg_postinst pkg_postrm" - - case "${GENTOO_DEPEND_ON_PERL:-yes}" in - yes) - DEPEND="dev-lang/perl" - RDEPEND="dev-lang/perl:=" - ;; - noslotop) - DEPEND="dev-lang/perl" - RDEPEND="dev-lang/perl" - ;; - esac - - if [[ "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" != "yes" ]]; then - eerror "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in EAPI=6 and later. If you don't want a slot operator" - die "set GENTOO_DEPEND_ON_PERL=noslotop instead." - fi - - if [[ "${PERL_EXPORT_PHASE_FUNCTIONS}" ]]; then - eerror "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6 and later. Use perl-module.eclass if you need" - die "phase functions, perl-functions.eclass if not." - fi - - EXPORT_FUNCTIONS ${PERL_EXPF} - ;; +case ${EAPI} in 7) [[ ${CATEGORY} == perl-core ]] && \ PERL_EXPF+=" pkg_postinst pkg_postrm" @@ -124,11 +63,11 @@ case ${EAPI:-0} in esac if [[ "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" != "yes" ]]; then - die "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in EAPI=6 and later." + die "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned." fi if [[ "${PERL_EXPORT_PHASE_FUNCTIONS}" ]]; then - die "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6 and later." + die "PERL_EXPORT_PHASE_FUNCTIONS is banned." fi EXPORT_FUNCTIONS ${PERL_EXPF} @@ -154,11 +93,11 @@ case ${EAPI:-0} in esac if [[ "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" != "yes" ]]; then - die "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in EAPI=6 and later." + die "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned." fi if [[ "${PERL_EXPORT_PHASE_FUNCTIONS}" ]]; then - die "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6 and later." + die "PERL_EXPORT_PHASE_FUNCTIONS is banned." fi EXPORT_FUNCTIONS ${PERL_EXPF} @@ -167,54 +106,51 @@ esac LICENSE="${LICENSE:-|| ( Artistic GPL-1+ )}" -# @ECLASS-VARIABLE: DIST_NAME +# @ECLASS_VARIABLE: DIST_NAME # @DEFAULT_UNSET # @DESCRIPTION: -# (EAPI=6 and later) This variable provides a way to override PN for the calculation of S, +# This variable provides a way to override PN for the calculation of S, # SRC_URI, and HOMEPAGE. If unset, defaults to PN. -# @ECLASS-VARIABLE: DIST_VERSION +# @ECLASS_VARIABLE: DIST_VERSION # @DEFAULT_UNSET # @DESCRIPTION: -# (EAPI=6 and later) This variable provides a way to override PV for the calculation of S and SRC_URI. +# This variable provides a way to override PV for the calculation of S and SRC_URI. # Use it to provide the non-normalized, upstream version number. If unset, defaults to PV. -# Named MODULE_VERSION in EAPI=5. -# @ECLASS-VARIABLE: DIST_A_EXT +# @ECLASS_VARIABLE: DIST_A_EXT # @DEFAULT_UNSET # @DESCRIPTION: -# (EAPI=6 and later) This variable provides a way to override the distfile extension for the calculation of -# SRC_URI. If unset, defaults to tar.gz. Named MODULE_A_EXT in EAPI=5. +# This variable provides a way to override the distfile extension for the calculation of +# SRC_URI. If unset, defaults to tar.gz. -# @ECLASS-VARIABLE: DIST_A +# @ECLASS_VARIABLE: DIST_A # @DEFAULT_UNSET # @DESCRIPTION: -# (EAPI=6 and later) This variable provides a way to override the distfile name for the calculation of -# SRC_URI. If unset, defaults to ${DIST_NAME}-${DIST_VERSION}.${DIST_A_EXT} Named MODULE_A in EAPI=5. +# This variable provides a way to override the distfile name for the calculation of +# SRC_URI. If unset, defaults to ${DIST_NAME}-${DIST_VERSION}.${DIST_A_EXT}. -# @ECLASS-VARIABLE: DIST_AUTHOR +# @ECLASS_VARIABLE: DIST_AUTHOR # @DEFAULT_UNSET # @DESCRIPTION: -# (EAPI=6 and later) This variable sets the module author name for the calculation of -# SRC_URI. Named MODULE_AUTHOR in EAPI=5. +# This variable sets the module author name for the calculation of SRC_URI. -# @ECLASS-VARIABLE: DIST_SECTION +# @ECLASS_VARIABLE: DIST_SECTION # @DEFAULT_UNSET # @DESCRIPTION: -# (EAPI=6 and later) This variable sets the module section for the calculation of +# This variable sets the module section for the calculation of # SRC_URI. Only required in rare cases for very special snowflakes. -# Named MODULE_SECTION in EAPI=5. -# @ECLASS-VARIABLE: DIST_EXAMPLES +# @ECLASS_VARIABLE: DIST_EXAMPLES # @PRE_INHERIT # @DEFAULT_UNSET # @DESCRIPTION: -# (EAPI=6 and later) This Bash array allows passing a list of example files to be installed +# This Bash array allows passing a list of example files to be installed # in /usr/share/doc/${PF}/examples. If set before inherit, automatically adds # a use-flag examples, if not you'll have to add the useflag in your ebuild. # Examples are installed only if the useflag examples exists and is activated. -# @ECLASS-VARIABLE: DIST_WIKI +# @ECLASS_VARIABLE: DIST_WIKI # @DEFAULT_UNSET # @DESCRIPTION: # (EAPI=8 and later) This variable can be set to contain space-separated keywords @@ -224,7 +160,7 @@ LICENSE="${LICENSE:-|| ( Artistic GPL-1+ )}" # * features: Notes about additional dependencies for optional features # * tests: Notes about additional dependencies and preparations needed for testing -# @ECLASS-VARIABLE: DIST_MAKE +# @ECLASS_VARIABLE: DIST_MAKE # @DESCRIPTION: # (EAPI=8 and later) This Bash array contains parameters to the make call # from ExtUtils::MakeMaker. Replaces mymake in EAPI=7 and earlier. @@ -233,67 +169,31 @@ if [[ $(declare -p DIST_MAKE 2>&-) != "declare -a DIST_MAKE="* ]]; then DIST_MAKE=( OPTIMIZE="${CFLAGS}" ) fi +DIST_NAME=${DIST_NAME:-${PN}} +DIST_P=${DIST_NAME}-${DIST_VERSION:-${PV}} +S=${WORKDIR}/${DIST_P} -if [[ ${EAPI:-0} == 5 ]]; then - if [[ -n ${MY_PN} || -n ${MY_PV} || -n ${MODULE_VERSION} ]] ; then - : ${MY_P:=${MY_PN:-${PN}}-${MY_PV:-${MODULE_VERSION:-${PV}}}} - S=${MY_S:-${WORKDIR}/${MY_P}} - fi - MODULE_NAME=${MY_PN:-${PN}} - MODULE_P=${MY_P:-${P}} +[[ -z "${SRC_URI}" && -z "${DIST_A}" ]] && + DIST_A="${DIST_P}.${DIST_A_EXT:-tar.gz}" +[[ -z "${SRC_URI}" && -n "${DIST_AUTHOR}" ]] && + SRC_URI="mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${DIST_SECTION:+${DIST_SECTION}/}${DIST_A}" +[[ -z "${HOMEPAGE}" ]] && + HOMEPAGE="https://metacpan.org/release/${DIST_NAME}" - [[ -z "${SRC_URI}" && -z "${MODULE_A}" ]] && \ - MODULE_A="${MODULE_P}.${MODULE_A_EXT:-tar.gz}" - [[ -z "${SRC_URI}" && -n "${MODULE_AUTHOR}" ]] && \ - SRC_URI="mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MODULE_SECTION:+${MODULE_SECTION}/}${MODULE_A}" - [[ -z "${HOMEPAGE}" ]] && \ - HOMEPAGE="https://metacpan.org/release/${MODULE_NAME}" +[[ -z "${DIST_EXAMPLES}" ]] || IUSE+=" examples" - SRC_TEST="skip" -else - DIST_NAME=${DIST_NAME:-${PN}} - DIST_P=${DIST_NAME}-${DIST_VERSION:-${PV}} - S=${WORKDIR}/${DIST_P} - - [[ -z "${SRC_URI}" && -z "${DIST_A}" ]] && \ - DIST_A="${DIST_P}.${DIST_A_EXT:-tar.gz}" - [[ -z "${SRC_URI}" && -n "${DIST_AUTHOR}" ]] && \ - SRC_URI="mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${DIST_SECTION:+${DIST_SECTION}/}${DIST_A}" - [[ -z "${HOMEPAGE}" ]] && \ - HOMEPAGE="https://metacpan.org/release/${DIST_NAME}" - - [[ -z "${DIST_EXAMPLES}" ]] || IUSE+=" examples" -fi - -SRC_PREP="no" PREFER_BUILDPL="yes" pm_echovar="" -# @FUNCTION: perl-module_src_unpack -# @DESCRIPTION: -# Unpack the ebuild tarball(s). -# This function is to be called during the ebuild src_unpack() phase. -perl-module_src_unpack() { - debug-print-function $FUNCNAME "$@" - [[ ${EAPI:-0} == 5 ]] || die "perl-module_src_unpack is banned in EAPI=6 or later" - unpacker_src_unpack -} - # @FUNCTION: perl-module_src_prepare # @DESCRIPTION: # Get the ebuild sources ready. # This function is to be called during the ebuild src_prepare() phase. perl-module_src_prepare() { - debug-print-function $FUNCNAME "$@" + debug-print-function ${FUNCNAME} "$@" - if [[ ${EAPI:-0} == 5 ]] ; then - [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}" - debug-print "$FUNCNAME: applying user patches" - epatch_user - else - default - fi + default if [[ ${PERL_RM_FILES[@]} ]]; then debug-print "$FUNCNAME: stripping unneeded files" @@ -307,12 +207,7 @@ perl-module_src_prepare() { # Configure the ebuild sources. # This function is to be called during the ebuild src_configure() phase. perl-module_src_configure() { - debug-print-function $FUNCNAME "$@" - - if [[ ${EAPI:-0} == 5 && ${SRC_PREP} == yes ]]; then - return 0 - fi - SRC_PREP="yes" + debug-print-function ${FUNCNAME} "$@" perl_check_env @@ -329,38 +224,20 @@ perl-module_src_configure() { fi if [[ ( ${PREFER_BUILDPL} == yes || ! -f Makefile.PL ) && -f Build.PL ]] ; then - case ${EAPI:-0} in - 5|6) - if grep -q '\(use\|require\)\s*Module::Build::Tiny' Build.PL ; then - einfo "Using Module::Build::Tiny" - if [[ ${DEPEND} != *dev-perl/Module-Build-Tiny* && ${PN} != Module-Build-Tiny ]]; then - eerror "QA Notice: The ebuild uses Module::Build::Tiny but doesn't depend on it." - die " Add dev-perl/Module-Build-Tiny to DEPEND!" - fi - else - einfo "Using Module::Build" - if [[ ${DEPEND} != *virtual/perl-Module-Build* && ${DEPEND} != *dev-perl/Module-Build* && ${PN} != Module-Build ]] ; then - eerror "QA Notice: The ebuild uses Module::Build but doesn't depend on it." - die " Add dev-perl/Module-Build to DEPEND!" - fi - fi - ;; - *) - if grep -q '\(use\|require\)\s*Module::Build::Tiny' Build.PL ; then - einfo "Using Module::Build::Tiny" - if [[ ${BDEPEND} != *dev-perl/Module-Build-Tiny* && ${PN} != Module-Build-Tiny ]]; then - eerror "QA Notice: The ebuild uses Module::Build::Tiny but doesn't depend on it." - eerror " Add dev-perl/Module-Build-Tiny to BDEPEND!" - fi - else - einfo "Using Module::Build" - if [[ ${BDEPEND} != *virtual/perl-Module-Build* && ${BDEPEND} != *dev-perl/Module-Build* && ${PN} != Module-Build ]] ; then - eerror "QA Notice: The ebuild uses Module::Build but doesn't depend on it." - eerror " Add dev-perl/Module-Build to BDEPEND!" - fi - fi - ;; - esac + if grep -q '\(use\|require\)\s*Module::Build::Tiny' Build.PL ; then + einfo "Using Module::Build::Tiny" + if [[ ${BDEPEND} != *dev-perl/Module-Build-Tiny* && ${PN} != Module-Build-Tiny ]]; then + eerror "QA Notice: The ebuild uses Module::Build::Tiny but doesn't depend on it." + eerror " Add dev-perl/Module-Build-Tiny to BDEPEND!" + fi + else + einfo "Using Module::Build" + if [[ ${BDEPEND} != *virtual/perl-Module-Build* && ${BDEPEND} != *dev-perl/Module-Build* && ${PN} != Module-Build ]] ; then + eerror "QA Notice: The ebuild uses Module::Build but doesn't depend on it." + eerror " Add dev-perl/Module-Build to BDEPEND!" + fi + fi + set -- \ --installdirs=vendor \ --libdoc= \ @@ -393,11 +270,12 @@ perl-module_src_configure() { # Compile the ebuild sources. # This function is to be called during the ebuild src_compile() phase. perl-module_src_compile() { - debug-print-function $FUNCNAME "$@" + debug-print-function ${FUNCNAME} "$@" + perl_set_version case ${EAPI} in - 5|6|7) + 7) if [[ $(declare -p mymake 2>&-) != "declare -a mymake="* ]]; then local mymake_local=(${mymake}) else @@ -416,86 +294,68 @@ perl-module_src_compile() { set -- \ OTHERLDFLAGS="${LDFLAGS}" \ "${mymake_local[@]}" - einfo "emake" "$@" - emake "$@" \ - || die "Compilation failed" -# OPTIMIZE="${CFLAGS}" \ + emake "$@" fi } -# @ECLASS-VARIABLE: DIST_TEST +# @ECLASS_VARIABLE: DIST_TEST # @DEFAULT_UNSET # @DESCRIPTION: -# (EAPI=6 and later) Variable that controls if tests are run in the test phase +# Variable that controls if tests are run in the test phase # at all, and if yes under which conditions. If unset, defaults to "do parallel" # If neither "do" nor "parallel" is recognized, tests are skipped. -# (In EAPI=5 the variable is called SRC_TEST, defaults to "skip", and -# recognizes fewer options.) # The following space-separated keywords are recognized: # do : run tests # parallel : run tests in parallel # verbose : increase test verbosity # network : do not try to disable network tests -# @ECLASS-VARIABLE: DIST_TEST_OVERRIDE +# @ECLASS_VARIABLE: DIST_TEST_OVERRIDE # @USER_VARIABLE # @DEFAULT_UNSET # @DESCRIPTION: -# (EAPI=6 and later) Variable that controls if tests are run in the test phase +# Variable that controls if tests are run in the test phase # at all, and if yes under which conditions. It is intended for use in # make.conf or the environment by ebuild authors during testing, and # accepts the same values as DIST_TEST. If set, it overrides DIST_TEST # completely. DO NOT USE THIS IN EBUILDS! -# @FUNCTION: perl-module_src-test +# @FUNCTION: perl-module_src_test # @DESCRIPTION: # This code attempts to work out your threadingness and runs tests # according to the settings of DIST_TEST using Test::Harness. perl-module_src_test() { - debug-print-function $FUNCNAME "$@" + debug-print-function ${FUNCNAME} "$@" + local my_test_control local my_test_verbose - if [[ ${EAPI} == 5 ]] ; then - my_test_control=${SRC_TEST} - my_test_verbose=${TEST_VERBOSE:-0} - if has 'do' ${my_test_control} || has 'parallel' ${my_test_control} ; then - if has "${my_test_verbose}" 0 && has 'parallel' ${my_test_control} ; then - export HARNESS_OPTIONS=j$(makeopts_jobs) - einfo "Test::Harness Jobs=$(makeopts_jobs)" - fi - else - einfo Skipping tests due to SRC_TEST=${SRC_TEST} - return 0 - fi + [[ -n "${DIST_TEST_OVERRIDE}" ]] && ewarn "DIST_TEST_OVERRIDE is set to ${DIST_TEST_OVERRIDE}" + my_test_control=${DIST_TEST_OVERRIDE:-${DIST_TEST:-do parallel}} + + if ! has 'do' ${my_test_control} && ! has 'parallel' ${my_test_control} ; then + einfo Skipping tests due to DIST_TEST=${my_test_control} + return 0 + fi + + if has verbose ${my_test_control} ; then + my_test_verbose=1 else - [[ -n "${DIST_TEST_OVERRIDE}" ]] && ewarn DIST_TEST_OVERRIDE is set to ${DIST_TEST_OVERRIDE} - my_test_control=${DIST_TEST_OVERRIDE:-${DIST_TEST:-do parallel}} + my_test_verbose=0 + fi - if ! has 'do' ${my_test_control} && ! has 'parallel' ${my_test_control} ; then - einfo Skipping tests due to DIST_TEST=${my_test_control} - return 0 - fi + if has parallel ${my_test_control} ; then + export HARNESS_OPTIONS=j$(makeopts_jobs) + einfo "Test::Harness Jobs=$(makeopts_jobs)" + fi - if has verbose ${my_test_control} ; then - my_test_verbose=1 - else - my_test_verbose=0 - fi - - if has parallel ${my_test_control} ; then - export HARNESS_OPTIONS=j$(makeopts_jobs) - einfo "Test::Harness Jobs=$(makeopts_jobs)" - fi - - # this might sometimes work... - if ! has network ${my_test_control} ; then - export NO_NETWORK_TESTING=1 - fi + # this might sometimes work... + if ! has network ${my_test_control} ; then + export NO_NETWORK_TESTING=1 fi case ${EAPI} in - 5|6|7) + 7) ;; *) if has 'tests' ${DIST_WIKI} ; then @@ -510,7 +370,7 @@ perl-module_src_test() { if [[ -f Build ]] ; then ./Build test verbose=${my_test_verbose} || die "test failed" elif [[ -f Makefile ]] ; then - emake test TEST_VERBOSE=${my_test_verbose} || die "test failed" + emake test TEST_VERBOSE=${my_test_verbose} fi } @@ -519,7 +379,7 @@ perl-module_src_test() { # Install a Perl ebuild. # This function is to be called during the ebuild src_install() phase. perl-module_src_install() { - debug-print-function $FUNCNAME "$@" + debug-print-function ${FUNCNAME} "$@" perl_set_version @@ -541,12 +401,11 @@ perl-module_src_install() { else local myinst_local=("${myinst[@]}") fi - emake "${myinst_local[@]}" ${mytargets} \ - || die "emake ${myinst_local[@]} ${mytargets} failed" + emake "${myinst_local[@]}" ${mytargets} fi case ${EAPI} in - 5|6|7) + 7) ;; *) perl_fix_permissions @@ -555,28 +414,22 @@ perl-module_src_install() { perl_delete_module_manpages perl_delete_localpod - if [[ ${EAPI} == 5 ]] ; then - perl_delete_packlist - else - perl_fix_packlist - perl_delete_emptybsdir - fi + perl_fix_packlist + perl_delete_emptybsdir perl_remove_temppath for f in Change* CHANGES README* TODO FAQ ${mydoc}; do [[ -s ${f} ]] && dodoc ${f} done - if [[ ${EAPI} != 5 ]] ; then - if in_iuse examples && use examples ; then - [[ ${#DIST_EXAMPLES[@]} -eq 0 ]] || perl_doexamples "${DIST_EXAMPLES[@]}" - fi + if in_iuse examples && use examples ; then + [[ ${#DIST_EXAMPLES[@]} -eq 0 ]] || perl_doexamples "${DIST_EXAMPLES[@]}" fi perl_link_duallife_scripts case ${EAPI} in - 5|6|7) + 7) ;; *) if has 'features' ${DIST_WIKI} ; then @@ -599,7 +452,8 @@ perl-module_src_install() { # links that prevent file collisions for dual-life packages installing scripts. # In any other category it immediately exits. perl-module_pkg_postinst() { - debug-print-function $FUNCNAME "$@" + debug-print-function ${FUNCNAME} "$@" + if [[ ${CATEGORY} != perl-core ]] ; then eerror "perl-module.eclass: You are calling perl-module_pkg_postinst outside the perl-core category." die " This does not do anything; the call can be removed." @@ -614,7 +468,8 @@ perl-module_pkg_postinst() { # links that prevent file collisions for dual-life packages installing scripts. # In any other category it immediately exits. perl-module_pkg_postrm() { - debug-print-function $FUNCNAME "$@" + debug-print-function ${FUNCNAME} "$@" + if [[ ${CATEGORY} != perl-core ]] ; then eerror "perl-module.eclass: You are calling perl-module_pkg_postrm outside the perl-core category." die " This does not do anything; the call can be removed." From 818fe4de3e9049a4b63bc59edf2be9fc0f31bbb6 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:56:09 +0200 Subject: [PATCH 16/38] eclass/portability: Sync with Gentoo It's from Gentoo commit 09d9af3a3a5f21bbb4da24b5da35e41c87aaa402. --- .../portage-stable/eclass/portability.eclass | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/portability.eclass b/sdk_container/src/third_party/portage-stable/eclass/portability.eclass index 1cc36757b6..f4137bc2c2 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/portability.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/portability.eclass @@ -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 # @ECLASS: portability.eclass @@ -6,11 +6,11 @@ # base-system@gentoo.org # @AUTHOR: # Diego Pettenò -# @SUPPORTED_EAPIS: 5 6 7 +# @SUPPORTED_EAPIS: 6 7 8 # @BLURB: This eclass is created to avoid using non-portable GNUisms inside ebuilds -case ${EAPI:-0} in - [567]) ;; +case ${EAPI} in + 6|7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -153,7 +153,4 @@ get_mounts() { done } -_dead_portability_user_funcs() { die "if you really need this, please file a bug for base-system@gentoo.org"; } -is-login-disabled() { _dead_portability_user_funcs; } - fi From 2835473e9c0deea3ce1c8e9e59e6429db052fc6f Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:50:51 +0200 Subject: [PATCH 17/38] eclass/readme.gentoo-r1: Sync with Gentoo It's from Gentoo commit d7317785d04e7de172de3bff05852fca3cd15af2. --- .../portage-stable/eclass/readme.gentoo-r1.eclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/readme.gentoo-r1.eclass b/sdk_container/src/third_party/portage-stable/eclass/readme.gentoo-r1.eclass index 0d30217912..baf4b57bef 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/readme.gentoo-r1.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/readme.gentoo-r1.eclass @@ -25,24 +25,24 @@ case ${EAPI} in *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac -# @ECLASS-VARIABLE: DOC_CONTENTS +# @ECLASS_VARIABLE: DOC_CONTENTS # @DEFAULT_UNSET # @DESCRIPTION: # The information that is used to create the README.gentoo file. -# @ECLASS-VARIABLE: DISABLE_AUTOFORMATTING +# @ECLASS_VARIABLE: DISABLE_AUTOFORMATTING # @DEFAULT_UNSET # @DESCRIPTION: # If non-empty, DOC_CONTENTS information will be strictly respected, # not getting it automatically formatted by fmt. If empty, it will # rely on fmt for formatting and 'echo -e' options to tweak lines a bit. -# @ECLASS-VARIABLE: FORCE_PRINT_ELOG +# @ECLASS_VARIABLE: FORCE_PRINT_ELOG # @DEFAULT_UNSET # @DESCRIPTION: # If non-empty this variable forces elog messages to be printed. -# @ECLASS-VARIABLE: README_GENTOO_SUFFIX +# @ECLASS_VARIABLE: README_GENTOO_SUFFIX # @DESCRIPTION: # If you want to specify a suffix for README.gentoo file please export it. : ${README_GENTOO_SUFFIX:=""} From c543b458cd46aa86b57f1ae5e32945064a49a9d9 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:55:33 +0200 Subject: [PATCH 18/38] eclass/savedconfig: Sync with Gentoo It's from Gentoo commit b4e9cef639f16613feabe5275fca088409135eb0. --- .../third_party/portage-stable/eclass/savedconfig.eclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/savedconfig.eclass b/sdk_container/src/third_party/portage-stable/eclass/savedconfig.eclass index 20669c08b3..4681fd2532 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/savedconfig.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/savedconfig.eclass @@ -1,10 +1,10 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: savedconfig.eclass # @MAINTAINER: # base-system@gentoo.org -# @SUPPORTED_EAPIS: 5 6 7 +# @SUPPORTED_EAPIS: 6 7 8 # @BLURB: common API for saving/restoring complex configuration files # @DESCRIPTION: # It is not uncommon to come across a package which has a very fine @@ -35,7 +35,7 @@ inherit portability IUSE="savedconfig" case ${EAPI} in - [5-7]) ;; + 6|7|8) ;; *) die "EAPI=${EAPI:-0} is not supported" ;; esac From 5d584ff97f3c223d025c758709bdc5bb1bbea38d Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:49:41 +0200 Subject: [PATCH 19/38] eclass/udev: Sync with Gentoo It's from Gentoo commit 2085b70b547ced7e2f9519316db7d0df617d8180. --- .../portage-stable/eclass/udev.eclass | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/udev.eclass b/sdk_container/src/third_party/portage-stable/eclass/udev.eclass index 073e5d8acb..ac94f98221 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/udev.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/udev.eclass @@ -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 # @ECLASS: udev.eclass @@ -26,6 +26,14 @@ # # udev_dorules contrib/99-foomatic # # udev_newrules contrib/98-foomatic 99-foomatic # } +# +# pkg_postinst() { +# udev_reload +# } +# +# pkg_postrm() { +# udev_reload +# } # @CODE case ${EAPI} in @@ -53,7 +61,7 @@ _udev_get_udevdir() { local -x PKG_CONFIG_FDO_SYSROOT_RULES=1 if $($(tc-getPKG_CONFIG) --exists udev); then local udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)" - echo "${udevdir#${EPREFIX%/}}" + echo "${udevdir#${EPREFIX}}" else echo /lib/udev fi @@ -110,7 +118,9 @@ udev_newrules() { # @FUNCTION: udev_reload # @DESCRIPTION: -# Run udevadm control --reload to refresh rules and databases +# Run "udevadm control --reload" to refresh rules and databases. +# Should be called from pkg_postinst and pkg_postrm in packages which install +# udev rules or hwdb data. udev_reload() { if [[ -n ${ROOT%/} ]]; then return 0 From 5672e725cf606aec4a745b758153721476f109df Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 16 Jan 2023 18:26:01 +0100 Subject: [PATCH 20/38] eclass/unpacker: Drop unused --- .../portage-stable/eclass/unpacker.eclass | 535 ------------------ 1 file changed, 535 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/eclass/unpacker.eclass diff --git a/sdk_container/src/third_party/portage-stable/eclass/unpacker.eclass b/sdk_container/src/third_party/portage-stable/eclass/unpacker.eclass deleted file mode 100644 index 4c0641d59c..0000000000 --- a/sdk_container/src/third_party/portage-stable/eclass/unpacker.eclass +++ /dev/null @@ -1,535 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: unpacker.eclass -# @MAINTAINER: -# base-system@gentoo.org -# @SUPPORTED_EAPIS: 5 6 7 8 -# @BLURB: helpers for extraneous file formats and consistent behavior across EAPIs -# @DESCRIPTION: -# Some extraneous file formats are not part of PMS, or are only in certain -# EAPIs. Rather than worrying about that, support the crazy cruft here -# and for all EAPI versions. - -# Possible todos: -# - merge rpm unpacking -# - support partial unpacks? - -case ${EAPI:-0} in - [5678]) ;; - *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; -esac - -if [[ -z ${_UNPACKER_ECLASS} ]]; then -_UNPACKER_ECLASS=1 - -inherit toolchain-funcs - -# @ECLASS-VARIABLE: UNPACKER_BZ2 -# @USER_VARIABLE -# @DEFAULT_UNSET -# @DESCRIPTION: -# Utility to use to decompress bzip2 files. Will dynamically pick between -# `pbzip2` and `bzip2`. Make sure your choice accepts the "-dc" options. -# Note: this is meant for users to set, not ebuilds. - -# @ECLASS-VARIABLE: UNPACKER_LZIP -# @USER_VARIABLE -# @DEFAULT_UNSET -# @DESCRIPTION: -# Utility to use to decompress lzip files. Will dynamically pick between -# `plzip`, `pdlzip` and `lzip`. Make sure your choice accepts the "-dc" options. -# Note: this is meant for users to set, not ebuilds. - -# for internal use only (unpack_pdv and unpack_makeself) -find_unpackable_file() { - local src=$1 - if [[ -z ${src} ]] ; then - src=${DISTDIR}/${A} - else - if [[ ${src} == ./* ]] ; then - : # already what we want - elif [[ -e ${DISTDIR}/${src} ]] ; then - src=${DISTDIR}/${src} - elif [[ -e ${PWD}/${src} ]] ; then - src=${PWD}/${src} - elif [[ -e ${src} ]] ; then - src=${src} - fi - fi - [[ ! -e ${src} ]] && return 1 - echo "${src}" -} - -unpack_banner() { - echo ">>> Unpacking ${1##*/} to ${PWD}" -} - -# @FUNCTION: unpack_pdv -# @USAGE: -# @DESCRIPTION: -# Unpack those pesky pdv generated files ... -# They're self-unpacking programs with the binary package stuffed in -# the middle of the archive. Valve seems to use it a lot ... too bad -# it seems to like to segfault a lot :(. So lets take it apart ourselves. -# -# You have to specify the off_t size ... I have no idea how to extract that -# information out of the binary executable myself. Basically you pass in -# the size of the off_t type (in bytes) on the machine that built the pdv -# archive. -# -# One way to determine this is by running the following commands: -# -# @CODE -# strings | grep lseek -# strace -elseek -# @CODE -# -# Basically look for the first lseek command (we do the strings/grep because -# sometimes the function call is _llseek or something) and steal the 2nd -# parameter. Here is an example: -# -# @CODE -# $ strings hldsupdatetool.bin | grep lseek -# lseek -# $ strace -elseek ./hldsupdatetool.bin -# lseek(3, -4, SEEK_END) = 2981250 -# @CODE -# -# Thus we would pass in the value of '4' as the second parameter. -unpack_pdv() { - local src=$(find_unpackable_file "$1") - local sizeoff_t=$2 - - [[ -z ${src} ]] && die "Could not locate source for '$1'" - [[ -z ${sizeoff_t} ]] && die "No idea what off_t size was used for this pdv :(" - - unpack_banner "${src}" - - local metaskip=$(tail -c ${sizeoff_t} "${src}" | hexdump -e \"%i\") - local tailskip=$(tail -c $((${sizeoff_t}*2)) "${src}" | head -c ${sizeoff_t} | hexdump -e \"%i\") - - # grab metadata for debug reasons - local metafile="${T}/${FUNCNAME}.meta" - tail -c +$((${metaskip}+1)) "${src}" > "${metafile}" - - # rip out the final file name from the metadata - local datafile=$(tail -c +$((${metaskip}+1)) "${src}" | strings | head -n 1) - datafile=$(basename "${datafile}") - - # now lets uncompress/untar the file if need be - local tmpfile="${T}/${FUNCNAME}" - tail -c +$((${tailskip}+1)) ${src} 2>/dev/null | head -c 512 > "${tmpfile}" - - local iscompressed=$(file -b "${tmpfile}") - if [[ ${iscompressed:0:8} == "compress" ]] ; then - iscompressed=1 - mv "${tmpfile}"{,.Z} - gunzip "${tmpfile}" - else - iscompressed=0 - fi - local istar=$(file -b "${tmpfile}") - if [[ ${istar:0:9} == "POSIX tar" ]] ; then - istar=1 - else - istar=0 - fi - - #for some reason gzip dies with this ... dd cant provide buffer fast enough ? - #dd if=${src} ibs=${metaskip} count=1 \ - # | dd ibs=${tailskip} skip=1 \ - # | gzip -dc \ - # > ${datafile} - if [ ${iscompressed} -eq 1 ] ; then - if [ ${istar} -eq 1 ] ; then - tail -c +$((${tailskip}+1)) "${src}" 2>/dev/null \ - | head -c $((${metaskip}-${tailskip})) \ - | tar -xzf - - else - tail -c +$((${tailskip}+1)) "${src}" 2>/dev/null \ - | head -c $((${metaskip}-${tailskip})) \ - | gzip -dc \ - > ${datafile} - fi - else - if [ ${istar} -eq 1 ] ; then - tail -c +$((${tailskip}+1)) "${src}" 2>/dev/null \ - | head -c $((${metaskip}-${tailskip})) \ - | tar --no-same-owner -xf - - else - tail -c +$((${tailskip}+1)) "${src}" 2>/dev/null \ - | head -c $((${metaskip}-${tailskip})) \ - > ${datafile} - fi - fi - true - #[ -s "${datafile}" ] || die "failure unpacking pdv ('${metaskip}' '${tailskip}' '${datafile}')" - #assert "failure unpacking pdv ('${metaskip}' '${tailskip}' '${datafile}')" -} - -# @FUNCTION: unpack_makeself -# @USAGE: [file to unpack] [offset] [tail|dd] -# @DESCRIPTION: -# Unpack those pesky makeself generated files ... -# They're shell scripts with the binary package tagged onto -# the end of the archive. Loki utilized the format as does -# many other game companies. -# -# If the file is not specified, then ${A} is used. If the -# offset is not specified then we will attempt to extract -# the proper offset from the script itself. -unpack_makeself() { - local src_input=${1:-${A}} - local src=$(find_unpackable_file "${src_input}") - local skip=$2 - local exe=$3 - - [[ -z ${src} ]] && die "Could not locate source for '${src_input}'" - - unpack_banner "${src}" - - if [[ -z ${skip} ]] ; then - local ver=$(grep -m1 -a '#.*Makeself' "${src}" | awk '{print $NF}') - local skip=0 - exe=tail - case ${ver} in - 1.5.*|1.6.0-nv*) # tested 1.5.{3,4,5} ... guessing 1.5.x series is same - skip=$(grep -a ^skip= "${src}" | cut -d= -f2) - ;; - 2.0|2.0.1) - skip=$(grep -a ^$'\t'tail "${src}" | awk '{print $2}' | cut -b2-) - ;; - 2.1.1) - skip=$(grep -a ^offset= "${src}" | awk '{print $2}' | cut -b2-) - (( skip++ )) - ;; - 2.1.2) - skip=$(grep -a ^offset= "${src}" | awk '{print $3}' | head -n 1) - (( skip++ )) - ;; - 2.1.3) - skip=`grep -a ^offset= "${src}" | awk '{print $3}'` - (( skip++ )) - ;; - 2.1.4|2.1.5|2.1.6|2.2.0|2.4.0) - skip=$(grep -a offset=.*head.*wc "${src}" | awk '{print $3}' | head -n 1) - skip=$(head -n ${skip} "${src}" | wc -c) - exe="dd" - ;; - *) - eerror "I'm sorry, but I was unable to support the Makeself file." - eerror "The version I detected was '${ver}'." - eerror "Please file a bug about the file ${src##*/} at" - eerror "https://bugs.gentoo.org/ so that support can be added." - die "makeself version '${ver}' not supported" - ;; - esac - debug-print "Detected Makeself version ${ver} ... using ${skip} as offset" - fi - case ${exe} in - tail) exe=( tail -n +${skip} "${src}" );; - dd) exe=( dd ibs=${skip} skip=1 if="${src}" );; - *) die "makeself cant handle exe '${exe}'" - esac - - # lets grab the first few bytes of the file to figure out what kind of archive it is - local filetype tmpfile="${T}/${FUNCNAME}" - "${exe[@]}" 2>/dev/null | head -c 512 > "${tmpfile}" - filetype=$(file -b "${tmpfile}") || die - case ${filetype} in - *tar\ archive*) - "${exe[@]}" | tar --no-same-owner -xf - - ;; - bzip2*) - "${exe[@]}" | bzip2 -dc | tar --no-same-owner -xf - - ;; - gzip*) - "${exe[@]}" | tar --no-same-owner -xzf - - ;; - compress*) - "${exe[@]}" | gunzip | tar --no-same-owner -xf - - ;; - XZ*) - "${exe[@]}" | unxz | tar --no-same-owner -xf - - ;; - *) - eerror "Unknown filetype \"${filetype}\" ?" - false - ;; - esac - assert "failure unpacking (${filetype}) makeself ${src##*/} ('${ver}' +${skip})" -} - -# @FUNCTION: unpack_deb -# @USAGE: -# @DESCRIPTION: -# Unpack a Debian .deb archive in style. -unpack_deb() { - [[ $# -eq 1 ]] || die "Usage: ${FUNCNAME} " - - local deb=$(find_unpackable_file "$1") - - unpack_banner "${deb}" - - # on AIX ar doesn't work out as their ar used a different format - # from what GNU ar (and thus what .deb files) produce - if [[ -n ${EPREFIX} ]] ; then - { - read # global header - [[ ${REPLY} = "!" ]] || die "${deb} does not seem to be a deb archive" - local f timestamp uid gid mode size magic - while read f timestamp uid gid mode size magic ; do - [[ -n ${f} && -n ${size} ]] || continue # ignore empty lines - if [[ ${f} = "data.tar"* ]] ; then - head -c "${size}" > "${f}" - else - head -c "${size}" > /dev/null # trash it - fi - done - } < "${deb}" - else - $(tc-getBUILD_AR) x "${deb}" || die - fi - - unpacker ./data.tar* - - # Clean things up #458658. No one seems to actually care about - # these, so wait until someone requests to do something else ... - rm -f debian-binary {control,data}.tar* -} - -# @FUNCTION: unpack_cpio -# @USAGE: -# @DESCRIPTION: -# Unpack a cpio archive, file "-" means stdin. -unpack_cpio() { - [[ $# -eq 1 ]] || die "Usage: ${FUNCNAME} " - - # needed as cpio always reads from stdin - local cpio_cmd=( cpio --make-directories --extract --preserve-modification-time ) - if [[ $1 == "-" ]] ; then - unpack_banner "stdin" - "${cpio_cmd[@]}" - else - local cpio=$(find_unpackable_file "$1") - unpack_banner "${cpio}" - "${cpio_cmd[@]}" <"${cpio}" - fi -} - -# @FUNCTION: unpack_zip -# @USAGE: -# @DESCRIPTION: -# Unpack zip archives. -# This function ignores all non-fatal errors (i.e. warnings). -# That is useful for zip archives with extra crap attached -# (e.g. self-extracting archives). -unpack_zip() { - [[ $# -eq 1 ]] || die "Usage: ${FUNCNAME} " - - local zip=$(find_unpackable_file "$1") - unpack_banner "${zip}" - unzip -qo "${zip}" - - [[ $? -le 1 ]] || die "unpacking ${zip} failed (arch=unpack_zip)" -} - -# @FUNCTION: unpack_7z -# @USAGE: <7z file> -# @DESCRIPTION: -# Unpack 7z archives. -unpack_7z() { - [[ $# -eq 1 ]] || die "Usage: ${FUNCNAME} " - - local p7z=$(find_unpackable_file "$1") - unpack_banner "${p7z}" - local output="$(7z x -y "${p7z}")" - - if [ $? -ne 0 ]; then - echo "${output}" >&2 - die "unpacking ${p7z} failed (arch=unpack_7z)" - fi -} - -# @FUNCTION: unpack_rar -# @USAGE: -# @DESCRIPTION: -# Unpack RAR archives. -unpack_rar() { - [[ $# -eq 1 ]] || die "Usage: ${FUNCNAME} " - - local rar=$(find_unpackable_file "$1") - unpack_banner "${rar}" - unrar x -idq -o+ "${rar}" || die "unpacking ${rar} failed (arch=unpack_rar)" -} - -# @FUNCTION: unpack_lha -# @USAGE: -# @DESCRIPTION: -# Unpack LHA/LZH archives. -unpack_lha() { - [[ $# -eq 1 ]] || die "Usage: ${FUNCNAME} " - - local lha=$(find_unpackable_file "$1") - unpack_banner "${lha}" - lha xfq "${lha}" || die "unpacking ${lha} failed (arch=unpack_lha)" -} - -# @FUNCTION: _unpacker -# @USAGE: -# @INTERNAL -# @DESCRIPTION: -# Unpack the specified archive. We only operate on one archive here -# to keep down on the looping logic (that is handled by `unpacker`). -_unpacker() { - [[ $# -eq 1 ]] || die "Usage: ${FUNCNAME} " - - local a=$1 - local m=$(echo "${a}" | tr '[:upper:]' '[:lower:]') - a=$(find_unpackable_file "${a}") - - # first figure out the decompression method - local comp="" - case ${m} in - *.bz2|*.tbz|*.tbz2) - local bzcmd=${PORTAGE_BZIP2_COMMAND:-$(type -P pbzip2 || type -P bzip2)} - local bzuncmd=${PORTAGE_BUNZIP2_COMMAND:-${bzcmd} -d} - : ${UNPACKER_BZ2:=${bzuncmd}} - comp="${UNPACKER_BZ2} -c" - ;; - *.z|*.gz|*.tgz) - comp="gzip -dc" ;; - *.lzma|*.xz|*.txz) - comp="xz -dc" ;; - *.lz) - : ${UNPACKER_LZIP:=$(type -P plzip || type -P pdlzip || type -P lzip)} - comp="${UNPACKER_LZIP} -dc" ;; - *.zst) - comp="zstd -dfc" ;; - esac - - # then figure out if there are any archiving aspects - local arch="" - case ${m} in - *.tgz|*.tbz|*.tbz2|*.txz|*.tar.*|*.tar) - arch="tar --no-same-owner -xof" ;; - *.cpio.*|*.cpio) - arch="unpack_cpio" ;; - *.deb) - arch="unpack_deb" ;; - *.run) - arch="unpack_makeself" ;; - *.sh) - # Not all shell scripts are makeself - if head -n 30 "${a}" | grep -qs '#.*Makeself' ; then - arch="unpack_makeself" - fi - ;; - *.bin) - # Makeself archives can be annoyingly named - if head -c 100 "${a}" | grep -qs '#.*Makeself' ; then - arch="unpack_makeself" - fi - ;; - *.zip) - arch="unpack_zip" ;; - esac - - # 7z, rar and lha/lzh are handled by package manager in EAPI < 8 - if [[ ${EAPI} != [567] ]]; then - case ${m} in - *.7z) - arch="unpack_7z" ;; - *.rar|*.RAR) - arch="unpack_rar" ;; - *.LHA|*.LHa|*.lha|*.lzh) - arch="unpack_lha" ;; - esac - fi - - # finally do the unpack - if [[ -z ${arch}${comp} ]] ; then - unpack "$1" - return $? - fi - - [[ ${arch} != unpack_* ]] && unpack_banner "${a}" - - if [[ -z ${arch} ]] ; then - # Need to decompress the file into $PWD #408801 - local _a=${a%.*} - ${comp} "${a}" > "${_a##*/}" - elif [[ -z ${comp} ]] ; then - ${arch} "${a}" - else - ${comp} "${a}" | ${arch} - - fi - - assert "unpacking ${a} failed (comp=${comp} arch=${arch})" -} - -# @FUNCTION: unpacker -# @USAGE: [archives to unpack] -# @DESCRIPTION: -# This works in the same way that `unpack` does. If you don't specify -# any files, it will default to ${A}. -unpacker() { - local a - [[ $# -eq 0 ]] && set -- ${A} - for a ; do _unpacker "${a}" ; done -} - -# @FUNCTION: unpacker_src_unpack -# @DESCRIPTION: -# Run `unpacker` to unpack all our stuff. -unpacker_src_unpack() { - unpacker -} - -# @FUNCTION: unpacker_src_uri_depends -# @USAGE: [archives that we will unpack] -# @RETURN: Dependencies needed to unpack all the archives -# @DESCRIPTION: -# Walk all the specified files (defaults to $SRC_URI) and figure out the -# dependencies that are needed to unpack things. -# -# Note: USE flags are not yet handled. -unpacker_src_uri_depends() { - local uri deps d - - if [[ $# -eq 0 ]] ; then - # Disable path expansion for USE conditionals. #654960 - set -f - set -- ${SRC_URI} - set +f - fi - - for uri in "$@" ; do - case ${uri} in - *.cpio.*|*.cpio) - d="app-arch/cpio" ;; - *.rar|*.RAR) - d="app-arch/unrar" ;; - *.7z) - d="app-arch/p7zip" ;; - *.xz) - d="app-arch/xz-utils" ;; - *.zip) - d="app-arch/unzip" ;; - *.lz) - d="|| ( app-arch/plzip app-arch/pdlzip app-arch/lzip )" ;; - *.zst) - d="app-arch/zstd" ;; - *.LHA|*.LHa|*.lha|*.lzh) - d="app-arch/lha" ;; - esac - deps+=" ${d}" - done - - echo "${deps}" -} - -EXPORT_FUNCTIONS src_unpack - -fi From 2e9a1c5b5b05e4f4d7059d31fb4f45b5e7c7beb9 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:51:33 +0200 Subject: [PATCH 21/38] eclass/xdg-utils: Sync with Gentoo It's from Gentoo commit 75c077cf32fee0bd5c496487e53c68f460775f12. --- .../src/third_party/portage-stable/eclass/xdg-utils.eclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/xdg-utils.eclass b/sdk_container/src/third_party/portage-stable/eclass/xdg-utils.eclass index ae2b71cd24..9a58add23d 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/xdg-utils.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/xdg-utils.eclass @@ -1,4 +1,4 @@ -# Copyright 2004-2021 Gentoo Authors +# Copyright 2004-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: xdg-utils.eclass @@ -42,9 +42,10 @@ xdg_environment_reset() { export XDG_DATA_HOME="${HOME}/.local/share" export XDG_CONFIG_HOME="${HOME}/.config" export XDG_CACHE_HOME="${HOME}/.cache" + export XDG_STATE_HOME="${HOME}/.local/state" export XDG_RUNTIME_DIR="${T}/run" mkdir -p "${XDG_DATA_HOME}" "${XDG_CONFIG_HOME}" "${XDG_CACHE_HOME}" \ - "${XDG_RUNTIME_DIR}" || die + "${XDG_STATE_HOME}" "${XDG_RUNTIME_DIR}" || die # This directory needs to be owned by the user, and chmod 0700 # https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html chmod 0700 "${XDG_RUNTIME_DIR}" || die From 0c54ab35af76b2cb1e2e217bbb5e1630d91d3483 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:30:05 +0200 Subject: [PATCH 22/38] media-libs/libpng: Sync with Gentoo It's from Gentoo commit 40af91c8ebe68735e380845beba69a96a2e69b26. --- .../portage-stable/media-libs/libpng/Manifest | 4 ++-- ...-1.6.37-r2.ebuild => libpng-1.6.39.ebuild} | 21 ++++++++++++------- .../media-libs/libpng/metadata.xml | 4 ++++ 3 files changed, 19 insertions(+), 10 deletions(-) rename sdk_container/src/third_party/portage-stable/media-libs/libpng/{libpng-1.6.37-r2.ebuild => libpng-1.6.39.ebuild} (56%) diff --git a/sdk_container/src/third_party/portage-stable/media-libs/libpng/Manifest b/sdk_container/src/third_party/portage-stable/media-libs/libpng/Manifest index cff7dcacd3..ae09296f49 100644 --- a/sdk_container/src/third_party/portage-stable/media-libs/libpng/Manifest +++ b/sdk_container/src/third_party/portage-stable/media-libs/libpng/Manifest @@ -1,2 +1,2 @@ -DIST libpng-1.6.37-apng.patch.gz 10334 BLAKE2B 98660f2c13a78c93f937adf2859447cb0e6fa014b2ef6f0571c910593d94cc0a50137d271dbded0b571a3bc0ce4e9f765be48130ee4ae89884fb7292a1b0cf6e SHA512 a9365257a33d67d7e7284494a37747bb1f3ab89f42a1730f2745c604538f59861828dc91d9bc1d08a5b79ab2f4eef1bb9e438dda1774b3548a1c56be77f8435f -DIST libpng-1.6.37.tar.xz 1012272 BLAKE2B 48e8f48a88e0db6fcbc0c0f1a4d5bda6e6c8b03255bacdc60e353256ae41ccc01b5b2a7e0e7b0dea236c53a3b9d1dd89d4bb19445afbebc37bf0f92691452424 SHA512 59e8c1059013497ae616a14c3abbe239322d3873c6ded0912403fc62fb260561768230b6ab997e2cccc3b868c09f539fd13635616b9fa0dd6279a3f63ec7e074 +DIST libpng-1.6.38-apng.patch.gz 10766 BLAKE2B 3aa4bf28f5854f3dbafd1b1e92a1b80b23b59279286f730babcb091369c266ab93427223f79c8797139a6624bd41a3485064faedde47680048804ef6d41f892a SHA512 e8cb74d9be6bcbc474b6bbd6200ab5d5111e91d3ab601e5fda04213d2800a4051f04152fa5d47db690612ed06a488ff3b2608a8f0bac0cf207d486107d98da1f +DIST libpng-1.6.39.tar.xz 1020552 BLAKE2B f0a2e643e921587334349f48758e61e69b4708ebc36575567767087878d262d134eeeb98fea7f0b6ff1493ea954910ca1608b10fea57196aad770eb807a9006e SHA512 ce233bb58d70b391b7dc858a132a8f9f66a9e30f5b387426317fdd5e76e8395e00ec36324e5e2caec8fda49a3f2b13fe27594a3466fdf2020ec7520e79a608c9 diff --git a/sdk_container/src/third_party/portage-stable/media-libs/libpng/libpng-1.6.37-r2.ebuild b/sdk_container/src/third_party/portage-stable/media-libs/libpng/libpng-1.6.39.ebuild similarity index 56% rename from sdk_container/src/third_party/portage-stable/media-libs/libpng/libpng-1.6.37-r2.ebuild rename to sdk_container/src/third_party/portage-stable/media-libs/libpng/libpng-1.6.39.ebuild index 38d7b6e619..f1c9336b51 100644 --- a/sdk_container/src/third_party/portage-stable/media-libs/libpng/libpng-1.6.37-r2.ebuild +++ b/sdk_container/src/third_party/portage-stable/media-libs/libpng/libpng-1.6.39.ebuild @@ -1,18 +1,19 @@ -# 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 libtool multilib-minimal +APNG_VERSION="1.6.38" DESCRIPTION="Portable Network Graphics library" HOMEPAGE="http://www.libpng.org/" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz - apng? ( mirror://sourceforge/apng/${P}-apng.patch.gz )" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz" +SRC_URI+=" apng? ( mirror://sourceforge/libpng-apng/${PN}$(ver_rs 1-2 '' $(ver_cut 1-2 ${APNG_VERSION}))/${PV}/${PN}-${APNG_VERSION}-apng.patch.gz )" LICENSE="libpng2" SLOT="0/16" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" IUSE="apng cpu_flags_arm_neon cpu_flags_x86_sse static-libs" RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]" @@ -22,20 +23,24 @@ DOCS=( ANNOUNCE CHANGES libpng-manual.txt README TODO ) src_prepare() { default + if use apng; then - eapply -p0 "${WORKDIR}"/${PN}-*-apng.patch - # Don't execute symbols check with apng patch wrt #378111 + eapply "${WORKDIR}"/${PN}-*-apng.patch + + # Don't execute symbols check with apng patch, bug #378111 sed -i -e '/^check/s:scripts/symbols.chk::' Makefile.in || die fi + elibtoolize } multilib_src_configure() { local myeconfargs=( - $(use_enable cpu_flags_arm_neon arm-neon check) + $(use_enable cpu_flags_arm_neon arm-neon) $(use_enable cpu_flags_x86_sse intel-sse) $(use_enable static-libs static) ) + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" } diff --git a/sdk_container/src/third_party/portage-stable/media-libs/libpng/metadata.xml b/sdk_container/src/third_party/portage-stable/media-libs/libpng/metadata.xml index 10e62abda6..e98eff7f2f 100644 --- a/sdk_container/src/third_party/portage-stable/media-libs/libpng/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/media-libs/libpng/metadata.xml @@ -15,7 +15,11 @@ cpe:/a:libpng:libpng glennrp/libpng + pnggroup/libpng-EXPERIMENTAL + glennrp/libpng-releases libpng + apng + libpng-apng Reflect ABI compatibility for libpng.so. From d9047e2c171a8fdaa922c7696ea26b4f50fc66e1 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:33:01 +0200 Subject: [PATCH 23/38] net-libs/libslirp: Sync with Gentoo It's from Gentoo commit e27f9fcd0438635704ff03e768be51c21bce8642. --- .../portage-stable/net-libs/libslirp/Manifest | 1 + ...slirp-4.3.1-bug-756910-check-pkt_len.patch | 48 ------------------- .../net-libs/libslirp/libslirp-4.6.1.ebuild | 6 +-- .../net-libs/libslirp/libslirp-4.7.0.ebuild | 35 ++++++++++++++ .../net-libs/libslirp/metadata.xml | 2 +- 5 files changed, 40 insertions(+), 52 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/net-libs/libslirp/files/libslirp-4.3.1-bug-756910-check-pkt_len.patch create mode 100644 sdk_container/src/third_party/portage-stable/net-libs/libslirp/libslirp-4.7.0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/net-libs/libslirp/Manifest b/sdk_container/src/third_party/portage-stable/net-libs/libslirp/Manifest index b2523bed1c..7deab5160a 100644 --- a/sdk_container/src/third_party/portage-stable/net-libs/libslirp/Manifest +++ b/sdk_container/src/third_party/portage-stable/net-libs/libslirp/Manifest @@ -1 +1,2 @@ DIST libslirp-4.6.1.tar.gz 135569 BLAKE2B 7a890912f2a8ce9d6820870e2d29b9c7a2253c403c2bcb127a38e02b2b81d1e262f34571c8a4c05fbf46874b9b2967cb5597cabe169ad54f12702fdd8b90bb3c SHA512 04a9dd88cd58c849a24b9cff405d951952760d99ea2bef0b070463dff088d79f44557a13c9427ba0043f58d4b9e06b68ff64a4f23a7b0d66df594e32e1521cae +DIST libslirp-4.7.0.tar.gz 143251 BLAKE2B f3e1c3a31f09462d79ca6c663a05bde02b075090f3a5f7bc69fef3c72b8517c11a123ad7b46f4b2855cbc9a7a5dbde8d1cb2d5e3e2a9d7eedbe570c200f8bcc6 SHA512 387f4a6dad240ce633df2640bb49c6cb0041c8b3afc8d0ef38186d385f00dd9e4ef4443e93e1b71dbf05e22892b6f2771a87a202e815d8ec899ab5c147a1f09f diff --git a/sdk_container/src/third_party/portage-stable/net-libs/libslirp/files/libslirp-4.3.1-bug-756910-check-pkt_len.patch b/sdk_container/src/third_party/portage-stable/net-libs/libslirp/files/libslirp-4.3.1-bug-756910-check-pkt_len.patch deleted file mode 100644 index aef7f19ba1..0000000000 --- a/sdk_container/src/third_party/portage-stable/net-libs/libslirp/files/libslirp-4.3.1-bug-756910-check-pkt_len.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Prasad J Pandit -Date: Thu, 26 Nov 2020 13:57:06 +0000 -Subject: [PATCH] slirp: check pkt_len before reading protocol header - -While processing ARP/NCSI packets in 'arp_input' or 'ncsi_input' -routines, ensure that pkt_len is large enough to accommodate the -respective protocol headers, lest it should do an OOB access. -Add check to avoid it. - -Reported-by: Qiuhao Li @outlook.com; -Signed-off-by: Prasad J Pandit ---- - src/ncsi.c | 4 ++++ - src/slirp.c | 4 ++++ - 2 files changed, 8 insertions(+) - -diff --git a/src/ncsi.c b/src/ncsi.c -index 3c1dfef..75dcc08 100644 ---- a/src/ncsi.c -+++ b/src/ncsi.c -@@ -148,6 +148,10 @@ void ncsi_input(Slirp *slirp, const uint8_t *pkt, int pkt_len) - uint32_t checksum; - uint32_t *pchecksum; - -+ if (pkt_len < ETH_HLEN + sizeof(struct ncsi_pkt_hdr)) { -+ return; /* packet too short */ -+ } -+ - memset(ncsi_reply, 0, sizeof(ncsi_reply)); - - memset(reh->h_dest, 0xff, ETH_ALEN); -diff --git a/src/slirp.c b/src/slirp.c -index 9bead0c..abb6f9a 100644 ---- a/src/slirp.c -+++ b/src/slirp.c -@@ -860,6 +860,10 @@ static void arp_input(Slirp *slirp, const uint8_t *pkt, int pkt_len) - return; - } - -+ if (pkt_len < ETH_HLEN + sizeof(struct slirp_arphdr)) { -+ return; /* packet too short */ -+ } -+ - ar_op = ntohs(ah->ar_op); - switch (ar_op) { - case ARPOP_REQUEST: --- -2.28.0 diff --git a/sdk_container/src/third_party/portage-stable/net-libs/libslirp/libslirp-4.6.1.ebuild b/sdk_container/src/third_party/portage-stable/net-libs/libslirp/libslirp-4.6.1.ebuild index 66229c7158..272a78bb0d 100644 --- a/sdk_container/src/third_party/portage-stable/net-libs/libslirp/libslirp-4.6.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-libs/libslirp/libslirp-4.6.1.ebuild @@ -1,14 +1,14 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 inherit meson -KEYWORDS="amd64 arm64 ~ppc ppc64 x86" +KEYWORDS="amd64 arm64 ~m68k ~ppc ppc64 ~riscv x86" MY_P="${PN}-v${PV}" SRC_URI="https://gitlab.freedesktop.org/slirp/libslirp/-/archive/v${PV}/${MY_P}.tar.gz -> ${P}.tar.gz" -DESCRIPTION="A TCP-IP emulator used to provide virtual networking services." +DESCRIPTION="A TCP-IP emulator used to provide virtual networking services" HOMEPAGE="https://gitlab.freedesktop.org/slirp/libslirp" LICENSE="BSD" diff --git a/sdk_container/src/third_party/portage-stable/net-libs/libslirp/libslirp-4.7.0.ebuild b/sdk_container/src/third_party/portage-stable/net-libs/libslirp/libslirp-4.7.0.ebuild new file mode 100644 index 0000000000..7f4caff457 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-libs/libslirp/libslirp-4.7.0.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit meson + +KEYWORDS="~amd64 ~arm64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~x86" +MY_P="${PN}-v${PV}" +SRC_URI="https://gitlab.freedesktop.org/slirp/libslirp/-/archive/v${PV}/${MY_P}.tar.gz -> ${P}.tar.gz" +DESCRIPTION="A TCP-IP emulator used to provide virtual networking services" +HOMEPAGE="https://gitlab.freedesktop.org/slirp/libslirp" + +LICENSE="BSD" +SLOT="0" +IUSE="static-libs" + +RDEPEND="dev-libs/glib:=" + +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + echo "${PV}" > .tarball-version || die + echo -e "#!${BASH}\necho -n \$(cat '${S}/.tarball-version')" > build-aux/git-version-gen || die + default +} + +src_configure() { + local emesonargs=( + -Ddefault_library=$(usex static-libs both shared) + ) + meson_src_configure +} diff --git a/sdk_container/src/third_party/portage-stable/net-libs/libslirp/metadata.xml b/sdk_container/src/third_party/portage-stable/net-libs/libslirp/metadata.xml index 8830eef1af..608b5343e9 100644 --- a/sdk_container/src/third_party/portage-stable/net-libs/libslirp/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/net-libs/libslirp/metadata.xml @@ -1,5 +1,5 @@ - + Zac Medico From 197fc9e824ed918eeaf18bf1ca7e3a632c99ec1d Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 12:05:36 +0200 Subject: [PATCH 24/38] sys-apps/attr: Sync with Gentoo It's from Gentoo commit cab7a58fc4eb39c994fbdf820ca83f192513c5c2. --- .../portage-stable/sys-apps/attr/Manifest | 2 +- ...attr-2.5.1.ebuild => attr-2.5.1-r2.ebuild} | 41 ++-- .../sys-apps/attr/attr-9999.ebuild | 41 ++-- .../attr/files/attr-2.5.1-r2-fix-symver.patch | 206 ++++++++++++++++++ .../portage-stable/sys-apps/attr/metadata.xml | 1 + 5 files changed, 248 insertions(+), 43 deletions(-) rename sdk_container/src/third_party/portage-stable/sys-apps/attr/{attr-2.5.1.ebuild => attr-2.5.1-r2.ebuild} (70%) create mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/attr/files/attr-2.5.1-r2-fix-symver.patch diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/attr/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/attr/Manifest index 225b7624ec..e7ed8d74a0 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/attr/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/attr/Manifest @@ -1 +1 @@ -DIST attr-2.5.1.tar.gz 465714 BLAKE2B 05928f8274b0b4beee31b329c8459436c5b9019ebd2f937667b7beb8df7a455c48742a90d9c4faca5c0b38c9c3812043d3d66f9587108d3424c6184fef494b56 SHA512 8b4c043d61f8f3e0cd098e701181069f51117b85fd6ba18bfe9af77d894ea671232377d4793ffc822e9259ceee6ac71d75732eb93b2830c6cb5d0d918ba2d21b +DIST attr-2.5.1.tar.xz 318188 BLAKE2B 876dcbd802ea79b7851640f208820ffdfb73dc46065af673037c6dd50ad2af158f9f74b34cf45728baf9d0cc5572b40c3f102aa2907245a877db0d3879e38f04 SHA512 9e5555260189bb6ef2440c76700ebb813ff70582eb63d446823874977307d13dfa3a347dfae619f8866943dfa4b24ccf67dadd7e3ea2637239fdb219be5d2932 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/attr/attr-2.5.1.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/attr/attr-2.5.1-r2.ebuild similarity index 70% rename from sdk_container/src/third_party/portage-stable/sys-apps/attr/attr-2.5.1.ebuild rename to sdk_container/src/third_party/portage-stable/sys-apps/attr/attr-2.5.1-r2.ebuild index 03afe6d30c..fd70c8e82c 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/attr/attr-2.5.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/attr/attr-2.5.1-r2.ebuild @@ -1,28 +1,33 @@ -# 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 libtool toolchain-funcs multilib-minimal usr-ldscript +inherit toolchain-funcs multilib-minimal usr-ldscript if [[ ${PV} == 9999 ]] ; then EGIT_REPO_URI="https://git.savannah.gnu.org/git/${PN}.git" - inherit autotools git-r3 else - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" - SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz" + inherit libtool + + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" + SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz" fi DESCRIPTION="Extended attributes tools" HOMEPAGE="https://savannah.nongnu.org/projects/attr" + LICENSE="LGPL-2.1" SLOT="0" - IUSE="debug nls static-libs" BDEPEND="nls? ( sys-devel/gettext )" +PATCHES=( + "${FILESDIR}"/${PN}-2.5.1-r2-fix-symver.patch +) + src_prepare() { default @@ -31,35 +36,28 @@ src_prepare() { eautopoint eautoreconf else - elibtoolize #580792 + # bug #580792 + elibtoolize fi } -src_configure() { - # Remove -flto* from flags as this breaks binaries (bug #644048) - filter-flags -flto* - append-ldflags "-Wl,--no-gc-sections" #700116 - tc-ld-force-bfd #644048 - append-lfs-flags #760857 - multilib-minimal_src_configure -} - multilib_src_configure() { local myeconfargs=( --bindir="${EPREFIX}"/bin + --libexecdir="${EPREFIX}"/usr/$(get_libdir) --enable-shared $(use_enable static-libs static) $(use_enable nls) - --libexecdir="${EPREFIX}"/usr/$(get_libdir) $(use_enable debug) ) + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" } multilib_src_install() { emake DESTDIR="${D}" install - # Sanity check until we track down why this is happening. #644048 + # Sanity check until we track down why this is happening. bug #644048 local lib="${ED}/usr/$(get_libdir)/libattr.so.1" if [[ -e ${lib} ]] ; then local versions=$($(tc-getREADELF) -V "${lib}") @@ -73,18 +71,19 @@ multilib_src_install() { echo "${versions}" echo "# readelf -sW ${lib}" echo "${symbols}" - die "symbol version sanity check failed; please comment on https://bugs.gentoo.org/644048" + die "Symbol version sanity check failed; please comment on https://bugs.gentoo.org/644048" else einfo "${lib} passed symbol checks" fi fi if multilib_is_native_abi; then - # we install attr into /bin, so we need the shared lib with it + # We install attr into /bin, so we need the shared lib with it gen_usr_ldscript -a attr fi # Add a wrapper until people upgrade. + # TODO: figure out when this was added & when we can drop it! insinto /usr/include/attr newins "${FILESDIR}"/xattr-shim.h xattr.h } diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/attr/attr-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/attr/attr-9999.ebuild index 6b4cccd9af..f5ee0bed08 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/attr/attr-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/attr/attr-9999.ebuild @@ -1,28 +1,33 @@ -# 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 flag-o-matic libtool toolchain-funcs multilib-minimal usr-ldscript +inherit toolchain-funcs multilib-minimal usr-ldscript if [[ ${PV} == 9999 ]] ; then EGIT_REPO_URI="https://git.savannah.gnu.org/git/${PN}.git" - inherit autotools git-r3 else - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" - SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz" + inherit libtool + + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" + SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz" fi DESCRIPTION="Extended attributes tools" HOMEPAGE="https://savannah.nongnu.org/projects/attr" + LICENSE="LGPL-2.1" SLOT="0" - IUSE="debug nls static-libs" BDEPEND="nls? ( sys-devel/gettext )" +PATCHES=( + "${FILESDIR}"/${PN}-2.5.1-r2-fix-symver.patch +) + src_prepare() { default @@ -31,35 +36,28 @@ src_prepare() { eautopoint eautoreconf else - elibtoolize #580792 + # bug #580792 + elibtoolize fi } -src_configure() { - # Remove -flto* from flags as this breaks binaries (bug #644048) - filter-flags -flto* - append-ldflags "-Wl,--no-gc-sections" #700116 - tc-ld-force-bfd #644048 - append-lfs-flags #760857 - multilib-minimal_src_configure -} - multilib_src_configure() { local myeconfargs=( --bindir="${EPREFIX}"/bin + --libexecdir="${EPREFIX}"/usr/$(get_libdir) --enable-shared $(use_enable static-libs static) $(use_enable nls) - --libexecdir="${EPREFIX}"/usr/$(get_libdir) $(use_enable debug) ) + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" } multilib_src_install() { emake DESTDIR="${D}" install - # Sanity check until we track down why this is happening. #644048 + # Sanity check until we track down why this is happening. bug #644048 local lib="${ED}/usr/$(get_libdir)/libattr.so.1" if [[ -e ${lib} ]] ; then local versions=$($(tc-getREADELF) -V "${lib}") @@ -73,18 +71,19 @@ multilib_src_install() { echo "${versions}" echo "# readelf -sW ${lib}" echo "${symbols}" - die "symbol version sanity check failed; please comment on https://bugs.gentoo.org/644048" + die "Symbol version sanity check failed; please comment on https://bugs.gentoo.org/644048" else einfo "${lib} passed symbol checks" fi fi if multilib_is_native_abi; then - # we install attr into /bin, so we need the shared lib with it + # We install attr into /bin, so we need the shared lib with it gen_usr_ldscript -a attr fi # Add a wrapper until people upgrade. + # TODO: figure out when this was added & when we can drop it! insinto /usr/include/attr newins "${FILESDIR}"/xattr-shim.h xattr.h } diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/attr/files/attr-2.5.1-r2-fix-symver.patch b/sdk_container/src/third_party/portage-stable/sys-apps/attr/files/attr-2.5.1-r2-fix-symver.patch new file mode 100644 index 0000000000..ee25b13166 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/attr/files/attr-2.5.1-r2-fix-symver.patch @@ -0,0 +1,206 @@ +https://lists.nongnu.org/archive/html/acl-devel/2022-05/msg00000.html +Bug: https://bugs.gentoo.org/644048 +Bug: https://bugs.gentoo.org/700116 + +From a9ca51afd2b9f68f57de3a4c3d962d1d763572ca Mon Sep 17 00:00:00 2001 +From: Alexander Miller +Date: Thu, 28 Nov 2019 22:17:24 +0100 +Subject: [PATCH] Better supported way to set symbol versions for legacy + syscalls + +Using a linker script to set a symbol versions is an undocumented +hack and doesn't work reliably in many cases. It works (to some +degree) with the bfd linker, but fails with gold or lld. And even +with bfd it can break when using --gc-sections or LTO. + +The result may be a library where the code has been discarded and +the versioned symbols are unusable, e.g. + 23: 00000000 0 NOTYPE GLOBAL DEFAULT ABS getxattr@ATTR_1.0 +instead of + 23: 000033c0 0 FUNC GLOBAL DEFAULT 11 getxattr@ATTR_1.0 + +Remove the linker script entirely and set symbol versions with the +symver attribute if available (in gcc >= 10, but not in clang), +otherwise use the traditional global asm solution with a .symver +directive. +Those are the documented ways to do it and well supported by (almost) +all configurations. (The exception is old gcc with LTO; a workaround +is included, but some versions may still need -flto-partition=none). + +Signed-off-by: Alexander Miller + +--- a/libattr/Makemodule.am ++++ b/libattr/Makemodule.am +@@ -8,7 +8,7 @@ LT_CURRENT = 2 + LT_AGE = 1 + LTVERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) + +-libattr_la_DEPENDENCIES = exports libattr/libattr.lds ++libattr_la_DEPENDENCIES = exports + libattr_la_SOURCES = \ + libattr/attr_copy_action.c \ + libattr/attr_copy_check.c \ +@@ -20,7 +20,4 @@ libattr_la_SOURCES = \ + libattr_la_CFLAGS = -include libattr/libattr.h + libattr_la_LDFLAGS = \ + -Wl,--version-script,$(top_srcdir)/exports \ +- -Wl,$(top_srcdir)/libattr/libattr.lds \ + -version-info $(LTVERSION) +- +-EXTRA_DIST += libattr/libattr.lds + +--- a/Makefile.in ++++ b/Makefile.in +@@ -647,9 +647,8 @@ top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + ACLOCAL_AMFLAGS = -I m4 +-EXTRA_DIST = exports examples/copyattr.c examples/Makefile \ +- libattr/libattr.lds test/README test/run \ +- test/sort-getfattr-output $(TESTS) ++EXTRA_DIST = exports examples/copyattr.c examples/Makefile test/README \ ++ test/run test/sort-getfattr-output $(TESTS) + SUBDIRS = po + AM_CPPFLAGS = \ + -I$(top_builddir)/include \ +@@ -689,7 +688,7 @@ LT_CURRENT = 2 + #LT_REVISION = + LT_AGE = 1 + LTVERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) +-libattr_la_DEPENDENCIES = exports libattr/libattr.lds ++libattr_la_DEPENDENCIES = exports + libattr_la_SOURCES = \ + libattr/attr_copy_action.c \ + libattr/attr_copy_check.c \ +@@ -702,7 +701,6 @@ libattr_la_SOURCES = \ + libattr_la_CFLAGS = -include libattr/libattr.h + libattr_la_LDFLAGS = \ + -Wl,--version-script,$(top_srcdir)/exports \ +- -Wl,$(top_srcdir)/libattr/libattr.lds \ + -version-info $(LTVERSION) + + libmisc_la_SOURCES = \ +--- a/libattr/libattr.lds ++++ /dev/null +@@ -1,12 +0,0 @@ +-"fgetxattr@ATTR_1.0" = libattr_fgetxattr; +-"flistxattr@ATTR_1.0" = libattr_flistxattr; +-"fremovexattr@ATTR_1.0" = libattr_fremovexattr; +-"fsetxattr@ATTR_1.0" = libattr_fsetxattr; +-"getxattr@ATTR_1.0" = libattr_getxattr; +-"lgetxattr@ATTR_1.0" = libattr_lgetxattr; +-"listxattr@ATTR_1.0" = libattr_listxattr; +-"llistxattr@ATTR_1.0" = libattr_llistxattr; +-"lremovexattr@ATTR_1.0" = libattr_lremovexattr; +-"lsetxattr@ATTR_1.0" = libattr_lsetxattr; +-"removexattr@ATTR_1.0" = libattr_removexattr; +-"setxattr@ATTR_1.0" = libattr_setxattr; +--- a/libattr/syscalls.c ++++ b/libattr/syscalls.c +@@ -26,6 +26,27 @@ + #include + #include + ++/* ++ * Versioning of compat symbols: ++ * prefer symver attribute if available (since gcc 10), ++ * fall back to traditional .symver asm directive otherwise. ++ */ ++#ifdef __has_attribute ++# if __has_attribute(symver) ++# define SYMVER(cn, vn) __typeof(cn) cn __attribute__((symver(vn))) ++# elif __has_attribute(no_reorder) ++ /* ++ * Avoid wrong partitioning with older gcc and LTO. May not work reliably ++ * with all versions; use -flto-partition=none if you encounter problems. ++ */ ++# define SYMVER(cn, vn) __typeof(cn) cn __attribute__((noreorder)); \ ++ __asm__(".symver " #cn "," vn) ++# endif ++#endif ++#ifndef SYMVER ++# define SYMVER(cn, vn) __asm__(".symver " #cn "," vn) ++#endif ++ + #ifdef HAVE_VISIBILITY_ATTRIBUTE + # pragma GCC visibility push(default) + #endif +@@ -35,66 +56,78 @@ int libattr_setxattr(const char *path, const char *name, + { + return syscall(__NR_setxattr, path, name, value, size, flags); + } ++SYMVER(libattr_setxattr, "setxattr@ATTR_1.0"); + + int libattr_lsetxattr(const char *path, const char *name, + void *value, size_t size, int flags) + { + return syscall(__NR_lsetxattr, path, name, value, size, flags); + } ++SYMVER(libattr_lsetxattr, "lsetxattr@ATTR_1.0"); + + int libattr_fsetxattr(int filedes, const char *name, + void *value, size_t size, int flags) + { + return syscall(__NR_fsetxattr, filedes, name, value, size, flags); + } ++SYMVER(libattr_fsetxattr, "fsetxattr@ATTR_1.0"); + + ssize_t libattr_getxattr(const char *path, const char *name, + void *value, size_t size) + { + return syscall(__NR_getxattr, path, name, value, size); + } ++SYMVER(libattr_getxattr, "getxattr@ATTR_1.0"); + + ssize_t libattr_lgetxattr(const char *path, const char *name, + void *value, size_t size) + { + return syscall(__NR_lgetxattr, path, name, value, size); + } ++SYMVER(libattr_lgetxattr, "lgetxattr@ATTR_1.0"); + + ssize_t libattr_fgetxattr(int filedes, const char *name, + void *value, size_t size) + { + return syscall(__NR_fgetxattr, filedes, name, value, size); + } ++SYMVER(libattr_fgetxattr, "fgetxattr@ATTR_1.0"); + + ssize_t libattr_listxattr(const char *path, char *list, size_t size) + { + return syscall(__NR_listxattr, path, list, size); + } ++SYMVER(libattr_listxattr, "listxattr@ATTR_1.0"); + + ssize_t libattr_llistxattr(const char *path, char *list, size_t size) + { + return syscall(__NR_llistxattr, path, list, size); + } ++SYMVER(libattr_llistxattr, "llistxattr@ATTR_1.0"); + + ssize_t libattr_flistxattr(int filedes, char *list, size_t size) + { + return syscall(__NR_flistxattr, filedes, list, size); + } ++SYMVER(libattr_flistxattr, "flistxattr@ATTR_1.0"); + + int libattr_removexattr(const char *path, const char *name) + { + return syscall(__NR_removexattr, path, name); + } ++SYMVER(libattr_removexattr, "removexattr@ATTR_1.0"); + + int libattr_lremovexattr(const char *path, const char *name) + { + return syscall(__NR_lremovexattr, path, name); + } ++SYMVER(libattr_lremovexattr, "lremovexattr@ATTR_1.0"); + + int libattr_fremovexattr(int filedes, const char *name) + { + return syscall(__NR_fremovexattr, filedes, name); + } ++SYMVER(libattr_fremovexattr, "fremovexattr@ATTR_1.0"); + + #ifdef HAVE_VISIBILITY_ATTRIBUTE + # pragma GCC visibility pop diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/attr/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-apps/attr/metadata.xml index 92a88c8a8f..05e4a37e99 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/attr/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/sys-apps/attr/metadata.xml @@ -7,5 +7,6 @@ cpe:/a:attr_project:attr + attr From a238aedae692d6b29a647aa73f92e3054be2cfc7 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:26:02 +0200 Subject: [PATCH 25/38] sys-apps/dtc: Sync with Gentoo It's from Gentoo commit 38c4e6130d616269ba70a8f1bef4e38fda68da3f. --- .../portage-stable/sys-apps/dtc/Manifest | 1 - .../sys-apps/dtc/dtc-1.5.0-r2.ebuild | 87 ------------------- .../sys-apps/dtc/dtc-1.5.0.ebuild | 59 ------------- .../sys-apps/dtc/dtc-1.6.0.ebuild | 7 +- .../sys-apps/dtc/dtc-9999.ebuild | 5 +- .../dtc/files/dtc-1.4.4-posix-shell.patch | 48 ---------- .../dtc-1.5.0-fdt_check_full-visibility.patch | 12 --- .../sys-apps/dtc/files/dtc-1.5.0-gcc-10.patch | 50 ----------- 8 files changed, 7 insertions(+), 262 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.5.0-r2.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.5.0.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/dtc-1.4.4-posix-shell.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/dtc-1.5.0-fdt_check_full-visibility.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/dtc-1.5.0-gcc-10.patch diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/dtc/Manifest index ce7f0fee1d..993154b8a2 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/dtc/Manifest @@ -1,2 +1 @@ -DIST dtc-1.5.0.tar.xz 152936 BLAKE2B 4ad9cf8f8fd0ccde0c7b8b66c0039eb9b012ed26e51387c06c03fa7950ca194878bbb23b50be5b80c4d4e18140d6316092a9f0eea87e5d713856635dcfc1b0ec SHA512 fd1e692a1b7bf7987f921ad17d9be6719f7b3aa7915873b45fa86f4ecb1398a0a62cdf53c1fddf98a0f7fed9bf34a79f684018bd01a2b5e88746b50879bf7102 DIST dtc-1.6.0.tar.xz 158584 BLAKE2B 47b15b5df7f5d87369d6daaad87f2989a80865f2fab19f89d050d390a9f8319bcd86a36e12f7cc8d62947bb4d1335769071d0e3ea0a6e16861aea163e78f4696 SHA512 15433b24f1d6b7ed1f8066d050bd1bcbf988731aa38147564e3dd04b5f69af8d69e03befdc621a768526c620425a9bdd24aad4f9ff135930d6a1eeb0625f7de3 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.5.0-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.5.0-r2.ebuild deleted file mode 100644 index 3394d77c06..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.5.0-r2.ebuild +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -inherit multilib toolchain-funcs - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/dtc/dtc.git" - inherit git-r3 -else - SRC_URI="https://www.kernel.org/pub/software/utils/${PN}/${P}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -fi - -DESCRIPTION="Open Firmware device tree compiler" -HOMEPAGE="https://devicetree.org/ https://git.kernel.org/cgit/utils/dtc/dtc.git/" - -LICENSE="GPL-2" -SLOT="0" -IUSE="static-libs yaml" - -BDEPEND=" - sys-devel/bison - sys-devel/flex - virtual/pkgconfig -" -RDEPEND="yaml? ( dev-libs/libyaml )" -DEPEND="${RDEPEND}" - -DOCS=" - Documentation/dt-object-internal.txt - Documentation/dts-format.txt - Documentation/manual.txt -" - -PATCHES=( - "${FILESDIR}"/${PN}-1.4.4-posix-shell.patch - "${FILESDIR}"/${PN}-1.5.0-fdt_check_full-visibility.patch - "${FILESDIR}"/${PN}-1.5.0-gcc-10.patch -) - -_emake() { - # valgrind is used only in 'make checkm' - emake \ - NO_PYTHON=1 \ - NO_VALGRIND=1 \ - NO_YAML=$(usex !yaml 1 0) \ - \ - AR="$(tc-getAR)" \ - CC="$(tc-getCC)" \ - PKG_CONFIG="$(tc-getPKG_CONFIG)" \ - \ - V=1 \ - \ - PREFIX="${EPREFIX}/usr" \ - \ - LIBDIR="\$(PREFIX)/$(get_libdir)" \ - \ - "$@" -} - -src_prepare() { - default - - sed -i \ - -e '/^CFLAGS =/s:=:+=:' \ - -e '/^CPPFLAGS =/s:=:+=:' \ - -e 's:-Werror::' \ - -e 's:-g -Os::' \ - Makefile || die - - tc-export AR CC PKG_CONFIG -} - -src_compile() { - _emake -} - -src_test() { - _emake check -} - -src_install() { - _emake DESTDIR="${D}" install - - use static-libs || find "${ED}" -name '*.a' -delete -} diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.5.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.5.0.ebuild deleted file mode 100644 index 1a41da72cf..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.5.0.ebuild +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit multilib toolchain-funcs - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/dtc/dtc.git" - inherit git-r3 -else - SRC_URI="https://www.kernel.org/pub/software/utils/${PN}/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" -fi - -DESCRIPTION="Open Firmware device tree compiler" -HOMEPAGE="https://devicetree.org/ https://git.kernel.org/cgit/utils/dtc/dtc.git/" - -LICENSE="GPL-2" -SLOT="0" -IUSE="static-libs" - -DEPEND=" - sys-devel/bison - sys-devel/flex - virtual/pkgconfig -" -DOCS=" - Documentation/dt-object-internal.txt - Documentation/dts-format.txt - Documentation/manual.txt -" - -PATCHES=( - "${FILESDIR}"/${PN}-1.4.4-posix-shell.patch - "${FILESDIR}"/${PN}-1.5.0-fdt_check_full-visibility.patch - "${FILESDIR}"/${PN}-1.5.0-gcc-10.patch -) - -src_prepare() { - default - - sed -i \ - -e '/^CFLAGS =/s:=:+=:' \ - -e '/^CPPFLAGS =/s:=:+=:' \ - -e 's:-Werror::' \ - -e 's:-g -Os::' \ - -e "/^PREFIX =/s:=.*:= ${EPREFIX}/usr:" \ - -e "/^LIBDIR =/s:=.*:= \$(PREFIX)/$(get_libdir):" \ - Makefile || die - - tc-export AR CC PKG_CONFIG - export V=1 -} - -src_install() { - default - - use static-libs || find "${ED}" -name '*.a' -delete -} diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.6.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.6.0.ebuild index 41acb4a8a9..64c82691f8 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.6.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.6.0.ebuild @@ -1,15 +1,16 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit multilib toolchain-funcs + +inherit toolchain-funcs if [[ ${PV} == "9999" ]] ; then EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/dtc/dtc.git" inherit git-r3 else SRC_URI="https://www.kernel.org/pub/software/utils/${PN}/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" fi DESCRIPTION="Open Firmware device tree compiler" diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-9999.ebuild index 00244f88a1..4f65bb6531 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-9999.ebuild @@ -1,8 +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 -inherit multilib toolchain-funcs + +inherit toolchain-funcs if [[ ${PV} == "9999" ]] ; then EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/dtc/dtc.git" diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/dtc-1.4.4-posix-shell.patch b/sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/dtc-1.4.4-posix-shell.patch deleted file mode 100644 index b9b0175c0b..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/dtc-1.4.4-posix-shell.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 4d9522764985462741c7bb4af1ab231b9251476b Mon Sep 17 00:00:00 2001 -From: Mike Frysinger -Date: Wed, 10 Jan 2018 00:41:43 -0500 -Subject: [PATCH] dtdiff: change to POSIX shell - -This changes from the bash-specific process substitution feature to -reading with pipes. It relies on /dev/fd or /proc/self/fd existing. - -URL: https://crbug.com/756559 -Signed-off-by: Mike Frysinger ---- - dtdiff | 19 +++++++++++++------ - 1 file changed, 13 insertions(+), 6 deletions(-) - -diff --git a/dtdiff b/dtdiff -index 5fa772b0ab62..4d1b71756c2f 100644 ---- a/dtdiff -+++ b/dtdiff -@@ -1,8 +1,4 @@ --#! /bin/bash -- --# This script uses the bash <(...) extension. --# If you want to change this to work with a generic /bin/sh, make sure --# you fix that. -+#! /bin/sh - - - DTC=dtc -@@ -35,4 +31,15 @@ if [ $# != 2 ]; then - exit 1 - fi - --diff -u <(source_and_sort "$1") <(source_and_sort "$2") -+for dir in /dev/fd /proc/self/fd; do -+ if [ -d "${dir}" ]; then -+ break -+ fi -+done -+ -+source_and_sort "$1" | ( -+ # Duplicate current stdin from the first file to fd 3 so we can change fd 0 -+ # to the second file. -+ exec 3<&0 -+ source_and_sort "$2" | diff -u "${dir}/3" "${dir}/0" -+) --- -2.15.1 - diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/dtc-1.5.0-fdt_check_full-visibility.patch b/sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/dtc-1.5.0-fdt_check_full-visibility.patch deleted file mode 100644 index a5a3d7524c..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/dtc-1.5.0-fdt_check_full-visibility.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/libfdt/version.lds b/libfdt/version.lds -index 9f5d708..6b0f6d8 100644 ---- a/libfdt/version.lds -+++ b/libfdt/version.lds -@@ -1,6 +1,7 @@ - LIBFDT_1.2 { - global: - fdt_next_node; -+ fdt_check_full; - fdt_check_header; - fdt_move; - fdt_string; diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/dtc-1.5.0-gcc-10.patch b/sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/dtc-1.5.0-gcc-10.patch deleted file mode 100644 index 80773bfaeb..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/dtc-1.5.0-gcc-10.patch +++ /dev/null @@ -1,50 +0,0 @@ -https://bugs.gentoo.org/706660 -https://git.kernel.org/pub/scm/utils/dtc/dtc.git/patch/?id=0e9225eb0dfec51def612b928d2f1836b092bc7e - -From 0e9225eb0dfec51def612b928d2f1836b092bc7e Mon Sep 17 00:00:00 2001 -From: Dirk Mueller -Date: Tue, 14 Jan 2020 18:53:41 +0100 -Subject: Remove redundant YYLOC global declaration - -gcc 10 will default to -fno-common, which causes this error at link -time: - - (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here - -This is because both dtc-lexer as well as dtc-parser define the same -global symbol yyloc. Before with -fcommon those were merged into one -defintion. The proper solution would be to to mark this as "extern", -however that leads to: - - dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls] - 26 | extern YYLTYPE yylloc; - | ^~~~~~ -In file included from dtc-lexer.l:24: -dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here - 127 | extern YYLTYPE yylloc; - | ^~~~~~ -cc1: all warnings being treated as errors - -which means the declaration is completely redundant and can just be -dropped. - -Signed-off-by: Dirk Mueller -Message-Id: <20200114175341.2994-1-dmueller@suse.com> -Signed-off-by: David Gibson ---- - dtc-lexer.l | 1 - - 1 file changed, 1 deletion(-) - ---- a/dtc-lexer.l -+++ b/dtc-lexer.l -@@ -23,7 +23,6 @@ LINECOMMENT "//".*\n - #include "srcpos.h" - #include "dtc-parser.tab.h" - --YYLTYPE yylloc; - extern bool treesource_error; - - /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ --- -cgit 1.2-0.3.lf.el7 - From 2cc090016246425e9d0b275a0dd5c883228b9685 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 16 Jan 2023 14:36:35 +0100 Subject: [PATCH 26/38] sys-firmware/edk2-ovmf-bin: Add from Gentoo It's from Gentoo commit f171d54b255e3434b040af42aaca725cfbaa0788. --- .../sys-firmware/edk2-ovmf-bin/Manifest | 1 + .../edk2-ovmf-bin/edk2-ovmf-bin-202202.ebuild | 69 +++++++++++++++++++ .../sys-firmware/edk2-ovmf-bin/metadata.xml | 8 +++ 3 files changed, 78 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf-bin/Manifest create mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf-bin/edk2-ovmf-bin-202202.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf-bin/metadata.xml diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf-bin/Manifest b/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf-bin/Manifest new file mode 100644 index 0000000000..3acdd51ad6 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf-bin/Manifest @@ -0,0 +1 @@ +DIST edk2-ovmf-202202-1.xpak 2672386 BLAKE2B 75c15d4379610ab2af85b78166e350d52f4f1bc1fff5b2eb693ad0d7b1f6648e65d8ae3e2c5467f93f1557ad3b4fa664ab2d76ff10794667de22c2ea8cca6b2d SHA512 06783b89c96bada0fd025ff39eaee501a027abcb03c0bdcf3ff497d52be22927ab03013d90f145ee94a8662cfffe4f8c154dcd06db1bb1acef8a85ae43de14a3 diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf-bin/edk2-ovmf-bin-202202.ebuild b/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf-bin/edk2-ovmf-bin-202202.ebuild new file mode 100644 index 0000000000..de6d9fb8ae --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf-bin/edk2-ovmf-bin-202202.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit readme.gentoo-r1 + +BINPKG="${P/-bin/}-1" + +DESCRIPTION="UEFI firmware for 64-bit x86 virtual machines" +HOMEPAGE="https://github.com/tianocore/edk2" +SRC_URI="https://dev.gentoo.org/~ajak/distfiles/${BINPKG}.xpak" +S="${WORKDIR}" + +# TODO: the binary 202105 package currently lacks the preseeded +# OVMF_VARS.secboot.fd file (that we typically get from fedora) + +LICENSE="BSD-2 MIT" +SLOT="0" +KEYWORDS="amd64 arm64 ~loong ~ppc ppc64 ~riscv x86" + +RDEPEND="!sys-firmware/edk2-ovmf" + +DISABLE_AUTOFORMATTING=true +DOC_CONTENTS="This package contains the tianocore edk2 UEFI firmware for 64-bit x86 +virtual machines. The firmware is located under + /usr/share/edk2-ovmf/OVMF_CODE.fd + /usr/share/edk2-ovmf/OVMF_VARS.fd + /usr/share/edk2-ovmf/OVMF_CODE.secboot.fd + +If USE=binary is enabled, we also install an OVMF variables file (coming from +fedora) that contains secureboot default keys + + /usr/share/edk2-ovmf/OVMF_VARS.secboot.fd + +If you have compiled this package by hand, you need to either populate all +necessary EFI variables by hand by booting + /usr/share/edk2-ovmf/UefiShell.(iso|img) +or creating OVMF_VARS.secboot.fd by hand: + https://github.com/puiterwijk/qemu-ovmf-secureboot + +The firmware does not support csm (due to no free csm implementation +available). If you need a firmware with csm support you have to download +one for yourself. Firmware blobs are commonly labeled + OVMF{,_CODE,_VARS}-with-csm.fd + +In order to use the firmware you can run qemu the following way + + $ qemu-system-x86_64 \ + -drive file=/usr/share/edk2-ovmf/OVMF.fd,if=pflash,format=raw,unit=0,readonly=on \ + ..." + +src_unpack() { + tar -xf - < <(xz -c -d --single-stream "${DISTDIR}/${BINPKG}.xpak") || die "unpacking binpkg failed" +} + +src_install() { + mv "usr/share/doc/${P/-bin/}" "usr/share/doc/${PF}" || die + + # Don't want to try to install the readme from the source package + rm "usr/share/doc/${PF}/README.gentoo.bz2" + mv usr "${ED}" || die + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf-bin/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf-bin/metadata.xml new file mode 100644 index 0000000000..cfac6f8ac4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf-bin/metadata.xml @@ -0,0 +1,8 @@ + + + + + virtualization@gentoo.org + Gentoo Virtualization Project + + From bbda4de1e4bb8ed3dc0fec72d8778fb03e989d7a Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:34:55 +0200 Subject: [PATCH 27/38] sys-firmware/edk2-ovmf: Drop unused package It's replaced by the sys-firmware/edk2-ovmf-bin package. --- .../sys-firmware/edk2-ovmf/Manifest | 8 - .../edk2-ovmf/edk2-ovmf-202008.ebuild | 186 ------------------ .../edk2-ovmf/edk2-ovmf-202105-r1.ebuild | 176 ----------------- .../files/edk2-ovmf-202105-werror.patch | 38 ---- .../sys-firmware/edk2-ovmf/metadata.xml | 15 -- 5 files changed, 423 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/Manifest delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/edk2-ovmf-202008.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/edk2-ovmf-202105-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/files/edk2-ovmf-202105-werror.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/metadata.xml diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/Manifest b/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/Manifest deleted file mode 100644 index 82d355e9d9..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/Manifest +++ /dev/null @@ -1,8 +0,0 @@ -DIST brotli-666c3280cc11dc433c303d79a83d4ffbdd12cc8d.tar.gz 23855739 BLAKE2B 7406ec5b29ac66afbcd7c1376bb3208f298d19b6592b2869c52173aa64947d58bd443f9a61c67deaf046be910a0e31c0b843e5508e97e0e1f5e7bce100d86904 SHA512 df8e90562c4fd7f0e787949df6bc4f5a165b39bd333f442d27874fe65640fbba268f9350d7113e6761a5acceb66d78e75f1a296e5a89b94574edf28109cdc812 -DIST edk2-ovmf-202008-bin.tar.xz 3486024 BLAKE2B 8283db554ad7024e3a55b62ed0a560ed9f729d728f1dee3806814b1eb8d89dabc4fd70433f7f77656b65d9af7919d036074a53a95190a1aa8b65ab7d73495ffc SHA512 d0c8b249a7a2124e8bb63a4358466e86a3a837e76586565dd4762351998d8561374eabb8a1303dbf71ac269c15552d9e8cff71d65bc6fe8a3a81fb4fb032e0d8 -DIST edk2-ovmf-202008-qemu-firmware.tar.xz 680 BLAKE2B 176f8e94a3f605acc72850634cbf155619490f5998125521a392a8e9c7d2b78841b841f0cb5ea860f14645b124cf1921256bbe46960efbe3401805d89bbfbed6 SHA512 b72f248ab4d49503c3e8e686e22beb77f0e48d2c6c9523f389f20504e0c30fa11fa0fcb5607d7d5bb1ba2433894fa458864c5761335e39de4b2a40b01203f043 -DIST edk2-ovmf-202008.tar.gz 13172590 BLAKE2B 10acf77d0e70e21ca425ea41c0062f8cebe2cc607b93a2a253bcd87cea1546e791776a34d43fbf4f1040f4fc32e3ee413d44873d0f00b9e523816519cfed634e SHA512 c32340104f27b9b85f79e934cc9eeb739d47b01e13975c88f39b053e9bc5a1ecfe579ab3b63fc7747cc328e104b337b53d41deb4470c3f20dbbd5552173a4666 -DIST edk2-ovmf-202105-qemu-firmware.tar.xz 672 BLAKE2B e87845a84c83f65db836fd054c81a4f3062d5e0fcc51aa0ecf9c2d23c8741f218d38ef737d140f5935ce8d9c34508e5f3b9f54bf9c547a391fa63cdc2ecf1233 SHA512 6100502f26db26e407dacce57c96b1abfd372bcb31767a068332afa09ac435a092fd2a73db27670d27c6e927c26e88315346bbac70578571108434b9683bd00c -DIST edk2-ovmf-202105-r1-bin.tar.xz 2633188 BLAKE2B 93b4bd1c75da69406b5d27ac32d8b7c63dc8248bcd5d54832e520a4b009be4b7f215eb7d489ecb7cb16d31e02452dfa06b8fa709f37c44e59b4ff70a550076c7 SHA512 356c2110abce43da9c0654324e222cbbab7085e3aa23d1ba4c98011e4d4992a37d61fa45394305b748d119dba12f65d7c7d630b9f8038065ba4672d758c702be -DIST edk2-ovmf-202105.tar.gz 13702868 BLAKE2B 3ec01d467562380ca2fd3bd807d2f6c55e4637c1afd71533f8f5b22cc634dc4c8cb63dab921677f8b315d17b3c9d0b6b00a0e2f3f8da61107033e9e81bf5a64d SHA512 c263345cbb243c63985f974a61f37c577a139d6a7099d2b8c9e1a553e5ebf16de12fb711b72624081c6bf637f8084bbf71731ab99e5747d81da460388ac25791 -DIST openssl-e2e09d9fba1187f8d6aafaa34d4172f56f1ffb72.tar.gz 9981169 BLAKE2B 33aac7364cdd45fec5654ab6caef84e1a829464380419c8a6bb311055c5a01c0aaff6e046a7c541a87e908fa9d26bae652f5be901461d03df36f2522f9c34b0c SHA512 db2087c04f0b428b3f4e1c8b3ac53cce69e0fd331ed2b86ba00facafd1685864d73f71c13eee48f4fe0af2bddad848f84a2b8ed2a17fabdf7fa2ed7d9eb39371 diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/edk2-ovmf-202008.ebuild b/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/edk2-ovmf-202008.ebuild deleted file mode 100644 index c02cae3b5f..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/edk2-ovmf-202008.ebuild +++ /dev/null @@ -1,186 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_REQ_USE="sqlite" -PYTHON_COMPAT=( python3_{7,8,9} ) - -inherit python-any-r1 readme.gentoo-r1 - -DESCRIPTION="UEFI firmware for 64-bit x86 virtual machines" -HOMEPAGE="https://github.com/tianocore/edk2" - -NON_BINARY_DEPEND=" - app-emulation/qemu - >=dev-lang/nasm-2.0.7 - >=sys-power/iasl-20160729 - ${PYTHON_DEPS} -" -DEPEND="" -RDEPEND="" -if [[ ${PV} == "999999" ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/tianocore/edk2" - DEPEND+=" - ${NON_BINARY_DEPEND} - " -else - BUNDLED_OPENSSL_SUBMODULE_SHA="e2e09d9fba1187f8d6aafaa34d4172f56f1ffb72" - BUNDLED_BROTLI_SUBMODULE_SHA="666c3280cc11dc433c303d79a83d4ffbdd12cc8d" - # Binary versions taken from fedora: - # http://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/Packages/e/ - # edk2-ovmf-20200801stable-1.fc34.noarch.rpm - - # TODO: talk with tamiko about unbundling - SRC_URI=" - !binary? ( - https://github.com/tianocore/edk2/archive/edk2-stable${PV}.tar.gz -> ${P}.tar.gz - https://github.com/openssl/openssl/archive/${BUNDLED_OPENSSL_SUBMODULE_SHA}.tar.gz -> openssl-${BUNDLED_OPENSSL_SUBMODULE_SHA}.tar.gz - https://github.com/google/brotli/archive/${BUNDLED_BROTLI_SUBMODULE_SHA}.tar.gz -> brotli-${BUNDLED_BROTLI_SUBMODULE_SHA}.tar.gz - ) - binary? ( https://dev.gentoo.org/~mva/distfiles/${P}-bin.tar.xz ) - https://dev.gentoo.org/~mva/distfiles/${P}-qemu-firmware.tar.xz - " - KEYWORDS="amd64 arm64 ~ppc ppc64 x86" - IUSE="+binary" - REQUIRED_USE+=" - !amd64? ( binary ) - " - DEPEND+=" - !binary? ( - amd64? ( - ${NON_BINARY_DEPEND} - ) - )" - PATCHES=( - ) -fi - -LICENSE="BSD-2 MIT" -SLOT="0" - -S="${WORKDIR}/edk2-edk2-stable${PV}" - -DISABLE_AUTOFORMATTING=true -DOC_CONTENTS="This package contains the tianocore edk2 UEFI firmware for 64-bit x86 -virtual machines. The firmware is located under - /usr/share/edk2-ovmf/OVMF_CODE.fd - /usr/share/edk2-ovmf/OVMF_VARS.fd - /usr/share/edk2-ovmf/OVMF_CODE.secboot.fd - -If USE=binary is enabled, we also install an OVMF variables file (coming from -fedora) that contains secureboot default keys - - /usr/share/edk2-ovmf/OVMF_VARS.secboot.fd - -If you have compiled this package by hand, you need to either populate all -necessary EFI variables by hand by booting - /usr/share/edk2-ovmf/UefiShell.(iso|img) -or creating OVMF_VARS.secboot.fd by hand: - https://github.com/puiterwijk/qemu-ovmf-secureboot - -The firmware does not support csm (due to no free csm implementation -available). If you need a firmware with csm support you have to download -one for yourself. Firmware blobs are commonly labeled - OVMF{,_CODE,_VARS}-with-csm.fd - -In order to use the firmware you can run qemu the following way - - $ qemu-system-x86_64 \ - -drive file=/usr/share/edk2-ovmf/OVMF.fd,if=pflash,format=raw,unit=0,readonly=on \ - ... - -You can register the firmware for use in libvirt by adding to /etc/libvirt/qemu.conf: - nvram = [ - \"/usr/share/edk2-ovmf/OVMF_CODE.fd:/usr/share/edk2-ovmf/OVMF_VARS.fd\" - \"/usr/share/edk2-ovmf/OVMF_CODE.secboot.fd:/usr/share/edk2-ovmf/OVMF_VARS.fd\" - ]" - -pkg_setup() { - [[ ${PV} != "999999" ]] && use binary || python-any-r1_pkg_setup -} - -src_prepare() { - if ! use binary; then - sed -i -r \ - -e "/function SetupPython3/,/\}/{s,\\\$\(whereis python3\),${EPYTHON},g}" \ - "${S}"/edksetup.sh || die "Fixing for correct Python3 support failed" - fi - if [[ ${PV} != "999999" ]]; then - if use binary; then - eapply_user - return - else - # Bundled submodules - cp -rl "${WORKDIR}/openssl-${BUNDLED_OPENSSL_SUBMODULE_SHA}"/* "CryptoPkg/Library/OpensslLib/openssl/" - cp -rl "${WORKDIR}/brotli-${BUNDLED_BROTLI_SUBMODULE_SHA}"/* "BaseTools/Source/C/BrotliCompress/brotli/" - cp -rl "${WORKDIR}/brotli-${BUNDLED_BROTLI_SUBMODULE_SHA}"/* "MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/" - fi - fi - default -} - -src_compile() { - TARGET_ARCH=X64 - TARGET_NAME=RELEASE - TARGET_TOOLS=GCC49 - - BUILD_FLAGS="-D TLS_ENABLE \ - -D HTTP_BOOT_ENABLE \ - -D NETWORK_IP6_ENABLE \ - -D FD_SIZE_2MB" - - SECUREBOOT_BUILD_FLAGS="${BUILD_FLAGS} \ - -D SECURE_BOOT_ENABLE \ - -D SMM_REQUIRE \ - -D EXCLUDE_SHELL_FROM_FD" - - [[ ${PV} != "999999" ]] && use binary && return - - emake ARCH=${TARGET_ARCH} -C BaseTools - - . ./edksetup.sh - - # Build all EFI firmware blobs: - - mkdir -p ovmf - - ./OvmfPkg/build.sh \ - -a "${TARGET_ARCH}" -b "${TARGET_NAME}" -t "${TARGET_TOOLS}" \ - ${BUILD_FLAGS} || die "OvmfPkg/build.sh failed" - - cp Build/OvmfX64/*/FV/OVMF_*.fd ovmf/ - rm -rf Build/OvmfX64 - - ./OvmfPkg/build.sh \ - -a "${TARGET_ARCH}" -b "${TARGET_NAME}" -t "${TARGET_TOOLS}" \ - ${SECUREBOOT_BUILD_FLAGS} || die "OvmfPkg/build.sh failed" - - cp Build/OvmfX64/*/FV/OVMF_CODE.fd ovmf/OVMF_CODE.secboot.fd || die "cp failed" - cp Build/OvmfX64/*/X64/Shell.efi ovmf/ || die "cp failed" - cp Build/OvmfX64/*/X64/EnrollDefaultKeys.efi ovmf || die "cp failed" - - # Build a convenience UefiShell.img: - - mkdir -p iso_image/efi/boot || die "mkdir failed" - cp ovmf/Shell.efi iso_image/efi/boot/bootx64.efi || die "cp failed" - cp ovmf/EnrollDefaultKeys.efi iso_image || die "cp failed" - qemu-img convert --image-opts \ - driver=vvfat,floppy=on,fat-type=12,label=UEFI_SHELL,dir=iso_image \ - ovmf/UefiShell.img || die "qemu-img failed" -} - -src_install() { - insinto /usr/share/${PN} - doins ovmf/* - - insinto /usr/share/qemu/firmware - doins qemu/* - - readme.gentoo_create_doc -} - -pkg_postinst() { - readme.gentoo_print_elog -} diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/edk2-ovmf-202105-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/edk2-ovmf-202105-r1.ebuild deleted file mode 100644 index c316a3faf1..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/edk2-ovmf-202105-r1.ebuild +++ /dev/null @@ -1,176 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_REQ_USE="sqlite" -PYTHON_COMPAT=( python3_{8,9,10} ) - -inherit python-any-r1 readme.gentoo-r1 - -DESCRIPTION="UEFI firmware for 64-bit x86 virtual machines" -HOMEPAGE="https://github.com/tianocore/edk2" - -BUNDLED_OPENSSL_SUBMODULE_SHA="e2e09d9fba1187f8d6aafaa34d4172f56f1ffb72" -BUNDLED_BROTLI_SUBMODULE_SHA="666c3280cc11dc433c303d79a83d4ffbdd12cc8d" - -# TODO: talk with tamiko about unbundling (mva) - -# TODO: the binary 202105 package currently lacks the preseeded -# OVMF_VARS.secboot.fd file (that we typically get from fedora) - -SRC_URI=" - !binary? ( - https://github.com/tianocore/edk2/archive/edk2-stable${PV}.tar.gz -> ${P}.tar.gz - https://github.com/openssl/openssl/archive/${BUNDLED_OPENSSL_SUBMODULE_SHA}.tar.gz -> openssl-${BUNDLED_OPENSSL_SUBMODULE_SHA}.tar.gz - https://github.com/google/brotli/archive/${BUNDLED_BROTLI_SUBMODULE_SHA}.tar.gz -> brotli-${BUNDLED_BROTLI_SUBMODULE_SHA}.tar.gz - ) - binary? ( https://dev.gentoo.org/~tamiko/distfiles/${PF}-bin.tar.xz ) - https://dev.gentoo.org/~tamiko/distfiles/${P}-qemu-firmware.tar.xz -" - -LICENSE="BSD-2 MIT" -SLOT="0" -KEYWORDS="amd64 arm64 ~ppc ppc64 x86" - -IUSE="+binary" -REQUIRED_USE+=" - !amd64? ( binary ) -" - -NON_BINARY_DEPEND=" - app-emulation/qemu - >=dev-lang/nasm-2.0.7 - >=sys-power/iasl-20160729 - ${PYTHON_DEPS} -" - -DEPEND+=" - !binary? ( - amd64? ( - ${NON_BINARY_DEPEND} - ) - )" -RDEPEND="" - -PATCHES=( - "${FILESDIR}/${PN}-202105-werror.patch" -) - -S="${WORKDIR}/edk2-edk2-stable${PV}" - -DISABLE_AUTOFORMATTING=true -DOC_CONTENTS="This package contains the tianocore edk2 UEFI firmware for 64-bit x86 -virtual machines. The firmware is located under - /usr/share/edk2-ovmf/OVMF_CODE.fd - /usr/share/edk2-ovmf/OVMF_VARS.fd - /usr/share/edk2-ovmf/OVMF_CODE.secboot.fd - -If USE=binary is enabled, we also install an OVMF variables file (coming from -fedora) that contains secureboot default keys - - /usr/share/edk2-ovmf/OVMF_VARS.secboot.fd - -If you have compiled this package by hand, you need to either populate all -necessary EFI variables by hand by booting - /usr/share/edk2-ovmf/UefiShell.(iso|img) -or creating OVMF_VARS.secboot.fd by hand: - https://github.com/puiterwijk/qemu-ovmf-secureboot - -The firmware does not support csm (due to no free csm implementation -available). If you need a firmware with csm support you have to download -one for yourself. Firmware blobs are commonly labeled - OVMF{,_CODE,_VARS}-with-csm.fd - -In order to use the firmware you can run qemu the following way - - $ qemu-system-x86_64 \ - -drive file=/usr/share/edk2-ovmf/OVMF.fd,if=pflash,format=raw,unit=0,readonly=on \ - ..." - -pkg_setup() { - [[ ${PV} != "999999" ]] && use binary || python-any-r1_pkg_setup -} - -src_prepare() { - if use binary; then - eapply_user - else - # Bundled submodules - cp -rl "${WORKDIR}/openssl-${BUNDLED_OPENSSL_SUBMODULE_SHA}"/* "CryptoPkg/Library/OpensslLib/openssl/" - cp -rl "${WORKDIR}/brotli-${BUNDLED_BROTLI_SUBMODULE_SHA}"/* "BaseTools/Source/C/BrotliCompress/brotli/" - cp -rl "${WORKDIR}/brotli-${BUNDLED_BROTLI_SUBMODULE_SHA}"/* "MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/" - - sed -i -r \ - -e "/function SetupPython3/,/\}/{s,\\\$\(whereis python3\),${EPYTHON},g}" \ - "${S}"/edksetup.sh || die "Fixing for correct Python3 support failed" - - default - fi -} - -src_compile() { - TARGET_ARCH=X64 - TARGET_NAME=RELEASE - TARGET_TOOLS=GCC49 - - BUILD_FLAGS="-D TLS_ENABLE \ - -D HTTP_BOOT_ENABLE \ - -D NETWORK_IP6_ENABLE \ - -D TPM_ENABLE \ - -D TPM2_ENABLE -D TPM2_CONFIG_ENABLE \ - -D FD_SIZE_2MB" - - SECUREBOOT_BUILD_FLAGS="${BUILD_FLAGS} \ - -D SECURE_BOOT_ENABLE \ - -D SMM_REQUIRE \ - -D EXCLUDE_SHELL_FROM_FD" - - [[ ${PV} != "999999" ]] && use binary && return - - emake ARCH=${TARGET_ARCH} -C BaseTools - - . ./edksetup.sh - - # Build all EFI firmware blobs: - - mkdir -p ovmf - - ./OvmfPkg/build.sh \ - -a "${TARGET_ARCH}" -b "${TARGET_NAME}" -t "${TARGET_TOOLS}" \ - ${BUILD_FLAGS} || die "OvmfPkg/build.sh failed" - - cp Build/OvmfX64/*/FV/OVMF_*.fd ovmf/ - rm -rf Build/OvmfX64 - - ./OvmfPkg/build.sh \ - -a "${TARGET_ARCH}" -b "${TARGET_NAME}" -t "${TARGET_TOOLS}" \ - ${SECUREBOOT_BUILD_FLAGS} || die "OvmfPkg/build.sh failed" - - cp Build/OvmfX64/*/FV/OVMF_CODE.fd ovmf/OVMF_CODE.secboot.fd || die "cp failed" - cp Build/OvmfX64/*/X64/Shell.efi ovmf/ || die "cp failed" - cp Build/OvmfX64/*/X64/EnrollDefaultKeys.efi ovmf || die "cp failed" - - # Build a convenience UefiShell.img: - - mkdir -p iso_image/efi/boot || die "mkdir failed" - cp ovmf/Shell.efi iso_image/efi/boot/bootx64.efi || die "cp failed" - cp ovmf/EnrollDefaultKeys.efi iso_image || die "cp failed" - qemu-img convert --image-opts \ - driver=vvfat,floppy=on,fat-type=12,label=UEFI_SHELL,dir=iso_image \ - ovmf/UefiShell.img || die "qemu-img failed" -} - -src_install() { - insinto /usr/share/${PN} - doins ovmf/* - - insinto /usr/share/qemu/firmware - doins qemu/* - - readme.gentoo_create_doc -} - -pkg_postinst() { - readme.gentoo_print_elog -} diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/files/edk2-ovmf-202105-werror.patch b/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/files/edk2-ovmf-202105-werror.patch deleted file mode 100644 index db71faed77..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/files/edk2-ovmf-202105-werror.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template -index 498696e..8a360f4 100755 ---- a/BaseTools/Conf/tools_def.template -+++ b/BaseTools/Conf/tools_def.template -@@ -1863,7 +1863,7 @@ NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_N - *_*_*_DTCPP_PATH = DEF(DTCPP_BIN) - *_*_*_DTC_PATH = DEF(DTC_BIN) - --DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common -+DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Wno-array-bounds -include AutoGen.h -fno-common - DEFINE GCC_IA32_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe - DEFINE GCC_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-address -mno-stack-arg-probe - DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft -fno-pic -fno-pie -diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile -index 0df728f..49f9706 100644 ---- a/BaseTools/Source/C/Makefiles/header.makefile -+++ b/BaseTools/Source/C/Makefiles/header.makefile -@@ -82,17 +82,17 @@ BUILD_OPTFLAGS = -O2 $(EXTRA_OPTFLAGS) - - ifeq ($(DARWIN),Darwin) - # assume clang or clang compatible flags on OS X --BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \ -+BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall \ - -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g - else - ifeq ($(CXX), llvm) - BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ ---fno-delete-null-pointer-checks -Wall -Werror \ -+-fno-delete-null-pointer-checks -Wall \ - -Wno-deprecated-declarations -Wno-self-assign \ - -Wno-unused-result -nostdlib -g - else - BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ ---fno-delete-null-pointer-checks -Wall -Werror \ -+-fno-delete-null-pointer-checks -Wall \ - -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict \ - -Wno-unused-result -nostdlib -g - endif diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/metadata.xml deleted file mode 100644 index 26afde23af..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/edk2-ovmf/metadata.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - tamiko@gentoo.org - Matthias Maier - - - virtualization@gentoo.org - Gentoo Virtualization Project - - - Use pre-built binaries - - From e564f0569339e1903d3d03a472c389f5c226040d Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:40:57 +0200 Subject: [PATCH 28/38] sys-firmware/ipxe: Sync with Gentoo It's from Gentoo commit f61cc08e54ab7d8f86be5f6fa0e4696d7076eeb1. --- .../portage-stable/sys-firmware/ipxe/Manifest | 4 - .../ipxe/ipxe-1.0.0_p20180211.ebuild | 119 ------------------ .../ipxe/ipxe-1.0.0_p20190728.ebuild | 119 ------------------ .../sys-firmware/ipxe/ipxe-1.21.1.ebuild | 4 +- 4 files changed, 2 insertions(+), 244 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/ipxe/ipxe-1.0.0_p20180211.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/ipxe/ipxe-1.0.0_p20190728.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/ipxe/Manifest b/sdk_container/src/third_party/portage-stable/sys-firmware/ipxe/Manifest index f7b3398a41..9d8bdecfe2 100644 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/ipxe/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-firmware/ipxe/Manifest @@ -1,6 +1,2 @@ -DIST ipxe-1.0.0_p20180211-546dd51-bin.tar.xz 1748228 BLAKE2B 5ed2ce71c7dbc41d5cbef6e263abd230b9831c945a8edb33a29d408bd4262e370a2f73c8d2eb3cb20e08c61ece83af1fb1bb4c5694098cb29c44628dbd18def8 SHA512 af2778c925a6e4c374ddae85f3db983c83e7a4e5bb2cf35e356d277b87d4c89bf63cc2c061ec31d608ff2160c13297232fa131da2b9dd0b580d93e1b0efd6532 -DIST ipxe-1.0.0_p20180211-546dd51.tar.bz2 2954305 BLAKE2B 8232b1afe017ff5d0389534e4efea3209ea0330d66e4d3d429abf81da66639b19488911d85bf2da200ff8cb0d49c5dda438074c4538303335419ea080ef80a16 SHA512 45d7f80f15a1c5ff1daa31b132065d38013a51127795ad81308b468940a455edcb40cde7601475039a7c977d732817203bbc627c642d3d10146a480da603f1dd -DIST ipxe-1.0.0_p20190728-a4f8c6e-bin.tar.xz 1839688 BLAKE2B b28772b928690646e1b0cb1c27ef56e2cb1c0637a43c6174dea7c8ca401d8c8819938fa358a0bed5d57b8cf992b8c2060b52e32a970ef813f1cf705fb0805beb SHA512 1e5838b8c530257dc544f6e25f80e6e223480917db393ca3ff8c577f07e60180e18f2eed4e71f7b1965157d6e7001f65e224d3c8b56a98f84739e2504ca38985 -DIST ipxe-1.0.0_p20190728-a4f8c6e.tar.bz2 2985776 BLAKE2B 5a85505404978d51f80e30332f6eb0417d6d97eb9b3bc05eec5ad649c446c7d17dc841f8cd34a1b29c31dc6f5cf08baa69191de9c8dd4bcdb098c5d7f13a7824 SHA512 3af0da9058b39966bfd8f9d7dfe518ae7b26e18f58d1a3fa2cba8922ec3c50775b82dd9f23bf51be3ca3f69b705f92bcf80988a1817b30f7ab1826a4b159c5a6 DIST ipxe-1.21.1-bin.tar.xz 1860424 BLAKE2B 9d621c92be1058389758f885a02b601169d645335bba366a18d16326a7616345e44eb0cd5007d32ac034e7e3c8f8eecd90ade3346e34ca0df899622321f38017 SHA512 85afacfb70e562a935380b7d14ab7328e418478a6f6124eaec7cd0fefb9ba13b8a3f04833fab7b724ceb4c94897a7be2c67faa8be59373719a972ad51e6a5ab3 DIST ipxe-1.21.1.tar.gz 3934045 BLAKE2B 03871b5f89c6228a9082bb89c7b102d85e5f3afcd5fe0d93762e220fe162c9c3037a9918f30251fd103835d949335f99109a12559f560a5b686e65a7c24c6501 SHA512 47400975110ed4ab95835aa1b7c8d5a6917c19c5713c6ab88bc0741a3adcd62245a9c4251d1f46fffc45289c6b18bf893f86dbc3b67d3189c41b7f198367ecaa diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/ipxe/ipxe-1.0.0_p20180211.ebuild b/sdk_container/src/third_party/portage-stable/sys-firmware/ipxe/ipxe-1.0.0_p20180211.ebuild deleted file mode 100644 index b13500031e..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/ipxe/ipxe-1.0.0_p20180211.ebuild +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit toolchain-funcs savedconfig - -GIT_REV="546dd51de8459d4d09958891f426fa2c73ff090d" -GIT_SHORT=${GIT_REV:0:7} - -DESCRIPTION="Open source network boot (PXE) firmware" -HOMEPAGE="https://ipxe.org/" -SRC_URI=" - !binary? ( https://git.ipxe.org/ipxe.git/snapshot/${GIT_REV}.tar.bz2 -> ${P}-${GIT_SHORT}.tar.bz2 ) - binary? ( https://dev.gentoo.org/~tamiko/distfiles/${P}-${GIT_SHORT}-bin.tar.xz )" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 x86" -IUSE="+binary efi ipv6 iso lkrn +qemu undi usb vmware" - -REQUIRED_USE="!amd64? ( !x86? ( binary ) )" - -SOURCE_DEPEND="app-arch/xz-utils - dev-lang/perl - sys-libs/zlib - iso? ( - app-cdr/cdrtools - sys-boot/syslinux - )" -DEPEND=" - !binary? ( - amd64? ( ${SOURCE_DEPEND} ) - x86? ( ${SOURCE_DEPEND} ) - )" -RDEPEND="" - -S="${WORKDIR}/ipxe-${GIT_SHORT}/src" - -src_configure() { - use binary && return - - cat <<-EOF > "${S}"/config/local/general.h -#undef BANNER_TIMEOUT -#define BANNER_TIMEOUT 0 -EOF - - use ipv6 && echo "#define NET_PROTO_IPV6" >> "${S}"/config/local/general.h - - if use vmware; then - cat <<-EOF >> "${S}"/config/local/general.h -#define VMWARE_SETTINGS -#define CONSOLE_VMWARE -EOF - fi - - restore_config config/local/general.h - - tc-ld-disable-gold -} - -ipxemake() { - # Q='' makes the build verbose since that's what everyone loves now - emake Q='' \ - CC="$(tc-getCC)" \ - LD="$(tc-getLD)" \ - AS="$(tc-getAS)" \ - AR="$(tc-getAR)" \ - NM="$(tc-getNM)" \ - OBJCOPY="$(tc-getOBJCOPY)" \ - RANLIB="$(tc-getRANLIB)" \ - OBJDUMP="$(tc-getOBJDUMP)" \ - HOST_CC="$(tc-getBUILD_CC)" \ - "$@" -} - -src_compile() { - use binary && return - - export NO_WERROR=1 - if use qemu; then - ipxemake bin/808610de.rom # pxe-e1000.rom (old) - ipxemake bin/8086100e.rom # pxe-e1000.rom - ipxemake bin/80861209.rom # pxe-eepro100.rom - ipxemake bin/10500940.rom # pxe-ne2k_pci.rom - ipxemake bin/10222000.rom # pxe-pcnet.rom - ipxemake bin/10ec8139.rom # pxe-rtl8139.rom - ipxemake bin/1af41000.rom # pxe-virtio.rom - fi - - if use vmware; then - ipxemake bin/8086100f.mrom # e1000 - ipxemake bin/808610d3.mrom # e1000e - ipxemake bin/10222000.mrom # vlance - ipxemake bin/15ad07b0.rom # vmxnet3 - fi - - use efi && ipxemake PLATFORM=efi BIN=bin-efi bin-efi/ipxe.efi - use iso && ipxemake bin/ipxe.iso - use undi && ipxemake bin/undionly.kpxe - use usb && ipxemake bin/ipxe.usb - use lkrn && ipxemake bin/ipxe.lkrn -} - -src_install() { - insinto /usr/share/ipxe/ - - if use qemu || use vmware; then - doins bin/*.rom - fi - use vmware && doins bin/*.mrom - use efi && doins bin-efi/*.efi - use iso && doins bin/*.iso - use undi && doins bin/*.kpxe - use usb && doins bin/*.usb - use lkrn && doins bin/*.lkrn - - save_config config/local/general.h -} diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/ipxe/ipxe-1.0.0_p20190728.ebuild b/sdk_container/src/third_party/portage-stable/sys-firmware/ipxe/ipxe-1.0.0_p20190728.ebuild deleted file mode 100644 index dc6b098f41..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/ipxe/ipxe-1.0.0_p20190728.ebuild +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit toolchain-funcs savedconfig - -GIT_REV="a4f8c6e31f6c62522cfc633bbbffa81b22f9d6f3" -GIT_SHORT=${GIT_REV:0:7} - -DESCRIPTION="Open source network boot (PXE) firmware" -HOMEPAGE="https://ipxe.org/" -SRC_URI=" - !binary? ( https://git.ipxe.org/ipxe.git/snapshot/${GIT_REV}.tar.bz2 -> ${P}-${GIT_SHORT}.tar.bz2 ) - binary? ( https://dev.gentoo.org/~tamiko/distfiles/${P}-${GIT_SHORT}-bin.tar.xz )" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 x86" -IUSE="+binary efi ipv6 iso lkrn +qemu undi usb vmware" - -REQUIRED_USE="!amd64? ( !x86? ( binary ) )" - -SOURCE_DEPEND="app-arch/xz-utils - dev-lang/perl - sys-libs/zlib - iso? ( - app-cdr/cdrtools - sys-boot/syslinux - )" -DEPEND=" - !binary? ( - amd64? ( ${SOURCE_DEPEND} ) - x86? ( ${SOURCE_DEPEND} ) - )" -RDEPEND="" - -S="${WORKDIR}/ipxe-${GIT_SHORT}/src" - -src_configure() { - use binary && return - - cat <<-EOF > "${S}"/config/local/general.h -#undef BANNER_TIMEOUT -#define BANNER_TIMEOUT 0 -EOF - - use ipv6 && echo "#define NET_PROTO_IPV6" >> "${S}"/config/local/general.h - - if use vmware; then - cat <<-EOF >> "${S}"/config/local/general.h -#define VMWARE_SETTINGS -#define CONSOLE_VMWARE -EOF - fi - - restore_config config/local/general.h - - tc-ld-disable-gold -} - -ipxemake() { - # Q='' makes the build verbose since that's what everyone loves now - emake Q='' \ - CC="$(tc-getCC)" \ - LD="$(tc-getLD)" \ - AS="$(tc-getAS)" \ - AR="$(tc-getAR)" \ - NM="$(tc-getNM)" \ - OBJCOPY="$(tc-getOBJCOPY)" \ - RANLIB="$(tc-getRANLIB)" \ - OBJDUMP="$(tc-getOBJDUMP)" \ - HOST_CC="$(tc-getBUILD_CC)" \ - "$@" -} - -src_compile() { - use binary && return - - export NO_WERROR=1 - if use qemu; then - ipxemake bin/808610de.rom # pxe-e1000.rom (old) - ipxemake bin/8086100e.rom # pxe-e1000.rom - ipxemake bin/80861209.rom # pxe-eepro100.rom - ipxemake bin/10500940.rom # pxe-ne2k_pci.rom - ipxemake bin/10222000.rom # pxe-pcnet.rom - ipxemake bin/10ec8139.rom # pxe-rtl8139.rom - ipxemake bin/1af41000.rom # pxe-virtio.rom - fi - - if use vmware; then - ipxemake bin/8086100f.mrom # e1000 - ipxemake bin/808610d3.mrom # e1000e - ipxemake bin/10222000.mrom # vlance - ipxemake bin/15ad07b0.rom # vmxnet3 - fi - - use efi && ipxemake PLATFORM=efi BIN=bin-efi bin-efi/ipxe.efi - use iso && ipxemake bin/ipxe.iso - use undi && ipxemake bin/undionly.kpxe - use usb && ipxemake bin/ipxe.usb - use lkrn && ipxemake bin/ipxe.lkrn -} - -src_install() { - insinto /usr/share/ipxe/ - - if use qemu || use vmware; then - doins bin/*.rom - fi - use vmware && doins bin/*.mrom - use efi && doins bin-efi/*.efi - use iso && doins bin/*.iso - use undi && doins bin/*.kpxe - use usb && doins bin/*.usb - use lkrn && doins bin/*.lkrn - - save_config config/local/general.h -} diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/ipxe/ipxe-1.21.1.ebuild b/sdk_container/src/third_party/portage-stable/sys-firmware/ipxe/ipxe-1.21.1.ebuild index 32f157da7b..5136e9ec3d 100644 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/ipxe/ipxe-1.21.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-firmware/ipxe/ipxe-1.21.1.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 @@ -14,7 +14,7 @@ S="${WORKDIR}/${P}/src" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 x86" +KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~mips ~ppc ppc64 ~riscv x86" IUSE="+binary efi ipv6 iso lkrn +qemu undi usb vmware" REQUIRED_USE="!amd64? ( !x86? ( binary ) )" From 6b4072d012c0e27cf3002c09f9d5320e44edc93a Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 16 Jan 2023 14:40:12 +0100 Subject: [PATCH 29/38] sys-firmware/seabios-bin: Add from Gentoo It's from Gentoo commit 02c3f6f9add5655d01f33b7cd94c8aa6e598df0c. --- .../sys-firmware/seabios-bin/Manifest | 1 + .../sys-firmware/seabios-bin/metadata.xml | 8 ++++++ .../seabios-bin/seabios-bin-1.16.0.ebuild | 25 +++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios-bin/Manifest create mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios-bin/metadata.xml create mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios-bin/seabios-bin-1.16.0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios-bin/Manifest b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios-bin/Manifest new file mode 100644 index 0000000000..348aa7cc23 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios-bin/Manifest @@ -0,0 +1 @@ +DIST seabios-1.16.0-1.xpak 141506 BLAKE2B b2d0cc367ea7ba958604f95dc2a7ab92fd76768e6133552b76d651755cab225eed3e1a6bd350b7f3b5058212390c073e9ca37896412797ac224fb1ce4b5f641a SHA512 4007a6cd40b7c82d1f53450a4151a19d5020ca4c3258b4502f9bfb1c3eacfef1a934794b58d38439e41884cd7a962aa436e22b9194b5731585383fd1476dd688 diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios-bin/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios-bin/metadata.xml new file mode 100644 index 0000000000..cfac6f8ac4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios-bin/metadata.xml @@ -0,0 +1,8 @@ + + + + + virtualization@gentoo.org + Gentoo Virtualization Project + + diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios-bin/seabios-bin-1.16.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios-bin/seabios-bin-1.16.0.ebuild new file mode 100644 index 0000000000..e242196091 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios-bin/seabios-bin-1.16.0.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +BINPKG="${P/-bin/}-1" + +DESCRIPTION="Open Source implementation of a 16-bit x86 BIOS" +HOMEPAGE="https://www.seabios.org/" +SRC_URI="https://dev.gentoo.org/~ajak/distfiles/${BINPKG}.xpak" +S="${WORKDIR}" + +LICENSE="LGPL-3 GPL-3" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86" + +RDEPEND="!sys-firmware/seabios" + +src_unpack() { + tar -xf - < <(xz -c -d --single-stream "${DISTDIR}/${BINPKG}.xpak") || die "unpacking binpkg failed" +} + +src_install() { + mv usr "${ED}" || die +} From b757f517106a3d58cb27383d61e01db0da99a8a2 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:42:52 +0200 Subject: [PATCH 30/38] sys-firmware/seabios: Drop unused package It's replaced by the sys-firmware/seabios-bin package. --- .../sys-firmware/seabios/Manifest | 5 - .../sys-firmware/seabios/files/README | 2 - .../files/seabios-1.14.0-binutils-2.36.patch | 9 - .../seabios/files/seabios/config.seabios-128k | 16 -- .../seabios/files/seabios/config.seabios-256k | 3 - .../files/seavgabios/config.vga-cirrus | 3 - .../files/seavgabios/config.vga-isavga | 3 - .../seabios/files/seavgabios/config.vga-qxl | 6 - .../files/seavgabios/config.vga-stdvga | 3 - .../files/seavgabios/config.vga-virtio | 6 - .../files/seavgabios/config.vga-vmware | 6 - .../sys-firmware/seabios/metadata.xml | 16 -- .../seabios/seabios-1.12.0-r1.ebuild | 171 ---------------- .../seabios/seabios-1.12.0.ebuild | 145 -------------- .../seabios/seabios-1.14.0-r1.ebuild | 172 ---------------- .../seabios/seabios-1.14.0-r2.ebuild | 183 ------------------ .../seabios/seabios-1.14.0.ebuild | 166 ---------------- 17 files changed, 915 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios/Manifest delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/README delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seabios-1.14.0-binutils-2.36.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seabios/config.seabios-128k delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seabios/config.seabios-256k delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-cirrus delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-isavga delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-qxl delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-stdvga delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-virtio delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-vmware delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios/metadata.xml delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.12.0-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.12.0.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.14.0-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.14.0-r2.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.14.0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/Manifest b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/Manifest deleted file mode 100644 index 1f37057de6..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/Manifest +++ /dev/null @@ -1,5 +0,0 @@ -DIST seabios-1.12.0-bin.tar.xz 162492 BLAKE2B 9a5a349226ed7efbed328493dc057e232203b251677a23f1f09c133743ff0ca6b05270c9d27460be1d8897888fe23ff7bdfa122023fa8ddb23af03d5b9b6f8dd SHA512 f7a0395d621245093bb9a278d95ecc3d4e8d23f620058cd4fddaf885c8b86256f6258f3fd8173c1d24c03306f44d180e768bf8005ee123bc4b699b9f0ca371be -DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96ebc158f34303b122b7bf209408c567665d8691364df8d8e886f63e0e72a3f3cd319dfa86ef581023201b5d94e53 SHA512 e52c5363e5bb37b5286e55545aa06bd126218f9d0e3a06ac2e189de68fe3de3256c11ca1bb13357a9c384d7e3af6284083ff3aa587688b5de04ef11b97bdfa27 -DIST seabios-1.14.0-bin.tar.xz 170160 BLAKE2B 1ab471ce0c6e27633ec42a66e3069496be84de713baab5de4f297821bd0da26404f7f70abc82e223ec5aa317a878889ae92b019988c72d24f77e7dcc5865f916 SHA512 7964e9bb7dff4fd6593f5d6d64efc4b1460750461b86635dbe5255d2086d619f51711d7a35e4dc20e556f705091c0950afabeddcd2e8876f05ce14f9ca73ed71 -DIST seabios-1.14.0-r2-bin.tar.xz 132256 BLAKE2B 7d38949de254d6e3699d463a66c363156aa36bfe16c18bea48c55a61bdc423184175fd5427d3246a78d9c6335e61e5baa982f67e7406c5525e405b4383530d41 SHA512 5ce0e407b97e878842fbd7ad2f9e8a65f2565a5aa43d08e01cff024352780f55f8669958c58d20770db7f90e87cc52c860af831cefe3846227e7b45cd9dc33ee -DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146 diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/README b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/README deleted file mode 100644 index a7aed6d46c..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/README +++ /dev/null @@ -1,2 +0,0 @@ -The configuration files config.vga-xxx are based on the variants found in -the qemu/roms/ tree. diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seabios-1.14.0-binutils-2.36.patch b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seabios-1.14.0-binutils-2.36.patch deleted file mode 100644 index 0453d203d4..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seabios-1.14.0-binutils-2.36.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/vgasrc/vgalayout.lds.S -+++ b/vgasrc/vgalayout.lds.S -@@ -19,5 +19,5 @@ SECTIONS - - // Discard regular data sections to force a link error if - // 16bit code attempts to access data not marked with VAR16. -- /DISCARD/ : { *(.text*) *(.rodata*) *(.data*) *(.bss*) *(COMMON) } -+ /DISCARD/ : { *(.text*) *(.rodata*) *(.data*) *(.bss*) *(COMMON) *(.note.gnu.property) } - } diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seabios/config.seabios-128k b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seabios/config.seabios-128k deleted file mode 100644 index 50dd75d5f3..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seabios/config.seabios-128k +++ /dev/null @@ -1,16 +0,0 @@ -# for qemu machine types 1.7 + older -# need to turn off features (xhci,uas,achi,nvme,acpi_parse) to make it fit into 128k -CONFIG_QEMU=y -CONFIG_ROM_SIZE=128 -CONFIG_BOOTSPLASH=n -CONFIG_XEN=n -CONFIG_USB_OHCI=n -CONFIG_USB_XHCI=n -CONFIG_USB_UAS=n -CONFIG_SDCARD=n -CONFIG_TCGBIOS=n -CONFIG_MPT_SCSI=n -CONFIG_ACPI_PARSE=n -CONFIG_NVME=n -CONFIG_AHCI=n -CONFIG_THREADS=n diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seabios/config.seabios-256k b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seabios/config.seabios-256k deleted file mode 100644 index 65e5015c2f..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seabios/config.seabios-256k +++ /dev/null @@ -1,3 +0,0 @@ -# for qemu machine types 2.0 + newer -CONFIG_QEMU=y -CONFIG_ROM_SIZE=256 diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-cirrus b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-cirrus deleted file mode 100644 index c8fe58239f..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-cirrus +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_BUILD_VGABIOS=y -CONFIG_VGA_CIRRUS=y -CONFIG_VGA_PCI=y diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-isavga b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-isavga deleted file mode 100644 index e55e294a0c..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-isavga +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_BUILD_VGABIOS=y -CONFIG_VGA_BOCHS=y -CONFIG_VGA_PCI=n diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-qxl b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-qxl deleted file mode 100644 index d393f0c34f..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-qxl +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG_BUILD_VGABIOS=y -CONFIG_VGA_BOCHS=y -CONFIG_VGA_PCI=y -CONFIG_OVERRIDE_PCI_ID=y -CONFIG_VGA_VID=0x1b36 -CONFIG_VGA_DID=0x0100 diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-stdvga b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-stdvga deleted file mode 100644 index 7d063b787c..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-stdvga +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_BUILD_VGABIOS=y -CONFIG_VGA_BOCHS=y -CONFIG_VGA_PCI=y diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-virtio b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-virtio deleted file mode 100644 index aa7a15ba11..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-virtio +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG_BUILD_VGABIOS=y -CONFIG_VGA_BOCHS=y -CONFIG_VGA_PCI=y -CONFIG_OVERRIDE_PCI_ID=y -CONFIG_VGA_VID=0x1af4 -CONFIG_VGA_DID=0x1050 diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-vmware b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-vmware deleted file mode 100644 index eb10427afd..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/files/seavgabios/config.vga-vmware +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG_BUILD_VGABIOS=y -CONFIG_VGA_BOCHS=y -CONFIG_VGA_PCI=y -CONFIG_OVERRIDE_PCI_ID=y -CONFIG_VGA_VID=0x15ad -CONFIG_VGA_DID=0x0405 diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/metadata.xml deleted file mode 100644 index f9cd49bf83..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/metadata.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - tamiko@gentoo.org - Matthias Maier - - - virtualization@gentoo.org - Gentoo Virtualization Project - - - Use official upstream pre-built binaries - Include SeaVGABIOS binaries (replacement for vgabios) - - diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.12.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.12.0-r1.ebuild deleted file mode 100644 index 03b9cd8cd7..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.12.0-r1.ebuild +++ /dev/null @@ -1,171 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -PYTHON_COMPAT=( python3_{7..9} ) - -inherit toolchain-funcs python-any-r1 - -# SeaBIOS maintainers sometimes don't release stable tarballs or stable -# binaries to generate the stable tarball the following is necessary: -# git clone git://git.seabios.org/seabios.git && cd seabios -# git archive --output seabios-${PV}.tar.gz --prefix seabios-${PV}/ rel-${PV} - -if [[ ${PV} == *9999* || -n "${EGIT_COMMIT}" ]] ; then - EGIT_REPO_URI="git://git.seabios.org/seabios.git" - inherit git-r3 -else - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" - - # Binary versions taken from fedora: - # http://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/Packages/s/ - # seabios-bin-1.12.1-2.fc31.noarch.rpm - # seavgabios-bin-1.12.1-2.fc31.noarch.rpm - SRC_URI=" - !binary? ( https://code.coreboot.org/p/seabios/downloads/get/${P}.tar.gz ) - binary? ( https://dev.gentoo.org/~tamiko/distfiles/${P}-bin.tar.xz )" -fi - -DESCRIPTION="Open Source implementation of a 16-bit x86 BIOS" -HOMEPAGE="https://www.seabios.org/" - -LICENSE="LGPL-3 GPL-3" -SLOT="0" -IUSE="+binary debug +seavgabios" - -REQUIRED_USE="debug? ( !binary )" - -SOURCE_DEPEND=" - >=sys-power/iasl-20060912 - ${PYTHON_DEPS}" -DEPEND=" - !binary? ( - ${SOURCE_DEPEND} - )" -RDEPEND="" - -choose_target_chost() { - if [[ -n "${CC}" ]]; then - ${CC} -dumpmachine - return - fi - - if use amd64 || use x86; then - # Use the native compiler - echo "${CHOST}" - return - fi - - local i - for i in x86_64 i686 i586 i486 i386 ; do - i=${i}-pc-linux-gnu - type -P ${i}-gcc > /dev/null && echo ${i} && return - done -} - -pkg_pretend() { - if ! use binary; then - ewarn "You have decided to compile your own SeaBIOS. This is not" - ewarn "supported by upstream unless you use their recommended" - ewarn "toolchain (which you are not)." - elog - ewarn "If you are intending to use this build with QEMU, realize" - ewarn "you will not receive any support if you have compiled your" - ewarn "own SeaBIOS. Virtual machines subtly fail based on changes" - ewarn "in SeaBIOS." - if [[ -z "$(choose_target_chost)" ]]; then - elog - eerror "Before you can compile ${PN}[-binary], you need to install a x86 cross-compiler" - eerror "Run the following commands:" - eerror " emerge crossdev" - eerror " crossdev --stable -t x86_64-pc-linux-gnu" - die "cross-compiler is needed" - fi - fi -} - -pkg_setup() { - use binary || python-any-r1_pkg_setup -} - -src_unpack() { - default - - # This simplifies the logic between binary & source builds. - mkdir -p "${S}" -} - -src_prepare() { - default - - # Ensure precompiled iasl files are never used - find "${WORKDIR}" -name '*.hex' -delete || die -} - -src_configure() { - use binary && return - - tc-ld-disable-gold #438058 - - if use debug ; then - echo "CONFIG_DEBUG_LEVEL=8" >.config - fi - _emake config -} - -_emake() { - LANG=C \ - emake V=1 \ - CC="$(tc-getCC)" \ - LD="$(tc-getLD)" \ - AR="$(tc-getAR)" \ - AS="$(tc-getAS)" \ - OBJCOPY="$(tc-getOBJCOPY)" \ - RANLIB="$(tc-getRANLIB)" \ - OBJDUMP="$(tc-getOBJDUMP)" \ - HOST_CC="$(tc-getBUILD_CC)" \ - VERSION="Gentoo/${EGIT_COMMIT:-${PVR}}" \ - "$@" -} - -src_compile() { - use binary && return - - local TARGET_CHOST=$(choose_target_chost) - - cp "${FILESDIR}/seabios/config.seabios-256k" .config || die - _emake oldnoconfig - CHOST="${TARGET_CHOST}" _emake iasl - CHOST="${TARGET_CHOST}" _emake out/bios.bin - mv out/bios.bin ../bios-256k.bin || die - - if use seavgabios ; then - local config t targets=( - cirrus - isavga - qxl - stdvga - virtio - vmware - ) - for t in "${targets[@]}" ; do - emake clean distclean - cp "${FILESDIR}/seavgabios/config.vga-${t}" .config || die - _emake oldnoconfig - CHOST="${TARGET_CHOST}" _emake out/vgabios.bin - cp out/vgabios.bin ../vgabios-${t}.bin || die - done - fi -} - -src_install() { - insinto /usr/share/seabios - use binary && doins ../bios.bin - doins ../bios-256k.bin - - if use seavgabios ; then - insinto /usr/share/seavgabios - doins ../vgabios*.bin - fi -} diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.12.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.12.0.ebuild deleted file mode 100644 index 375070e32d..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.12.0.ebuild +++ /dev/null @@ -1,145 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -PYTHON_COMPAT=( python3_{7..9} ) - -inherit toolchain-funcs python-any-r1 - -# SeaBIOS maintainers sometimes don't release stable tarballs or stable -# binaries to generate the stable tarball the following is necessary: -# git clone git://git.seabios.org/seabios.git && cd seabios -# git archive --output seabios-${PV}.tar.gz --prefix seabios-${PV}/ rel-${PV} - -if [[ ${PV} == *9999* || -n "${EGIT_COMMIT}" ]] ; then - EGIT_REPO_URI="git://git.seabios.org/seabios.git" - inherit git-r3 -else - KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sparc x86" - - # Binary versions taken from fedora: - # http://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/Packages/s/ - # seabios-bin-1.12.1-2.fc31.noarch.rpm - # seavgabios-bin-1.12.1-2.fc31.noarch.rpm - SRC_URI=" - !binary? ( https://code.coreboot.org/p/seabios/downloads/get/${P}.tar.gz ) - binary? ( https://dev.gentoo.org/~tamiko/distfiles/${P}-bin.tar.xz )" -fi - -DESCRIPTION="Open Source implementation of a 16-bit x86 BIOS" -HOMEPAGE="https://www.seabios.org/" - -LICENSE="LGPL-3 GPL-3" -SLOT="0" -IUSE="+binary debug +seavgabios" - -REQUIRED_USE="debug? ( !binary ) - !amd64? ( !x86? ( binary ) )" - -# The amd64/x86 check is needed to workaround #570892. -SOURCE_DEPEND=" - >=sys-power/iasl-20060912 - ${PYTHON_DEPS}" -DEPEND=" - !binary? ( - amd64? ( ${SOURCE_DEPEND} ) - x86? ( ${SOURCE_DEPEND} ) - )" -RDEPEND="" - -pkg_pretend() { - if ! use binary; then - ewarn "You have decided to compile your own SeaBIOS. This is not" - ewarn "supported by upstream unless you use their recommended" - ewarn "toolchain (which you are not)." - elog - ewarn "If you are intending to use this build with QEMU, realize" - ewarn "you will not receive any support if you have compiled your" - ewarn "own SeaBIOS. Virtual machines subtly fail based on changes" - ewarn "in SeaBIOS." - fi -} - -pkg_setup() { - use binary || python-any-r1_pkg_setup -} - -src_unpack() { - default - - # This simplifies the logic between binary & source builds. - mkdir -p "${S}" -} - -src_prepare() { - default - - # Ensure precompiled iasl files are never used - find "${WORKDIR}" -name '*.hex' -delete || die -} - -src_configure() { - use binary && return - - tc-ld-disable-gold #438058 - - if use debug ; then - echo "CONFIG_DEBUG_LEVEL=8" >.config - fi - _emake config -} - -_emake() { - LANG=C \ - emake V=1 \ - CC="$(tc-getCC)" \ - LD="$(tc-getLD)" \ - AR="$(tc-getAR)" \ - AS="$(tc-getAS)" \ - OBJCOPY="$(tc-getOBJCOPY)" \ - RANLIB="$(tc-getRANLIB)" \ - OBJDUMP="$(tc-getOBJDUMP)" \ - HOST_CC="$(tc-getBUILD_CC)" \ - VERSION="Gentoo/${EGIT_COMMIT:-${PVR}}" \ - "$@" -} - -src_compile() { - use binary && return - - cp "${FILESDIR}/seabios/config.seabios-256k" .config || die - _emake oldnoconfig - _emake iasl - _emake out/bios.bin - mv out/bios.bin ../bios-256k.bin || die - - if use seavgabios ; then - local config t targets=( - cirrus - isavga - qxl - stdvga - virtio - vmware - ) - for t in "${targets[@]}" ; do - emake clean distclean - cp "${FILESDIR}/seavgabios/config.vga-${t}" .config || die - _emake oldnoconfig - _emake out/vgabios.bin - cp out/vgabios.bin ../vgabios-${t}.bin || die - done - fi -} - -src_install() { - insinto /usr/share/seabios - use binary && doins ../bios.bin - doins ../bios-256k.bin - - if use seavgabios ; then - insinto /usr/share/seavgabios - doins ../vgabios*.bin - fi -} diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.14.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.14.0-r1.ebuild deleted file mode 100644 index f97b51857b..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.14.0-r1.ebuild +++ /dev/null @@ -1,172 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -PYTHON_COMPAT=( python3_{7..9} ) - -inherit toolchain-funcs python-any-r1 - -# SeaBIOS maintainers sometimes don't release stable tarballs or stable -# binaries to generate the stable tarball the following is necessary: -# git clone git://git.seabios.org/seabios.git && cd seabios -# git archive --output seabios-${PV}.tar.gz --prefix seabios-${PV}/ rel-${PV} - -if [[ ${PV} == *9999* || -n "${EGIT_COMMIT}" ]] ; then - EGIT_REPO_URI="git://git.seabios.org/seabios.git" - inherit git-r3 -else - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" - - SRC_URI=" - !binary? ( https://www.seabios.org/downloads/${P}.tar.gz ) - binary? ( https://dev.gentoo.org/~tamiko/distfiles/${P}-bin.tar.xz )" -fi - -DESCRIPTION="Open Source implementation of a 16-bit x86 BIOS" -HOMEPAGE="https://www.seabios.org/" - -LICENSE="LGPL-3 GPL-3" -SLOT="0" -IUSE="+binary debug +seavgabios" - -REQUIRED_USE="debug? ( !binary )" - -SOURCE_DEPEND=" - >=sys-power/iasl-20060912 - ${PYTHON_DEPS}" -DEPEND=" - !binary? ( - ${SOURCE_DEPEND} - )" -RDEPEND="" - -choose_target_chost() { - if [[ -n "${CC}" ]]; then - ${CC} -dumpmachine - return - fi - - if use amd64 || use x86; then - # Use the native compiler - echo "${CHOST}" - return - fi - - local i - for i in x86_64 i686 i586 i486 i386 ; do - i=${i}-pc-linux-gnu - type -P ${i}-gcc > /dev/null && echo ${i} && return - done -} - -pkg_pretend() { - if ! use binary; then - ewarn "You have decided to compile your own SeaBIOS. This is not" - ewarn "supported by upstream unless you use their recommended" - ewarn "toolchain (which you are not)." - elog - ewarn "If you are intending to use this build with QEMU, realize" - ewarn "you will not receive any support if you have compiled your" - ewarn "own SeaBIOS. Virtual machines subtly fail based on changes" - ewarn "in SeaBIOS." - if [[ -z "$(choose_target_chost)" ]]; then - elog - eerror "Before you can compile ${PN}[-binary], you need to install a x86 cross-compiler" - eerror "Run the following commands:" - eerror " emerge crossdev" - eerror " crossdev --stable -t x86_64-pc-linux-gnu" - die "cross-compiler is needed" - fi - fi -} - -pkg_setup() { - use binary || python-any-r1_pkg_setup -} - -src_unpack() { - default - - # This simplifies the logic between binary & source builds. - mkdir -p "${S}" -} - -src_prepare() { - default - - if ! use binary; then - eapply "${FILESDIR}"/${PN}-1.14.0-binutils-2.36.patch - fi - - # Ensure precompiled iasl files are never used - find "${WORKDIR}" -name '*.hex' -delete || die -} - -src_configure() { - use binary && return - - tc-ld-disable-gold #438058 - - if use debug ; then - echo "CONFIG_DEBUG_LEVEL=8" >.config - fi - _emake config -} - -_emake() { - LANG=C \ - emake V=1 \ - CPP="$(tc-getPROG CPP cpp)" \ - CC="$(tc-getCC)" \ - LD="$(tc-getLD)" \ - AR="$(tc-getAR)" \ - AS="$(tc-getAS)" \ - OBJCOPY="$(tc-getOBJCOPY)" \ - RANLIB="$(tc-getRANLIB)" \ - OBJDUMP="$(tc-getOBJDUMP)" \ - STRIP="$(tc-getSTRIP)" \ - HOST_CC="$(tc-getBUILD_CC)" \ - VERSION="Gentoo/${EGIT_COMMIT:-${PVR}}" \ - "$@" -} - -src_compile() { - use binary && return - - local TARGET_CHOST=$(choose_target_chost) - - cp "${FILESDIR}/seabios/config.seabios-256k" .config || die - _emake oldnoconfig - CHOST="${TARGET_CHOST}" _emake iasl - CHOST="${TARGET_CHOST}" _emake out/bios.bin - mv out/bios.bin ../bios-256k.bin || die - - if use seavgabios ; then - local config t targets=( - cirrus - isavga - qxl - stdvga - virtio - vmware - ) - for t in "${targets[@]}" ; do - _emake clean distclean - cp "${FILESDIR}/seavgabios/config.vga-${t}" .config || die - _emake oldnoconfig - CHOST="${TARGET_CHOST}" _emake out/vgabios.bin - cp out/vgabios.bin ../vgabios-${t}.bin || die - done - fi -} - -src_install() { - insinto /usr/share/seabios - doins ../bios-256k.bin - - if use seavgabios ; then - insinto /usr/share/seavgabios - doins ../vgabios*.bin - fi -} diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.14.0-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.14.0-r2.ebuild deleted file mode 100644 index 37b8af0969..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.14.0-r2.ebuild +++ /dev/null @@ -1,183 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -PYTHON_COMPAT=( python3_{7..9} ) - -inherit toolchain-funcs python-any-r1 - -# SeaBIOS maintainers sometimes don't release stable tarballs or stable -# binaries to generate the stable tarball the following is necessary: -# git clone git://git.seabios.org/seabios.git && cd seabios -# git archive --output seabios-${PV}.tar.gz --prefix seabios-${PV}/ rel-${PV} - -# To generate binary tarball you can run the following from fork tree: -# cd .../seabios-1.14.0-r2/image/usr/share -# $ tar cJf seabios-1.14.0-r2-bin.tar.xz *.bin - -if [[ ${PV} == *9999* || -n "${EGIT_COMMIT}" ]] ; then - EGIT_REPO_URI="git://git.seabios.org/seabios.git" - inherit git-r3 -else - KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sparc x86" - - SRC_URI=" - !binary? ( https://www.seabios.org/downloads/${P}.tar.gz ) - binary? ( https://dev.gentoo.org/~sam/distfiles/${P}-r2-bin.tar.xz )" -fi - -DESCRIPTION="Open Source implementation of a 16-bit x86 BIOS" -HOMEPAGE="https://www.seabios.org/" - -LICENSE="LGPL-3 GPL-3" -SLOT="0" -IUSE="+binary debug +seavgabios" - -REQUIRED_USE="debug? ( !binary )" - -SOURCE_DEPEND=" - >=sys-power/iasl-20060912 - ${PYTHON_DEPS}" -DEPEND=" - !binary? ( - ${SOURCE_DEPEND} - )" -RDEPEND="" - -choose_target_chost() { - if [[ -n "${CC}" ]]; then - ${CC} -dumpmachine - return - fi - - if use amd64 || use x86; then - # Use the native compiler - echo "${CHOST}" - return - fi - - local i - for i in x86_64 i686 i586 i486 i386 ; do - i=${i}-pc-linux-gnu - type -P ${i}-gcc > /dev/null && echo ${i} && return - done -} - -pkg_pretend() { - if ! use binary; then - ewarn "You have decided to compile your own SeaBIOS. This is not" - ewarn "supported by upstream unless you use their recommended" - ewarn "toolchain (which you are not)." - elog - ewarn "If you are intending to use this build with QEMU, realize" - ewarn "you will not receive any support if you have compiled your" - ewarn "own SeaBIOS. Virtual machines subtly fail based on changes" - ewarn "in SeaBIOS." - if [[ -z "$(choose_target_chost)" ]]; then - elog - eerror "Before you can compile ${PN}[-binary], you need to install a x86 cross-compiler" - eerror "Run the following commands:" - eerror " emerge crossdev" - eerror " crossdev --stable -t x86_64-pc-linux-gnu" - die "cross-compiler is needed" - fi - fi -} - -pkg_setup() { - use binary || python-any-r1_pkg_setup -} - -src_unpack() { - default - - # This simplifies the logic between binary & source builds. - mkdir -p "${S}" -} - -src_prepare() { - default - - if ! use binary; then - eapply "${FILESDIR}"/${PN}-1.14.0-binutils-2.36.patch - fi - - # Ensure precompiled iasl files are never used - find "${WORKDIR}" -name '*.hex' -delete || die -} - -src_configure() { - use binary && return - - tc-ld-disable-gold #438058 - - if use debug ; then - echo "CONFIG_DEBUG_LEVEL=8" >.config - fi - _emake config -} - -_emake() { - LANG=C \ - emake V=1 \ - CPP="$(tc-getPROG CPP cpp)" \ - CC="$(tc-getCC)" \ - LD="$(tc-getLD)" \ - AR="$(tc-getAR)" \ - AS="$(tc-getAS)" \ - OBJCOPY="$(tc-getOBJCOPY)" \ - RANLIB="$(tc-getRANLIB)" \ - OBJDUMP="$(tc-getOBJDUMP)" \ - STRIP="$(tc-getSTRIP)" \ - HOST_CC="$(tc-getBUILD_CC)" \ - VERSION="Gentoo/${EGIT_COMMIT:-${PVR}}" \ - "$@" -} - -src_compile() { - use binary && return - - local TARGET_CHOST=$(choose_target_chost) - - cp "${FILESDIR}/seabios/config.seabios-128k" .config || die - _emake oldnoconfig - CHOST="${TARGET_CHOST}" _emake iasl - CHOST="${TARGET_CHOST}" _emake out/bios.bin - mv out/bios.bin ../bios.bin || die - - cp "${FILESDIR}/seabios/config.seabios-256k" .config || die - _emake oldnoconfig - CHOST="${TARGET_CHOST}" _emake iasl - CHOST="${TARGET_CHOST}" _emake out/bios.bin - mv out/bios.bin ../bios-256k.bin || die - - if use seavgabios ; then - local config t targets=( - cirrus - isavga - qxl - stdvga - virtio - vmware - ) - for t in "${targets[@]}" ; do - _emake clean distclean - cp "${FILESDIR}/seavgabios/config.vga-${t}" .config || die - _emake oldnoconfig - CHOST="${TARGET_CHOST}" _emake out/vgabios.bin - cp out/vgabios.bin ../vgabios-${t}.bin || die - done - fi -} - -src_install() { - insinto /usr/share/seabios - doins ../bios.bin - doins ../bios-256k.bin - - if use seavgabios ; then - insinto /usr/share/seavgabios - doins ../vgabios*.bin - fi -} diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.14.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.14.0.ebuild deleted file mode 100644 index 0c4005c94f..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/seabios/seabios-1.14.0.ebuild +++ /dev/null @@ -1,166 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -PYTHON_COMPAT=( python3_{7..9} ) - -inherit toolchain-funcs python-any-r1 - -# SeaBIOS maintainers sometimes don't release stable tarballs or stable -# binaries to generate the stable tarball the following is necessary: -# git clone git://git.seabios.org/seabios.git && cd seabios -# git archive --output seabios-${PV}.tar.gz --prefix seabios-${PV}/ rel-${PV} - -if [[ ${PV} == *9999* || -n "${EGIT_COMMIT}" ]] ; then - EGIT_REPO_URI="git://git.seabios.org/seabios.git" - inherit git-r3 -else - KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sparc x86" - - SRC_URI=" - !binary? ( https://www.seabios.org/downloads/${P}.tar.gz ) - binary? ( https://dev.gentoo.org/~tamiko/distfiles/${P}-bin.tar.xz )" -fi - -DESCRIPTION="Open Source implementation of a 16-bit x86 BIOS" -HOMEPAGE="https://www.seabios.org/" - -LICENSE="LGPL-3 GPL-3" -SLOT="0" -IUSE="+binary debug +seavgabios" - -REQUIRED_USE="debug? ( !binary )" - -SOURCE_DEPEND=" - >=sys-power/iasl-20060912 - ${PYTHON_DEPS}" -DEPEND=" - !binary? ( - ${SOURCE_DEPEND} - )" -RDEPEND="" - -choose_target_chost() { - if [[ -n "${CC}" ]]; then - ${CC} -dumpmachine - return - fi - - if use amd64 || use x86; then - # Use the native compiler - echo "${CHOST}" - return - fi - - local i - for i in x86_64 i686 i586 i486 i386 ; do - i=${i}-pc-linux-gnu - type -P ${i}-gcc > /dev/null && echo ${i} && return - done -} - -pkg_pretend() { - if ! use binary; then - ewarn "You have decided to compile your own SeaBIOS. This is not" - ewarn "supported by upstream unless you use their recommended" - ewarn "toolchain (which you are not)." - elog - ewarn "If you are intending to use this build with QEMU, realize" - ewarn "you will not receive any support if you have compiled your" - ewarn "own SeaBIOS. Virtual machines subtly fail based on changes" - ewarn "in SeaBIOS." - if [[ -z "$(choose_target_chost)" ]]; then - elog - eerror "Before you can compile ${PN}[-binary], you need to install a x86 cross-compiler" - eerror "Run the following commands:" - eerror " emerge crossdev" - eerror " crossdev --stable -t x86_64-pc-linux-gnu" - die "cross-compiler is needed" - fi - fi -} - -pkg_setup() { - use binary || python-any-r1_pkg_setup -} - -src_unpack() { - default - - # This simplifies the logic between binary & source builds. - mkdir -p "${S}" -} - -src_prepare() { - default - - # Ensure precompiled iasl files are never used - find "${WORKDIR}" -name '*.hex' -delete || die -} - -src_configure() { - use binary && return - - tc-ld-disable-gold #438058 - - if use debug ; then - echo "CONFIG_DEBUG_LEVEL=8" >.config - fi - _emake config -} - -_emake() { - LANG=C \ - emake V=1 \ - CC="$(tc-getCC)" \ - LD="$(tc-getLD)" \ - AR="$(tc-getAR)" \ - AS="$(tc-getAS)" \ - OBJCOPY="$(tc-getOBJCOPY)" \ - RANLIB="$(tc-getRANLIB)" \ - OBJDUMP="$(tc-getOBJDUMP)" \ - HOST_CC="$(tc-getBUILD_CC)" \ - VERSION="Gentoo/${EGIT_COMMIT:-${PVR}}" \ - "$@" -} - -src_compile() { - use binary && return - - local TARGET_CHOST=$(choose_target_chost) - - cp "${FILESDIR}/seabios/config.seabios-256k" .config || die - _emake oldnoconfig - CHOST="${TARGET_CHOST}" _emake iasl - CHOST="${TARGET_CHOST}" _emake out/bios.bin - mv out/bios.bin ../bios-256k.bin || die - - if use seavgabios ; then - local config t targets=( - cirrus - isavga - qxl - stdvga - virtio - vmware - ) - for t in "${targets[@]}" ; do - emake clean distclean - cp "${FILESDIR}/seavgabios/config.vga-${t}" .config || die - _emake oldnoconfig - CHOST="${TARGET_CHOST}" _emake out/vgabios.bin - cp out/vgabios.bin ../vgabios-${t}.bin || die - done - fi -} - -src_install() { - insinto /usr/share/seabios - doins ../bios-256k.bin - - if use seavgabios ; then - insinto /usr/share/seavgabios - doins ../vgabios*.bin - fi -} From c5cdc2c6c79c2ea4439509ad5aee2ddc66d35f0d Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:44:08 +0200 Subject: [PATCH 31/38] sys-firmware/sgabios: Sync with Gentoo It's from Gentoo commit 9f513abc819807681cf5f7eb7a673fb5a40741cf. --- .../sys-firmware/sgabios/Manifest | 2 - .../files/sgabios-0.1_pre8-build-cc.patch | 23 -------- .../files/sgabios-0.1_pre8-makefile.patch | 12 ---- .../sgabios/sgabios-0.1_pre10.ebuild | 4 +- .../sgabios/sgabios-0.1_pre8-r1.ebuild | 58 ------------------- 5 files changed, 2 insertions(+), 97 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/files/sgabios-0.1_pre8-build-cc.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/files/sgabios-0.1_pre8-makefile.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/sgabios-0.1_pre8-r1.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/Manifest b/sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/Manifest index 47d874a70e..ff7364727f 100644 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/Manifest @@ -1,4 +1,2 @@ DIST sgabios-0.1_pre10-bin.tar.xz 2652 BLAKE2B 6dff0152f8553c245796badfd291e0e79f2a6a935a9908d9825dbac760746c05265b7f12a29a2d1fa1b95d16291ca5723fbf2f53b5bb04ff416e64b9c66b0c7d SHA512 6dd43858e91bee57bc0bc6d721eb26abb30bbe8b9c30733b39f3612cdf0dddd9ad8876518a4457a68a48d8a4b911225635c0e8eef1a7e78cfe65c8fcf0af2bab DIST sgabios-0.1_pre10.tar.gz 31086 BLAKE2B f9577d0009d90c46aa5963e6dea50be4b7ec4b5c597194b33256748adbc4d60b3ac50646ce80befbd6d810ba80e93048fd6234b4d320d15f3506087435ec346c SHA512 cf12a8b8579658c99a3ad8c325637dba1569d364fc5440caf33c85a4f0403d83cf755df61d068151191c75588d568da629329a93d731f49b0b9131c983141fe6 -DIST sgabios-0.1_pre8-bins.tar.xz 2704 BLAKE2B 8efcf613a4857467cc3cfbc3f6402bca091892f0b2137ff65caf2b444610c86c1db0e61505bfe48ed8d6ccc9e8928190c2a38693aeddd523e27d22a29e777044 SHA512 46fc02200b3fa2e45c954a2b6e4cd40f10d6969fd05ef4d441402c7390b4e83390250972ef0ea891635400cad22a4d8fd2b66b56afa91d03e1e0b99132e09c0d -DIST sgabios-0.1_pre8.tar.xz 27200 BLAKE2B 8ea535f2fcc8f7105a278202648e06722e7463e66ff3ccf824cd3a672a7908e7223f27678ebd4ca73eb19abaff75e082ea7b9bc222332436f31a8840443d7b44 SHA512 68e2a894eb5b99cda2b0e96ade891e24397ac962a777a97dbb526f4570e5734d36a88fde1ef64ed7a887cd8bfc500c91c48849d2c26aca6ce7e36dd80aaf361e diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/files/sgabios-0.1_pre8-build-cc.patch b/sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/files/sgabios-0.1_pre8-build-cc.patch deleted file mode 100644 index 6cdac84c6a..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/files/sgabios-0.1_pre8-build-cc.patch +++ /dev/null @@ -1,23 +0,0 @@ -https://bugs.gentoo.org/552280 - ---- a/Makefile -+++ b/Makefile -@@ -20,6 +20,9 @@ - BUILD_USER = \"$(shell whoami)\" - - CFLAGS := -Wall -Os -m32 -nostdlib -+BUILD_CFLAGS := -Wall -O2 -+BUILD_CC ?= $(CC) -+BUILD_LD ?= $(BUILD_CC) - - ASFLAGS := $(CFLAGS) - ASFLAGS += -DBUILD_DATE="$(BUILD_DATE)" -@@ -55,7 +56,7 @@ - $(LD) $(LDFLAGS) $(OBJS) -o $@ - - csum8: csum8.c -- $(CC) -Wall -O2 -o $@ $< -+ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) -o $@ $< - - sgabios.o: buildinfo - diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/files/sgabios-0.1_pre8-makefile.patch b/sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/files/sgabios-0.1_pre8-makefile.patch deleted file mode 100644 index 18e636f4e8..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/files/sgabios-0.1_pre8-makefile.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u sgabios-0.1_pre8/Makefile sgabios-0.1_pre8-fix//Makefile ---- sgabios-0.1_pre8/Makefile 2012-07-21 17:16:41.903363117 -0500 -+++ sgabios-0.1_pre8-fix//Makefile 2012-07-23 11:11:08.438162997 -0500 -@@ -71,8 +71,4 @@ - - ifeq (.depend, $(wildcard .depend)) - include .depend --else --# if no .depend file existed, add a make clean to the end of building .depend --.depend:: -- $(MAKE) clean - endif diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/sgabios-0.1_pre10.ebuild b/sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/sgabios-0.1_pre10.ebuild index 829c335c77..9c2552dd24 100644 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/sgabios-0.1_pre10.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/sgabios-0.1_pre10.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 @@ -16,7 +16,7 @@ S="${WORKDIR}/sgabios-a85446a" LICENSE="Apache-2.0" SLOT="0" -KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sparc x86" +KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86" IUSE="+binary" REQUIRED_USE="!amd64? ( !x86? ( binary ) )" diff --git a/sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/sgabios-0.1_pre8-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/sgabios-0.1_pre8-r1.ebuild deleted file mode 100644 index 8a87d1c68a..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-firmware/sgabios/sgabios-0.1_pre8-r1.ebuild +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit toolchain-funcs - -DESCRIPTION="serial graphics adapter bios option rom for x86" -HOMEPAGE="https://code.google.com/p/sgabios/" -SRC_URI="mirror://gentoo/${P}.tar.xz - !binary? ( https://dev.gentoo.org/~cardoe/distfiles/${P}.tar.xz ) - binary? ( https://dev.gentoo.org/~cardoe/distfiles/${P}-bins.tar.xz )" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sparc x86" -IUSE="+binary" - -REQUIRED_USE="!amd64? ( !x86? ( binary ) )" - -PATCHES=( - "${FILESDIR}"/${P}-makefile.patch - "${FILESDIR}"/${P}-build-cc.patch #552280 -) - -src_prepare() { - if use binary; then - eapply_user - return - fi - default -} - -src_compile() { - use binary && return - - tc-ld-disable-gold - tc-export_build_env BUILD_CC - emake \ - BUILD_CC="${BUILD_CC}" \ - BUILD_CFLAGS="${BUILD_CFLAGS}" \ - BUILD_LDFLAGS="${BUILD_LDFLAGS}" \ - BUILD_CPPFLAGS="${BUILD_CPPFLAGS}" \ - CC="$(tc-getCC)" \ - LD="$(tc-getLD)" \ - AR="$(tc-getAR)" \ - OBJCOPY="$(tc-getOBJCOPY)" -} - -src_install() { - insinto /usr/share/sgabios - - if use binary ; then - doins bins/sgabios.bin - else - doins sgabios.bin - fi -} From 1910e5ef99c03393baff804a5ff4542340b7915b Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:45:22 +0200 Subject: [PATCH 32/38] sys-kernel/linux-headers: Sync with Gentoo It's from Gentoo commit 60cd062ce054981fa2a863bf43647d0e98298795. --- .../sys-kernel/linux-headers/Manifest | 16 +++--- ...-Use-stddefs.h-instead-of-compiler.h.patch | 47 +++++++++++----- ...ders-5.15-remove-inclusion-sysinfo.h.patch | 25 +++++++++ ...18.ebuild => linux-headers-3.18-r1.ebuild} | 28 +++++----- ...r1.ebuild => linux-headers-4.14-r2.ebuild} | 26 ++++----- ...19.ebuild => linux-headers-4.19-r1.ebuild} | 29 +++++----- ...4.4.ebuild => linux-headers-4.4-r1.ebuild} | 26 ++++----- ...4.9.ebuild => linux-headers-4.9-r1.ebuild} | 26 ++++----- ...r1.ebuild => linux-headers-5.10-r2.ebuild} | 32 +++++------ .../linux-headers/linux-headers-5.10.ebuild | 45 ---------------- .../linux-headers/linux-headers-5.11.ebuild | 45 ---------------- .../linux-headers/linux-headers-5.12.ebuild | 44 --------------- .../linux-headers/linux-headers-5.13.ebuild | 44 --------------- .../linux-headers/linux-headers-5.14.ebuild | 45 ---------------- ...15.ebuild => linux-headers-5.15-r3.ebuild} | 20 +++++-- .../linux-headers/linux-headers-5.19.ebuild | 54 +++++++++++++++++++ ...-r1.ebuild => linux-headers-5.4-r2.ebuild} | 24 +++++---- .../linux-headers/linux-headers-5.9.ebuild | 45 ---------------- .../linux-headers/linux-headers-6.0.ebuild | 47 ++++++++++++++++ .../linux-headers/linux-headers-6.1.ebuild | 47 ++++++++++++++++ 20 files changed, 331 insertions(+), 384 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/files/linux-headers-5.15-remove-inclusion-sysinfo.h.patch rename sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/{linux-headers-3.18.ebuild => linux-headers-3.18-r1.ebuild} (63%) rename sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/{linux-headers-4.14-r1.ebuild => linux-headers-4.14-r2.ebuild} (65%) rename sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/{linux-headers-4.19.ebuild => linux-headers-4.19-r1.ebuild} (67%) rename sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/{linux-headers-4.4.ebuild => linux-headers-4.4-r1.ebuild} (65%) rename sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/{linux-headers-4.9.ebuild => linux-headers-4.9-r1.ebuild} (65%) rename sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/{linux-headers-5.10-r1.ebuild => linux-headers-5.10-r2.ebuild} (60%) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.10.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.11.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.12.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.13.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.14.ebuild rename sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/{linux-headers-5.15.ebuild => linux-headers-5.15-r3.ebuild} (64%) create mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.19.ebuild rename sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/{linux-headers-5.4-r1.ebuild => linux-headers-5.4-r2.ebuild} (66%) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.9.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-6.0.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-6.1.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/Manifest b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/Manifest index 53067ee582..6a50962b1d 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/Manifest @@ -4,23 +4,19 @@ DIST gentoo-headers-4.19-1.tar.xz 4040 BLAKE2B 4ccaf4fb6bde84f0b1f29534cf2f6effc DIST gentoo-headers-4.4-1.tar.xz 6624 BLAKE2B 9cdf0c22520e413f175942c4994dd90b0fed8f72c67332a05e7ed72b901ee04594f4e4a3c0252e0a6e057d9c08c4d653387dc36cda82ce9ef8a16e7317ba9ea0 SHA512 dd8a5c627a9cd373022d7afa1beb126f15694f80452821f31fc5c1a3439635814d205bcbc873a5869946472d86cdec872a44f4870751b96d42e89893fca1b983 DIST gentoo-headers-4.9-1.tar.xz 5416 BLAKE2B 2538870b340d4e4b260ada37b0571ba770a4bf93b0f0cf78819b4bf68b8ddc43c314d7fc5d12a78bc71c9bb12306d986ae0ae74159ec7edc7deea371f6b5f015 SHA512 1069f50c58f25ceb8a13c8e53dce6a21e352e2a624da3b9a6d139939e7613e9a97226eb0173fa060ee69443c6a50b53b6d5c6d752dcaebffbe2a78f06cfbe2b6 DIST gentoo-headers-5.10-1.tar.xz 4304 BLAKE2B b5006ff13c8ef8394806919d547f1b15ac32cc4d290e8c5f5a5073f54112db194a9e743177ae54941d8a504e15b662751258259183c47c574936744d7c51b405 SHA512 3154558df20e3a8821af23b2a585eaccb6c40877850b1cf752c435c170f7f322a48e77cee63bcc061b69aff8602987f4506d803c73f394929716295aface4f3d -DIST gentoo-headers-5.11-1.tar.xz 3624 BLAKE2B 378eed88876a911e47ea08563f4fea840bfc11def916bce47c3268029ba926ced06e621edb53c9248fed4de547cfb447cc25da2222a864983a746fec06fb60d9 SHA512 896cacd48e9965ea724c13ca5a69b8c9aa4f47e631b539c71e4936462d50da3d34863e7419217ba434bcd97ebf8b05d2fc65bc9e60a584a108e864f4cf7f02fc -DIST gentoo-headers-5.12-1.tar.xz 3624 BLAKE2B 71206e81c9df3c26b93384231094f2e7762cc3b957261a18999b4e3c782ca3edd2ba25461dcb308b938f515495aabbf5d34234f2b9f072fc344a1c8eb1c3a001 SHA512 f15f31116e81114794de8d2ff30e60ff3844a2202837753754b8ee2c2a56dffcfacc6f873d3d67bc313367ad678d00d84410bf6ced0a32cf391e2978d9eaed6a -DIST gentoo-headers-5.13-1.tar.xz 2164 BLAKE2B bd2a7454111961c29134087801c5bcf88c9d0ff9d066c87ba8e81b9004c89290ebec46508324f2062e52166c0e4f82a1a740a66e48140030ce8adc7f4b4c9ccd SHA512 9f7fc903c7ad5142322e83a15a356acfbddd0b8f67c998dd03d74c57816eca7eb54f4b8b02c31f92bb9cf63b3285ff98ad9fe09a5fb8f0864a88da2ec80d3da5 -DIST gentoo-headers-5.14-1.tar.xz 1496 BLAKE2B f58c7079fdc95a4f0add255b3aca6f39554349369930364d1d67df9a2020213c1dd3f24f00e1992877d69839a28183a2139c26ac52db42b9edfff7a2254ee333 SHA512 1c1052405e2ec7bc0b32ed3036d173ca8f471ea2997f52cd5915a5a0963c86ec263beb63615f14267cb473ec2e5d047fd78960718a6866b64f84b634a0062b07 DIST gentoo-headers-5.15-1.tar.xz 1496 BLAKE2B 9d88ecc517e226580ba43cba1b5cc62232690ed219f9c5e2d26047de6dbc4056eaaf04c320b2758acb3cb08b44ec402c7185989e0c5ded40c44f7b4bb1d77328 SHA512 f31d5fb4b5264a8b9c060d4215462796240c2423f0872e55ba4e96904086264f55b54d00342aef625a8f710c2ebc2d731bcf79cd0362b398c84235ff949eb229 +DIST gentoo-headers-5.19-0.tar.xz 1168 BLAKE2B b4b90f23ddcbf0820f930bd605fb4a3269b8e48bc5f9c221cd60a726868140b9d43d1cd7ab04af8faf72417def0a7c9924f6b456d4521cdbcb35c825ec319a74 SHA512 0a652de74772e2c2f4de5a7cf188d05efbc797487ca6a0835075588d53abf5b835e65f626bd69a2de9ebdfef1a152581b79d5084e8af03a07123c0a149a67b0e DIST gentoo-headers-5.4-2.tar.xz 11352 BLAKE2B 0ff989dbfff9070c291efe1a8b925462770e71d0c3faeb2e53581dcce02abe45969ec293a7293b6d843f483927b15f4accc1f24ee4966483164e8f72727cfad8 SHA512 b460e4d00bdd9ec2ecf229f3b2dde7c6468f775399ba6a49fa0533c0688628c7b27d83835c21eab07407fd98c220043cd1b20e37cc4decbd08a3f2fd9cf6c2be -DIST gentoo-headers-5.9-1.tar.xz 4304 BLAKE2B 5dda91dac529cf3afca220d0ec323f679eae00e850e127ca6fb7dd42313afe7d4e2b23860a5b58673c070456e1ebd6b0d48efd681a764eef1bab996de579fd11 SHA512 3522d25e4d13f703e69a7e8da1813b38c8977821363b56af1988d78c446087dea4c3499283a2fdef2dc000fde29b945abb821a01f53ac0ac6c2b551699b3b18c +DIST gentoo-headers-6.0-0.tar.xz 1164 BLAKE2B c288c6581224235367e8bfbd726d3e5ffa19b88b4950bbf4d5df0985835b25794986bbd0018a116455acc001c87f7e3b9290f6ba5ce16278ba4bfe02b9f402e1 SHA512 6bb5d7342e30a7e7bc0ecef5c2f95f3d78e8877b77c427728a3ca4614a13738c6d24f725c7047b896a868ee8a0ba1aea92355aebdf6723f08e6d4fd8c0c1c7d6 +DIST gentoo-headers-6.1-0.tar.xz 1172 BLAKE2B 6929760733cd4a89228554b57b1027ccf887b6c7e56b45f71db9926e9328e2f0cf28b2f386eaaaef461cb2e05e4b1c088ffafea308f25254409f56c381bea2ca SHA512 14c3629a3c3aded37655ed277d718ed8398a08e231682f88037f1feb0c0727ef298f5e17626372fe890606930c027a3a59d8266bac746960651a90443beab5c5 DIST gentoo-headers-base-3.18.tar.xz 3776668 BLAKE2B 837a675ecf05ec270549d0ba6b9dcb98fb0e40f22007ebfa3e430152b7149dcfa29c8bbe38c737add07f75642234f1633c1d5ae0170788e8d4f765faf00bbdbe SHA512 6615c604e5e618d26fff5a61691f7827bb05be9790db6c9f8e16e3842bce8f056f9928f85ae5714710b75743b0d0804faba4ba9c76e934e1de22dc03ef6d5535 DIST gentoo-headers-base-4.14.tar.xz 8017944 BLAKE2B e967a3f26fa002f62af72c165cf960e855f5d84dd105b3f136e5ae24f4cdfc9e5f8b217a83955b325ca4bd6bda0a9d4c4de02d8d79fd4aa72191bc63db96183a SHA512 2a4e83a9ee36ffa85b59ebac1e12f4f1c572825b767928a42c4748d924d04f0536bab4d9375ca68c11ad867c226f386c40c7c4d0158d1ab00c838eb5b2f9f21a DIST gentoo-headers-base-4.19.tar.xz 7956220 BLAKE2B 5b6868188b6cb505556b8f307972be6b27c0201e8287f6a2c4d0ac8bf16cfe048cb05afacf879731ba81de5e2a8c5afc4adad007e00b12efb8b2a158a666f4dd SHA512 ef0f159cb31651bf8e00c31d8ac807e64413c7bf88807e1ab4779524db10eec4726b65af0fad034a0cb2e000cd61a6008bcc174828061ffaf633c170dd09645c DIST gentoo-headers-base-4.4.tar.xz 3911752 BLAKE2B 5031ecd48b99cb0c9c35ca935fa6a62cc36c076bab193ec397fc0d543170f29c6d5a0827a2ea5517eb68fc838819cbe3e5abd125bb920992492369d5e5c1e7cb SHA512 1cd3de58ff790c3730bea38138c7a45ef95d04288c69ffeabebb884fab3add13bd9c99785ddd87a3ee467a0e1b1cdc457bbd28da349e7c178b4d2374c5fb78a3 DIST gentoo-headers-base-4.9.tar.xz 4052748 BLAKE2B e279954c56170fbfa4ebae8dade731825b3d5f0cd5d73a5b33cd93a9c8f5fa140e14edf0d5ac26a452fe8a61b16fdcc851f5329f56e4c8dcf4472a995de44c4c SHA512 a03418cfba7fa4531279d9122411af3e285e962506e8df9279fbbb27ae08a4e30725bd1cf03f48ad523f61f2889195e6c844fa4c7b4ef2f828baf47ef402abfa DIST linux-5.10.tar.xz 116606704 BLAKE2B b923d7b66309224f42f35f8a5fa219421b0a9362d2adacdadd8d96251f61f7230878ea297a269a7f3b3c56830f0b177e068691e1d7f88501a05653b0a13274d1 SHA512 95bc137d0cf9148da6a9d1f1a878698dc27b40f68e22c597544010a6c591ce1b256f083489d3ff45ff77753289b535135590194d88ef9f007d0ddab3d74de70e -DIST linux-5.11.tar.xz 117619104 BLAKE2B 81300c27bd5476387a83123aaeb4163c73eb61e9245806c23660cb5e6a4fa88ffc9def027031335fa0270fc4080506cd415990014364e3a98b9d2e8c58a29524 SHA512 a567ec133018bb5ec00c60281479b466c26e02137a93a9c690e83997947df02b6fd94e76e8df748f6d70ceb58a19bacc3b1467de10b7a1fad2763db32b3f1330 -DIST linux-5.12.tar.xz 118112412 BLAKE2B 842d921b9a73d2aaade763dbd2ec67bdfe0275baa6d628b775f5c87574ad7dc86f0419afcd48c10c1235f4bffa16084243f2cf4556e6afcd391e975fe8ba530b SHA512 be03b6fee1d1ea8087b09874d27c0a602c0b04fd90ad38b975bd2c8455a07e83c29b56814aaf1389e82305fae0e4c2d1701075a7f0a7295dd28149f967ec5b3d -DIST linux-5.13.tar.xz 119297284 BLAKE2B 9c4c12e2394dec064adff51f7ccdf389192eb27ba7906db5eda543afe3d04afca6b9ea0848a057571bf2534eeb98e1e3a67734deff82c0d3731be205ad995668 SHA512 a8edf97e9d38a49f1be2bde1e29ad96274bb2c6f7e8a2bebaa1161dd4df9cabcbaec4ff644c45bee94f86ae47725087d6deed0cd954209cec717621d137db85e -DIST linux-5.14.tar.xz 120669872 BLAKE2B 0047f5aaa3940dff97f4055ef544faafbbb5282128e6afe21d2f47d8dc8c395806a17016febfa050117d16f59e74b882cb8b9c5011d68f119c230d0a4d120524 SHA512 8e4f3ec3d36f774280f75dc7b004a43e09417af58f12e9c9f8348976659d4cfda7ad905f306f43fed66a27922e5c45db22e46bbfa7a0b9f365012380de3b6f64 DIST linux-5.15.tar.xz 121913744 BLAKE2B 3921274b23f7938abdf3ed9334534b4581e13d7484303d3a5280eddb038999aaa8b836666a487472d9c4a219af0f06b9fecccaf348fb5510ab8762f4ef4b7e83 SHA512 d25ad40b5bcd6a4c6042fd0fd84e196e7a58024734c3e9a484fd0d5d54a0c1d87db8a3c784eff55e43b6f021709dc685eb0efa18d2aec327e4f88a79f405705a +DIST linux-5.19.tar.xz 131581464 BLAKE2B 4db03a6830a3b3bbf0837e1912182a443d9a4aa8af20a12e6ec814ed708038452d3c0ccee1258cca671c464d76461536363a8adc56e9d098c9a44ae3484a297a SHA512 00313b2f9b82d2dc3fb8294007cf7d7599d254b717ed2de23c81fa7a1bbcbc2798ad286cb94e2f7f5bd54132d1d764facd90d30f79dbcc6616cc7f926adc2623 DIST linux-5.4.tar.xz 109441440 BLAKE2B 193bc4a3147e147d5529956164ec4912fad5d5c6fb07f909ff1056e57235834173194afc686993ccd785c1ff15804de0961b625f3008cca0e27493efc8f27b13 SHA512 9f60f77e8ab972b9438ac648bed17551c8491d6585a5e85f694b2eaa4c623fbc61eb18419b2656b6795eac5deec0edaa04547fc6723fbda52256bd7f3486898f -DIST linux-5.9.tar.xz 115507140 BLAKE2B e8d11472d63a9f8409ca12a2e8c97c6963a3d4516b5a398b627d6ece565584526f9b5a1377a2fa4bd184c09c7db94c987428bc5d52df0c788464a67e9e8d6dcb SHA512 d3d92ce4246bad74c9a784212f160d98449b1e8793970c2c308276568d852b8effe0528686bdb87d55d691f09a826abf7938d69bdd4759ce65ddd5c05ffe4eca +DIST linux-6.0.tar.xz 133886176 BLAKE2B c09a9c877ac0fac83dc31d2d04d96f0a3331d4ed78e3ad4edfd4dc077e1c11d0c49f419fdac4008b5c93d1b09c2b724e12ef0b38371ad0962908abf85dfa95fa SHA512 bac41a7aeb6e809616cee2f13dcd1c45e829dfd1ccf60aee1dc4c46b1e28532f4485c7d819a32940de84fdfbf89db80a4e919bce8a74b2948c5a01551771b714 +DIST linux-6.1.tar.xz 134728520 BLAKE2B ae60257860b2bd1bd708d183f0443afc60ebbd2b3d535c45e44c2e541bd0928530a3b62de6385dd4e4726ebbedcc0a871d4f3ffb4105b9f1f6d8ed7467f5688e SHA512 6ed2a73c2699d0810e54753715635736fc370288ad5ce95c594f2379959b0e418665cd71bc512a0273fe226fe90074d8b10d14c209080a6466498417a4fdda68 diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/files/linux-headers-5.10-Use-stddefs.h-instead-of-compiler.h.patch b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/files/linux-headers-5.10-Use-stddefs.h-instead-of-compiler.h.patch index ac8bbe8b55..07c780fef2 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/files/linux-headers-5.10-Use-stddefs.h-instead-of-compiler.h.patch +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/files/linux-headers-5.10-Use-stddefs.h-instead-of-compiler.h.patch @@ -1,16 +1,42 @@ Needed for musl. -From 9eb3c31415686ae1296d7d450f886eeba5861ec1 Mon Sep 17 00:00:00 2001 -From: Jory Pratt -Date: Thu, 3 Jun 2021 18:41:28 -0500 -Subject: [PATCH] Use stddefs.h instead of compiler.h +https://git.alpinelinux.org/aports/tree/main/linux-headers/include-uapi-linux-swab-Fix-potentially-missing-__always_inline.patch ---- - include/uapi/linux/swab.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) +From: Matt Redfearn +Date: Wed, 3 Jan 2018 09:57:30 +0000 +Subject: [PATCH] include/uapi/linux/swab: Fix potentially missing + __always_inline +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Commit bc27fb68aaad ("include/uapi/linux/byteorder, swab: force inlining +of some byteswap operations") added __always_inline to swab functions +and commit 283d75737837 ("uapi/linux/stddef.h: Provide __always_inline to +userspace headers") added a definition of __always_inline for use in +exported headers when the kernel's compiler.h is not available. + +However, since swab.h does not include stddef.h, if the header soup does +not indirectly include it, the definition of __always_inline is missing, +resulting in a compilation failure, which was observed compiling the +perf tool using exported headers containing this commit: + +In file included from /usr/include/linux/byteorder/little_endian.h:12:0, + from /usr/include/asm/byteorder.h:14, + from tools/include/uapi/linux/perf_event.h:20, + from perf.h:8, + from builtin-bench.c:18: +/usr/include/linux/swab.h:160:8: error: unknown type name ‘__always_inline’ + static __always_inline __u16 __swab16p(const __u16 *p) + +Fix this by replacing the inclusion of linux/compiler.h with +linux/stddef.h to ensure that we pick up that definition if required, +without relying on it's indirect inclusion. compiler.h is then included +indirectly, via stddef.h. + +Fixes: 283d75737837 ("uapi/linux/stddef.h: Provide __always_inline to userspace headers") +Signed-off-by: Matt Redfearn -diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h -index 7272f85..3736f2f 100644 --- a/include/uapi/linux/swab.h +++ b/include/uapi/linux/swab.h @@ -3,7 +3,7 @@ @@ -22,6 +48,3 @@ index 7272f85..3736f2f 100644 #include #include --- -2.31.1 - diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/files/linux-headers-5.15-remove-inclusion-sysinfo.h.patch b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/files/linux-headers-5.15-remove-inclusion-sysinfo.h.patch new file mode 100644 index 0000000000..aa52ff9bd1 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/files/linux-headers-5.15-remove-inclusion-sysinfo.h.patch @@ -0,0 +1,25 @@ +https://git.alpinelinux.org/aports/tree/main/linux-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch +https://bugs.gentoo.org/828726 + +[Adapted to drop the const.h change as things may rely on it like btrfs.] + +From: rofl0r +Date: Mon, 20 Jan 2014 21:31:34 +0100 +Subject: [PATCH 3/3] remove inclusion of sysinfo.h in kernel.h + +the declaration of struct sysinfo clashes with userspace. +it's not quite clear why that header was included from kernel.h, +as none of its functionality is needed. + +--- a/include/uapi/linux/kernel.h ++++ b/include/uapi/linux/kernel.h +@@ -2,7 +2,9 @@ + #ifndef _UAPI_LINUX_KERNEL_H + #define _UAPI_LINUX_KERNEL_H + ++#ifdef __GLIBC__ + #include ++#endif + #include + + #endif /* _UAPI_LINUX_KERNEL_H */ diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-3.18.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-3.18-r1.ebuild similarity index 63% rename from sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-3.18.ebuild rename to sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-3.18-r1.ebuild index e3c8213b46..1644d1ff59 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-3.18.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-3.18-r1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 ETYPE="headers" H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 openrisc ppc ppc64 s390 score sh sparc tile x86 xtensa" @@ -11,41 +11,43 @@ detect_version PATCH_VER="1" SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}" +S="${WORKDIR}/gentoo-headers-base-${PV}" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" -DEPEND="app-arch/xz-utils +BDEPEND=" + app-arch/xz-utils dev-lang/perl" -RDEPEND="" -S=${WORKDIR}/gentoo-headers-base-${PV} +[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PV} ) src_unpack() { - unpack ${A} + # avoid kernel-2_src_unpack + default } src_prepare() { + # avoid kernel-2_src_prepare default - - [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}/${PV}"/*.patch } src_test() { einfo "Possible unescaped attribute/type usage" - egrep -r \ + grep -E -r \ -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \ -e '\<([us](8|16|32|64))\>' \ . - emake ARCH=$(tc-arch-kernel) headers_check + emake ARCH="$(tc-arch-kernel)" headers_check } src_install() { kernel-2_src_install - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null + find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die + # delete empty directories + find "${ED}" -empty -type d -delete || die # provided by libdrm (for now?) - rm -rf "${ED}"/$(kernel_header_destdir)/drm + rm -rf "${ED}"/$(kernel_header_destdir)/drm || die } diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.14-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.14-r2.ebuild similarity index 65% rename from sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.14-r1.ebuild rename to sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.14-r2.ebuild index a0a0c46682..eacc730770 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.14-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.14-r2.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 ETYPE="headers" H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 s390 score sh sparc tile x86 xtensa" @@ -11,38 +11,40 @@ detect_version PATCH_VER="1" SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}" +S="${WORKDIR}/gentoo-headers-base-${PV}" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" -DEPEND="app-arch/xz-utils +BDEPEND=" + app-arch/xz-utils dev-lang/perl" -RDEPEND="" -S=${WORKDIR}/gentoo-headers-base-${PV} +[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PV} ) src_unpack() { - unpack ${A} + # avoid kernel-2_src_unpack + default } src_prepare() { + # avoid kernel-2_src_prepare default - - [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}/${PV}"/*.patch } src_test() { einfo "Possible unescaped attribute/type usage" - egrep -r \ + grep -E -r \ -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \ -e '\<([us](8|16|32|64))\>' \ . - emake ARCH=$(tc-arch-kernel) headers_check + emake ARCH="$(tc-arch-kernel)" headers_check } src_install() { kernel-2_src_install - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null + find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die + # delete empty directories + find "${ED}" -empty -type d -delete || die } diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.19.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.19-r1.ebuild similarity index 67% rename from sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.19.ebuild rename to sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.19-r1.ebuild index 5a206d6179..0d29957aa9 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.19.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.19-r1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=7 ETYPE="headers" H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" @@ -12,40 +12,41 @@ PATCH_VER="1" SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz https://dev.gentoo.org/~sam/distfiles/gentoo-headers-base-${PV}.tar.xz ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz} - ${PATCH_VER:+https://dev.gentoo.org/~sam/distfiles/gentoo-headers-${PV}-${PATCH_VER}.tar.xz} -" + ${PATCH_VER:+https://dev.gentoo.org/~sam/distfiles/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}" +S="${WORKDIR}/gentoo-headers-base-${PV}" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" -DEPEND="app-arch/xz-utils +BDEPEND=" + app-arch/xz-utils dev-lang/perl" -RDEPEND="" -S=${WORKDIR}/gentoo-headers-base-${PV} +[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PV} ) src_unpack() { - unpack ${A} + # avoid kernel-2_src_unpack + default } src_prepare() { + # avoid kernel-2_src_prepare default - - [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PV}/*.patch } src_test() { einfo "Possible unescaped attribute/type usage" - egrep -r \ + grep -E -r \ -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \ -e '\<([us](8|16|32|64))\>' \ . - emake ARCH=$(tc-arch-kernel) headers_check + emake ARCH="$(tc-arch-kernel)" headers_check } src_install() { kernel-2_src_install - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null + find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die + # delete empty directories + find "${ED}" -empty -type d -delete || die } diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.4.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.4-r1.ebuild similarity index 65% rename from sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.4.ebuild rename to sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.4-r1.ebuild index a0a0c46682..eacc730770 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.4.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.4-r1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 ETYPE="headers" H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 s390 score sh sparc tile x86 xtensa" @@ -11,38 +11,40 @@ detect_version PATCH_VER="1" SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}" +S="${WORKDIR}/gentoo-headers-base-${PV}" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" -DEPEND="app-arch/xz-utils +BDEPEND=" + app-arch/xz-utils dev-lang/perl" -RDEPEND="" -S=${WORKDIR}/gentoo-headers-base-${PV} +[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PV} ) src_unpack() { - unpack ${A} + # avoid kernel-2_src_unpack + default } src_prepare() { + # avoid kernel-2_src_prepare default - - [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}/${PV}"/*.patch } src_test() { einfo "Possible unescaped attribute/type usage" - egrep -r \ + grep -E -r \ -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \ -e '\<([us](8|16|32|64))\>' \ . - emake ARCH=$(tc-arch-kernel) headers_check + emake ARCH="$(tc-arch-kernel)" headers_check } src_install() { kernel-2_src_install - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null + find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die + # delete empty directories + find "${ED}" -empty -type d -delete || die } diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.9.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.9-r1.ebuild similarity index 65% rename from sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.9.ebuild rename to sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.9-r1.ebuild index caa72fcf23..af1379dc4a 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.9.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-4.9-r1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 ETYPE="headers" H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 s390 score sh sparc tile x86 xtensa" @@ -11,38 +11,40 @@ detect_version PATCH_VER="1" SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}" +S="${WORKDIR}/gentoo-headers-base-${PV}" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" -DEPEND="app-arch/xz-utils +BDEPEND=" + app-arch/xz-utils dev-lang/perl" -RDEPEND="" -S=${WORKDIR}/gentoo-headers-base-${PV} +[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PV} ) src_unpack() { - unpack ${A} + # avoid kernel-2_src_unpack + default } src_prepare() { + # avoid kernel-2_src_prepare default - - [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}/${PV}"/*.patch } src_test() { einfo "Possible unescaped attribute/type usage" - egrep -r \ + grep -E -r \ -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \ -e '\<([us](8|16|32|64))\>' \ . - emake ARCH=$(tc-arch-kernel) headers_check + emake ARCH="$(tc-arch-kernel)" headers_check } src_install() { kernel-2_src_install - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null + find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die + # delete empty directories + find "${ED}" -empty -type d -delete || die } diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.10-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.10-r2.ebuild similarity index 60% rename from sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.10-r1.ebuild rename to sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.10-r2.ebuild index d305baff01..08907ac2fb 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.10-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.10-r2.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=7 ETYPE="headers" H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" -inherit kernel-2 toolchain-funcs +inherit kernel-2 detect_version PATCH_PV=${PV} # to ease testing new versions against not existing patches @@ -14,27 +14,28 @@ SRC_URI="${KERNEL_URI} ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} ${PATCH_VER:+https://dev.gentoo.org/~sam/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} " +S="${WORKDIR}/linux-${PV}" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" -DEPEND="app-arch/xz-utils +BDEPEND=" + app-arch/xz-utils dev-lang/perl" -RDEPEND="" -S=${WORKDIR}/linux-${PV} +[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PATCH_PV} ) src_unpack() { - unpack ${A} + # avoid kernel-2_src_unpack + default } src_prepare() { - [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PATCH_PV}/*.patch - - if use elibc_musl ; then - # TODO: May need forward porting to newer versions - eapply "${FILESDIR}"/${PN}-5.10-Use-stddefs.h-instead-of-compiler.h.patch - fi + # TODO: May need forward porting to newer versions + use elibc_musl && PATCHES+=( + "${FILESDIR}"/${PN}-5.10-Use-stddefs.h-instead-of-compiler.h.patch + ) + # avoid kernel-2_src_prepare default } @@ -45,6 +46,7 @@ src_test() { src_install() { kernel-2_src_install - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null + find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die + # delete empty directories + find "${ED}" -empty -type d -delete || die } diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.10.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.10.ebuild deleted file mode 100644 index 716f218f7d..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.10.ebuild +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -ETYPE="headers" -H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" -inherit kernel-2 toolchain-funcs -detect_version - -PATCH_PV=${PV} # to ease testing new versions against not existing patches -PATCH_VER="1" -SRC_URI="${KERNEL_URI} - ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} - ${PATCH_VER:+https://dev.gentoo.org/~sam/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} -" - -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" - -DEPEND="app-arch/xz-utils - dev-lang/perl" -RDEPEND="" - -S=${WORKDIR}/linux-${PV} - -src_unpack() { - unpack ${A} -} - -src_prepare() { - [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PATCH_PV}/*.patch - - default -} - -src_test() { - emake headers_check ${xmakeopts} -} - -src_install() { - kernel-2_src_install - - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null -} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.11.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.11.ebuild deleted file mode 100644 index 0368a1aa7b..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.11.ebuild +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -ETYPE="headers" -H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" -inherit kernel-2 toolchain-funcs -detect_version - -PATCH_PV=${PV} # to ease testing new versions against not existing patches -PATCH_VER="1" -SRC_URI="${KERNEL_URI} - ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} - ${PATCH_VER:+https://dev.gentoo.org/~sam/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} -" - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" - -DEPEND="app-arch/xz-utils - dev-lang/perl" -RDEPEND="" - -S=${WORKDIR}/linux-${PV} - -src_unpack() { - unpack ${A} -} - -src_prepare() { - [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PATCH_PV}/*.patch - - default -} - -src_test() { - emake headers_check ${xmakeopts} -} - -src_install() { - kernel-2_src_install - - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null -} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.12.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.12.ebuild deleted file mode 100644 index 82fa20bbed..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.12.ebuild +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -ETYPE="headers" -H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" -inherit kernel-2 toolchain-funcs -detect_version - -PATCH_PV=${PV} # to ease testing new versions against not existing patches -PATCH_VER="1" -SRC_URI="${KERNEL_URI} - ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} - ${PATCH_VER:+https://dev.gentoo.org/~sam/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} -" - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" - -BDEPEND="app-arch/xz-utils - dev-lang/perl" - -S=${WORKDIR}/linux-${PV} - -src_unpack() { - unpack ${A} -} - -src_prepare() { - [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PATCH_PV}/*.patch - - default -} - -src_test() { - emake headers_check ${xmakeopts} -} - -src_install() { - kernel-2_src_install - - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null -} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.13.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.13.ebuild deleted file mode 100644 index ae7ecd30fe..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.13.ebuild +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -ETYPE="headers" -H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" -inherit kernel-2 toolchain-funcs -detect_version - -PATCH_PV=${PV} # to ease testing new versions against not existing patches -PATCH_VER="1" -SRC_URI=" - ${KERNEL_URI} - ${PATCH_VER:+https://dev.gentoo.org/~soap/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz}" -S="${WORKDIR}/linux-${PV}" - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" - -BDEPEND=" - app-arch/xz-utils - dev-lang/perl" - -[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PATCH_PV} ) - -src_unpack() { - # avoid kernel-2_src_unpack - default -} - -src_prepare() { - # avoid kernel-2_src_prepare - default -} - -src_test() { - emake headers_check ${xmakeopts} -} - -src_install() { - kernel-2_src_install - - find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.14.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.14.ebuild deleted file mode 100644 index 8ac754c008..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.14.ebuild +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -ETYPE="headers" -H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" -inherit kernel-2 toolchain-funcs -detect_version - -PATCH_PV=${PV} # to ease testing new versions against not existing patches -PATCH_VER="1" -PATCH_DEV="sam" -SRC_URI=" - ${KERNEL_URI} - ${PATCH_VER:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/sys-kernel/linux-headers/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz}" -S="${WORKDIR}/linux-${PV}" - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" - -BDEPEND=" - app-arch/xz-utils - dev-lang/perl" - -[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PATCH_PV} ) - -src_unpack() { - # avoid kernel-2_src_unpack - default -} - -src_prepare() { - # avoid kernel-2_src_prepare - default -} - -src_test() { - emake headers_check ${xmakeopts} -} - -src_install() { - kernel-2_src_install - - find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.15.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.15-r3.ebuild similarity index 64% rename from sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.15.ebuild rename to sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.15-r3.ebuild index 8ac754c008..9d2ebae3da 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.15.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.15-r3.ebuild @@ -1,27 +1,29 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 ETYPE="headers" H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" -inherit kernel-2 toolchain-funcs +inherit kernel-2 detect_version PATCH_PV=${PV} # to ease testing new versions against not existing patches PATCH_VER="1" PATCH_DEV="sam" -SRC_URI=" - ${KERNEL_URI} +SRC_URI="${KERNEL_URI} ${PATCH_VER:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/sys-kernel/linux-headers/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz}" S="${WORKDIR}/linux-${PV}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" BDEPEND=" app-arch/xz-utils dev-lang/perl" +# bug #816762 +RESTRICT="test" + [[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PATCH_PV} ) src_unpack() { @@ -30,6 +32,12 @@ src_unpack() { } src_prepare() { + # TODO: May need forward porting to newer versions + use elibc_musl && PATCHES+=( + "${FILESDIR}"/${PN}-5.10-Use-stddefs.h-instead-of-compiler.h.patch + "${FILESDIR}"/${PN}-5.15-remove-inclusion-sysinfo.h.patch + ) + # avoid kernel-2_src_prepare default } @@ -42,4 +50,6 @@ src_install() { kernel-2_src_install find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die + # delete empty directories + find "${ED}" -empty -type d -delete || die } diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.19.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.19.ebuild new file mode 100644 index 0000000000..527b4b401d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.19.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +ETYPE="headers" +H_SUPPORTEDARCH="alpha amd64 arc arm arm64 csky hexagon hppa ia64 loong m68k microblaze mips nios2 openrisc ppc ppc64 riscv s390 sh sparc x86 xtensa" +inherit kernel-2 +detect_version + +PATCH_PV=${PV} # to ease testing new versions against not existing patches +PATCH_VER="0" +PATCH_DEV="xen0n" +SRC_URI="${KERNEL_URI} + ${PATCH_VER:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/sys-kernel/linux-headers/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz}" +S="${WORKDIR}/linux-${PV}" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" + +BDEPEND="app-arch/xz-utils + dev-lang/perl" + +# bug #816762 +RESTRICT="test" + +[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PATCH_PV} ) + +src_unpack() { + # avoid kernel-2_src_unpack + default +} + +src_prepare() { + # TODO: May need forward porting to newer versions + use elibc_musl && PATCHES+=( + "${FILESDIR}"/${PN}-5.10-Use-stddefs.h-instead-of-compiler.h.patch + "${FILESDIR}"/${PN}-5.15-remove-inclusion-sysinfo.h.patch + ) + + # avoid kernel-2_src_prepare + default +} + +src_test() { + emake headers_check ${xmakeopts} +} + +src_install() { + kernel-2_src_install + + find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die + # delete empty directories + find "${ED}" -empty -type d -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.4-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.4-r2.ebuild similarity index 66% rename from sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.4-r1.ebuild rename to sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.4-r2.ebuild index 0796ff62d4..be894fb9ad 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.4-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.4-r2.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=7 ETYPE="headers" H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" @@ -14,32 +14,34 @@ SRC_URI="${KERNEL_URI} ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} ${PATCH_VER:+https://dev.gentoo.org/~sam/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} " +S="${WORKDIR}/linux-${PV}" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" -DEPEND="app-arch/xz-utils +BDEPEND=" + app-arch/xz-utils dev-lang/perl" -RDEPEND="" -S=${WORKDIR}/linux-${PV} +[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PATCH_PV} ) src_unpack() { - unpack ${A} + # avoid kernel-2_src_unpack + default } src_prepare() { - [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PATCH_PV}/*.patch - + # avoid kernel-2_src_prepare default } src_test() { - emake ARCH=$(tc-arch-kernel) headers_check + emake ARCH="$(tc-arch-kernel)" headers_check } src_install() { kernel-2_src_install - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null + find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die + # delete empty directories + find "${ED}" -empty -type d -delete || die } diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.9.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.9.ebuild deleted file mode 100644 index 0368a1aa7b..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-5.9.ebuild +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -ETYPE="headers" -H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" -inherit kernel-2 toolchain-funcs -detect_version - -PATCH_PV=${PV} # to ease testing new versions against not existing patches -PATCH_VER="1" -SRC_URI="${KERNEL_URI} - ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} - ${PATCH_VER:+https://dev.gentoo.org/~sam/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} -" - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" - -DEPEND="app-arch/xz-utils - dev-lang/perl" -RDEPEND="" - -S=${WORKDIR}/linux-${PV} - -src_unpack() { - unpack ${A} -} - -src_prepare() { - [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PATCH_PV}/*.patch - - default -} - -src_test() { - emake headers_check ${xmakeopts} -} - -src_install() { - kernel-2_src_install - - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null -} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-6.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-6.0.ebuild new file mode 100644 index 0000000000..6e910614dc --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-6.0.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +ETYPE="headers" +H_SUPPORTEDARCH="alpha amd64 arc arm arm64 csky hexagon hppa ia64 loong m68k microblaze mips nios2 openrisc ppc ppc64 riscv s390 sh sparc x86 xtensa" +inherit kernel-2 +detect_version + +PATCH_PV=${PV} # to ease testing new versions against not existing patches +PATCH_VER="0" +PATCH_DEV="sam" +SRC_URI="${KERNEL_URI} + ${PATCH_VER:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/sys-kernel/linux-headers/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz}" +S="${WORKDIR}/linux-${PV}" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" + +BDEPEND="app-arch/xz-utils + dev-lang/perl" + +[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PATCH_PV} ) + +src_unpack() { + # Avoid kernel-2_src_unpack + default +} + +src_prepare() { + # TODO: May need forward porting to newer versions + use elibc_musl && PATCHES+=( + "${FILESDIR}"/${PN}-5.10-Use-stddefs.h-instead-of-compiler.h.patch + "${FILESDIR}"/${PN}-5.15-remove-inclusion-sysinfo.h.patch + ) + + # Avoid kernel-2_src_prepare + default +} + +src_install() { + kernel-2_src_install + + find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die + # Delete empty directories + find "${ED}" -empty -type d -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-6.1.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-6.1.ebuild new file mode 100644 index 0000000000..15ce93e1f9 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-6.1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ETYPE="headers" +H_SUPPORTEDARCH="alpha amd64 arc arm arm64 csky hexagon hppa ia64 loong m68k microblaze mips nios2 openrisc ppc ppc64 riscv s390 sh sparc x86 xtensa" +inherit kernel-2 +detect_version + +PATCH_PV=${PV} # to ease testing new versions against not existing patches +PATCH_VER="0" +PATCH_DEV="sam" +SRC_URI="${KERNEL_URI} + ${PATCH_VER:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/sys-kernel/linux-headers/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz}" +S="${WORKDIR}/linux-${PV}" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" + +BDEPEND="app-arch/xz-utils + dev-lang/perl" + +[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PATCH_PV} ) + +src_unpack() { + # Avoid kernel-2_src_unpack + default +} + +src_prepare() { + # TODO: May need forward porting to newer versions + use elibc_musl && PATCHES+=( + "${FILESDIR}"/${PN}-5.10-Use-stddefs.h-instead-of-compiler.h.patch + "${FILESDIR}"/${PN}-5.15-remove-inclusion-sysinfo.h.patch + ) + + # Avoid kernel-2_src_prepare + default +} + +src_install() { + kernel-2_src_install + + find "${ED}" \( -name '.install' -o -name '*.cmd' \) -delete || die + # Delete empty directories + find "${ED}" -empty -type d -delete || die +} From e2a58af22d54a45bd6bee1a085916fd6e2992e28 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:23:22 +0200 Subject: [PATCH 33/38] sys-libs/libcap-ng: Sync with Gentoo It's from Gentoo commit 3a1c067853f12e6da742b59a5b1e586f94b2b445. --- .../sys-libs/libcap-ng/Manifest | 2 +- ...0.8.2-r1.ebuild => libcap-ng-0.8.3.ebuild} | 48 ++++++++++++------- .../sys-libs/libcap-ng/metadata.xml | 19 ++++---- 3 files changed, 42 insertions(+), 27 deletions(-) rename sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/{libcap-ng-0.8.2-r1.ebuild => libcap-ng-0.8.3.ebuild} (59%) diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/Manifest b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/Manifest index 91583ac0a4..45b492af66 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/Manifest @@ -1,2 +1,2 @@ DIST libcap-ng-0.8.2-apply-disable.patch 723 BLAKE2B 70d9959c55119c02bbc4ea605251491c04c477511c20b9fe93e6527ffd3fe2f35a72fabab5ca149c4aaf536c6cd8dceb15375297158f8827a0c676744381bbc1 SHA512 8c9317bdd4fde7d6a4618ec613bce46bed7646891bd16bc3fa307e9a814e38601bf3c6ad13102389d4596d9ed6a7ad853cca58624e724fe07383007e386c51f8 -DIST libcap-ng-0.8.2.tar.gz 456066 BLAKE2B 7e721d05b92fd3708b970527e76b1898daa91bde3ab6ed5d8f23b1435404fbe7d15731461c6d9d2c791738e5498d1f5eaba727413480d34b7edea13c8691c32b SHA512 0ac6e55c03b1fba3a849048b721e250951afb59190d9646704d4fd9938eccc3bd0767380fbddc42f186b4f55695475e31f34f537ae91c04a37662577a5b7a19b +DIST libcap-ng-0.8.3.tar.gz 455383 BLAKE2B c54dd753e0ef6dd21bcf6af7b003f85ded9faf2fbf1ea834cda6b181b165ff4b11a0284c23c73d0e6f97a810b3e6a63fceeb57ff583a2b32f23924bdee597ef5 SHA512 0ef9bc7bc6b7b59991f43b79aa6cde3e8d2c22c4b9ced2af8deae501e01d51e893033d109cb8aa0fdcba190140110993089245346334d7b114d18f1bb1b55b97 diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.2-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.3.ebuild similarity index 59% rename from sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.2-r1.ebuild rename to sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.3.ebuild index f79095d558..ebc77fd26e 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.2-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.3.ebuild @@ -1,21 +1,25 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{8..10} ) - +# Keep an eye on Fedora's packaging (https://src.fedoraproject.org/rpms/libcap-ng/tree/rawhide) for patches +# Same maintainer in Fedora as upstream +PYTHON_COMPAT=( python3_{9..10} ) inherit autotools flag-o-matic python-r1 DESCRIPTION="POSIX 1003.1e capabilities" HOMEPAGE="https://people.redhat.com/sgrubb/libcap-ng/" +# Patch works around / reverts a behaviour change because not all consumers were ready. +# Keep this patch for a bit longer until Fedora stop shipping it (not clear what else +# other than gnome-keyring was broken by it: bug #759550) # Fedora 0.8.2 https://src.fedoraproject.org/rpms/libcap-ng/c/a5b0f536df1132d8e7afa4c0ce07b630e7970cad?branch=master SRC_URI="https://people.redhat.com/sgrubb/${PN}/${P}.tar.gz - https://src.fedoraproject.org/rpms/libcap-ng/raw/a5b0f536df1132d8e7afa4c0ce07b630e7970cad/f/libcap-ng-0.8.2-apply-disable.patch" + https://src.fedoraproject.org/rpms/libcap-ng/raw/a5b0f536df1132d8e7afa4c0ce07b630e7970cad/f/libcap-ng-0.8.2-apply-disable.patch" LICENSE="LGPL-2.1" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux" IUSE="python static-libs" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" @@ -30,9 +34,11 @@ PATCHES=( src_prepare() { default + if use prefix ; then sed -i "s@cat /usr@cat ${EPREFIX}/usr@" bindings/python*/Makefile.am || die - eautomake #668722 + # bug #668722 + eautomake fi } @@ -45,51 +51,59 @@ src_configure() { $(use_enable static-libs static) ) - local pythonconf=( --without-python --without-python3 ) + local pythonconf=( + --without-python + --without-python3 + ) - # set up python bindings build(s) + # Set up python bindings build(s) if use python ; then setup_python_flags_configure() { - pythonconf=( --without-python --with-python3 ) + pythonconf=( + --without-python + --with-python3 + ) + run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}" } python_foreach_impl setup_python_flags_configure else - local BUILD_DIR=${WORKDIR}/build + local BUILD_DIR="${WORKDIR}"/build run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}" fi } src_compile() { - if use python; then + if use python ; then python_foreach_impl run_in_build_dir emake else - local BUILD_DIR=${WORKDIR}/build + local BUILD_DIR="${WORKDIR}"/build emake -C "${BUILD_DIR}" fi } src_test() { - if [[ "${EUID}" -eq 0 ]]; then + if [[ "${EUID}" -eq 0 ]] ; then ewarn "Skipping tests due to root permissions." return fi - if use python; then + if use python ; then python_foreach_impl run_in_build_dir emake check else - local BUILD_DIR=${WORKDIR}/build + local BUILD_DIR="${WORKDIR}"/build emake -C "${BUILD_DIR}" check fi } src_install() { - if use python; then + if use python ; then python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install else - local BUILD_DIR=${WORKDIR}/build + local BUILD_DIR="${WORKDIR}"/build emake -C "${BUILD_DIR}" DESTDIR="${D}" install fi + find "${ED}" -name '*.la' -delete || die } diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/metadata.xml index 2d75111936..d321b5cf88 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/metadata.xml @@ -1,17 +1,18 @@ - - base-system@gentoo.org - Gentoo Base System - - + + base-system@gentoo.org + Gentoo Base System + + The libcap-ng library is intended to make programming with POSIX capabilities much easier than the traditional libcap library. It includes utilities that can analyse all currently running applications and print out any capabilities and whether or not it has an open ended bounding set. - - - cpe:/a:libcap-ng_project:libcap-ng - + + + cpe:/a:libcap-ng_project:libcap-ng + stevegrubb/libcap-ng + From 3ae5000f24d860e3fab34a9bbe13ece16c58cb92 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 17:17:12 +0200 Subject: [PATCH 34/38] sys-power/iasl: Drop unnecessary package Used to be pulled in by some sys-firmware packages, but not any more. --- .../portage-stable/sys-power/iasl/Manifest | 4 - .../iasl/files/iasl-20200326-Makefile.patch | 106 --------------- .../sys-power/iasl/iasl-20200326.ebuild | 126 ------------------ .../sys-power/iasl/iasl-20200717.ebuild | 126 ------------------ .../sys-power/iasl/metadata.xml | 11 -- 5 files changed, 373 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-power/iasl/Manifest delete mode 100644 sdk_container/src/third_party/portage-stable/sys-power/iasl/files/iasl-20200326-Makefile.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-power/iasl/iasl-20200326.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-power/iasl/iasl-20200717.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-power/iasl/metadata.xml diff --git a/sdk_container/src/third_party/portage-stable/sys-power/iasl/Manifest b/sdk_container/src/third_party/portage-stable/sys-power/iasl/Manifest deleted file mode 100644 index 111d98ac5c..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-power/iasl/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -DIST acpica-unix-20200326.tar.gz 1850373 BLAKE2B 4b0c8548ff4b99fb774eb4301687368da2149bfaf68e02c638eecf890fc89974dadd75acc844233ecde8cfac2b98d75df79df2bb1bd6993dc8d502b3156c1012 SHA512 253ea7fc2bb540dd0cfa55552648c33562f39efb9a9b8cbab751ad7f4fea9bd3800eb241afb30313140e2008889b62b82b4427624e087a275353d81555403e76 -DIST acpica-unix-20200717.tar.gz 1847795 BLAKE2B 84af34884bbea39aed9ea7ec86f20a27f3dd10fa68456b5f12de2bdecf9f205c43b4b4e5dcfb55325571a5682794cdc2e0c5a83c646036a15cc90f81223aefff SHA512 16de55b97a3b478dd2dd44fcbe51b871c7cc6174d337939b873bcbc871bee10487a796aa86abaa7b54ff6b75279cdbf9ec48e19f6baaea4290daf1ad56bdbc46 -DIST acpitests-unix-20200326.tar.gz 2212897 BLAKE2B d88d3d900ac06d165c4a50cddd65495b75db345009b10e76d9f38197ba42efe3ea396ec9828bef62da1fd96ac331d95623c03194e08b00037ff1234321fcf0d3 SHA512 332b4ed016cee48662a5f4572e6d170461f02ee1386109a3970fbe8d104f2a2b14c19235ea43ae9b26e8faf9ef9597cb3d2148e498741361aca62978d0b62189 -DIST acpitests-unix-20200717.tar.gz 2212717 BLAKE2B 939e8022c5ecb7c5e862767f89c0b0de6146e23014dc0100d7dee0f3502e7adcbba72a468c828f804317e75d3a80ba5864c5497a7695f70be0bc1e3dcc69b4e6 SHA512 02c6674cbb2d98f783f25c71b1f391713de6fb3b56e5b57de9a7ccba0927453be4db8aea513e6e7ad491fcf3a0b2c14fefe8a2b82877a2ae01ea1d7832d36844 diff --git a/sdk_container/src/third_party/portage-stable/sys-power/iasl/files/iasl-20200326-Makefile.patch b/sdk_container/src/third_party/portage-stable/sys-power/iasl/files/iasl-20200326-Makefile.patch deleted file mode 100644 index 4848c80ec6..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-power/iasl/files/iasl-20200326-Makefile.patch +++ /dev/null @@ -1,106 +0,0 @@ ---- a/generate/unix/acpiexec/Makefile -+++ b/generate/unix/acpiexec/Makefile -@@ -256,12 +256,12 @@ - endif - - ifneq ($(ACPI_HOST),_QNX) --LDFLAGS += -lpthread -+LIBS += -lpthread - endif - - ifneq ($(ACPI_HOST),_APPLE) - ifneq ($(ACPI_HOST),_QNX) --LDFLAGS += -lrt -+LIBS += -lrt - endif - endif - ---- a/generate/unix/Makefile.config -+++ b/generate/unix/Makefile.config -@@ -35,15 +35,14 @@ - .SUFFIXES : - PROGS = acpibin acpidump acpiexamples acpiexec acpihelp acpinames acpisrc acpixtract iasl - ACPI_HOST ?= _CYGWIN --CC ?= gcc - - # - # Common defines - # - OBJDIR = obj - BINDIR = bin --COMPILEOBJ = $(CC) -c $(CFLAGS) $(OPT_CFLAGS) -o $@ $< --LINKPROG = $(CC) $(OBJECTS) -o $(PROG) $(LDFLAGS) $(OPT_LDFLAGS) -+COMPILEOBJ = $(CC) -c $(CFLAGS) $(CPPFLAGS) $(OPT_CFLAGS) -o $@ $< -+LINKPROG = $(CC) $(LDFLAGS) $(OBJECTS) -o $(PROG) $(LIBS) - PREFIX ?= /usr - INSTALLDIR = $(PREFIX)/bin - UNAME_S := $(shell uname -s) -@@ -76,7 +75,7 @@ - INSTALLFLAGS ?= -f - else - INSTALL = install --INSTALLFLAGS ?= -m 555 -s -+INSTALLFLAGS ?= -m 555 - endif - - INSTALLPROG = \ -@@ -161,26 +160,18 @@ - # - ifeq ($(M32),TRUE) - CFLAGS +=-m32 --LDFLAGS +=-m32 -+LIBS +=-m32 - endif - - # - # Optionally disable optimizations. Optimization causes problems on - # some compilers such as gcc 4.4 - # --ifneq ($(NOOPT),TRUE) --OPT_CFLAGS += -O2 --else --OPT_CFLAGS += -O0 --endif - - # - # Optionally disable fortify source. This option can cause - # compile errors in toolchains where it is already defined. - # --ifneq ($(NOFORTIFY),TRUE) --OPT_CFLAGS += -D_FORTIFY_SOURCE=2 --endif - - CFLAGS += \ - -D$(ACPI_HOST)\ -@@ -272,12 +263,12 @@ - #YACC= byacc - #YFLAGS += - # --YACC= bison -+YACC= LC_ALL=C bison - YFLAGS += -y - - MACROPROC= m4 - MFLAGS= -P -I$(ASL_COMPILER) - --LEX= flex -+LEX= LC_ALL=C flex - LFLAGS += -i -s - DLFLAGS += -i ---- a/generate/unix/Makefile.rules -+++ b/generate/unix/Makefile.rules -@@ -12,12 +12,12 @@ - - $(PROG) : $(INTERMEDIATES) $(MISC) $(OBJECTS) - @echo "- Link" $(PROG) -- @$(LINKPROG) -+ $(LINKPROG) - $(RENAMEPROG) - - $(OBJDIR)/%.o : %.c $(HEADERS) $(ACPICA_HEADERS) - @echo $(PROG) $< -- @$(COMPILEOBJ) -+ $(COMPILEOBJ) - - clean : - @rm -f $(PROG) $(PROG).exe $(OBJECTS) $(OBJDIR)/*.o $(INTERMEDIATES) $(MISC) diff --git a/sdk_container/src/third_party/portage-stable/sys-power/iasl/iasl-20200326.ebuild b/sdk_container/src/third_party/portage-stable/sys-power/iasl/iasl-20200326.ebuild deleted file mode 100644 index 089ecaca72..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-power/iasl/iasl-20200326.ebuild +++ /dev/null @@ -1,126 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit edos2unix toolchain-funcs - -MY_PN=acpica-unix -MY_P="${MY_PN}-${PV}" -MY_TESTS_P="${MY_PN/ca/tests}-${PV}" - -DESCRIPTION="Intel ACPI Source Language (ASL) compiler" -HOMEPAGE="https://www.acpica.org/downloads/" -SRC_URI=" - http://www.acpica.org/sites/acpica/files/${MY_P}.tar.gz - test? ( http://www.acpica.org/sites/acpica/files/${MY_TESTS_P}.tar.gz )" - -LICENSE="iASL" -SLOT="0" -KEYWORDS="amd64 ~arm64 ppc ppc64 x86" -IUSE="test" -RESTRICT="!test? ( test )" - -BDEPEND=" - sys-devel/bison - sys-devel/flex" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( "${FILESDIR}"/${PN}-20200326-Makefile.patch ) - -pkg_setup() { - if use test && has test ${FEATURES}; then - ewarn 'You have selected USE="test". This will install the test results' - ewarn "into /usr/share/${PF}/, compressed as a tarball." - ewarn 'The tests themselves will only rarely die, but the test results' - ewarn 'are interesting for arch testing. The tests may take quite some' - ewarn 'time to complete.' - fi -} - -src_prepare() { - default - - find "${S}" -type f -name 'Makefile*' -print0 | \ - xargs -0 -I '{}' \ - sed -r -e 's:-\::g' -e "s:/usr:${EPREFIX}/usr:g" \ - -i '{}' \ - || die -} - -src_configure() { - tc-export CC - - # BITS is tied to ARCH - please set appropriately if you add new keywords - if [[ $ARCH == @(amd64) ]] ; then - export BITS=64 - else - export BITS=32 - fi -} - -src_compile() { - emake -C generate/unix BITS="${BITS}" -} - -src_test() { - aslts_test - #The aapits test currently fails, missing include probably. - #aapits_test -} - -src_install() { - cd generate/unix || die - emake install DESTDIR="${D}" BITS=${BITS} - default - #local bin - #for bin in $(<"${T}"/binlist) ; do - # dobin "${T}"/${bin} - #done - dodoc "${S}"/changes.txt - newdoc "${S}"/source/compiler/readme.txt compiler-readme.txt - newdoc "${S}"/generate/unix/readme.txt unix-readme.txt - newdoc "${S}"/generate/lint/readme.txt lint-readme.txt - newdoc "${S}"/source/compiler/new_table.txt compiler-new_table.txt - - if use test && has test ${FEATURES}; then - tb="${T}"/testresults.tar.bz2 - export ASLTSDIR="$(<"${T}"/asltdir)" - ebegin "Creating Test Tarball" - tar -cjf "${tb}" -C "${ASLTSDIR}"/tmp/RESULTS . || die "tar failed" - eend $? - insinto /usr/share/${PF} - doins ${tb} - fi -} - -aslts_test() { - export ASL="${S}"/generate/unix/bin/iasl \ - acpibin="${S}"/generate/unix/bin/acpibin \ - acpiexec="${S}"/generate/unix/bin/acpiexec \ - ASLTSDIR="${WORKDIR}/${MY_TESTS_P}"/tests/aslts - export PATH="${PATH}:${ASLTSDIR}/bin" - echo "$ASLTSDIR" >"${T}"/asltdir - cd "${ASLTSDIR}" || die - edos2unix $(find . -type 'f') - make install || die "make install aslts test failed" - chmod +x $(find bin/ ! -regex 'ERROR_OPCODES|HOW_TO_USE|README' ) || die "chmod bin +x failed" - - #The below Do commands runs the tests twice and then dies if the results aren't - #Identical. - Do 1 || die "failed Do 1" - Do 2 || die "failed Do 2" -} - -aapits_test() { - mv "${WORKDIR}/${MY_TESTS_P}/tests/aapits" "${S}/tools/" || die "mv failed" - cd "${S}/tools/aapits" || die "cannot find ${S}/tools/aapits" - edos2unix $(find . -type 'f') - chmod +x $(find bin/ | sed -r -e '/\/[A-Z_]+$/d') || die "chmod bin +x failed" - make || die "make in aapits failed" - cd asl || die "cd asl failed" - make || die "make in asl failed" - cd ../bin || die - ./aapitsrun || die "aapitsrun failed" -} diff --git a/sdk_container/src/third_party/portage-stable/sys-power/iasl/iasl-20200717.ebuild b/sdk_container/src/third_party/portage-stable/sys-power/iasl/iasl-20200717.ebuild deleted file mode 100644 index 4deced324f..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-power/iasl/iasl-20200717.ebuild +++ /dev/null @@ -1,126 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit edos2unix toolchain-funcs - -MY_PN=acpica-unix -MY_P="${MY_PN}-${PV}" -MY_TESTS_P="${MY_PN/ca/tests}-${PV}" - -DESCRIPTION="Intel ACPI Source Language (ASL) compiler" -HOMEPAGE="https://www.acpica.org/downloads/" -SRC_URI=" - http://www.acpica.org/sites/acpica/files/${MY_P}.tar.gz - test? ( http://www.acpica.org/sites/acpica/files/${MY_TESTS_P}.tar.gz )" - -LICENSE="iASL" -SLOT="0" -KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86" -IUSE="test" -RESTRICT="!test? ( test )" - -BDEPEND=" - sys-devel/bison - sys-devel/flex" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( "${FILESDIR}"/${PN}-20200326-Makefile.patch ) - -pkg_setup() { - if use test && has test ${FEATURES}; then - ewarn 'You have selected USE="test". This will install the test results' - ewarn "into /usr/share/${PF}/, compressed as a tarball." - ewarn 'The tests themselves will only rarely die, but the test results' - ewarn 'are interesting for arch testing. The tests may take quite some' - ewarn 'time to complete.' - fi -} - -src_prepare() { - default - - find "${S}" -type f -name 'Makefile*' -print0 | \ - xargs -0 -I '{}' \ - sed -r -e 's:-\::g' -e "s:/usr:${EPREFIX}/usr:g" \ - -i '{}' \ - || die -} - -src_configure() { - tc-export CC - - # BITS is tied to ARCH - please set appropriately if you add new keywords - if [[ $ARCH == @(amd64) ]] ; then - export BITS=64 - else - export BITS=32 - fi -} - -src_compile() { - emake -C generate/unix BITS="${BITS}" -} - -src_test() { - aslts_test - #The aapits test currently fails, missing include probably. - #aapits_test -} - -src_install() { - cd generate/unix || die - emake install DESTDIR="${D}" BITS=${BITS} - default - #local bin - #for bin in $(<"${T}"/binlist) ; do - # dobin "${T}"/${bin} - #done - dodoc "${S}"/changes.txt - newdoc "${S}"/source/compiler/readme.txt compiler-readme.txt - newdoc "${S}"/generate/unix/readme.txt unix-readme.txt - newdoc "${S}"/generate/lint/readme.txt lint-readme.txt - newdoc "${S}"/source/compiler/new_table.txt compiler-new_table.txt - - if use test && has test ${FEATURES}; then - tb="${T}"/testresults.tar.bz2 - export ASLTSDIR="$(<"${T}"/asltdir)" - ebegin "Creating Test Tarball" - tar -cjf "${tb}" -C "${ASLTSDIR}"/tmp/RESULTS . || die "tar failed" - eend $? - insinto /usr/share/${PF} - doins ${tb} - fi -} - -aslts_test() { - export ASL="${S}"/generate/unix/bin/iasl \ - acpibin="${S}"/generate/unix/bin/acpibin \ - acpiexec="${S}"/generate/unix/bin/acpiexec \ - ASLTSDIR="${WORKDIR}/${MY_TESTS_P}"/tests/aslts - export PATH="${PATH}:${ASLTSDIR}/bin" - echo "$ASLTSDIR" >"${T}"/asltdir - cd "${ASLTSDIR}" || die - edos2unix $(find . -type 'f') - make install || die "make install aslts test failed" - chmod +x $(find bin/ ! -regex 'ERROR_OPCODES|HOW_TO_USE|README' ) || die "chmod bin +x failed" - - #The below Do commands runs the tests twice and then dies if the results aren't - #Identical. - Do 1 || die "failed Do 1" - Do 2 || die "failed Do 2" -} - -aapits_test() { - mv "${WORKDIR}/${MY_TESTS_P}/tests/aapits" "${S}/tools/" || die "mv failed" - cd "${S}/tools/aapits" || die "cannot find ${S}/tools/aapits" - edos2unix $(find . -type 'f') - chmod +x $(find bin/ | sed -r -e '/\/[A-Z_]+$/d') || die "chmod bin +x failed" - make || die "make in aapits failed" - cd asl || die "cd asl failed" - make || die "make in asl failed" - cd ../bin || die - ./aapitsrun || die "aapitsrun failed" -} diff --git a/sdk_container/src/third_party/portage-stable/sys-power/iasl/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-power/iasl/metadata.xml deleted file mode 100644 index 5834830942..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-power/iasl/metadata.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - robbat2@gentoo.org - - - polynomial-c@gentoo.org - Lars Wendler - - From 965c5d3619094a07ea3db3275f31370d1183b67e Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 11:02:04 +0200 Subject: [PATCH 35/38] virtual/libelf: Sync with Gentoo It's from Gentoo commit 2e7e910a3989b5e7daf97e2e25073f5fabf25e4f. --- .../virtual/libelf/{libelf-2.ebuild => libelf-2-r1.ebuild} | 4 ++-- .../virtual/libelf/{libelf-3.ebuild => libelf-3-r1.ebuild} | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) rename sdk_container/src/third_party/portage-stable/virtual/libelf/{libelf-2.ebuild => libelf-2-r1.ebuild} (88%) rename sdk_container/src/third_party/portage-stable/virtual/libelf/{libelf-3.ebuild => libelf-3-r1.ebuild} (58%) diff --git a/sdk_container/src/third_party/portage-stable/virtual/libelf/libelf-2.ebuild b/sdk_container/src/third_party/portage-stable/virtual/libelf/libelf-2-r1.ebuild similarity index 88% rename from sdk_container/src/third_party/portage-stable/virtual/libelf/libelf-2.ebuild rename to sdk_container/src/third_party/portage-stable/virtual/libelf/libelf-2-r1.ebuild index 165ad0fa2b..644892ce4f 100644 --- a/sdk_container/src/third_party/portage-stable/virtual/libelf/libelf-2.ebuild +++ b/sdk_container/src/third_party/portage-stable/virtual/libelf/libelf-2-r1.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=6 +EAPI=8 inherit multilib-build diff --git a/sdk_container/src/third_party/portage-stable/virtual/libelf/libelf-3.ebuild b/sdk_container/src/third_party/portage-stable/virtual/libelf/libelf-3-r1.ebuild similarity index 58% rename from sdk_container/src/third_party/portage-stable/virtual/libelf/libelf-3.ebuild rename to sdk_container/src/third_party/portage-stable/virtual/libelf/libelf-3-r1.ebuild index 72771ac216..c1ec5f6ba8 100644 --- a/sdk_container/src/third_party/portage-stable/virtual/libelf/libelf-3.ebuild +++ b/sdk_container/src/third_party/portage-stable/virtual/libelf/libelf-3-r1.ebuild @@ -1,13 +1,13 @@ -# 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 multilib-build DESCRIPTION="Virtual for libelf.so.1 provider dev-libs/elfutils" SLOT="0/1" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" RDEPEND=">=dev-libs/elfutils-0.155-r1:0/0[${MULTILIB_USEDEP}]" From c39017f141c4961d456c3410317634896c227687 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:19:59 +0200 Subject: [PATCH 36/38] x11-libs/pixman: Sync with Gentoo It's from Gentoo commit 3a0fb4286088b159f80569ece08b9eeae1a5dd65. --- .../portage-stable/x11-libs/pixman/Manifest | 2 +- .../x11-libs/pixman/metadata.xml | 21 +++++++------- ...man-0.40.0.ebuild => pixman-0.42.2.ebuild} | 29 ++++++++++++++----- .../x11-libs/pixman/pixman-9999.ebuild | 29 ++++++++++++++----- 4 files changed, 54 insertions(+), 27 deletions(-) rename sdk_container/src/third_party/portage-stable/x11-libs/pixman/{pixman-0.40.0.ebuild => pixman-0.42.2.ebuild} (65%) diff --git a/sdk_container/src/third_party/portage-stable/x11-libs/pixman/Manifest b/sdk_container/src/third_party/portage-stable/x11-libs/pixman/Manifest index e31b21c01b..47a369091e 100644 --- a/sdk_container/src/third_party/portage-stable/x11-libs/pixman/Manifest +++ b/sdk_container/src/third_party/portage-stable/x11-libs/pixman/Manifest @@ -1 +1 @@ -DIST pixman-0.40.0.tar.xz 634752 BLAKE2B 29b71f5eb6c3df0318c7a6153c6abbce29748b0b578697916414a869a029635fe5e0bab06b8f701a764c95e475c115ed12eb4f93c751d234b5868f4c4196d7db SHA512 8a60edb113d68791b41bd90b761ff7b3934260cb3dada3234c9351416f61394e4157353bc4d61b8f6c2c619de470f6feefffb4935bfcf79d291ece6285de7270 +DIST pixman-0.42.2.tar.xz 652984 BLAKE2B 6286a9d064a5a24017fccbb0a6e9f6ef932077c2e33ec043826d4a7a6c707c9111d3de4b806cbcdb47fc2794f1f930d24d078de1ff2912061967db0890540957 SHA512 3476e2676e66756b1af61b1e532cd80c985c191fb7956eb01702b419726cce99e79163b7f287f74f66414680e7396d13c3fee525cd663f12b6ac4877070ff4e8 diff --git a/sdk_container/src/third_party/portage-stable/x11-libs/pixman/metadata.xml b/sdk_container/src/third_party/portage-stable/x11-libs/pixman/metadata.xml index b6b501a3b8..9eeb5bbef5 100644 --- a/sdk_container/src/third_party/portage-stable/x11-libs/pixman/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/x11-libs/pixman/metadata.xml @@ -1,14 +1,15 @@ - - x11@gentoo.org - X11 - - - Enable Loongson2f MMI optimizations. - - - cpe:/a:pixman:pixman - + + x11@gentoo.org + X11 + + + Enable Loongson2f MMI optimizations. + + + cpe:/a:pixman:pixman + pixman/pixman + diff --git a/sdk_container/src/third_party/portage-stable/x11-libs/pixman/pixman-0.40.0.ebuild b/sdk_container/src/third_party/portage-stable/x11-libs/pixman/pixman-0.42.2.ebuild similarity index 65% rename from sdk_container/src/third_party/portage-stable/x11-libs/pixman/pixman-0.40.0.ebuild rename to sdk_container/src/third_party/portage-stable/x11-libs/pixman/pixman-0.42.2.ebuild index a269bcee70..a374ef666c 100644 --- a/sdk_container/src/third_party/portage-stable/x11-libs/pixman/pixman-0.40.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/x11-libs/pixman/pixman-0.42.2.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 @@ -16,18 +16,24 @@ HOMEPAGE="http://www.pixman.org/ https://gitlab.freedesktop.org/pixman/pixman/" if [[ ${PV} = 9999* ]]; then SRC_URI="" else - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" SRC_URI="https://www.x.org/releases/individual/lib/${P}.tar.xz" fi LICENSE="MIT" SLOT="0" -IUSE="cpu_flags_ppc_altivec cpu_flags_arm_iwmmxt cpu_flags_arm_iwmmxt2 cpu_flags_arm_neon loongson2f cpu_flags_x86_mmxext cpu_flags_x86_sse2 cpu_flags_x86_ssse3 static-libs" +IUSE="cpu_flags_ppc_altivec cpu_flags_arm_iwmmxt cpu_flags_arm_iwmmxt2 cpu_flags_arm_neon loongson2f cpu_flags_x86_mmxext cpu_flags_x86_sse2 cpu_flags_x86_ssse3 static-libs test" +RESTRICT="!test? ( test )" + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use test && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use test && tc-check-openmp +} multilib_src_configure() { - local openmp=disabled - tc-has-openmp && openmp=enabled - if use arm && tc-is-clang ; then # See bug #768138 and https://gitlab.freedesktop.org/pixman/pixman/-/issues/46 append-cflags $(test-flags-CC -fno-integrated-as) @@ -40,13 +46,20 @@ multilib_src_configure() { $(meson_feature cpu_flags_x86_sse2 sse2) $(meson_feature cpu_flags_x86_ssse3 ssse3) $(meson_feature cpu_flags_ppc_altivec vmx) - $(meson_feature cpu_flags_arm_neon neon) $(meson_feature loongson2f loongson-mmi) + $(meson_feature test openmp) # only used in unit tests + $(meson_feature test tests) -Ddefault_library=$(usex static-libs both shared) -Dgtk=disabled -Dlibpng=disabled - -Dopenmp=$openmp # only used in unit tests ) + + if [[ ${ABI} == arm64 ]]; then + emesonargs+=($(meson_feature cpu_flags_arm_neon a64-neon)) + elif [[ ${ABI} == arm ]]; then + emesonargs+=($(meson_feature cpu_flags_arm_neon neon)) + fi + meson_src_configure } diff --git a/sdk_container/src/third_party/portage-stable/x11-libs/pixman/pixman-9999.ebuild b/sdk_container/src/third_party/portage-stable/x11-libs/pixman/pixman-9999.ebuild index e6332d5386..1cd3dd3a43 100644 --- a/sdk_container/src/third_party/portage-stable/x11-libs/pixman/pixman-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/x11-libs/pixman/pixman-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 @@ -16,18 +16,24 @@ HOMEPAGE="http://www.pixman.org/ https://gitlab.freedesktop.org/pixman/pixman/" if [[ ${PV} = 9999* ]]; then SRC_URI="" else - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" SRC_URI="https://www.x.org/releases/individual/lib/${P}.tar.xz" fi LICENSE="MIT" SLOT="0" -IUSE="cpu_flags_ppc_altivec cpu_flags_arm_iwmmxt cpu_flags_arm_iwmmxt2 cpu_flags_arm_neon loongson2f cpu_flags_x86_mmxext cpu_flags_x86_sse2 cpu_flags_x86_ssse3 static-libs" +IUSE="cpu_flags_ppc_altivec cpu_flags_arm_iwmmxt cpu_flags_arm_iwmmxt2 cpu_flags_arm_neon loongson2f cpu_flags_x86_mmxext cpu_flags_x86_sse2 cpu_flags_x86_ssse3 static-libs test" +RESTRICT="!test? ( test )" + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use test && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use test && tc-check-openmp +} multilib_src_configure() { - local openmp=disabled - tc-has-openmp && openmp=enabled - if use arm && tc-is-clang ; then # See bug #768138 and https://gitlab.freedesktop.org/pixman/pixman/-/issues/46 append-cflags $(test-flags-CC -fno-integrated-as) @@ -40,13 +46,20 @@ multilib_src_configure() { $(meson_feature cpu_flags_x86_sse2 sse2) $(meson_feature cpu_flags_x86_ssse3 ssse3) $(meson_feature cpu_flags_ppc_altivec vmx) - $(meson_feature cpu_flags_arm_neon neon) $(meson_feature loongson2f loongson-mmi) + $(meson_feature test openmp) # only used in unit tests + $(meson_feature test tests) -Ddefault_library=$(usex static-libs both shared) -Dgtk=disabled -Dlibpng=disabled - -Dopenmp=$openmp # only used in unit tests ) + + if [[ ${ABI} == arm64 ]]; then + emesonargs+=($(meson_feature cpu_flags_arm_neon a64-neon)) + elif [[ ${ABI} == arm ]]; then + emesonargs+=($(meson_feature cpu_flags_arm_neon neon)) + fi + meson_src_configure } From ef672dab8e907ece50c57ce41508fcbc4ec0434f Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 11:07:10 +0200 Subject: [PATCH 37/38] .github: Update packages list --- .../.github/workflows/packages-list | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/sdk_container/src/third_party/portage-stable/.github/workflows/packages-list b/sdk_container/src/third_party/portage-stable/.github/workflows/packages-list index 2e4f0218bf..d8acf56280 100644 --- a/sdk_container/src/third_party/portage-stable/.github/workflows/packages-list +++ b/sdk_container/src/third_party/portage-stable/.github/workflows/packages-list @@ -71,6 +71,7 @@ app-crypt/mit-krb5 app-editors/vim app-editors/vim-core +app-emulation/qemu app-emulation/qemu-guest-agent app-portage/portage-utils @@ -84,16 +85,20 @@ dev-lang/python dev-libs/boost dev-libs/cJSON dev-libs/cyrus-sasl +dev-libs/elfutils dev-libs/expat dev-libs/glib +dev-libs/gmp dev-libs/gobject-introspection dev-libs/gobject-introspection-common +dev-libs/libaio dev-libs/libksba dev-libs/libltdl dev-libs/libpcre2 dev-libs/libtasn1 dev-libs/libxml2 dev-libs/libxslt +dev-libs/nettle dev-libs/oniguruma dev-python/fasteners @@ -132,7 +137,15 @@ eclass/autotools.eclass # eclass/bash-completion-r1.eclass eclass/cmake-multilib.eclass eclass/cmake.eclass +eclass/desktop.eclass +eclass/eapi7-ver.eclass +eclass/edo.eclass +eclass/edos2unix.eclass eclass/elisp-common.eclass +eclass/epatch.eclass +eclass/eqawarn.eclass +eclass/estack.eclass +eclass/eutils.eclass eclass/fcaps.eclass eclass/flag-o-matic.eclass eclass/git-r3.eclass @@ -140,39 +153,51 @@ eclass/gnome.org.eclass eclass/gnuconfig.eclass eclass/java-pkg-opt-2.eclass eclass/java-utils-2.eclass +eclass/kernel-2.eclass eclass/libtool.eclass eclass/linux-info.eclass eclass/linux-mod.eclass eclass/llvm.eclass eclass/ltprune.eclass +eclass/meson-multilib.eclass eclass/meson.eclass eclass/multilib-build.eclass eclass/multilib-minimal.eclass eclass/multilib.eclass +eclass/multiprocessing.eclass eclass/ninja-utils.eclass eclass/optfeature.eclass eclass/pam.eclass eclass/pax-utils.eclass eclass/perl-functions.eclass +eclass/portability.eclass eclass/plocale.eclass eclass/prefix.eclass eclass/preserve-libs.eclass +eclass/readme.gentoo-r1 +eclass/savedconfig.eclass +eclass/strip-linguas.eclass eclass/systemd.eclass eclass/tmpfiles.eclass eclass/toolchain-funcs.eclass eclass/toolchain.eclass +eclass/udev.eclass eclass/user-info.eclass # This file is modified by us to be an empty file, so can't be synced for now. # # eclass/usr-ldscript.eclass +eclass/vcs-clean.eclass eclass/verify-sig.eclass eclass/vim-doc.eclass eclass/vim-plugin.eclass eclass/virtualx.eclass eclass/wrapper.eclass +eclass/xdg-utils.eclass licenses +media-libs/libpng + net-analyzer/nmap net-analyzer/traceroute @@ -182,6 +207,7 @@ net-fs/cifs-utils net-libs/gnutls net-libs/libpcap +net-libs/libslirp net-misc/bridge-utils net-misc/curl @@ -201,7 +227,9 @@ profiles # # scripts +sys-apps/attr sys-apps/diffutils +sys-apps/dtc sys-apps/file sys-apps/gentoo-functions sys-apps/help2man @@ -227,14 +255,26 @@ sys-devel/libtool sys-devel/m4 sys-devel/patch +sys-firmware/edk2-ovmf-bin sys-firmware/intel-microcode +sys-firmware/ipxe +sys-firmware/seabios-bin +sys-firmware/sgabios + +sys-kernel/linux-headers sys-fs/multipath-tools sys-libs/binutils-libs sys-libs/libcap +sys-libs/libcap-ng sys-libs/libseccomp sys-libs/zlib +sys-power/iasl + virtual/libcrypt +virtual/libelf virtual/pkgconfig + +x11-libs/pixman From 3558cc3291c20135eeaf80308488bd01d0455e23 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 18:29:52 +0200 Subject: [PATCH 38/38] changelog: Add an entry --- .../changelog/security/2023-01-19-qemu-update.md | 1 + .../changelog/updates/2023-01-19-qemu-update.md | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/changelog/security/2023-01-19-qemu-update.md create mode 100644 sdk_container/src/third_party/portage-stable/changelog/updates/2023-01-19-qemu-update.md diff --git a/sdk_container/src/third_party/portage-stable/changelog/security/2023-01-19-qemu-update.md b/sdk_container/src/third_party/portage-stable/changelog/security/2023-01-19-qemu-update.md new file mode 100644 index 0000000000..f039349e1d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/changelog/security/2023-01-19-qemu-update.md @@ -0,0 +1 @@ +- SDK: qemu ([CVE-2020-14394](https://nvd.nist.gov/vuln/detail/CVE-2020-14394), [CVE-2022-0216](https://nvd.nist.gov/vuln/detail/CVE-2022-0216), [CVE-2022-35414](https://nvd.nist.gov/vuln/detail/CVE-2022-35414), [CVE-2022-3872](https://nvd.nist.gov/vuln/detail/CVE-2022-3872)) diff --git a/sdk_container/src/third_party/portage-stable/changelog/updates/2023-01-19-qemu-update.md b/sdk_container/src/third_party/portage-stable/changelog/updates/2023-01-19-qemu-update.md new file mode 100644 index 0000000000..522e248fa3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/changelog/updates/2023-01-19-qemu-update.md @@ -0,0 +1,5 @@ +- libcap-ng ([0.8.3](https://people.redhat.com/sgrubb/libcap-ng/ChangeLog)) +- elfutils ([0.188](https://sourceware.org/pipermail/elfutils-devel/2022q4/005561.html) (includes [0.187](https://sourceware.org/pipermail/elfutils-devel/2022q2/004978.html)) +- nettle ([3.8.1](https://git.lysator.liu.se/nettle/nettle/-/blob/990abad16ceacd070747dcc76ed16a39c129321e/ChangeLog)) +- SDK: libpng ([1.6.39](http://www.libpng.org/pub/png/src/libpng-1.6.39-README.txt) (includes [1.6.38](http://www.libpng.org/pub/png/src/libpng-1.6.38-README.txt))) +- SDK: qemu ([7.1.0](https://wiki.qemu.org/ChangeLog/7.1))