2019-11-12 02:06:06 +03:00
|
|
|
# _get_email() in %%build contains bashisms for regexping
|
2022-03-09 19:02:02 +01:00
|
|
|
%define _buildshell /bin/bash
|
2019-11-12 02:06:06 +03:00
|
|
|
|
2020-05-11 09:35:25 +03:00
|
|
|
# brp-python-bytecompile uses /usr/bin/python,
|
|
|
|
# but it is a different python version in different ROSA
|
|
|
|
# releases; there is no good way to tell brp-python-bytecompile
|
|
|
|
# which iterpreter to use; so just disable it to avoid problems
|
2022-03-09 19:02:02 +01:00
|
|
|
%define _python_bytecompile_build 0
|
2020-05-11 09:35:25 +03:00
|
|
|
|
2020-06-19 23:42:50 +03:00
|
|
|
# Probably dwz bug, on i686 only file is not packaged:
|
|
|
|
# /usr/lib/debug/usr/bin/trace-5.4.40-3.i386.debug.#dwz#.b5xuKG
|
|
|
|
# dwz compresses only debuginfo from perf, cpupower, uml,
|
|
|
|
# not the kernel itself (because it is stripped not by RPM),
|
|
|
|
# so we do not loose much by disabling it.
|
2022-03-09 19:02:02 +01:00
|
|
|
%global _find_debuginfo_dwz_opts %{nil}
|
2020-06-19 23:42:50 +03:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
# Put everything into one non-standard debuginfo subpackage
|
|
|
|
# TODO: make multiple debuginfo packages coinstallable as installonlypkg,
|
|
|
|
# to achive this, there must be no conflicting files.
|
|
|
|
# Probably signing and compressing of kernel modules
|
|
|
|
# has to be moved to %%_spec_install_post.
|
2022-03-09 19:02:02 +01:00
|
|
|
%global _debuginfo_subpackages %{nil}
|
|
|
|
%global _debuginfo_template %{nil}
|
|
|
|
%undefine _debugsource_packages
|
2021-05-03 15:56:13 +03:00
|
|
|
|
2023-02-08 15:54:13 +03:00
|
|
|
# Avoid rediffing patches like AUFS when possible
|
|
|
|
%define _default_patch_fuzz 10
|
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
# Hack: flavour and major version are variable, make %%_build_pkgcheck_* always detect and use this config
|
2022-03-09 19:02:02 +01:00
|
|
|
%global _build_pkgcheck_set %(echo "%{_build_pkgcheck_set}" | sed -e 's,/%{name}.rpmlintrc,/kernel.rpmlintrc,')
|
|
|
|
%global _build_pkgcheck_srpm %(echo "%{_build_pkgcheck_srpm}" | sed -e 's,/%{name}.rpmlintrc,/kernel.rpmlintrc,')
|
2021-05-03 15:56:13 +03:00
|
|
|
|
2022-11-07 03:13:34 +03:00
|
|
|
%define kernelversion 6
|
|
|
|
%define patchlevel 1
|
[bot] upd: 6.1.34 -> 6.1.38
Changelog:
ACPI: sleep: Avoid breaking S3 wakeup due to might_sleep()
afs: Fix vlserver probe RTT handling
ALSA: hda/realtek: Add a quirk for Compaq N14JP6
ALSA: hda/realtek: Add "Intel Reference board" and "NUC 13" SSID in the ALC256
ALSA: usb-audio: Add quirk flag for HEM devices to enable native DSD playback
ALSA: usb-audio: Fix broken resume due to UAC3 power state
arm64: Add missing Set/Way CMO encodings
arm64: dts: qcom: sc7280-idp: drop incorrect dai-cells from WCD938x SDW
arm64: dts: qcom: sc7280-qcard: drop incorrect dai-cells from WCD938x SDW
arm64: dts: rockchip: Enable GPU on SOQuartz CM4
arm64: dts: rockchip: fix nEXTRST on SOQuartz
arm64: dts: rockchip: Fix rk356x PCIe register and range mappings
arm64/mm: Convert to using lock_mm_and_find_vma()
ARM: dts: Fix erroneous ADS touchscreen polarities
ARM: dts: vexpress: add missing cache properties
arm/mm: Convert to using lock_mm_and_find_vma()
ASoC: amd: yc: Add Thinkpad Neo14 to quirks list for acp6x
ASoC: codecs: wcd938x-sdw: do not set can_multi_write flag
ASoC: cs35l41: Fix default regmap values for some registers
ASoC: dwc: move DMA init to snd_soc_dai_driver probe()
ASoC: fsl_sai: Enable BCI bit if SAI works on synchronous mode with BYP asserted
ASoC: Intel: avs: Account for UID of ACPI device
ASoC: Intel: avs: Add missing checks on FE startup
ASoC: nau8824: Add quirk to active-high jack-detect
ASoC: simple-card: Add missing of_node_put() in case of error
ASoC: soc-pcm: test if a BE can be prepared
ata: libata-scsi: Avoid deadlock on rescan after device resume
be2net: Extend xmit workaround to BE3 chip
bpf/btf: Accept function names that contain dots
bpf: ensure main program has an extable
bpf: Fix a bpf_jit_dump issue for x86_64 with sysctl bpf_jit_enable.
bpf: Fix verifier id tracking of scalars on spill
bpf: Force kprobe multi expected_attach_type for kprobe_multi link
bpf: track immediate values written to stack by BPF_ST instruction
btrfs: can_nocow_file_extent should pass down args->strict from callers
btrfs: do not ASSERT() on duplicated global roots
btrfs: fix an uninitialized variable warning in btrfs_log_inode
btrfs: fix iomap_begin length for nocow writes
btrfs: handle memory allocation failure in btrfs_csum_one_bio
btrfs: scrub: try harder to mark RAID56 block groups read-only
can: isotp: isotp_sendmsg(): fix return error fix on TX path
cgroup: always put cset in cgroup_css_set_put_fork
cgroup: bpf: use cgroup_lock()/cgroup_unlock() wrappers
cgroup: Do not corrupt task iteration when rebinding subsystem
cgroup: fix missing cpus_read_{lock,unlock}() in cgroup_transfer_tasks()
cgroup,freezer: hold cpu_hotplug_lock before freezer_mutex in freezer_css_{online,offline}()
cifs: fix lease break oops in xfstest generic/098
clk: pxa: fix NULL pointer dereference in pxa3xx_clk_update_accr
csky: fix up lock_mm_and_find_vma() conversion
dm: don't lock fs when the map is NULL during suspend or resume
dm thin: fix issue_discard to pass GFP_NOIO to __blkdev_issue_discard
dm thin metadata: check fail_io before using data_sm
docs: Set minimal gtags / GNU GLOBAL version to 6.6.5
Drivers: hv: vmbus: Call hv_synic_free() if hv_synic_alloc() fails
Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs
drm:amd:amdgpu: Fix missing buffer object unlock in failure path
drm/amd/display: Add wrapper to call planes and stream update
drm/amd/display: Do not update DRR while BW optimizations pending
drm/amd/display: edp do not add non-edid timings
drm/amd/display: Ensure vmin and vmax adjust for DCE
drm/amd/display: fix the system hang while disable PSR
drm/amd/display: Remove optimization for VRR updates
drm/amd/display: Use dc_update_planes_and_stream
drm/amdgpu: add missing radeon secondary PCI ID
drm/amdgpu: Don't set struct drm_driver.output_poll_changed
drm/amdgpu: Validate VM ioctl flags.
drm/amdgpu: vcn_4_0 set instance 0 init sched score to 1
drm/amd: Make sure image is written to trigger VBIOS image update flow
drm/amd/pm: workaround for compute workload type on some skus
drm/amd: Tighten permissions on VBIOS flashing attributes
drm/bridge: ti-sn65dsi86: Avoid possible buffer overflow
drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl
drm/exynos: vidi: fix a wrong error return
drm/nouveau: add nv_encoder pointer check for NULL
drm/nouveau: don't detect DSM for non-NVIDIA device
drm/nouveau/dp: check for NULL nv_connector->native_mode
drm: panel-orientation-quirks: Change Air's quirk to support Air Plus
drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl
EDAC/qcom: Get rid of hardcoded register offsets
epoll: ep_autoremove_wake_function should use list_del_init_careful
execve: always mark stack as growing down during early stack setup
execve: expand new process stack manually ahead of time
ext4: drop the call to ext4_error() from ext4_get_group_info()
fbdev: fix potential OOB read in fast_imageblit()
gfs2: Don't get stuck writing page onto itself under direct I/O
gpiolib: Fix GPIO chip IRQ initialization restriction
gpiolib: Fix irq_domain resource tracking for gpiochip_irqchip_add_domain()
gpio: sifive: add missing check for platform_get_irq
HID: hidraw: fix data race on device refcount
HID: logitech-hidpp: add HIDPP_QUIRK_DELAYED_INIT for the T651.
HID: wacom: Add error check to wacom_parse_and_register()
HID: wacom: Use ktime_t rather than int when dealing with timestamps
i2c: imx-lpi2c: fix type char overflow issue when calculating the clock cycle
i2c: mchp-pci1xxxx: Avoid cast to incompatible function type
iavf: remove mask from iavf_irq_enable_queues()
IB/isert: Fix dead lock in ib_isert
IB/isert: Fix incorrect release of isert connection
IB/isert: Fix possible list corruption in CMA handler
IB/uverbs: Fix to consider event queue closing also upon non-blocking mode
ice: Fix XDP memory leak when NIC is brought up and down
ieee802154: hwsim: Fix possible memory leaks
igb: Fix extts capture value format for 82580/i354/i350
igb: fix nvm.ops.read() error handling
igc: Clean the TX buffer and TX descriptor ring
igc: Fix possible system crash when loading module
Input: soc_button_array - add invalid acpi_index DMI quirk handling
io_uring/net: clear msg_controllen on partial sendmsg retry
io_uring/net: disable partial retries for recvmsg with cmsg
io_uring/net: save msghdr->msg_control for retries
io_uring/net: use the correct msghdr union member in io_sendmsg_copy_hdr
io_uring/poll: serialize poll linked timer start with poll removal
io_uring: unlock sqd->lock before sq thread release CPU
ipvlan: fix bound dev checking for IPv6 l3s mode
ipvs: align inner_mac_header for encapsulation
irqchip/gic: Correctly validate OF quirk descriptors
irqchip/gic-v3: Disable pseudo NMIs on Mediatek devices w/ firmware issues
irqchip/meson-gpio: Mark OF related data as maybe unused
kbuild: Update assembler calls to use proper flags and language target
kexec: support purgatories with .text.hot sections
ksmbd: fix out-of-bound read in smb2_write
ksmbd: validate command payload size
ksmbd: validate session id and tree id in the compound request
ksmbd: validate smb request protocol id
KVM: arm64: PMU: Restore the host's PMUSERENR_EL0
KVM: arm64: Restore GICv2-on-GICv3 functionality
KVM: Avoid illegal stage2 mapping on invalid memory slot
LoongArch: Fix perf event id calculation
maple_tree: fix potential out-of-bounds access in mas_wr_end_piv()
media: cec: core: disable adapter in cec_devnode_unregister
media: cec: core: don't set last_initiator if tx in progress
memfd: check for non-NULL file_seals in memfd_create() syscall
MIPS: Alchemy: fix dbdma2
mips/mm: Convert to using lock_mm_and_find_vma()
mips: Move initrd_start check after initrd address sanitisation.
MIPS: Move '-Wa,-msoft-float' check from as-option to cc-option
MIPS: Prefer cc-option for additions to cflags
MIPS: Restore Au1300 support
MIPS: unhide PATA_PLATFORM
mm: always expand the stack with the mmap write lock held
mmc: bcm2835: fix deferred probing
mmc: litex_mmc: set PROBE_PREFER_ASYNCHRONOUS
mmc: meson-gx: fix deferred probing
mmc: meson-gx: remove redundant mmc_request_done() call from irq context
mmc: mmci: stm32: fix max busy timeout calculation
mmc: mtk-sd: fix deferred probing
mmc: mvsdio: fix deferred probing
mmc: omap: fix deferred probing
mmc: omap_hsmmc: fix deferred probing
mmc: owl: fix deferred probing
mmc: sdhci-acpi: fix deferred probing
mmc: sdhci-msm: Disable broken 64-bit DMA on MSM8916
mmc: sdhci-spear: fix deferred probing
mmc: sh_mmcif: fix deferred probing
mmc: sunxi: fix deferred probing
mmc: usdhi60rol0: fix deferred probing
mm/fault: convert remaining simple cases to lock_mm_and_find_vma()
mm: Fix copy_from_user_nofault().
mm, hwpoison: try to recover from copy-on write faults
mm, hwpoison: when copy-on-write hits poison, take page offline
mm: introduce new 'lock_mm_and_find_vma()' page fault helper
mm: make find_extend_vma() fail if write lock not held
mm: make the page fault mmap locking killable
mm/mmap: Fix error path in do_vmi_align_munmap()
mm/mmap: Fix error return in do_vmi_align_munmap()
mptcp: consolidate fallback and non fallback state machine
mptcp: ensure listener is unhashed before updating the sk status
mptcp: fix possible divide by zero in recvmsg()
mptcp: fix possible list corruption on passive MPJ
mptcp: handle correctly disconnect() failures
neighbour: delete neigh_lookup_nodev as not used
net: dsa: felix: fix taprio guard band overflow at 10Mbps with jumbo frames
net: dsa: mt7530: fix handling of BPDUs on MT7530 switch
net: dsa: mt7530: fix handling of LLDP frames
net: dsa: mt7530: fix trapping frames on non-MT7621 SoC MT7530 switch
net: enetc: correct the indexes of highest and 2nd highest TCs
net: ethernet: stmicro: stmmac: fix possible memory leak in __stmmac_open
net: ethtool: correct MAX attribute value for stats
netfilter: nfnetlink_osf: fix module autoload
netfilter: nfnetlink: skip error delivery on batch in case of ENOMEM
netfilter: nf_tables: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain
netfilter: nf_tables: disallow element updates of bound anonymous sets
netfilter: nf_tables: disallow updates of anonymous sets
netfilter: nf_tables: drop map element references from preparation phase
netfilter: nf_tables: fix chain binding transaction logic
netfilter: nf_tables: incorrect error path handling with NFT_MSG_NEWRULE
netfilter: nf_tables: integrate pipapo into commit protocol
netfilter: nf_tables: reject unbound anonymous set before commit phase
netfilter: nf_tables: reject unbound chain set before commit phase
netfilter: nft_set_pipapo: .walk does not deal with generations
net: lapbether: only support ethernet devices
net: macsec: fix double free of percpu stats
net/mlx5: DR, Fix wrong action data allocation in decap action
net: phylink: report correct max speed for QUSGMII
net: phylink: use a dedicated helper to parse usgmii control word
net: qca_spi: Avoid high load if QCA7000 is not available
net/sched: act_api: add specific EXT_WARN_MSG for tc action
net/sched: act_api: move TCA_EXT_WARN_MSG to the correct hierarchy
net/sched: act_pedit: Parse L3 Header for L4 offset
net/sched: act_pedit: remove extra check for key type
net/sched: cls_api: Fix lockup on flushing explicitly created chain
net/sched: cls_u32: Fix reference counter leak leading to overflow
net/sched: qdisc_destroy() old ingress and clsact Qdiscs before grafting
net/sched: Refactor qdisc_graft() for ingress and clsact Qdiscs
net/sched: simplify tcf_pedit_act
net: tipc: resize nlattr array to correct size
net: usb: qmi_wwan: add support for Compal RXM-G1
nfcsim.c: Fix error checking for debugfs_create_dir
nilfs2: fix buffer corruption due to concurrent device reads
nilfs2: fix incomplete buffer cleanup in nilfs_btnode_abort_change_key()
nilfs2: fix possible out-of-bounds segment allocation in resize ioctl
nilfs2: prevent general protection fault in nilfs_clear_dirty_page()
nilfs2: reject devices with insufficient block count
nios2: dts: Fix tse_mac "max-frame-size" property
nouveau: fix client work fence deletion race
nubus: Partially revert proc_create_single_data() conversion
null_blk: Fix: memory release when memory_backed=1
NVMe: Add MAXIO 1602 to bogus nid list.
nvme: check IO start time when deciding to defer KA
nvme: double KA polling frequency to avoid KATO with TBKAS on
nvme: improve handling of long keep alives
ocfs2: check new file size on fallocate call
ocfs2: fix use-after-free when unmounting read-only filesystem
octeon_ep: Add missing check for ioremap
octeontx2-af: fixed resource availability check
octeontx2-af: fix lbk link credits on cn10k
octeontx2-af: Fix promiscuous mode
of: overlay: Fix missing of_node_put() in error case of init_overlay_changeset()
parisc: Delete redundant register definitions in <asm/assembly.h>
parisc: fix expand_stack() conversion
parisc: Flush gatt writes and adjust gatt mask in parisc_agp_mask_memory()
parisc: Improve cache flushing for PCXL in arch_sync_dma_for_cpu()
PCI/ACPI: Call _REG when transitioning D-states
PCI/ACPI: Validate acpi_pci_set_power_state() parameter
PCI/DPC: Quirk PIO log size for Intel Ice Lake Root Ports
PCI: hv: Add a per-bus mutex state_lock
PCI: hv: Fix a race condition bug in hv_pci_query_relations()
PCI: hv: Fix a race condition in hv_irq_unmask() that can cause panic
PCI: hv: Remove the useless hv_pcichild_state from struct hv_pci_dev
perf symbols: Symbol lookup with kcore can fail if multiple segments match stext
ping6: Fix send to link-local addresses with VRF.
platform/x86/amd/pmf: Register notify handler only if SPS is enabled
platform/x86: asus-wmi: Ignore WMI events with codes 0x7B, 0xC0
powerpc/mm: convert coprocessor fault to lock_mm_and_find_vma()
powerpc/mm: Convert to using lock_mm_and_find_vma()
powerpc/purgatory: remove PGO flags
power: supply: ab8500: Fix external_power_changed race
power: supply: bq27xxx: Use mod_delayed_work() instead of cancel() + schedule()
power: supply: Fix logic checking if system is running from battery
power: supply: Ratelimit no data debug output
power: supply: sc27xx: Fix external_power_changed race
qcom: llcc/edac: Fix the base address used for accessing LLCC banks
rcu/kvfree: Avoid freeing new kfree_rcu() memory after old grace period
RDMA/cma: Always set static rate to 0 for RoCE
RDMA/mlx5: Create an indirect flow table for steering anchor
RDMA/mlx5: Fix affinity assignment
RDMA/mlx5: Initiate dropless RQ for RAW Ethernet functions
RDMA/rtrs: Fix rxe_dealloc_pd warning
RDMA/rtrs: Fix the last iu->buf leak in err path
RDMA/rxe: Fix packet length checks
RDMA/rxe: Fix ref count error in check_rkey()
RDMA/rxe: Fix the use-before-initialization error of resp_pkts
RDMA/rxe: Removed unused name from rxe_task struct
RDMA/uverbs: Restrict usage of privileged QKEYs
regmap: spi-avmm: Fix regmap_bus max_raw_write
regulator: Fix error checking for debugfs_create_dir
regulator: pca9450: Fix LDO3OUT and LDO4OUT MASK
revert "net: align SO_RCVMARK required privileges with SO_MARK"
Revert "net: phy: dp83867: perform soft reset and retain established link"
Revert "net/sched: act_api: move TCA_EXT_WARN_MSG to the correct hierarchy"
Revert "PCI: hv: Fix a timing issue which causes kdump to fail occasionally"
Revert "thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe"
riscv/mm: Convert to using lock_mm_and_find_vma()
riscv/purgatory: remove PGO flags
s390/cio: unregister device when the only path is gone
s390/purgatory: disable branch profiling
sched: add new attr TCA_EXT_WARN_MSG to report tc extact message
sch_netem: acquire qdisc lock in netem_change()
scripts: fix the gfp flags header path in gfp-translate
scripts/tags.sh: Resolve gtags empty index generation
scsi: target: core: Fix error path in target_setup_session()
scsi: target: iscsi: Prevent login threads from racing between each other
sctp: fix an error code in sctp_sf_eat_auth()
selftests: forwarding: Fix race condition in mirror installation
selftests: forwarding: hw_stats_l3: Set addrgenmode in a separate step
selftests: gpio: gpio-sim: Fix BUG: test FAILED due to recent change
selftests/mount_setattr: fix redefine struct mount_attr build error
selftests: mptcp: connect: skip disconnect tests if not supported
selftests: mptcp: connect: skip transp tests if not supported
selftests: mptcp: diag: skip listen tests if not supported
selftests: mptcp: join: fix ShellCheck warnings
selftests: mptcp: join: fix "userspace pm add & remove address"
selftests: mptcp: join: helpers to skip tests
selftests: mptcp: join: skip backup if set flag on ID not supported
selftests: mptcp: join: skip check if MIB counter not supported
selftests: mptcp: join: skip fail tests if not supported
selftests: mptcp: join: skip Fastclose tests if not supported
selftests: mptcp: join: skip fullmesh flag tests if not supported
selftests: mptcp: join: skip implicit tests if not supported
selftests: mptcp: join: skip MPC backups tests if not supported
selftests: mptcp: join: skip test if iptables/tc cmds fail
selftests: mptcp: join: skip userspace PM tests if not supported
selftests: mptcp: join: support local endpoint being tracked or not
selftests: mptcp: join: support RM_ADDR for used endpoints or not
selftests: mptcp: join: use 'iptables-legacy' if available
selftests: mptcp: lib: skip if missing symbol
selftests: mptcp: lib: skip if not below kernel version
selftests: mptcp: pm nl: remove hardcoded default limits
selftests: mptcp: pm nl: skip fullmesh flag checks if not supported
selftests: mptcp: remove duplicated entries in usage
selftests: mptcp: sockopt: relax expected returned size
selftests: mptcp: sockopt: skip getsockopt checks if not supported
selftests: mptcp: sockopt: skip TCP_INQ checks if not supported
selftests: mptcp: userspace pm: skip if 'ip' tool is unavailable
selftests: mptcp: userspace pm: skip if not supported
selftests: net: fcnal-test: check if FIPS mode is enabled
selftests: net: tls: check if FIPS mode is enabled
selftests: net: vrf-xfrm-tests: change authentication and encryption algos
selftests/ptp: Fix timestamp printf format for PTP_SYS_OFFSET
selftests/tc-testing: Fix Error: failed to find target LOG
selftests/tc-testing: Fix Error: Specified qdisc kind is unknown.
selftests/tc-testing: Fix SFB db test
serial: lantiq: add missing interrupt ack
sfc: fix XDP queues mode with legacy IRQ
sfc: use budget for TX completions
smb3: missing null check in SMB2_change_notify
smb: move client and server files to common directory fs/smb
soundwire: dmi-quirks: add new mapping for HP Spectre x360
soundwire: qcom: add proper error paths in qcom_swrm_startup()
sparc32: fix lock_mm_and_find_vma() conversion
spi: cadence-quadspi: Add missing check for dma_set_mask
spi: fsl-dspi: avoid SCK glitches with continuous transfers
spi: lpspi: disable lpspi module irq in DMA mode
spi: spi-geni-qcom: correctly handle -EPROBE_DEFER from dma_request_chan()
test_firmware: prevent race conditions by a correct implementation of locking
test_firmware: Use kstrtobool() instead of strtobool()
thunderbolt: dma_test: Use correct value for absent rings when creating paths
thunderbolt: Do not touch CL state configuration during discovery
thunderbolt: Mask ring interrupt on Intel hardware as well
tick/common: Align tick period during sched_timer setup
tools: gpio: fix debounce_period_us output of lsgpio
tpm_crb: Add support for CRB devices based on Pluton
tpm, tpm_tis: Claim locality in interrupt handler
tty: serial: fsl_lpuart: make rx_watermark configurable for different platforms
tty: serial: fsl_lpuart: reduce RX watermark to 0 on LS1028A
USB: dwc3: fix use-after-free on core driver unbind
usb: dwc3: gadget: Reset num TRBs before giving back the request
USB: dwc3: qcom: fix NULL-deref on suspend
usb: gadget: udc: core: Offload usb_udc_vbus_handler processing
usb: gadget: udc: core: Prevent soft_connect_store() race
usb: gadget: udc: fix NULL dereference in remove()
USB: serial: option: add Quectel EM061KGL series
usb: typec: Fix fast_role_swap_current show function
usb: typec: ucsi: Fix command cancellation
vhost_net: revert upend_idx only on retriable error
vhost_vdpa: tell vqs about the negotiated
wifi: cfg80211: fix double lock bug in reg_wdev_chan_valid()
wifi: cfg80211: fix link del callback to call correct handler
wifi: cfg80211: fix locking in regulatory disconnect
wifi: iwlwifi: pcie: Handle SO-F device for PCI id 0x7AF0
wifi: mac80211: fix link activation settings order
wifi: mac80211: take lock before setting vif links
writeback: fix dereferencing NULL mapping->host on writeback_page_template
x86/apic: Fix kernel panic when booting with intremap=off and x2apic_phys
x86/boot/compressed: prefer cc-option for CFLAGS additions
x86/head/64: Switch to KERNEL_CS as soon as new GDT is installed
x86/microcode/AMD: Load late on both threads too
x86/mm: Avoid using set_pgd() outside of real PGD pages
x86/purgatory: remove PGO flags
x86/smp: Cure kexec() vs. mwait_play_dead() breakage
x86/smp: Dont access non-existing CPUID leaf
x86/smp: Make stop_other_cpus() more robust
x86/smp: Remove pointless wmb()s from native_stop_other_cpus()
x86/smp: Use dedicated cache-line for mwait_play_dead()
xen/blkfront: Only check REQ_FUA for writes
xfrm: Ensure policies always checked on XFRM-I input path
xfrm: fix inbound ipv4/udp/esp packets to UDPv6 dualstack sockets
xfrm: interface: rename xfrm_interface.c to xfrm_interface_core.c
xfrm: Linearize the skb after offloading if needed.
xfrm: Treat already-verified secpath entries as optional
xtensa: fix lock_mm_and_find_vma in case VMA not found
xtensa: fix NOMMU build with lock_mm_and_find_vma() conversion
zswap: do not shrink if cgroup may not zswap
Updated by kernel-updater-bot (https://abf.io/mikhailnov/kernel-updater-bot)
2023-07-05 23:17:06 +03:00
|
|
|
%define sublevel 38
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2016-07-22 22:05:03 +03:00
|
|
|
# Release number. Increase this before a rebuild.
|
[bot] upd: 6.1.27 -> 6.1.29
Changelog:
ACPI: bus: Ensure that notify handlers are not running after removal
ACPI: PM: Do not turn of unused power resources on the Toshiba Click Mini
ACPI: processor: Fix evaluating _PDC method when running as Xen dom0
ACPI: video: Remove acpi_backlight=video quirk for Lenovo ThinkPad W530
ACPI: VIOT: Initialize the correct IOMMU fwspec
af_packet: Don't send zero-byte data in packet_sendmsg_spkt().
afs: Avoid endless loop if file is larger than expected
afs: Fix getattr to report server i_size on dirs, not local size
afs: Fix updating of i_size with dv jump from server
ALSA: caiaq: input: Add error handling for unsupported input methods in `snd_usb_caiaq_input_init`
ALSA: hda/realtek: Add quirk for ASUS UM3402YAR using CS35L41
ALSA: hda/realtek: Add quirk for ThinkPad P1 Gen 6
ALSA: hda/realtek: Fix mute and micmute LEDs for an HP laptop
ALSA: hda/realtek: support HP Pavilion Aero 13-be0xxx Mute LED
ALSA: usb-audio: Add quirk for Pioneer DDJ-800
arm64: Always load shadow stack pointer directly from the task struct
arm64: dts: apple: t8103: Disable unused PCIe ports
arm64: dts: broadcom: bcmbca: bcm4908: fix LED nodenames
arm64: dts: broadcom: bcmbca: bcm4908: fix NAND interrupt name
arm64: dts: broadcom: bcmbca: bcm4908: fix procmon nodename
arm64: dts: mediatek: mt8192-asurada: Fix voltage constraint for Vgpu
arm64: dts: qcom: apq8096-db820c: drop unit address from PMI8994 regulator
arm64: dts: qcom: ipq6018: Fix the PCI I/O port range
arm64: dts: qcom: ipq8074: Fix the PCI I/O port range
arm64: dts: qcom: msm8994-angler: Fix cont_splash_mem mapping
arm64: dts: qcom: msm8994-angler: removed clash with smem_region
arm64: dts: qcom: msm8994-kitakami: drop unit address from PMI8994 regulator
arm64: dts: qcom: msm8994-msft-lumia-octagon: drop unit address from PMI8994 regulator
arm64: dts: qcom: msm8996: Fix the PCI I/O port range
arm64: dts: qcom: msm8998: Fix stm-stimulus-base reg name
arm64: dts: qcom: msm8998: Fix the PCI I/O port range
arm64: dts: qcom: sc7180-trogdor-lazor: correct trackpad supply
arm64: dts: qcom: sc7180-trogdor-pazquel: correct trackpad supply
arm64: dts: qcom: sc7280: fix EUD port properties
arm64: dts: qcom: sc7280: Fix the PCI I/O port range
arm64: dts: qcom: sc7280-herobrine-villager: correct trackpad supply
arm64: dts: qcom: sdm845: correct dynamic power coefficients
arm64: dts: qcom: sdm845: Fix the PCI I/O port range
arm64: dts: qcom: sm8150: Fix the PCI I/O port range
arm64: dts: qcom: sm8250: Fix the PCI I/O port range
arm64: dts: qcom: sm8350-microsoft-surface: fix USB dual-role mode property
arm64: dts: qcom: sm8450: fix pcie1 gpios properties name
arm64: dts: qcom: sm8450: Fix the PCI I/O port range
arm64: dts: renesas: r8a774c0: Remove bogus voltages from OPP table
arm64: dts: renesas: r8a77990: Remove bogus voltages from OPP table
arm64: dts: renesas: r9a07g043: Introduce SOC_PERIPHERAL_IRQ() macro to specify interrupt property
arm64: dts: renesas: r9a07g043: Update IRQ numbers for SSI channels
arm64: dts: renesas: r9a07g044: Update IRQ numbers for SSI channels
arm64: dts: renesas: r9a07g054: Update IRQ numbers for SSI channels
arm64: dts: sc7180: Rename qspi data12 as data23
arm64: dts: sc7280: Rename qspi data12 as data23
arm64: dts: ti: k3-am625: Correct L2 cache size to 512KB
arm64: dts: ti: k3-am62a7: Correct L2 cache size to 512KB
arm64: dts: ti: k3-am62a7-sk: Fix DDR size to full 4GB
arm64: dts: ti: k3-am62-main: Fix GPIO numbers in DT
arm64: dts: ti: k3-j721e-main: Remove ti,strobe-sel property
arm64: kgdb: Set PSTATE.SS to 1 to re-enable single-step
arm64: Stash shadow stack pointer in the task struct on interrupt
ARM: dts: aspeed: asrock: Correct firmware flash SPI clocks
ARM: dts: aspeed: romed8hm3: Fix GPIO polarity of system-fault LED
ARM: dts: exynos: fix WM8960 clock name in Itop Elite
ARM: dts: gta04: fix excess dma channel usage
ARM: dts: qcom-apq8064: Fix opp table child name
ARM: dts: qcom: ipq4019: Fix the PCI I/O port range
ARM: dts: qcom: ipq8064: Fix the PCI I/O port range
ARM: dts: qcom: sdx55: Fix the unit address of PCIe EP node
ARM: dts: s5pv210: correct MIPI CSIS clock name
ARM: dts: stm32: fix spi1 pin assignment on stm32mp15
asm-generic/io.h: suppress endianness warnings for readq() and writeq()
ASoC: amd: fix ACP version typo mistake
ASoC: amd: ps: update the acp clock source.
ASoC: amd: yc: Add DMI entries to support Victus by HP Laptop 16-e1xxx (8A22)
ASoC: codecs: constify static sdw_slave_ops struct
ASoC: codecs: wcd938x: fix accessing regmap on unattached devices
ASoC: cs35l41: Only disable internal boost
ASoC: da7213.c: add missing pm_runtime_disable()
ASoC: dt-bindings: qcom,lpass-rx-macro: correct minItems for clocks
ASoC: es8316: Handle optional IRQ assignment
ASoC: fsl_mqs: move of_node_put() to the correct location
ASoC: Intel: bytcr_rt5640: Add quirk for the Acer Iconia One 7 B1-750
ASoC: Intel: soc-acpi: add table for Intel 'Rooks County' NUC M15
ASoC: Intel: soc-acpi-byt: Fix "WM510205" match no longer working
ASOC: Intel: sof_sdw: add quirk for Intel 'Rooks County' NUC M15
ASoC: rt1318: Add RT1318 SDCA vendor-specific driver
ASoC: soc-compress: Inherit atomicity from DAI link for Compress FE
ASoC: soc-pcm: fix hw->formats cleared by soc_pcm_hw_init() for dpcm
blk-crypto: add a blk_crypto_config_supported_natively helper
blk-crypto: Add a missing include directive
blk-crypto: don't use struct request_queue for public interfaces
blk-crypto: make blk_crypto_evict_key() more robust
blk-crypto: make blk_crypto_evict_key() return void
blk-crypto: move internal only declarations to blk-crypto-internal.h
blk-iocost: avoid 64-bit division in ioc_timer_fn
blk-mq: don't plug for head insertions in blk_execute_rq_nowait
blk-mq: release crypto keyslot before reporting I/O complete
blk-stat: fix QUEUE_FLAG_STATS clear
block/blk-iocost (gcc13): keep large values in a new enum
block: Skip destroyed blkg when restart in blkg_destroy_all()
bonding (gcc13): synchronize bond_{a,t}lb_xmit() types
bpf/btf: Fix is_int_ptr()
bpf: Don't EFAULT for getsockopt with optval=NULL
bpf: fix precision propagation verbose logging
bpf: Fix race between btf_put and btf_idr walk.
bpf: Fix __reg_bound_offset 64->32 var_off subreg propagation
bpf: Remove misleading spec_v1 check on var-offset stack read
bpf, sockmap: fix deadlocks in the sockhash and sockmap
bpf, sockmap: Revert buggy deadlock fix in the sockhash and sockmap
bpf: take into account liveness when propagating precision
bpftool: Fix bug for long instructions in program CFG dumps
btrfs: don't free qgroup space unless specified
btrfs: fix assertion of exclop condition when starting balance
btrfs: fix btrfs_prev_leaf() to not return the same key twice
btrfs: fix encoded write i_size corruption with no-holes
btrfs: fix space cache inconsistency after error loading it from disk
btrfs: make clear_cache mount option to rebuild FST without disabling it
btrfs: print-tree: parent bytenr must be aligned to sector size
btrfs: properly reject clear_cache and v1 cache for block-group-tree
btrfs: scrub: reject unsupported scrub flags
btrfs: zero the buffer before marking it dirty in btrfs_redirty_list_add
btrfs: zoned: fix full zone super block reading on ZNS
btrfs: zoned: fix wrong use of bitops API in btrfs_ensure_empty_zones
btrfs: zoned: zone finish data relocation BG with last IO
bus: mhi: host: Range check CHDBOFF and ERDBOFF
bus: mhi: host: Remove duplicate ee check for syserr
bus: mhi: host: Use mhi_tryset_pm_state() for setting fw error state
cacheinfo: Check sib_leaf in cache_leaves_are_shared()
ceph: fix potential use-after-free bug when trimming caps
cifs: fix pcchunk length type in smb2_copychunk_range
cifs: fix potential use-after-free bugs in TCP_Server_Info::hostname
cifs: protect session status check in smb2_reconnect()
cifs: release leases for deferred close handles when freezing
clk: add missing of_node_put() in "assigned-clocks" property parsing
clk: at91: clk-sam9x60-pll: fix return value check
clk: imx: fracn-gppll: disable hardware select control
clk: imx: fracn-gppll: fix the rate table
clk: imx: imx8ulp: Fix XBAR_DIVBUS and AD_SLOW clock parents
clk: mediatek: Consistently use GATE_MTK() macro
clk: mediatek: mt2712: Add error handling to clk_mt2712_apmixed_probe()
clk: mediatek: mt7622: Properly use CLK_IS_CRITICAL flag
clk: mediatek: mt8135: Properly use CLK_IS_CRITICAL flag
clk: microchip: fix potential UAF in auxdev release callback
clk: qcom: dispcc-qcm2290: get rid of test clock
clk: qcom: dispcc-qcm2290: Remove inexistent DSI1PHY clk
clk: qcom: gcc-qcm2290: Fix up gcc_sdcc2_apps_clk_src
clk: qcom: gcc-sm6115: Mark RCGs shared where applicable
clk: qcom: gcc-sm8350: fix PCIe PIPE clocks handling
clk: qcom: lpassaudiocc-sc7280: Add required gdsc power domain clks in lpass_cc_sc7280_desc
clk: qcom: lpasscc-sc7280: Skip qdsp6ss clock registration
clk: rockchip: rk3399: allow clk_cifout to force clk_cifout_src to reparent
clocksource/drivers/davinci: Fix memory leak in davinci_timer_register when init fails
coresight: etm_pmu: Set the module field
cpufreq: mediatek: fix KP caused by handler usage after regulator_put/clk_put
cpufreq: mediatek: fix passing zero to 'PTR_ERR'
cpufreq: mediatek: Raise proc and sram max voltage for MT7622/7623
cpufreq: mediatek: raise proc/sram max voltage for MT8516
cpufreq: qcom-cpufreq-hw: Revert adding cpufreq qos
cpufreq: use correct unit when verify cur freq
crypto: api - Add scaffolding to change completion function signature
crypto: api - Demote BUG_ON() in crypto_unregister_alg() to a WARN_ON()
crypto: arm64/aes-neonbs - fix crash with CFI enabled
crypto: caam - Clear some memory in instantiate_rng
crypto: ccp - Clear PSP interrupt status register before calling handler
crypto: ccp - Don't initialize CCP for PSP 0x1649
crypto: drbg - Only fail when jent is unavailable in FIPS mode
crypto: engine - fix crypto_queue backlog handling
crypto: engine - Use crypto_request_complete
crypto: qat - fix concurrency issue when device state changes
crypto: sa2ul - Select CRYPTO_DES
crypto: safexcel - Cleanup ring IRQ workqueues on load failure
crypto: sun8i-ss - Fix a test in sun8i_ss_setup_ivs()
cxl/hdm: Fail upon detecting 0-sized decoders
debugobject: Ensure pool refill (again)
debugobject: Prevent init race with static objects
dmaengine: at_xdmac: do not enable all cyclic channels
dmaengine: dw-edma: Fix to change for continuous transfer
dmaengine: dw-edma: Fix to enable to issue dma request on DMA processing
dmaengine: mv_xor_v2: Fix an error code.
dma: gpi: remove spurious unlock in gpi_ch_init
dm clone: call kmem_cache_destroy() in dm_clone_init() error path
dm: don't lock fs when the map is NULL in process of resume
dm flakey: fix a crash with invalid table line
dm integrity: call kmem_cache_destroy() in dm_integrity_init() error path
dm ioctl: fix nested locking in table_clear() to remove deadlock concern
dm verity: fix error handling for check_at_most_once on FEC
drbd: correctly submit flush bio on barrier
drivers: staging: rtl8723bs: Fix locking in _rtw_join_timeout_handler()
drivers: staging: rtl8723bs: Fix locking in rtw_scan_timeout_handler()
drm: Add missing DP DSC extended capability definitions.
drm/amd: Add a new helper for loading/validating microcode
drm/amd/display: Add debug option to skip PSR CRTC disable
drm/amd/display: Add minimum Z8 residency debug option
drm/amd/display: Add missing WA and MCLK validation
drm/amd/display: Add NULL plane_state check for cursor disable logic
drm/amd/display: Add Z8 allow states to z-state support list
drm/amd/display: Change default Z8 watermark values
drm/amd/display/dc/dce60/Makefile: Fix previous attempt to silence known override-init warnings
drm/amd/display: Do not clear GPINT register when releasing DMUB from reset
drm/amd/display: Enforce 60us prefetch for 200Mhz DCFCLK modes
drm/amd/display: Ext displays with dock can't recognized after resume
drm/amd/display: filter out invalid bits in pipe_fuses
drm/amd/display: Fix 4to1 MPC black screen with DPP RCO
drm/amd/display: fix a divided-by-zero error
drm/amd/display: Fixes for dcn32_clk_mgr implementation
drm/amd/display: fix flickering caused by S/G mode
drm/amd/display: Fix hang when skipping modeset
drm/amd/display: Fix potential null dereference
drm/amd/display: fix PSR-SU/DSC interoperability support
drm/amd/display: Fix Z8 support configurations
drm/amd/display (gcc13): fix enum mismatch
drm/amd/display: limit timing for single dimm memory
drm/amd/display: Lowering min Z8 residency time
drm/amd/display: Refactor eDP PSR codes
drm/amd/display: Remove FPU guards from the DML folder
drm/amd/display: Remove stutter only configurations
drm/amd/display: Reset OUTBOX0 r/w pointer on DMUB reset
drm/amd/display: Return error code on DSC atomic check failure
drm/amd/display: Update bounding box values for DCN321
drm/amd/display: Update minimum stutter residency for DCN314 Z8
drm/amd/display: Update Z8 SR exit/enter latencies
drm/amd/display: Update Z8 watermarks for DCN314
drm/amdgpu: add a missing lock for AMDGPU_SCHED
drm/amdgpu: change gfx 11.0.4 external_id range
drm/amdgpu: disable sdma ecc irq only when sdma RAS is enabled in suspend
drm/amdgpu: fix amdgpu_irq_put call trace in gmc_v10_0_hw_fini
drm/amdgpu: fix amdgpu_irq_put call trace in gmc_v11_0_hw_fini
drm/amdgpu: fix an amdgpu_irq_put() issue in gmc_v9_0_hw_fini()
drm/amdgpu: Fix vram recover doesn't work after whole GPU reset (v2)
drm/amdgpu/gfx: disable gfx9 cp_ecc_error_irq only when enabling legacy gfx ras
drm/amdgpu/jpeg: Remove harvest checking for JPEG3
drm/amdgpu: register a vga_switcheroo client for MacBooks with apple-gmux
drm/amdgpu: remove deprecated MES version vars
drm/amd: Load MES microcode during early_init
drm/amd/pm: avoid potential UBSAN issue on legacy asics
drm/amd/pm: parse pp_handle under appropriate conditions
drm/amd/pm: re-enable the gfx imu when smu resume
drm/amd: Use `amdgpu_ucode_*` helpers for MES
drm/bridge: adv7533: Fix adv7533_mode_valid for adv7533 and adv7535
drm/bridge: lt8912b: Fix DSI Video Mode
drm/dsc: fix DP_DSC_MAX_BPP_DELTA_* macro values
drm/dsc: fix drm_edp_dsc_sink_output_bpp() DPCD high byte usage
drm/i915: Check pipe source size when using skl+ scalers
drm/i915/color: Fix typo for Plane CSC indexes
drm/i915/dg2: Drop one PCI ID
drm/i915/dsi: Use unconditional msleep() instead of intel_dsi_msleep()
drm/i915: Make intel_get_crtc_new_encoder() less oopsy
drm/i915/mtl: Add the missing CPU transcoder mask in intel_device_info
drm/i915/mtl: update scaler source and destination limits for MTL
drm/lima/lima_drv: Add missing unwind goto in lima_pdev_probe()
drm/mediatek: dp: Change the aux retries times when receiving AUX_DEFER
drm/mediatek: dp: Only trigger DRM HPD events if bridge is attached
drm/msm/adreno: adreno_gpu: Use suspend() instead of idle() on load error
drm: msm: adreno: Disable preemption on Adreno 510
drm/msm/adreno: drop bogus pm_runtime_set_active()
drm/msm/adreno: fix runtime PM imbalance at gpu load
drm/msm/adreno: Simplify read64/write64 helpers
drm/msm/disp/dpu: check for crtc enable rather than crtc active to release shared resources
drm/msm: fix drm device leak on bind errors
drm/msm: fix missing wq allocation error handling
drm/msm: fix NULL-deref on irq uninstall
drm/msm: fix NULL-deref on snapshot tear down
drm/msm: fix vram leak on bind errors
drm/msm: fix workqueue leak on bind errors
drm/msm: Hangcheck progress detection
drm/panel: novatek-nt35950: Improve error handling
drm/panel: novatek-nt35950: Only unregister DSI1 if it exists
drm/panel: otm8009a: Set backlight parent to panel device
drm/probe-helper: Cancel previous job before starting new one
drm: rcar-du: Fix a NULL vs IS_ERR() bug
drm/rockchip: Drop unbalanced obj unref
drm/ttm: optimize pool allocations a bit v2
drm/ttm/pool: Fix ttm_pool_alloc error path
drm/vgem: add missing mutex_destroy
drm/vmwgfx: Fix Legacy Display Unit atomic drm support
drm/vmwgfx: Remove explicit and broken vblank handling
EDAC/skx: Fix overflows on the DRAM row address mapping arrays
erofs: fix potential overflow calculating xattr_isize
erofs: initialize packed inode after root inode is assigned
erofs: stop parsing non-compact HEAD index if clusterofs is invalid
ethtool: Fix uninitialized number of lanes
ext4: add bounds checking in get_max_inline_xattr_value_size()
ext4: avoid a potential slab-out-of-bounds in ext4_group_desc_csum
ext4: bail out of ext4_xattr_ibody_get() fails for any reason
ext4: check iomap type only if ext4_iomap_begin() does not fail
ext4: fix data races when using cached status extents
ext4: fix deadlock when converting an inline directory in nojournal mode
ext4: fix i_disksize exceeding i_size problem in paritally written case
ext4: fix invalid free tracking in ext4_xattr_move_to_block()
ext4: fix lockdep warning when enabling MMP
ext4: fix use-after-free read in ext4_find_extent for bigalloc + inline
ext4: fix WARNING in mb_find_extent
ext4: improve error handling from ext4_dirhash()
ext4: improve error recovery code paths in __ext4_remount()
ext4: remove a BUG_ON in ext4_mb_release_group_pa()
f2fs: allocate the extent_cache by default
f2fs: apply zone capacity to all zone type
f2fs: compress: fix to call f2fs_wait_on_page_writeback() in f2fs_write_raw_pages()
f2fs: factor out victim_entry usage from general rb_tree use
f2fs: fix iostat lock protection
f2fs: fix null pointer panic in tracepoint in __replace_atomic_write_block
f2fs: fix potential corruption when moving a directory
f2fs: fix scheduling while atomic in decompression path
f2fs: fix to avoid use-after-free for cached IPU bio
f2fs: fix to check return value of f2fs_do_truncate_blocks()
f2fs: fix to check return value of inc_valid_block_count()
f2fs: fix to do sanity check on extent cache correctly
f2fs: fix uninitialized skipped_gc_rwsem
f2fs: handle dqget error in f2fs_transfer_project_quota()
f2fs: inode: fix to do sanity check on extent cache correctly
f2fs: move internal functions into extent_cache.c
f2fs: refactor extent_cache to support for read and more
f2fs: remove unnecessary __init_extent_tree
f2fs: specify extent cache for read explicitly
fbdev: mmp: Fix deferred clk handling in mmphw_probe()
firmware: arm_scmi: Fix xfers allocation on Rx channel
firmware: qcom_scm: Clear download bit during reboot
firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in probe
fpga: bridge: fix kernel-doc parameter description
fs: fix sysctls.c built
fs/ntfs3: Add check for kmemdup
fs/ntfs3: Fix memory leak if ntfs_read_mft failed
fs/ntfs3: Fix null-ptr-deref on inode->i_op in ntfs_lookup()
fs/ntfs3: Fix OOB read in indx_insert_into_buffer
fs/ntfs3: Fix slab-out-of-bounds read in hdr_delete_de()
fs/ntfs3: Refactoring of various minor issues
gpu: host1x: Fix memory leak of device names
gpu: host1x: Fix potential double free if IOMMU is disabled
HID: amd_sfh: Add support for shutdown operation
HID: amd_sfh: Correct the sensor enable and disable command
HID: amd_sfh: Correct the stop all command
HID: amd_sfh: Correct the structure fields
HID: amd_sfh: Fix illuminance value
HID: amd_sfh: Handle "no sensors" enabled for SFH1.1
HID: amd_sfh: Increase sensor command timeout for SFH1.1
HID: wacom: insert timestamp to packed Bluetooth (BT) events
HID: wacom: Set a default resolution for older tablets
hte: tegra-194: Fix off by one in tegra_hte_map_to_line_id()
hte: tegra: fix 'struct of_device_id' build error
hwmon: (adt7475) Use device_property APIs when configuring polarity
hwmon: (k10temp) Check range scale when CUR_TEMP register is read-write
hwmon: (pmbus/fsp-3y) Fix functionality bitmask in FSP-3Y YM-2151E
i2c: cadence: cdns_i2c_master_xfer(): Fix runtime PM leak on error path
i2c: omap: Fix standard mode false ACK readings
i2c: tegra: Fix PEC support for SMBUS block read
i2c: xiic: xiic_xfer(): Fix runtime PM leak on error path
i40e: Remove string printing for i40e_status
i40e: Remove unused i40e status codes
i40e: use int for i40e_status
ia64: fix an addr to taddr in huge_pte_offset()
ia64: mm/contig: fix section mismatch warning/error
ia64: salinfo: placate defined-but-not-used warning
IB/hfi1: Fix bugs with non-PAGE_SIZE-end multi-iovec user SDMA requests
IB/hfi1: Fix SDMA mmu_rb_node not being evicted in LRU order
IB/hifi1: add a null check of kzalloc_node in hfi1_ipoib_txreq_init
ice: block LAN in case of VF to VF offload
iio: adc: palmas_gpadc: fix NULL dereference on rmmod
iio: addac: stx104: Fix race condition for stx104_write_raw()
iio: addac: stx104: Fix race condition when converting analog-to-digital
iio: light: max44009: add missing OF device matching
IMA: allow/fix UML builds
inotify: Avoid reporting event with invalid wd
Input: raspberrypi-ts - fix refcount leak in rpi_ts_probe
interconnect: qcom: rpm: drop bogus pm domain attach
iommu/amd: Fix "Guest Virtual APIC Table Root Pointer" configuration in IRTE
iommu/amd: Set page size bitmap during V2 domain allocation
iommu/mediatek: Set dma_mask for PGTABLE_PA_35_EN
ionic: catch failure from devlink_alloc
ionic: remove noise from ethtool rxnfc error msg
io_uring/rsrc: use nospec'ed indexes
ipmi: ASPEED_BT_IPMI_BMC: select REGMAP_MMIO instead of depending on it
ipmi: fix SSIF not responding under certain cond.
ipmi:ssif: Add send_retries increment
ipv4: Fix potential uninit variable access bug in __ip_make_skb()
irqchip/loongarch: Adjust acpi_cascade_irqdomain_init() and sub-routines
irqchip/loongson-eiointc: Fix incorrect use of acpi_get_vec_parent
irqchip/loongson-eiointc: Fix registration of syscore_ops
irqchip/loongson-eiointc: Fix returned value on parsing MADT
irqchip/loongson-pch-pic: Fix pch_pic_acpi_init calling
ixgbe: Allow flow hash to be set via ethtool
ixgbe: Enable setting RSS table to default values
ixgbe: Fix panic during XDP_TX with > 64 CPUs
jdb2: Don't refuse invalidation of already invalidated buffers
kasan: hw_tags: avoid invalid virt_to_page()
kcsan: Avoid READ_ONCE() in read_instrumented_memory()
kheaders: Use array declaration instead of char
ksmbd: block asynchronous requests when making a delay on session setup
ksmbd: call rcu_barrier() in ksmbd_server_exit()
ksmbd: destroy expired sessions
ksmbd: fix deadlock in ksmbd_find_crypto_ctx()
ksmbd: fix memleak in session setup
ksmbd: fix NULL pointer dereference in smb2_get_info_filesystem()
ksmbd: fix racy issue from session setup and logoff
ksmbd: fix racy issue from smb2 close and logoff with multichannel
ksmbd: fix racy issue under cocurrent smb2 tree disconnect
ksmbd: Implements sess->ksmbd_chann_list as xarray
ksmbd: not allow guest user on multichannel
kunit: fix bug in the order of lines in debugfs logs
kunit: improve KTAP compliance of KUnit test output
KVM: arm64: Avoid lock inversion when setting the VM register width
KVM: arm64: Avoid vcpu->mutex v. kvm->lock inversion in CPU_ON
KVM: arm64: Use config_lock to protect data ordered against KVM_RUN
KVM: arm64: Use config_lock to protect vgic state
KVM: arm64: vgic: Don't acquire its_lock before config_lock
KVM: nVMX: Emulate NOPs in L2, and PAUSE if it's not intercepted
KVM: RISC-V: Retry fault if vma_lookup() results become invalid
KVM: s390: fix race in gmap_make_secure()
KVM: VMX: Make CR0.WP a guest owned bit
KVM: x86: Do not unload MMU roots when only toggling CR0.WP with TDP enabled
KVM: x86: Make use of kvm_read_cr*_bits() when testing bits
KVM: x86/mmu: Avoid indirect call for get_cr3
KVM: x86/mmu: Refresh CR0.WP prior to checking for emulated permission faults
KVM: x86/pmu: Disallow legacy LBRs if architectural LBRs are available
KVM: x86: Track supported PERF_CAPABILITIES in kvm_caps
leds: tca6507: Fix error handling of using fwnode_property_read_string
leds: TI_LMU_COMMON: select REGMAP instead of depending on it
libbpf: Fix ld_imm64 copy logic for ksym in light skeleton.
linux/vt_buffer.h: allow either builtin or modular for macros
locking/rwsem: Add __always_inline annotation to __down_read_common() and inlined callers
macintosh: via-pmu-led: requires ATA to be set
macintosh/windfarm_smu_sat: Add missing of_node_put()
mailbox: mpfs: switch to txdone_poll
mailbox: zynqmp: Fix counts of child nodes
mailbox: zynqmp: Fix IPI isr handling
mailbox: zynqmp: Fix typo in IPI documentation
mailbox: zynq: Switch to flexible array to simplify code
md/raid10: don't call bio_start_io_acct twice for bio which experienced read error
md/raid10: fix leak of 'r10bio->remaining' for recovery
md/raid10: fix memleak for 'conf->bio_split'
md/raid10: fix memleak of md thread
md/raid10: fix null-ptr-deref in raid10_sync_request
md/raid10: fix task hung in raid10d
md/raid5: Improve performance for sequential IO
media: amphion: decoder implement display delay enable
media: av7110: prevent underflow in write_ts_to_decoder()
media: bdisp: Add missing check for create_workqueue
media: cedrus: fix use after free bug in cedrus_remove due to race condition
media: dm1105: Fix use after free bug in dm1105_remove due to race condition
media: hi846: Fix memleak in hi846_init_controls()
media: max9286: Free control handler
media: mediatek: vcodec: add core decode done event
media: mediatek: vcodec: add params to record lat and core lat_buf count
media: mediatek: vcodec: add remove function for decoder platform driver
media: mediatek: vcodec: change lat thread decode error condition
media: mediatek: vcodec: fix decoder disable pm crash
media: mediatek: vcodec: Force capture queue format to MM21
media: mediatek: vcodec: Make MM21 the default capture format
media: mediatek: vcodec: making sure queue_work successfully
media: mediatek: vcodec: move lat_buf to the top of core list
media: mediatek: vcodec: remove unused lat_buf
media: mediatek: vcodec: Use 4K frame size when supported by stateful decoder
media: mediatek: vcodec: using each instance lat_buf count replace core ready list
media: ov8856: Do not check for for module version
media: platform: mtk-mdp3: Add missing check and free for ida_alloc
media: platform: mtk-mdp3: fix potential frame size overflow in mdp_try_fmt_mplane()
media: rcar_fdp1: Fix refcount leak in probe and remove function
media: rc: gpio-ir-recv: Fix support for wake-up
media: rkvdec: fix use after free bug in rkvdec_remove
media: saa7134: fix use after free bug in saa7134_finidev due to race condition
media: v4l: async: Return async sub-devices to subnotifier list
media: venus: dec: Fix capture formats enumeration order
media: venus: dec: Fix handling of the start cmd
mfd: arizona-spi: Add missing MODULE_DEVICE_TABLE
mfd: ocelot-spi: Fix unsupported bulk read
mfd: tqmx86: Correct board names for TQMxE39x
mfd: tqmx86: Do not access I2C_DETECT register through io_base
mfd: tqmx86: Specify IO port register range more precisely
MIPS: fw: Allow firmware to pass a empty env
mmc: sdhci-of-esdhc: fix quirk to ignore command inhibit for data
mm: do not reclaim private data from pinned page
mm/mempolicy: correctly update prev when policy is equal on mbind
mt76: mt7921: fix kernel panic by accessing unallocated eeprom.data
mtd: core: fix error path for nvmem provider
mtd: core: fix nvmem error reporting
mtd: core: provide unique name for nvmem device, take two
mtd: spi-nor: Add a RWW flag
mtd: spi-nor: add SFDP fixups for Quad Page Program
mtd: spi-nor: core: Update flash's current address mode when changing address mode
mtd: spi-nor: spansion: Enable JFFS2 write buffer for Infineon s25hx SEMPER flash
mtd: spi-nor: spansion: Enable JFFS2 write buffer for Infineon s28hx SEMPER flash
mtd: spi-nor: spansion: Remove NO_SFDP_FLAGS from s28hs512t info
net: amd: Fix link leak when verifying config failed
net: dpaa: Fix uninitialized variable in dpaa_stop()
net: dsa: mt7530: fix corrupt frames using trgmii on 40 MHz XTAL MT7621
net: dsa: mt7530: fix network connectivity with multiple CPU ports
net: dsa: mt7530: split-off common parts from mt7531_setup
net: dsa: mv88e6xxx: add mv88e6321 rsvd2cpu
net: dsa: qca8k: remove assignment of an_enabled in pcs_get_state()
net: enetc: check the index of the SFI rather than the handle
net: ethernet: stmmac: dwmac-rk: fix optional phy regulator handling
net: ethernet: stmmac: dwmac-rk: rework optional clock handling
netfilter: conntrack: fix wrong ct->timeout value
netfilter: conntrack: restore IPS_CONFIRMED out of nf_conntrack_hash_check_insert()
netfilter: keep conntrack reference until IPsecv6 policy checks are done
netfilter: nf_tables: deactivate anonymous set from preparation phase
netfilter: nf_tables: don't write table validation state without mutex
net: ipv6: fix skb hash for some RST packets
netlink: Use copy_to_user() for optval in netlink_getsockopt().
net/mlx5e: Don't clone flow post action attributes second time
net/mlx5e: Fix error flow in representor failing to add vport rx rule
net/mlx5e: Nullify table pointer when failing to create
net/mlx5: E-switch, Create per vport table based on devlink encap mode
net/mlx5: E-switch, Don't destroy indirect table in split rule
net/mlx5: Remove "recovery" arg from mlx5_load_one() function
net/mlx5: Suspend auxiliary devices only in case of PCI device suspend
net/mlx5: Use recovery timeout on sync reset flow
net/ncsi: clear Tx enable mode when handling a Config required AEN
net/packet: annotate accesses to po->xmit
net/packet: convert po->auxdata to an atomic flag
net/packet: convert po->origdev to an atomic flag
net: pcs: xpcs: remove double-read of link state when using AN
net: qrtr: correct types of trace event parameters
net/sched: act_mirred: Add carrier check
net/sched: cls_api: remove block_cb from driver_list before freeing
net/sched: sch_fq: fix integer overflow of "credit"
net: sfp: add quirk enabling 2500Base-x for HG MXPD-483II
net: stmmac:fix system hang when setting up tag_8021q VLAN for DSA ports
net: sunhme: Fix uninitialized return code
net: wwan: t7xx: do not compile with -Werror
NFSv4.1: Always send a RECLAIM_COMPLETE after establishing lease
nilfs2: do not write dirty data after degenerating to read-only
nilfs2: fix infinite loop in nilfs_mdt_get_block()
nvme-fcloop: fix "inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage"
nvme: fix async event trace event
nvmet: fix error handling in nvmet_execute_identify_cns_cs_ns()
nvmet: fix Identify Active Namespace ID list handling
nvmet: fix Identify Controller handling
nvmet: fix Identify Namespace handling
nvmet: fix I/O Command Set specific Identify Controller
octeontx2-af: Allow mkex profile without DMAC and add L2M/L2B header extraction support
octeontx2-af: Fix depth of cam and mem table.
octeontx2-af: Fix issues with NPC field hash extract
octeontx2-af: Fix start and end bit for scan config
octeontx2-af: mcs: Config parser to skip 8B header
octeontx2-af: mcs: Fix MCS block interrupt
octeontx2-af: mcs: Write TCAM_DATA and TCAM_MASK registers at once
octeontx2-af: Secure APR table update with the lock
octeontx2-af: Skip PFs if not enabled
octeontx2-af: Update/Fix NPC field hash extract feature
octeontx2-pf: Add additional checks while configuring ucast/bcast/mcast rules
octeontx2-pf: Disable packet I/O for graceful exit
octeontx2-pf: Increase the size of dmac filter flows
octeontx2-pf: mcs: Clear stats before freeing resource
octeontx2-pf: mcs: Do not reset PN while updating secy
octeontx2-pf: mcs: Fix NULL pointer dereferences
octeontx2-pf: mcs: Fix shared counters logic
octeontx2-pf: mcs: Match macsec ethertype along with DMAC
octeontx2-vf: Detach LF resources on probe cleanup
octeonxt2-af: mcs: Fix per port bypass config
of: Fix modalias string generation
openrisc: Properly store r31 to pt_regs on unhandled exceptions
parisc: Ensure page alignment in flush functions
parisc: Fix argument pointer in real64_call_asm()
PCI/EDR: Clear Device Status after EDR error recovery
PCI: imx6: Install the fault handler only on compatible match
PCI: kirin: Select REGMAP_MMIO
PCI: pciehp: Fix AB-BA deadlock between reset_lock and device_lock
PCI/PM: Extend D3hot delay for NVIDIA HDA controllers
PCI: qcom: Fix the incorrect register usage in v2.7.0 config
perf/arm-cmn: Fix port detection for CMN-700
perf/arm-cmn: Move overlapping wp_combine field
perf auxtrace: Fix address filter entire kernel size
perf/core: Fix hardlockup failure caused by perf throttle
perf cs-etm: Fix timeless decode mode detection
perf ftrace: Make system wide the default target for latency subcommand
perf intel-pt: Fix CYC timestamps after standalone CBR
perf map: Delete two variable initialisations before null pointer checks in sort__sym_from_cmp()
perf pmu: zfree() expects a pointer to a pointer to zero it after freeing its contents
perf record: Fix "read LOST count failed" msg with sample read
perf scripts intel-pt-events.py: Fix IPC output for Python 2
perf stat: Separate bperf from bpf_profiler
perf symbols: Fix return incorrect build_id size in elf_read_build_id()
perf tests record_offcpu.sh: Fix redirection of stderr to stdin
perf tracepoint: Fix memory leak in is_valid_tracepoint()
perf vendor events power9: Remove UTF-8 characters from JSON files
perf vendor events s390: Remove UTF-8 characters from JSON file
perf/x86/core: Zero @lbr instead of returning -1 in x86_perf_get_lbr() stub
phy: qcom-qmp-pcie: sc8180x PCIe PHY has 2 lanes
phy: tegra: xusb: Add missing tegra_xusb_port_unregister for usb2_port and ulpi_port
phy: ti: j721e-wiz: Fix unreachable code in wiz_mode_select()
pinctrl-bcm2835.c: fix race condition when setting gpio dir
pinctrl: qcom: lpass-lpi: set output value before enabling output
pinctrl: ralink: reintroduce ralink,rt2880-pinmux compatible string
pinctrl: renesas: r8a779a0: Remove incorrect AVB[01] pinmux configuration
pinctrl: renesas: r8a779f0: Fix tsn1_avtp_pps pin group
pinctrl: renesas: r8a779g0: Fix ERROROUTC function names
pinctrl: renesas: r8a779g0: Fix Group 4/5 pin functions
pinctrl: renesas: r8a779g0: Fix Group 6/7 pin functions
platform/chrome: cros_typec_switch: Add missing fwnode_handle_put()
platform/x86/amd: pmc: Don't dump data after resume from s0i3 on picasso
platform/x86/amd: pmc: Don't try to read SMU version on Picasso
platform/x86/amd: pmc: Hide SMU version and program attributes for Picasso
platform/x86/amd: pmc: Move idlemask check into `amd_pmc_idlemask_read`
platform/x86/amd: pmc: Move out of BIOS SMN pair for STB init
platform/x86/amd: pmc: Utilize SMN index 0 for driver probe
platform/x86/amd/pmf: Move out of BIOS SMN pair for driver probe
platform/x86/intel-uncore-freq: Return error on write frequency
platform/x86: thinkpad_acpi: Add missing T14s Gen1 type to s2idle quirk list
platform/x86: thinkpad_acpi: Add profile force ability
platform/x86: thinkpad_acpi: Fix platform profiles on T490
platform/x86: touchscreen_dmi: Add info for the Dexp Ursus KX210i
platform/x86: touchscreen_dmi: Add upside-down quirk for GDIX1002 ts on the Juno Tablet
PM: hibernate: Do not get block device exclusively in test_resume mode
PM: hibernate: Turn snapshot_test into global variable
posix-cpu-timers: Implement the missing timer_wait_running callback
powerpc/boot: Fix boot wrapper code generation with CONFIG_POWER10_CPU
powerpc/mpc512x: fix resource printk format warning
powerpc/perf: Properly detect mpc7450 family
powerpc/rtas: use memmove for potentially overlapping buffer copy
powerpc/sysdev/tsi108: fix resource printk format warnings
powerpc/wii: fix resource printk format warnings
power: supply: generic-adc-battery: fix unit scaling
power: supply: rk817: Fix low SOC bugs
proc_sysctl: enhance documentation
proc_sysctl: update docs for __register_sysctl_table()
pstore: Revert pmsg_lock back to a normal mutex
pwm: meson: Fix axg ao mux parents
pwm: meson: Fix g12a ao clk81 name
pwm: mtk-disp: Configure double buffering before reading in .get_state()
pwm: mtk-disp: Disable shadow registers before setting backlight values
qcom: llcc/edac: Support polling mode for ECC handling
r8152: fix flow control issue of RTL8156A
r8152: fix the poor throughput for 2.5G devices
r8152: move setting r8153b_rx_agg_chg_indicate()
rcu: Avoid stack overflow due to __rcu_irq_enter_check_tick() being kprobe-ed
rcu: Fix missing TICK_DEP_MASK_RCU_EXP dependency check
RDMA/cm: Trace icm_send_rej event before the cm state is reset
RDMA/erdma: Use fixed hardware page size
RDMA/mlx4: Prevent shift wrapping in set_user_sq_size()
RDMA/mlx5: Check pcie_relaxed_ordering_enabled() in UMR
RDMA/mlx5: Fix flow counter query via DEVX
RDMA/mlx5: Use correct device num_ports when modify DC
RDMA/rdmavt: Delete unnecessary NULL check
RDMA/siw: Fix potential page_array out of range access
RDMA/siw: Remove namespace check from siw_netdev_event()
RDMA/srpt: Add a check for valid 'mad_agent' pointer
regulator: core: Avoid lockdep reports when resolving supplies
regulator: core: Consistently set mutex_owner when using ww_mutex_lock_slow()
regulator: core: Shorten off-on-delay-us for always-on/boot-on by time since booted
regulator: stm32-pwr: fix of_iomap leak
reiserfs: Add security prefix to xattr name in reiserfs_security_write()
relayfs: fix out-of-bounds access in relay_file_read
remoteproc: imx_dsp_rproc: Call of_node_put() on iteration error
remoteproc: imx_rproc: Call of_node_put() on iteration error
remoteproc: rcar_rproc: Call of_node_put() on iteration error
remoteproc: st: Call of_node_put() on iteration error
remoteproc: stm32: Call of_node_put() on iteration error
Revert "Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work"
Revert "net/mlx5: Remove "recovery" arg from mlx5_load_one() function"
Revert "objtool: Support addition to set CFA base"
Revert "ubifs: dirty_cow_znode: Fix memleak in error handling path"
ring-buffer: Ensure proper resetting of atomic variables in ring_buffer_reset_online_cpus
ring-buffer: Sync IRQ works before buffer destruction
RISC-V: Align SBI probe implementation with spec
riscv: compat_syscall_table: Fixup compile warning
riscv: Fix ptdump when KASAN is enabled
RISC-V: fix taking the text_mutex twice during sifive errata patching
RISC-V: mm: Enable huge page support to kernel_page_present() function
riscv: mm: remove redundant parameter of create_fdt_early_page_table
RISC-V: take text_mutex during alternative patching
rpmsg: glink: Propagate TX failures in intentless mode as well
rtc: k3: handle errors while enabling wake irq
rtc: meson-vrtc: Use ktime_get_real_ts64() to get the current time
rtc: omap: include header for omap_rtc_power_off_program prototype
rxrpc: Fix hard call timeout units
s390/dasd: fix hanging blockdevice after request requeue
sched/fair: Fix inaccurate tally of ttwu_move_affine
sched/rt: Fix bad task migration for rt tasks
scm: fix MSG_CTRUNC setting condition for SO_PASSSEC
scripts/gdb: bail early if there are no clocks
scripts/gdb: bail early if there are no generic PD
scripts/gdb: fix lx-timerlist for Python3
scripts/gdb: raise error with reduced debugging information
scsi: hisi_sas: Handle NCQ error when IPTT is valid
scsi: libsas: Add sas_ata_device_link_abort()
scsi: libsas: Grab the ATA port lock in sas_ata_device_link_abort()
scsi: lpfc: Fix ioremap issues in lpfc_sli4_pci_mem_setup()
scsi: megaraid: Fix mega_cmd_done() CMDID_INT_CMDS
scsi: mpi3mr: Handle soft reset in progress fault code (0xF002)
scsi: qedi: Fix use after free bug in qedi_remove()
scsi: target: core: Change the way target_xcopy_do_work() sets restiction on max I/O
scsi: target: Fix multiple LUN_RESET handling
scsi: target: iscsit: Fix TAS handling during conn cleanup
scsi: target: iscsit: isert: Alloc per conn cmd counter
scsi: target: iscsit: Stop/wait on cmds during conn close
scsi: target: Move cmd counter allocation
scsi: target: Move sess cmd counter to new struct
scsi: target: Pass in cmd counter to use during cmd setup
selftests/bpf: Fix a fd leak in an error path in network_helpers.c
selftests/bpf: Fix leaked bpf_link in get_stackid_cannot_attach
selftests/bpf: Use read_perf_max_sample_freq() in perf_event_stackmap
selftests/bpf: Wait for receive in cg_storage_multi test
selftests mount: Fix mount_setattr_test builds failed
selftests: netfilter: fix libmnl pkg-config usage
selftests/powerpc/pmu: Fix sample field check in the mmcra_thresh_marked_sample_test
selftests/resctrl: Allow ->setup() to return errors
selftests/resctrl: Check for return value after write_schemata()
selftests/resctrl: Move ->setup() call outside of test specific branches
selftests/resctrl: Return NULL if malloc_and_init_memory() did not alloc mem
selftests: srv6: make srv6_end_dt46_l3vpn_test more robust
selftests: xsk: Deflakify STATS_RX_DROPPED test
selftests: xsk: Disable IPv6 on VETH1
selftests: xsk: Use correct UMEM size in testapp_invalid_desc
selinux: ensure av_permissions.h is built when needed
selinux: fix Makefile dependencies of flask.h
serial: 8250: Add missing wakeup event reporting
serial: 8250_bcm7271: Fix arbitration handling
serial: 8250: Fix serial8250_tx_empty() race with DMA Tx
serial: fix TIOCSRS485 locking
serial: max310x: fix IO data corruption in batched operations
serial: stm32: Re-assert RTS/DE GPIO in RS485 mode only if more data are transmitted
sfc: Fix module EEPROM reporting for QSFP modules
sfc (gcc13): synchronize ef100_enqueue_skb()'s return type
sh: init: use OF_EARLY_FLATTREE for early init
sh: math-emu: fix macro redefined warning
sh: mcount.S: fix build error when PRINTK is not enabled
sh: nmi_debug: fix return value of __setup handler
sh: sq: Fix incorrect element size for allocating bitmap buffer
sit: update dev->needed_headroom in ipip6_tunnel_bind_dev()
SMB3: Add missing locks to protect deferred close file list
SMB3: Close deferred file handles in case of handle lease break
smb3: fix problem remounting a share after shutdown
SMB3: force unmount was failing to close deferred close files
soc: bcm: brcmstb: biuctrl: fix of_iomap leak
soc: qcom: llcc: Do not create EDAC platform device on SDM845
soc: renesas: renesas-soc: Release 'chipid' from ioremap()
soc: ti: pm33xx: Fix refcount leak in am33xx_pm_probe
soundwire: cadence: rename sdw_cdns_dai_dma_data as sdw_cdns_dai_runtime
soundwire: intel: don't save hw_params for use in prepare
soundwire: qcom: correct setting ignore bit on v1.5.1
spi: atmel-quadspi: Don't leak clk enable count in pm resume
spi: atmel-quadspi: Free resources even if runtime resume failed in .remove()
spi: cadence-quadspi: fix suspend-resume implementations
spi: cadence-quadspi: use macro DEFINE_SIMPLE_DEV_PM_OPS
spi: fsl-cpm: Use 16 bit mode for large transfers with even size
spi: fsl-spi: Fix CPM/QE mode Litte Endian
spi: fsl-spi: Re-organise transfer bits_per_word adaptation
spi: imx: Don't skip cleanup in remove's error path
spi: qup: Don't skip cleanup in remove's error path
spmi: Add a check for remove callback when removing a SPMI driver
staging: iio: resolver: ads1210: fix config mode
staging: rtl8192e: Fix W_DISABLE# does not work after stop/start
SUNRPC: remove the maximum number of retries in call_bind_status
swiotlb: fix debugfs reporting of reserved memory pools
swiotlb: relocate PageHighMem test away from rmem_swiotlb_setup
swsmu/amdgpu_smu: Fix the wrong if-condition
sysctl: clarify register_sysctl_init() base directory order
tcp: fix skb_copy_ubufs() vs BIG TCP
tcp/udp: Fix memleaks of sk and zerocopy skbs with TX timestamp.
thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe
thunderbolt: Use correct type in tb_port_is_clx_enabled() prototype
tick/common: Align tick period with the HZ tick.
tick/nohz: Fix cpu_is_hotpluggable() by checking with nohz subsystem
timekeeping: Fix references to nonexistent ktime_get_fast_ns()
tools: bpftool: Remove invalid \' json escape
tools/x86/kcpuid: Fix avx512bw and avx512lvl fields in Fn00000007
tpm: Add !tpm_amd_is_rng_defective() to the hwrng_unregister() call site
tpm, tpm: Implement usage counter for locality
tpm, tpm_tis: Claim locality before writing interrupt registers
tpm, tpm_tis: Claim locality before writing TPM_INT_ENABLE register
tpm, tpm_tis: Claim locality when interrupts are reenabled on resume
tpm, tpm_tis: Disable interrupts if tpm_tis_probe_irq() failed
tpm, tpm_tis: Do not skip reset of original interrupt vector
tracing: Error if a trace event has an array for a __field()
tracing: Fix permissions for the buffer_percent file
tracing/user_events: Ensure write index cannot be negative
tty: Prevent writing chars during tcsetattr TCSADRAIN/FLUSH
tty: serial: fsl_lpuart: adjust buffer length to the intended size
uapi/linux/const.h: prefer ISO-friendly __typeof__
ubi: Fix return value overwrite issue in try_write_vid_and_data()
ubifs: Fix memleak when insert_old_idx() failed
ubifs: Fix memory leak in do_rename
ubifs: Free memory for tmpfile name
usb: chipidea: fix missing goto in `ci_hdrc_probe`
USB: dwc3: fix runtime pm imbalance on probe errors
USB: dwc3: fix runtime pm imbalance on unbind
usb: dwc3: gadget: Change condition for processing suspend event
USB: dwc3: gadget: drop dead hibernation code
usb: dwc3: gadget: Execute gadget stop after halting the controller
usb: dwc3: gadget: Stall and restart EP0 if host is unresponsive
usb: gadget: tegra-xudc: Fix crash in vbus_draw
usb: gadget: udc: core: Invoke usb_gadget_connect only when started
usb: gadget: udc: core: Prevent redundant calls to pullup
usb: gadget: udc: renesas_usb3: Fix use after free bug in renesas_usb3_remove due to race condition
usb: host: xhci-rcar: remove leftover quirk handling
usb: mtu3: fix kernel panic at qmu transfer done irq handler
vhost_vdpa: fix unmap process in no-batch mode
virt/coco/sev-guest: Double-buffer messages
virtio_net: suppress cpu stall when free_unused_bufs
virtio_ring: don't update event idx on get_buf
vlan: partially enable SIOCSHWTSTAMP in container
vmci_host: fix a race condition in vmci_host_poll() causing GPF
watchdog: dw_wdt: Fix the error handling path of dw_wdt_drv_probe()
wifi: ath11k: fix deinitialization of firmware resources
wifi: ath11k: fix SAC bug on peer addition with sta band migration
wifi: ath11k: fix writing to unintended memory region
wifi: ath11k: reduce the MHI timeout to 20s
wifi: ath11k: synchronize ath11k_mac_he_gi_to_nl80211_he_gi()'s return type
wifi: ath11k: Use platform_get_irq() to get the interrupt
wifi: ath5k: fix an off by one check in ath5k_eeprom_read_freq_list()
wifi: ath5k: Use platform_get_irq() to get the interrupt
wifi: ath6kl: minor fix for allocation size
wifi: ath6kl: reduce WARN to dev_dbg() in callback
wifi: ath9k: hif_usb: fix memory leak of remain_skbs
wifi: brcmfmac: support CQM RSSI notification with older firmware
wifi: iwlwifi: debug: fix crash in __iwl_err()
wifi: iwlwifi: fix duplicate entry in iwl_dev_info_table
wifi: iwlwifi: fw: fix memory leak in debugfs
wifi: iwlwifi: fw: move memset before early return
wifi: iwlwifi: make the loop for card preparation effective
wifi: iwlwifi: mvm: check firmware response size
wifi: iwlwifi: mvm: don't drop unencrypted MCAST frames
wifi: iwlwifi: mvm: don't set CHECKSUM_COMPLETE for unsupported protocols
wifi: iwlwifi: mvm: initialize seq variable
wifi: iwlwifi: trans: don't trigger d3 interrupt twice
wifi: iwlwifi: yoyo: Fix possible division by zero
wifi: iwlwifi: yoyo: skip dump correctly on hw error
wifi: mt76: add flexible polling wait-interval support
wifi: mt76: add missing locking to protect against concurrent rx/status calls
wifi: mt76: connac: fix txd multicast rate setting
wifi: mt76: fix 6GHz high channel not be scanned
wifi: mt76: handle failure of vzalloc in mt7615_coredump_work
wifi: mt76: mt7915: expose device tree match table
wifi: mt76: mt7921e: fix probe timeout after reboot
wifi: mt76: mt7921e: improve reliability of dma reset
wifi: mt76: mt7921e: Set memory space enable in PCI_COMMAND if unset
wifi: mt76: mt7921e: stop chip reset worker in unregister hook
wifi: mt76: mt7921: fix missing unwind goto in `mt7921u_probe`
wifi: rt2x00: Fix memory leak when handling surveys
wifi: rtl8xxxu: RTL8192EU always needs full init
wifi: rtlwifi: fix incorrect error codes in rtl_debugfs_set_write_reg()
wifi: rtlwifi: fix incorrect error codes in rtl_debugfs_set_write_rfreg()
wifi: rtw88: mac: Return the original error from rtw_mac_power_switch()
wifi: rtw88: mac: Return the original error from rtw_pwr_seq_parser()
wifi: rtw88: rtw8821c: Fix rfe_option field width
wifi: rtw89: fix potential race condition between napi_init and napi_enable
wireguard: timers: cast enum limits members to int in prints
workqueue: Fix hung time report of worker pools
writeback: fix call of incorrect macro
x86/amd_nb: Add PCI ID for family 19h model 78h
x86/apic: Fix atomic update of offset in reserve_eilvt_offset()
x86/cpu: Add model number for Intel Arrow Lake processor
x86: fix clear_user_rep_good() exception handling annotation
x86/hyperv: Block root partition functionality in a Confidential VM
x86/ioapic: Don't return 0 from arch_dynirq_lower_bound()
x86/MCE/AMD: Use an u64 for bank_map
x86/retbleed: Fix return thunk alignment
xfs: don't consider future format versions valid
xhci: fix debugfs register accesses while suspended
xsk: Fix unaligned descriptor validation
Updated by kernel-updater-bot (https://abf.io/mikhailnov/kernel-updater-bot)
2023-05-17 23:10:02 +03:00
|
|
|
%define rpmrel 1
|
2022-08-21 16:12:54 +03:00
|
|
|
%define fullrpmrel %{rpmrel}
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-08-21 16:12:54 +03:00
|
|
|
%define rpmtag %{disttag}
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Version defines
|
2022-08-21 16:12:54 +03:00
|
|
|
%define kversion %{kernelversion}.%{patchlevel}.%{sublevel}
|
|
|
|
%define kverrel %{kversion}-%{fullrpmrel}
|
2022-12-14 02:55:50 +00:00
|
|
|
%define tar_ver %{kernelversion}.%{patchlevel}
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2015-03-16 18:42:29 +03:00
|
|
|
%ifarch %{ix86}
|
2022-03-30 09:04:46 +03:00
|
|
|
%define arch_suffix i686
|
2020-11-26 21:09:27 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%ifarch %{x86_64}
|
2022-03-09 19:02:02 +01:00
|
|
|
%define arch_suffix x86_64
|
2015-03-16 18:42:29 +03:00
|
|
|
%endif
|
|
|
|
|
2020-11-26 21:09:27 +00:00
|
|
|
%ifarch aarch64
|
2022-03-09 19:02:02 +01:00
|
|
|
%define arch_suffix arm64
|
2020-11-26 21:09:27 +00:00
|
|
|
%endif
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
%define buildrpmrel %{fullrpmrel}%{rpmtag}-%{arch_suffix}
|
|
|
|
%define buildrel %{kversion}-%{buildrpmrel}
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2020-12-30 19:47:16 +03:00
|
|
|
# Add not only the build time generated key to the trusted keyring,
|
|
|
|
# but also add public keys of private ROSA's keys
|
2022-03-09 19:02:02 +01:00
|
|
|
%bcond_without additional_keys
|
2020-12-30 19:47:16 +03:00
|
|
|
|
2021-05-22 12:08:22 +03:00
|
|
|
# Fail the build after "make oldconfig" to edit kernel configs
|
2022-03-09 19:02:02 +01:00
|
|
|
%bcond_with fail
|
2021-05-22 12:08:22 +03:00
|
|
|
|
2020-03-13 20:35:12 +03:00
|
|
|
# User Mode Linux, https://habr.com/ru/company/itsumma/blog/459558/
|
2022-07-11 15:56:35 +03:00
|
|
|
# Not buildable on aarch64, rarely needed in general
|
2022-03-09 19:02:02 +01:00
|
|
|
%bcond_with uml
|
2019-11-17 16:56:39 +03:00
|
|
|
|
2020-03-18 22:20:03 +03:00
|
|
|
# "Nickel" is a special brand for certified distros
|
2022-03-17 10:23:10 +03:00
|
|
|
%if %{mdvver} == 201905
|
2022-03-09 19:02:02 +01:00
|
|
|
%bcond_without nickel
|
2020-11-27 01:34:07 +03:00
|
|
|
# Require kernel modules to be signed
|
2022-03-09 19:02:02 +01:00
|
|
|
%bcond_without oblig_signed_modules
|
2020-03-18 22:20:03 +03:00
|
|
|
%else
|
|
|
|
%bcond_with nickel
|
2020-08-06 14:44:29 +03:00
|
|
|
%bcond_with oblig_signed_modules
|
2020-03-18 22:20:03 +03:00
|
|
|
%endif
|
|
|
|
|
2020-11-27 01:34:07 +03:00
|
|
|
# Build binary out-of-tree kernel modules (experimental)
|
2023-03-13 19:15:19 +03:00
|
|
|
%bcond_without binary_extra_modules
|
2020-11-27 01:34:07 +03:00
|
|
|
# Sign kernel modules with GOST key (experimental)
|
|
|
|
%bcond_without gost_sign
|
2020-07-29 10:59:41 +03:00
|
|
|
|
2020-07-27 16:53:12 +03:00
|
|
|
%bcond_with ccache
|
2022-03-15 17:03:05 +03:00
|
|
|
%bcond_without flow_abi
|
2023-03-13 22:55:31 +03:00
|
|
|
%bcond_without aufs
|
2020-07-27 16:53:12 +03:00
|
|
|
|
Update from 5.4 to 5.10.1
- rediffed most of patches, renamed files to easify further rediffs by git format-patch
- thanks to abf.io/kernels_stable for some patches for kernel 5.9
- using unofficial patch for AUFS for kernel 5.10, there may be issues with stability, try to avoid using AUFS (I would have dropped it, but MagOS wants it very much)
- pulled updates of AltHa from http://git.altlinux.org/gears/k/kernel-image-un-def.git?p=kernel-image-un-def.git;a=history;f=security/altha;hb=HEAD
- dropped patch adding sysctl to disable disk-based swap because it has not found any usage
- bpf is now in the list of LSM modules (ability to write LSM modules as BPF programs), enable it, it is potentially useful and does not seem to be harmful
- keeping kernel libc headers in older kernels for now
- dropped building external virtualbox guest modules because they are now included into the mainline kernel
- offed building VirtualBox host modules, I do not know how to keep these binary modules in sync with userspace part of VirtualBox, users can continue using dkms
- offed building kernel-shredder because it is not buildable on kernel 5.10
- updated rtl8821ce and added a dependency from its "blacklist" subpackage here (see https://github.com/tomaspinho/rtl8821ce/commit/14b536f0)
It is not clear if kernel 5.10 will receive an LTS support longer than 5.4 or not. Support until Dec, 2022 is declared right now at https://www.kernel.org/category/releases.html for 5.10 and until Dec, 2025 - for 5.4.
TODO: update kernel configs
TODO: solve problems with version of virtualbox host modules not matching version of the virtualbox package after virtualbox is updated but kernel is not rebuilt
2020-12-20 18:49:24 +03:00
|
|
|
# 1. VirtualBox is for x86_32 and x86_64 only
|
|
|
|
# 2. I do not know how to solve the problem that userspace part of VirtualBox
|
2022-03-15 17:03:05 +03:00
|
|
|
# will be updated ahead of these binary modules. So just off building them.
|
Update from 5.4 to 5.10.1
- rediffed most of patches, renamed files to easify further rediffs by git format-patch
- thanks to abf.io/kernels_stable for some patches for kernel 5.9
- using unofficial patch for AUFS for kernel 5.10, there may be issues with stability, try to avoid using AUFS (I would have dropped it, but MagOS wants it very much)
- pulled updates of AltHa from http://git.altlinux.org/gears/k/kernel-image-un-def.git?p=kernel-image-un-def.git;a=history;f=security/altha;hb=HEAD
- dropped patch adding sysctl to disable disk-based swap because it has not found any usage
- bpf is now in the list of LSM modules (ability to write LSM modules as BPF programs), enable it, it is potentially useful and does not seem to be harmful
- keeping kernel libc headers in older kernels for now
- dropped building external virtualbox guest modules because they are now included into the mainline kernel
- offed building VirtualBox host modules, I do not know how to keep these binary modules in sync with userspace part of VirtualBox, users can continue using dkms
- offed building kernel-shredder because it is not buildable on kernel 5.10
- updated rtl8821ce and added a dependency from its "blacklist" subpackage here (see https://github.com/tomaspinho/rtl8821ce/commit/14b536f0)
It is not clear if kernel 5.10 will receive an LTS support longer than 5.4 or not. Support until Dec, 2022 is declared right now at https://www.kernel.org/category/releases.html for 5.10 and until Dec, 2025 - for 5.4.
TODO: update kernel configs
TODO: solve problems with version of virtualbox host modules not matching version of the virtualbox package after virtualbox is updated but kernel is not rebuilt
2020-12-20 18:49:24 +03:00
|
|
|
%bcond_with binary_virtualbox_host
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Shredder-kernel works only on x86_64, makes manipulations with syscalls tables,
|
Update from 5.4 to 5.10.1
- rediffed most of patches, renamed files to easify further rediffs by git format-patch
- thanks to abf.io/kernels_stable for some patches for kernel 5.9
- using unofficial patch for AUFS for kernel 5.10, there may be issues with stability, try to avoid using AUFS (I would have dropped it, but MagOS wants it very much)
- pulled updates of AltHa from http://git.altlinux.org/gears/k/kernel-image-un-def.git?p=kernel-image-un-def.git;a=history;f=security/altha;hb=HEAD
- dropped patch adding sysctl to disable disk-based swap because it has not found any usage
- bpf is now in the list of LSM modules (ability to write LSM modules as BPF programs), enable it, it is potentially useful and does not seem to be harmful
- keeping kernel libc headers in older kernels for now
- dropped building external virtualbox guest modules because they are now included into the mainline kernel
- offed building VirtualBox host modules, I do not know how to keep these binary modules in sync with userspace part of VirtualBox, users can continue using dkms
- offed building kernel-shredder because it is not buildable on kernel 5.10
- updated rtl8821ce and added a dependency from its "blacklist" subpackage here (see https://github.com/tomaspinho/rtl8821ce/commit/14b536f0)
It is not clear if kernel 5.10 will receive an LTS support longer than 5.4 or not. Support until Dec, 2022 is declared right now at https://www.kernel.org/category/releases.html for 5.10 and until Dec, 2025 - for 5.4.
TODO: update kernel configs
TODO: solve problems with version of virtualbox host modules not matching version of the virtualbox package after virtualbox is updated but kernel is not rebuilt
2020-12-20 18:49:24 +03:00
|
|
|
# loading/unloading of the module failed sometimes on kernel 5.4
|
|
|
|
# and it has not been adapted for kernel 5.10 (is not buildable)
|
|
|
|
%bcond_with binary_shredder
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Compress modules with zstd (zstd is good compression and fast decompression)
|
2022-03-15 17:03:05 +03:00
|
|
|
%bcond_without compress_modules
|
2021-05-03 18:21:14 +03:00
|
|
|
# Spend more resources on compression, but make resulting size less;
|
2021-05-04 15:17:47 +03:00
|
|
|
# decompression speed will not be affected, but more memory will be required
|
|
|
|
# which should not a problem here (performance penalty from allocating more
|
|
|
|
# memory should not be big, I think, but I did not benchmark).
|
2022-03-15 17:03:05 +03:00
|
|
|
%define zstd_cmd zstd -q --format=zstd --ultra -22
|
2021-05-03 18:21:14 +03:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# Kernel flavour
|
2020-03-18 22:20:03 +03:00
|
|
|
%if %{with nickel}
|
2022-03-09 19:02:02 +01:00
|
|
|
%define flavour nickel
|
2019-11-11 21:28:45 +03:00
|
|
|
%else
|
2022-03-09 19:02:02 +01:00
|
|
|
%define flavour generic
|
2019-11-11 21:28:45 +03:00
|
|
|
%endif
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# The full kernel version
|
2022-03-09 19:02:02 +01:00
|
|
|
%define kver_full %{kversion}-%{flavour}-%{buildrpmrel}
|
2021-10-10 16:12:22 +03:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
############################################################################
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
%define top_dir_name kernel-%{_arch}
|
|
|
|
%define build_dir ${RPM_BUILD_DIR}/%{top_dir_name}
|
|
|
|
%define src_dir %{build_dir}/linux-%{tar_ver}
|
2019-07-16 18:30:53 +03:00
|
|
|
|
|
|
|
# Common target directories
|
2022-03-09 19:02:02 +01:00
|
|
|
%define _bootdir /boot
|
|
|
|
%define _modulesdir /lib/modules
|
|
|
|
%define devel_root /usr/src/linux-%{kver_full}
|
|
|
|
%define initrd_path %{_bootdir}/initrd-%{kver_full}.img
|
Delete old initrds by RPM
After moving to dnf (installonlypkg(kernel)) schema of packaging the kernel,
the %%postun scriptlet stopped working properly because $1 is the number
of packages left after the transaction, and there are multiple
kernels - packages with the same name but of different version/release - left.
Let's just make initrd be %%ghost as Fedora (but increase its size from Fedora's 20 MiB to 65 MiB),
and drop deleting empty directories etc. Recent commit fixed ownership of directories,
now /lib/modules/kernel_version is owned by RPM (it was not), dkms will remove modules
that it built, and, if anything else was left, then let's just not touch it, why must we delete
what we know nothing about?
Also delete scriptlet in the devel subpackage, that scriptlet would probably cause problems
with reinstalling the devel package.
2021-05-24 21:10:00 +03:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# Directories needed for building
|
2022-03-09 19:02:02 +01:00
|
|
|
%define temp_root %{build_dir}/temp-root
|
|
|
|
%define temp_boot %{temp_root}%{_bootdir}
|
|
|
|
%define temp_modules %{temp_root}%{_modulesdir}
|
|
|
|
%define temp_devel_root %{temp_root}%{devel_root}
|
2019-07-16 18:30:53 +03:00
|
|
|
|
|
|
|
# Directories definition needed for installing
|
2022-03-09 19:02:02 +01:00
|
|
|
%define target_boot %{buildroot}%{_bootdir}
|
|
|
|
%define target_modules %{buildroot}%{_modulesdir}
|
2019-11-11 17:47:53 +03:00
|
|
|
|
|
|
|
# Manual control of creating and deleting keys
|
|
|
|
# "rnd" is "random" and means that a key pair is generated at build time
|
|
|
|
# and is not saved anywhere.
|
2022-03-09 19:02:02 +01:00
|
|
|
%define certs_dir_rnd certs
|
|
|
|
%define certs_signing_key_priv_rnd %{certs_dir_rnd}/signing_key_priv.key
|
|
|
|
%define certs_signing_der %{certs_dir_rnd}/signing_key.x509
|
|
|
|
%define certs_key_config_rnd %{certs_dir_rnd}/x509.genkey
|
|
|
|
%define certs_public_keys %{certs_dir_rnd}/public.pem
|
|
|
|
%define certs_verify_tmp %{certs_dir_rnd}/verify.tmp
|
2021-05-03 15:56:13 +03:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
%define kernel_files %{_builddir}/kernel_files.list
|
|
|
|
%define debuginfo_files %{_builddir}/debuginfo_files.list
|
2021-05-03 15:56:13 +03:00
|
|
|
|
|
|
|
# Append list of files generate by find-debuginfo.sh to our custom list
|
2022-03-09 19:02:02 +01:00
|
|
|
%global __debug_install_post \
|
2021-05-03 15:56:13 +03:00
|
|
|
%{__debug_install_post} \
|
|
|
|
cat %{_builddir}/debugfiles.list >> %{debuginfo_files}
|
|
|
|
|
2016-07-29 13:39:16 +03:00
|
|
|
############################################################################
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-09-20 14:48:35 +03:00
|
|
|
%if %{with binary_extra_modules}
|
|
|
|
# global instead of define to speed up things
|
2022-10-16 00:19:07 +03:00
|
|
|
%global nvidia_340_j %{kroko_j -p kernel-source-nvidia340 -r 340}
|
|
|
|
%global nvidia_340_n %{kroko_n -p kernel-source-nvidia340 -r 340}
|
2022-09-20 14:48:35 +03:00
|
|
|
%global nvidia_390_j %{kroko_j -p kernel-source-nvidia390 -r 390}
|
|
|
|
%global nvidia_390_n %{kroko_n -p kernel-source-nvidia390 -r 390}
|
|
|
|
%global nvidia_470_j %{kroko_j -p kernel-source-nvidia470 -r 470}
|
|
|
|
%global nvidia_470_n %{kroko_n -p kernel-source-nvidia470 -r 470}
|
|
|
|
%global nvidia_510_j %{kroko_j -p kernel-source-nvidia510 -r 510}
|
|
|
|
%global nvidia_510_n %{kroko_n -p kernel-source-nvidia510 -r 510}
|
|
|
|
%global nvidia_515_j %{kroko_j -p kernel-source-nvidia515 -r 515}
|
|
|
|
%global nvidia_515_n %{kroko_n -p kernel-source-nvidia515 -r 515}
|
2022-10-14 18:16:15 +03:00
|
|
|
%global nvidia_520_j %{kroko_j -p kernel-source-nvidia520 -r 520}
|
|
|
|
%global nvidia_520_n %{kroko_n -p kernel-source-nvidia520 -r 520}
|
2023-03-13 23:05:12 +03:00
|
|
|
%global nvidia_525_j %{kroko_j -p kernel-source-nvidia525 -r 525}
|
|
|
|
%global nvidia_525_n %{kroko_n -p kernel-source-nvidia525 -r 525}
|
2021-10-10 16:12:22 +03:00
|
|
|
|
|
|
|
# For SRPM stage when auto-krokodil-rpm-macros is not installed
|
2022-09-20 14:48:35 +03:00
|
|
|
%{?!kroko_mk_release:%global kroko_mk_release(n:) %{nil}}
|
|
|
|
%{?!kroko_req_modules_in_kernel:%global kroko_req_modules_in_kernel(j:n:p:) %{nil}}
|
|
|
|
|
|
|
|
# global, not define, must be expanded only once
|
2022-10-05 05:15:50 +03:00
|
|
|
%global kroko_release %kroko_mk_release -n kernel-%{kernelversion}.%{patchlevel}-%{flavour}
|
2022-09-20 14:48:35 +03:00
|
|
|
|
|
|
|
%endif #/binary_extra_modules
|
2021-10-10 16:12:22 +03:00
|
|
|
|
|
|
|
############################################################################
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Buildtime flags
|
2013-11-16 00:27:01 +04:00
|
|
|
%{?_without_doc: %global build_doc 0}
|
|
|
|
%{?_without_devel: %global build_devel 0}
|
|
|
|
%{?_without_debug: %global build_debug 0}
|
|
|
|
%{?_without_perf: %global build_perf 0}
|
|
|
|
%{?_without_cpupower: %global build_cpupower 0}
|
|
|
|
|
|
|
|
%{?_with_doc: %global build_doc 1}
|
|
|
|
%{?_with_devel: %global build_devel 1}
|
|
|
|
%{?_with_debug: %global build_debug 1}
|
|
|
|
%{?_with_perf: %global build_perf 1}
|
|
|
|
%{?_with_cpupower: %global build_cpupower 1}
|
2022-03-15 17:03:05 +03:00
|
|
|
%{?_with_modxz: %global build_modxz 0}
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Build defines
|
2022-03-15 17:03:05 +03:00
|
|
|
%define build_doc 1
|
2022-03-09 19:02:02 +01:00
|
|
|
%define build_devel 1
|
|
|
|
%define build_debug 1
|
|
|
|
|
|
|
|
# Build kernel-headers package
|
2022-11-07 03:13:34 +03:00
|
|
|
%define build_headers 0
|
2022-03-09 19:02:02 +01:00
|
|
|
|
|
|
|
# Build perf and cpupower tools
|
2023-03-16 02:45:04 +03:00
|
|
|
%define build_perf 1
|
|
|
|
%define build_cpupower 1
|
2020-07-29 10:59:41 +03:00
|
|
|
|
2022-03-15 17:03:05 +03:00
|
|
|
%if %{with compress_modules}
|
|
|
|
%if %{with modxz}
|
2022-03-09 19:02:02 +01:00
|
|
|
%define kmod_suffix .xz
|
2022-03-15 17:03:05 +03:00
|
|
|
%else
|
|
|
|
%define kmod_suffix .zst
|
|
|
|
%endif
|
|
|
|
%else
|
|
|
|
%define kmod_suffix %{nil}
|
|
|
|
%endif
|
2022-03-09 19:02:02 +01:00
|
|
|
|
2016-07-21 15:59:26 +03:00
|
|
|
%if !%{build_debug}
|
|
|
|
# Disable debug rpms.
|
2022-03-15 17:03:05 +03:00
|
|
|
%define _enable_debug_packages %{nil}
|
2022-03-09 19:02:02 +01:00
|
|
|
%define debug_package %{nil}
|
2016-07-21 15:59:26 +03:00
|
|
|
%endif
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# End of user definitions
|
|
|
|
|
2020-07-27 16:53:12 +03:00
|
|
|
# http://nickdesaulniers.github.io/blog/2018/06/02/speeding-up-linux-kernel-builds-with-ccache/
|
|
|
|
%if %{with ccache}
|
2022-03-09 19:02:02 +01:00
|
|
|
%define kmake KBUILD_BUILD_TIMESTAMP='' %make CC='ccache gcc' ARCH="%{arch_type}"
|
2013-11-16 00:27:01 +04:00
|
|
|
%else
|
2022-03-09 19:02:02 +01:00
|
|
|
%define kmake %make CC='gcc' ARCH="%{arch_type}"
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
2020-07-27 16:53:12 +03:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# There are places where parallel make don't work
|
|
|
|
%define smake make
|
2020-11-26 18:48:55 +00:00
|
|
|
%ifarch %{ix86} %{x86_64}
|
2022-03-09 19:02:02 +01:00
|
|
|
%define arch_type x86
|
2020-11-26 18:48:55 +00:00
|
|
|
%endif
|
2022-03-09 19:02:02 +01:00
|
|
|
%ifarch aarch64
|
|
|
|
%define arch_type arm64
|
2020-11-26 18:48:55 +00:00
|
|
|
%endif
|
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
# Parallelize xargs invocations on smp machines
|
2022-03-09 19:02:02 +01:00
|
|
|
%define kxargs xargs %([ -z "$RPM_BUILD_NCPUS" ] \\\
|
2013-11-16 00:27:01 +04:00
|
|
|
&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
|
|
|
|
[ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-P $RPM_BUILD_NCPUS")
|
|
|
|
|
|
|
|
#
|
|
|
|
# SRC RPM description
|
|
|
|
#
|
2022-03-09 19:02:02 +01:00
|
|
|
Summary: The Linux kernel
|
2021-05-03 15:56:13 +03:00
|
|
|
Name: kernel-%{kernelversion}.%{patchlevel}-%{flavour}
|
2022-03-09 19:02:02 +01:00
|
|
|
Version: %{kversion}
|
|
|
|
Release: %{fullrpmrel}
|
|
|
|
License: GPLv2
|
2022-03-15 17:03:05 +03:00
|
|
|
Group: System/Kernel and hardware
|
|
|
|
Url: https://www.kernel.org
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-11-07 21:01:49 +03:00
|
|
|
ExclusiveArch: %{x86_64} %{ix86} aarch64
|
2022-11-07 03:13:34 +03:00
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
####################################################################
|
|
|
|
#
|
|
|
|
# Sources
|
|
|
|
#
|
2022-11-07 03:13:34 +03:00
|
|
|
#Source0: https://cdn.kernel.org/pub/linux/kernel/v%{kernelversion}.x/linux-%{tar_ver}.tar.xz
|
2022-12-14 18:46:00 +03:00
|
|
|
Source0: https://github.com/torvalds/linux/archive/refs/tags/v6.1.tar.gz?/linux-6.1.tar.gz
|
Revisited the set of kernel flavours and the generation of config files
Until now, the build system for the kernel supported a number of
flavours: nrj and non-nrj ones, desktop-, laptop-, server- and
netbook-oriented, etc.
It turned out over the years, however, that our users mostly need the
following:
* a kernel to use on the desktops (home and office use) with reasonable
default settings for performance and responsiveness;
* a kernel for laptops, with a bit more emphasis on power consumption.
Other variants were rarely used. We also did not have enough time to
properly support all these.
Besides, the kernels for ARM and other architectures need a somewhat
different build process than for x86. So, they are better off to be in
separate ABF projects, even if they are needed. No signs of ROSA on ARM
yet, btw.
So, I kept only nrj-desktop and nrj-laptop flavours and only x86.
Non-PAE systems also seem to be rare now, so I enabled PAE by default
for the 32-bit kernels. Non-PAE kernels are no longer built. If they are
needed, we may use a separate git branch or an ABF project for that.
To simplify debugging, maintenance and experimentation with the kernel
builds further, I revisited the process of preparing the kernel
configuration files. The goal is to get rid of a separate git repo with
the default configs (kernel-patches-and-configs) and keep everything in
this project.
The default config files are now kept here. For x86_64:
* kernel-x86_64.config contains the options for both nrj-desktop and
nrn-laptop flavours;
* kernel-{nrj_desktop|nrj_laptop}-x86_64.config files contain the
flavour-specific options.
This way, it is easier to track which config options changed when,
easier to experiment with the custom configs and so on.
The kernel will be built with debug info if rpmbuild is called with
"--with debug".
2016-07-21 13:56:25 +03:00
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
# This is for disabling *config, mrproper, prepare, scripts on -devel rpms
|
2019-07-16 18:30:53 +03:00
|
|
|
# Needed, because otherwise the -devel won't build correctly.
|
2022-11-07 03:13:34 +03:00
|
|
|
#Source2: 0001-disable-mrproper-prepare-scripts-configs-in-devel-rp.patch
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# TODO: Make a separate package "ksobirator" and BR it
|
2020-07-29 10:59:41 +03:00
|
|
|
# after testing these macros properly
|
|
|
|
Source3: macros.ksobirator
|
|
|
|
%{load:%{SOURCE3}}
|
|
|
|
|
Revisited the set of kernel flavours and the generation of config files
Until now, the build system for the kernel supported a number of
flavours: nrj and non-nrj ones, desktop-, laptop-, server- and
netbook-oriented, etc.
It turned out over the years, however, that our users mostly need the
following:
* a kernel to use on the desktops (home and office use) with reasonable
default settings for performance and responsiveness;
* a kernel for laptops, with a bit more emphasis on power consumption.
Other variants were rarely used. We also did not have enough time to
properly support all these.
Besides, the kernels for ARM and other architectures need a somewhat
different build process than for x86. So, they are better off to be in
separate ABF projects, even if they are needed. No signs of ROSA on ARM
yet, btw.
So, I kept only nrj-desktop and nrj-laptop flavours and only x86.
Non-PAE systems also seem to be rare now, so I enabled PAE by default
for the 32-bit kernels. Non-PAE kernels are no longer built. If they are
needed, we may use a separate git branch or an ABF project for that.
To simplify debugging, maintenance and experimentation with the kernel
builds further, I revisited the process of preparing the kernel
configuration files. The goal is to get rid of a separate git repo with
the default configs (kernel-patches-and-configs) and keep everything in
this project.
The default config files are now kept here. For x86_64:
* kernel-x86_64.config contains the options for both nrj-desktop and
nrn-laptop flavours;
* kernel-{nrj_desktop|nrj_laptop}-x86_64.config files contain the
flavour-specific options.
This way, it is easier to track which config options changed when,
easier to experiment with the custom configs and so on.
The kernel will be built with debug info if rpmbuild is called with
"--with debug".
2016-07-21 13:56:25 +03:00
|
|
|
# Kernel configuration files.
|
2020-12-30 19:47:16 +03:00
|
|
|
Source111: kernel-x86_64.config
|
2022-03-30 09:04:46 +03:00
|
|
|
Source112: kernel-i686.config
|
2020-12-30 19:47:16 +03:00
|
|
|
Source113: kernel-arm64.config
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2015-03-17 20:53:12 +03:00
|
|
|
# Cpupower: the service, the config, etc.
|
2022-03-15 17:03:05 +03:00
|
|
|
Source50: cpupower.service
|
|
|
|
Source51: cpupower.config
|
|
|
|
Source52: cpupower-start.sh
|
|
|
|
Source53: cpupower.path
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-03-15 17:03:05 +03:00
|
|
|
Source80: kernel.rpmlintrc
|
2019-11-17 16:56:39 +03:00
|
|
|
|
|
|
|
# Additional keys that can be used to sign kernel modules
|
2020-03-20 21:20:38 +03:00
|
|
|
# Generated by https://abf.io/soft/kernel-keys
|
|
|
|
# Source201..206: public_key_GOST_*.pem
|
|
|
|
%{expand:%(for i in `seq 1 6`; do echo "Source$((200+${i})): public_key_GOST_${i}.pem"; done)}
|
|
|
|
# Source207..212: public_key_RSA_*.pem
|
|
|
|
%{expand:%(for i in `seq 7 12`; do echo "Source$((200+${i})): public_key_RSA_${i}.pem"; done)}
|
2019-11-17 16:56:39 +03:00
|
|
|
|
2016-07-26 11:24:24 +03:00
|
|
|
####################################################################
|
Revisited the set of kernel flavours and the generation of config files
Until now, the build system for the kernel supported a number of
flavours: nrj and non-nrj ones, desktop-, laptop-, server- and
netbook-oriented, etc.
It turned out over the years, however, that our users mostly need the
following:
* a kernel to use on the desktops (home and office use) with reasonable
default settings for performance and responsiveness;
* a kernel for laptops, with a bit more emphasis on power consumption.
Other variants were rarely used. We also did not have enough time to
properly support all these.
Besides, the kernels for ARM and other architectures need a somewhat
different build process than for x86. So, they are better off to be in
separate ABF projects, even if they are needed. No signs of ROSA on ARM
yet, btw.
So, I kept only nrj-desktop and nrj-laptop flavours and only x86.
Non-PAE systems also seem to be rare now, so I enabled PAE by default
for the 32-bit kernels. Non-PAE kernels are no longer built. If they are
needed, we may use a separate git branch or an ABF project for that.
To simplify debugging, maintenance and experimentation with the kernel
builds further, I revisited the process of preparing the kernel
configuration files. The goal is to get rid of a separate git repo with
the default configs (kernel-patches-and-configs) and keep everything in
this project.
The default config files are now kept here. For x86_64:
* kernel-x86_64.config contains the options for both nrj-desktop and
nrn-laptop flavours;
* kernel-{nrj_desktop|nrj_laptop}-x86_64.config files contain the
flavour-specific options.
This way, it is easier to track which config options changed when,
easier to experiment with the custom configs and so on.
The kernel will be built with debug info if rpmbuild is called with
"--with debug".
2016-07-21 13:56:25 +03:00
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
# Patches
|
|
|
|
|
2016-07-22 22:05:03 +03:00
|
|
|
# The patch to make kernel x.y.z from x.y.0.
|
2023-01-04 17:13:03 +00:00
|
|
|
Patch1: https://cdn.kernel.org/pub/linux/kernel/v%{kernelversion}.x/patch-%{kversion}.xz
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2016-07-26 11:24:24 +03:00
|
|
|
# ROSA-specific patches
|
2022-11-07 03:13:34 +03:00
|
|
|
Patch2: kernel-5.10.93-fix-perf-build.patch
|
2023-03-13 21:59:13 +03:00
|
|
|
# Keep in sync with patch in r8168
|
|
|
|
Patch3: 0001-r8169-remove-devices-supported-by-r8168.patch
|
2016-07-26 11:24:24 +03:00
|
|
|
# Perf docs are built after all the kernels. To validate the xml files
|
|
|
|
# generated during that process, xmlto tries to get DTD files from the Net.
|
|
|
|
# If it fails, the whole build fails, which is unfortunate. Let us avoid
|
|
|
|
# this.
|
2022-03-15 17:03:05 +03:00
|
|
|
Patch101: 0001-perf-skip-xmlto-validation.patch
|
2016-07-26 11:24:24 +03:00
|
|
|
|
|
|
|
# http://bugs.rosalinux.ru/show_bug.cgi?id=6235
|
|
|
|
# http://bugs.rosalinux.ru/show_bug.cgi?id=6459
|
2022-03-15 17:03:05 +03:00
|
|
|
Patch102: 0001-audit-make-it-less-verbose.patch
|
2016-07-26 11:24:24 +03:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
%if %{with aufs}
|
2023-03-13 22:55:31 +03:00
|
|
|
# https://github.com/sfjro/aufs-linux/compare/830b3c68c1fb1e9176028d02ef86f3cf76aa2476..834d19786ccd95485e397fc0f36ef7d6c3b04c95.diff
|
|
|
|
Patch103: aufs-6.1.diff
|
2022-03-09 19:02:02 +01:00
|
|
|
%endif
|
2019-12-07 21:57:55 +03:00
|
|
|
|
2020-06-18 18:38:30 +03:00
|
|
|
# For kmod() generator of RPM Provides
|
|
|
|
# Changes version of aacraid.ko
|
2022-03-15 17:03:05 +03:00
|
|
|
Patch111: 0001-Remove-RPM-illegal-chars-from-module-version.patch
|
2020-06-18 18:38:30 +03:00
|
|
|
|
2020-03-16 23:19:46 +03:00
|
|
|
# AltHa LSM Module
|
|
|
|
# https://www.altlinux.org/AltHa
|
|
|
|
# http://git.altlinux.org/gears/k/kernel-image-un-def.git
|
|
|
|
# TODO: known problem: https://bugzilla.altlinux.org/show_bug.cgi?id=38225
|
2022-03-17 10:23:10 +03:00
|
|
|
Patch201: 0001-altha.patch
|
2020-03-16 23:19:46 +03:00
|
|
|
|
2020-03-20 11:27:35 +03:00
|
|
|
# sent to upstream, https://patchwork.kernel.org/patch/11446123/
|
2022-03-15 17:03:05 +03:00
|
|
|
Patch302: 0001-sign-file-full-functionality-with-modern-LibreSSL.patch
|
2020-08-10 10:44:43 +03:00
|
|
|
# Allow to off modules signature check dynamically
|
2022-03-15 17:03:05 +03:00
|
|
|
Patch306: 0001-ROSA-ima-allow-to-off-modules-signature-check-dynami.patch
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-09-07 12:55:51 +03:00
|
|
|
# Support sound on notebook Aquarius NS685U R11 (https://linux-hardware.org/?probe=339dc3db60)
|
2022-09-07 14:24:27 +03:00
|
|
|
Patch0401: 0401-ASoC-es8316-Use-increased-GPIO-debounce-time.patch
|
2022-11-07 03:13:34 +03:00
|
|
|
Patch0402: 0402-ASoC-Intel-sof_es8336-Add-more-quirks-for-Russian-ha.patch
|
|
|
|
Patch0403: 0403-ASoC-Intel-sof_es8336-Add-a-quirk-for-Aquarius-NS685.patch
|
Add support of Baikal-M SoCs
Information about config values was taken from:
From 804820df7bcb3d53a33ecd074b1eac277e938f24 Mon Sep 17 00:00:00 2001
From: Alexey Sheplyakov <asheplyakov@altlinux.org>
Date: Thu, 4 Feb 2021 19:35:14 +0400
Subject: [PATCH] config-aarch64: adjusted for Baikal-M (MBM1.0 board)
* DW_APB_TIMER=y, DW_APB_TIMER_OF=y: SoC clocks
* SERIAL_8250_DW=y: serial console
* I2C_DESIGNWARE_CORE=y, I2C_DESIGNWARE_PLATFORM=y: BMC (board
management controller) and RTC (Real Time Clock) are connected
via I2C.
* GPIO_DWAPB=y: device (PCIe, PHY, etc) reset/configuration
* RTC_DRV_PCF2127=y: RTC compiled in so the kernel automatically
sets the system time from the hardware clock
* TP_BMC=y: amongst other things handles the power button
* DRM_BAIKAL_VDU=m, DRM_BAIKAL_HDMI=m: video unit and HDMI transmitter
* CMA_SIZE_MBYTES=256: video display unit and GPU use system RAM, hence
CMA should reserve enough (contiguous) memory.
Note: CMA reserves memory during very early init, hence the size
has to be hard-coded into CONFIG
* MALI_MIDGARD=m: GPU driver, kernel side of proprietary mali blob.
Note: kernel mode code is GPLv2, so it's fine to distribute it.
* SENSORS_BT1_PVT=m: hardware temperature/voltage sensors
* PCI_BAIKAL=m: PCIe root complex. Compiled as a module since takes
ages (60 seconds or so) to probe the hardware. If compiled in
substantially increases the boot time, and machine is completely
unresponsive during probing PCIe. When built as a module probing
executes concurrently with other boot activities (unless booting
from a PCIe device)
* STMMAC_ETH=m, STMMAC_PLATFORM=m, DWMAC_BAIKAL=m: Ethernet driver
2021-06-22 16:12:03 +03:00
|
|
|
|
2023-03-15 17:53:05 +03:00
|
|
|
# Support Baikal-M (aarch64)
|
|
|
|
# From https://github.com/asheplyakov/linux/commits/baikalm-6.1.y
|
|
|
|
Patch0600: 0600-clk-added-Baikal-M-clock-management-unit-driver.patch
|
|
|
|
Patch0601: 0601-cpufreq-dt-don-t-load-on-Baikal-M-SoC.patch
|
|
|
|
Patch0602: 0602-serial-8250_dw-verify-clock-rate-in-dw8250_set_termi.patch
|
|
|
|
Patch0603: 0603-usb-dwc3-of-simple-added-compatible-string-for-Baika.patch
|
|
|
|
Patch0604: 0604-dw-pcie-refuse-to-load-on-Baikal-M-with-recent-firmw.patch
|
|
|
|
Patch0605: 0605-arm64-Enable-armv8-based-Baikal-M-SoC-support.patch
|
|
|
|
Patch0606: 0606-efi-rtc-avoid-calling-efi.get_time-on-Baikal-M-SoC.patch
|
|
|
|
Patch0607: 0607-arm64-stub-fixed-secondary-cores-boot-on-Baikal-M-So.patch
|
|
|
|
Patch0608: 0608-pm-disable-all-sleep-states-on-Baikal-M-based-boards.patch
|
|
|
|
Patch0609: 0609-net-fwnode_get_phy_id-consider-all-compatible-string.patch
|
|
|
|
Patch0610: 0610-net-stmmac-inital-support-of-Baikal-T1-M-SoCs-GMAC.patch
|
|
|
|
Patch0611: 0611-dt-bindings-dwmac-Add-bindings-for-Baikal-T1-M-SoCs.patch
|
|
|
|
Patch0612: 0612-net-dwmac-baikal-added-compatible-strings.patch
|
|
|
|
Patch0613: 0613-Added-TF307-TF306-board-management-controller-driver.patch
|
|
|
|
Patch0614: 0614-hwmon-bt1-pvt-access-registers-via-pvt_-readl-writel.patch
|
|
|
|
Patch0615: 0615-hwmon-bt1-pvt-define-pvt_readl-pvt_writel-for-Baikal.patch
|
|
|
|
Patch0616: 0616-hwmon-bt1-pvt-adjusted-probing-for-Baikal-M-SoC.patch
|
|
|
|
Patch0617: 0617-hwmon-bt1-pvt-added-compatible-baikal-pvt.patch
|
|
|
|
Patch0618: 0618-drm-new-bridge-driver-stdp4028.patch
|
|
|
|
Patch0619: 0619-drm-added-Baikal-M-SoC-video-display-unit-driver.patch
|
|
|
|
Patch0620: 0620-drm-bridge-dw-hdmi-support-ahb-audio-hw-revision-0x2.patch
|
|
|
|
Patch0621: 0621-dt-bindings-dw-hdmi-added-ahb-audio-regshift.patch
|
|
|
|
Patch0622: 0622-drm-bridge-dw-hdmi-force-ahb-audio-register-offset-f.patch
|
|
|
|
Patch0623: 0623-drm-panfrost-forcibly-set-dma-coherent-on-Baikal-M.patch
|
|
|
|
Patch0624: 0624-drm-panfrost-disable-devfreq-on-Baikal-M.patch
|
|
|
|
Patch0625: 0625-ALSA-hda-Baikal-M-support.patch
|
|
|
|
Patch0626: 0626-PCI-pcie-baikal-driver-for-Baikal-M-with-new-firmwar.patch
|
|
|
|
Patch0627: 0627-BROKEN-dwc-i2s-support-Baikal-M-SoC.patch
|
|
|
|
Patch0628: 0628-input-added-TF307-serio-PS-2-emulator-driver.patch
|
|
|
|
Patch0629: 0629-input-new-driver-serdev-serio.patch
|
|
|
|
Patch0630: 0630-phy-realtek-leds-configuration-for-RTL8211f.patch
|
|
|
|
Patch0631: 0631-arm64-defconfig-for-Baikal-M-testing.patch
|
|
|
|
|
2020-03-09 10:50:38 +03:00
|
|
|
# Disable AutoReq
|
2022-03-09 19:02:02 +01:00
|
|
|
AutoReq: 0
|
2020-03-09 10:50:38 +03:00
|
|
|
# but keep autoprov for kmod(xxx)
|
2022-03-09 19:02:02 +01:00
|
|
|
AutoProv: 1
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: bash
|
|
|
|
BuildRequires: bc
|
|
|
|
BuildRequires: binutils
|
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: bzip2
|
|
|
|
%if %{with ccache}
|
|
|
|
BuildRequires: ccache
|
|
|
|
%endif
|
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: gcc
|
2020-11-27 15:52:01 +03:00
|
|
|
# ./scripts/mkcompile_h
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: hostname
|
|
|
|
BuildRequires: kmod-compat
|
2019-09-24 11:56:44 +03:00
|
|
|
BuildRequires: rsync
|
2022-03-15 17:03:05 +03:00
|
|
|
%if %{with compress_modules}
|
|
|
|
%if %{with modxz}
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: xz
|
2022-03-15 17:03:05 +03:00
|
|
|
%else
|
|
|
|
BuildRequires: zstd
|
|
|
|
%endif
|
|
|
|
%endif
|
2022-03-17 10:23:10 +03:00
|
|
|
%ifarch aarch64
|
|
|
|
BuildRequires: uboot-tools
|
|
|
|
%endif
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: kmod-devel
|
2022-11-07 17:52:17 +03:00
|
|
|
BuildRequires: pkgconfig(libelf)
|
2020-11-26 21:21:05 +00:00
|
|
|
%ifarch x86_64 aarch64
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: numa-devel
|
|
|
|
%endif
|
|
|
|
%if %{with uml}
|
|
|
|
BuildRequires: vde-devel
|
2014-05-19 18:34:31 +04:00
|
|
|
%endif
|
2022-03-09 19:02:02 +01:00
|
|
|
# For power tools
|
|
|
|
BuildRequires: pkgconfig(ncurses)
|
2014-05-19 18:34:31 +04:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# For perf, cpufreq and all other tools
|
|
|
|
# For cpupower
|
2014-07-11 16:00:31 +04:00
|
|
|
%if %{build_cpupower}
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: pciutils-devel
|
2014-07-11 16:00:31 +04:00
|
|
|
%endif
|
2022-03-09 19:02:02 +01:00
|
|
|
# For perf
|
2014-07-11 16:00:31 +04:00
|
|
|
%if %{build_perf}
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: asciidoc
|
|
|
|
BuildRequires: perl-ExtUtils-Embed
|
|
|
|
BuildRequires: python3
|
|
|
|
BuildRequires: xmlto
|
|
|
|
BuildRequires: audit-devel
|
|
|
|
BuildRequires: binutils-devel
|
|
|
|
BuildRequires: elfutils-devel
|
|
|
|
BuildRequires: java-1.8.0-openjdk-devel
|
|
|
|
BuildRequires: libunwind-devel
|
|
|
|
BuildRequires: newt-devel
|
|
|
|
BuildRequires: perl-devel
|
|
|
|
BuildRequires: pkgconfig(babeltrace)
|
2022-10-07 00:26:16 +03:00
|
|
|
BuildRequires: pkgconfig(libcap)
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: pkgconfig(libcrypto)
|
|
|
|
BuildRequires: pkgconfig(python3)
|
|
|
|
BuildRequires: pkgconfig(slang)
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
2023-03-16 02:45:04 +03:00
|
|
|
BuildRequires: python3-setuptools
|
2020-12-30 21:25:08 +03:00
|
|
|
%endif
|
|
|
|
|
2019-12-01 02:03:15 +03:00
|
|
|
# (To generate keys)
|
2019-12-07 21:57:55 +03:00
|
|
|
# LibreSSL has GOST support without editing openssl.cnf
|
|
|
|
# or dlopen()-ing external library
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: libressl
|
|
|
|
BuildRequires: libressl-devel
|
2019-11-11 21:16:01 +03:00
|
|
|
# To verify signatures (find, xargs, hexdump)
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: findutils
|
|
|
|
BuildRequires: util-linux
|
2019-11-11 17:47:53 +03:00
|
|
|
|
2020-07-29 10:59:41 +03:00
|
|
|
%if %{with binary_extra_modules}
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: auto-krokodil-rpm-macros
|
|
|
|
BuildRequires: kernel-source-rtl8821cu
|
2022-10-15 14:00:47 +03:00
|
|
|
BuildRequires: kernel-source-rtl88x2bu
|
2022-10-15 15:03:47 +03:00
|
|
|
BuildRequires: kernel-source-rtl8812au
|
2022-10-15 15:39:08 +03:00
|
|
|
BuildRequires: kernel-source-rtl8821au
|
2022-10-15 15:52:51 +03:00
|
|
|
BuildRequires: kernel-source-rtl8814au
|
2022-10-15 18:02:04 +03:00
|
|
|
BuildRequires: kernel-source-rtk_btusb
|
2022-10-18 18:44:54 +03:00
|
|
|
BuildRequires: kernel-source-rtl8188gu
|
|
|
|
BuildRequires: kernel-source-rtl8723du
|
|
|
|
BuildRequires: kernel-source-rtl8852au
|
|
|
|
BuildRequires: kernel-source-rtl8192du
|
2023-03-16 22:43:59 +03:00
|
|
|
BuildRequires: kernel-source-rtw89
|
2023-03-13 21:59:13 +03:00
|
|
|
BuildRequires: kernel-source-r8168
|
2022-10-16 00:19:07 +03:00
|
|
|
# Broadcom-wl and nvidia contain a proprietary blob which is only for x86
|
2021-10-07 00:45:03 +03:00
|
|
|
%ifarch %{ix86} %{x86_64}
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: kernel-source-broadcom-wl
|
2022-10-16 00:19:07 +03:00
|
|
|
BuildRequires: kernel-source-nvidia340
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: kernel-source-nvidia390
|
2021-10-07 00:45:03 +03:00
|
|
|
%endif
|
2022-03-09 19:02:02 +01:00
|
|
|
# Nvidia470+ are x86_64 only (maybe aarch64 will be also packaged later)
|
2021-10-19 21:43:37 +03:00
|
|
|
%ifarch %{x86_64}
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: kernel-source-nvidia470
|
2022-05-04 10:07:56 +03:00
|
|
|
BuildRequires: kernel-source-nvidia510
|
2022-05-28 12:25:23 +03:00
|
|
|
BuildRequires: kernel-source-nvidia515
|
2022-10-14 18:16:15 +03:00
|
|
|
BuildRequires: kernel-source-nvidia520
|
2023-03-13 23:05:12 +03:00
|
|
|
BuildRequires: kernel-source-nvidia525
|
2021-10-19 21:43:37 +03:00
|
|
|
%endif
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: kernel-source-tripso
|
|
|
|
BuildRequires: kernel-source-ipt-so
|
Update from 5.4 to 5.10.1
- rediffed most of patches, renamed files to easify further rediffs by git format-patch
- thanks to abf.io/kernels_stable for some patches for kernel 5.9
- using unofficial patch for AUFS for kernel 5.10, there may be issues with stability, try to avoid using AUFS (I would have dropped it, but MagOS wants it very much)
- pulled updates of AltHa from http://git.altlinux.org/gears/k/kernel-image-un-def.git?p=kernel-image-un-def.git;a=history;f=security/altha;hb=HEAD
- dropped patch adding sysctl to disable disk-based swap because it has not found any usage
- bpf is now in the list of LSM modules (ability to write LSM modules as BPF programs), enable it, it is potentially useful and does not seem to be harmful
- keeping kernel libc headers in older kernels for now
- dropped building external virtualbox guest modules because they are now included into the mainline kernel
- offed building VirtualBox host modules, I do not know how to keep these binary modules in sync with userspace part of VirtualBox, users can continue using dkms
- offed building kernel-shredder because it is not buildable on kernel 5.10
- updated rtl8821ce and added a dependency from its "blacklist" subpackage here (see https://github.com/tomaspinho/rtl8821ce/commit/14b536f0)
It is not clear if kernel 5.10 will receive an LTS support longer than 5.4 or not. Support until Dec, 2022 is declared right now at https://www.kernel.org/category/releases.html for 5.10 and until Dec, 2025 - for 5.4.
TODO: update kernel configs
TODO: solve problems with version of virtualbox host modules not matching version of the virtualbox package after virtualbox is updated but kernel is not rebuilt
2020-12-20 18:49:24 +03:00
|
|
|
%if %{with binary_virtualbox_host}
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: kernel-source-virtualbox
|
2020-11-26 18:58:01 +00:00
|
|
|
%endif
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: kernel-source-v4l2loopback
|
Update from 5.4 to 5.10.1
- rediffed most of patches, renamed files to easify further rediffs by git format-patch
- thanks to abf.io/kernels_stable for some patches for kernel 5.9
- using unofficial patch for AUFS for kernel 5.10, there may be issues with stability, try to avoid using AUFS (I would have dropped it, but MagOS wants it very much)
- pulled updates of AltHa from http://git.altlinux.org/gears/k/kernel-image-un-def.git?p=kernel-image-un-def.git;a=history;f=security/altha;hb=HEAD
- dropped patch adding sysctl to disable disk-based swap because it has not found any usage
- bpf is now in the list of LSM modules (ability to write LSM modules as BPF programs), enable it, it is potentially useful and does not seem to be harmful
- keeping kernel libc headers in older kernels for now
- dropped building external virtualbox guest modules because they are now included into the mainline kernel
- offed building VirtualBox host modules, I do not know how to keep these binary modules in sync with userspace part of VirtualBox, users can continue using dkms
- offed building kernel-shredder because it is not buildable on kernel 5.10
- updated rtl8821ce and added a dependency from its "blacklist" subpackage here (see https://github.com/tomaspinho/rtl8821ce/commit/14b536f0)
It is not clear if kernel 5.10 will receive an LTS support longer than 5.4 or not. Support until Dec, 2022 is declared right now at https://www.kernel.org/category/releases.html for 5.10 and until Dec, 2025 - for 5.4.
TODO: update kernel configs
TODO: solve problems with version of virtualbox host modules not matching version of the virtualbox package after virtualbox is updated but kernel is not rebuilt
2020-12-20 18:49:24 +03:00
|
|
|
%if %{with binary_shredder}
|
2020-11-27 23:00:06 +03:00
|
|
|
BuildRequires: kernel-source-shredder-kernel
|
|
|
|
%endif
|
2022-03-09 19:02:02 +01:00
|
|
|
# Rosa-test-suite is maintained in certified branches only nlkm, memfreetest, pcietest
|
2020-08-06 17:26:48 +03:00
|
|
|
%if %{with nickel}
|
2022-03-09 19:02:02 +01:00
|
|
|
BuildRequires: kernel-source-rosa-test-suite
|
2020-07-29 10:59:41 +03:00
|
|
|
%endif
|
2021-05-03 18:21:14 +03:00
|
|
|
%endif
|
2022-03-09 19:02:02 +01:00
|
|
|
# End of with binary_extra_modules
|
2021-05-03 18:21:14 +03:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
Provides: kernel = %{EVRD}
|
|
|
|
Provides: kernel-%{flavour} = %{EVRD}
|
2021-10-10 16:12:22 +03:00
|
|
|
Provides: kernel-abi(%{kver_full}) = %{EVRD}
|
2022-03-09 19:02:02 +01:00
|
|
|
# Dnf config-manager --dump | grep installonly
|
2021-05-03 15:56:13 +03:00
|
|
|
Provides: installonlypkg(kernel) = %{EVRD}.image
|
|
|
|
Provides: installonlypkg(kernel) = %{EVRD}.modules
|
2019-07-16 18:30:53 +03:00
|
|
|
|
2021-05-04 14:39:10 +03:00
|
|
|
# >= because of added support of zstd-compressed modules
|
2022-03-15 17:03:05 +03:00
|
|
|
Requires(posttrans): dracut >= 053-0.git5eb736.5
|
|
|
|
Requires(posttrans): kmod >= 28-3
|
2021-05-03 15:56:13 +03:00
|
|
|
|
2022-03-23 12:18:52 +03:00
|
|
|
# Need for rebuild dkms drivers
|
2023-05-04 16:15:35 +03:00
|
|
|
Recommends: (%{name}-devel%{_isa} = %{EVRD} if dkms)
|
2023-03-13 21:59:13 +03:00
|
|
|
# not blob, support of devices supported by r8168 is removed from r8169
|
|
|
|
Recommends: %{ksob_module_pkg_name r8168} = %{EVRD}
|
2022-03-23 12:18:52 +03:00
|
|
|
|
2020-12-27 23:46:32 +03:00
|
|
|
# Usually necessary, but sometimes user may want to not install them
|
|
|
|
Recommends: crda
|
2022-03-09 19:02:02 +01:00
|
|
|
Recommends: linux-firmware
|
2021-05-03 15:56:13 +03:00
|
|
|
Recommends: microcode
|
2020-12-27 16:13:54 +03:00
|
|
|
# Set BFQ as default scheduler for HDDs
|
|
|
|
# https://www.phoronix.com/scan.php?page=article&item=linux-50hdd-io
|
|
|
|
Recommends: udev-rules-ioschedulers
|
2022-03-09 19:02:02 +01:00
|
|
|
Recommends: wireless-regdb
|
2019-07-16 18:30:53 +03:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%if %{with flow_abi}
|
|
|
|
Requires: kernel-%{kernelversion}.%{patchlevel}-rosa-flow-abi
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
%ifarch %{ix86}
|
|
|
|
Conflicts: arch(x86_64)
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
2016-07-21 15:58:13 +03:00
|
|
|
|
2021-09-19 00:46:54 +03:00
|
|
|
# XXX temporary hack to upgrade from kernel-headers 1:5.4
|
|
|
|
%if %{build_headers}
|
|
|
|
Recommends: kernel-headers = %{EVRD}
|
|
|
|
%endif
|
|
|
|
|
2021-10-10 16:12:22 +03:00
|
|
|
%if %{with binary_extra_modules}
|
|
|
|
%ifarch %{ix86} %{x86_64}
|
2022-10-16 00:19:07 +03:00
|
|
|
%kroko_req_modules_in_kernel -j %{nvidia_340_j} -n %{nvidia_340_n} -p %{kver_full}
|
2022-09-20 14:48:35 +03:00
|
|
|
%kroko_req_modules_in_kernel -j %{nvidia_390_j} -n %{nvidia_390_n} -p %{kver_full}
|
2021-10-10 16:12:22 +03:00
|
|
|
%endif
|
2021-10-19 21:43:37 +03:00
|
|
|
%ifarch %{x86_64}
|
2022-09-20 14:48:35 +03:00
|
|
|
%kroko_req_modules_in_kernel -j %{nvidia_470_j} -n %{nvidia_470_n} -p %{kver_full}
|
|
|
|
%kroko_req_modules_in_kernel -j %{nvidia_510_j} -n %{nvidia_510_n} -p %{kver_full}
|
|
|
|
%kroko_req_modules_in_kernel -j %{nvidia_515_j} -n %{nvidia_515_n} -p %{kver_full}
|
2022-10-14 18:16:15 +03:00
|
|
|
%kroko_req_modules_in_kernel -j %{nvidia_520_j} -n %{nvidia_520_n} -p %{kver_full}
|
2023-03-13 23:05:12 +03:00
|
|
|
%kroko_req_modules_in_kernel -j %{nvidia_525_j} -n %{nvidia_525_n} -p %{kver_full}
|
2021-10-19 21:43:37 +03:00
|
|
|
%endif
|
2021-10-10 16:12:22 +03:00
|
|
|
%endif
|
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%description
|
2019-07-16 18:30:53 +03:00
|
|
|
The kernel package contains the Linux kernel (vmlinuz), the core of your
|
|
|
|
operating system. The kernel handles the basic functions
|
|
|
|
of the operating system: memory allocation, process allocation, device
|
|
|
|
input and output, etc. This is a general-purpose kernel.
|
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%posttrans
|
2022-10-18 23:20:11 +03:00
|
|
|
# update information about modules, useful if kernel-module* packages were
|
|
|
|
# installed in one transaction with this kernel (%%transfiletrigger* will run later)
|
|
|
|
depmod -a %{kver_full}
|
2019-07-16 18:30:53 +03:00
|
|
|
# We always regenerate initrd here, even if it already exists. This may
|
|
|
|
# happen if kernel-<...>-devel is installed first, triggers rebuild of
|
|
|
|
# DKMS modules and some of these request remaking of initrd. The initrd
|
|
|
|
# that is created then will be non-functional. But when the user installs
|
|
|
|
# kernel-<...> package, that defunct initrd will be replaced with a working
|
|
|
|
# one here.
|
2021-10-17 00:46:32 +03:00
|
|
|
dracut -f %{initrd_path} %{kver_full}
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# File triggers from grub packages will handle this.
|
|
|
|
#/usr/sbin/update-grub2
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-10-10 06:54:03 +03:00
|
|
|
%transfiletriggerin -- %{_modulesdir}/%{kver_full}
|
2021-10-17 00:46:32 +03:00
|
|
|
# Detect all modules, including ones inside kernel-module* packages
|
|
|
|
if grep -qE '/.*\.ko(|\..*)' ; then
|
|
|
|
depmod -a %{kver_full}
|
|
|
|
fi
|
|
|
|
|
2022-10-10 06:54:03 +03:00
|
|
|
%transfiletriggerpostun -- %{_modulesdir}/%{kver_full}
|
2021-10-17 00:46:32 +03:00
|
|
|
# Handle e.g. removal of kernel-module* packages
|
2022-10-10 06:54:03 +03:00
|
|
|
# List of files is not available here (?)
|
|
|
|
depmod -a %{kver_full}
|
2021-10-17 00:46:32 +03:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%files -f %{kernel_files}
|
|
|
|
%{_bootdir}/System.map-%{kver_full}
|
2022-03-15 17:03:05 +03:00
|
|
|
%{_bootdir}/symvers-%{kver_full}.*
|
2021-05-03 15:56:13 +03:00
|
|
|
%{_bootdir}/config-%{kver_full}
|
|
|
|
%{_bootdir}/vmlinuz-%{kver_full}
|
Delete old initrds by RPM
After moving to dnf (installonlypkg(kernel)) schema of packaging the kernel,
the %%postun scriptlet stopped working properly because $1 is the number
of packages left after the transaction, and there are multiple
kernels - packages with the same name but of different version/release - left.
Let's just make initrd be %%ghost as Fedora (but increase its size from Fedora's 20 MiB to 65 MiB),
and drop deleting empty directories etc. Recent commit fixed ownership of directories,
now /lib/modules/kernel_version is owned by RPM (it was not), dkms will remove modules
that it built, and, if anything else was left, then let's just not touch it, why must we delete
what we know nothing about?
Also delete scriptlet in the devel subpackage, that scriptlet would probably cause problems
with reinstalling the devel package.
2021-05-24 21:10:00 +03:00
|
|
|
%ghost %{initrd_path}
|
2021-05-03 15:56:13 +03:00
|
|
|
%ifarch %{armx}
|
|
|
|
%{_bootdir}/dtb-%{kver_full}
|
|
|
|
%endif
|
|
|
|
%{_modulesdir}/%{kver_full}/modules.*
|
|
|
|
%if %{with flow_abi}
|
|
|
|
%{_modulesdir}/%{kver_full}/kernel/zzz-%{kernelversion}.%{patchlevel}-rosa-flow-abi
|
|
|
|
%endif
|
|
|
|
%if %{with binary_extra_modules}
|
2021-10-03 16:35:09 +03:00
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/net/wireless/8821cu.ko%{kmod_suffix}
|
2022-10-15 14:00:47 +03:00
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/net/wireless/88x2bu.ko%{kmod_suffix}
|
2022-10-15 15:03:47 +03:00
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/net/wireless/8812au.ko%{kmod_suffix}
|
2022-10-15 15:39:08 +03:00
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/net/wireless/8821au.ko%{kmod_suffix}
|
2022-10-15 15:52:51 +03:00
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/net/wireless/8814au.ko%{kmod_suffix}
|
2022-10-15 18:02:04 +03:00
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/drivers/bluetooth/rtk_btusb.ko%{kmod_suffix}
|
2022-10-18 18:44:54 +03:00
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/net/wireless/8188gu.ko%{kmod_suffix}
|
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/net/wireless/8723du.ko%{kmod_suffix}
|
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/net/wireless/8852au.ko%{kmod_suffix}
|
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/net/wireless/8192du.ko%{kmod_suffix}
|
2023-03-16 22:43:59 +03:00
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/net/wireless/realtek/rtw89p
|
2023-03-13 21:59:13 +03:00
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/drivers/net/ethernet/realtek/r8168.ko%{kmod_suffix}
|
2021-10-07 00:45:03 +03:00
|
|
|
%ifarch %{ix86} %{x86_64}
|
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/net/wireless/wl.ko%{kmod_suffix}
|
2021-10-19 21:43:37 +03:00
|
|
|
%endif
|
2021-05-03 15:56:13 +03:00
|
|
|
%if %{with binary_shredder}
|
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/extra/shredder-kernel.ko%{kmod_suffix}
|
|
|
|
%endif
|
2021-10-16 20:11:50 +03:00
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/drivers/media/v4l2loopback.ko%{kmod_suffix}
|
2021-05-03 15:56:13 +03:00
|
|
|
%if %{with binary_virtualbox_host}
|
|
|
|
# vbox host modules may be built here (vboxnetflt vboxnetadp vboxdrv vboxpci)
|
|
|
|
# vbox guest modules are in the mainline kernel now (vboxvideo vboxguest vboxsf)
|
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/misc/vbox*.ko%{kmod_suffix}
|
|
|
|
%endif
|
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/net/xt_TRIPSO.ko%{kmod_suffix}
|
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/net/xt_so.ko%{kmod_suffix}
|
|
|
|
%if %{with nickel}
|
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/misc/nlkm.ko%{kmod_suffix}
|
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/misc/memfreetest.ko%{kmod_suffix}
|
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/misc/pcietest.ko%{kmod_suffix}
|
|
|
|
%endif
|
2022-03-09 19:02:02 +01:00
|
|
|
%endif
|
|
|
|
# End of with binary_extra_modules
|
2019-07-16 18:30:53 +03:00
|
|
|
|
|
|
|
############################################################################
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
%if %{build_devel}
|
2021-05-03 15:56:13 +03:00
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
2019-07-16 18:30:53 +03:00
|
|
|
Group: Development/Kernel
|
|
|
|
Requires: glibc-devel
|
|
|
|
Requires: ncurses-devel
|
|
|
|
Requires: gcc
|
2022-03-09 19:02:02 +01:00
|
|
|
Requires: make
|
2019-07-16 18:30:53 +03:00
|
|
|
Requires: perl
|
2022-06-09 17:28:02 +03:00
|
|
|
Requires: %{name} = %{EVRD}
|
2019-07-16 18:30:53 +03:00
|
|
|
Provides: kernel-devel = %{kverrel}
|
2019-11-17 15:12:03 +03:00
|
|
|
Provides: kernel-%{flavour}-devel = %{kverrel}
|
2021-05-03 15:56:13 +03:00
|
|
|
Provides: installonlypkg(kernel) = %{EVRD}.devel
|
2019-07-16 18:30:53 +03:00
|
|
|
|
2021-04-22 16:04:36 +03:00
|
|
|
# Have dkms updated/installed before the kernel, scriptlet here checks if dkms exists
|
2022-03-09 19:02:02 +01:00
|
|
|
OrderWithRequires(post): dkms
|
Delete old initrds by RPM
After moving to dnf (installonlypkg(kernel)) schema of packaging the kernel,
the %%postun scriptlet stopped working properly because $1 is the number
of packages left after the transaction, and there are multiple
kernels - packages with the same name but of different version/release - left.
Let's just make initrd be %%ghost as Fedora (but increase its size from Fedora's 20 MiB to 65 MiB),
and drop deleting empty directories etc. Recent commit fixed ownership of directories,
now /lib/modules/kernel_version is owned by RPM (it was not), dkms will remove modules
that it built, and, if anything else was left, then let's just not touch it, why must we delete
what we know nothing about?
Also delete scriptlet in the devel subpackage, that scriptlet would probably cause problems
with reinstalling the devel package.
2021-05-24 21:10:00 +03:00
|
|
|
# Try to remove the main kernel package after removing this devel package
|
|
|
|
# because there may be dkms-built kernel modules inside directories owned
|
|
|
|
# by the main package, try to get rid of such files before RPM starts to
|
|
|
|
# deal with directories owned in the main package
|
|
|
|
# (note that the devel package does not explicitly require the main package,
|
|
|
|
# there is no need to do so, a kernel module may be built using just the devel part).
|
|
|
|
OrderWithRequires(postun): %{name} = %{EVRD}
|
2021-04-22 16:04:36 +03:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
%ifarch %{ix86}
|
|
|
|
Conflicts: arch(x86_64)
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%description devel
|
2022-03-09 19:02:02 +01:00
|
|
|
This package contains the kernel files (headers and build tools) that should
|
|
|
|
be enough to build additional drivers for use with %{name}.
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%post devel
|
2020-08-03 21:07:52 +03:00
|
|
|
if command -v dkms_autoinstaller >/dev/null 2>&1; then
|
|
|
|
dkms_autoinstaller start %{kver_full}
|
|
|
|
fi
|
2019-07-16 18:30:53 +03:00
|
|
|
|
2019-11-12 16:16:27 +03:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
%preun devel
|
2019-07-16 18:30:53 +03:00
|
|
|
# If any DKMS modules with REMAKE_INITRD=yes in their configs have been
|
|
|
|
# uninstalled, initrd has been regenerated for the given kernel. However,
|
|
|
|
# the kernel itself might have been uninstalled before, so that (defunct)
|
|
|
|
# initrd image files would be left behind. Remove them if the kernel itself
|
|
|
|
# is no longer installed. Should work if they are uninstalled in parallel
|
|
|
|
# too.
|
|
|
|
if ! test -f /boot/vmlinuz-%{kver_full}; then
|
|
|
|
rm -f /boot/initrd-%{kver_full}.img
|
|
|
|
rm -f /boot/initrd-%{kver_full}_old.img
|
|
|
|
fi
|
|
|
|
|
2020-03-18 22:20:03 +03:00
|
|
|
if ! command -v dkms >/dev/null 2>&1; then exit 0; fi
|
|
|
|
|
|
|
|
for ii in $(/usr/sbin/dkms status -k %{kver_full} | awk '{ print $1 $2; }'); do
|
|
|
|
mod=$(echo $ii | awk -v FS=',' '{ print $1; }')
|
|
|
|
ver=$(echo $ii | awk -v FS=',' '{ print $2; }')
|
|
|
|
/usr/sbin/dkms --rpm_safe_upgrade uninstall -m $mod -v $ver -k %{kver_full} || :
|
|
|
|
done
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%files devel
|
2022-11-07 18:19:22 +03:00
|
|
|
%{devel_root}
|
2019-07-16 18:30:53 +03:00
|
|
|
%{_modulesdir}/%{kver_full}/build
|
|
|
|
%{_modulesdir}/%{kver_full}/source
|
2022-03-09 19:02:02 +01:00
|
|
|
%endif
|
|
|
|
# End of build_devel
|
2019-07-16 18:30:53 +03:00
|
|
|
|
|
|
|
############################################################################
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
%if %{build_debug}
|
2021-05-03 15:56:13 +03:00
|
|
|
%package debuginfo
|
|
|
|
Summary: Debuginfo for %{name}
|
2019-07-16 18:30:53 +03:00
|
|
|
Group: Development/Debug
|
|
|
|
Provides: kernel-debug = %{kverrel}
|
2022-03-09 19:02:02 +01:00
|
|
|
AutoReq: 0
|
|
|
|
AutoProv: 0
|
2019-07-16 18:30:53 +03:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%description debuginfo
|
|
|
|
This package contains the files with debuginfo for %{name}.
|
2019-07-16 18:30:53 +03:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%files debuginfo -f %{debuginfo_files}
|
|
|
|
%{_bootdir}/vmlinux-%{kver_full}
|
2022-03-09 19:02:02 +01:00
|
|
|
%endif
|
|
|
|
# End of build_debug
|
2019-07-16 18:30:53 +03:00
|
|
|
|
|
|
|
############################################################################
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
%if %{build_doc}
|
2021-05-03 15:56:13 +03:00
|
|
|
%package doc
|
2022-03-09 19:02:02 +01:00
|
|
|
Summary: Various documentation bits found in the kernel source
|
|
|
|
Group: Documentation
|
2022-03-15 17:03:05 +03:00
|
|
|
BuildArch: noarch
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%description doc
|
2019-07-16 18:30:53 +03:00
|
|
|
This package contains documentation files from the kernel source.
|
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%files doc
|
2019-07-21 21:43:25 +03:00
|
|
|
%doc linux-%{tar_ver}/Documentation/*
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
############################################################################
|
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
%if %{build_perf}
|
|
|
|
%package -n perf
|
|
|
|
Summary: perf tool and the supporting documentation
|
|
|
|
Group: System/Kernel and hardware
|
|
|
|
|
|
|
|
%description -n perf
|
2019-07-16 18:30:53 +03:00
|
|
|
The package contains perf tool and the supporting documentation.
|
|
|
|
|
|
|
|
%files -n perf
|
|
|
|
%{_bindir}/perf
|
|
|
|
%ifarch x86_64
|
|
|
|
%{_bindir}/perf-read-vdso32
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
2019-07-16 18:30:53 +03:00
|
|
|
%{_bindir}/trace
|
2022-03-23 12:00:37 +03:00
|
|
|
%{_includedir}/perf/perf_dlfilter.h
|
2023-03-16 15:10:04 +03:00
|
|
|
%dir %{_libexecdir}/perf-core
|
2019-07-16 18:30:53 +03:00
|
|
|
%dir %{_libdir}/traceevent
|
|
|
|
%dir %{_libdir}/traceevent/plugins
|
2022-03-13 17:36:13 +03:00
|
|
|
%{_libdir}/libperf-jvmti.so
|
2019-07-16 18:30:53 +03:00
|
|
|
%{_libdir}/traceevent/plugins/*
|
2023-03-16 15:10:04 +03:00
|
|
|
%{_libexecdir}/perf-core/*
|
2019-07-16 18:30:53 +03:00
|
|
|
%{_mandir}/man[1-8]/perf*
|
|
|
|
%{_sysconfdir}/bash_completion.d/perf
|
|
|
|
%{_datadir}/perf-core/strace/groups/*
|
|
|
|
%{_datadir}/doc/perf-tip/*.txt
|
|
|
|
/usr/lib/perf/examples/bpf/*
|
|
|
|
/usr/lib/perf/include/bpf/*
|
|
|
|
%endif
|
|
|
|
|
|
|
|
############################################################################
|
2013-11-16 00:27:01 +04:00
|
|
|
|
|
|
|
%if %{build_cpupower}
|
|
|
|
%package -n cpupower
|
2021-05-03 15:56:13 +03:00
|
|
|
|
2014-10-14 13:22:01 +04:00
|
|
|
Summary: The cpupower tools
|
2013-11-16 00:27:01 +04:00
|
|
|
Group: System/Kernel and hardware
|
|
|
|
|
|
|
|
%description -n cpupower
|
2014-10-14 13:22:01 +04:00
|
|
|
The cpupower tools.
|
2013-11-16 00:27:01 +04:00
|
|
|
|
|
|
|
%post -n cpupower
|
2014-04-18 15:05:40 +04:00
|
|
|
if [ $1 -ge 0 ]; then
|
2015-03-17 20:53:12 +03:00
|
|
|
# Do not enable/disable cpupower.service directly, because it should start
|
|
|
|
# when cpupower.path triggers it.
|
|
|
|
/bin/systemctl enable cpupower.path >/dev/null 2>&1 || :
|
|
|
|
/bin/systemctl start cpupower.path >/dev/null 2>&1 || :
|
2014-04-01 15:25:39 +04:00
|
|
|
fi
|
2013-11-16 00:27:01 +04:00
|
|
|
|
|
|
|
%preun -n cpupower
|
2014-04-01 15:25:39 +04:00
|
|
|
if [ $1 -eq 0 ]; then
|
2022-03-09 19:02:02 +01:00
|
|
|
/bin/systemctl --no-reload disable cpupower.path > /dev/null 2>&1 || :
|
|
|
|
/bin/systemctl stop cpupower.path > /dev/null 2>&1 || :
|
2014-04-01 15:25:39 +04:00
|
|
|
fi
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
%files -n cpupower -f cpupower.lang
|
2022-03-09 19:02:02 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/cpupower
|
2019-07-16 18:30:53 +03:00
|
|
|
%{_bindir}/cpupower
|
|
|
|
%{_bindir}/cpupower-start.sh
|
|
|
|
%{_libdir}/libcpupower.so.0
|
|
|
|
%{_libdir}/libcpupower.so.0.0.1
|
|
|
|
%{_unitdir}/cpupower.service
|
|
|
|
%{_unitdir}/cpupower.path
|
|
|
|
%{_datadir}/bash-completion/completions/cpupower
|
|
|
|
%{_mandir}/man[1-8]/cpupower*
|
|
|
|
|
|
|
|
############################################################################
|
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
%package -n cpupower-devel
|
2014-10-14 13:22:01 +04:00
|
|
|
Summary: Development files for cpupower
|
2013-11-16 00:27:01 +04:00
|
|
|
Group: Development/Kernel
|
2021-05-03 15:56:13 +03:00
|
|
|
Requires: cpupower = %{EVRD}
|
2013-11-16 00:27:01 +04:00
|
|
|
Conflicts: %{_lib}cpufreq-devel
|
|
|
|
|
|
|
|
%description -n cpupower-devel
|
|
|
|
This package contains the development files for cpupower.
|
2019-07-16 18:30:53 +03:00
|
|
|
|
|
|
|
%files -n cpupower-devel
|
|
|
|
%{_libdir}/libcpupower.so
|
|
|
|
%{_includedir}/cpufreq.h
|
2020-03-21 12:28:56 +03:00
|
|
|
%{_includedir}/cpuidle.h
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
############################################################################
|
|
|
|
|
2018-09-04 11:17:26 +03:00
|
|
|
%if %{build_headers}
|
2021-05-03 15:56:13 +03:00
|
|
|
%package -n kernel-headers
|
2013-11-16 00:27:01 +04:00
|
|
|
Summary: Linux kernel header files mostly used by your C library
|
|
|
|
Group: System/Kernel and hardware
|
2020-04-14 22:03:16 +03:00
|
|
|
Provides: linux-userspace-headers = %{EVRD}
|
|
|
|
Provides: kernel-release-headers = %{EVRD}
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%description -n kernel-headers
|
2013-11-16 00:27:01 +04:00
|
|
|
C header files from the Linux kernel. The header files define
|
|
|
|
structures and constants that are needed for building most
|
|
|
|
standard programs, notably the C library.
|
|
|
|
|
|
|
|
This package is not suitable for building kernel modules, you
|
|
|
|
should use the 'kernel-devel' package instead.
|
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%files -n kernel-headers
|
2020-03-21 12:28:56 +03:00
|
|
|
%{_includedir}/*
|
2013-11-16 00:27:01 +04:00
|
|
|
# Don't conflict with cpupower-devel
|
|
|
|
%if %{build_cpupower}
|
2020-03-21 12:28:56 +03:00
|
|
|
%exclude %{_includedir}/cpufreq.h
|
|
|
|
%exclude %{_includedir}/cpuidle.h
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
2022-03-23 12:00:37 +03:00
|
|
|
%if %{build_perf}
|
|
|
|
%exclude %{_includedir}/perf/perf_dlfilter.h
|
|
|
|
%endif
|
2018-09-04 11:17:26 +03:00
|
|
|
%endif
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
############################################################################
|
|
|
|
|
2020-03-13 20:35:12 +03:00
|
|
|
%if %{with uml}
|
2021-05-03 15:56:13 +03:00
|
|
|
%package uml
|
2020-03-13 20:35:12 +03:00
|
|
|
Summary: User Mode Linux binary
|
|
|
|
Group: System/Kernel and hardware
|
2021-05-03 15:56:13 +03:00
|
|
|
Provides: kernel-uml = %{kverrel}
|
|
|
|
Provides: kernel-uml-%{flavour} = %{kverrel}
|
|
|
|
Provides: installonlypkg(kernel) = %{EVRD}.uml
|
2020-03-13 20:35:12 +03:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%description uml
|
2020-03-18 22:20:03 +03:00
|
|
|
User Mode Linux binary.
|
2021-05-03 15:56:13 +03:00
|
|
|
Stripped, debug is in %{name}-debuginfo.
|
2020-03-13 20:35:12 +03:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%files uml
|
2020-03-13 20:35:12 +03:00
|
|
|
%{_bindir}/linux-uml-%{kver_full}
|
2022-03-09 19:02:02 +01:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
2020-03-13 20:35:12 +03:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%package uml-modules
|
2020-03-13 20:35:12 +03:00
|
|
|
Summary: User Mode Linux (UML) kernel modules
|
|
|
|
Group: System/Kernel and hardware
|
2021-05-03 15:56:13 +03:00
|
|
|
Provides: kernel-uml-modules = %{kverrel}
|
|
|
|
Provides: kernel-uml-modules-%{flavour} = %{kverrel}
|
|
|
|
Provides: installonlypkg(kernel-module) = %{EVRD}.uml
|
2020-03-13 20:35:12 +03:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%description uml-modules
|
2022-03-09 19:02:02 +01:00
|
|
|
User Mode Linux (UML) kernel modules:
|
|
|
|
- not compressed;
|
|
|
|
- not stripped;
|
|
|
|
- signed.
|
2020-03-13 20:35:12 +03:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%files uml-modules
|
2020-03-13 20:35:12 +03:00
|
|
|
/lib/modules-uml/%{kver_full}
|
2020-03-18 22:20:03 +03:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
%endif
|
|
|
|
# End of uml
|
2020-03-18 22:20:03 +03:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
#-----------------------------------------------------------------------------
|
2020-07-29 10:59:41 +03:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
###############################
|
|
|
|
# Extra modules package definitions
|
2020-07-29 10:59:41 +03:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
%if %{with binary_extra_modules}
|
2021-10-03 16:35:09 +03:00
|
|
|
%ksob_mk_module_pkg -n 8821cu -s net/wireless
|
2022-10-15 15:58:03 +03:00
|
|
|
# add "-r rtl88x2bu-blacklist" in 5.18+!!!
|
|
|
|
%ksob_mk_module_pkg -n 88x2bu -s net/wireless
|
|
|
|
# "-r xxx-blacklist" was not added for modules bellow because
|
|
|
|
# blacklisted modules have not appeared in upstream yet
|
|
|
|
%ksob_mk_module_pkg -n 8812au -s net/wireless
|
2022-10-15 15:39:08 +03:00
|
|
|
# for RTL8811AU and RTL8821AU
|
2022-10-15 15:58:03 +03:00
|
|
|
%ksob_mk_module_pkg -n 8821au -s net/wireless
|
|
|
|
%ksob_mk_module_pkg -n 8814au -s net/wireless
|
2022-10-15 18:02:04 +03:00
|
|
|
%ksob_mk_module_pkg -n rtk_btusb -s drivers/bluetooth -r rtk_btusb-firmware
|
2022-10-18 18:44:54 +03:00
|
|
|
%ksob_mk_module_pkg -n 8188gu -s net/wireless
|
|
|
|
%ksob_mk_module_pkg -n 8723du -s net/wireless
|
|
|
|
%ksob_mk_module_pkg -n 8852au -s net/wireless
|
|
|
|
%ksob_mk_module_pkg -n 8192du -s net/wireless
|
2023-03-16 22:43:59 +03:00
|
|
|
%ksob_mk_modules_pkg -n rtw89 -s net/wireless/realtek/rtw89p
|
2023-03-13 21:59:13 +03:00
|
|
|
%ksob_mk_module_pkg -n r8168 -s drivers/net/ethernet/realtek
|
2022-10-18 18:44:54 +03:00
|
|
|
|
2021-10-07 00:45:03 +03:00
|
|
|
%ifarch %{ix86} %{x86_64}
|
|
|
|
%ksob_mk_module_pkg -n wl -s net/wireless -r broadcom-wl-aliases
|
2022-10-16 00:19:07 +03:00
|
|
|
%kroko_kmod_pkg -r %{kroko_release} -j %{nvidia_340_j} -n %{nvidia_340_n} -f %{flavour} -k %{kernelversion}.%{patchlevel} -m %{sublevel} -p %{kver_full} -s %{NAME} -c %{kmod_suffix}
|
2022-09-26 15:32:27 +03:00
|
|
|
%kroko_kmod_pkg -r %{kroko_release} -j %{nvidia_390_j} -n %{nvidia_390_n} -f %{flavour} -k %{kernelversion}.%{patchlevel} -m %{sublevel} -p %{kver_full} -s %{NAME} -c %{kmod_suffix}
|
2021-10-07 00:45:03 +03:00
|
|
|
%endif
|
2021-10-19 21:43:37 +03:00
|
|
|
%ifarch %{x86_64}
|
2022-09-26 15:32:27 +03:00
|
|
|
%kroko_kmod_pkg -r %{kroko_release} -j %{nvidia_470_j} -n %{nvidia_470_n} -f %{flavour} -k %{kernelversion}.%{patchlevel} -m %{sublevel} -p %{kver_full} -s %{NAME} -c %{kmod_suffix}
|
|
|
|
%kroko_kmod_pkg -r %{kroko_release} -j %{nvidia_510_j} -n %{nvidia_510_n} -f %{flavour} -k %{kernelversion}.%{patchlevel} -m %{sublevel} -p %{kver_full} -s %{NAME} -c %{kmod_suffix}
|
|
|
|
%kroko_kmod_pkg -r %{kroko_release} -j %{nvidia_515_j} -n %{nvidia_515_n} -f %{flavour} -k %{kernelversion}.%{patchlevel} -m %{sublevel} -p %{kver_full} -s %{NAME} -c %{kmod_suffix}
|
2022-10-14 18:16:15 +03:00
|
|
|
%kroko_kmod_pkg -r %{kroko_release} -j %{nvidia_520_j} -n %{nvidia_520_n} -f %{flavour} -k %{kernelversion}.%{patchlevel} -m %{sublevel} -p %{kver_full} -s %{NAME} -c %{kmod_suffix}
|
2023-03-13 23:05:12 +03:00
|
|
|
%kroko_kmod_pkg -r %{kroko_release} -j %{nvidia_525_j} -n %{nvidia_525_n} -f %{flavour} -k %{kernelversion}.%{patchlevel} -m %{sublevel} -p %{kver_full} -s %{NAME} -c %{kmod_suffix}
|
2021-10-19 21:43:37 +03:00
|
|
|
%endif
|
2020-07-29 10:59:41 +03:00
|
|
|
%ksob_mk_module_pkg -n xt_TRIPSO -s net -r tripso
|
2021-04-01 14:30:32 +03:00
|
|
|
%ksob_mk_module_pkg -n xt_so -s net -r ipt-so
|
2021-10-16 20:11:50 +03:00
|
|
|
%ksob_mk_module_pkg -n v4l2loopback -s drivers/media -r v4l2loopback
|
2020-07-29 10:59:41 +03:00
|
|
|
|
Update from 5.4 to 5.10.1
- rediffed most of patches, renamed files to easify further rediffs by git format-patch
- thanks to abf.io/kernels_stable for some patches for kernel 5.9
- using unofficial patch for AUFS for kernel 5.10, there may be issues with stability, try to avoid using AUFS (I would have dropped it, but MagOS wants it very much)
- pulled updates of AltHa from http://git.altlinux.org/gears/k/kernel-image-un-def.git?p=kernel-image-un-def.git;a=history;f=security/altha;hb=HEAD
- dropped patch adding sysctl to disable disk-based swap because it has not found any usage
- bpf is now in the list of LSM modules (ability to write LSM modules as BPF programs), enable it, it is potentially useful and does not seem to be harmful
- keeping kernel libc headers in older kernels for now
- dropped building external virtualbox guest modules because they are now included into the mainline kernel
- offed building VirtualBox host modules, I do not know how to keep these binary modules in sync with userspace part of VirtualBox, users can continue using dkms
- offed building kernel-shredder because it is not buildable on kernel 5.10
- updated rtl8821ce and added a dependency from its "blacklist" subpackage here (see https://github.com/tomaspinho/rtl8821ce/commit/14b536f0)
It is not clear if kernel 5.10 will receive an LTS support longer than 5.4 or not. Support until Dec, 2022 is declared right now at https://www.kernel.org/category/releases.html for 5.10 and until Dec, 2025 - for 5.4.
TODO: update kernel configs
TODO: solve problems with version of virtualbox host modules not matching version of the virtualbox package after virtualbox is updated but kernel is not rebuilt
2020-12-20 18:49:24 +03:00
|
|
|
%if %{with binary_shredder}
|
2020-11-27 23:00:06 +03:00
|
|
|
%ksob_mk_module_pkg -n shredder-kernel -s extra -r rosa-shredder-user
|
|
|
|
%endif
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
###############
|
|
|
|
# Virtualbox host
|
Update from 5.4 to 5.10.1
- rediffed most of patches, renamed files to easify further rediffs by git format-patch
- thanks to abf.io/kernels_stable for some patches for kernel 5.9
- using unofficial patch for AUFS for kernel 5.10, there may be issues with stability, try to avoid using AUFS (I would have dropped it, but MagOS wants it very much)
- pulled updates of AltHa from http://git.altlinux.org/gears/k/kernel-image-un-def.git?p=kernel-image-un-def.git;a=history;f=security/altha;hb=HEAD
- dropped patch adding sysctl to disable disk-based swap because it has not found any usage
- bpf is now in the list of LSM modules (ability to write LSM modules as BPF programs), enable it, it is potentially useful and does not seem to be harmful
- keeping kernel libc headers in older kernels for now
- dropped building external virtualbox guest modules because they are now included into the mainline kernel
- offed building VirtualBox host modules, I do not know how to keep these binary modules in sync with userspace part of VirtualBox, users can continue using dkms
- offed building kernel-shredder because it is not buildable on kernel 5.10
- updated rtl8821ce and added a dependency from its "blacklist" subpackage here (see https://github.com/tomaspinho/rtl8821ce/commit/14b536f0)
It is not clear if kernel 5.10 will receive an LTS support longer than 5.4 or not. Support until Dec, 2022 is declared right now at https://www.kernel.org/category/releases.html for 5.10 and until Dec, 2025 - for 5.4.
TODO: update kernel configs
TODO: solve problems with version of virtualbox host modules not matching version of the virtualbox package after virtualbox is updated but kernel is not rebuilt
2020-12-20 18:49:24 +03:00
|
|
|
|
|
|
|
%if %{with binary_virtualbox_host}
|
2020-07-29 10:59:41 +03:00
|
|
|
%ksob_mk_module_pkg -n vboxnetflt -s misc
|
|
|
|
%ksob_mk_module_pkg -n vboxnetadp -s misc
|
|
|
|
%ksob_mk_module_pkg -n vboxdrv -s misc
|
|
|
|
%ksob_mk_module_pkg -n vboxpci -s misc
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# A package which will pull all those modules
|
2021-05-03 15:56:13 +03:00
|
|
|
%package -n kernel-modules-virtualbox-host-%{ksob_kernel}
|
2022-03-09 19:02:02 +01:00
|
|
|
Summary: Meta package to pull VirtualBox host kernel modules for kernel-%{flavour}-%{kernelversion}.%{patchlevel}
|
2022-03-15 17:03:05 +03:00
|
|
|
Group: System/Kernel and hardware
|
2023-03-13 21:59:13 +03:00
|
|
|
Requires: %ksob_module_pkg_name vboxnetflt
|
|
|
|
Requires: %ksob_module_pkg_name vboxnetadp
|
|
|
|
Requires: %ksob_module_pkg_name vboxdrv
|
|
|
|
Requires: %ksob_module_pkg_name vboxpci
|
2020-07-29 10:59:41 +03:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%description -n kernel-modules-virtualbox-host-%{ksob_kernel}
|
2022-03-09 19:02:02 +01:00
|
|
|
Meta package to pull VirtualBox host kernel modules for %{name}.
|
2020-07-29 10:59:41 +03:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
%files -n kernel-modules-virtualbox-host-%{ksob_kernel}
|
2020-07-29 10:59:41 +03:00
|
|
|
# empty
|
2022-03-09 19:02:02 +01:00
|
|
|
%endif
|
|
|
|
#End of ifarch x86
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
2020-07-29 10:59:41 +03:00
|
|
|
|
2020-08-06 17:26:48 +03:00
|
|
|
%if %{with nickel}
|
|
|
|
%ksob_mk_module_pkg -n nlkm -s misc
|
|
|
|
%ksob_mk_module_pkg -n memfreetest -s misc
|
|
|
|
%ksob_mk_module_pkg -n pcietest -s misc
|
|
|
|
%endif
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
%endif
|
|
|
|
# End of binary_extra_modules
|
2020-07-29 10:59:41 +03:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
#################################################################
|
2020-08-19 20:02:58 +03:00
|
|
|
|
|
|
|
%if %{with flow_abi}
|
|
|
|
%package -n kernel-%{kernelversion}.%{patchlevel}-rosa-flow-abi
|
2022-03-09 19:02:02 +01:00
|
|
|
Summary: Directory to install third-party binary kernel modules for kernels %{kernelversion}.%{patchlevel}.x
|
2022-03-15 17:03:05 +03:00
|
|
|
Group: System/Kernel and hardware
|
2020-08-19 20:02:58 +03:00
|
|
|
|
|
|
|
%description -n kernel-%{kernelversion}.%{patchlevel}-rosa-flow-abi
|
|
|
|
This package contains a directory to install third-party binary kernel modules for kernels %{kernelversion}.%{patchlevel}.x.
|
|
|
|
Some vendors provide binary-only kernel modules. They can put them into /lib/modules/%{kernelversion}.%{patchlevel}-rosa-flow-abi.
|
2022-03-09 19:02:02 +01:00
|
|
|
kmod tools will find them for kernels 5.4.x of "generic" and "nickel" flavours
|
|
|
|
but there is no guarantee that these modules will load and work correctly on
|
|
|
|
newer or older kernels then the ones they were build against.
|
2020-08-19 20:02:58 +03:00
|
|
|
|
|
|
|
We call this "flow ABI" because most ABIs are not changed between %{kernelversion}.%{patchlevel}.x releases,
|
|
|
|
but there are no specific guarantees. ABI may evolve and change.
|
|
|
|
We highly recommend to use DKMS and build third-party kernel modules from source for every kernel!
|
|
|
|
This package does nothing, just owns a directory for third-party binary kernel modules.
|
|
|
|
|
|
|
|
%files -n kernel-%{kernelversion}.%{patchlevel}-rosa-flow-abi
|
|
|
|
/lib/modules/%{kernelversion}.%{patchlevel}-rosa-flow-abi
|
2022-03-09 19:02:02 +01:00
|
|
|
%endif
|
|
|
|
# End of flow_abi
|
2020-08-19 20:02:58 +03:00
|
|
|
|
|
|
|
################################################
|
2020-03-13 20:35:12 +03:00
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
%prep
|
2022-03-09 19:02:02 +01:00
|
|
|
# Avoid accidental merge
|
2021-05-03 15:56:13 +03:00
|
|
|
%if 0%{?rpm5}
|
|
|
|
%{error:Package structure is for dnf, not for urpmi!}
|
|
|
|
%endif
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
%setup -q -n %{top_dir_name} -c
|
2020-03-13 20:35:12 +03:00
|
|
|
%if %{with uml}
|
|
|
|
cp -r %{src_dir} %{src_dir}.uml
|
|
|
|
%endif
|
2022-03-09 19:02:02 +01:00
|
|
|
cd %{src_dir}
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2020-11-26 18:48:55 +00:00
|
|
|
%autopatch -p1
|
2013-11-16 00:27:01 +04:00
|
|
|
|
|
|
|
#
|
|
|
|
# Setup Begin
|
|
|
|
#
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
##################################
|
2019-07-16 18:30:53 +03:00
|
|
|
# Kernel configuration
|
|
|
|
|
|
|
|
echo "Creating the kernel configuration file."
|
|
|
|
|
Revisited the set of kernel flavours and the generation of config files
Until now, the build system for the kernel supported a number of
flavours: nrj and non-nrj ones, desktop-, laptop-, server- and
netbook-oriented, etc.
It turned out over the years, however, that our users mostly need the
following:
* a kernel to use on the desktops (home and office use) with reasonable
default settings for performance and responsiveness;
* a kernel for laptops, with a bit more emphasis on power consumption.
Other variants were rarely used. We also did not have enough time to
properly support all these.
Besides, the kernels for ARM and other architectures need a somewhat
different build process than for x86. So, they are better off to be in
separate ABF projects, even if they are needed. No signs of ROSA on ARM
yet, btw.
So, I kept only nrj-desktop and nrj-laptop flavours and only x86.
Non-PAE systems also seem to be rare now, so I enabled PAE by default
for the 32-bit kernels. Non-PAE kernels are no longer built. If they are
needed, we may use a separate git branch or an ABF project for that.
To simplify debugging, maintenance and experimentation with the kernel
builds further, I revisited the process of preparing the kernel
configuration files. The goal is to get rid of a separate git repo with
the default configs (kernel-patches-and-configs) and keep everything in
this project.
The default config files are now kept here. For x86_64:
* kernel-x86_64.config contains the options for both nrj-desktop and
nrn-laptop flavours;
* kernel-{nrj_desktop|nrj_laptop}-x86_64.config files contain the
flavour-specific options.
This way, it is easier to track which config options changed when,
easier to experiment with the custom configs and so on.
The kernel will be built with debug info if rpmbuild is called with
"--with debug".
2016-07-21 13:56:25 +03:00
|
|
|
# Configs
|
2020-12-30 19:47:16 +03:00
|
|
|
cp %{SOURCE111} .
|
|
|
|
cp %{SOURCE112} .
|
|
|
|
cp %{SOURCE113} .
|
|
|
|
cp kernel-%{arch_suffix}.config .config
|
2019-07-16 18:30:53 +03:00
|
|
|
|
2020-03-13 20:51:12 +03:00
|
|
|
touch %{build_dir}/.config.append
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Get rid of unwanted files
|
2020-11-26 21:17:21 +00:00
|
|
|
find . -name '*~' -o -name '*.orig' -o -name '*.append' -delete
|
2022-03-09 19:02:02 +01:00
|
|
|
# Wipe all .gitignore/.get_maintainer.ignore files
|
2020-11-26 21:17:21 +00:00
|
|
|
find . -name "*.g*ignore" -delete
|
|
|
|
|
2022-07-11 16:39:46 +03:00
|
|
|
# Disable debug info if requested (enabled by default)
|
|
|
|
%if ! %build_debug
|
|
|
|
sed -i -e '/CONFIG_DEBUG_INFO/d' -e '/CONFIG_GDB_SCRIPTS/d' .config
|
|
|
|
echo '# CONFIG_DEBUG_INFO is not set' >> %{build_dir}/.config.append
|
|
|
|
echo '# CONFIG_GDB_SCRIPTS is not set' >> %{build_dir}/.config.append
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
|
|
|
|
2020-12-30 19:47:16 +03:00
|
|
|
sed -i '/CONFIG_MODULE_SIG_FORCE/d' .config
|
2019-11-21 21:17:42 +03:00
|
|
|
%if %{with oblig_signed_modules}
|
2019-11-11 17:47:53 +03:00
|
|
|
# Disallow loading not signed modules
|
2020-12-30 19:47:16 +03:00
|
|
|
# But 0001-ROSA-ima-allow-to-off-modules-signature-check-dynami.patch allows to override this in cmdline
|
2020-03-13 20:35:12 +03:00
|
|
|
echo CONFIG_MODULE_SIG_FORCE=y >> %{build_dir}/.config.append
|
2019-11-21 21:17:42 +03:00
|
|
|
%else
|
2020-03-13 20:35:12 +03:00
|
|
|
echo CONFIG_MODULE_SIG_FORCE=n >> %{build_dir}/.config.append
|
2019-11-21 21:17:42 +03:00
|
|
|
%endif
|
2020-12-30 19:47:16 +03:00
|
|
|
|
|
|
|
sed -i '/CONFIG_MODULE_SIG_KEY/d' .config
|
2019-12-01 02:03:15 +03:00
|
|
|
# Set path to the key that will be generated later by openssl/libressl
|
2020-03-13 20:35:12 +03:00
|
|
|
echo CONFIG_MODULE_SIG_KEY=\"%{certs_signing_key_priv_rnd}\" >> %{build_dir}/.config.append
|
2020-12-30 19:47:16 +03:00
|
|
|
|
2019-11-18 18:48:33 +03:00
|
|
|
# Set path to one PEM file with all keys that the kernel must trust
|
|
|
|
sed -i '/CONFIG_SYSTEM_TRUSTED_KEYS/d' .config
|
2020-03-13 20:35:12 +03:00
|
|
|
echo CONFIG_SYSTEM_TRUSTED_KEYS=\"%{certs_public_keys}\" >> %{build_dir}/.config.append
|
2020-12-30 19:47:16 +03:00
|
|
|
|
2019-11-14 01:08:33 +03:00
|
|
|
# Memory wiping
|
|
|
|
# Introduced in kernel 5.3 by commit 6471384af2a6530696fc0203bafe4de41a23c9ef
|
|
|
|
# Estimated performance impact is described in the commit
|
|
|
|
# "Fill newly allocated pages and heap objects with zeroes."
|
|
|
|
# To enable, add to cmdline: init_on_alloc=1
|
2020-03-18 22:20:03 +03:00
|
|
|
sed -i '/CONFIG_INIT_ON_ALLOC_DEFAULT_ON/d' .config
|
|
|
|
echo CONFIG_INIT_ON_ALLOC_DEFAULT_ON=n >> %{build_dir}/.config.append
|
2019-11-14 01:08:33 +03:00
|
|
|
# "Fill freed pages and heap objects with zeroes"
|
|
|
|
# To disable, add to cmdline: init_on_free=0
|
2020-03-18 22:20:03 +03:00
|
|
|
sed -i '/CONFIG_INIT_ON_FREE_DEFAULT_ON/d' .config
|
|
|
|
%if %{with nickel}
|
2020-03-13 20:35:12 +03:00
|
|
|
echo CONFIG_INIT_ON_FREE_DEFAULT_ON=y >> %{build_dir}/.config.append
|
2020-03-18 22:20:03 +03:00
|
|
|
%else
|
|
|
|
echo CONFIG_INIT_ON_FREE_DEFAULT_ON=n >> %{build_dir}/.config.append
|
|
|
|
%endif
|
2019-11-14 01:08:33 +03:00
|
|
|
# Here enabling only either only init_on_free or only init_on_alloc
|
|
|
|
# makes sense; init_on_alloc is not about protecting information.
|
2020-03-13 20:35:12 +03:00
|
|
|
|
2020-03-20 21:28:35 +03:00
|
|
|
# To load kernel keyring in UML
|
|
|
|
for i in STREEBOG SHA1 SHA256 SHA512 ECRDSA RSA ; do
|
2020-12-30 19:47:16 +03:00
|
|
|
if ! grep -q "^CONFIG_CRYPTO_${i}=y$" .config; then
|
|
|
|
sed -i "/CONFIG_CRYPTO_${i}/d" .config
|
|
|
|
echo "CONFIG_CRYPTO_${i}=y" >> %{build_dir}/.config.append
|
|
|
|
fi
|
2020-03-20 21:28:35 +03:00
|
|
|
done
|
2020-03-16 23:19:46 +03:00
|
|
|
|
2020-03-13 20:35:12 +03:00
|
|
|
cat %{build_dir}/.config.append >> .config
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
##################
|
|
|
|
# End of kernel config
|
|
|
|
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# Store the config file in the appropriate directory.
|
2020-11-26 18:48:55 +00:00
|
|
|
CONFIG_DIR=arch/%{arch_type}/configs
|
Revisited the set of kernel flavours and the generation of config files
Until now, the build system for the kernel supported a number of
flavours: nrj and non-nrj ones, desktop-, laptop-, server- and
netbook-oriented, etc.
It turned out over the years, however, that our users mostly need the
following:
* a kernel to use on the desktops (home and office use) with reasonable
default settings for performance and responsiveness;
* a kernel for laptops, with a bit more emphasis on power consumption.
Other variants were rarely used. We also did not have enough time to
properly support all these.
Besides, the kernels for ARM and other architectures need a somewhat
different build process than for x86. So, they are better off to be in
separate ABF projects, even if they are needed. No signs of ROSA on ARM
yet, btw.
So, I kept only nrj-desktop and nrj-laptop flavours and only x86.
Non-PAE systems also seem to be rare now, so I enabled PAE by default
for the 32-bit kernels. Non-PAE kernels are no longer built. If they are
needed, we may use a separate git branch or an ABF project for that.
To simplify debugging, maintenance and experimentation with the kernel
builds further, I revisited the process of preparing the kernel
configuration files. The goal is to get rid of a separate git repo with
the default configs (kernel-patches-and-configs) and keep everything in
this project.
The default config files are now kept here. For x86_64:
* kernel-x86_64.config contains the options for both nrj-desktop and
nrn-laptop flavours;
* kernel-{nrj_desktop|nrj_laptop}-x86_64.config files contain the
flavour-specific options.
This way, it is easier to track which config options changed when,
easier to experiment with the custom configs and so on.
The kernel will be built with debug info if rpmbuild is called with
"--with debug".
2016-07-21 13:56:25 +03:00
|
|
|
mkdir -p "${CONFIG_DIR}"
|
|
|
|
|
2020-11-26 18:48:55 +00:00
|
|
|
cfg_file=arch/%{arch_type}/configs/%{arch_suffix}_defconfig-%{flavour}
|
2021-05-22 12:08:22 +03:00
|
|
|
|
|
|
|
make ARCH=%{arch_type} oldconfig
|
|
|
|
# When it is needed to edit kernel configs, run:
|
2021-06-01 07:01:02 +03:00
|
|
|
# abf fetch
|
|
|
|
# rpmbuild --define "_sourcedir $PWD" --with=fail -bb kernel.spec
|
2021-05-22 12:08:22 +03:00
|
|
|
# and then work with the config in the buildroot with applied patches etc.
|
|
|
|
%{?_with_fail:exit 1}
|
2019-07-16 18:30:53 +03:00
|
|
|
mv .config ${cfg_file}
|
|
|
|
echo "Created ${cfg_file}."
|
2016-07-22 16:37:05 +03:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Make sure the kernel has the sublevel we know it has...
|
2019-07-16 18:30:53 +03:00
|
|
|
LC_ALL=C sed -ri "s/^SUBLEVEL.*/SUBLEVEL = %{sublevel}/" Makefile
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Get rid of unwanted files
|
2013-11-16 00:27:01 +04:00
|
|
|
find . -name '*~' -o -name '*.orig' -o -name '*.append' | %kxargs rm -f
|
2015-10-13 10:17:01 +03:00
|
|
|
find . -name '.get_maintainer.ignore' | %kxargs rm -f
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Versionize python shebang (#!/usr/bin/env python -> #!/usr/bin/python3) in scripts
|
2022-11-07 03:13:34 +03:00
|
|
|
grep -Irl '^#!/usr/bin/env python' | xargs sed -i '1 s,^#!/usr/bin/env python$,#!%{__python3},'
|
2022-03-09 19:02:02 +01:00
|
|
|
|
|
|
|
# Drop env from bash scripts
|
2022-03-17 10:23:10 +03:00
|
|
|
sed -i '1 s,^#!.*env .*,#!%{_bindir}/bash,' scripts/config
|
2022-03-09 19:02:02 +01:00
|
|
|
|
|
|
|
# Drop env from perl scripts
|
2022-11-07 03:13:34 +03:00
|
|
|
grep -IrlE '^#!.*env perl' | xargs sed -i -e '1 s,^#!/usr/bin/env perl$,#!{_bindir}/perl,'
|
2022-03-09 19:02:02 +01:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
############################################################################
|
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
%build
|
2019-11-11 22:27:50 +03:00
|
|
|
# Ensure that build time generated private keys don't get published
|
|
|
|
# as e.g. "RPM build root" on ABF!
|
|
|
|
# Note that ABF sends SIGKILL to rpm-build.sh when the build is terminated;
|
|
|
|
# in this case trap will not work, but RPM build root also will not be
|
|
|
|
# saved because rpm-build.sh saves it, but it is SIGKILLed.
|
|
|
|
# For best security we could store private keys in RAM (not reachable from
|
|
|
|
# filesystem, so not in /tmp!) and override sth like fopen() by LD_PRELOAD
|
|
|
|
# to give the content of keys from RAM when a virtual address of a key file
|
|
|
|
# is accessed, but currently I don't know how to implement this (TODO: ).
|
|
|
|
_cleanup(){
|
2022-03-09 19:02:02 +01:00
|
|
|
# Show resulting kernel public keys for debugging
|
2020-03-14 22:02:48 +03:00
|
|
|
cat "%{src_dir}/%{certs_dir_rnd}/x509_certificate_list" | base64 -d || :
|
2020-03-14 13:49:15 +03:00
|
|
|
rm -fvr "%{src_dir}/%{certs_dir_rnd}"
|
2020-03-13 20:35:12 +03:00
|
|
|
%if %{with uml}
|
2020-03-14 22:02:48 +03:00
|
|
|
cat "%{src_dir}.uml/%{certs_dir_rnd}/x509_certificate_list" | base64 -d || :
|
2020-03-13 20:35:12 +03:00
|
|
|
rm -fvr "%{src_dir}.uml/%{certs_dir_rnd}"
|
|
|
|
%endif
|
2019-11-11 22:27:50 +03:00
|
|
|
}
|
|
|
|
# Make a trap to delete keys even if %%build fails in the middle
|
|
|
|
trap "_cleanup" EXIT
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
rm -rf %{temp_root}
|
|
|
|
install -d %{temp_root}
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
cd %{src_dir}
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-11-11 17:47:53 +03:00
|
|
|
### Keys for signing kernel modules
|
|
|
|
# Keys can be generated both manually and automatically,
|
|
|
|
# let's generate them by ourselves to take full control of the process
|
|
|
|
# https://www.ibm.com/support/knowledgecenter/en/SSB23S_1.1.0.13/gtps7/cfgcert.html
|
2019-11-17 16:09:47 +03:00
|
|
|
# See also certs/Makefile in kernel source
|
2019-11-11 17:47:53 +03:00
|
|
|
mkdir -p "%{certs_dir_rnd}"
|
2019-11-12 02:06:06 +03:00
|
|
|
|
|
|
|
# On ABF, %%packager == $username <$email>
|
|
|
|
# Try to extract email from %%packager if it is set
|
|
|
|
_get_email(){
|
|
|
|
# Check that macro %%packager was set and is not empty
|
|
|
|
if echo '%{packager}' | grep -q 'packager}$' || [ -z "%{packager}" ]
|
|
|
|
# If was not set or is empty, use default email
|
|
|
|
then echo 'rpmbuild@rosa.unknown' && return
|
|
|
|
# Otherwise try to extract email from 'name <email>' or sth else
|
|
|
|
else temp="$(echo '%{packager}' | tr '[:upper:]' '[:lower:]' | tr ' ' '\n' | tr -d '<>' | grep -E '@.*\..*' | head -n 1)"
|
|
|
|
fi
|
|
|
|
# Validate that what we have now is a valid email
|
|
|
|
# https://stackoverflow.com/a/2138832, https://stackoverflow.com/a/41192733
|
|
|
|
# Note that we set %%_buildshell to /bin/bash to guarantee the work of this bashism
|
|
|
|
regex_email="^[a-z0-9!#\$%&'*+/=?^_\`{|}~-]+(\.[a-z0-9!#$%&'*+/=?^_\`{|}~-]+)*@([a-z0-9]([a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]([a-z0-9-]*[a-z0-9])?\$"
|
|
|
|
if [[ "$temp" =~ ${regex_email} ]]
|
|
|
|
# If it is, use it
|
|
|
|
then echo "$temp" && return
|
|
|
|
# Otherwise use default email
|
|
|
|
else echo 'rpmbuild@rosa.unknown' && return
|
|
|
|
fi
|
|
|
|
# If script above has not return'ed for any reason,
|
|
|
|
# e.g. because of non-bash shell being not able to
|
|
|
|
# process regexp, use default email
|
|
|
|
echo 'rpmbuild@rosa.unknown'
|
|
|
|
}
|
|
|
|
email="$(_get_email)"
|
|
|
|
|
2019-11-11 17:47:53 +03:00
|
|
|
cat <<EOF > "%{certs_key_config_rnd}"
|
|
|
|
[ req ]
|
|
|
|
prompt = no
|
2019-11-17 16:09:47 +03:00
|
|
|
string_mask = utf8only
|
2022-03-09 19:02:02 +01:00
|
|
|
#default_keyfile = %%{certs_signing_key_priv_rnd}
|
2019-11-11 17:47:53 +03:00
|
|
|
distinguished_name = req_distinguished_name
|
2019-11-17 16:09:47 +03:00
|
|
|
x509_extensions = myexts
|
2019-11-11 17:47:53 +03:00
|
|
|
[ req_distinguished_name ]
|
|
|
|
organizationName = %{vendor} rpmbuild
|
2020-03-18 23:36:11 +03:00
|
|
|
commonName = Build time autogenerated @ALGO@ kernel key
|
2019-11-12 02:06:06 +03:00
|
|
|
emailAddress = ${email}
|
2019-11-17 16:09:47 +03:00
|
|
|
[ myexts ]
|
|
|
|
basicConstraints=critical,CA:FALSE
|
|
|
|
keyUsage=digitalSignature
|
|
|
|
subjectKeyIdentifier=hash
|
|
|
|
authorityKeyIdentifier=keyid
|
2019-11-11 17:47:53 +03:00
|
|
|
EOF
|
|
|
|
cat "%{certs_key_config_rnd}"
|
2020-03-18 23:36:11 +03:00
|
|
|
sed -e 's,@ALGO@,RSA,g' "%{certs_key_config_rnd}" > "%{certs_key_config_rnd}.RSA"
|
|
|
|
sed -e 's,@ALGO@,GOST R 34.10-2012,g' "%{certs_key_config_rnd}" > "%{certs_key_config_rnd}.GOST"
|
2022-03-09 19:02:02 +01:00
|
|
|
# Avoid using the template
|
2020-03-18 23:36:11 +03:00
|
|
|
rm -f "%{certs_key_config_rnd}"
|
|
|
|
|
|
|
|
_libressl_gen_key(){
|
|
|
|
if [ "$GOST_KEY" = 1 ]
|
|
|
|
then
|
|
|
|
lssl_req_gost_args="\
|
|
|
|
-newkey gost2001 \
|
|
|
|
-pkeyopt dgst:streebog512 -pkeyopt paramset:A \
|
|
|
|
-streebog512"
|
|
|
|
OUT="%{certs_signing_key_priv_rnd}.GOST"
|
|
|
|
CONFIG="%{certs_key_config_rnd}.GOST"
|
|
|
|
else
|
|
|
|
lssl_req_gost_args=""
|
|
|
|
OUT="%{certs_signing_key_priv_rnd}.RSA"
|
|
|
|
CONFIG="%{certs_key_config_rnd}.RSA"
|
|
|
|
fi
|
|
|
|
libressl req -new -nodes -utf8 -batch \
|
|
|
|
$lssl_req_gost_args \
|
|
|
|
-days 109500 \
|
|
|
|
-x509 -config "$CONFIG" \
|
|
|
|
-out "$OUT" \
|
|
|
|
-keyout "$OUT"
|
|
|
|
|
|
|
|
# Verify
|
|
|
|
if [ "$GOST_KEY" = 1 ]; then
|
|
|
|
libressl x509 -in "%{certs_signing_key_priv_rnd}.GOST" -text -noout \
|
|
|
|
| grep -E 'Signature Algorithm:.*GOST R 34.10-2012'
|
|
|
|
libressl x509 -in "%{certs_signing_key_priv_rnd}.GOST" -text -noout \
|
|
|
|
| grep -E 'Digest Algorithm:.*GOST R 34-11-2012'
|
|
|
|
libressl x509 -in "%{certs_signing_key_priv_rnd}.GOST" -text -noout \
|
|
|
|
| grep -E 'Public Key Algorithm:.*GOST R 34.10-2012'
|
|
|
|
fi
|
|
|
|
}
|
2019-11-11 17:47:53 +03:00
|
|
|
|
2020-03-18 23:36:11 +03:00
|
|
|
GOST_KEY=0 _libressl_gen_key
|
|
|
|
GOST_KEY=1 _libressl_gen_key
|
|
|
|
# Fake CONFIG_MODULE_SIG_KEY to make build scripts happy
|
|
|
|
cp -v "%{certs_signing_key_priv_rnd}.RSA" "%{certs_signing_key_priv_rnd}"
|
2019-11-17 16:56:39 +03:00
|
|
|
|
2020-03-18 23:36:11 +03:00
|
|
|
# Strip public parts from the generated PEMs
|
2019-11-18 18:48:33 +03:00
|
|
|
sed -n \
|
2020-03-18 23:36:11 +03:00
|
|
|
'/^-----BEGIN CERTIFICATE-----$/,/^-----END CERTIFICATE-----$/p' \
|
|
|
|
"%{certs_signing_key_priv_rnd}.GOST" \
|
|
|
|
"%{certs_signing_key_priv_rnd}.RSA" \
|
|
|
|
> "%{certs_public_keys}"
|
2019-12-07 21:57:55 +03:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Link sign-file and extract-cert with LibreSSL instead of OpenSSL
|
2019-12-07 21:57:55 +03:00
|
|
|
if [ $? != 0 ] ; then exit $? ; fi
|
|
|
|
sed -i %{src_dir}/scripts/Makefile \
|
2020-03-13 20:35:12 +03:00
|
|
|
%if %{with uml}
|
2022-03-15 17:03:05 +03:00
|
|
|
%{src_dir}.uml/scripts/Makefile \
|
2020-03-13 20:35:12 +03:00
|
|
|
%endif
|
2021-02-22 13:17:43 +03:00
|
|
|
-e "s, libcrypto , libressl-libcrypto ,g"
|
2019-11-18 18:48:33 +03:00
|
|
|
|
2020-03-18 23:36:11 +03:00
|
|
|
%if %{with additional_keys}
|
2020-03-15 20:26:01 +03:00
|
|
|
# Add additional public RSA keys to the list of trusted keys for kernel modules
|
2019-11-17 16:56:39 +03:00
|
|
|
# Build kernel --without additional_keys if you do not want to trust them
|
2020-03-15 20:26:01 +03:00
|
|
|
cat %{expand:%(for i in `seq 1 12`; do echo "%%SOURCE$((200+${i}))" | tr "\n" " "; done)} \
|
|
|
|
>> "%{certs_public_keys}"
|
2022-03-09 19:02:02 +01:00
|
|
|
%endif
|
|
|
|
# End of additional_keys
|
2019-11-19 00:24:49 +03:00
|
|
|
cat %{certs_public_keys}
|
2019-11-11 17:47:53 +03:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# .config
|
|
|
|
%smake -s mrproper
|
2020-11-26 18:48:55 +00:00
|
|
|
cp arch/%{arch_type}/configs/%{arch_suffix}_defconfig-%{flavour} .config
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Make sure EXTRAVERSION says what we want it to say
|
2019-07-16 18:30:53 +03:00
|
|
|
LC_ALL=C sed -ri "s/^EXTRAVERSION.*/EXTRAVERSION = -%{flavour}-%{buildrpmrel}/" Makefile
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Build the kernel
|
2019-07-16 18:30:53 +03:00
|
|
|
echo "Building kernel %{kver_full}"
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2020-11-26 21:09:27 +00:00
|
|
|
TARGETS="all"
|
|
|
|
# need to install dtbs to proper boot arm64 devices
|
2021-05-22 11:56:21 +03:00
|
|
|
%ifarch %{armx}
|
2020-11-26 21:09:27 +00:00
|
|
|
TARGETS="$TARGETS dtbs"
|
|
|
|
%endif
|
|
|
|
|
2021-02-23 17:35:52 +03:00
|
|
|
%kmake V=1 -s $TARGETS
|
2015-04-23 12:11:47 +03:00
|
|
|
|
2020-07-29 10:59:41 +03:00
|
|
|
# Install modules
|
|
|
|
mkdir -p %{temp_modules}/%{kver_full}
|
|
|
|
%smake INSTALL_MOD_PATH=%{temp_root} KERNELRELEASE=%{kver_full} modules_install
|
|
|
|
|
|
|
|
%if %{with binary_extra_modules}
|
|
|
|
# Build and install procedure is specific to each Makefile from kernmel-source-* packages
|
|
|
|
# See also: https://www.kernel.org/doc/html/latest/kbuild/modules.html
|
|
|
|
# Copy directory because write permissions are required
|
|
|
|
# `make modules_install` must be done before this, otherwise these copied files will be deleted
|
|
|
|
|
2022-10-18 18:44:54 +03:00
|
|
|
# $1: name of kernel module
|
|
|
|
# $2: directory (e.g.: kernel/net/wireless)
|
|
|
|
_build_rtl(){
|
|
|
|
cp -r "$(rpm -q --qf "/usr/src/rtl${1}-%%{VERSION}-%%{RELEASE}" kernel-source-rtl${1})" kernel-source-rtl${1}
|
|
|
|
pushd kernel-source-rtl${1}
|
|
|
|
%kmake KSRC=%{src_dir} M="$PWD"
|
|
|
|
mkdir -p %{temp_modules}/%{kver_full}/${2}
|
|
|
|
cp ${1}.ko %{temp_modules}/%{kver_full}/${2}
|
|
|
|
popd
|
|
|
|
rm -fr kernel-source-rtl${1}
|
|
|
|
}
|
2022-10-15 15:39:08 +03:00
|
|
|
|
2022-10-18 18:44:54 +03:00
|
|
|
_build_rtl 8821cu kernel/net/wireless
|
|
|
|
_build_rtl 88x2bu kernel/net/wireless
|
|
|
|
_build_rtl 8812au kernel/net/wireless
|
|
|
|
_build_rtl 8821au kernel/net/wireless
|
|
|
|
_build_rtl 8821au kernel/net/wireless
|
|
|
|
_build_rtl 8814au kernel/net/wireless
|
|
|
|
_build_rtl 8188gu kernel/net/wireless
|
|
|
|
_build_rtl 8723du kernel/net/wireless
|
|
|
|
_build_rtl 8852au kernel/net/wireless
|
|
|
|
_build_rtl 8192du kernel/net/wireless
|
2022-10-15 15:52:51 +03:00
|
|
|
|
2023-03-13 21:59:13 +03:00
|
|
|
cp -r "$(rpm -q --qf "/usr/src/r8168-%%{VERSION}-%%{RELEASE}" kernel-source-r8168)" kernel-source-r8168
|
|
|
|
pushd kernel-source-r8168
|
|
|
|
%kmake -C %{src_dir} KERNELRELEASE=%{kver_full} KERNELDIR=%{src_dir} M="$PWD" modules
|
|
|
|
mkdir -p %{temp_modules}/%{kver_full}/kernel/drivers/net/ethernet/realtek
|
|
|
|
cp r8168.ko %{temp_modules}/%{kver_full}/kernel/drivers/net/ethernet/realtek
|
|
|
|
popd
|
|
|
|
rm -fr kernel-source-r8168
|
|
|
|
|
2022-10-15 18:02:04 +03:00
|
|
|
cp -r "$(rpm -q --qf '/usr/src/rtk_btusb-%%{VERSION}-%%{RELEASE}' kernel-source-rtk_btusb)" kernel-source-rtk_btusb
|
|
|
|
pushd kernel-source-rtk_btusb
|
|
|
|
%kmake KDIR=%{src_dir}
|
|
|
|
mkdir -p %{temp_modules}/%{kver_full}/kernel/drivers/bluetooth/
|
|
|
|
cp rtk_btusb.ko %{temp_modules}/%{kver_full}/kernel/drivers/bluetooth/rtk_btusb.ko
|
|
|
|
popd
|
|
|
|
rm -fr kernel-source-rtk_btusb
|
|
|
|
|
2023-03-16 22:43:59 +03:00
|
|
|
cp -r "$(rpm -q --qf '/usr/src/rtw89-%%{VERSION}-%%{RELEASE}' kernel-source-rtw89)" kernel-source-rtw89
|
|
|
|
pushd kernel-source-rtw89
|
|
|
|
%kmake KSRC=%{src_dir}
|
|
|
|
mkdir -p %{temp_modules}/%{kver_full}/kernel/net/wireless/realtek/rtw89p
|
|
|
|
cp *.ko %{temp_modules}/%{kver_full}/kernel/net/wireless/realtek/rtw89p
|
|
|
|
popd
|
|
|
|
rm -fr kernel-source-rtw89
|
|
|
|
|
2021-10-19 21:43:37 +03:00
|
|
|
_build_nvidia(){
|
|
|
|
cp -r "$(rpm -q --qf "/usr/src/nvidia${1}-%%{VERSION}-%%{RELEASE}" kernel-source-nvidia${1})" kernel-source-nvidia${1}
|
|
|
|
pushd kernel-source-nvidia${1}
|
|
|
|
%make SYSSRC=%{src_dir}
|
2022-09-26 15:32:27 +03:00
|
|
|
mkdir -p %{temp_modules}/%{kver_full}/kernel/drivers/video/nvidia${1}.%{kroko_release}
|
|
|
|
for i in *.ko
|
|
|
|
do
|
|
|
|
# put them here to extract debug and compress, will be moved later
|
|
|
|
install -m0644 "$i" %{temp_modules}/%{kver_full}/kernel/drivers/video/nvidia${1}.%{kroko_release}/"$i"
|
|
|
|
done
|
2021-10-19 21:43:37 +03:00
|
|
|
popd
|
|
|
|
rm -fr kernel-source-nvidia${1}
|
2022-09-26 15:32:27 +03:00
|
|
|
# for rosa-kernel-tools
|
|
|
|
mkdir -p %{temp_root}/var/spool/initramfs-regen
|
|
|
|
touch %{temp_root}/var/spool/initramfs-regen/nvidia${1}.%{kroko_release}
|
2021-10-19 21:43:37 +03:00
|
|
|
}
|
|
|
|
|
2021-10-07 00:45:03 +03:00
|
|
|
%ifarch %{ix86} %{x86_64}
|
|
|
|
cp -r "$(rpm -q --qf '/usr/src/broadcom-wl-%%{VERSION}-%%{RELEASE}' kernel-source-broadcom-wl)" kernel-source-broadcom-wl
|
|
|
|
pushd kernel-source-broadcom-wl
|
|
|
|
%kmake -C %{src_dir} M="$PWD"
|
|
|
|
mkdir -p %{temp_modules}/%{kver_full}/kernel/net/wireless/
|
|
|
|
cp wl.ko %{temp_modules}/%{kver_full}/kernel/net/wireless/wl.ko
|
|
|
|
popd
|
|
|
|
rm -fr kernel-source-broadcom-wl
|
2021-10-10 16:12:22 +03:00
|
|
|
|
2022-10-16 00:19:07 +03:00
|
|
|
_build_nvidia 340
|
2021-10-19 21:43:37 +03:00
|
|
|
_build_nvidia 390
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%ifarch %{x86_64}
|
|
|
|
_build_nvidia 470
|
2022-05-04 10:07:56 +03:00
|
|
|
_build_nvidia 510
|
2022-05-28 12:25:23 +03:00
|
|
|
_build_nvidia 515
|
2022-10-14 18:16:15 +03:00
|
|
|
_build_nvidia 520
|
2023-03-13 23:05:12 +03:00
|
|
|
_build_nvidia 525
|
2021-10-07 00:45:03 +03:00
|
|
|
%endif
|
|
|
|
|
2020-07-29 10:59:41 +03:00
|
|
|
cp -r "$(rpm -q --qf '/usr/src/tripso-%%{VERSION}-%%{RELEASE}' kernel-source-tripso)" kernel-source-tripso
|
|
|
|
pushd kernel-source-tripso
|
|
|
|
%kmake KDIR=%{src_dir}
|
|
|
|
mkdir -p %{temp_modules}/%{kver_full}/kernel/net
|
|
|
|
cp xt_TRIPSO.ko %{temp_modules}/%{kver_full}/kernel/net/
|
|
|
|
popd
|
|
|
|
rm -fr kernel-source-tripso
|
|
|
|
|
2021-04-01 14:30:32 +03:00
|
|
|
cp -r "$(rpm -q --qf '/usr/src/ipt-so-%%{VERSION}-%%{RELEASE}' kernel-source-ipt-so)" kernel-source-ipt-so
|
|
|
|
pushd kernel-source-ipt-so
|
|
|
|
%kmake KDIR=%{src_dir}
|
|
|
|
mkdir -p %{temp_modules}/%{kver_full}/kernel/net
|
|
|
|
cp xt_so.ko %{temp_modules}/%{kver_full}/kernel/net/
|
|
|
|
popd
|
|
|
|
rm -fr kernel-source-ipt-so
|
|
|
|
|
Update from 5.4 to 5.10.1
- rediffed most of patches, renamed files to easify further rediffs by git format-patch
- thanks to abf.io/kernels_stable for some patches for kernel 5.9
- using unofficial patch for AUFS for kernel 5.10, there may be issues with stability, try to avoid using AUFS (I would have dropped it, but MagOS wants it very much)
- pulled updates of AltHa from http://git.altlinux.org/gears/k/kernel-image-un-def.git?p=kernel-image-un-def.git;a=history;f=security/altha;hb=HEAD
- dropped patch adding sysctl to disable disk-based swap because it has not found any usage
- bpf is now in the list of LSM modules (ability to write LSM modules as BPF programs), enable it, it is potentially useful and does not seem to be harmful
- keeping kernel libc headers in older kernels for now
- dropped building external virtualbox guest modules because they are now included into the mainline kernel
- offed building VirtualBox host modules, I do not know how to keep these binary modules in sync with userspace part of VirtualBox, users can continue using dkms
- offed building kernel-shredder because it is not buildable on kernel 5.10
- updated rtl8821ce and added a dependency from its "blacklist" subpackage here (see https://github.com/tomaspinho/rtl8821ce/commit/14b536f0)
It is not clear if kernel 5.10 will receive an LTS support longer than 5.4 or not. Support until Dec, 2022 is declared right now at https://www.kernel.org/category/releases.html for 5.10 and until Dec, 2025 - for 5.4.
TODO: update kernel configs
TODO: solve problems with version of virtualbox host modules not matching version of the virtualbox package after virtualbox is updated but kernel is not rebuilt
2020-12-20 18:49:24 +03:00
|
|
|
%if %{with binary_shredder}
|
2020-11-26 21:09:27 +00:00
|
|
|
cp -r "$(rpm -q --qf '/usr/src/shredder-kernel-%%{VERSION}-%%{RELEASE}' kernel-source-shredder-kernel)" kernel-source-shredder-kernel
|
|
|
|
pushd kernel-source-shredder-kernel
|
|
|
|
%kmake KERNEL_PATH=%{src_dir}
|
|
|
|
mkdir -p %{temp_modules}/%{kver_full}/kernel/extra/
|
|
|
|
cp shredder-kernel.ko %{temp_modules}/%{kver_full}/kernel/extra/
|
|
|
|
popd
|
|
|
|
rm -fr kernel-source-shredder-kernel
|
2020-11-27 23:00:06 +03:00
|
|
|
%endif
|
2020-11-26 21:09:27 +00:00
|
|
|
|
Update from 5.4 to 5.10.1
- rediffed most of patches, renamed files to easify further rediffs by git format-patch
- thanks to abf.io/kernels_stable for some patches for kernel 5.9
- using unofficial patch for AUFS for kernel 5.10, there may be issues with stability, try to avoid using AUFS (I would have dropped it, but MagOS wants it very much)
- pulled updates of AltHa from http://git.altlinux.org/gears/k/kernel-image-un-def.git?p=kernel-image-un-def.git;a=history;f=security/altha;hb=HEAD
- dropped patch adding sysctl to disable disk-based swap because it has not found any usage
- bpf is now in the list of LSM modules (ability to write LSM modules as BPF programs), enable it, it is potentially useful and does not seem to be harmful
- keeping kernel libc headers in older kernels for now
- dropped building external virtualbox guest modules because they are now included into the mainline kernel
- offed building VirtualBox host modules, I do not know how to keep these binary modules in sync with userspace part of VirtualBox, users can continue using dkms
- offed building kernel-shredder because it is not buildable on kernel 5.10
- updated rtl8821ce and added a dependency from its "blacklist" subpackage here (see https://github.com/tomaspinho/rtl8821ce/commit/14b536f0)
It is not clear if kernel 5.10 will receive an LTS support longer than 5.4 or not. Support until Dec, 2022 is declared right now at https://www.kernel.org/category/releases.html for 5.10 and until Dec, 2025 - for 5.4.
TODO: update kernel configs
TODO: solve problems with version of virtualbox host modules not matching version of the virtualbox package after virtualbox is updated but kernel is not rebuilt
2020-12-20 18:49:24 +03:00
|
|
|
%if %{with binary_virtualbox_host}
|
2020-11-26 21:09:27 +00:00
|
|
|
# build commands for virtualbox are based on the ones from the virtualbox package
|
2020-07-29 10:59:41 +03:00
|
|
|
cp -r "$(rpm -q --qf '/usr/src/virtualbox-%%{VERSION}-%%{RELEASE}' kernel-source-virtualbox)" kernel-source-virtualbox
|
|
|
|
mkdir -p %{temp_modules}/%{kver_full}/kernel/misc/
|
|
|
|
pushd kernel-source-virtualbox
|
|
|
|
make -C vboxdrv KERN_DIR=%{src_dir} KERN_VER=%{kver_full}
|
|
|
|
cp -fv vboxdrv/Module.symvers vboxnetflt
|
|
|
|
cp -fv vboxdrv/Module.symvers vboxnetadp
|
|
|
|
make -C vboxnetflt KERN_DIR=%{src_dir} KERN_VER=%{kver_full}
|
|
|
|
make -C vboxnetadp KERN_DIR=%{src_dir} KERN_VER=%{kver_full}
|
|
|
|
cp -fv vboxnetadp/Module.symvers vboxpci/
|
|
|
|
make -C vboxpci KERN_DIR=%{src_dir} KERN_VER=%{kver_full}
|
|
|
|
for i in vboxnetflt vboxnetadp vboxdrv vboxpci
|
|
|
|
do
|
|
|
|
cp -v "${i}/${i}.ko" %{temp_modules}/%{kver_full}/kernel/misc/
|
|
|
|
done
|
|
|
|
popd
|
2020-11-26 18:58:01 +00:00
|
|
|
%endif
|
2020-07-29 10:59:41 +03:00
|
|
|
|
2021-10-16 20:11:50 +03:00
|
|
|
cp -r "$(rpm -q --qf '/usr/src/v4l2loopback-%%{VERSION}-%%{RELEASE}' kernel-source-v4l2loopback)" kernel-source-v4l2loopback
|
|
|
|
pushd kernel-source-v4l2loopback
|
|
|
|
cat Kbuild > Makefile
|
|
|
|
mkdir -p %{temp_modules}/%{kver_full}/kernel/drivers/media
|
|
|
|
make -C %{src_dir} M="$PWD" modules
|
|
|
|
cp v4l2loopback.ko %{temp_modules}/%{kver_full}/kernel/drivers/media
|
|
|
|
pushd
|
|
|
|
rm -fr kernel-source-v4l2loopback
|
|
|
|
|
2020-08-06 17:26:48 +03:00
|
|
|
%if %{with nickel}
|
|
|
|
# rosa-test-suite uses /sr/src/xxx-version, not /usr/src/xxx-version-release
|
|
|
|
cp -r "$(rpm -q --qf '/usr/src/rosa-test-suite-%%{VERSION}' kernel-source-rosa-test-suite)" kernel-source-rosa-test-suite
|
|
|
|
pushd kernel-source-rosa-test-suite
|
|
|
|
mkdir -p %{temp_modules}/%{kver_full}/kernel/misc/
|
|
|
|
for i in nlkm memfreetest pcietest
|
|
|
|
do
|
|
|
|
cat << EOF > Makefile
|
|
|
|
obj-m := ${i}.o
|
|
|
|
all:
|
|
|
|
make -C %{src_dir} M=\$(PWD) modules
|
|
|
|
EOF
|
|
|
|
%kmake
|
|
|
|
cp -fv ${i}.ko %{temp_modules}/%{kver_full}/kernel/misc/
|
|
|
|
done
|
|
|
|
popd
|
2022-03-09 19:02:02 +01:00
|
|
|
%endif
|
|
|
|
# End with nickel <- with binary_extra_modules
|
2020-08-06 17:26:48 +03:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
%endif
|
|
|
|
# End with binary_extra_modules
|
2020-07-29 10:59:41 +03:00
|
|
|
|
2020-03-13 20:35:12 +03:00
|
|
|
%if %{with uml}
|
|
|
|
cp -rv %{certs_dir_rnd} %{src_dir}.uml/
|
|
|
|
pushd %{src_dir}.uml
|
2020-12-31 14:30:14 +03:00
|
|
|
%kmake ARCH=um defconfig
|
2020-03-13 20:35:12 +03:00
|
|
|
%kmake ARCH=um linux
|
|
|
|
install -Dm0755 linux %{temp_root}%{_bindir}/linux-uml-%{kver_full}
|
|
|
|
#rm -fv linux
|
|
|
|
%kmake V=1 ARCH=um modules
|
|
|
|
mkdir -p %{temp_root}/lib/modules-uml/%{kver_full}/
|
|
|
|
%kmake ARCH=um INSTALL_MOD_PATH=%{temp_root}/lib/modules-uml/%{kver_full}/ modules_install
|
|
|
|
popd
|
|
|
|
%endif
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
install -d %{temp_boot}
|
|
|
|
install -m 644 System.map %{temp_boot}/System.map-%{kver_full}
|
|
|
|
install -m 644 .config %{temp_boot}/config-%{kver_full}
|
2022-03-15 17:03:05 +03:00
|
|
|
%if %{with modxz}
|
2022-03-09 19:02:02 +01:00
|
|
|
xz -c Module.symvers > %{temp_boot}/symvers-%{kver_full}.xz
|
2022-03-15 17:03:05 +03:00
|
|
|
%else
|
|
|
|
%{zstd_cmd} Module.symvers
|
|
|
|
install -m 644 Module.symvers.zst %{temp_boot}/symvers-%{kver_full}.zst
|
|
|
|
%endif
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2021-04-06 19:36:12 +00:00
|
|
|
%ifarch %{armx}
|
2021-05-22 11:56:21 +03:00
|
|
|
%make_build ARCH=%{arch_type} V=1 INSTALL_DTBS_PATH=%{temp_boot}/dtb-%{kver_full} dtbs_install
|
2021-04-06 19:36:12 +00:00
|
|
|
%endif
|
|
|
|
|
2020-11-26 21:09:27 +00:00
|
|
|
%ifarch aarch64
|
2022-11-07 21:16:34 +03:00
|
|
|
cp -f arch/arm64/boot/Image* %{temp_boot}/vmlinuz-%{kver_full}
|
2020-11-26 21:09:27 +00:00
|
|
|
%else
|
|
|
|
cp -f arch/%{arch_type}/boot/bzImage %{temp_boot}/vmlinuz-%{kver_full}
|
|
|
|
%endif
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Headers
|
2019-07-16 18:30:53 +03:00
|
|
|
%if %{build_headers}
|
|
|
|
%make INSTALL_HDR_PATH=%{temp_root}%{_prefix} KERNELRELEASE=%{kver_full} headers_install
|
|
|
|
find %{temp_root}%{_prefix} -name .install -or -name ..install.cmd | %kxargs rm -f
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Remove /lib/firmware, we use a separate linux-firmware package
|
2019-07-16 18:30:53 +03:00
|
|
|
rm -rf %{temp_root}/lib/firmware
|
2014-12-11 19:36:25 +03:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# Prepare the files for kernel*-devel
|
2022-03-09 19:02:02 +01:00
|
|
|
%if %{build_devel}
|
2014-12-11 19:36:25 +03:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
mkdir -p %{temp_devel_root}
|
|
|
|
for i in $(find . -name 'Makefile*'); do cp -R --parents $i %{temp_devel_root}; done
|
|
|
|
for i in $(find . -name 'Kconfig*' -o -name 'Kbuild*'); do cp -R --parents $i %{temp_devel_root}; done
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
cp -fR include %{temp_devel_root}
|
2014-12-11 19:36:25 +03:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
cp -fR scripts %{temp_devel_root}
|
|
|
|
cp -fR kernel/bounds.c %{temp_devel_root}/kernel
|
|
|
|
cp -fR kernel/time/timeconst.bc %{temp_devel_root}/kernel/time
|
|
|
|
cp -fR tools %{temp_devel_root}/
|
2020-11-26 18:48:55 +00:00
|
|
|
cp -fR arch/%{arch_type}/kernel/asm-offsets.{c,s} %{temp_devel_root}/arch/%{arch_type}/kernel/
|
2020-11-26 21:09:27 +00:00
|
|
|
%ifarch %{ix86} %{x86_64}
|
2020-11-26 18:48:55 +00:00
|
|
|
cp -fR arch/%{arch_type}/kernel/asm-offsets_{32,64}.c %{temp_devel_root}/arch/%{arch_type}/kernel/
|
|
|
|
cp -fR arch/%{arch_type}/purgatory/* %{temp_devel_root}/arch/%{arch_type}/purgatory/
|
2022-03-09 19:02:02 +01:00
|
|
|
# Needed for arch/x86/purgatory
|
2020-11-26 21:09:27 +00:00
|
|
|
cp -fR lib/*.h lib/*.c %{temp_devel_root}/lib/
|
2020-11-26 18:48:55 +00:00
|
|
|
cp -fR arch/%{arch_type}/entry/syscalls/syscall* %{temp_devel_root}/arch/%{arch_type}/entry/syscalls/
|
|
|
|
cp -fR arch/%{arch_type}/tools %{temp_devel_root}/arch/%{arch_type}/
|
2020-11-26 21:09:27 +00:00
|
|
|
# needed for kexec
|
|
|
|
cp -fR arch/%{arch_type}/boot/*.h %{temp_devel_root}/arch/%{arch_type}/boot/
|
|
|
|
cp -fR arch/%{arch_type}/boot/*.c %{temp_devel_root}/arch/%{arch_type}/boot/
|
|
|
|
%endif
|
|
|
|
cp -fR arch/%{arch_type}/include %{temp_devel_root}/arch/%{arch_type}/
|
2019-07-16 18:30:53 +03:00
|
|
|
cp -fR .config Module.symvers %{temp_devel_root}
|
2014-12-11 19:36:25 +03:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# Needed for truecrypt build (Danny)
|
|
|
|
cp -fR drivers/md/dm.h %{temp_devel_root}/drivers/md/
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# Needed for lirc_gpio (#39004)
|
|
|
|
cp -fR drivers/media/pci/bt8xx/bttv{,p}.h %{temp_devel_root}/drivers/media/pci/bt8xx/
|
|
|
|
cp -fR drivers/media/pci/bt8xx/bt848.h %{temp_devel_root}/drivers/media/pci/bt8xx/
|
|
|
|
cp -fR drivers/media/common/btcx-risc.h %{temp_devel_root}/drivers/media/common/
|
2017-03-13 18:10:33 +03:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Add acpica header files, needed for fglrx build
|
2019-07-16 18:30:53 +03:00
|
|
|
cp -fR drivers/acpi/acpica/*.h %{temp_devel_root}/drivers/acpi/acpica/
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
%if %{with aufs}
|
2019-07-16 18:30:53 +03:00
|
|
|
# aufs2 has a special file needed
|
2019-12-16 16:12:07 +03:00
|
|
|
cp -fR fs/aufs/magic.mk %{temp_devel_root}/fs/aufs
|
2022-03-09 19:02:02 +01:00
|
|
|
%endif
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# SELinux needs security/selinux/include
|
|
|
|
cp -fR security/selinux/include %{temp_devel_root}/security/selinux
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
for i in alpha arc avr32 blackfin c6x cris csky frv h8300 hexagon ia64 m32r m68k m68knommu metag microblaze \
|
|
|
|
mips mn10300 nds32 nios2 openrisc parisc powerpc riscv s390 score sh sparc tile unicore32 xtensa; do
|
|
|
|
rm -rf %{temp_devel_root}/arch/$i
|
|
|
|
done
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# Clean the scripts tree, and make sure everything is ok (sanity check)
|
|
|
|
# running prepare+scripts (tree was already "prepared" in build)
|
2020-03-14 13:49:15 +03:00
|
|
|
pushd %{temp_devel_root}
|
2020-11-26 21:09:27 +00:00
|
|
|
%smake V=1 -s clean ARCH=%{arch_type}
|
2020-03-14 13:49:15 +03:00
|
|
|
popd
|
2020-11-26 21:09:27 +00:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
rm -f %{temp_devel_root}/.config.old
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Fix permissions
|
2019-07-16 18:30:53 +03:00
|
|
|
chmod -R a+rX %{temp_devel_root}
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Disable mrproper in -devel rpms
|
2022-11-07 03:13:34 +03:00
|
|
|
#patch -p1 --fuzz=0 -d %{temp_devel_root} -i %{SOURCE2}
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
2022-03-09 19:02:02 +01:00
|
|
|
# End of build_devel
|
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2021-05-03 15:56:13 +03:00
|
|
|
# TODO: maybe move to /usr/lib/debug?
|
2022-03-09 19:02:02 +01:00
|
|
|
%if %{build_debug}
|
2019-07-16 18:30:53 +03:00
|
|
|
find %{temp_modules}/%{kver_full}/kernel \
|
|
|
|
-name "*.ko" | \
|
|
|
|
%kxargs -I '{}' objcopy --only-keep-debug '{}' '{}'.debug
|
|
|
|
find %{temp_modules}/%{kver_full}/kernel \
|
|
|
|
-name "*.ko" | %kxargs -I '{}' \
|
|
|
|
sh -c 'cd `dirname {}`; \
|
|
|
|
objcopy --add-gnu-debuglink=`basename {}`.debug \
|
|
|
|
--strip-debug `basename {}`'
|
2022-03-09 19:02:02 +01:00
|
|
|
%endif
|
|
|
|
# End of build_debug
|
2019-07-16 18:30:53 +03:00
|
|
|
|
2020-07-29 10:59:41 +03:00
|
|
|
# https://patchwork.kernel.org/patch/11446123/
|
2019-12-07 21:57:55 +03:00
|
|
|
_libressl_sign(){
|
|
|
|
if [ ! -f "$1" ]; then
|
2022-03-15 17:03:05 +03:00
|
|
|
echo "No file $1"
|
|
|
|
return 0
|
2019-12-07 21:57:55 +03:00
|
|
|
fi
|
|
|
|
f="$1"
|
2020-03-18 23:36:11 +03:00
|
|
|
%if %{with gost_sign}
|
2020-03-29 01:07:43 +03:00
|
|
|
%{src_dir}/scripts/sign-file streebog512 \
|
|
|
|
"%{certs_signing_key_priv_rnd}.GOST" "%{certs_signing_key_priv_rnd}.GOST" "$f"
|
2020-03-15 20:26:01 +03:00
|
|
|
%else
|
|
|
|
%{src_dir}/scripts/sign-file sha512 \
|
2020-03-20 11:27:35 +03:00
|
|
|
"%{certs_signing_key_priv_rnd}.RSA" "%{certs_signing_key_priv_rnd}.RSA" "$f"
|
2020-03-15 20:26:01 +03:00
|
|
|
%endif
|
2019-12-07 21:57:55 +03:00
|
|
|
unset f
|
|
|
|
}
|
|
|
|
export -f _libressl_sign
|
2020-03-13 20:35:12 +03:00
|
|
|
find %{temp_modules}/%{kver_full}/kernel \
|
|
|
|
%if %{with uml}
|
2022-03-15 17:03:05 +03:00
|
|
|
%{temp_root}/lib/modules-uml/%{kver_full} \
|
2020-03-13 20:35:12 +03:00
|
|
|
%endif
|
|
|
|
-name '*.ko' -print0 | sort -u | \
|
2019-12-07 21:57:55 +03:00
|
|
|
xargs --null -P "$(nproc)" -I {} "$SHELL" -e -x -c 'if ! _libressl_sign "{}"; \
|
|
|
|
then echo Failed _libressl_sign on "{}" && exit 1; fi'
|
2019-11-13 17:35:59 +03:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Set extraversion to match srpm to get nice version reported by the tools
|
2019-07-16 18:30:53 +03:00
|
|
|
LC_ALL=C sed -ri "s/^EXTRAVERSION.*/EXTRAVERSION = -%{fullrpmrel}/" Makefile
|
2013-11-16 00:27:01 +04:00
|
|
|
|
|
|
|
%if %{build_perf}
|
2020-12-27 23:26:55 +03:00
|
|
|
%smake -C tools/perf -s PYTHON=%{__python3} HAVE_CPLUS_DEMANGLE=1 WERROR=0 prefix=%{_prefix} lib=%{_lib} NO_GTK2=1 all
|
2020-11-27 01:21:49 +03:00
|
|
|
%smake -C tools/perf -s prefix=%{_prefix} lib=%{_lib} NO_GTK2=1 man
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{build_cpupower}
|
2022-03-09 19:02:02 +01:00
|
|
|
# Make sure version-gen.sh is executable.
|
2013-11-16 00:27:01 +04:00
|
|
|
chmod +x tools/power/cpupower/utils/version-gen.sh
|
2014-01-23 11:57:37 +04:00
|
|
|
%make -C tools/power/cpupower CPUFREQ_BENCH=false
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
|
|
|
|
2019-11-11 22:27:50 +03:00
|
|
|
_cleanup
|
2022-03-09 19:02:02 +01:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
############################################################################
|
2013-11-16 00:27:01 +04:00
|
|
|
|
|
|
|
%install
|
2022-03-09 19:02:02 +01:00
|
|
|
cd %{src_dir}
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-09-26 15:32:27 +03:00
|
|
|
# TODO: get rid of temporary directory, install to buildroot directly?
|
2013-11-16 00:27:01 +04:00
|
|
|
# We want to be able to test several times the install part
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
cp -a %{temp_root} %{buildroot}
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
#if %%{with oblig_signed_modules}
|
|
|
|
# Multithreaded verification that every kernel module has a signature attached to it
|
2019-11-11 21:16:01 +03:00
|
|
|
mkdir -p "%{certs_dir_rnd}"
|
2019-11-14 01:26:18 +03:00
|
|
|
touch %{certs_verify_tmp}
|
2019-11-11 21:16:01 +03:00
|
|
|
_verify_signature(){
|
|
|
|
if [ -z "$1" ] || [ ! -f "$1" ]; then return; fi
|
2022-03-15 17:03:05 +03:00
|
|
|
if hexdump -C "$1" | rev | cut -f 2 -d '|' | rev | tr -d '\n' | grep -q '~Module signature appended~'; then
|
|
|
|
if [ -f %{certs_verify_tmp} ]; then
|
|
|
|
rm -f %{certs_verify_tmp}
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "ERROR: Module $1 has no signature attached to it!"
|
|
|
|
exit 1
|
2019-11-11 21:16:01 +03:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
export -f _verify_signature
|
2020-03-13 20:35:12 +03:00
|
|
|
find %{target_modules} \
|
|
|
|
%if %{with uml}
|
2022-03-15 17:03:05 +03:00
|
|
|
%{buildroot}/lib/modules-uml/%{kver_full} \
|
2020-03-13 20:35:12 +03:00
|
|
|
%endif
|
|
|
|
-name '*.ko' -print0 | sort -u | \
|
2019-11-11 23:48:27 +03:00
|
|
|
xargs --null -P "$(nproc)" -I {} "$SHELL" -c '_verify_signature "{}"'
|
2019-11-14 01:26:18 +03:00
|
|
|
if [ -f %{certs_verify_tmp} ]; then
|
2019-11-11 21:16:01 +03:00
|
|
|
echo "ERROR: seems that signatures of none modules were verified!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
rm -f %{certs_verify_tmp}
|
2022-03-09 19:02:02 +01:00
|
|
|
#endif
|
2019-11-11 21:16:01 +03:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Compressing modules
|
2022-03-15 17:03:05 +03:00
|
|
|
%if %{with compress_modules}
|
2021-05-04 15:17:47 +03:00
|
|
|
# Tested on /lib/modules/5.10.34-generic-2rosa2019.1-x86_64, the results are the following:
|
|
|
|
# * decompressed: 266.3 MiB
|
|
|
|
# * xz -9 --extreme: 67.8 MiB
|
|
|
|
# * zstd --ultra -22 without training: 73.5 MiB
|
|
|
|
# * zstd -6 without training: 79.6 MiB
|
|
|
|
# * zstd --ultra -22 with training: 66.3 MiB (the winner!)
|
|
|
|
# Training takes only a few minutes, make it here in place with current zstd and kernel modules.
|
|
|
|
# But! Decompressing also requires a dictionary for zstd, that will be too complex, so not using training :(
|
|
|
|
# We already use zstd in dracut to compress initrds quickly and with good compression ration.
|
|
|
|
# Testing speed of loading modules:
|
|
|
|
# `time modinfo bcache.ko.xz` took 0,048s, `time modinfo bcache.ko.zstd` took 0,014s (for multiple times)
|
|
|
|
# find /lib/modules/5.10.34-generic-2rosa2019.1-x86_64 -type f -name '*.ko.zst' > /tmp/zst.list
|
|
|
|
# time { for i in `cat /tmp/zst.list`; do modinfo $i >/dev/null 2>&1; done ;}
|
|
|
|
# took ~31-40s, with disk cache (2+ runs) ~33s
|
|
|
|
# find /lib/modules/5.10.34-generic-1rosa2019.1-x86_64 -type f -name '*.ko.xz' > /tmp/xz.list
|
|
|
|
# time { for i in `cat /tmp/xz.list`; do modinfo $i >/dev/null 2>&1; done ;}
|
2022-03-09 19:02:02 +01:00
|
|
|
# took 43-47s, with disk cache (2+ runs) ~42s, +21%%
|
2021-05-04 15:17:47 +03:00
|
|
|
# zstd-compressed initramfs image initrd-5.10.34-generic-1rosa2019.1-x86_64.img with *.ko.xz is 56,3 MiB
|
2022-03-09 19:02:02 +01:00
|
|
|
# zstd-compressed initramfs image initrd-5.10.34-generic-2rosa2019.1-x86_64.img with *.ko.zst is 58,4 MiB (+3.6%%)
|
2021-05-04 15:17:47 +03:00
|
|
|
# /lib/modules/5.10.34-generic-1rosa2019.1-x86_64 (*.ko.xz) is 78,1 MiB
|
2022-03-09 19:02:02 +01:00
|
|
|
# /lib/modules/5.10.34-generic-2rosa2019.1-x86_64 (*.ko.zst) is 83,9 MiB (+7%%)
|
2021-05-04 15:17:47 +03:00
|
|
|
# When zstd is compressing cpio (initrd image) with zstd-compressed kernel modules inside it, does it recompress data?
|
|
|
|
# It is not easy to make a choice between zstd and xz for kernel modules... Disk space (and so speed of installing
|
|
|
|
# RPM packages) is not much bigger, we do not try to support super low end devices, operation speed is a bit better.
|
|
|
|
# I have not seen measurable difference in startup time according to systemd-analyze.
|
|
|
|
# Note that decompression after zstd --ultra -22 will consume more memory than after zstd -6, see commit message in
|
|
|
|
# https://github.com/torvalds/linux/commit/73f3d1b48f5069d46b. I did not benchmark -6 vs -22 in runtime.
|
|
|
|
# Let's use zstd for now.
|
|
|
|
# zstd may also be used to compress linux-firmware to save a lot of space on disk,
|
|
|
|
# but upstream kernels still cannot decompress it.
|
2022-03-15 17:03:05 +03:00
|
|
|
#{zstd_cmd} -T0 --train $(find . -type f -name '*.ko')
|
2021-05-04 15:17:47 +03:00
|
|
|
#[ -f dictionary ]
|
2021-05-03 18:21:14 +03:00
|
|
|
# -T1 (one thread) because we run multiple zstd processes by xargs
|
2022-03-15 17:03:05 +03:00
|
|
|
%if %{with modxz}
|
2022-03-09 19:02:02 +01:00
|
|
|
find %{target_modules} -name "*.ko" | %kxargs xz -6e
|
2022-03-15 17:03:05 +03:00
|
|
|
%else
|
|
|
|
find %{target_modules} -name "*.ko" | %kxargs %{zstd_cmd} --rm -T1 #-D dictionary
|
|
|
|
rm -f dictionary
|
|
|
|
%endif
|
|
|
|
%endif
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-09-26 15:32:27 +03:00
|
|
|
%if %{with binary_extra_modules}
|
|
|
|
# Move nvidia modules to manage them via alternatives(8), leave *.debug
|
|
|
|
# TODO: better handle debug here and in the package in general
|
|
|
|
find %{target_modules}/%{kver_full}/kernel/drivers/video -name 'nvidia???.*' -type d -maxdepth 1 |
|
|
|
|
while read -r line
|
|
|
|
do
|
|
|
|
nv="$(basename "$line")"
|
|
|
|
mkdir -p %{buildroot}%{kroko_kmods_dir}/"$nv"-%{kver_full}
|
|
|
|
mv -v "$line"/*.ko%{kmod_suffix} %{buildroot}%{kroko_kmods_dir}/"$nv"-%{kver_full}
|
2022-10-07 00:01:12 +03:00
|
|
|
dir_no_buildroot="$(echo "$line" | sed -e 's,^%{buildroot},,')"
|
|
|
|
echo "%exclude $dir_no_buildroot" >> %{kernel_files}
|
|
|
|
%if %{build_debug}
|
|
|
|
echo "%dir $dir_no_buildroot" >> %{debuginfo_files}
|
|
|
|
%endif
|
2022-09-26 15:32:27 +03:00
|
|
|
done
|
|
|
|
%endif #/with binary_extra_modules
|
|
|
|
|
2021-05-23 14:11:15 +03:00
|
|
|
find %{buildroot}%{_modulesdir}/%{kver_full} -type f -name '*.ko%{kmod_suffix}' | sed -e 's,^%{buildroot},,' | sort -u >> %{kernel_files}
|
|
|
|
find %{buildroot}%{_modulesdir}/%{kver_full} -type d | sed -e 's,^%{buildroot},%dir ,' | sort -u >> %{kernel_files}
|
2021-05-03 15:56:13 +03:00
|
|
|
|
Delete old initrds by RPM
After moving to dnf (installonlypkg(kernel)) schema of packaging the kernel,
the %%postun scriptlet stopped working properly because $1 is the number
of packages left after the transaction, and there are multiple
kernels - packages with the same name but of different version/release - left.
Let's just make initrd be %%ghost as Fedora (but increase its size from Fedora's 20 MiB to 65 MiB),
and drop deleting empty directories etc. Recent commit fixed ownership of directories,
now /lib/modules/kernel_version is owned by RPM (it was not), dkms will remove modules
that it built, and, if anything else was left, then let's just not touch it, why must we delete
what we know nothing about?
Also delete scriptlet in the devel subpackage, that scriptlet would probably cause problems
with reinstalling the devel package.
2021-05-24 21:10:00 +03:00
|
|
|
# We estimate the size of the initramfs because rpm needs to take this size
|
|
|
|
# into consideration when performing disk space calculations (See rhbz#530778)
|
|
|
|
# 65 MiB is a bit more than needed, but let's be more sure that there is enought space.
|
|
|
|
# On my PC, zstd-compressed initrds take 58,5 MiB.
|
|
|
|
# Real size of the RPM package should not increase because RPM compresses the payload.
|
|
|
|
# This file is %%ghost, so the real initrd will be deleted when uninstalling this package.
|
|
|
|
dd if=/dev/zero of=%{buildroot}%{initrd_path} bs=1M count=65
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
%if %{build_debug}
|
2021-05-03 15:56:13 +03:00
|
|
|
install -m 644 vmlinux %{buildroot}%{_bootdir}/vmlinux-%{kver_full}
|
|
|
|
find %{buildroot}%{_modulesdir} -type f -name '*.debug' | sed -e 's,^%{buildroot},,' | sort -u >> %{debuginfo_files}
|
2022-03-09 19:02:02 +01:00
|
|
|
%endif
|
|
|
|
# End of build_debug
|
2021-05-03 15:56:13 +03:00
|
|
|
|
2015-04-21 19:03:58 +03:00
|
|
|
pushd %{target_modules}
|
|
|
|
for i in *; do
|
|
|
|
rm -f $i/build $i/source
|
|
|
|
ln -sf /usr/src/linux-$i $i/build
|
|
|
|
ln -sf /usr/src/linux-$i $i/source
|
|
|
|
done
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Sniff, if we compressed all the modules, we change the stamp :(
|
2013-11-16 00:27:01 +04:00
|
|
|
# we really need the depmod -ae here
|
|
|
|
for i in *; do
|
|
|
|
/sbin/depmod -ae -b %{buildroot} -F %{target_boot}/System.map-$i $i
|
|
|
|
echo $?
|
|
|
|
done
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# We used to create modules.description files which contained the
|
|
|
|
# description strings for the modules as shown by modinfo. These files
|
|
|
|
# are unlikely to be used right now, so create them (in case some old tool
|
|
|
|
# checks for their existence) but keep them empty.
|
2013-11-16 00:27:01 +04:00
|
|
|
for i in *; do
|
2019-07-16 18:30:53 +03:00
|
|
|
touch $i/modules.description
|
2013-11-16 00:27:01 +04:00
|
|
|
done
|
|
|
|
popd
|
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Need to set extraversion to match srpm again to avoid rebuild
|
2019-07-16 18:30:53 +03:00
|
|
|
LC_ALL=C sed -ri "s/^EXTRAVERSION.*/EXTRAVERSION = -%{fullrpmrel}/" Makefile
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
%if %{build_perf}
|
|
|
|
# Perf tool binary and supporting scripts/binaries
|
2020-12-11 19:39:08 +00:00
|
|
|
make -C tools/perf -s V=1 DESTDIR=%{buildroot} WERROR=0 HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} lib=%{_lib} install
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2020-05-11 09:33:18 +03:00
|
|
|
# Versionize shebang (#!/usr/bin/env python -> #!/usr/bin/python3)
|
2022-03-17 10:23:10 +03:00
|
|
|
sed -i '1 s,^#!/usr/bin/env python$,#!%{__python3},' \
|
2023-03-16 15:10:04 +03:00
|
|
|
%{buildroot}%{_libexecdir}/perf-core/scripts/python/exported-sql-viewer.py \
|
|
|
|
%{buildroot}%{_libexecdir}/perf-core/scripts/python/libxed.py
|
|
|
|
sed -i -e '1s,^#!/usr/bin/python$,#!%{__python3},' \
|
|
|
|
%{buildroot}%{_libexecdir}/perf-core/tests/shell/lib/perf_json_output_lint.py
|
2020-05-11 09:33:18 +03:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Perf man pages (note: implicit rpm magic compresses them later)
|
2022-03-15 17:03:05 +03:00
|
|
|
make -C tools/perf -s V=1 DESTDIR=%{buildroot} WERROR=0 HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} install-man
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{build_cpupower}
|
2014-01-23 11:57:37 +04:00
|
|
|
make -C tools/power/cpupower DESTDIR=%{buildroot} libdir=%{_libdir} mandir=%{_mandir} CPUFREQ_BENCH=false install
|
2013-11-16 00:27:01 +04:00
|
|
|
rm -f %{buildroot}%{_libdir}/*.{a,la}
|
2022-03-09 19:02:02 +01:00
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
%find_lang cpupower
|
2022-03-09 19:02:02 +01:00
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
mv cpupower.lang ../
|
|
|
|
chmod 0755 %{buildroot}%{_libdir}/libcpupower.so*
|
|
|
|
mkdir -p %{buildroot}%{_unitdir} %{buildroot}%{_sysconfdir}/sysconfig
|
|
|
|
install -m644 %{SOURCE50} %{buildroot}%{_unitdir}/cpupower.service
|
2015-03-17 20:53:12 +03:00
|
|
|
install -m644 %{SOURCE53} %{buildroot}%{_unitdir}/cpupower.path
|
2013-11-16 00:27:01 +04:00
|
|
|
install -m644 %{SOURCE51} %{buildroot}%{_sysconfdir}/sysconfig/cpupower
|
2015-03-13 17:29:40 +03:00
|
|
|
install -m755 %{SOURCE52} %{buildroot}%{_bindir}/cpupower-start.sh
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
2020-07-29 10:59:41 +03:00
|
|
|
|
2022-03-09 19:02:02 +01:00
|
|
|
# Delete junk
|
2020-08-06 17:26:48 +03:00
|
|
|
rm -fr %{buildroot}%{_usr}/src/*/kernel-source-*
|
2020-08-19 20:02:58 +03:00
|
|
|
|
|
|
|
%if %{with flow_abi}
|
|
|
|
# Prefix with "zzz" to put this directory into the end of search list
|
|
|
|
# and avoid tricks with depmod configs
|
|
|
|
mkdir -p %{buildroot}/lib/modules/%{kernelversion}.%{patchlevel}-rosa-flow-abi
|
|
|
|
ln -s /lib/modules/%{kernelversion}.%{patchlevel}-rosa-flow-abi %{buildroot}%{_modulesdir}/%{kver_full}/kernel/zzz-%{kernelversion}.%{patchlevel}-rosa-flow-abi
|
|
|
|
%endif
|
2022-03-09 19:02:02 +01:00
|
|
|
|
|
|
|
# Drop hidden files
|
|
|
|
rm -f %{buildroot}%{_docdir}/kernel-5.10-generic-doc/devicetree/bindings/.yamllint
|
|
|
|
|
|
|
|
# Fix perms
|
2022-10-11 09:24:23 +03:00
|
|
|
%if %{build_perf}
|
2022-03-09 19:02:02 +01:00
|
|
|
chmod -x %{buildroot}%{_sysconfdir}/bash_completion.d/perf
|
|
|
|
chmod -x %{buildroot}%{_prefix}/lib/perf/examples/bpf/*.c
|
|
|
|
chmod -x %{buildroot}%{_prefix}/lib/perf/include/bpf/*.h
|
|
|
|
chmod -x %{buildroot}%{_prefix}/lib/perf/include/bpf/linux/*.h
|
|
|
|
chmod -x %{buildroot}%{_datadir}/doc/perf-tip/*.txt
|
2022-10-11 09:24:23 +03:00
|
|
|
%endif
|