[OS-BUILD PATCH 1/2] kernel.spec: allow to package some binaries as unstripped
From: Jan Stancek kernel.spec: allow to package some binaries as unstripped Some binaries (tests) don't work properly without symbols. Add a macro that allows to package their unstripped version. Signed-off-by: Jan Stancek diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100755 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -32,6 +32,18 @@ %global buildroot %{_buildrootdir}/%{NAME}-%{VERSION}-%{RELEASE}.%{_build_cpu} %endif +# RPM macros strip everything in BUILDROOT, either with __strip +# or find-debuginfo.sh. Make use of __spec_install_post override +# and save/restore binaries we want to package as unstripped. +%define buildroot_unstripped %{_builddir}/root_unstripped +%define buildroot_save_unstripped() \ +(cd %{buildroot}; cp -rav --parents -t %{buildroot_unstripped}/ %1 || true) \ +%{nil} +%define __restore_unstripped_root_post \ +echo "Restoring unstripped artefacts %{buildroot_unstripped} -> %{buildroot}" \ +cp -rav %{buildroot_unstripped}/. %{buildroot}/ \ +%{nil} + # The kernel's %%install section is special # Normally the %%install section starts by cleaning up the BUILD_ROOT # like so: @@ -1649,6 +1661,9 @@ cd .. ### %build +rm -rf %{buildroot_unstripped} || true +mkdir -p %{buildroot_unstripped} + %if %{with_sparse} %define sparse_mflags C=1 %endif @@ -2583,6 +2598,7 @@ find Documentation -type d | xargs chmod u+w %{__arch_install_post}\ %{__os_install_post}\ %{__remove_unwanted_dbginfo_install_post}\ + %{__restore_unstripped_root_post}\ %{__modsign_install_post} ### -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2286 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH 2/2] kernel.spec: package unstripped kselftests/bpf/test_progs
From: Jan Stancek kernel.spec: package unstripped kselftests/bpf/test_progs BPF test_progs testcase attach_probe fails without symbols: # './test_progs -t attach_probe' test_attach_probe:PASS:uprobe_offset 0 nsec [...] test_attach_probe:PASS:auto-attach should fail for old-style name 0 nsec libbpf: elf: failed to find symbol 'trigger_func2' in '/proc/self/exe' test_attach_probe:FAIL:attach_uprobe_byname unexpected error: -2 test_attach_probe:PASS:uprobe_ref_ctr_cleanup 0 nsec #5 attach_probe:FAIL Package unstripped version. Signed-off-by: Jan Stancek diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100755 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -2522,6 +2522,7 @@ for dir in bpf bpf/no_alu32 bpf/progs; do -name '*.o' -exec sh -c 'readelf -h "{}" | grep -q "^ Machine:.*BPF"' \; \) -print0 | \ xargs -0 cp -t %{buildroot}%{_libexecdir}/kselftests/$dir || true done +%buildroot_save_unstripped "usr/libexec/kselftests/bpf/test_progs" popd export -n BPFTOOL %endif -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2286 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH 0/2] kernel.spec: allow to package some binaries as unstripped
From: Jan Stancek on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2286 Some binaries (BPF tests) don't work properly without symbols. Add a macro that allows to package their unstripped version. Signed-off-by: Jan Stancek --- redhat/kernel.spec.template | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCH] redhat/configs: Make merge.py portable for older python
From: Clark Williams on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2285#note_1272992242 That's what I get for reading Python Distilled :smile: Looks good to me ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Kernel 6.1.11 F37 x86_64 working
Hey! Just installed todays kernel update via Koji and dnf and it works as it should on my system with a Haswell Refresh i7-4790k ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH] redhat/configs: Make merge.py portable for older python
From: Desnes Nunes redhat/configs: Make merge.py portable for older python Since the operand := was only introduced on python-38, the merge.py script breaks when `make rh-configs` is run on systems with older python versions Signed-off-by: Desnes Nunes diff --git a/redhat/configs/merge.py b/redhat/configs/merge.py index blahblah..blahblah 100755 --- a/redhat/configs/merge.py +++ b/redhat/configs/merge.py @@ -32,10 +32,14 @@ notset = re.compile(r'^#\s+(CONFIG_\w+)\s+is not set') # if we get a match return the config that is being changed def find_config(line): '''find a configuration line in the input and return the config name''' -if m := isset.match(line): +m = isset.match(line) +if (m is not None): return m.group(1) -if m := notset.match(line): + +m = notset.match(line) +if (m is not None): return m.group(1) + return None # -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2285 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv3] aarch64: enable zboot
From: Gerd Hoffmann aarch64: enable zboot Enable CONFIG_EFI_ZBOOT. Also adapt %make_target and %kernel_image for zboot. With the kernel self-uncompressing itself the bootloader or the systemd-stub doesn't need to handle the uncompressing (and doesn't need to know how the kernel is compressed, i.e. whenever it is .gz or .xz). Some more background: https://github.com/systemd/systemd/issues/23788 It also makes aarch64 work more like x86_64 where the kernel decompresses itself too. Signed-off-by: Gerd Hoffmann diff --git a/redhat/configs/ark/generic/CONFIG_EFI_ZBOOT b/redhat/configs/ark/generic/CONFIG_EFI_ZBOOT index blahblah..blahblah 100644 --- a/redhat/configs/ark/generic/CONFIG_EFI_ZBOOT +++ b/redhat/configs/ark/generic/CONFIG_EFI_ZBOOT @@ -1 +1 @@ -# CONFIG_EFI_ZBOOT is not set +CONFIG_EFI_ZBOOT=y diff --git a/redhat/configs/fedora/generic/CONFIG_EFI_ZBOOT b/redhat/configs/fedora/generic/CONFIG_EFI_ZBOOT index blahblah..blahblah 100644 --- a/redhat/configs/fedora/generic/CONFIG_EFI_ZBOOT +++ b/redhat/configs/fedora/generic/CONFIG_EFI_ZBOOT @@ -1 +1 @@ -# CONFIG_EFI_ZBOOT is not set +CONFIG_EFI_ZBOOT=y diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100755 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -484,8 +484,8 @@ Summary: The Linux kernel %define all_arch_configs kernel-%{version}-aarch64*.config %define asmarch arm64 %define hdrarch arm64 -%define make_target Image.gz -%define kernel_image arch/arm64/boot/Image.gz +%define make_target vmlinuz.efi +%define kernel_image arch/arm64/boot/vmlinuz.efi %endif # Should make listnewconfig fail if there's config options -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2283 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2] aarch64: enable zboot
From: Justin M. Forbes on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2283#note_1272311260 For the spec changes, we either need to limit those to Fedora only, or we need to turn on the config for both Fedora and ELN/RHEL. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH] redhat: Repair ELN build broken by the recent UKI changes
From: Vitaly Kuznetsov redhat: Repair ELN build broken by the recent UKI changes UKI build requires systemd-stub ('/usr/lib/systemd/boot/efi/linuxx64.efi.stub') to be present in buildroot. In F38, this was moved from 'systemd-udev' package to a newly introduced 'systemd-boot-unsigned'. ELN build requires it too. Add a note to redhat/rebase-notes.txt that 'systemd-boot-unsigned' builddep needs to be dropped for F37. Signed-off-by: Vitaly Kuznetsov diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100755 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -711,9 +711,7 @@ BuildRequires: dracut BuildRequires: binutils # For the initrd BuildRequires: lvm2 -%if 0%{?fedora} > 37 BuildRequires: systemd-boot-unsigned -%endif # For systemd-stub and systemd-pcrphase BuildRequires: systemd-udev >= 252-1 # For TPM operations in UKI initramfs diff --git a/redhat/rebase-notes.txt b/redhat/rebase-notes.txt index blahblah..blahblah 100644 --- a/redhat/rebase-notes.txt +++ b/redhat/rebase-notes.txt @@ -3,3 +3,5 @@ Rebase notes for Fedora kernel rebases: 6.x: Apply both patches for the simple drm nvidia work-around. From 6.1: e020208cd83e397e47cf2b54c4471847ff09e2ee enable efifb for Nvidia 811fe0e4dcfd86a0db5135d3bfef4936794efdb6 drivers/firmware: skip simpledrm if nvidia-drm.modeset=1 is set + +Fedora 37: 'systemd-boot-unsigned' build dependency needs to be dropped. -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2284 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv7] redhat: Add sub-RPM with a EFI unified kernel image for virtual machines
From: Vitaly Kuznetsov on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2175#note_1272284950 OK, I've created https://gitlab.com/cki-project/kernel- ark/-/merge_requests/2284 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv7] redhat: Add sub-RPM with a EFI unified kernel image for virtual machines
From: Justin M. Forbes on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2175#note_1272255146 I believe the correct method is just to change the buildreq to systemd-boot- unsigned for everything, and add a note to redhat/rebase-notes.txt to revert that new MR for stable fedora until F37 is EOL. os-build does not build kernels for anything other than rawhide, and when I do branch for stable Fedora, that branch will not build kernels for ELN/RHEL, so the current behavior is correct. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2] aarch64: enable zboot
From: Veronika Kabátová on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2283#note_1272190606 Perfect, thank you! I have not received any response to the email besides the first ack, so thanks for finding it. And since it's in the mainline already the subsystem trees should have it in as well, in which case CKI should not have any issues. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv7] redhat: Add sub-RPM with a EFI unified kernel image for virtual machines
From: Daniel P. Berrangé on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2175#note_1271895909 While it is possible, it is almost never correct to use %{?eln} in spec file conditional checks. Instead %{?rhel} is preferred. The condition "%{?rhel} > 9" should evaluate true for today's ELN, and a future RHEL-10 which will inherit today's ELN content. https://docs.fedoraproject.org/en- US/eln/ftbfs/#_accounting_for_differences_between_fedora_and_rhel ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2] aarch64: enable zboot
From: Gerd Hoffmann on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2283#note_1271782893 Committed as 731c4eac848ff9dd42776da8ed3407b257e3abf0 and landed in 6.2-rc1 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv7] redhat: Add sub-RPM with a EFI unified kernel image for virtual machines
From: Patrick Talbert on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2175#note_1271744606 This was merged two days ago so nothing new can be done here; it must be a new MR. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv7] redhat: Add sub-RPM with a EFI unified kernel image for virtual machines
From: Vitaly Kuznetsov on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2175#note_1271653012 Sorry about that! I wasn't exactly sure what's the buildroot for ELN. In CS9, systemd-stub (linuxx64.efi.stub) lives in 'systemd-udev' but in F38 it has traveled to 'systemd-boot-unsigned' so we have +%if 0%{?fedora} > 37 +BuildRequires: systemd-boot-unsigned +%endif apparently, this doesn't work for ELN. I guess something like the following should do the job +%if 0%{?fedora} > 37 || 0%{?eln} +BuildRequires: systemd-boot-unsigned +%endif do we need a new MR or can we just fix things up here? ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue