2019-11-12 02:06:06 +03:00
|
|
|
# _get_email() in %%build contains bashisms for regexping
|
|
|
|
%define _buildshell /bin/bash
|
|
|
|
|
2019-11-13 17:35:59 +03:00
|
|
|
# Prevent RPM scripts from stripping signatures,
|
|
|
|
# we strip binaries manually in %%build
|
|
|
|
%define __strip %(which true)
|
|
|
|
|
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
|
|
|
|
%define _python_bytecompile_build 0
|
|
|
|
|
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.
|
|
|
|
%global _find_debuginfo_dwz_opts %{nil}
|
|
|
|
|
2019-04-09 17:26:40 +03:00
|
|
|
%define kernelversion 5
|
2019-12-11 21:21:05 +03:00
|
|
|
%define patchlevel 4
|
2019-07-16 18:30:53 +03:00
|
|
|
# sublevel is used for stable-based kernels
|
upd: 5.4.32 -> 5.4.40
```
$ for i in ChangeLog-5.4.* ; do echo $i | sed -e 's,ChangeLog-,Linux ,g' ; cat $i | grep ^commit -A4 | grep -v 'Linux 5\.4\.' | grep -E '^[[:space:]]' | sort -u; done
Linux 5.4.33
ACPICA: Allow acpi_any_gpe_status_set() to skip one GPE
ACPI: EC: Do not clear boot_ec_is_ecdt in acpi_ec_add()
ACPI: PM: s2idle: Refine active GPEs check
acpi/x86: ignore unspecified bit positions in the ACPI global lock field
ALSA: doc: Document PC Beep Hidden Register on Realtek ALC256
ALSA: hda: Add driver blacklist
ALSA: hda: Fix potential access overflow in beep helper
ALSA: hda/realtek - Add quirk for Lenovo Carbon X1 8th gen
ALSA: hda/realtek - Add quirk for MSI GL63
ALSA: hda/realtek - a fake key event is triggered by running shutup
ALSA: hda/realtek: Enable mute LED on an HP system
ALSA: hda/realtek - Remove now-unnecessary XPS 13 headphone noise fixups
ALSA: hda/realtek - Set principled PC Beep configuration for ALC256
ALSA: ice1724: Fix invalid access for enumerated ctl items
ALSA: pcm: oss: Fix regression by buffer overflow fix
ALSA: usb-audio: Add mixer workaround for TRX40 and co
arm64: Always force a branch protection mode when the compiler has one
arm64: armv8_deprecated: Fix undef_hook mask for thumb setend
arm64: dts: allwinner: h5: Fix PMU compatible
arm64: dts: allwinner: h6: Fix PMU compatible
arm64: dts: ti: k3-am65: Add clocks to dwc3 nodes
ARM: dts: exynos: Fix polarity of the LCD SPI bus on UniversalC210 board
ARM: dts: Fix dm814x Ethernet by changing to use rgmii-id mode
ARM: dts: sun8i-a83t-tbs-a711: HM5065 doesn't like such a high voltage
ASoC: dapm: connect virtual mux with default value
ASoC: dpcm: allow start or stop during pause for backend
ASoC: fix regwmask
ASoC: stm32: sai: Add missing cleanup
ASoC: topology: use name_prefix for new kcontrol
ath9k: Handle txpower changes even when TPC is disabled
block, bfq: fix use-after-free in bfq_idle_slice_timer_body
block, bfq: move forward the getting of an extra ref in bfq_bfqq_move
block: Fix use-after-free issue accessing struct io_cq
block: keep bdi->io_pages in sync with max_sectors_kb for stacked devices
bpf: Fix deadlock with rq_lock in bpf_send_signal()
bpf: Fix tnum constraints for 32-bit comparisons
btrfs: Don't submit any btree write bio if the fs has errors
btrfs: drop block from cache on error in relocation
Btrfs: fix crash during unmount due to race with delayed inode workers
btrfs: fix missing file extent item for hole after ranged fsync
btrfs: fix missing semaphore unlock in btrfs_sync_file
btrfs: qgroup: ensure qgroup_rescan_running is only set when the worker is at least queued
btrfs: reloc: clean dirty subvols if we fail to start a transaction
btrfs: remove a BUG_ON() from merge_reloc_roots()
btrfs: restart relocate_tree_blocks properly
btrfs: set update the uuid generation as soon as possible
btrfs: track reloc roots based on their commit root bytenr
btrfs: unset reloc control if we fail to recover
btrfs: use nofs allocations for running delayed items
bus: sunxi-rsb: Return correct data when mixing 16-bit and 8-bit reads
cfg80211: Do not warn on same channel at the end of CSA
CIFS: Fix bug which the return value by asynchronous read is error
clk: ingenic/jz4770: Exit with error if CGU init failed
clk: ingenic/TCU: Fix round_rate returning error
cpufreq: imx6q: fix error handling
cpufreq: imx6q: Fixes unwanted cpu overclocking on i.MX6ULL
cpufreq: powernv: Fix use-after-free
cpu/hotplug: Ignore pm_wakeup_pending() for disable_nonboot_cpus()
crypto: caam/qi2 - fix chacha20 data size error
crypto: caam - update xts sector size for large input length
crypto: ccree - dec auth tag size from cryptlen map
crypto: ccree - only try to map auth tag if needed
crypto: ccree - protect against empty or NULL scatterlists
crypto: mxs-dcp - fix scatterlist linearization for hash
crypto: rng - Fix a refcounting bug in crypto_rng_reset()
cxgb4/ptp: pass the sign of offset delta in FW CMD
debugfs: Check module state before warning in {full/open}_proxy_open()
dma-mapping: Fix dma_pgprot() for unencrypted coherent pages
dm clone: Add missing casts to prevent overflows and data corruption
dm clone: Add overflow check for number of regions
dm clone: Fix handling of partial region discards
dm clone metadata: Fix return type of dm_clone_nr_of_hydrated_regions()
dm clone: replace spin_lock_irqsave with spin_lock_irq
dm integrity: fix a crash with unusually large tag size
dm verity fec: fix memory leak in verity_fec_dtr
dm writecache: add cond_resched to avoid CPU hangs
dm zoned: remove duplicate nr_rnd_zones increase in dmz_init_zone()
drm/amdgpu: fix gfx hang during suspend with video playback (v2)
drm/amdgpu/powerplay: using the FCLK DPM table to set the MCLK
drm/amdgpu: unify fw_write_wait for new gfx9 asics
drm/dp_mst: Fix clearing payload state on topology disable
drm/etnaviv: rework perfmon query infrastructure
drm/i915/gem: Flush all the reloc_gpu batch
drm/i915/icl+: Don't enable DDI IO power on a TypeC port in TBT mode
drm: Remove PageReserved manipulation from drm_pci_alloc
drm/scheduler: fix rare NULL ptr race
efi/x86: Add TPM related EFI tables to unencrypted mapping checks
efi/x86: Fix the deletion of variables in mixed mode
efi/x86: Ignore the memory attributes table on i386
erofs: correct the remaining shrink objects
ext4: fix a data race at inode->i_blocks
firmware: arm_sdei: fix double-lock on hibernate with shared events
firmware: fix a double abort case with fw_load_sysfs_fallback
fs/filesystems.c: downgrade user-reachable WARN_ONCE() to pr_warn_once()
ftrace/kprobe: Show the maxactive number on kprobe_events
genirq/debugfs: Add missing sanity checks to interrupt injection
genirq/irqdomain: Check pointer in irq_domain_alloc_irqs_hierarchy()
gfs2: Do log_flush in gfs2_ail_empty_gl even if ail list is empty
gfs2: Don't demote a glock until its revokes are written
hfsplus: fix crash and filesystem corruption when deleting files
hinic: fix a bug of waitting for IO stopped
hinic: fix out-of-order excution in arm cpu
hinic: fix the bug of clearing event queue
hinic: fix wrong para of wait_for_completion_timeout
hinic: fix wrong value of MIN_SKB_LEN
i2c: pca-platform: Use platform_irq_get_optional
i2c: st: fix missing struct parameter description
Input: i8042 - add Acer Aspire 5738z to nomux list
Input: tm2-touchkey - add support for Coreriver TC360 variant
io_uring: honor original task RLIMIT_FSIZE
io_uring: remove bogus RLIMIT_NOFILE check in file registration
ipmi: fix hung processes in __get_guid()
irqchip/gic-v4: Provide irq_retrigger to avoid circular locking dependency
irqchip/versatile-fpga: Apply clear-mask earlier
irqchip/versatile-fpga: Handle chained IRQs properly
iwlwifi: mvm: Fix rate scale NSS configuration
KEYS: reaching the keys quotas correctly
kmod: make request_module() return an error when autoloading is disabled
KVM: nVMX: Properly handle userspace interrupt window request
KVM: s390: vsie: Fix delivery of addressing exceptions
KVM: s390: vsie: Fix region 1 ASCE sanity shadow address checks
KVM: VMX: Add a trampoline to fix VMREAD error handling
KVM: VMX: Always VMCLEAR in-use VMCSes during crash with kexec support
KVM: VMX: fix crash cleanup when KVM wasn't used
KVM: x86: Allocate new rmap and large page tracking when moving memslot
KVM: x86: Gracefully handle __vmalloc() failure during VM allocation
libata: Remove extra scsi_host_put() in ata_scsi_add_hosts()
libata: Return correct status in sata_pmp_eh_recover_pm() when ATA_DFLAG_DETACH is set
locking/lockdep: Avoid recursion in lockdep_count_{for,back}ward_deps()
md: check arrays is suspended in mddev_detach before call quiesce operations
media: allegro: fix type of gop_length in channel_create message
media: hantro: Read be32 words starting at every fourth byte
media: i2c: ov5695: Fix power on and off sequences
media: i2c: video-i2c: fix build errors due to 'imply hwmon'
media: imx: imx7-media-csi: Fix video field handling
media: imx: imx7_mipi_csis: Power off the source when stopping streaming
media: rc: add keymap for Videostrong KII Pro
media: ti-vpe: cal: fix a kernel oops when unloading module
media: ti-vpe: cal: fix disable_irqs to only the intended target
media: venus: firmware: Ignore secure call error on first resume
media: venus: hfi_parser: Ignore HEVC encoding for V1
mfd: dln2: Fix sanity checking for endpoints
MIPS: OCTEON: irq: Fix potential NULL pointer dereference
MIPS/tlbex: Fix LDDIR usage in setup_pw() for Loongson-3
mmc: sdhci: Convert sdhci_set_timeout_irq() to non-static
mmc: sdhci-of-esdhc: fix esdhc_reset() for different controller versions
mmc: sdhci: Refactor sdhci_set_timeout()
mm, memcg: do not high throttle allocators based on wraparound
mtd: spinand: Do not erase the block before writing a bad block marker
mtd: spinand: Stop using spinand->oobbuf for buffering bad block markers
net: qualcomm: rmnet: Allow configuration updates to existing devices
net: stmmac: platform: Fix misleading interrupt error msg
net: vxge: fix wrong __VA_ARGS__ usage
nfsd: fsnotify on rmdir under nfsd/clients/
NFS: Fix a page leak in nfs_destroy_unlinked_subrequests()
NFS: Fix use-after-free issues in nfs_pageio_add_request()
null_blk: fix spurious IO errors after failed past-wp access
null_blk: Fix the null_add_dev() error path
null_blk: Handle null_add_dev() failures properly
nvme-fc: Revert "add module to ops template to allow module references"
nvmet-tcp: fix maxh2cdata icresp parameter
ocfs2: no need try to truncate file beyond i_size
PCI: Add boot interrupt quirk mechanism for Xeon chipsets
PCI/ASPM: Clear the correct bits when enabling L1 substates
PCI: endpoint: Fix for concurrent memory allocation in OB address region
PCI: pciehp: Fix indefinite wait on sysfs requests
PCI: qcom: Fix the fixup of PCI_VENDOR_ID_QCOM
PCI/switchtec: Fix init_completion race condition with poll_wait()
perf tools: Support Python 3.8+ in Makefile
platform/x86: asus-wmi: Support laptops where the first battery is named BATT
PM / Domains: Allow no domain-idle-states DT property in genpd when parsing
PM: sleep: wakeup: Skip wakeup_source_sysfs_remove() if device is not there
powerpc/64: Prevent stack protection in early boot
powerpc/64: Setup a paca before parsing device tree etc.
powerpc/64/tm: Don't let userspace set regs->trap via sigreturn
powerpc/fsl_booke: Avoid creating duplicate tlb1 entry
powerpc/hash64/devmap: Use H_PAGE_THP_HUGE when setting up huge devmap PTE entries
powerpc/kasan: Fix kasan_remap_early_shadow_ro()
powerpc/kprobes: Ignore traps that happened in real mode
powerpc: Make setjmp/longjmp signature standard
powerpc/pseries: Avoid NULL pointer dereference when drmem is unavailable
powerpc/pseries: Drop pointless static qualifier in vpa_debugfs_init()
powerpc/xive: Fix xmon support on the PowerNV platform
powerpc/xive: Use XIVE_BAD_IRQ instead of zero to catch non configured IPIs
pstore/platform: fix potential mem leak if pstore_init_fs failed
pstore: pstore_ftrace_seq_next should increase position index
qlcnic: Fix bad kzalloc null test
remoteproc: Fix NULL pointer dereference in rproc_virtio_notify
remoteproc: qcom_q6v5_mss: Don't reassign mpss region on shutdown
remoteproc: qcom_q6v5_mss: Reload the mba region on coredump
Revert "drm/dp_mst: Remove VCPI while disabling topology mgr"
rxrpc: Abstract out the calculation of whether there's Tx space
rxrpc: Fix call interruptibility handling
s390/diag: fix display of diagnose call statistics
sched: Avoid scale real weight down to zero
sched/core: Remove duplicate assignment in sched_tick_remote()
sched/fair: Fix enqueue_task_fair warning
scsi: lpfc: Add registration for CPU Offline/Online events
scsi: lpfc: Fix broken Credit Recovery after driver load
scsi: lpfc: Fix configuration of BB credit recovery in service parameters
scsi: lpfc: Fix Fabric hostname registration if system hostname changes
scsi: lpfc: fix inlining of lpfc_sli4_cleanup_poll_list()
scsi: lpfc: Fix lpfc_io_buf resource leak in lpfc_get_scsi_buf_s4 error path
scsi: mpt3sas: Fix kernel panic observed on soft HBA unplug
scsi: ufs: fix Auto-Hibern8 error detection
scsi: zfcp: fix missing erp_lock in port recovery trigger for point-to-point
seccomp: Add missing compat_ioctl for notify
selftests/net: add definition for SOL_DCCP to fix compilation errors for old libc
selftests/powerpc: Add tlbie_test in .gitignore
selftests: vm: drop dependencies on page flags from mlock2 tests
selftests/vm: fix map_hugetlb length used for testing read and write
selftests/x86/ptrace_syscall_32: Fix no-vDSO segfault
signal: Extend exec_id to 64bits
smb3: fix performance regression with setting mtime
soc: fsl: dpio: register dpio irq handlers after dpio create
spi: spi-fsl-dspi: Replace interruptible wait queue with a simple completion
staging: wilc1000: avoid double unlocking of 'wilc->hif_cs' mutex
thermal: devfreq_cooling: inline all stubs for CONFIG_DEVFREQ_THERMAL=n
time/sched_clock: Expire timer in hardirq context
tools: gpio: Fix out-of-tree build regression
tpm: Don't make log failures fatal
tpm: tpm1_bios_measurements_next should increase position index
tpm: tpm2_bios_measurements_next should increase position index
usb: dwc3: core: add support for disabling SS instances in park mode
usb: gadget: composite: Inform controller driver of self-powered
usb: gadget: f_fs: Fix use after free issue as part of queue failure
vfio: platform: Switch to platform_get_irq_optional()
x86/boot: Use unsigned comparison for addresses
x86: Don't let pgprot_modify() change the page encryption bit
x86/entry/32: Add missing ASM_CLAC to general_protection entry
x86/tsc_msr: Fix MSR_FSB_FREQ mask for Cherry Trail devices
x86/tsc_msr: Make MSR derived TSC frequency more accurate
x86/tsc_msr: Use named struct initializers
xarray: Fix early termination of xas_for_each_marked
XArray: Fix xas_pause for large multi-index entries
xen/blkfront: fix memory allocation flags in blkfront_setup_indirect()
xhci: bail out early if driver can't accress host in resume
Linux 5.4.34
acpi/nfit: improve bounds checking for 'func'
ALSA: hda/realtek - Enable the headset mic on Asus FX505DT
ALSA: usb-audio: Check mapping at creating connector controls, too
ALSA: usb-audio: Don't create jack controls for PCM terminals
ALSA: usb-audio: Don't override ignore_ctl_error value from the map
ALSA: usb-audio: Filter error from connector kctl ops, too
amd-xgbe: Use __napi_schedule() in BH context
arm64: dts: librem5-devkit: add a vbus supply to usb0
arm64: vdso: don't free unallocated pages
ARM: dts: imx7-colibri: fix muxing of usbc_det pin
ASoC: Intel: mrfld: fix incorrect check on p->sink
ASoC: Intel: mrfld: return error codes when an error occurs
btrfs: check commit root generation in should_ignore_root
clk: at91: sam9x60: fix usb clock parents
clk: at91: usb: use proper usbs_mask
drm/amdgpu: fix the hw hang during perform system reboot and reset
drm/amd/powerplay: force the trim of the mclk dpm_levels if OD is enabled
ext4: do not zeroout extents beyond i_disksize
ext4: fix incorrect group count in ext4_fill_super error message
ext4: fix incorrect inodes per group in error message
hsr: check protocol version in hsr_newlink()
i2c: designware: platdrv: Remove DPM_FLAG_SMART_SUSPEND flag on BYT and CHT
irqchip/ti-sci-inta: Fix processing of masked irqs
jbd2: improve comments about freeing data buffers whose page mapping is NULL
keys: Fix proc_keys_next to increase position index
l2tp: Allow management of tunnels and session in user namespace
mac80211: fix race in ieee80211_register_hw()
mac80211_hwsim: Use kstrndup() in place of kasprintf()
net/bpfilter: remove superfluous testing message
net: dsa: mt7530: fix tagged frames pass-through in VLAN-unaware mode
net: dsa: mt7530: move mt7623 settings out off the mt7530
net: ethernet: mediatek: move mt7623 settings out off the mt7530
net: ipv4: devinet: Fix crash when add/del multicast IP with autojoin
net: ipv6: do not consider routes via gateways for anycast address check
net/mlx5e: Add missing release firmware call
net/mlx5e: Encapsulate updating netdev queues into a function
net/mlx5e: Fix nest_level for vlan pop action
net/mlx5e: Fix pfnum in devlink port attribute
net/mlx5e: Rename hw_modify to preactivate
net/mlx5e: Use preactivate hook to set the indirection table
net/mlx5: Fix frequent ioread PCI access during recovery
net: phy: micrel: use genphy_read_status for KSZ9131
net: qrtr: send msgs from local of same id as broadcast
net: revert default NAPI poll timeout to 2 jiffies
net: stmmac: dwmac-sunxi: Provide TX and RX fifo sizes
net: tun: record RX queue in skb before do_xdp_generic()
nl80211: fix NL80211_ATTR_FTM_RESPONDER policy
ovl: fix value of i_ino for lower hardlink corner case
perf report: Fix no branch type statistics report issue
platform/chrome: cros_ec_rpmsg: Fix race with host event
pwm: pca9685: Fix PWM/GPIO inter-operation
Revert "ACPI: EC: Do not clear boot_ec_is_ecdt in acpi_ec_add()"
scsi: target: fix hang when multiple threads try to destroy the same iscsi session
scsi: target: remove boilerplate code
scsi: ufs: Fix ufshcd_hold() caused scheduling while atomic
tracing: Fix the race between registering 'snapshot' event trigger and triggering 'snapshot' operation
usb: dwc3: gadget: Don't clear flags before transfer ended
x86/microcode/AMD: Increase microcode PATCH_MAX_SIZE
x86/resctrl: Fix invalid attempt at removing the default resource group
x86/resctrl: Preserve CDP enable over CPU hotplug
Linux 5.4.35
ACPICA: Fixes for acpiExec namespace init file
afs: Fix afs_d_validate() to set the right directory version
afs: Fix decoding of inline abort codes from version 1 status records
afs: Fix missing XDR advance in xdr_decode_{AFS,YFS}FSFetchStatus()
afs: Fix race between post-modification dir edit and readdir/d_revalidate
afs: Fix rename operation status delivery
ALSA: hda: Don't release card at firmware loading error
ALSA: hda: Honor PM disablement in PM freeze and thaw_noirq ops
arm64: dts: allwinner: a64: Fix display clock register range
arm64: dts: clearfog-gt-8k: set gigabit PHY reset deassert delay
arm64: tegra: Add PCIe endpoint controllers nodes for Tegra194
arm64: tegra: Fix Tegra194 PCIe compatible string
arm, bpf: Fix bugs with ALU64 {RSH, ARSH} BPF_K shift by 0
arm, bpf: Fix offset overflow for BPF_MEM BPF_DW
ARM: dts: imx6: Use gpc for FEC interrupt controller to fix wake on LAN.
ARM: dts: rockchip: fix lvds-encoder ports subnode for rk3188-bqedison2qc
ARM: dts: rockchip: fix vqmmc-supply property name for rk3188-bqedison2qc
ARM: dts: sunxi: Fix DE2 clocks register range
block, bfq: invoke flush_idle_tree after reparent_active_queues in pd_offline
block, bfq: make reparent_leaf_entity actually work only on leaf entities
block, bfq: turn put_queue into release_process_ref in __bfq_bic_change_cgroup
bpf: fix buggy r0 retval refinement for tracing helpers
bpf: Test_progs, add test to catch retval refine error handling
bpf: Test_verifier, bpf_get_stack return value add <0
bpf, test_verifier: switch bpf_get_stack's 0 s> r8 test
btrfs: add RCU locks around block group initialization
cifs: Allocate encryption header through kmalloc
clk: at91: usb: continue if clk_hw_round_rate() return zero
clk: Don't cache errors from clk_ops::get_phase()
clk: tegra: Fix Tegra PMC clock out parents
compiler.h: fix error in BUILD_BUG_ON() reporting
csky: Fixup cpu speculative execution to IO area
csky: Fixup get wrong psr value from phyical reg
csky: Fixup init_fpu compile warning with __init
dma-coherent: fix integer overflow in the reserved-memory dma allocation
dma-debug: fix displaying of dma allocation type
docs: Fix path to MTD command line partition parser
drm/amdkfd: kfree the wrong pointer
drm/nouveau/gr/gp107,gp108: implement workaround for HW hanging during init
drm/nouveau/svm: check for SVM initialized before migrating
drm/nouveau/svm: fix vma range check for migration
drm/nouveau: workaround runpm fail by disabling PCI power management on certain intel bridges
drm/ttm: flush the fence on the bo after we individualize the reservation object
drm/vc4: Fix HDMI mode validation
ext2: fix debug reference to ext2_xattr_cache
ext2: fix empty body warnings when -Wextra is used
ext4: do not commit super on read-only bdev
ext4: use non-movable memory for superblock readahead
f2fs: Add a new CP flag to help fsck fix resize SPO issues
f2fs: Fix mount failure due to SPO after a successful online resize FS
f2fs: fix NULL pointer dereference in f2fs_write_begin()
f2fs: fix the panic in do_checkpoint()
f2fs: fix to show norecovery mount option
f2fs: fix to wait all node page writeback
fbdev: potential information leak in do_fb_ioctl()
fbmem: Adjust indentation in fb_prepare_logo and fb_blank
hibernate: Allow uswsusp to write to swap
iio: si1133: read 24-bit signed integer for measurement
include/linux/swapops.h: correct guards for non_swap_entry()
iommu/amd: Fix the configuration of GCR3 table root pointer
iommu/virtio: Fix freeing of incomplete domains
iommu/vt-d: Fix mm reference leak
iommu/vt-d: Fix page request descriptor size
iommu/vt-d: Silence RCU-list debugging warning in dmar_find_atsr()
irqchip/mbigen: Free msi_desc on device teardown
kbuild, btf: Fix dependencies for DEBUG_INFO_BTF
KEYS: Don't write out to userspace while holding key semaphore
KVM: PPC: Book3S HV: Fix H_CEDE return code for nested guests
KVM: s390: vsie: Fix possible race when shadowing region 3 tables
leds: core: Fix warning message when init_data
libnvdimm: Out of bounds read in __nd_ioctl()
locktorture: Print ratio of acquisitions, not failures
mm/hugetlb: fix build failure with HUGETLB_PAGE but not HUGEBTLBFS
mtd: lpddr: Fix a double free in probe()
mtd: phram: fix a double free issue in error path
mtd: rawnand: free the nand_device object
mtd: spinand: Explicitly use MTD_OPS_RAW to write the bad block marker to OOB
net: dsa: bcm_sf2: Fix overflow checks
netfilter: nf_tables: report EOPNOTSUPP on unsupported flags/object type
net/mlx5e: Enforce setting of a single FEC mode
NFS: alloc_nfs_open_context() must use the file cred when available
NFS: direct.c: Fix memory leak of dreq when nfs_get_lock_context fails
NFS: Fix memory leaks in nfs_pageio_stop_mirroring()
NFSv4.2: error out when relink swapfile
NFSv4/pnfs: Return valid stateids in nfs_layout_find_inode_by_stateid()
objtool: Fix switch table detection in .text.unlikely
of: overlay: kmemleak in dup_and_fixup_symbol_prop()
of: unittest: kmemleak in of_unittest_overlay_high_level()
of: unittest: kmemleak in of_unittest_platform_populate()
of: unittest: kmemleak on changeset destroy
percpu_counter: fix a data race at vm_committed_as
phy: uniphier-usb3ss: Add Pro5 support
powerpc/maple: Fix declaration made after definition
powerpc/prom_init: Pass the "os-term" message to hypervisor
power: supply: axp288_fuel_gauge: Broaden vendor check for Intel Compute Sticks.
power: supply: bq27xxx_battery: Silence deferred-probe error
rbd: avoid a deadlock on header_rwsem when flushing notifies
rbd: call rbd_dev_unprobe() after unwatching and flushing notifies
rtc: 88pm860x: fix possible race condition
s390/cpuinfo: fix wrong output when CPU0 is offline
s390/cpum_sf: Fix wrong page count in error message
scsi: sg: add sg_remove_request in sg_common_write
soc: imx: gpc: fix power up sequencing
sunrpc: Fix gss_unwrap_resp_integ() again
SUNRPC: fix krb5p mount to provide large enough buffer in rq_rcvsize
tty: evh_bytechan: Fix out of bounds accesses
um: falloc.h needs to be directly included for older libc
um: ubd: Prevent buffer overrun on command completion
watchdog: sp805: fix restart handler
x86: ACPI: fix CPU hotplug deadlock
x86/Hyper-V: Free hv_panic_page when fail to register kmsg dump
x86/Hyper-V: Report crash data in die() when panic_on_oops is set
x86/Hyper-V: Report crash register data or kmsg before running crash kernel
x86/Hyper-V: Report crash register data when sysctl_record_panic_msg is not set
x86/Hyper-V: Trigger crash enlightenment only once during system crash.
x86/Hyper-V: Unload vmbus channel in hv panic callback
xsk: Add missing check on user supplied headroom size
xsk: Fix out of boundary write in __xsk_rcv_memcpy
Linux 5.4.36
ALSA: hda/hdmi: Add module option to disable audio component binding
ALSA: hda/realtek - Add new codec supported for ALC245
ALSA: hda/realtek - Fix unexpected init_amp override
ALSA: hda: Remove ASUS ROG Zenith from the blacklist
ALSA: usb-audio: Add connector notifier delegation
ALSA: usb-audio: Add Pioneer DJ DJM-250MK2 quirk
ALSA: usb-audio: Add static mapping table for ALC1220-VB-based mobos
ALSA: usb-audio: Filter out unsupported sample rates on Focusrite devices
ALSA: usb-audio: Fix usb audio refcnt leak when getting spdif
ALSA: usx2y: Fix potential NULL dereference
arm64: compat: Workaround Neoverse-N1 #1542419 for compat user-space
arm64: errata: Hide CTR_EL0.DIC on systems affected by Neoverse-N1 #1542419
arm64: Fake the IminLine size on systems affected by Neoverse-N1 #1542419
arm64: Silence clang warning on mismatched value/register sizes
ARM: imx: provide v7_cpu_resume() only on ARM_CPU_SUSPEND=y
ASoC: dapm: fixup dapm kcontrol widget
ASoC: Intel: atom: Take the drv->lock mutex before calling sst_send_slot_map()
ASoC: Intel: bytcr_rt5640: Add quirk for MPMAN MPWIN895CL tablet
ASoC: SOF: trace: fix unconditional free in trace release
audit: check the length of userspace generated audit records
cdc-acm: close race betrween suspend() and acm_softint
cdc-acm: introduce a cool down
ceph: don't skip updating wanted caps when cap is stale
ceph: return ceph_mdsc_do_request() errors from __get_parent()
cifs: fix uninitialised lease_key in open_shroot()
compat: ARM64: always include asm-generic/compat.h
coredump: fix null pointer dereference on coredump
cxgb4: fix adapter crash due to wrong MC size
cxgb4: fix large delays in PTP synchronization
dma-direct: fix data truncation in dma_direct_get_required_mask()
drm/amd/display: Calculate scaling ratios on every medium/full update
drm/amd/display: Not doing optimize bandwidth if flip pending.
drm/amd/display: Update stream adjust in dc_stream_adjust_vmin_vmax
ext4: fix extent_status fragmentation for plain files
f2fs: fix to avoid memory leakage in f2fs_listxattr
fpga: dfl: pci: fix return value of cci_pci_sriov_configure
geneve: use the correct nlattr array in NL_SET_ERR_MSG_ATTR
iio: adc: stm32-adc: fix sleep in atomic context
iio: adc: ti-ads8344: properly byte swap value
iio: core: remove extra semi-colon from devm_iio_device_register() macro
iio: st_sensors: rely on odr mask to know if odr can be set
iio: xilinx-xadc: Fix ADC-B powerdown
iio: xilinx-xadc: Fix clearing interrupt when enabling trigger
iio: xilinx-xadc: Fix sequencer configuration for aux channels in simultaneous mode
iio: xilinx-xadc: Make sure not exceed maximum samplerate
ipc/util.c: sysvipc_find_ipc() should increase position index
ipv4: Update fib_select_default to handle nexthop objects
ipv6: fix restrict IPV6_ADDRFORM operation
iwlwifi: mvm: beacon statistics shouldn't go backwards
iwlwifi: mvm: Do not declare support for ACK Enabled Aggregation
iwlwifi: mvm: fix inactive TID removal return value usage
iwlwifi: mvm: limit maximum queue appropriately
iwlwifi: pcie: actually release queue memory in TVQM
kconfig: qconf: Fix a few alignment issues
kernel/gcov/fs.c: gcov_seq_next() should increase position index
KEYS: Avoid false positive ENOMEM error on key read
KVM: Check validity of resolved slot when searching memslots
KVM: s390: Return last valid slot if approx index is out-of-bounds
KVM: VMX: Enable machine check support for 32bit targets
libbpf: Fix readelf output parsing on powerpc with recent binutils
lib/raid6/test: fix build on distros whose /bin/sh is not bash
loop: Better discard support for block devices
mac80211: populate debugfs only after cfg80211 init
macsec: avoid to set wrong mtu
macvlan: fix null dereference in macvlan_device_event()
mlxsw: Fix some IS_ERR() vs NULL bugs
mm/hugetlb: fix a addressing exception caused by huge_pte_offset
mm/ksm: fix NULL pointer dereference when KSM zero page is enabled
net: bcmgenet: correct per TX/RX ring statistics
net: dsa: b53: b53_arl_rw_op() needs to select IVL or SVL
net: dsa: b53: Fix ARL register definitions
net: dsa: b53: Fix valid setting for MDB entries
net: dsa: b53: Lookup VID in ARL searches when VLAN is enabled
net: dsa: b53: Rework ARL bin logic
net, ip_tunnel: fix interface lookup with no key
net/mlx4_en: avoid indirect call in TX completion
net: netrom: Fix potential nr_neigh refcnt leak in nr_add_node
net: openvswitch: ovs_ct_exit to be done under ovs_lock
net: stmmac: dwmac-meson8b: Add missing boundary to RGMII TX clock array
net/x25: Fix x25_neigh refcnt leak when receiving frame
nvme: fix compat address handling in several ioctls
nvme: fix deadlock caused by ANA update wrong locking
nvme-tcp: fix possible crash in write_zeroes processing
PCI/ASPM: Allow re-enabling Clock PM
PCI: pciehp: Prevent deadlock on disconnect
PCI/PM: Add missing link delays required by the PCIe spec
PCI/PM: Add pcie_wait_for_link_delay()
perf/core: Disable page faults when getting phys address
powerpc/kuap: PPC_KUAP_DEBUG should depend on PPC_KUAP
powerpc/mm: Fix CONFIG_PPC_KUAP_DEBUG on PPC32
powerpc/pseries: Fix MCE handling on pseries
powerpc/setup_64: Set cache-line-size based on cache-block-size
pwm: bcm2835: Dynamically allocate base
pwm: rcar: Fix late Runtime PM enablement
pwm: renesas-tpu: Fix late Runtime PM enablement
Revert "powerpc/64: irq_work avoid interrupt when called with hardware irqs enabled"
Revert "serial: uartps: Change uart ID port allocation"
Revert "serial: uartps: Do not allow use aliases >= MAX_UART_INSTANCES"
Revert "serial: uartps: Fix error path when alloc failed"
Revert "serial: uartps: Fix uartps_major handling"
Revert "serial: uartps: Move Port ID to device data structure"
Revert "serial: uartps: Register own uart console and driver structures"
Revert "serial: uartps: Use the same dynamic major number for all ports"
s390/cio: avoid duplicated 'ADD' uevents
s390/cio: generate delayed uevent for vfio-ccw subchannels
s390/mm: fix page table upgrade vs 2ndary address mode accesses
sched: etf: do not assume all sockets are full blown
scsi: iscsi: Report unbind session event when the target has been removed
scsi: libfc: If PRLI rejected, move rport to PLOGI state
scsi: lpfc: Fix crash after handling a pci error
scsi: lpfc: Fix crash in target side cable pulls hitting WAIT_FOR_UNREG
scsi: lpfc: Fix kasan slab-out-of-bounds error in lpfc_unreg_login
scsi: smartpqi: fix call trace in device discovery
scsi: smartpqi: fix controller lockup observed during force reboot
scsi: smartpqi: fix problem with unique ID for physical device
selftests: Fix suppress test in fib_tests.sh
selftests: kmod: fix handling test numbers above 9
serial: sh-sci: Make sure status register SCxSR is read in correct sequence
signal: Avoid corrupting si_pid and si_uid in do_notify_parent
staging: comedi: dt2815: fix writing hi byte of analog output
staging: comedi: Fix comedi_device refcnt leak in comedi_open
staging: gasket: Fix incongruency in handling of sysfs entries creation
staging: vt6656: Don't set RCR_MULTICAST or RCR_BROADCAST by default.
staging: vt6656: Fix calling conditions of vnt_set_bss_mode
staging: vt6656: Fix drivers TBTT timing counter.
staging: vt6656: Fix pairwise key entry save.
staging: vt6656: Power save stop wake_up_count wrap around.
SUNRPC: Fix backchannel RPC soft lockups
tcp: cache line align MAX_TCP_HEADER
team: fix hang in team_mode_get()
tools/testing/nvdimm: Fix compilation failure without CONFIG_DEV_DAX_PMEM_COMPAT
tools/test/nvdimm: Fix out of tree build
tools/vm: fix cross-compile build
tpm: fix wrong return value in tpm_pcr_extend
tpm: ibmvtpm: retry on H_CLOSED in tpm_ibmvtpm_send()
tpm/tpm_tis: Free IRQ if probing fails
tracing/selftests: Turn off timeout setting
tty: hvc: fix buffer overflow during hvc_alloc().
tty: rocket, avoid OOB access
tty: serial: owl: add "much needed" clk_prepare_enable()
UAS: fix deadlock in error handling and PM flushing work
UAS: no use logging any details in case of ENODEV
USB: Add USB_QUIRK_DELAY_CTRL_MSG and USB_QUIRK_DELAY_INIT for Corsair K70 RGB RAPIDFIRE
USB: core: Fix free-while-in-use bug in the USB S-Glibrary
usb: dwc3: gadget: Fix request completion check
USB: early: Handle AMD's spec-compliant identifiers, too
usb: f_fs: Clear OS Extended descriptor counts to zero in ffs_data_reset()
USB: hub: Fix handling of connect changes during sleep
USB: hub: Revert commit bd0e6c9614b9 ("usb: hub: try old enumeration scheme first for high speed devices")
USB: sisusbvga: Change port variable from signed to unsigned
usb-storage: Add unusual_devs entry for JMicron JMS566
usb: typec: altmode: Fix typec_altmode_get_partner sometimes returning an invalid pointer
usb: typec: tcpm: Ignore CC and vbus changes in PORT_RESET change
virtio-blk: improve virtqueue error to BLK_STS
vmalloc: fix remap_vmalloc_range() bounds checks
vrf: Check skb for XFRM_TRANSFORMED flag
vrf: Fix IPv6 with qdisc and xfrm
vt: don't hardcode the mem allocation upper bound
vt: don't use kmalloc() for the unicode screen buffer
vxlan: use the correct nlattr array in NL_SET_ERR_MSG_ATTR
watchdog: reset last_hw_keepalive time at start
xfrm: Always set XFRM_TRANSFORMED in xfrm{4,6}_output_finish
xhci: Don't clear hub TT buffer on ep0 protocol stall
xhci: Ensure link state is U3 after setting USB_SS_PORT_LS_U3
xhci: Finetune host initiated USB3 rootport link suspend and resume
xhci: Fix handling halted endpoint even if endpoint ring appears empty
xhci: prevent bus suspend if a roothub port detected a over-current condition
xhci: Wait until link state trainsits to U0 after setting USB_SS_PORT_LS_U0
Linux 5.4.37
afs: Fix length of dump of bad YFSFetchStatus record
afs: Fix to actually set AFS_SERVER_FL_HAVE_EPOCH
afs: Make record checking use TASK_UNINTERRUPTIBLE when appropriate
ALSA: hda: call runtime_allow() for all hda controllers
ALSA: hda: Explicitly permit using autosuspend if runtime PM is supported
ALSA: hda: Keep the controller initialization even if no codecs found
ALSA: hda: Release resources at error in delayed probe
arm64: Delete the space separator in __emit_inst
ARM: dts: bcm283x: Disable dsi0 node
ASoC: meson: axg-card: fix codec-to-codec link setup
ASoC: q6dsp6: q6afe-dai: add missing channels to MI2S DAIs
ASoC: soc-core: disable route checks for legacy devices
ASoC: stm32: sai: fix sai probe
ASoC: stm32: spdifrx: fix regmap status check
ASoC: tas571x: disable regulators on failed probe
ASoC: wm8960: Fix wrong clock after suspend & resume
blk-iocost: Fix error on iocost_ioc_vrate_adj
blk-mq: Put driver tag in blk_mq_dispatch_rq_list() when no budget
bpf: Forbid XADD on spilled pointers for unprivileged users
bpf, x86_32: Fix clobbering of dst for BPF_JSET
bpf, x86_32: Fix incorrect encoding in BPF_LDX zero-extension
bpf, x86_32: Fix logic error in BPF_LDX zero-extension
bpf, x86: Fix encoding for lower 8-bit registers in BPF_STX BPF_B
counter: 104-quad-8: Add lock guards - generic interface
cpumap: Avoid warning when CONFIG_DEBUG_PER_CPU_MAPS is enabled
Crypto: chelsio - Fixes a hang issue during driver registration
drivers: soc: xilinx: fix firmware driver Kconfig dependency
ext4: check for non-zero journal inum in ext4_calculate_overhead
ext4: convert BUG_ON's to WARN_ON's in mballoc.c
ext4: increase wait time needed before reuse of deleted inode numbers
ext4: use matching invalidatepage in ext4_writepage
hwmon: (jc42) Fix name to have no illegal characters
i2c: altera: use proper variable to hold errno
iio:ad7797: Use correct attribute_group
kbuild: fix DT binding schema rule again to avoid needless rebuilds
libbpf: Initialize *nl_pid so gcc 10 is happy
mac80211: fix channel switch trigger from unknown mesh peer
mm: shmem: disable interrupt when acquiring info->lock in userfaultfd_copy path
net/cxgb4: Check the return from t4_query_params properly
net: fec: set GPR bit on suspend by DT configuration.
netfilter: nat: fix error handling upon registering inet hook
net/mlx5e: Don't trigger IRQ multiple times on XSK wakeup to avoid WQ overruns
net/mlx5e: Get the latest values from counters in switchdev mode
net/mlx5: Fix failing fw tracer allocation on s390
net: stmmac: socfpga: Allow all RGMII modes
net: use indirect call wrappers for skb_copy_datagram_iter()
nfsd: memory corruption in nfsd4_lock()
objtool: Fix CONFIG_UBSAN_TRAP unreachable warnings
objtool: Support Clang non-section symbols in ORC dump
PCI: Add ACS quirk for Zhaoxin multi-function devices
PCI: Add ACS quirk for Zhaoxin Root/Downstream Ports
PCI: Add Zhaoxin Vendor ID
PCI: Avoid ASMedia XHCI USB PME# from D0 defect
PCI: Make ACS quirk implementations more uniform
PCI: Move Apex Edge TPU class quirk to fix BAR assignment
PCI: Unify ACS quirk desired vs provided checking
perf/core: fix parent pid/tid in task exit events
PM: sleep: core: Switch back to async_schedule_dev()
printk: queue wake_up_klogd irq_work only if per-CPU areas are ready
propagate_one(): mnt_set_mountpoint() needs mount_lock
qed: Fix race condition between scheduling and destroying the slowpath workqueue
qed: Fix use after free in qed_chain_free
remoteproc: Fix wrong rvring index computation
rxrpc: Fix DATA Tx to disable nofrag for UDP on AF_INET6 socket
s390/ftrace: fix potential crashes when switching tracers
s390/pci: do not set affinity for floating irqs
sched/core: Fix reset-on-fork from RT with uclamp
scsi: target: fix PR IN / READ FULL STATUS for FC
scsi: target: tcmu: reset_ring should reset TCMU_DEV_BIT_BROKEN
signal: check sig before setting info in kill_pid_usb_asyncio
svcrdma: Fix leak of svc_rdma_recv_ctxt objects
svcrdma: Fix trace point use-after-free race
taprio: do not use BIT() in TCA_TAPRIO_ATTR_FLAG_* definitions
ubifs: Fix ubifs_tnc_lookup() usage in do_kill_orphans()
um: ensure `make ARCH=um mrproper` removes arch/$(SUBARCH)/include/generated/
usb: dwc3: gadget: Do link recovery for SS and SSP
usb: gadget: udc: atmel: Fix vbus disconnect handling
usb: gadget: udc: bdc: Remove unnecessary NULL checks in bdc_req_complete
x86: hyperv: report value of misc_features
xen/xenbus: ensure xenbus_map_ring_valloc() returns proper grant status
xfs: acquire superblock freeze protection on eofblocks scans
xfs: clear PF_MEMALLOC before exiting xfsaild thread
xfs: fix partially uninitialized structure in xfs_reflink_remap_extent
Linux 5.4.38
Revert "ASoC: meson: axg-card: fix codec-to-codec link setup"
Linux 5.4.39
ALSA: hda/hdmi: fix without unlocked before return
ALSA: hda/realtek - Two front mics on a Lenovo ThinkCenter
ALSA: line6: Fix POD HD500 audio playback
ALSA: opti9xx: shut up gcc-10 range warning
ALSA: pcm: oss: Place the plugin buffer overflow checks correctly
ALSA: usb-audio: Correct a typo of NuPrime DAC-10 USB ID
arm64: vdso: Add -fasynchronous-unwind-tables to cflags
ARM: dts: imx6qdl-sr-som-ti: indicate powering off wifi is safe
btrfs: fix block group leak when removing fails
btrfs: fix partial loss of prealloc extent past i_size after fsync
btrfs: fix transaction leak in btrfs_recover_relocation
btrfs: transaction: Avoid deadlock due to bad initialization timing of fs_info::journal_info
crypto: caam - fix the address of the last entry of S/G
dlmfs_file_write(): fix the bogosity in handling non-zero *ppos
dma-buf: Fix SET_NAME ioctl uapi
dmaengine: dmatest: Fix iteration non-stop logic
dmaengine: dmatest: Fix process hang when reading 'wait' parameter
dm multipath: use updated MPATHF_QUEUE_IO on mapping for bio-based mpath
dm verity fec: fix hash block number in verity_fec_decode
dm writecache: fix data corruption when reloading the target
Drivers: hv: vmbus: Fix Suspend-to-Idle for Generation-2 VM
drm/amd/display: Fix green screen issue after suspend
drm/edid: Fix off-by-one in DispID DTD pixel clock
drm/qxl: qxl_release leak in qxl_draw_dirty_fb()
drm/qxl: qxl_release leak in qxl_hw_surface_alloc()
drm/qxl: qxl_release use after free
Fix use after free in get_tree_bdev()
i2c: amd-mp2-pci: Fix Oops in amd_mp2_pci_init() error handling
i2c: aspeed: Avoid i2c interrupt status clear race condition.
i2c: iproc: generate stop event for slave writes
IB/rdmavt: Always return ERR_PTR from rvt_create_mmap_info()
iommu/amd: Fix legacy interrupt remapping for x2APIC-enabled system
iommu/qcom: Fix local_base status check
mmc: cqhci: Avoid false "cqhci: CQE stuck on" by not open-coding timeout loop
mmc: meson-mx-sdio: remove the broken ->card_busy() op
mmc: meson-mx-sdio: Set MMC_CAP_WAIT_WHILE_BUSY
mmc: sdhci-msm: Enable host capabilities pertains to R1b response
mmc: sdhci-pci: Fix eMMC driver strength for BYT-based controllers
mmc: sdhci-xenon: fix annoying 1.8V regulator warning
nfs: Fix potential posix_acl refcnt leak in nfs3_set_acl
NFSv4.1: fix handling of backchannel binding in BIND_CONN_TO_SESSION
nvme: prevent double free in nvme_alloc_ns() error handling
PM: ACPI: Output correct message on target power state
PM: hibernate: Freeze kernel threads in software_resume()
RDMA/cm: Fix an error check in cm_alloc_id_priv()
RDMA/cm: Fix ordering of xa_alloc_cyclic() in ib_create_cm_id()
RDMA/core: Fix race between destroy and release FD object
RDMA/core: Prevent mixed use of FDs between shared ufiles
RDMA/mlx4: Initialize ib_spec on the stack
RDMA/mlx5: Set GRH fields in query QP on RoCE
RDMA/siw: Fix potential siw_mem refcnt leak in siw_fastreg_mr()
scsi: qla2xxx: check UNLOADING before posting async work
scsi: qla2xxx: set UNLOADING before waiting for session deletion
scsi: target/iblock: fix WRITE SAME zeroing
selinux: properly handle multiple messages in selinux_netlink_send()
vfio: avoid possible overflow in vfio_iommu_type1_pin_pages
vfio/type1: Fix VA->PA translation for PFNMAP VMAs in vaddr_get_pfn()
Linux 5.4.40
ACPI: PM: s2idle: Fix comment in acpi_s2idle_prepare_late()
ALSA: hda: Match both PCI ID and SSID for driver blacklist
ASoC: codecs: hdac_hdmi: Fix incorrect use of list_for_each_entry
ASoC: rsnd: Don't treat master SSI in multi SSI setup as parent
ASoC: rsnd: Fix HDMI channel mapping for multi-SSI mode
ASoC: rsnd: Fix parent SSI start/stop in multi-SSI mode
ASoC: rsnd: Fix "status check failed" spam for multi-SSI
ASoC: sgtl5000: Fix VAG power-on handling
ASoC: topology: Check return value of pcm_new_ver
ASoC: topology: Check return value of soc_tplg_*_create
ASoC: topology: Check return value of soc_tplg_create_tlv
ASoC: topology: Check return value of soc_tplg_dai_config
ASoC: topology: Check soc_tplg_add_route return value
ASoC: topology: Fix endianness issue
cgroup, netclassid: remove double cond_resched
cifs: do not share tcons with DFS
cifs: protect updating server->dstaddr with a spinlock
drm/amdgpu: Correctly initialize thermal controller for GPUs with Powerplay table v0 (e.g Hawaii)
drm/amdgpu: Fix oops when pp_funcs is unset in ACPI event
drm/bridge: analogix_dp: Split bind() into probe() and real bind()
drm/i915: Extend WaDisableDARBFClkGating to icl,ehl,tgl
hexagon: clean up ioremap
hexagon: define ioremap_uc
libbpf: Fix readelf output parsing for Fedora
lib: devres: add a helper function for ioremap_uc
lib/mpi: Fix building for powerpc with clang
mac80211: add ieee80211_is_any_nullfunc()
mac80211: sta_info: Add lockdep condition for RCU list usage
mfd: intel-lpss: Use devm_ioremap_uc for MMIO
mm/mremap: Add comment explaining the untagging behaviour of mremap()
net: bcmgenet: suppress warnings on failed Rx SKB allocations
net: stmmac: fix enabling socfpga's ptp_ref_clock
net: stmmac: Fix sub-second increment
net: systemport: suppress warnings on failed Rx SKB allocations
platform/x86: GPD pocket fan: Fix error message when temp-limits are out of range
PM / devfreq: Add missing locking while setting suspend_freq
remoteproc: qcom_q6v5_mss: fix a bug in q6v5_probe()
Revert "drm/amd/display: setting the DIG_MODE to the correct value."
Revert "software node: Simplify software_node_release() function"
scripts/config: allow colons in option strings for sed
sctp: Fix SHUTDOWN CTSN Ack in the peer restart case
selftests/ipc: Fix test failure seen after initial test run
tools headers UAPI: Sync copy of arm64's asm/unistd.h with the kernel sources
tracing: Fix memory leaks in trace_events_hist.c
udp: document udp_rcv_segment special case for looped packets
usb: dwc3: gadget: Properly set maxpacket limit
vhost: vsock: kick send_pkt worker once device is started
wimax/i2400m: Fix potential urb refcnt leak
x86/kvm: fix a missing-prototypes "vmread_error"
```
2020-05-10 18:37:14 +03:00
|
|
|
%define sublevel 40
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2016-07-22 22:05:03 +03:00
|
|
|
# Release number. Increase this before a rebuild.
|
2020-08-06 14:30:23 +03:00
|
|
|
%define rpmrel 9
|
2019-07-16 18:30:53 +03:00
|
|
|
%define fullrpmrel %{rpmrel}
|
2013-11-16 00:27:01 +04:00
|
|
|
|
|
|
|
%define rpmtag %{disttag}
|
|
|
|
|
|
|
|
# fakerel and fakever never change, they are used to fool
|
2015-07-01 16:47:47 +03:00
|
|
|
# rpm/urpmi/smart and ensure the kernels are installed,
|
|
|
|
# not upgraded so old kernel is not overwritten or removed
|
2013-11-16 00:27:01 +04:00
|
|
|
%define fakever 1
|
|
|
|
%define fakerel %mkrel 1
|
|
|
|
|
|
|
|
# version defines
|
|
|
|
%define kversion %{kernelversion}.%{patchlevel}.%{sublevel}
|
2019-07-16 18:30:53 +03:00
|
|
|
%define kverrel %{kversion}-%{fullrpmrel}
|
2013-11-16 00:27:01 +04:00
|
|
|
%define tar_ver %{kernelversion}.%{patchlevel}
|
|
|
|
|
2015-03-16 18:42:29 +03:00
|
|
|
%ifarch %{ix86}
|
|
|
|
# Use a standard suffix for 32-bit x86
|
|
|
|
%define arch_suffix i586
|
|
|
|
%else
|
|
|
|
%define arch_suffix %{_arch}
|
|
|
|
%endif
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
%define buildrpmrel %{fullrpmrel}%{rpmtag}-%{arch_suffix}
|
2013-11-16 00:27:01 +04:00
|
|
|
%define buildrel %{kversion}-%{buildrpmrel}
|
|
|
|
|
2019-11-11 21:28:45 +03:00
|
|
|
# %%build_selinux may be defined in branding-configs
|
2020-03-18 22:20:03 +03:00
|
|
|
#%%{?build_selinux}%{?!build_selinux:%bcond_with selinux}
|
|
|
|
#%%if %{with selinux}
|
2019-11-11 21:28:45 +03:00
|
|
|
%global enhanced_security 1
|
2020-03-18 22:20:03 +03:00
|
|
|
#%%else
|
|
|
|
#%%global enhanced_security 0
|
|
|
|
#%%endif
|
|
|
|
# Allow "rpmbuild --without enhanced_security <...>"
|
|
|
|
%{?_without_enhanced_security:%global enhanced_security 0}
|
2019-11-11 21:28:45 +03:00
|
|
|
|
2019-11-17 16:56:39 +03:00
|
|
|
%if %{enhanced_security}
|
|
|
|
%bcond_without additional_keys
|
|
|
|
%endif
|
2020-03-13 20:35:12 +03:00
|
|
|
# User Mode Linux, https://habr.com/ru/company/itsumma/blog/459558/
|
|
|
|
%bcond_without 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
|
2020-03-29 01:07:43 +03:00
|
|
|
# gost_sign will probably be enabled outside of Nickel later,
|
|
|
|
# but for now let's better do not make such experiments in stable platforms
|
2020-03-18 22:20:03 +03:00
|
|
|
%if %{mdvver} == 201900 || %{mdvver} == 201905
|
|
|
|
%bcond_without nickel
|
2020-03-29 01:07:43 +03:00
|
|
|
%bcond_without gost_sign
|
2020-08-06 14:44:29 +03:00
|
|
|
%bcond_without oblig_signed_modules
|
2020-03-18 22:20:03 +03:00
|
|
|
%else
|
|
|
|
%bcond_with nickel
|
2020-03-29 01:07:43 +03:00
|
|
|
%bcond_with gost_sign
|
2020-08-06 14:44:29 +03:00
|
|
|
%bcond_with oblig_signed_modules
|
2020-03-18 22:20:03 +03:00
|
|
|
%endif
|
|
|
|
|
2020-07-29 10:59:41 +03:00
|
|
|
# Build binary out-of-tree kernel modules (experimental)
|
|
|
|
%if %{mdvver} >= 201905
|
|
|
|
%bcond_without binary_extra_modules
|
|
|
|
%else
|
|
|
|
%bcond_with binary_extra_modules
|
|
|
|
%endif
|
|
|
|
|
2020-07-27 16:53:12 +03:00
|
|
|
%bcond_with ccache
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# Kernel flavour
|
2020-03-18 22:20:03 +03:00
|
|
|
%if %{with nickel}
|
2019-11-11 21:28:45 +03:00
|
|
|
%define flavour nickel
|
|
|
|
%else
|
2020-03-18 22:20:03 +03: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
|
|
|
|
%define kver_full %{kversion}-%{flavour}-%{buildrpmrel}
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
%define top_dir_name kernel-%{_arch}
|
2013-11-16 00:27:01 +04:00
|
|
|
%define build_dir ${RPM_BUILD_DIR}/%{top_dir_name}
|
2019-07-21 21:43:25 +03:00
|
|
|
%define src_dir %{build_dir}/linux-%{tar_ver}
|
2019-07-16 18:30:53 +03:00
|
|
|
|
|
|
|
# Common target directories
|
|
|
|
%define _bootdir /boot
|
|
|
|
%define _modulesdir /lib/modules
|
|
|
|
|
|
|
|
%define devel_root /usr/src/linux-%{kver_full}
|
|
|
|
|
|
|
|
# Directories needed for building
|
|
|
|
%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}
|
|
|
|
|
|
|
|
# Directories definition needed for installing
|
|
|
|
%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.
|
2019-11-19 16:37:20 +03:00
|
|
|
%define certs_dir_rnd certs
|
2019-12-07 21:57:55 +03:00
|
|
|
%define certs_signing_key_priv_rnd %{certs_dir_rnd}/signing_key_priv.key
|
|
|
|
%define certs_signing_der %{certs_dir_rnd}/signing_key.x509
|
2019-11-11 17:47:53 +03:00
|
|
|
%define certs_key_config_rnd %{certs_dir_rnd}/x509.genkey
|
2019-11-18 18:48:33 +03:00
|
|
|
%define certs_public_keys %{certs_dir_rnd}/public.pem
|
2019-11-11 21:16:01 +03:00
|
|
|
%define certs_verify_tmp %{certs_dir_rnd}/verify.tmp
|
2016-07-29 13:39:16 +03:00
|
|
|
############################################################################
|
2013-11-16 00:27:01 +04:00
|
|
|
|
|
|
|
# Build defines
|
2019-07-16 17:21:32 +03:00
|
|
|
%define build_doc 0
|
2013-11-16 00:27:01 +04:00
|
|
|
%define build_devel 1
|
2019-11-12 16:07:05 +03:00
|
|
|
%define build_debug 1
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2018-09-04 11:17:26 +03:00
|
|
|
# Build kernel-headers package
|
2020-03-21 03:02:08 +03:00
|
|
|
# Make headers of this kernel not default for rosa2016.1
|
|
|
|
%if %{mdvver} <= 201610
|
|
|
|
%define build_headers 0
|
|
|
|
%else
|
|
|
|
%define build_headers 1
|
2020-03-21 03:17:06 +03:00
|
|
|
%endif
|
2018-09-04 11:17:26 +03:00
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
# build perf and cpupower tools
|
2016-01-06 17:46:38 +03:00
|
|
|
%define build_perf 1
|
2013-11-16 00:27:01 +04:00
|
|
|
%define build_cpupower 1
|
|
|
|
|
|
|
|
# compress modules with xz
|
|
|
|
%define build_modxz 1
|
|
|
|
# End of user definitions
|
|
|
|
|
|
|
|
# buildtime flags
|
|
|
|
%{?_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}
|
|
|
|
%{?_without_modxz: %global build_modxz 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}
|
|
|
|
%{?_with_modxz: %global build_modxz 1}
|
|
|
|
|
2020-07-29 10:59:41 +03:00
|
|
|
%if %{build_modxz}
|
|
|
|
%define kmod_suffix .xz
|
|
|
|
%else
|
|
|
|
%define kmod_suffix .gz
|
|
|
|
%endif
|
|
|
|
|
2016-07-21 15:59:26 +03:00
|
|
|
%if !%{build_debug}
|
|
|
|
# Disable debug rpms.
|
|
|
|
%define _enable_debug_packages %{nil}
|
|
|
|
%define debug_package %{nil}
|
|
|
|
%endif
|
|
|
|
|
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}
|
|
|
|
%define kmake KBUILD_BUILD_TIMESTAMP='' %make CC='ccache gcc'
|
2013-11-16 00:27:01 +04:00
|
|
|
%else
|
2020-07-27 16:53:12 +03:00
|
|
|
%define kmake %make CC='gcc'
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
2020-07-27 16:53:12 +03:00
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
# there are places where parallel make don't work
|
2014-01-23 11:57:37 +04:00
|
|
|
%define smake make
|
2014-01-22 18:31:57 +04:00
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
# Parallelize xargs invocations on smp machines
|
|
|
|
%define kxargs xargs %([ -z "$RPM_BUILD_NCPUS" ] \\\
|
|
|
|
&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
|
|
|
|
[ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-P $RPM_BUILD_NCPUS")
|
|
|
|
|
|
|
|
#
|
|
|
|
# SRC RPM description
|
|
|
|
#
|
2016-07-26 11:41:00 +03:00
|
|
|
Summary: The Linux kernel
|
2019-07-16 18:30:53 +03:00
|
|
|
Name: kernel
|
2013-11-16 00:27:01 +04:00
|
|
|
Version: %{kversion}
|
2019-07-16 18:30:53 +03:00
|
|
|
Release: %{fullrpmrel}
|
2013-11-16 00:27:01 +04:00
|
|
|
License: GPLv2
|
|
|
|
Group: System/Kernel and hardware
|
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
|
|
|
ExclusiveArch: %{ix86} x86_64
|
2013-11-16 00:27:01 +04:00
|
|
|
URL: http://www.kernel.org
|
|
|
|
|
|
|
|
####################################################################
|
|
|
|
#
|
|
|
|
# Sources
|
|
|
|
#
|
2018-01-10 22:20:13 +03:00
|
|
|
Source0: https://cdn.kernel.org/pub/linux/kernel/v%{kernelversion}.x/linux-%{tar_ver}.tar.xz
|
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.
|
2013-11-16 00:27:01 +04:00
|
|
|
Source2: disable-mrproper-prepare-scripts-configs-in-devel-rpms.patch
|
|
|
|
|
2020-07-29 10:59:41 +03:00
|
|
|
# TODO: make a separate package "ksobirator" and BR it
|
|
|
|
# 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.
|
|
|
|
Source110: kernel-%{arch_suffix}.config
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2015-03-17 20:53:12 +03:00
|
|
|
# Cpupower: the service, the config, etc.
|
2013-11-16 00:27:01 +04:00
|
|
|
Source50: cpupower.service
|
|
|
|
Source51: cpupower.config
|
2015-03-13 17:29:40 +03:00
|
|
|
Source52: cpupower-start.sh
|
2015-03-17 20:53:12 +03:00
|
|
|
Source53: cpupower.path
|
2013-11-16 00:27:01 +04: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
|
|
|
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.
|
2018-01-10 22:20:13 +03:00
|
|
|
Patch1: https://cdn.kernel.org/pub/linux/kernel/v%{kernelversion}.x/patch-%{kversion}.xz
|
2019-07-16 18:30:53 +03:00
|
|
|
|
|
|
|
# Patches from mainline
|
|
|
|
# none
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2016-07-26 11:24:24 +03:00
|
|
|
# ROSA-specific patches
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
Patch101: perf-xmlto-skip-validation.patch
|
|
|
|
|
|
|
|
# http://bugs.rosalinux.ru/show_bug.cgi?id=6235
|
|
|
|
# http://bugs.rosalinux.ru/show_bug.cgi?id=6459
|
2019-07-16 18:30:53 +03:00
|
|
|
Patch102: audit-make-it-less-verbose.patch
|
2016-07-26 11:24:24 +03:00
|
|
|
|
|
|
|
# AUFS from http://aufs.sourceforge.net/
|
2019-12-16 16:12:07 +03:00
|
|
|
Patch109: fs-aufs.patch
|
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
|
|
|
|
Patch110: 0001-Remove-RPM-illegal-chars-from-module-version.patch
|
|
|
|
|
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
|
|
|
|
Patch201: 0001-AltHa-LSM-module.patch
|
|
|
|
Patch202: 0002-Documentation-for-AltHa-LSM.patch
|
|
|
|
|
2020-03-07 19:46:37 +03:00
|
|
|
# Other patches
|
2020-03-16 23:19:46 +03:00
|
|
|
Patch301: objtool-sync-check.sh-set-the-exit-code-explicitly.patch
|
2020-03-20 11:27:35 +03:00
|
|
|
# sent to upstream, https://patchwork.kernel.org/patch/11446123/
|
2020-03-19 00:41:40 +03:00
|
|
|
Patch302: 0001-sign-file-full-functionality-with-modern-LibreSSL.patch
|
2020-05-11 02:31:08 +03:00
|
|
|
# For buildability with new binutils
|
|
|
|
# https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/commit/?id=0ada120c883d
|
|
|
|
Patch303: perf-5.4.20-binutil-libs-2.34.patch
|
2020-07-27 22:32:06 +03:00
|
|
|
# Add sysctl to disable disk-based swap
|
|
|
|
Patch304: 0001-mm-add-sysctl-to-disable-disk-based-swap.patch
|
2020-08-06 14:30:23 +03:00
|
|
|
# Support loading GOST-signed modules
|
|
|
|
Patch305: 0001-crypto-support-loading-GOST-signed-kernel-modules.patch
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2020-03-09 10:50:38 +03:00
|
|
|
# Disable AutoReq
|
|
|
|
AutoReq: 0
|
|
|
|
# but keep autoprov for kmod(xxx)
|
|
|
|
AutoProv: 1
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2020-03-09 10:46:18 +03:00
|
|
|
BuildRequires: bash
|
2014-07-11 16:00:31 +04:00
|
|
|
BuildRequires: bc
|
|
|
|
BuildRequires: binutils
|
|
|
|
BuildRequires: gcc
|
|
|
|
# For power tools
|
|
|
|
BuildRequires: pkgconfig(ncurses)
|
2013-11-16 00:27:01 +04:00
|
|
|
BuildRequires: kmod-devel kmod-compat
|
2018-02-10 19:33:13 +03:00
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: flex
|
2019-07-16 18:30:53 +03:00
|
|
|
BuildRequires: bzip2
|
2019-09-24 11:56:44 +03:00
|
|
|
BuildRequires: rsync
|
|
|
|
|
2014-05-19 18:34:31 +04:00
|
|
|
%ifarch x86_64
|
|
|
|
BuildRequires: numa-devel
|
|
|
|
%endif
|
|
|
|
|
2014-07-11 16:00:31 +04:00
|
|
|
# for perf, cpufreq and all other tools
|
|
|
|
# for cpupower
|
|
|
|
%if %{build_cpupower}
|
|
|
|
BuildRequires: pciutils-devel
|
|
|
|
%endif
|
|
|
|
# for perf
|
|
|
|
%if %{build_perf}
|
|
|
|
BuildRequires: asciidoc
|
|
|
|
BuildRequires: audit-devel
|
2013-11-16 00:27:01 +04:00
|
|
|
BuildRequires: binutils-devel
|
2014-07-11 16:00:31 +04:00
|
|
|
BuildRequires: elfutils-devel
|
|
|
|
BuildRequires: libunwind-devel
|
2013-11-16 00:27:01 +04:00
|
|
|
BuildRequires: newt-devel
|
2014-07-11 16:00:31 +04:00
|
|
|
BuildRequires: perl-devel
|
2020-03-09 10:56:05 +03:00
|
|
|
BuildRequires: pkgconfig(python)
|
2013-11-16 00:27:01 +04:00
|
|
|
BuildRequires: xmlto
|
2014-07-11 16:00:31 +04:00
|
|
|
BuildRequires: zlib-devel
|
2016-07-26 18:18:51 +03:00
|
|
|
BuildRequires: pkgconfig(libcrypto)
|
2014-07-11 16:00:31 +04:00
|
|
|
%endif
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-11-11 17:47:53 +03:00
|
|
|
%if %{enhanced_security}
|
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
|
|
|
|
BuildRequires: libressl libressl-devel
|
2019-11-11 21:16:01 +03:00
|
|
|
# To verify signatures (find, xargs, hexdump)
|
|
|
|
BuildRequires: findutils util-linux
|
2019-11-11 17:47:53 +03:00
|
|
|
%endif
|
|
|
|
|
2020-07-29 10:59:41 +03:00
|
|
|
%if %{with binary_extra_modules}
|
|
|
|
BuildRequires: kernel-source-rtl8821ce
|
|
|
|
BuildRequires: kernel-source-shredder-kernel
|
|
|
|
BuildRequires: kernel-source-tripso
|
|
|
|
BuildRequires: kernel-source-virtualbox
|
|
|
|
# TODO: drop it for kernels >= 5.6
|
|
|
|
# because all guest modules have been upstreamized
|
|
|
|
# https://www.phoronix.com/scan.php?page=news_item&px=VirtualBox-Shared-Folder-5.6
|
|
|
|
BuildRequires: kernel-source-virtualbox-vboxadditions
|
|
|
|
%endif
|
|
|
|
|
2020-07-27 16:53:12 +03:00
|
|
|
%if %{with ccache}
|
|
|
|
BuildRequires: ccache
|
|
|
|
%endif
|
|
|
|
|
2014-07-11 16:00:31 +04:00
|
|
|
# might be useful too:
|
2020-03-09 10:46:18 +03:00
|
|
|
Recommends: microcode
|
2014-07-11 16:00:31 +04:00
|
|
|
|
2013-11-16 00:27:01 +04: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.
|
|
|
|
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
%package -n kernel-%{flavour}-%{buildrel}
|
|
|
|
Version: %{fakever}
|
|
|
|
Release: %{fakerel}
|
|
|
|
|
|
|
|
Provides: kernel = %{kverrel}
|
|
|
|
Provides: kernel = %{kernelversion}.%{patchlevel}
|
2019-11-17 15:12:03 +03:00
|
|
|
Provides: kernel-%{flavour} = %{kverrel}
|
2019-11-17 15:18:28 +03:00
|
|
|
%if %{enhanced_security}
|
|
|
|
Provides: kernel-hardened = %{kverrel}
|
|
|
|
Provides: kernel-hardened = %{kernelversion}.%{patchlevel}
|
|
|
|
Provides: kernel-hardened-%{flavour} = %{kverrel}
|
|
|
|
%endif
|
2019-07-16 18:30:53 +03:00
|
|
|
Provides: alsa = 1.0.27
|
|
|
|
Provides: should-restart = system
|
|
|
|
|
|
|
|
Requires(pre): grub2
|
|
|
|
Requires(pre): dracut >= 046
|
|
|
|
Requires(pre): kmod >= 20-1
|
|
|
|
Requires(pre): sysfsutils >= 2.1.0-12
|
|
|
|
Requires: dracut >= 046
|
|
|
|
Requires: linux-firmware >= 20181026
|
|
|
|
Requires: wireless-regdb
|
|
|
|
|
2020-03-09 10:46:18 +03:00
|
|
|
Recommends: crda
|
2019-07-16 18:30:53 +03:00
|
|
|
|
2020-08-03 20:51:43 +03:00
|
|
|
# Keep these deps on old platforms
|
|
|
|
# but get rid of puling gcc etc. by the kernel on newer platforms
|
|
|
|
%if %{build_devel} && %{mdvver} < 201900
|
2019-07-16 18:30:53 +03:00
|
|
|
Requires: kernel-%{flavour}-devel-%{buildrel}
|
|
|
|
Requires(post): kernel-%{flavour}-devel-%{buildrel}
|
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
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
Summary: A general-purpose Linux Kernel
|
|
|
|
Group: System/Kernel and hardware
|
|
|
|
|
|
|
|
%description -n kernel-%{flavour}-%{buildrel}
|
|
|
|
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.
|
|
|
|
|
|
|
|
%post -n kernel-%{flavour}-%{buildrel}
|
|
|
|
# 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.
|
2013-11-16 00:27:01 +04:00
|
|
|
#
|
2019-07-16 18:30:53 +03:00
|
|
|
# depmod is also needed, because some DKMS-modules might have been installed
|
|
|
|
# when the devel package was installed but that was before the main modules
|
|
|
|
# were installed.
|
|
|
|
# This is also the reason the devel package is in Requires(post) for this
|
|
|
|
# package now: it must be installed completely before we call depmod here.
|
|
|
|
/sbin/depmod -a %{kver_full}
|
|
|
|
/sbin/dracut -f /boot/initrd-%{kver_full}.img %{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
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
pushd /boot > /dev/null
|
|
|
|
if [ -L vmlinuz-%{flavour} ]; then
|
|
|
|
rm -f vmlinuz-%{flavour}
|
|
|
|
fi
|
|
|
|
if [ -L initrd-%{flavour}.img ]; then
|
|
|
|
rm -f initrd-%{flavour}.img
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
exit 0
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
%preun -n kernel-%{flavour}-%{buildrel}
|
|
|
|
pushd /boot > /dev/null
|
|
|
|
if [ -L vmlinuz-%{flavour} ]; then
|
|
|
|
if [ "$(readlink vmlinuz-%{flavour})" = "vmlinuz-%{kver_full}" ]; then
|
|
|
|
rm -f vmlinuz-%{flavour}
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ -L initrd-%{flavour}.img ]; then
|
|
|
|
if [ "$(readlink initrd-%{flavour}.img)" = "initrd-%{kver_full}.img" ]; then
|
|
|
|
rm -f initrd-%{flavour}.img
|
|
|
|
fi
|
|
|
|
fi
|
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
|
|
|
|
|
|
|
|
popd > /dev/null
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
%postun -n kernel-%{flavour}-%{buildrel}
|
|
|
|
rm -f /boot/initrd-%{kver_full}.img
|
|
|
|
rm -f /boot/initrd-%{kver_full}_old.img
|
|
|
|
rm -f /boot/initrd-%{kver_full}kdump.img
|
|
|
|
rm -f /boot/initramfs-%{kver_full}kdump.img
|
|
|
|
|
|
|
|
# Third-party modules might have left something in /lib/modules/.../kernel/.
|
|
|
|
rm -rf /lib/modules/%{kver_full}/kernel/
|
|
|
|
rm -rf /lib/modules/%{kver_full}/modules*
|
|
|
|
# Remove /lib/modules/<...>/ if it is empty (-devel uses it too).
|
|
|
|
find /lib/modules/%{kver_full} -maxdepth 0 -empty -exec rm -rf {} \; || true
|
|
|
|
|
|
|
|
|
2019-07-21 23:50:25 +03:00
|
|
|
%files -n kernel-%{flavour}-%{buildrel} -f kernel_files.%{flavour}
|
2019-07-16 18:30:53 +03:00
|
|
|
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
%if %build_devel
|
|
|
|
%package -n kernel-%{flavour}-devel-%{buildrel}
|
|
|
|
Version: %{fakever}
|
|
|
|
Release: %{fakerel}
|
|
|
|
Summary: Development files for kernel-%{flavour}-%{buildrel}
|
|
|
|
Group: Development/Kernel
|
|
|
|
Requires: glibc-devel
|
|
|
|
Requires: ncurses-devel
|
|
|
|
Requires: make
|
|
|
|
Requires: gcc
|
|
|
|
Requires: perl
|
|
|
|
Provides: kernel-devel = %{kverrel}
|
2019-11-17 15:12:03 +03:00
|
|
|
Provides: kernel-%{flavour}-devel = %{kverrel}
|
2019-11-17 15:18:28 +03:00
|
|
|
%if %{enhanced_security}
|
|
|
|
Provides: kernel-hardened-devel = %{kverrel}
|
|
|
|
Provides: kernel-hardened-%{flavour}-devel = %{kverrel}
|
|
|
|
%endif
|
2019-07-16 18:30:53 +03:00
|
|
|
|
|
|
|
%ifarch %{ix86}
|
|
|
|
Conflicts: arch(x86_64)
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
%description -n kernel-%{flavour}-devel-%{buildrel}
|
|
|
|
This package contains the kernel files (headers and build tools)
|
|
|
|
that should be enough to build additional drivers for
|
|
|
|
use with kernel-%{flavour}-%{buildrel}.
|
|
|
|
|
|
|
|
%post -n kernel-%{flavour}-devel-%{buildrel}
|
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
|
|
|
|
|
|
|
%preun -n kernel-%{flavour}-devel-%{buildrel}
|
2019-11-12 16:16:27 +03:00
|
|
|
|
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
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
%postun -n kernel-%{flavour}-devel-%{buildrel}
|
|
|
|
rm -rf /usr/src/linux-%{kver_full} >/dev/null
|
|
|
|
# depmod (called when removing DKMS modules) might have created files in
|
|
|
|
# /lib/modules/.../. Remove these first.
|
|
|
|
rm -rf /lib/modules/%{kver_full}/modules*
|
|
|
|
# Remove the dir if it is already empty.
|
|
|
|
find /lib/modules/%{kver_full} -maxdepth 0 -empty -exec rm -rf {} \; || true
|
|
|
|
|
|
|
|
|
|
|
|
%files -n kernel-%{flavour}-devel-%{buildrel}
|
|
|
|
%dir %{devel_root}
|
|
|
|
%dir %{devel_root}/arch
|
|
|
|
%dir %{devel_root}/include
|
|
|
|
%{devel_root}/Documentation
|
|
|
|
%{devel_root}/arch/um
|
|
|
|
%{devel_root}/arch/x86
|
|
|
|
%{devel_root}/block
|
|
|
|
%{devel_root}/certs
|
|
|
|
%{devel_root}/crypto
|
|
|
|
%{devel_root}/drivers
|
|
|
|
%{devel_root}/fs
|
|
|
|
%{devel_root}/include/acpi
|
|
|
|
%{devel_root}/include/asm-generic
|
|
|
|
%{devel_root}/include/clocksource
|
|
|
|
%{devel_root}/include/config
|
|
|
|
%{devel_root}/include/crypto
|
|
|
|
%{devel_root}/include/drm
|
|
|
|
%{devel_root}/include/dt-bindings
|
|
|
|
%{devel_root}/include/generated
|
|
|
|
%{devel_root}/include/keys
|
|
|
|
%{devel_root}/include/kvm
|
|
|
|
%{devel_root}/include/linux
|
|
|
|
%{devel_root}/include/math-emu
|
|
|
|
%{devel_root}/include/media
|
|
|
|
%{devel_root}/include/misc
|
|
|
|
%{devel_root}/include/net
|
|
|
|
%{devel_root}/include/pcmcia
|
|
|
|
%{devel_root}/include/ras
|
|
|
|
%{devel_root}/include/rdma
|
|
|
|
%{devel_root}/include/scsi
|
|
|
|
%{devel_root}/include/sound
|
|
|
|
%{devel_root}/include/target
|
|
|
|
%{devel_root}/include/trace
|
|
|
|
%{devel_root}/include/uapi
|
2019-09-24 18:37:26 +03:00
|
|
|
%{devel_root}/include/vdso
|
2019-07-16 18:30:53 +03:00
|
|
|
%{devel_root}/include/video
|
|
|
|
%{devel_root}/include/xen
|
|
|
|
%{devel_root}/init
|
|
|
|
%{devel_root}/ipc
|
|
|
|
%{devel_root}/kernel
|
|
|
|
%{devel_root}/lib
|
|
|
|
%{devel_root}/mm
|
|
|
|
%{devel_root}/net
|
|
|
|
%{devel_root}/samples
|
|
|
|
%{devel_root}/scripts
|
|
|
|
%{devel_root}/security
|
|
|
|
%{devel_root}/sound
|
|
|
|
%{devel_root}/tools
|
|
|
|
%{devel_root}/usr
|
|
|
|
%{devel_root}/virt
|
|
|
|
%{devel_root}/.config
|
|
|
|
%{devel_root}/Kbuild
|
|
|
|
%{devel_root}/Kconfig
|
|
|
|
%{devel_root}/Makefile
|
|
|
|
%{devel_root}/Module.symvers
|
|
|
|
%{devel_root}/arch/Kconfig
|
|
|
|
%{_modulesdir}/%{kver_full}/build
|
|
|
|
%{_modulesdir}/%{kver_full}/source
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
%if %build_debug
|
|
|
|
%package -n kernel-%{flavour}-%{buildrel}-debuginfo
|
|
|
|
Version: %{fakever}
|
|
|
|
Release: %{fakerel}
|
|
|
|
Summary: Debuginfo for kernel-%{flavour}-%{buildrel}
|
|
|
|
Group: Development/Debug
|
|
|
|
Provides: kernel-debug = %{kverrel}
|
2019-11-17 15:18:28 +03:00
|
|
|
%if %{enhanced_security}
|
|
|
|
Provides: kernel-hardened-debug = %{kverrel}
|
|
|
|
%endif
|
2019-07-16 18:30:53 +03:00
|
|
|
|
|
|
|
%ifarch %{ix86}
|
|
|
|
Conflicts: arch(x86_64)
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description -n kernel-%{flavour}-%{buildrel}-debuginfo
|
|
|
|
This package contains the files with debuginfo for kernel-%{flavour}-%{buildrel}.
|
|
|
|
|
2019-11-14 00:20:41 +03:00
|
|
|
%files -n kernel-%{flavour}-%{buildrel}-debuginfo -f kernel_debug_files.%{flavour}
|
2019-07-16 18:30:53 +03:00
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
%package -n kernel-%{flavour}-%{kernelversion}.%{patchlevel}-latest
|
|
|
|
Version: %{kversion}
|
|
|
|
Release: %{fullrpmrel}
|
|
|
|
Summary: Meta package for the latest kernel-%{flavour} in %{kernelversion}.%{patchlevel} series
|
|
|
|
Group: System/Kernel and hardware
|
|
|
|
Requires: kernel-%{flavour}-%{buildrel}
|
|
|
|
|
|
|
|
%ifarch %{ix86}
|
|
|
|
Conflicts: arch(x86_64)
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description -n kernel-%{flavour}-%{kernelversion}.%{patchlevel}-latest
|
|
|
|
This meta package aims to make sure you always have the
|
|
|
|
latest kernel-%{flavour} %{kernelversion}.%{patchlevel}.x installed.
|
|
|
|
|
|
|
|
%files -n kernel-%{flavour}-%{kernelversion}.%{patchlevel}-latest
|
|
|
|
# no files
|
|
|
|
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
%if %build_devel
|
|
|
|
|
|
|
|
%package -n kernel-%{flavour}-%{kernelversion}.%{patchlevel}-devel-latest
|
|
|
|
Version: %{kversion}
|
|
|
|
Release: %{fullrpmrel}
|
|
|
|
Summary: Meta package for the latest kernel-%{flavour}-devel in %{kernelversion}.%{patchlevel} series
|
|
|
|
Group: Development/Kernel
|
|
|
|
Requires: kernel-%{flavour}-devel-%{buildrel}
|
|
|
|
|
|
|
|
%ifarch %{ix86}
|
|
|
|
Conflicts: arch(x86_64)
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Provides: kernel-devel-latest
|
2019-11-17 15:18:28 +03:00
|
|
|
%if %{enhanced_security}
|
|
|
|
Provides: kernel-hardened-devel-latest
|
|
|
|
%endif
|
2019-07-16 18:30:53 +03:00
|
|
|
|
|
|
|
%description -n kernel-%{flavour}-%{kernelversion}.%{patchlevel}-devel-latest
|
|
|
|
This meta package aims to make sure you always have the
|
|
|
|
latest kernel-%{flavour}-devel %{kernelversion}.%{patchlevel}.x installed.
|
|
|
|
|
|
|
|
%files -n kernel-%{flavour}-%{kernelversion}.%{patchlevel}-devel-latest
|
|
|
|
# no files
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
############################################################################
|
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
%if %build_doc
|
2019-07-16 18:30:53 +03:00
|
|
|
%package -n kernel-doc
|
2013-11-16 00:27:01 +04:00
|
|
|
Version: %{kversion}
|
2019-07-16 18:30:53 +03:00
|
|
|
Release: %{fullrpmrel}
|
|
|
|
Summary: Various documentation bits found in the kernel source
|
2013-11-16 00:27:01 +04:00
|
|
|
Group: Documentation
|
|
|
|
Buildarch: noarch
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
%description -n kernel-doc
|
|
|
|
This package contains documentation files from the kernel source.
|
|
|
|
|
|
|
|
%files -n kernel-doc
|
2019-07-21 21:43:25 +03:00
|
|
|
%doc linux-%{tar_ver}/Documentation/*
|
2019-07-16 18:30:53 +03:00
|
|
|
|
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
|
|
|
|
Version: %{kversion}
|
2019-07-16 18:30:53 +03:00
|
|
|
Release: %{fullrpmrel}
|
2013-11-16 00:27:01 +04:00
|
|
|
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
|
|
|
|
%dir %{_prefix}/libexec/perf-core
|
|
|
|
%dir %{_libdir}/traceevent
|
|
|
|
%dir %{_libdir}/traceevent/plugins
|
|
|
|
%{_libdir}/traceevent/plugins/*
|
|
|
|
%{_prefix}/libexec/perf-core/*
|
|
|
|
%{_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
|
|
|
|
Version: %{kversion}
|
2019-07-16 18:30:53 +03:00
|
|
|
Release: %{fullrpmrel}
|
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
|
|
|
|
Requires(post): rpm-helper >= 0.24.0-3
|
|
|
|
Requires(preun): rpm-helper >= 0.24.0-3
|
2017-01-21 22:28:16 +03:00
|
|
|
Obsoletes: cpufreq < 3.0
|
|
|
|
Obsoletes: cpufrequtils < 10.0
|
2013-11-16 00:27:01 +04:00
|
|
|
|
|
|
|
%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-10-14 13:22:01 +04:00
|
|
|
|
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
|
2015-03-17 20:53:12 +03: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
|
|
|
|
%{_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*
|
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/cpupower
|
|
|
|
|
|
|
|
############################################################################
|
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
%package -n cpupower-devel
|
|
|
|
Version: %{kversion}
|
2019-07-16 18:30:53 +03:00
|
|
|
Release: %{fullrpmrel}
|
2014-10-14 13:22:01 +04:00
|
|
|
Summary: Development files for cpupower
|
2013-11-16 00:27:01 +04:00
|
|
|
Group: Development/Kernel
|
2019-07-16 18:30:53 +03:00
|
|
|
Requires: cpupower = %{kversion}-%{fullrpmrel}
|
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
|
2019-07-16 18:30:53 +03:00
|
|
|
|
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}
|
2013-11-16 00:27:01 +04:00
|
|
|
%package headers
|
|
|
|
Version: %kversion
|
2019-07-16 18:30:53 +03:00
|
|
|
Release: %fullrpmrel
|
2013-11-16 00:27:01 +04:00
|
|
|
Summary: Linux kernel header files mostly used by your C library
|
|
|
|
Group: System/Kernel and hardware
|
|
|
|
Epoch: 1
|
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
|
|
|
|
|
|
|
%description headers
|
|
|
|
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.
|
|
|
|
|
|
|
|
%files 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
|
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}
|
2020-03-18 22:20:03 +03:00
|
|
|
|
2020-03-13 20:35:12 +03:00
|
|
|
%package -n kernel-uml-%{flavour}-%{buildrel}
|
|
|
|
Version: %{fakever}
|
|
|
|
Release: %{fakerel}
|
|
|
|
Provides: kernel-uml = %{kverrel}
|
|
|
|
Provides: kernel-uml-%{flavour} = %{kverrel}
|
|
|
|
Summary: User Mode Linux binary
|
|
|
|
Group: System/Kernel and hardware
|
|
|
|
|
|
|
|
%description -n kernel-uml-%{flavour}-%{buildrel}
|
2020-03-18 22:20:03 +03:00
|
|
|
User Mode Linux binary.
|
|
|
|
Stripped, debug is in kernel-%{flavour}-%{buildrel}-debuginfo.
|
2020-03-13 20:35:12 +03:00
|
|
|
|
|
|
|
%files -n kernel-uml-%{flavour}-%{buildrel}
|
|
|
|
%{_bindir}/linux-uml-%{kver_full}
|
|
|
|
#------------------------------------------------
|
|
|
|
|
|
|
|
%package -n kernel-uml-modules-%{flavour}-%{buildrel}
|
|
|
|
Version: %{fakever}
|
|
|
|
Release: %{fakerel}
|
|
|
|
Provides: kernel-uml-modules = %{kverrel}
|
|
|
|
Provides: kernel-uml-modules-%{flavour} = %{kverrel}
|
|
|
|
Summary: User Mode Linux (UML) kernel modules
|
|
|
|
Group: System/Kernel and hardware
|
|
|
|
|
|
|
|
%description -n kernel-uml-modules-%{flavour}-%{buildrel}
|
|
|
|
User Mode Linux (UML) kernel modules
|
|
|
|
- not compressed
|
|
|
|
- not stripped
|
|
|
|
- signed
|
|
|
|
|
|
|
|
%files -n kernel-uml-modules-%{flavour}-%{buildrel}
|
|
|
|
/lib/modules-uml/%{kver_full}
|
2020-03-18 22:20:03 +03:00
|
|
|
#------------------------------------------------
|
|
|
|
|
|
|
|
%package -n kernel-uml-%{flavour}-%{kernelversion}.%{patchlevel}-latest
|
|
|
|
Version: %{kversion}
|
|
|
|
Release: %{fullrpmrel}
|
|
|
|
Summary: Meta package for the latest kernel-uml-%{flavour} in %{kernelversion}.%{patchlevel} series
|
|
|
|
Group: System/Kernel and hardware
|
|
|
|
Requires: kernel-uml-%{flavour}-%{buildrel}
|
|
|
|
|
|
|
|
%ifarch %{ix86}
|
|
|
|
Conflicts: arch(x86_64)
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description -n kernel-uml-%{flavour}-%{kernelversion}.%{patchlevel}-latest
|
|
|
|
This meta package aims to make sure you always have the
|
|
|
|
latest kernel-uml-%{flavour} %{kernelversion}.%{patchlevel}.x
|
|
|
|
(User Mode Linux binary) installed.
|
|
|
|
|
|
|
|
%files -n kernel-uml-%{flavour}-%{kernelversion}.%{patchlevel}-latest
|
|
|
|
# no files
|
|
|
|
#------------------------------------------------
|
|
|
|
|
|
|
|
%package -n kernel-uml-modules-%{flavour}-%{kernelversion}.%{patchlevel}-latest
|
|
|
|
Version: %{kversion}
|
|
|
|
Release: %{fullrpmrel}
|
|
|
|
Summary: Meta package for the latest kernel-uml-modules-%{flavour} in %{kernelversion}.%{patchlevel} series
|
|
|
|
Group: System/Kernel and hardware
|
|
|
|
Requires: kernel-uml-modules-%{flavour}-%{buildrel}
|
|
|
|
|
|
|
|
%ifarch %{ix86}
|
|
|
|
Conflicts: arch(x86_64)
|
2020-03-13 20:35:12 +03:00
|
|
|
%endif
|
|
|
|
|
2020-03-18 22:20:03 +03:00
|
|
|
%description -n kernel-uml-modules-%{flavour}-%{kernelversion}.%{patchlevel}-latest
|
|
|
|
This meta package aims to make sure you always have the
|
|
|
|
latest kernel-uml-modules-%{flavour} %{kernelversion}.%{patchlevel}.x
|
|
|
|
(User Mode Linux kernel modules) installed.
|
|
|
|
|
|
|
|
%files -n kernel-uml-modules-%{flavour}-%{kernelversion}.%{patchlevel}-latest
|
|
|
|
# no files
|
|
|
|
#------------------------------------------------
|
|
|
|
|
|
|
|
%endif #endif uml
|
|
|
|
|
2020-07-29 10:59:41 +03:00
|
|
|
#------------------------------------------------
|
|
|
|
|
|
|
|
%if %{with binary_extra_modules}
|
|
|
|
|
|
|
|
%ksob_mk_module_pkg -n 8821ce -s net/wireless
|
|
|
|
%ksob_mk_module_pkg -n shredder-kernel -s extra -r rosa-shredder-user
|
|
|
|
%ksob_mk_module_pkg -n xt_TRIPSO -s net -r tripso
|
|
|
|
|
|
|
|
# virtualbox host
|
|
|
|
%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
|
|
|
|
|
|
|
|
#------------------------------------------------
|
|
|
|
# a package which will pull all those modules
|
|
|
|
%package -n kernel-modules-virtualbox-host-%{flavour}-%{kernelversion}.%{patchlevel}-latest
|
|
|
|
Summary: Meta package to pull VirtualBox host kernel modules for kernel-%{flavour}-%{kernelversion}.%{patchlevel}
|
|
|
|
Group: System/Kernel and hardware
|
|
|
|
Version: 1
|
|
|
|
Release: 1
|
|
|
|
Requires: kernel-module-vboxnetflt-%{flavour}-%{buildrel}
|
|
|
|
Requires: kernel-module-vboxnetadp-%{flavour}-%{buildrel}
|
|
|
|
Requires: kernel-module-vboxdrv-%{flavour}-%{buildrel}
|
|
|
|
Requires: kernel-module-vboxpci-%{flavour}-%{buildrel}
|
|
|
|
|
|
|
|
%description -n kernel-modules-virtualbox-host-%{flavour}-%{kernelversion}.%{patchlevel}-latest
|
|
|
|
Meta package to pull VirtualBox host kernel modules for kernel-%{flavour}-%{kernelversion}.%{patchlevel}
|
|
|
|
|
|
|
|
%files -n kernel-modules-virtualbox-host-%{flavour}-%{kernelversion}.%{patchlevel}-latest
|
|
|
|
# empty
|
|
|
|
#------------------------------------------------
|
|
|
|
|
|
|
|
# virtualbox guest, to be dropped in kernels 5.6+ (upsreamized)
|
|
|
|
%ksob_mk_module_pkg -n vboxvideo -s misc
|
|
|
|
%ksob_mk_module_pkg -n vboxguest -s misc
|
|
|
|
%ksob_mk_module_pkg -n vboxsf -s misc
|
|
|
|
|
|
|
|
#------------------------------------------------
|
|
|
|
# a package which will pull all those modules
|
|
|
|
%package -n kernel-modules-virtualbox-guest-%{flavour}-%{kernelversion}.%{patchlevel}-latest
|
|
|
|
Summary: Meta package to pull VirtualBox guest kernel modules for kernel-%{flavour}-%{kernelversion}.%{patchlevel}
|
|
|
|
Group: System/Kernel and hardware
|
|
|
|
Version: 1
|
|
|
|
Release: 1
|
|
|
|
Requires: kernel-module-vboxvideo-%{flavour}-%{buildrel}
|
|
|
|
Requires: kernel-module-vboxguest-%{flavour}-%{buildrel}
|
|
|
|
Requires: kernel-module-vboxsf-%{flavour}-%{buildrel}
|
|
|
|
|
|
|
|
%description -n kernel-modules-virtualbox-guest-%{flavour}-%{kernelversion}.%{patchlevel}-latest
|
|
|
|
Meta package to pull VirtualBox guest kernel modules for kernel-%{flavour}-%{kernelversion}.%{patchlevel}
|
|
|
|
|
|
|
|
%files -n kernel-modules-virtualbox-guest-%{flavour}-%{kernelversion}.%{patchlevel}-latest
|
|
|
|
# empty
|
|
|
|
#------------------------------------------------
|
|
|
|
|
|
|
|
%endif #binary_extra_modules
|
|
|
|
|
2020-03-13 20:35:12 +03:00
|
|
|
############################################################################
|
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
%prep
|
|
|
|
%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
|
2013-11-16 00:27:01 +04:00
|
|
|
cd %src_dir
|
|
|
|
|
2016-07-26 11:24:24 +03:00
|
|
|
%apply_patches
|
2013-11-16 00:27:01 +04:00
|
|
|
|
|
|
|
#
|
|
|
|
# Setup Begin
|
|
|
|
#
|
|
|
|
|
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
|
2019-07-16 18:30:53 +03:00
|
|
|
cp %{SOURCE110} .config
|
2018-07-08 22:54:29 +03:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# Disable ASLR for 32-bit systems because it does not play well with
|
|
|
|
# hibernate.
|
|
|
|
%ifarch %{ix86}
|
|
|
|
sed -i 's/CONFIG_RANDOMIZE_BASE=y/# CONFIG_RANDOMIZE_BASE is not set/' .config
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# Disable checking for W+X memory mappings for 32-bit systems. The warnings
|
|
|
|
# may confuse the users and noone is eager to fix the underlying problem,
|
|
|
|
# it seems.
|
|
|
|
%ifarch %{ix86}
|
|
|
|
sed -i 's/CONFIG_DEBUG_WX=y/# CONFIG_DEBUG_WX is not set/' .config
|
|
|
|
%endif
|
|
|
|
|
2020-03-13 20:51:12 +03:00
|
|
|
touch %{build_dir}/.config.append
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# Enable debug info if requested.
|
2020-03-13 20:51:12 +03:00
|
|
|
sed -i '/CONFIG_DEBUG_INFO/d' .config
|
2013-11-16 00:27:01 +04:00
|
|
|
%if %build_debug
|
2020-03-13 20:51:12 +03:00
|
|
|
echo 'CONFIG_DEBUG_INFO=y' >> %{build_dir}/.config.append
|
|
|
|
echo 'CONFIG_DEBUG_INFO_DWARF4=y' >> %{build_dir}/.config.append
|
|
|
|
echo 'CONFIG_GDB_SCRIPTS=y' >> %{build_dir}/.config.append
|
|
|
|
%else
|
|
|
|
echo 'CONFIG_DEBUG_INFO=n' >> %{build_dir}/.config.append
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
|
|
|
|
2016-07-29 13:39:16 +03:00
|
|
|
%if %{enhanced_security}
|
2019-11-11 17:47:53 +03:00
|
|
|
### SELinux enablement
|
2019-10-07 01:35:53 +03:00
|
|
|
# seems to be needed to boot system in enforcing selinux mode
|
|
|
|
# note: cpio fpormat of initramfs does not support xattrs without patches
|
|
|
|
# see also: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1680315
|
|
|
|
sed -i '/CONFIG_SECURITY_SELINUX_DISABLE/d' .config
|
2020-03-13 20:35:12 +03:00
|
|
|
echo CONFIG_SECURITY_SELINUX_DISABLE=y >> %{build_dir}/.config.append
|
2019-10-07 01:35:53 +03:00
|
|
|
# enable selinux in kernel by default if not disabled explicitly
|
|
|
|
sed -i '/CONFIG_SECURITY_SELINUX_BOOTPARAM/d' .config
|
2020-03-13 20:35:12 +03:00
|
|
|
echo CONFIG_SECURITY_SELINUX_BOOTPARAM=y >> %{build_dir}/.config.append
|
2019-11-11 17:47:53 +03:00
|
|
|
|
|
|
|
### Signing kernel modules
|
|
|
|
# https://www.kernel.org/doc/html/v5.3/admin-guide/module-signing.html
|
|
|
|
sed -i '/CONFIG_MODULE_SIG/d' .config
|
2020-03-13 20:35:12 +03:00
|
|
|
echo CONFIG_MODULE_SIG=y >> %{build_dir}/.config.append
|
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-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
|
2019-12-07 21:57:55 +03:00
|
|
|
# If %%build_debig is true, signatures will be stripped
|
|
|
|
# We sign modules manually in a tricky way bellow
|
2020-03-13 20:35:12 +03:00
|
|
|
echo CONFIG_MODULE_SIG_ALL=n >> %{build_dir}/.config.append
|
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
|
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
|
2019-11-18 21:25:13 +03:00
|
|
|
# Reserve area for inserting a certificate without recompiling
|
|
|
|
sed -i '/CONFIG_SYSTEM_EXTRA_CERTIFICATE/d' .config
|
2020-03-13 20:35:12 +03:00
|
|
|
echo CONFIG_SYSTEM_EXTRA_CERTIFICATE=y >> %{build_dir}/.config.append
|
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
|
|
|
|
sed -i "/CONFIG_CRYPTO_${i}/d" .config
|
|
|
|
echo "CONFIG_CRYPTO_${i}=y" >> %{build_dir}/.config.append
|
|
|
|
done
|
2020-03-16 23:19:46 +03:00
|
|
|
|
|
|
|
sed -i '/CONFIG_LSM/d' .config
|
|
|
|
echo 'CONFIG_LSM="yama,loadpin,integrity,selinux,apparmor,altha"' >> %{build_dir}/.config.append
|
|
|
|
sed -i '/CONFIG_SECURITY_ALTHA/d' .config
|
|
|
|
echo 'CONFIG_SECURITY_ALTHA=y' >> %{build_dir}/.config.append
|
2016-07-29 13:39:16 +03:00
|
|
|
%endif
|
|
|
|
|
2020-07-27 22:32:06 +03:00
|
|
|
# Disable disk-based swap (swap files and partitions) on certified systems by default
|
|
|
|
# because we cannot guarantee that data stored in swap is erased from disk securely.
|
|
|
|
# Our patch, based on Chromium OS kernel, allows to use only zram if CONFIG_DISK_BASED_SWAP_DEFAULT_ON=y.
|
|
|
|
# sysctl vm.disk_based_swap = 1 to allow disk-based swap, = 0 to disable it.
|
|
|
|
# Note that CONFIG_ZRAM_WRITEBACK is still on.
|
2020-08-06 14:31:51 +03:00
|
|
|
#sed -i '/CONFIG_DISK_BASED_SWAP_DEFAULT_ON/d' .config
|
|
|
|
#%if %{with nickel}
|
|
|
|
#echo 'CONFIG_DISK_BASED_SWAP_DEFAULT_ON=n' >> %{build_dir}/.config.append
|
|
|
|
#%else
|
2020-07-27 22:32:06 +03:00
|
|
|
echo 'CONFIG_DISK_BASED_SWAP_DEFAULT_ON=y' >> %{build_dir}/.config.append
|
2020-08-06 14:31:51 +03:00
|
|
|
#%endif
|
2020-07-27 22:32:06 +03:00
|
|
|
|
2020-03-13 20:35:12 +03:00
|
|
|
cat %{build_dir}/.config.append >> .config
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# Store the config file in the appropriate directory.
|
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
|
|
|
CONFIG_DIR=arch/x86/configs
|
|
|
|
mkdir -p "${CONFIG_DIR}"
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
cfg_file=arch/x86/configs/%{arch_suffix}_defconfig-%{flavour}
|
|
|
|
make ARCH=%{_arch} oldconfig && \
|
|
|
|
mv .config ${cfg_file}
|
|
|
|
|
|
|
|
# Looks like 'make oldconfig' removes '# CONFIG_64BIT is not set' for some
|
|
|
|
# reason. For now, let us restore it.
|
2018-07-08 22:54:29 +03:00
|
|
|
%ifarch %{ix86}
|
2019-07-16 18:30:53 +03:00
|
|
|
sed -i 's/CONFIG_64BIT=y//' ${cfg_file}
|
|
|
|
echo '# CONFIG_64BIT is not set' >> ${cfg_file}
|
2018-07-08 22:54:29 +03:00
|
|
|
%endif
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
echo "Created ${cfg_file}."
|
2016-07-22 16:37:05 +03:00
|
|
|
|
2013-11-16 00:27:01 +04: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
|
|
|
|
|
|
|
# get rid of unwanted files
|
|
|
|
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
|
|
|
|
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(){
|
2020-03-14 13:49:15 +03: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
|
|
|
|
2019-07-16 18:30:53 +03: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
|
|
|
%if %{enhanced_security}
|
|
|
|
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
|
2020-03-18 23:36:11 +03: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"
|
|
|
|
# avoid using the template
|
|
|
|
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
|
|
|
|
|
|
|
# link sign-file and extract-cert with LibreSSL instead of OpenSSL
|
|
|
|
libressl_cflags="$(pkg-config --cflags --libs libressl-libcrypto)"
|
|
|
|
if [ $? != 0 ] ; then exit $? ; fi
|
|
|
|
sed -i %{src_dir}/scripts/Makefile \
|
2020-03-13 20:35:12 +03:00
|
|
|
%if %{with uml}
|
|
|
|
%{src_dir}.uml/scripts/Makefile \
|
|
|
|
%endif
|
2019-12-07 21:57:55 +03:00
|
|
|
-e "s,-lcrypto,${libressl_cflags},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}"
|
2019-11-17 16:56:39 +03:00
|
|
|
%endif #endif additional_keys
|
2019-11-19 00:24:49 +03:00
|
|
|
cat %{certs_public_keys}
|
2019-11-17 16:56:39 +03:00
|
|
|
%endif #endif enhanced_security
|
2019-11-11 17:47:53 +03:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# .config
|
|
|
|
%smake -s mrproper
|
|
|
|
cp arch/x86/configs/%{arch_suffix}_defconfig-%{flavour} .config
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# make sure EXTRAVERSION says what we want it to say
|
|
|
|
LC_ALL=C sed -ri "s/^EXTRAVERSION.*/EXTRAVERSION = -%{flavour}-%{buildrpmrel}/" Makefile
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-12-22 02:24:52 +03:00
|
|
|
# Print debug messages when loglevel=7 in cmdline.
|
|
|
|
# Those messages can be caught by debugfs without -DDEBUG.
|
|
|
|
# but sometimes it is required to see them via a serial port when booting the kernel.
|
|
|
|
# '#ifdef DEBUG' is used in different places for different purposes,
|
|
|
|
# so change DEBUG to PRINTK_DEBUG in one specific place.
|
2020-03-21 13:28:01 +03:00
|
|
|
#%if %build_debug
|
|
|
|
#sed -i %{src_dir}/include/linux/printk.h \
|
|
|
|
# -e 's,^#ifdef DEBUG$,#if defined(DEBUG) || defined(PRINTK_DEBUG),g'
|
|
|
|
#export KCPPFLAGS="-DPRINTK_DEBUG"
|
|
|
|
#%endif
|
2019-12-22 02:24:52 +03:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# build the kernel
|
|
|
|
echo "Building kernel %{kver_full}"
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-12-07 21:57:55 +03:00
|
|
|
%kmake V=1 -s all
|
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
|
|
|
|
|
|
|
|
cp -r "$(rpm -q --qf '/usr/src/rtl8821ce-%%{VERSION}-%%{RELEASE}' kernel-source-rtl8821ce)" kernel-source-rtl8821ce
|
|
|
|
pushd kernel-source-rtl8821ce
|
|
|
|
%kmake KSRC=%{src_dir} M="$PWD"
|
|
|
|
mkdir -p %{temp_modules}/%{kver_full}/kernel/net/wireless/
|
|
|
|
cp 8821ce.ko %{temp_modules}/%{kver_full}/kernel/net/wireless/8821ce.ko
|
|
|
|
popd
|
|
|
|
rm -fr kernel-source-rtl8821ce
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
# build commands for virtualbox are based on the ones from the virtualbox package
|
|
|
|
cp -r "$(rpm -q --qf '/usr/src/vboxadditions-%%{VERSION}-%%{RELEASE}' kernel-source-virtualbox-vboxadditions)" kernel-source-virtualbox-vboxadditions
|
|
|
|
mkdir -p %{temp_modules}/%{kver_full}/kernel/misc/
|
|
|
|
pushd kernel-source-virtualbox-vboxadditions
|
|
|
|
%kmake KERN_DIR=%{src_dir} KERN_VER=%{kver_full} -C vboxguest
|
|
|
|
cp -fv vboxguest/Module.symvers vboxsf/
|
|
|
|
%kmake KERN_DIR=%{src_dir} KERN_VER=%{kver_full} -C vboxsf
|
|
|
|
# TODO: vboxvideo is also build inside the upstream kernel...
|
|
|
|
# vboxsf is not in kernel 5.4
|
|
|
|
# https://www.phoronix.com/scan.php?page=news_item&px=VirtualBox-Shared-Folder-5.6
|
|
|
|
cp -fv vboxsf/Module.symvers vboxvideo/
|
|
|
|
%kmake KERN_DIR=%{src_dir} KERN_VER=%{kver_full} -C vboxvideo
|
|
|
|
for i in vboxguest vboxsf vboxvideo
|
|
|
|
do
|
|
|
|
cp -v "${i}/${i}.ko" %{temp_modules}/%{kver_full}/kernel/misc/
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
2020-03-13 20:35:12 +03:00
|
|
|
%if %{with uml}
|
|
|
|
cp -rv %{certs_dir_rnd} %{src_dir}.uml/
|
|
|
|
pushd %{src_dir}.uml
|
|
|
|
%kmake ARCH=um defconfig
|
|
|
|
cp .config .config.default
|
|
|
|
cat %{build_dir}/.config.append >> .config
|
|
|
|
%kmake oldconfig ARCH=um
|
|
|
|
diff -u .config.default .config || :
|
2020-03-16 19:38:59 +03:00
|
|
|
# Looks like 'make oldconfig' removes '# CONFIG_64BIT is not set' for some
|
|
|
|
# reason. For now, let us restore it.
|
|
|
|
%ifarch %{ix86}
|
|
|
|
sed -i 's/CONFIG_64BIT=y//' .config
|
|
|
|
echo '# CONFIG_64BIT is not set' >> .config
|
|
|
|
%endif
|
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}
|
|
|
|
xz -c Module.symvers > %{temp_boot}/symvers-%{kver_full}.xz
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
cp -f arch/x86/boot/bzImage %{temp_boot}/vmlinuz-%{kver_full}
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# headers
|
|
|
|
%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
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# remove /lib/firmware, we use a separate linux-firmware package
|
|
|
|
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
|
|
|
|
%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}/
|
|
|
|
cp -fR arch/x86/kernel/asm-offsets.{c,s} %{temp_devel_root}/arch/x86/kernel/
|
|
|
|
cp -fR arch/x86/kernel/asm-offsets_{32,64}.c %{temp_devel_root}/arch/x86/kernel/
|
|
|
|
cp -fR arch/x86/purgatory/* %{temp_devel_root}/arch/x86/purgatory/
|
|
|
|
cp -fR arch/x86/entry/syscalls/syscall* %{temp_devel_root}/arch/x86/entry/syscalls/
|
|
|
|
cp -fR arch/x86/include %{temp_devel_root}/arch/x86/
|
|
|
|
cp -fR arch/x86/tools %{temp_devel_root}/arch/x86/
|
|
|
|
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
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# add acpica header files, needed for fglrx build
|
|
|
|
cp -fR drivers/acpi/acpica/*.h %{temp_devel_root}/drivers/acpi/acpica/
|
2013-11-16 00:27:01 +04:00
|
|
|
|
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
|
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
|
|
|
# needed for kexec
|
|
|
|
cp -fR arch/x86/boot/*.h %{temp_devel_root}/arch/x86/boot/
|
|
|
|
cp -fR arch/x86/boot/*.c %{temp_devel_root}/arch/x86/boot/
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# needed for arch/x86/purgatory
|
|
|
|
cp -fR lib/*.h lib/*.c %{temp_devel_root}/lib/
|
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
|
|
|
rm -rf %{temp_devel_root}/arch/arm*
|
|
|
|
rm -rf %{temp_devel_root}/include/kvm/arm*
|
|
|
|
rm -rf %{temp_devel_root}/include/soc
|
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}
|
|
|
|
%smake V=1 -s prepare
|
|
|
|
%smake V=1 -s scripts
|
|
|
|
%smake V=1 -s clean
|
|
|
|
popd
|
2019-07-16 18:30:53 +03:00
|
|
|
rm -f %{temp_devel_root}/.config.old
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# fix permissions
|
|
|
|
chmod -R a+rX %{temp_devel_root}
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# disable mrproper in -devel rpms
|
|
|
|
patch -p1 --fuzz=0 -d %{temp_devel_root} -i %{SOURCE2}
|
|
|
|
|
|
|
|
# endif build_devel
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# Manage the files with debug info, provide the debug links in the
|
|
|
|
# kernel modules.
|
|
|
|
%if %build_debug
|
|
|
|
install -m 644 vmlinux %{temp_boot}/vmlinux-%{kver_full}
|
|
|
|
kernel_debug_files=../kernel_debug_files.%{flavour}
|
|
|
|
echo "%{_bootdir}/vmlinux-%{kver_full}" >> $kernel_debug_files
|
|
|
|
|
|
|
|
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 {}`'
|
|
|
|
|
|
|
|
pushd %{temp_modules}
|
|
|
|
find %{kver_full}/kernel -name "*.ko.debug" > debug_module_list
|
|
|
|
popd
|
|
|
|
cat %{temp_modules}/debug_module_list | \
|
|
|
|
sed 's|\(.*\)|%{_modulesdir}/\1|' >> $kernel_debug_files
|
|
|
|
cat %{temp_modules}/debug_module_list | \
|
|
|
|
sed 's|\(.*\)|%exclude %{_modulesdir}/\1|' \
|
|
|
|
>> ../kernel_exclude_debug_files.%{flavour}
|
|
|
|
rm -f %{temp_modules}/debug_module_list
|
2013-11-16 00:27:01 +04:00
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# endif build_debug
|
|
|
|
%endif
|
|
|
|
|
2019-12-07 21:57:55 +03:00
|
|
|
%if %{enhanced_security}
|
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
|
|
|
|
echo "No file $1"
|
|
|
|
return 0
|
|
|
|
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}
|
|
|
|
%{temp_root}/lib/modules-uml/%{kver_full} \
|
|
|
|
%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
|
|
|
%endif
|
|
|
|
|
2019-07-16 18:30:53 +03:00
|
|
|
# Create the list of files for the kernel.
|
|
|
|
kernel_files=../kernel_files.%{flavour}
|
|
|
|
|
|
|
|
cat > $kernel_files <<EOF
|
|
|
|
%{_bootdir}/System.map-%{kver_full}
|
|
|
|
%{_bootdir}/symvers-%{kver_full}.xz
|
|
|
|
%{_bootdir}/config-%{kver_full}
|
|
|
|
%{_bootdir}/vmlinuz-%{kver_full}
|
|
|
|
%{_modulesdir}/%{kver_full}/kernel
|
2020-07-29 10:59:41 +03:00
|
|
|
%if %{with binary_extra_modules}
|
|
|
|
# 8821ce.ko.debug will not be excluded and will be in the main debug subpackage
|
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/net/wireless/8821ce.ko%{kmod_suffix}
|
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/extra/shredder-kernel.ko%{kmod_suffix}
|
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/net/xt_TRIPSO.ko%{kmod_suffix}
|
|
|
|
# vbox host: vboxnetflt vboxnetadp vboxdrv vboxpci
|
|
|
|
# vbox guest: vboxvideo vboxguest vboxsf
|
|
|
|
%exclude %{_modulesdir}/%{kver_full}/kernel/misc/vbox*.ko%{kmod_suffix}
|
|
|
|
%endif
|
2019-07-16 18:30:53 +03:00
|
|
|
%{_modulesdir}/%{kver_full}/modules.*
|
|
|
|
EOF
|
|
|
|
|
|
|
|
%if %build_debug
|
|
|
|
cat ../kernel_exclude_debug_files.%{flavour} >> $kernel_files
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# set extraversion to match srpm to get nice version reported by the tools
|
|
|
|
LC_ALL=C sed -ri "s/^EXTRAVERSION.*/EXTRAVERSION = -%{fullrpmrel}/" Makefile
|
2013-11-16 00:27:01 +04:00
|
|
|
|
|
|
|
%if %{build_perf}
|
2015-04-28 16:36:29 +03:00
|
|
|
%ifarch x86_64
|
|
|
|
%define perf_is_x64 1
|
|
|
|
%else
|
|
|
|
%define perf_is_x64 0
|
|
|
|
%endif
|
|
|
|
|
2018-12-01 18:39:37 +03:00
|
|
|
%smake -C tools/perf -s IS_X86_64=%{perf_is_x64} HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} NO_GTK2=1 all
|
|
|
|
%smake -C tools/perf -s prefix=%{_prefix} NO_GTK2=1 man
|
2013-11-16 00:27:01 +04:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{build_cpupower}
|
|
|
|
# make sure version-gen.sh is executable.
|
|
|
|
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
|
2019-07-16 18:30:53 +03:00
|
|
|
############################################################################
|
2013-11-16 00:27:01 +04:00
|
|
|
|
|
|
|
%install
|
|
|
|
cd %src_dir
|
|
|
|
|
|
|
|
# We want to be able to test several times the install part
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
cp -a %{temp_root} %{buildroot}
|
|
|
|
|
2019-11-11 21:16:01 +03:00
|
|
|
%if %{enhanced_security}
|
|
|
|
# Multithreaded verification that every kernel module
|
|
|
|
# has a signature attached to it
|
|
|
|
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
|
2019-11-12 01:32:36 +03:00
|
|
|
if hexdump -C "$1" | rev | cut -f 2 -d '|' | rev | tr -d '\n' | \
|
2019-11-11 21:16:01 +03:00
|
|
|
grep -q '~Module signature appended~'
|
|
|
|
then
|
2019-11-14 01:26:18 +03:00
|
|
|
if [ -f %{certs_verify_tmp} ]; then
|
|
|
|
rm -f %{certs_verify_tmp}
|
|
|
|
fi
|
2019-11-11 21:16:01 +03:00
|
|
|
else
|
|
|
|
echo "ERROR: Module $1 has no signature attached to it!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
export -f _verify_signature
|
2020-03-13 20:35:12 +03:00
|
|
|
find %{target_modules} \
|
|
|
|
%if %{with uml}
|
|
|
|
%{buildroot}/lib/modules-uml/%{kver_full} \
|
|
|
|
%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}
|
|
|
|
%endif
|
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
# compressing modules
|
|
|
|
%if %{build_modxz}
|
|
|
|
find %{target_modules} -name "*.ko" | %kxargs xz -6e
|
|
|
|
%else
|
|
|
|
find %{target_modules} -name "*.ko" | %kxargs gzip -9
|
|
|
|
%endif
|
|
|
|
|
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
|
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
# sniff, if we compressed all the modules, we change the stamp :(
|
|
|
|
# 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
|
|
|
|
|
|
|
|
# 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
|
|
|
%if %{build_perf}
|
|
|
|
|
|
|
|
# perf tool binary and supporting scripts/binaries
|
2015-04-28 16:36:29 +03:00
|
|
|
make -C tools/perf -s V=1 DESTDIR=%{buildroot} IS_X86_64=%{perf_is_x64} HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} 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)
|
|
|
|
sed -i -e '1 s,^.*$,#!%{__python3},' %{buildroot}%{_prefix}/libexec/perf-core/scripts/python/exported-sql-viewer.py
|
|
|
|
|
2013-11-16 00:27:01 +04:00
|
|
|
# perf man pages (note: implicit rpm magic compresses them later)
|
2015-04-28 16:36:29 +03:00
|
|
|
make -C tools/perf -s V=1 DESTDIR=%{buildroot} IS_X86_64=%{perf_is_x64} 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}
|
|
|
|
%find_lang cpupower
|
|
|
|
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
|
|
|
|
|
|
|
# delete junk
|
|
|
|
rm -fr %{buildroot}%{_usr}/src/*/kernel-source-virtualbox*
|