kernel-5.13/kernel-1.spec
Eugene Shatokhin b819b2ec5b Updated to version 3.14.22
Some of the relevant changes since 3.14.15:

ACPICA: Update to GPIO region handler interface.
ACPICA: Utilities: Fix memory leak in acpi_ut_copy_iobject_to_iobject
ACPI / cpuidle: fix deadlock between cpuidle_lock and cpu_hotplug.lock
ACPI / hotplug: Check scan handlers in acpi_scan_hot_remove()
ACPI / hotplug: Generate online uevents for ACPI containers
ACPI / PCI: Fix sysfs acpi_index and label errors
ACPI / PNP: Fix acpi_pnp_match()
ACPI / RTC: Fix CMOS RTC opregion handler accesses to wrong addresses
ACPI: Run fixed event device notifications in process context
ACPI / scan: Correct error return value of create_modalias()
ACPI / scan: not cache _SUN value in struct acpi_device_pnp
ahci: Add Device IDs for Intel 9 Series PCH
ahci: add pcid for Marvel 0x9182 controller
aio: add missing smp_rmb() in read_events_ring
aio: block exit_aio() until all context requests are completed
aio: fix reqs_available handling
alarmtimer: Do not signal SIGEV_NONE timers
alarmtimer: Lock k_itimer during timer callback
alarmtimer: Return relative times in timer_gettime
ALSA: core: fix buffer overflow in snd_info_get_line()
ALSA: hda - Add mute LED pin quirk for HP 15 touchsmart
ALSA: hda/ca0132 - Don't try loading firmware at resume when already
	failed
ALSA: hda - fix an external mic jack problem on a HP machine
ALSA: hda - Fix COEF setups for ALC1150 codec
ALSA: hda - Fix digital mic on Acer Aspire 3830TG
ALSA: hda - Fix invalid pin powermap without jack detection
ALSA: hda/realtek - Avoid setting wrong COEF on ALC269 & co
ALSA: hda - restore the gpio led after resume
ALSA: pcm: fix fifo_size frame calculation
ALSA: usb-audio: Adjust Gamecom 780 volume level
ALSA: usb-audio: fix BOSS ME-25 MIDI regression
ALSA: virtuoso: add Xonar Essence STX II support
ata_piix: Add Device IDs for Intel 9 Series PCH
ath9k: fix aggregation session lockup
batman-adv: Fix out-of-order fragmentation support
bbc-i2c: Fix BBC I2C envctrl on SunBlade 2000
bfa: Fix undefined bit shift on big-endian architectures with 32-bit DMA
	address
block: Fix dev_t minor allocation lifetime
Bluetooth: Avoid use of session socket after the session gets freed
Bluetooth: btmrvl: wait for HOST_SLEEP_ENABLE event in suspend
Bluetooth: never linger on process exit
bna: fix performance regression
bnx2x: fix crash during TSO tunneling
bonding: fix div by zero while enslaving and transmitting
bq2415x_charger: Fix Atomic Sleep Bug
brcmfmac: handle IF event for P2P_DEVICE interface
bridge: Check if vlan filtering is enabled only once.
bridge: Fix br_should_learn to check vlan_enabled
Btrfs: fix compressed write corruption on enospc
Btrfs: fix crash on endio of reading corrupted block
Btrfs: fix csum tree corruption, duplicate and outdated checksums
Btrfs: Fix memory corruption by ulist_add_merge() on 32bit arch
Btrfs: read lock extent buffer while walking backrefs
CAPABILITIES: remove undefined caps from all processes
carl9170: fix sending URBs with wrong type when using full-speed
cfg80211: fix mic_failure tracing
cfq-iosched: Fix wrong children_weight calculation
cgroup: fix unbalanced locking
CIFS: Fix async reading on reconnects
CIFS: Fix directory rename error
CIFS: Fix SMB2 readdir error handling
CIFS: Fix STATUS_CANNOT_DELETE error mapping for SMB2
CIFS: Fix wrong directory attributes after rename
CIFS: Fix wrong filename length for SMB2
CIFS: Fix wrong restart readdir for SMB1
CIFS: Possible null ptr deref in SMB2_tcon
clk: prevent erronous parsing of children during rate change
clk: qcom: Fix MN frequency tables, parent map, and jpegd
clk: qcom: mdp_lut_clk is a child of mdp_src
cpufreq: integrator: fix integrator_cpufreq_remove return type
cpufreq: move policy kobj to policy->cpu at resume
cpufreq: release policy->rwsem on error
crypto: af_alg - properly label AF_ALG socket
crypto: arm-aes - fix encryption of unaligned data
crypto: caam - fix addressing of struct member
crypto: ux500 - make interrupt mode plausible
debugfs: Fix corrupted loop in debugfs_remove_recursive
dmaengine: dw: don't perform DMA when dmaengine_submit is called
dmaengine: dw: introduce dwc_dostart_first_queued() helper
dm bufio: fully initialize shrinker
dm cache: fix race affecting dirty block count
dm cache: fix race causing dirty blocks to be marked as clean
dm crypt: fix access beyond the end of allocated space
don't bugger nd->seq on set_root_rcu() from follow_dotdot_rcu()
drbd: fix regression 'out of mem, failed to invoke fence-peer helper'
drivers/i2c/busses: use correct type for dma_map/unmap
Drivers: scsi: storvsc: Change the limits to reflect the values on the
	host
drivers: scsi: storvsc: Correctly handle TEST_UNIT_READY failure
Drivers: scsi: storvsc: Filter commands based on the storage protocol
	version
Drivers: scsi: storvsc: Fix a bug in handling VMBUS protocol version
Drivers: scsi: storvsc: Implement a eh_timed_out handler
Drivers: scsi: storvsc: Set cmd_per_lun to reflect value supported by
	the Host
drivers: scsi: storvsc: Set srb_flags in all cases
drm/ast: AST2000 cannot be detected correctly
drm/i915: Fix EIO/wedged handling in gem fault handler
drm/i915: Flush the PTEs after updating them before suspend
drm/i915: read HEAD register back in init_ring_common() to enforce
	ordering
drm/i915: Remove bogus __init annotation from DMI callbacks
drm/i915: Wait for vblank before enabling the TV encoder
drm/nouveau: Bump version from 1.1.1 to 1.1.2
drm/nouveau/runpm: fix module unload
drm: omapdrm: fix compiler errors
drm/radeon: Add ability to get and change dpm state when radeon PX card
	is turned off
drm/radeon: add additional SI pci ids
drm/radeon: add connector quirk for fujitsu board
drm/radeon: Add missing lines to ci_set_thermal_temperature_range
drm/radeon: add new bonaire pci ids
drm/radeon: add new KV pci id
drm/radeon/atom: add new voltage fetch function for hawaii
drm/radeon/cik: use a separate counter for CP init timeout
drm/radeon: don't reset dma on NI/SI init
drm/radeon: don't reset dma on r6xx-evergreen init
drm/radeon: don't reset sdma on CIK init
drm/radeon/dpm: handle voltage info fetching on hawaii
drm/radeon/dpm: set the thermal type properly for special configs
drm/radeon: enable bapm by default on desktop TN/RL boards
drm/radeon: fix pm handling in radeon_gpu_reset
drm/radeon: fix semaphore value init
drm/radeon: load the lm63 driver for an lm64 thermal chip.
drm/radeon/px: fix module unload
drm/radeon: re-enable dpm by default on BTC
drm/radeon: re-enable dpm by default on cayman
drm/radeon: set VM base addr using the PFP v2
drm/radeon/TN: only enable bapm on MSI systems
drm/radeon: tweak ACCEL_WORKING2 query for hawaii
drm/radeon: use packet2 for nop on hawaii with old firmware
drm/tilcdc: fix double kfree
drm/tilcdc: fix release order on exit
drm/tilcdc: panel: fix dangling sysfs connector node
drm/tilcdc: panel: fix leak when unloading the module
drm/tilcdc: slave: fix dangling sysfs connector node
drm/tilcdc: tfp410: fix dangling sysfs connector node
drm/ttm: Choose a pool to shrink correctly in
	ttm_dma_pool_shrink_scan().
drm/ttm: Fix possible division by 0 in ttm_dma_pool_shrink_scan().
drm/ttm: Fix possible stack overflow by recursive shrinker calls.
drm/ttm: Pass GFP flags in order to avoid deadlock.
drm/ttm: Use mutex_trylock() to avoid deadlock inside shrinker
	functions.
drm/vmwgfx: Fix a potential infinite spin waiting for fifo idle
eventpoll: fix uninitialized variable in epoll_ctl
ext4: fix BUG_ON in mb_free_blocks()
ext4: fix ext4_discard_allocated_blocks() if we can't allocate the pa
	struct
ext4: update i_disksize coherently with block allocation on error path
firmware: Do not use WARN_ON(!spin_is_locked())
fix copy_tree() regression
fix EBUSY on umount() from MNT_SHRINKABLE
Fix nasty 32-bit overflow bug in buffer i/o code.
Fix problem recognizing symlinks
fs/notify: don't show f_handle if exportfs_encode_inode_fh failed
fsnotify/fdinfo: use named constants instead of hardcoded values
futex: Unlock hb->lock in futex_wait_requeue_pi() error path
genhd: fix leftover might_sleep() in blk_free_devt()
get rid of propagate_umount() mistakenly treating slaves as busy.
GFS2: fix d_splice_alias() misuses
gro: fix aggregation for skb using frag_list
HID: fix a couple of off-by-ones
HID: logitech-dj: prevent false errors to be shown
HID: logitech: perform bounds checking on device_id early enough
HID: magicmouse: sanity check report size in raw_event() callback
HID: picolcd: sanity check report size in raw_event() callback
hpsa: fix bad -ENOMEM return value in hpsa_big_passthru_ioctl
hugetlb: ensure hugepage access is denied if hugepages are not supported
hwmon: (ads1015) Fix off-by-one for valid channel index checking
hwmon: (ads1015) Fix out-of-bounds array access
hwmon: (amc6821) Fix possible race condition bug
hwmon: (dme1737) Prevent overflow problem when writing large limits
hwmon: (ds1621) Update zbits after conversion rate change
hwmon: (gpio-fan) Prevent overflow problem when writing large limits
hwmon: (lm78) Fix overflow problems seen when writing large temperature
	limits
hwmon: (lm85) Fix various errors on attribute writes
hwmon: (sis5595) Prevent overflow problem when writing large limits
hyperv: Fix a bug in netvsc_start_xmit()
i2c: at91: add bound checking on SMBus block length bytes
i2c: at91: Fix a race condition during signal handling in
	at91_do_twi_xfer.
i2c: ismt: use correct length when copy buffer
i2c: mv64xxx: continue probe when clock-frequency is missing
i40e: Don't stop driver probe when querying DCB config fails
IB/core: When marshaling uverbs path, clear unused fields
IB/mlx4: Avoid null pointer dereference in mlx4_ib_scan_netdevs()
IB/mlx4: Don't duplicate the default RoCE GID
ibmveth: Fix endian issues with rx_no_buffer statistic
IB/qib: Correct reference counting in debugfs qp_stats
IB/srp: Fix deadlock between host removal and multipathd
iio: accel: bma180: Fix indio_dev->trig assignment
iio: adc: ad_sigma_delta: Fix indio_dev->trig assignment
iio:bma180: Fix scale factors to report correct acceleration units
iio:bma180: Missing check for frequency fractional part
iio: buffer: Fix demux table creation
iio: gyro: itg3200: Fix indio_dev->trig assignment
iio: hid_sensor_hub: Fix indio_dev->trig assignment
iio:inkern: fix overwritten -EPROBE_DEFER in of_iio_channel_get_by_name
iio: inv_mpu6050: Fix indio_dev->trig assignment
iio:magnetometer: bugfix magnetometers gain values
iio: meter: ade7758: Fix indio_dev->trig assignment
iio: st_sensors: Fix indio_dev->trig assignment
iio:trigger: modify return value for iio_trigger_get
imx-drm: ipuv3-plane: fix ipu_plane_dpms()
inetpeer: get rid of ip_id_count
init/Kconfig: Fix HAVE_FUTEX_CMPXCHG to not break up the EXPERT menu
Input: atkbd - do not try 'deactivate' keyboard on any LG laptops
Input: elantech - fix detection of touchpad on ASUS s301l
Input: i8042 - add Fujitsu U574 to no_timeout dmi table
Input: i8042 - add nomux quirk for Avatar AVIU-145A6
Input: serport - add compat handling for SPIOCSTYPE ioctl
Input: synaptics - add support for ForcePads
iommu/amd: Fix cleanup_domain for mass device removal
iovec: make sure the caller actually wants anything in
	memcpy_fromiovecend
ip6_gre: fix flowi6_proto value in xmit path
ip: make IP identifiers less predictable
ip_tunnel(ipv4): fix tunnels with "local any remote $remote_ip"
ipv6: fix rtnl locking in setsockopt for anycast and multicast
ipv6: restore the behavior of ipv6_sock_ac_drop()
ipvs: avoid netns exit crash on ip_vs_conn_drop_conntrack
ipvs: fix ipv6 hook registration for local replies
ipvs: Maintain all DSCP and ECN bits for ipv6 tun forwarding
iscsi-target: avoid NULL pointer in iscsi_copy_param_list failure
iscsi-target: Fix memory corruption in
iscsit_logout_post_handler_diffcid
isofs: Fix unbounded recursion when processing relocated directories
iwlwifi: increase DEFAULT_MAX_TX_POWER
iwlwifi: mvm: fix endianity issues with Smart Fifo commands
iwlwifi: mvm: treat EAPOLs like mgmt frames wrt rate
jbd2: fix descriptor block size handling errors with journal_csum
jbd2: fix infinite loop when recovering corrupt journal blocks
jiffies: Fix timeval conversion to jiffies
kcmp: fix standard comparison bug
kernel/smp.c:on_each_cpu_cond(): fix warning in fallback path
KEYS: Fix termination condition in assoc array garbage collection
KEYS: Fix use-after-free in assoc_array_gc()
kvm: iommu: fix the third parameter of kvm_iommu_put_pages
	(CVE-2014-3601)
KVM: nVMX: fix "acknowledge interrupt on exit" when APICv is in use
KVM: x86: always exit on EOIs for interrupts listed in the IOAPIC redir
	table
KVM: x86: Inter-privilege level ret emulation is not implemeneted
l2tp: fix race while getting PMTU on PPP pseudo-wire
libata: widen Crucial M550 blacklist matching
lib/btree.c: fix leak of whole btree nodes
libceph: add process_one_ticket() helper
libceph: do not hard code max auth ticket len
libceph: gracefully handle large reply messages from the mon
libceph: set last_piece in ceph_msg_data_pages_cursor_init() correctly
lib/plist: add helper functions
lib/plist: add plist_requeue
lockdep: Revert lockdep check in raw_seqcount_begin()
lockd: fix rpcbind crash on lockd startup failure
macvlan: Initialize vlan_features to turn on offload support.
macvtap: Fix race between device delete and open.
md/raid10: Fix memory leak when raid10 reshape completes.
md/raid10: fix memory leak when reshaping a RAID10.
md/raid1: be more cautious where we read-balance during resync.
md/raid1: clean up request counts properly in close_sync()
md/raid1: count resync requests in nr_pending.
md/raid1: Don't use next_resync to determine how far resync has
	progressed
md/raid1: fix_read_error should act on all non-faulty devices.
md/raid1: intialise start_next_window for READ case to avoid hang
md/raid1: make sure resync waits for conflicting writes to complete.
md/raid1,raid10: always abort recover on write error.
md/raid1: update next_resync under resync_lock.
md/raid5: disable 'DISCARD' by default due to safety concerns.
md/raid6: avoid data corruption during recovery of double-degraded RAID6
media: adv7604: fix inverted condition
media: af9035: new IDs: add support for PCTV 78e and PCTV 79e
media: au0828: Only alt setting logic when needed
media: cx18: fix kernel oops with tda8290 tuner
media: media-device: Remove duplicated memset() in media_enum_entities()
media: mt9v032: fix hblank calculation
media: sms: Remove CONFIG_ prefix from Kconfig symbols
media: v4l: vsp1: Remove the unneeded vsp1_video_buffer video field
media: vb2: fix VBI/poll regression
media: xc4000: Fix get_frequency()
media: xc5000: Fix get_frequency()
mei: nfc: fix memory leak in error path
mei: reset client state on queued connect request
mei: start disconnect request timer consistently
memblock, memhotplug: fix wrong type in memblock_find_in_range_node().
memcg: oom_notify use-after-free fix
mfd: omap-usb-host: Fix improper mask use.
mm, compaction: avoid isolating pinned pages
mm/compaction: change the timing to check to drop the spinlock
mm/compaction: check pageblock suitability once per pageblock
mm/compaction: clean-up code on success of ballon isolation
mm, compaction: determine isolation mode only once
mm/compaction: disallow high-order page for migration target
mm/compaction: do not call suitable_migration_target() on every page
mm, compaction: ignore pageblock skip when manually invoking compaction
mm: don't pointlessly use BUG_ON() for sanity check
mm: exclude memoryless nodes from zone_reclaim
mm/filemap.c: avoid always dirtying mapping->flags on O_DIRECT
mm: migrate: Close race between migration completion and mprotect
mm: numa: Do not mark PTEs pte_numa when splitting huge pages
mm: optimize put_mems_allowed() usage
mm/page-writeback.c: fix divide by zero in bdi_dirty_limits()
mm: per-thread vma caching
mm/readahead.c: fix readahead failure for memoryless NUMA nodes and
	limit readahead pages
mm, slab: initialize object alignment on cache creation
mm: softdirty: keep bit when zapping file pte
mm, thp: do not allow thp faults to avoid cpuset restrictions
mm, thp: move invariant bug check out of loop in __split_huge_page_map
mm: vmscan: respect NUMA policy mask when shrinking slab on direct
	reclaim
mm: vmscan: shrink_slab: rename max_pass -> freeable
mnt: Add tests for unprivileged remount cases that have found to be
	faulty
mnt: Change the default remount atime from relatime to the existing
	value
mnt: Correct permission checks in do_remount
mnt: Move the test for MNT_LOCK_READONLY from change_mount_flags into
	do_remount
mnt: Only change user settable mount flags in remount
mtd/ftl: fix the double free of the buffers allocated in build_maps()
mtd: nand: omap: Fix 1-bit Hamming code scheme, omap_calculate_ecc()
myri10ge: check for DMA mapping errors
net: allow macvlans to move to net namespace
net: Always untag vlan-tagged traffic on input.
net: Correctly set segment mac_len in skb_segment().
netfilter: x_tables: allow to use default cgroup match
netfilter: xt_hashlimit: perform garbage collection from process context
net/l2tp: don't fall back on UDP [get|set]sockopt
netlink: reset network header before passing to taps
net: phy: re-apply PHY fixups during phy_register_device
net: sctp: inherit auth_capable on INIT collisions
net: sendmsg: fix NULL pointer dereference
NFC: microread: Potential overflows in microread_target_discovered()
nfs3_list_one_acl(): check get_acl() result with IS_ERR_OR_NULL
NFSD: Decrease nfsd_users in nfsd_startup_generic fail
NFSv3: Fix another acl regression
NFSv4: Fix another bug in the close/open_downgrade code
NFSv4: Fix problems with close in the presence of a delegation
NFSv4: nfs4_state_manager() vs. nfs_server_remove_lists()
nilfs2: fix data loss with mmap()
nl80211: clear skb cb before passing to netlink
ocfs2/dlm: do not get resource spinlock if lockres is new
of/irq: Fix lookup to use 'interrupts-extended' property first
openvswitch: fix panic with multiple vlan headers
packet: handle too big packets for PACKET_V3
parisc: Implement new LWS CAS supporting 64 bit operations.
parisc: Only use -mfast-indirect-calls option for 32-bit kernel builds
partitions: aix.c: off by one bug
pata_scc: propagate return value of scc_wait_after_reset
PCI: Configure ASPM when enabling device
percpu: fix pcpu_alloc_pages() failure path
percpu: free percpu allocation info for uniprocessor system
percpu: perform tlb flush after pcpu_map_pages() failure
perf: Fix a race condition in perf_remove_from_context()
perf: fix perf bug in fork()
perf/x86/intel: Use rdmsrl_safe() when initializing RAPL PMU
pinctrl: dra: dt-bindings: Fix pull enable/disable
PM / sleep: Add state field to pm_states[] entries
PM / sleep: Use valid_state() for platform-dependent sleep states only
printk: rename printk_sched to printk_deferred
rapidio/tsi721_dma: fix failure to obtain transaction descriptor
RDMA/iwcm: Use a default listen backlog if needed
RDMA/uapi: Include socket.h in rdma_user_cm.h
regmap: Don't attempt block writes when syncing cache on single_rw
	devices
regmap: Fix handling of volatile registers for format_write() chips
regulator: arizona-ldo1: remove bypass functionality
regulatory: add NUL to alpha2
Revert "iwlwifi: dvm: don't enable CTS to self"
Revert "KVM: x86: Increase the number of fixed MTRR regs to 10"
Revert "mac80211: disable uAPSD if all ACs are under ACM"
Revert "mac80211: move "bufferable MMPDU" check to fix AP mode scan"
Revert "net/macb: add pinctrl consumer support"
Revert "USB: option,zte_ev: move most ZTE CDMA devices to zte_ev"
Revert "x86-64, modify_ldt: Make support for 16-bit segments a runtime
	option"
ring-buffer: Always reset iterator to reader page
ring-buffer: Fix infinite spin in reading buffer
ring-buffer: Up rb_iter_peek() loop count to 3
rtlwifi: rtl8192cu: Add new ID
rtnetlink: fix VF info size
sched_clock: Avoid corrupting hrtimer tree during suspend
sched: Fix sched_setparam() policy == -1 logic
sched: Fix unreleased llc_shared_mask bit during CPU hotplug
scsi: add a blacklist flag which enables VPD page inquiries
scsi: do not issue SCSI RSOC command to Promise Vtrak E610f
scsi: handle flush errors properly
SCSI: libiscsi: fix potential buffer overrun in __iscsi_conn_send_pdu
scsi_scan: Restrict sequential scan to 256 LUNs
scsi_transport_srp: Fix fast_io_fail_tmo=dev_loss_tmo=off behavior
sctp: fix possible seqlock seadlock in sctp_packet_transmit()
sctp: handle association restarts when the socket is closed.
serial: 8250: Add Quark X1000 to 8250_pci.c
serial: 8250_dma: check the result of TX buffer mapping
serial: core: Preserve termios c_cflag for console resume
shmem: fix nlink for rename overwrite directory
sit: Fix ipip6_tunnel_lookup device matching criteria
SMB3: Fix oops when creating symlinks on smb3
spi: dw-pci: fix bug when regs left uninitialized
spi: omap2-mcspi: Configure hardware when slave driver changes mode
spi/omap-mcspi: Fix the spi task hangs waiting dma_rx
spi: orion: fix incorrect handling of cell-index DT property
spi/pxa2xx: Add ACPI ID for Intel Braswell
stable_kernel_rules: Add pointer to netdev-FAQ for network patches
staging: et131x: Fix errors caused by phydev->addr accesses before
	initialisation
staging/lustre: disable virtual block device for 64K pages
staging: r8188eu: Add new USB ID
staging/rtl8188eu: add 0df6:0076 Sitecom Europe B.V.
staging: vt6655: Fix disassociated messages every 10 seconds
staging: vt6655: Fix Warning on boot handle_irq_event_percpu.
storage: Add single-LUN quirk for Jaz USB Adapter
sunsab: Fix detection of BREAK on sunsab serial console
svcrdma: Select NFSv4.1 backchannel transport based on forward channel
swap: change swap_info singly-linked list to list_head
swap: change swap_list_head to plist, add swap_avail_head
target: Fix inverted logic in SE_DEV_ALUA_SUPPORT_STATE_STORE
Target/iser: Don't put isert_conn inside disconnected handler
Target/iser: Get isert_conn reference once got to connected_handler
tcp: don't use timestamp from repaired skb-s to calculate RTT (v2)
tcp: fixing TLP's FIN recovery
tcp: Fix integer-overflow in TCP vegas
tcp: Fix integer-overflows in TCP veno
tcp: fix ssthresh and undo for consecutive short FRTO episodes
tcp: fix tcp_release_cb() to dispatch via address family for
	mtu_reduced()
team: avoid race condition in scheduling delayed work
tg3: Allow for recieve of full-size 8021AD frames
tg3: Work around HW/FW limitations with vlan encapsulated frames
timer: Fix lock inversion between hrtimer_bases.lock and scheduler locks
tpm: Add missing tpm_do_selftest to ST33 I2C driver
tpm: missing tpm_chip_put in tpm_get_random()
tpm: Properly clean sysfs entries in error path
tpm: Provide a generic means to override the chip returned timeouts
trace: Fix epoll hang when we race with new entries
udf: Avoid infinite loop when processing indirect ICBs
USB: Add device quirk for ASUS T100 Base Station keyboard
usb: chipidea: msm: Initialize PHY on reset event
usb: chipidea: msm: Use USB PHY API to control PHY state
USB: cp210x: add support for Seluxit USB dongle
USB: devio: fix issue with log flooding
usb: dwc3: core: fix ordering for PHY suspend
usb: dwc3: core: fix order of PM runtime calls
usb: dwc3: omap: fix ordering for runtime pm calls
USB: ehci-pci: USB host controller support for Intel Quark X1000
USB: EHCI: unlink QHs even after the controller has stopped
usb: ehci: using wIndex + 1 for hub port
USB: fix build error with CONFIG_PM_RUNTIME disabled
USB: Fix persist resume of some SS USB devices
USB: ftdi_sio: add Basic Micro ATOM Nano USB2Serial PID
USB: ftdi_sio: Added PID for new ekey device
USB: ftdi_sio: Add support for GE Healthcare Nemo Tracker device
USB: ftdi_sio: add support for NOVITUS Bono E thermal printer
usb: gadget: f_fs: drop duplicate usb_functionfs_descs_head declaration
usb: host: xhci: fix compliance mode workaround
usb: hub: Prevent hub autosuspend if usbcore.autosuspend is -1
usb: hub: take hub->hdev reference when processing from eventlist
usb: musb: dsps: kill OTG timer on suspend
USB: OHCI: don't lose track of EDs when a controller dies
USB: OHCI: fix bugs in debug routines
USB: option: add VIA Telecom CDS7 chipset device id
USB: option: reduce interrupt-urb logging verbosity
usb: phy: tegra: Avoid use of sizeof(void)
usb: phy: twl4030-usb: Fix lost interrupts after ID pin goes down
usb: phy: twl4030-usb: Fix regressions to runtime PM on omaps
USB: serial: cp210x: added Ketra N1 wireless interface support
USB: serial: fix potential heap buffer overflow
USB: serial: fix potential stack buffer overflow
USB: serial: ftdi_sio: Add support for new Xsens devices
USB: serial: ftdi_sio: Annotate the current Xsens PID assignments
USB: serial: pl2303: add device id for ztek device
USB: sierra: add 1199:68AA device ID
USB: sierra: avoid CDC class functions on "68A3" devices
USB: sisusb: add device id for Magic Control USB video
USB: storage: Add quirk for Adaptec USBConnect 2000 USB-to-SCSI Adapter
USB: storage: Add quirk for Ariston Technologies iConnect USB to SCSI
	adapter
USB: storage: Add quirks for Entrega/Xircom USB to SCSI converters
USB: whiteheat: Added bounds checking for bulk command response
usb: xhci: amd chipset also needs short TX quirk
USB: zte_ev: fix removed PIDs
USB: zte_ev: remove duplicate Gobi PID
USB: zte_ev: remove duplicate Qualcom PID
uwb: init beacon cache entry before registering uwb device
vfs: add d_is_dir()
vfs: fix bad hashing of dentries
vgaswitcheroo: add vga_switcheroo_fini_domain_pm_ops
vm_is_stack: use for_each_thread() rather then buggy while_each_thread()
vmscan: reclaim_clean_pages_from_list() must use mod_zone_page_state()
vxlan: fix incorrect initializer in union vxlan_addr
workqueue: apply __WQ_ORDERED to create_singlethread_workqueue()
x86_64/entry/xen: Do not invoke espfix64 on Xen
x86-64, espfix: Don't leak bits 31:16 of %esp returning to 16-bit stack
x86_64/vsyscall: Fix warn_bad_vsyscall log output
x86: don't exclude low BIOS area when allocating address space for
	non-PCI cards
x86 early_ioremap: Increase FIX_BTMAPS_SLOTS to 8
x86/efi: Enforce CONFIG_RELOCATABLE for EFI boot stub
x86, espfix: Fix broken header guard
x86, espfix: Make espfix64 a Kconfig option, fix UML
x86, espfix: Make it possible to disable 16-bit support
x86, espfix: Move espfix definitions into a separate header file
x86/espfix/xen: Fix allocation of pages for paravirt page tables
x86/kaslr: Avoid the setup_data area when picking location
x86/xen: don't copy bogus duplicate entries into kernel page tables
x86/xen: no need to explicitly register an NMI callback
x86/xen: resume timer irqs early
x86/xen: use vmap() to map grant table pages in PVH guests
xattr: fix check for simultaneous glibc header inclusion
xen/events/fifo: ensure all bitops are properly aligned even on x86
xen/events/fifo: reset control block and local HEADs on resume
xen/manage: Always freeze/thaw processes when suspend/resuming
xfrm: Fix installation of AH IPsec SAs
xfrm: Generate blackhole routes only from route lookup functions
xfrm: Generate queueing routes only from route lookup functions
xfs: don't dirty buffers beyond EOF
xfs: don't zero partial page cache pages during O_DIRECT writes
xfs: don't zero partial page cache pages during O_DIRECT writes
xfs: ensure verifiers are attached to recovered buffers
xfs: log vector rounding leaks log space
xfs: quotacheck leaves dquot buffers without verifiers
xhci: Fix null pointer dereference if xhci initialization fails
xhci: fix oops when xhci resumes from hibernate with hw lpm capable
	devices
xhci: Treat not finding the event_seg on COMP_STOP the same as
	COMP_STOP_INVAL
2014-10-15 12:39:45 +04:00

1954 lines
58 KiB
RPMSpec

#
%define kernelversion 3
%define patchlevel 14
# sublevel is now used for -stable patches
%define sublevel 22
# Package release
%define mibrel 69
# kernel Makefile extraversion is substituted by
# kpatch wich are either 0 (empty), rc (kpatch)
%define kpatch 0
# kernel.org -gitX patch (only the number after "git")
%define kgit 0
# kernel base name (also name of srpm)
%define kname kernel
# Patch tarball tag
%define ktag rosa
# define rpmtag %{disttag}
%define rpmtag %{disttag}
%if %kpatch
%if %kgit
%define rpmrel %mkrel 0.%{kpatch}.%{kgit}.%{mibrel}
%else
%define rpmrel %mkrel 0.%{kpatch}.%{mibrel}
%endif
%else
%define rpmrel 1
%endif
# fakerel and fakever never change, they are used to fool
# rpm/urpmi/smart
%define fakever 1
%define fakerel %mkrel 1
# version defines
%define kversion %{kernelversion}.%{patchlevel}.%{sublevel}
%define kverrel %{kversion}-%{rpmrel}
# When we are using a pre/rc patch, the tarball is a sublevel -1
%if %kpatch
%if %sublevel
%define tar_ver %{kernelversion}.%{patchlevel}
%else
%define tar_ver %{kernelversion}.%(expr %{patchlevel} - 1)
%endif
%define patch_ver %{kversion}-%{kpatch}-%{ktag}%{mibrel}
%else
%define tar_ver %{kernelversion}.%{patchlevel}
%define patch_ver %{kversion}-%{ktag}%{mibrel}
%endif
# Used for not making too long names for rpms or search paths
# replaced mibrel with rpmrel / release > we can use only ONE sources folder for nrj & nrjQL
%if %kpatch
%if %kgit
%define buildrpmrel 0.%{kpatch}.%{kgit}.%{rpmrel}%{rpmtag}
%else
%define buildrpmrel 0.%{kpatch}.%{rpmrel}%{rpmtag}
%endif
%else
%define buildrpmrel %{rpmrel}%{rpmtag}
%endif
%define buildrel %{kversion}-%{buildrpmrel}
# Having different top level names for packges means that you have to remove
# them by hard :(
%define top_dir_name %{kname}-%{_arch}
%define build_dir ${RPM_BUILD_DIR}/%{top_dir_name}
%define src_dir %{build_dir}/linux-%{tar_ver}
# Disable useless debug rpms...
%define _enable_debug_packages %{nil}
%define debug_package %{nil}
# Build defines
%define build_doc 1
%define build_source 1
%define build_devel 1
%define build_debug 0
#
# Old Mandriva kernel flavours plus new two PAE flavours
#
# Build desktop i586 / 4GB
%ifarch %{ix86}
%define build_desktop586 0
%endif
# Build desktop (i686 / 4GB) / x86_64 / sparc64 sets
%define build_desktop 1
# Build netbook (i686 / 4GB) / x86_64
%define build_netbook 0
# Build server (i686 / 64GB)/x86_64 / sparc64 sets
%define build_server 1
# Build desktop686 pae (i686 / 64GB)
%ifarch %{ix86}
%define build_desktop_pae 0
%endif
# Build netbook686 pae (i686 / 64GB)
%ifarch %{ix86}
%define build_netbook_pae 0
%endif
#
# MIB low latency optimized flavours called "nrj"
#
# Build nrj desktop586 (i586 / 4GB)
%ifarch %{ix86}
%define build_nrj_desktop586 0
%endif
# Build nrj desktop (i686 / 4GB) / x86_64 / sparc64 sets
%define build_nrj_desktop 1
# Build nrj realtime (i686 / 4GB) / x86_64
%define build_nrj_realtime 1
# Build nrj server (i686 / 4GB) / x86_64
%define build_nrj_server 0
# Build nrj laptop (i686 / 4GB) / x86_64
%define build_nrj_laptop 1
# Build nrj netbook (i686 / 4GB) / x86_6
%define build_nrj_netbook 1
# Build nrj desktop pae (i686 / 64GB)
%ifarch %{ix86}
%define build_nrj_desktop_pae 1
%endif
# Build nrj realtime pae (i686 / 64GB)
%ifarch %{ix86}
%define build_nrj_realtime_pae 0
%endif
# Build nrj laptop pae (i686 / 64GB)
%ifarch %{ix86}
%define build_nrj_laptop_pae 1
%endif
# Build nrj netbook686 pae (i686 / 64GB)
%ifarch %{ix86}
%define build_nrj_netbook_pae 0
%endif
#
# experimental "cpu level" optimized "nrj" flavours
#
# Build nrj netbook Intel Atom (matom / 4GB)
%ifarch %{ix86}
%define build_nrj_netbook_atom 0
%endif
# Build nrj netbook Intel Atom pae (matom / 64GB)
%ifarch %{ix86}
%define build_nrj_netbook_atom_pae 0
%endif
# Build nrj desktop Intel Core2 (mcore2 / 4GB)
%ifarch %{ix86}
%define build_nrj_desktop_core2 0
%endif
# Build nrj desktop Intel Core2 pae (mcore2 / 64GB)
%ifarch %{ix86}
%define build_nrj_desktop_core2_pae 0
%endif
#
# end of experimental "cpu level" optimized "nrj" flavours
#
# build perf and cpupower tools
%define build_perf 1
%define build_cpupower 1
# compress modules with xz
%define build_modxz 1
# ARM builds
%ifarch %{arm}
%define build_desktop 0
%define build_netbook 0
%define build_server 0
%define build_iop32x 0
%define build_kirkwood 1
%define build_versatile 1
# no cpupower tools on arm yet
%define build_cpupower 0
# arm is currently not using xz
%define build_modxz 0
%endif
# End of user definitions
# buildtime flags
%{?_without_desktop586: %global build_desktop586 0}
%{?_without_desktop: %global build_desktop 0}
%{?_without_netbook: %global build_netbook 0}
%{?_without_server: %global build_server 0}
%{?_without_desktop_pae: %global build_desktop_pae 0}
%{?_without_netbook_pae: %global build_netbook_pae 0}
%{?_without_nrj_desktop586: %global build_nrj_desktop586 0}
%{?_without_nrj_desktop: %global build_nrj_desktop 0}
%{?_without_nrj_realtime: %global build_nrj_realtime 0}
%{?_without_nrj_server: %global build_nrj_server 0}
%{?_without_nrj_laptop: %global build_nrj_laptop 0}
%{?_without_nrj_netbook: %global build_nrj_netbook 0}
%{?_without_nrj_desktop_pae: %global build_nrj_desktop_pae 0}
%{?_without_nrj_realtime_pae: %global build_nrj_realtime_pae 0}
%{?_without_nrj_laptop_pae: %global build_nrj_laptop_pae 0}
%{?_without_nrj_netbook_pae: %global build_nrj_netbook_pae 0}
%{?_without_nrj_netbook_atom: %global build_nrj_netbook_atom 0}
%{?_without_nrj_netbook_atom_pae: %global build_nrj_netbook_atom_pae 0}
%{?_without_nrj_desktop_core2: %global build_nrj_desktop_core2 0}
%{?_without_nrj_desktop_core2_pae: %global build_nrj_desktop_core2_pae 0}
%{?_without_doc: %global build_doc 0}
%{?_without_source: %global build_source 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_desktop586: %global build_desktop586 1}
%{?_with_desktop: %global build_desktop 1}
%{?_with_netbook: %global build_netbook 1}
%{?_with_server: %global build_server 1}
%{?_with_desktop_pae: %global build_desktop_pae 1}
%{?_with_netbook_pae: %global build_netbook_pae 1}
%{?_with_nrj_desktop586: %global build_nrj_desktop586 1}
%{?_with_nrj_desktop: %global build_nrj_desktop 1}
%{?_with_nrj_realtime: %global build_nrj_realtime 1}
%{?_with_nrj_server: %global build_nrj_server 1}
%{?_with_nrj_laptop: %global build_nrj_laptop 1}
%{?_with_nrj_netbook: %global build_nrj_netbook 1}
%{?_with_nrj_desktop_pae: %global build_nrj_desktop_pae 1}
%{?_with_nrj_realtime_pae: %global build_nrj_realtime_pae 1}
%{?_with_nrj_laptop_pae: %global build_nrj_laptop_pae 1}
%{?_with_nrj_netbook_pae: %global build_nrj_netbook_pae 1}
%{?_with_nrj_netbook_atom: %global build_nrj_netbook_atom 1}
%{?_with_nrj_netbook_atom_pae: %global build_nrj_netbook_atom_pae 1}
%{?_with_nrj_desktop_core2: %global build_nrj_desktop_core2 1}
%{?_with_nrj_desktop_core2_pae: %global build_nrj_desktop_core2_pae 1}
%{?_with_doc: %global build_doc 1}
%{?_with_source: %global build_source 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}
# ARM builds
%{?_with_iop32x: %global build_iop32x 1}
%{?_with_kirkwood: %global build_kirkwood 1}
%{?_with_versatile: %global build_versatile 1}
%{?_without_iop32x: %global build_iop32x 0}
%{?_without_kirkwood: %global build_kirkwood 0}
%{?_without_versatile: %global build_versatile 0}
# For the .nosrc.rpm
%define build_nosrc 0
%{?_with_nosrc: %global build_nosrc 1}
############################################################
### Linker start1 > Check point to build for omv or rosa ###
############################################################
%if %(if [ -z "$CC" ] ; then echo 0; else echo 1; fi)
%define kmake %make CC="$CC"
%else
%define kmake %make
%endif
# there are places where parallel make don't work
%define smake make
###########################################################
### Linker end1 > Check point to build for omv or rosa ###
###########################################################
# 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")
# Sparc arch wants sparc64 kernels
%define target_arch %(echo %{_arch} | sed -e 's/mips.*/mips/' -e 's/arm.*/arm/' -e 's/aarch64/arm64/')
#
# SRC RPM description
#
Summary: Linux kernel built for Mandriva and ROSA
Name: %{kname}
Version: %{kversion}
Release: %{rpmrel}
License: GPLv2
Group: System/Kernel and hardware
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
ExclusiveOS: Linux
URL: http://www.kernel.org
####################################################################
#
# Sources
#
### This is for full SRC RPM
Source0: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.x/linux-%{tar_ver}.tar.xz
Source1: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.x/linux-%{tar_ver}.tar.sign
### This is for stripped SRC RPM
%if %build_nosrc
NoSource: 0
%endif
# This is for disabling *config, mrproper, prepare, scripts on -devel rpms
Source2: disable-mrproper-prepare-scripts-configs-in-devel-rpms.patch
Source4: README.kernel-sources
Source5: kernel.rpmlintrc
# config and systemd service file from fedora
Source50: cpupower.service
Source51: cpupower.config
# Our patch tarball,
# see https://abf.rosalinux.ru/soft/kernel-patches-and-configs/
Source100: kernel-patches-and-configs-%{kversion}.tar.xz
####################################################################
#
# Patches
#
# Patch0 to Patch100 are for core kernel upgrades.
#
# Pre linus patch: ftp://ftp.kernel.org/pub/linux/kernel/v3.0/testing
%if %kpatch
%if %sublevel
Patch2: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.x/stable-review/patch-%{kversion}-%{kpatch}.xz
Source11: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.x/stable-review/patch-%{kversion}-%{kpatch}.sign
%else
Patch1: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.x/testing/patch-%{kernelversion}.%{patchlevel}-%{kpatch}.xz
Source10: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.x/testing/patch-%{kernelversion}.%{patchlevel}-%{kpatch}.sign
%endif
%endif
%if %kgit
Patch2: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.x/snapshots/patch-%{kernelversion}.%{patchlevel}-%{kpatch}-git%{kgit}.xz
Source11: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.x/snapshots/patch-%{kernelversion}.%{patchlevel}-%{kpatch}-git%{kgit}.sign
%endif
%if %sublevel
%if %kpatch
%define prev_sublevel %(expr %{sublevel} - 1)
%if %prev_sublevel
Patch1: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.x/patch-%{kernelversion}.%{patchlevel}.%{prev_sublevel}.xz
Source10: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.x/patch-%{kernelversion}.%{patchlevel}.%{prev_sublevel}.sign
%endif
%else
Patch1: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.x/patch-%{kversion}.xz
Source10: ftp://ftp.kernel.org/pub/linux/kernel/v%{kernelversion}.x/patch-%{kversion}.sign
%endif
%endif
#END
####################################################################
# Defines for the things that are needed for all the kernels
#
%define common_desc_kernel The kernel package contains the Linux kernel (vmlinuz), the core of your \
Mandriva and ROSA operating system. The kernel handles the basic functions \
of the operating system: memory allocation, process allocation, device \
input and output, etc.
%define common_desc_kernel_smp This kernel relies on in-kernel smp alternatives to switch between up & smp \
mode depending on detected hardware. To force the kernel to boot in single \
processor mode, use the "nosmp" boot parameter.
### Global Requires/Provides
%define requires1 bootloader-utils >= 1.15-8
%define requires2 dracut >= 017-16
%define requires3 kmod >= 7-6
%define requires4 sysfsutils >= 2.1.0-12
%define requires5 kernel-firmware >= 20120219-1
%define kprovides1 %{kname} = %{kverrel}
%define kprovides2 kernel = %{tar_ver}
%define kprovides3 alsa = 1.0.27
%define kprovides_server drbd-api = 88
%define kobsoletes1 dkms-r8192se <= 0019.1207.2010-2
%define kobsoletes2 dkms-lzma <= 4.43-32
%define kobsoletes3 dkms-psb <= 4.41.1-7
# conflict dkms packages that dont support kernel-3.14
# all driver versions must be carefully checked to add
%define kconflicts1 dkms-broadcom-wl < 6.30.223.141-6
%define kconflicts2 dkms-fglrx < 14.10.1006.1001-1
%define kconflicts3 dkms-nvidia-current < 331.38-5
%define kconflicts4 dkms-nvidia-long-lived < 304.108-8
%define kconflicts5 dkms-nvidia173 < 173.14.39-3
# nvidia96xx does not support this kernel or x11-server-1.13
Autoreqprov: no
BuildRequires: bc
BuildRequires: binutils
BuildRequires: gcc
# For power tools
BuildRequires: pkgconfig(ncurses)
BuildRequires: kmod-devel kmod-compat
%ifarch x86_64
BuildRequires: numa-devel
%endif
# 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
BuildRequires: binutils-devel
BuildRequires: bison
BuildRequires: elfutils-devel
BuildRequires: flex
BuildRequires: libunwind-devel
BuildRequires: newt-devel
BuildRequires: perl-devel
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: python-devel
BuildRequires: xmlto
BuildRequires: zlib-devel
%endif
%ifarch %{arm}
BuildRequires: uboot-mkimage
%endif
# might be useful too:
Suggests: microcode
%description
%common_desc_kernel
%ifnarch %{arm}
%common_desc_kernel_smp
%endif
# Define obsolete/provides to help automatic upgrades of old kernel-xen-pvops
%define latest_obsoletes_server kernel-xen-pvops-latest < 3.2.1-1
%define latest_provides_server kernel-xen-pvops-latest = %{kverrel}
%define latest_obsoletes_devel_server kernel-xen-pvops-devel-latest < 3.2.1-1
%define latest_provides_devel_server kernel-xen-pvops-devel-latest = %{kverrel}
# mkflavour() name flavour processor
# name: the flavour name in the package name
# flavour: first parameter of CreateKernel()
%define mkflavour() \
%package -n %{kname}-%{1}-%{buildrel} \
Version: %{fakever} \
Release: %{fakerel} \
Provides: %kprovides1 %kprovides2 %kprovides3 \
%{expand:%%{?kprovides_%{1}:Provides: %{kprovides_%{1}}}} \
Provides: %{kname}-%{1} \
%if %{build_nrj_desktop} \
Provides: kernel-desktop \
%endif \
Requires(pre): %requires1 %requires2 %requires3 %requires4 \
Requires: %requires2 %requires5 \
Obsoletes: %kobsoletes1 %kobsoletes2 %kobsoletes3 \
Conflicts: %kconflicts1 %kconflicts2 %kconflicts3 \
Conflicts: %kconflicts4 %kconflicts5 \
Provides: should-restart = system \
Suggests: crda \
%ifarch %{ix86} \
Conflicts: arch(x86_64) \
%endif \
Summary: %{expand:%{summary_%(echo %{1} | sed -e "s/-/_/")}} \
Group: System/Kernel and hardware \
%description -n %{kname}-%{1}-%{buildrel} \
%common_desc_kernel %{expand:%{info_%(echo %{1} | sed -e "s/-/_/")}} \
%ifnarch %{arm} \
%common_desc_kernel_smp \
%endif \
\
%if %build_devel \
%package -n %{kname}-%{1}-devel-%{buildrel} \
Version: %{fakever} \
Release: %{fakerel} \
Requires: glibc-devel ncurses-devel make gcc perl \
Summary: The kernel-devel files for %{kname}-%{1}-%{buildrel} \
Group: Development/Kernel \
Provides: %{kname}-devel = %{kverrel} \
Provides: %{kname}-%{1}-devel \
%ifarch %{ix86} \
Conflicts: arch(x86_64) \
%endif \
%description -n %{kname}-%{1}-devel-%{buildrel} \
This package contains the kernel files (headers and build tools) \
that should be enough to build additional drivers for \
use with %{kname}-%{1}-%{buildrel}. \
\
If you want to build your own kernel, you need to install the full \
%{kname}-source-%{buildrel} rpm. \
\
%endif \
\
%if %build_debug \
%package -n %{kname}-%{1}-%{buildrel}-debuginfo \
Version: %{fakever} \
Release: %{fakerel} \
Summary: Files with debuginfo for %{kname}-%{1}-%{buildrel} \
Group: Development/Debug \
Provides: kernel-debug = %{kverrel} \
%ifarch %{ix86} \
Conflicts: arch(x86_64) \
%endif \
%description -n %{kname}-%{1}-%{buildrel}-debuginfo \
This package contains the files with debuginfo to aid in debug tasks \
when using %{kname}-%{1}-%{buildrel}. \
\
If you need to look at debug information or use some application that \
needs debugging info from the kernel, this package may help. \
\
%endif \
\
%package -n %{kname}-%{1}-latest \
Version: %{kversion} \
Release: %{rpmrel} \
Summary: Virtual rpm for latest %{kname}-%{1} \
Group: System/Kernel and hardware \
Requires: %{kname}-%{1}-%{buildrel} \
%ifarch %{ix86} \
Conflicts: arch(x86_64) \
%endif \
%{expand:%%{?latest_obsoletes_%{1}:Obsoletes: %{latest_obsoletes_%{1}}}} \
%{expand:%%{?latest_provides_%{1}:Provides: %{latest_provides_%{1}}}} \
%description -n %{kname}-%{1}-latest \
This package is a virtual rpm that aims to make sure you always have the \
latest %{kname}-%{1} installed... \
\
%if %build_devel \
%package -n %{kname}-%{1}-devel-latest \
Version: %{kversion} \
Release: %{rpmrel} \
Summary: Virtual rpm for latest %{kname}-%{1}-devel \
Group: Development/Kernel \
Requires: %{kname}-%{1}-devel-%{buildrel} \
%ifarch %{ix86} \
Conflicts: arch(x86_64) \
%endif \
Provides: %{kname}-devel-latest \
%{expand:%%{?latest_obsoletes_devel_%{1}:Obsoletes: %{latest_obsoletes_devel_%{1}}}} \
%{expand:%%{?latest_provides_devel_%{1}:Provides: %{latest_provides_devel_%{1}}}} \
%description -n %{kname}-%{1}-devel-latest \
This package is a virtual rpm that aims to make sure you always have the \
latest %{kname}-%{1}-devel installed... \
\
%endif \
\
%post -n %{kname}-%{1}-%{buildrel} -f kernel_files.%{1}-post \
%posttrans -n %{kname}-%{1}-%{buildrel} -f kernel_files.%{1}-posttrans \
%preun -n %{kname}-%{1}-%{buildrel} -f kernel_files.%{1}-preun \
%postun -n %{kname}-%{1}-%{buildrel} -f kernel_files.%{1}-postun \
\
%if %build_devel \
%post -n %{kname}-%{1}-devel-%{buildrel} -f kernel_devel_files.%{1}-post \
%preun -n %{kname}-%{1}-devel-%{buildrel} -f kernel_devel_files.%{1}-preun \
%postun -n %{kname}-%{1}-devel-%{buildrel} -f kernel_devel_files.%{1}-postun \
%endif \
\
%files -n %{kname}-%{1}-%{buildrel} -f kernel_files.%{1} \
%files -n %{kname}-%{1}-latest \
\
%if %build_devel \
%files -n %{kname}-%{1}-devel-%{buildrel} -f kernel_devel_files.%{1} \
%files -n %{kname}-%{1}-devel-latest \
%endif \
\
%if %build_debug \
%files -n %{kname}-%{1}-%{buildrel}-debuginfo -f kernel_debug_files.%{1} \
%endif
%ifarch %{ix86}
#
# kernel-desktop586: i586, smp-alternatives, 4GB
#
%if %build_desktop586
%define summary_desktop586 Linux kernel for desktop use with i586 & 4GB RAM
%define info_desktop586 This kernel is compiled for desktop use, single or \
multiple i586 processor(s)/core(s) and less than 4GB RAM, using HZ_1000, \
voluntary preempt, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%mkflavour desktop586
%endif
%endif
#
# kernel-desktop: i686, smp-alternatives, 4 GB / x86_64
#
%if %build_desktop
%ifarch %{ix86}
%define summary_desktop Linux Kernel for desktop use with i686 & 4GB RAM
%define info_desktop This kernel is compiled for desktop use, single or \
multiple i686 processor(s)/core(s) and less than 4GB RAM, using HZ_1000, \
voluntary preempt, CFS cpu scheduler and BFQ i/o scheduler.
%else
%define summary_desktop Linux Kernel for desktop use with %{_arch}
%define info_desktop This kernel is compiled for desktop use, single or \
multiple %{_arch} processor(s)/core(s), using HZ_1000, \
voluntary preempt, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%endif
%mkflavour desktop
%endif
#
# kernel-netbook: i686, smp-alternatives, 4 GB / x86_64
#
%if %build_netbook
%ifarch %{ix86}
%define summary_netbook Linux Kernel for netbook use with i686 & 4GB RAM
%define info_netbook This kernel is compiled for netbook use, single or \
multiple i686 processor(s)/core(s) and less than 4GB RAM, using HZ_250, \
voluntary preempt, CFS cpu scheduler and BFQ i/o scheduler.
%else
%define summary_netbook Linux Kernel for netbook use with %{_arch}
%define info_netbook This kernel is compiled for netbook use, single or \
multiple %{_arch} processor(s)/core(s), using HZ_250, \
voluntary preempt, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%endif
%mkflavour netbook
%endif
#
# kernel-server: i686, smp-alternatives, 64 GB / x86_64
#
%if %build_server
%ifarch %{ix86}
%define summary_server Linux Kernel for server use with i686 & 64GB RAM
%define info_server This kernel is compiled for server use, single or \
multiple i686 processor(s)/core(s) and up to 64GB RAM using PAE, using \
no preempt, HZ_100, CFS cpu scheduler and CFQ i/o scheduler, ONDEMAND governor.
%else
%define summary_server Linux Kernel for server use with %{_arch}
%define info_server This kernel is compiled for server use, single or \
multiple %{_arch} processor(s)/core(s), using no preempt, HZ_100, \
CFS cpu scheduler and CFQ i/o scheduler, ONDEMAND governor.
%endif
%mkflavour server
%endif
%ifarch %{ix86}
#
# kernel-desktop-pae: i686, smp-alternatives, 64GB
#
%if %build_desktop_pae
%define summary_desktop_pae Linux kernel for desktop use with i686 & upto 64GB RAM
%define info_desktop_pae This kernel is compiled for desktop use, single or \
multiple i686 processor(s)/core(s) and up to 64GB RAM using PAE, using HZ_1000, \
voluntary preempt, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%mkflavour desktop-pae
%endif
%endif
%ifarch %{ix86}
#
# kernel-netbook-pae: i686, smp-alternatives, 64 GB
#
%if %build_netbook_pae
%define summary_netbook_pae Linux Kernel for for netbook use with i686 & upto 64GB RAM
%define info_netbook_pae This kernel is compiled for netbook use, single or \
multiple i686 processor(s)/core(s) and up to 64GB RAM using PAE, using HZ_250, \
voluntary preempt, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%mkflavour netbook-pae
%endif
%endif
%ifarch %{ix86}
#
# kernel-nrj-desktop586: nrj, i586, smp-alternatives, 4GB
#
%if %build_nrj_desktop586
%define summary_nrj_desktop586 Linux kernel for desktop use with i586 & 4GB RAM
%define info_nrj_desktop586 This kernel is compiled for desktop use, single or \
multiple i586 processor(s)/core(s) and less than 4GB RAM, using HZ_1000, \
full preempt, rcu boost, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%mkflavour nrj-desktop586
%endif
%endif
#
# kernel-nrj-desktop: nrj, i686, smp-alternatives, 4 GB / x86_64
#
%if %build_nrj_desktop
%ifarch %{ix86}
%define summary_nrj_desktop Linux Kernel for desktop use with i686 & 4GB RAM
%define info_nrj_desktop This kernel is compiled for desktop use, single or \
multiple i686 processor(s)/core(s) and less than 4GB RAM, using HZ_1000, \
full preempt, rcu boost, RIFS cpu scheduler and BFQ I/O scheduler, ONDEMAND governor.
%else
%define summary_nrj_desktop Linux Kernel for desktop use with %{_arch}
%define info_nrj_desktop This kernel is compiled for desktop use, single or \
multiple %{_arch} processor(s)/core(s), using HZ_1000, \
full preempt, rcu boost, RIFS cpu scheduler and BFQ I/O scheduler, ONDEMAND governor.
%endif
%mkflavour nrj-desktop
%endif
#
# kernel-nrj-realtime: nrj, i686, smp-alternatives, 4 GB / x86_64
#
%if %build_nrj_realtime
%ifarch %{ix86}
%define summary_nrj_realtime Linux Kernel for low latency use with i686 & 4GB RAM
%define info_nrj_realtime This kernel is compiled for low latency use, single or \
multiple i686 processor(s)/core(s) and less than 4GB RAM, using HZ_1000, \
full preempt, rcu boost, CFS cpu scheduler and new BFQ I/O scheduler, PERFORMANCE governor.
%else
%define summary_nrj_realtime Linux Kernel for low latency use with %{_arch}
%define info_nrj_realtime This kernel is compiled for low latency use, single or \
multiple %{_arch} processor(s)/core(s), using HZ_1000, \
full preempt, rcu boost, CFS cpu scheduler and new BFQ I/O scheduler, PERFORMANCE governor.
%endif
%mkflavour nrj-realtime
%endif
#
# kernel-nrj-server: i686, smp-alternatives, 64 GB / x86_64
#
%if %build_nrj_server
%ifarch %{ix86}
%define summary_nrj_server Linux Kernel for server use with i686 & 64GB RAM
%define info_nrj_server This kernel is compiled for server use, single or \
multiple i686 processor(s)/core(s) and up to 64GB RAM using PAE, using \
no preempt, HZ_100, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%else
%define summary_nrj_server Linux Kernel for server use with %{_arch}
%define info_nrj_server This kernel is compiled for server use, single or \
multiple %{_arch} processor(s)/core(s), using no preempt, HZ_100, \
CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%endif
%mkflavour nrj-server
%endif
#
# kernel-nrj-laptop: nrj, i686, smp-alternatives, 4 GB / x86_64
#
%if %build_nrj_laptop
%ifarch %{ix86}
%define summary_nrj_laptop Linux Kernel for laptop use with i686 & 4GB RAM
%define info_nrj_laptop This kernel is compiled for laptop use, single or \
multiple i686 processor(s)/core(s) and less than 4GB RAM, using HZ_300, \
full preempt, rcu boost, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%else
%define summary_nrj_laptop Linux Kernel for laptop use with %{_arch}
%define info_nrj_laptop This kernel is compiled for laptop use, single or \
multiple %{_arch} processor(s)/core(s), using HZ_300, \
full preempt, rcu boost, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%endif
%mkflavour nrj-laptop
%endif
#
# kernel-nrj-netbook: nrj, i686, smp-alternatives, 4 GB / x86_64
#
%if %build_nrj_netbook
%ifarch %{ix86}
%define summary_nrj_netbook Linux Kernel for netbook use with i686 & 4GB RAM
%define info_nrj_netbook This kernel is compiled for netbook use, single or \
multiple i686 processor(s)/core(s) and less than 4GB RAM, using HZ_250, \
full preempt, rcu boost, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%else
%define summary_nrj_netbook Linux Kernel for netbook use with %{_arch}
%define info_nrj_netbook This kernel is compiled for netbook use, single or \
multiple %{_arch} processor(s)/core(s), using HZ_250, \
full preempt, rcu boost, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%endif
%mkflavour nrj-netbook
%endif
#
%ifarch %{ix86}
#
# kernel-nrj-desktop-pae: nrj, i686, smp-alternatives, 64GB
#
%if %build_nrj_desktop_pae
%define summary_nrj_desktop_pae Linux kernel for desktop use with i686 & upto 64GB RAM
%define info_nrj_desktop_pae This kernel is compiled for desktop use, single or \
multiple i686 processor(s)/core(s) and up to 64GB RAM using PAE, using HZ_1000, \
full preempt, rcu boost, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%mkflavour nrj-desktop-pae
%endif
%endif
#
%ifarch %{ix86}
#
# kernel-nrj-realtime-pae: nrj, i686, smp-alternatives, 64GB
#
%if %build_nrj_realtime_pae
%define summary_nrj_realtime_pae Linux kernel for low latency use with i686 & upto 64GB RAM
%define info_nrj_realtime_pae This kernel is compiled for low latency use, single or \
multiple i686 processor(s)/core(s) and up to 64GB RAM using PAE, using HZ_1000, \
full preempt, rcu boost, CFS cpu scheduler and new BFQ I/O scheduler, PERFORMANCE governor.
%mkflavour nrj-realtime-pae
%endif
%endif
#
%ifarch %{ix86}
#
# kernel-nrj-laptop-pae: nrj, i686, smp-alternatives, 64 GB
#
%if %build_nrj_laptop_pae
%define summary_nrj_laptop_pae Linux Kernel for for laptop use with i686 & upto 64GB RAM
%define info_nrj_laptop_pae This kernel is compiled for laptop use, single or \
multiple i686 processor(s)/core(s) and up to 64GB RAM using PAE, using HZ_300, \
full preempt, rcu boost, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%mkflavour nrj-laptop-pae
%endif
%endif
#
%ifarch %{ix86}
#
# kernel-nrj-netbook-pae: nrj, i686, smp-alternatives, 64 GB
#
%if %build_nrj_netbook_pae
%define summary_nrj_netbook_pae Linux Kernel for for netbook use with i686 & upto 64GB RAM
%define info_nrj_netbook_pae This kernel is compiled for netbook use, single or \
multiple i686 processor(s)/core(s) and up to 64GB RAM using PAE, using HZ_250, \
full preempt, rcu boost, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%mkflavour nrj-netbook-pae
%endif
%endif
#
%ifarch %{ix86}
#
# kernel-nrj-netbook-atom: nrj, for Intel Atom cpu, smp-alternatives, 4 GB
#
%if %build_nrj_netbook_atom
%define summary_nrj_netbook_atom Linux Kernel for netbook use with Intel Atom cpu, less than 4GB RAM
%define info_nrj_netbook_atom This kernel is compiled for netbook use, single or \
multiple Intel Atom cpu processor(s)/core(s) and less than 4GB RAM, using HZ_250, \
full preempt, rcu boost, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%mkflavour nrj-netbook-atom
%endif
%endif
#
%ifarch %{ix86}
#
# kernel-nrj-netbook-atom-pae: nrj, for Intel Atom cpu, smp-alternatives, 64 GB
#
%if %build_nrj_netbook_atom_pae
%define summary_nrj_netbook_atom_pae Linux Kernel for netbook use with Intel Atom cpu & upto 64GB RAM
%define info_nrj_netbook_atom_pae This kernel is compiled for netbook use, single or \
multiple Intel Atom cpu processor(s)/core(s) and up to 64GB RAM using PAE, using HZ_250, \
full preempt, rcu boost, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%mkflavour nrj-netbook-atom-pae
%endif
%endif
#
%ifarch %{ix86}
#
# kernel-nrj-desktop-core2: nrj, Intel Core 2 and newer, smp-alternatives, 4 GB
#
%if %build_nrj_desktop_core2
%define summary_nrj_desktop_core2 Linux Kernel for desktop use with i686 & 4GB RAM
%define info_nrj_desktop_core2 This kernel is compiled for desktop use, single or \
multiple Intel Core 2 and newer processor(s)/core(s) and less than 4GB RAM, using HZ_1000, \
full preempt, rcu boost, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%mkflavour nrj-desktop-core2
%endif
%endif
#
%ifarch %{ix86}
#
# kernel-nrj-desktop-core2-pae: nrj, Intel Core 2 and newer, smp-alternatives, 64 GB
#
%if %build_nrj_desktop_core2_pae
%define summary_nrj_desktop_core2_pae Linux Kernel for desktop use with i686 & upto 64GB RAM
%define info_nrj_desktop_core2_pae This kernel is compiled for desktop use, single or \
multiple Intel Core 2 and newer processor(s)/core(s) and up to 64GB RAM using PAE, using HZ_1000, \
full preempt, rcu boost, CFS cpu scheduler and BFQ i/o scheduler, ONDEMAND governor.
%mkflavour nrj-desktop-core2-pae
%endif
%endif
#
# ARM kernels
#
%ifarch %{arm}
%if %build_iop32x
%define summary_iop32x Linux Kernel for Arm machines based on Xscale IOP32X
%define info_iop32x This kernel is compiled for iop32x boxes. It will run on n2100 \
or ss4000e or sanmina boards.
%mkflavour iop32x
%endif
%if %build_kirkwood
%define summary_kirkwood Linux Kernel for Arm machines based on Kirkwood
%define info_kirkwood This kernel is compiled for kirkwood boxes. It will run on openrd boards.
%mkflavour kirkwood
%endif
%if %build_versatile
%define summary_versatile Linux Kernel for Versatile arm machines
%define info_versatile This kernel is compiled for Versatile boxes. It will run on Qemu for instance.
%mkflavour versatile
%endif
%endif
#
# kernel-source
#
%if %build_source
%package -n %{kname}-source-%{buildrel}
Version: %{fakever}
Release: %{fakerel}
Requires: glibc-devel, ncurses-devel, make, gcc, perl, diffutils
Summary: The Linux source code for %{kname}-%{buildrel}
Group: Development/Kernel
Autoreqprov: no
Provides: kernel-source = %{kverrel}
Buildarch: noarch
%description -n %{kname}-source-%{buildrel}
The %{kname}-source package contains the source code files for the Mandriva and
ROSA kernel. Theese source files are only needed if you want to build your own
custom kernel that is better tuned to your particular hardware.
If you only want the files needed to build 3rdparty (nVidia, Ati, dkms-*,...)
drivers against, install the *-devel-* rpm that is matching your kernel.
#
# kernel-source-latest: virtual rpm
#
%package -n %{kname}-source-latest
Version: %{kversion}
Release: %{rpmrel}
Summary: Virtual rpm for latest %{kname}-source
Group: Development/Kernel
Requires: %{kname}-source-%{buildrel}
Buildarch: noarch
%description -n %{kname}-source-latest
This package is a virtual rpm that aims to make sure you always have the
latest %{kname}-source installed...
%endif
#
# kernel-doc: documentation for the Linux kernel
#
%if %build_doc
%package -n %{kname}-doc
Version: %{kversion}
Release: %{rpmrel}
Summary: Various documentation bits found in the %{kname} source
Group: Documentation
Buildarch: noarch
%description -n %{kname}-doc
This package contains documentation files from the %{kname} source.
Various bits of information about the Linux kernel and the device drivers
shipped with it are documented in these files. You also might want install
this package if you need a reference to the options that can be passed to
Linux kernel modules at load time.
%endif
#
# kernel/tools
#
%if %{build_perf}
%package -n perf
Version: %{kversion}
Release: %{rpmrel}
Summary: perf tool and the supporting documentation
Group: System/Kernel and hardware
%description -n perf
the perf tool and the supporting documentation.
%endif
%if %{build_cpupower}
%package -n cpupower
Version: %{kversion}
Release: %{rpmrel}
Summary: The cpupower tools
Group: System/Kernel and hardware
Requires(post): rpm-helper >= 0.24.0-3
Requires(preun): rpm-helper >= 0.24.0-3
Obsoletes: cpufreq cpufrequtils
%description -n cpupower
The cpupower tools.
%post -n cpupower
AVAIL_FILE=/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
CFG_FILE=%{_sysconfdir}/sysconfig/cpupower
if ! [ -e "${AVAIL_FILE}" ]; then
echo "Warning: CPU frequency scaling is not supported."
sed -i 's/@GOVERNOR@/<not_supported>/g' "${CFG_FILE}"
exit 0
fi
# Set "ondemand" or "powersave" by default. Do not enable cpupower.service
# if neither are supported.
if grep "ondemand" "${AVAIL_FILE}" >/dev/null 2>&1; then
echo "Info: setting 'ondemand' governor as the default."
sed -i 's/@GOVERNOR@/ondemand/g' "${CFG_FILE}"
elif grep "powersave" "${AVAIL_FILE}" >/dev/null 2>&1; then
echo "Info: setting 'powersave' governor as the default."
sed -i 's/@GOVERNOR@/powersave/g' "${CFG_FILE}"
else
echo -n "Warning: not setting the default governor. Available governors:"
cat "${AVAIL_FILE}"
echo
sed -i 's/@GOVERNOR@/<not_supported>/g' "${CFG_FILE}"
exit 0
fi
if [ $1 -ge 0 ]; then
/bin/systemctl enable cpupower >/dev/null 2>&1 || :
/bin/systemctl start cpupower >/dev/null 2>&1 || :
fi
%preun -n cpupower
if [ $1 -eq 0 ]; then
/bin/systemctl --no-reload disable cpupower > /dev/null 2>&1 || :
/bin/systemctl stop cpupower > /dev/null 2>&1 || :
fi
%package -n cpupower-devel
Version: %{kversion}
Release: %{rpmrel}
Summary: Development files for cpupower
Group: Development/Kernel
Requires: cpupower = %{kversion}-%{rpmrel}
Conflicts: %{_lib}cpufreq-devel
%description -n cpupower-devel
This package contains the development files for cpupower.
%endif
%package headers
Version: %kversion
Release: %rpmrel
Summary: Linux kernel header files mostly used by your C library
Group: System/Kernel and hardware
Epoch: 1
%rename linux-userspace-headers
%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
%_includedir/*
# Don't conflict with cpupower-devel
%if %{build_cpupower}
%exclude %_includedir/cpufreq.h
%endif
#
# End packages - here begins build stage
#
%prep
%setup -q -n %top_dir_name -c
%setup -q -n %top_dir_name -D -T -a100
%define patches_dir ../kernel-patches-and-configs/
cd %src_dir
%if %sublevel
%if %kpatch
%if %prev_sublevel
%patch1 -p1
%endif
%patch2 -p1
%else
%patch1 -p1
%endif
%else
%if %kpatch
%patch1 -p1
%endif
%endif
%if %kgit
%patch2 -p1
%endif
%{patches_dir}/scripts/apply_patches
%{patches_dir}/scripts/apply_patches-NRJ
# %{patches_dir}/scripts/apply_patches-NRJ-only
%{patches_dir}/scripts/apply_patches-geek
%{patches_dir}/scripts/apply_patches-latest
# %{patches_dir}/scripts/apply_patches-QL
# PATCH END
#
# Setup Begin
#
# Prepare all the variables for calling create_configs
%if %build_debug
%define debug --debug
%else
%define debug --no-debug
%endif
#%{patches_dir}/scripts/create_configs %debug --user_cpu="%{target_arch}"
%{patches_dir}/scripts/create_configs-withBFQ %debug --user_cpu="%{target_arch}"
# make sure the kernel has the sublevel we know it has...
LC_ALL=C perl -p -i -e "s/^SUBLEVEL.*/SUBLEVEL = %{sublevel}/" Makefile
# get rid of unwanted files
find . -name '*~' -o -name '*.orig' -o -name '*.append' | %kxargs rm -f
%build
# Common target directories
%define _kerneldir /usr/src/linux-%{kversion}-%{buildrpmrel}
%define _bootdir /boot
%define _modulesdir /lib/modules
%define _efidir %{_bootdir}/efi/mandriva
# Directories definition needed for building
%define temp_root %{build_dir}/temp-root
%define temp_source %{temp_root}%{_kerneldir}
%define temp_boot %{temp_root}%{_bootdir}
%define temp_modules %{temp_root}%{_modulesdir}
PrepareKernel() {
name=$1
extension=$2
%ifarch %{ix86} x86_64
config_dir=arch/x86/configs
%endif
%ifarch %arm
config_dir=arch/arm/configs
%endif
%ifarch aarc64
config_dir=arch/arm64/configs
%endif
echo "Make config for kernel $extension"
%smake -s mrproper
if [ "%{target_arch}" == "i386" -o "%{target_arch}" == "x86_64" ]; then
if [ -z "$name" ]; then
cp ${config_dir}/%{target_arch}_defconfig-desktop .config
else
cp ${config_dir}/%{target_arch}_defconfig-$name .config
fi
else
if [ -z "$name" ]; then
cp arch/%{target_arch}/defconfig-desktop .config
else
cp arch/%{target_arch}/defconfig-$name .config
fi
fi
# make sure EXTRAVERSION says what we want it to say
LC_ALL=C perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -$extension/" Makefile
%smake oldconfig
}
BuildKernel() {
KernelVer=$1
echo "Building kernel $KernelVer"
%kmake -s all
# kirkwood boxes have u-boot
if [ "$KernelVer" = "%{kversion}-kirkwood-%{buildrpmrel}" ]; then
%kmake uImage
fi
# Start installing stuff
install -d %{temp_boot}
install -m 644 System.map %{temp_boot}/System.map-$KernelVer
install -m 644 .config %{temp_boot}/config-$KernelVer
xz -c Module.symvers > %{temp_boot}/symvers-$KernelVer.xz
%ifarch %{arm}
if [ -f arch/arm/boot/uImage ]; then
cp -f arch/arm/boot/uImage %{temp_boot}/uImage-$KernelVer
else
cp -f arch/arm/boot/zImage %{temp_boot}/vmlinuz-$KernelVer
fi
%else
cp -f arch/%{target_arch}/boot/bzImage %{temp_boot}/vmlinuz-$KernelVer
%endif
# modules
install -d %{temp_modules}/$KernelVer
%smake INSTALL_MOD_PATH=%{temp_root} KERNELRELEASE=$KernelVer modules_install
# headers
%make INSTALL_HDR_PATH=%{temp_root}%_prefix KERNELRELEASE=$KernelVer headers_install
# remove /lib/firmware, we use a separate kernel-firmware
rm -rf %{temp_root}/lib/firmware
}
SaveDevel() {
devel_flavour=$1
DevelRoot=/usr/src/linux-%{kversion}-$devel_flavour-%{buildrpmrel}
TempDevelRoot=%{temp_root}$DevelRoot
mkdir -p $TempDevelRoot
for i in $(find . -name 'Makefile*'); do cp -R --parents $i $TempDevelRoot;done
for i in $(find . -name 'Kconfig*' -o -name 'Kbuild*'); do cp -R --parents $i $TempDevelRoot;done
cp -fR include $TempDevelRoot
# ln -s ../generated/uapi/linux/version.h $TempDevelRoot/include/linux/version.h
cp -fR scripts $TempDevelRoot
cp -fR kernel/bounds.c $TempDevelRoot/kernel
cp -fR tools/include $TempDevelRoot/tools/
%ifarch %{arm}
cp -fR arch/%{target_arch}/tools $TempDevelRoot/arch/%{target_arch}/
%endif
%ifarch %{ix86} x86_64
cp -fR arch/x86/kernel/asm-offsets.{c,s} $TempDevelRoot/arch/x86/kernel/
cp -fR arch/x86/kernel/asm-offsets_{32,64}.c $TempDevelRoot/arch/x86/kernel/
cp -fR arch/x86/syscalls/syscall* $TempDevelRoot/arch/x86/syscalls/
cp -fR arch/x86/include $TempDevelRoot/arch/x86/
cp -fR arch/x86/tools $TempDevelRoot/arch/x86/
%else
cp -fR arch/%{target_arch}/kernel/asm-offsets.{c,s} $TempDevelRoot/arch/%{target_arch}/kernel/
for f in $(find arch/%{target_arch} -name include); do cp -fR --parents $f $TempDevelRoot; done
%endif
cp -fR .config Module.symvers $TempDevelRoot
cp -fR 3rdparty/mkbuild.pl $TempDevelRoot/3rdparty
# Needed for truecrypt build (Danny)
cp -fR drivers/md/dm.h $TempDevelRoot/drivers/md/
# Needed for lguest
cp -fR drivers/lguest/lg.h $TempDevelRoot/drivers/lguest/
# Needed for lirc_gpio (#39004)
cp -fR drivers/media/pci/bt8xx/bttv{,p}.h $TempDevelRoot/drivers/media/pci/bt8xx/
cp -fR drivers/media/pci/bt8xx/bt848.h $TempDevelRoot/drivers/media/pci/bt8xx/
cp -fR drivers/media/common/btcx-risc.h $TempDevelRoot/drivers/media/common/
# Needed for external dvb tree (#41418)
cp -fR drivers/media/dvb-core/*.h $TempDevelRoot/drivers/media/dvb-core/
cp -fR drivers/media/dvb-frontends/lgdt330x.h $TempDevelRoot/drivers/media/dvb-frontends/
# add acpica header files, needed for fglrx build
cp -fR drivers/acpi/acpica/*.h $TempDevelRoot/drivers/acpi/acpica/
# aufs2 has a special file needed
cp -fR fs/aufs/magic.mk $TempDevelRoot/fs/aufs
for i in alpha arc avr32 blackfin c6x cris frv h8300 hexagon ia64 m32r m68k m68knommu metag microblaze \
mips mn10300 openrisc parisc powerpc s390 score sh sparc tile unicore32 xtensa; do
rm -rf $TempDevelRoot/arch/$i
done
%ifnarch %{arm}
rm -rf $TempDevelRoot/arch/arm*
rm -rf $TempDevelRoot/include/kvm/arm*
%endif
%ifnarch %{ix86} x86_64
rm -rf $TempDevelRoot/arch/x86
%endif
# Clean the scripts tree, and make sure everything is ok (sanity check)
# running prepare+scripts (tree was already "prepared" in build)
pushd $TempDevelRoot >/dev/null
%smake -s prepare scripts
%smake -s clean
popd >/dev/null
rm -f $TempDevelRoot/.config.old
# fix permissions
chmod -R a+rX $TempDevelRoot
# disable mrproper in -devel rpms
patch -p1 --fuzz=0 -d $TempDevelRoot -i %{SOURCE2}
kernel_devel_files=../kernel_devel_files.$devel_flavour
### Create the kernel_devel_files.*
cat > $kernel_devel_files <<EOF
%dir $DevelRoot
%dir $DevelRoot/arch
%dir $DevelRoot/include
$DevelRoot/3rdparty
$DevelRoot/Documentation
%ifarch %{arm}
$DevelRoot/arch/arm
$DevelRoot/arch/arm64
%endif
$DevelRoot/arch/um
%ifarch %{ix86} x86_64
$DevelRoot/arch/x86
%endif
$DevelRoot/block
$DevelRoot/crypto
$DevelRoot/drivers
$DevelRoot/firmware
$DevelRoot/fs
$DevelRoot/include/Kbuild
$DevelRoot/include/acpi
$DevelRoot/include/asm-generic
$DevelRoot/include/clocksource
$DevelRoot/include/config
$DevelRoot/include/crypto
$DevelRoot/include/drm
$DevelRoot/include/dt-bindings
$DevelRoot/include/generated
$DevelRoot/include/keys
$DevelRoot/include/linux
$DevelRoot/include/math-emu
$DevelRoot/include/media
$DevelRoot/include/memory
$DevelRoot/include/misc
$DevelRoot/include/net
$DevelRoot/include/pcmcia
$DevelRoot/include/ras
$DevelRoot/include/rdma
$DevelRoot/include/rxrpc
$DevelRoot/include/scsi
$DevelRoot/include/sound
$DevelRoot/include/target
$DevelRoot/include/trace
$DevelRoot/include/uapi
$DevelRoot/include/video
$DevelRoot/include/xen
$DevelRoot/init
$DevelRoot/ipc
$DevelRoot/kernel
$DevelRoot/lib
$DevelRoot/mm
$DevelRoot/net
$DevelRoot/samples
$DevelRoot/scripts
$DevelRoot/security
$DevelRoot/sound
$DevelRoot/tools
$DevelRoot/usr
$DevelRoot/virt
$DevelRoot/.config
$DevelRoot/Kbuild
$DevelRoot/Kconfig
$DevelRoot/Makefile
$DevelRoot/Module.symvers
$DevelRoot/arch/Kconfig
%doc README.kernel-sources
EOF
### Create -devel Post script on the fly
cat > $kernel_devel_files-post <<EOF
if [ -d /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel} ]; then
rm -f /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/{build,source}
ln -sf $DevelRoot /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/build
ln -sf $DevelRoot /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/source
fi
EOF
### Create -devel Preun script on the fly
cat > $kernel_devel_files-preun <<EOF
if [ -L /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/build ]; then
rm -f /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/build
fi
if [ -L /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/source ]; then
rm -f /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/source
fi
exit 0
EOF
### Create -devel Postun script on the fly
cat > $kernel_devel_files-postun <<EOF
rm -rf /usr/src/linux-%{kversion}-$devel_flavour-%{buildrpmrel} >/dev/null
EOF
}
SaveDebug() {
debug_flavour=$1
install -m 644 vmlinux \
%{temp_boot}/vmlinux-%{kversion}-$debug_flavour-%{buildrpmrel}
kernel_debug_files=../kernel_debug_files.$debug_flavour
echo "%{_bootdir}/vmlinux-%{kversion}-$debug_flavour-%{buildrpmrel}" \
>> $kernel_debug_files
find %{temp_modules}/%{kversion}-$debug_flavour-%{buildrpmrel}/kernel \
-name "*.ko" | \
%kxargs -I '{}' objcopy --only-keep-debug '{}' '{}'.debug
find %{temp_modules}/%{kversion}-$debug_flavour-%{buildrpmrel}/kernel \
-name "*.ko" | %kxargs -I '{}' \
sh -c 'cd `dirname {}`; \
objcopy --add-gnu-debuglink=`basename {}`.debug \
--strip-debug `basename {}`'
pushd %{temp_modules}
find %{kversion}-$debug_flavour-%{buildrpmrel}/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.$debug_flavour
rm -f %{temp_modules}/debug_module_list
}
CreateFiles() {
kernel_flavour=$1
kernel_files=../kernel_files.$kernel_flavour
ker="vmlinuz"
if [ "$kernel_flavour" = "kirkwood" ]; then
ker="uImage"
fi
### Create the kernel_files.*
cat > $kernel_files <<EOF
%{_bootdir}/System.map-%{kversion}-$kernel_flavour-%{buildrpmrel}
%{_bootdir}/symvers-%{kversion}-$kernel_flavour-%{buildrpmrel}.xz
%{_bootdir}/config-%{kversion}-$kernel_flavour-%{buildrpmrel}
%{_bootdir}/$ker-%{kversion}-$kernel_flavour-%{buildrpmrel}
%dir %{_modulesdir}/%{kversion}-$kernel_flavour-%{buildrpmrel}/
%{_modulesdir}/%{kversion}-$kernel_flavour-%{buildrpmrel}/kernel
%{_modulesdir}/%{kversion}-$kernel_flavour-%{buildrpmrel}/modules.*
%doc README.kernel-sources
EOF
%if %build_debug
cat ../kernel_exclude_debug_files.$kernel_flavour >> $kernel_files
%endif
### Create kernel Post script
cat > $kernel_files-post <<EOF
%ifarch %{arm}
/sbin/installkernel -i -N %{kversion}-$kernel_flavour-%{buildrpmrel}
%else
/sbin/installkernel %{kversion}-$kernel_flavour-%{buildrpmrel}
pushd /boot > /dev/null
if [ -L vmlinuz-$kernel_flavour ]; then
rm -f vmlinuz-$kernel_flavour
fi
ln -sf vmlinuz-%{kversion}-$kernel_flavour-%{buildrpmrel} vmlinuz-$kernel_flavour
if [ -L initrd-$kernel_flavour.img ]; then
rm -f initrd-$kernel_flavour.img
fi
ln -sf initrd-%{kversion}-$kernel_flavour-%{buildrpmrel}.img initrd-$kernel_flavour.img
popd > /dev/null
%endif
%if %build_devel
# create kernel-devel symlinks if matching -devel- rpm is installed
if [ -d /usr/src/linux-%{kversion}-$kernel_flavour-%{buildrpmrel} ]; then
rm -f /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/{build,source}
ln -sf /usr/src/linux-%{kversion}-$kernel_flavour-%{buildrpmrel} /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/build
ln -sf /usr/src/linux-%{kversion}-$kernel_flavour-%{buildrpmrel} /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/source
fi
%endif
EOF
### Create kernel Posttrans script
cat > $kernel_files-posttrans <<EOF
if [ -x /usr/sbin/dkms_autoinstaller -a -d /usr/src/linux-%{kversion}-$kernel_flavour-%{buildrpmrel} ]; then
/usr/sbin/dkms_autoinstaller start %{kversion}-$kernel_flavour-%{buildrpmrel}
fi
EOF
### Create kernel Preun script on the fly
cat > $kernel_files-preun <<EOF
/sbin/installkernel -R %{kversion}-$kernel_flavour-%{buildrpmrel}
pushd /boot > /dev/null
if [ -L vmlinuz-$kernel_flavour ]; then
if [ "$(readlink vmlinuz-$kernel_flavour)" = "vmlinuz-%{kversion}-$kernel_flavour-%{buildrpmrel}" ]; then
rm -f vmlinuz-$kernel_flavour
fi
fi
if [ -L initrd-$kernel_flavour.img ]; then
if [ "$(readlink initrd-$kernel_flavour.img)" = "initrd-%{kversion}-$kernel_flavour-%{buildrpmrel}.img" ]; then
rm -f initrd-$kernel_flavour.img
fi
fi
popd > /dev/null
%if %build_devel
if [ -L /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/build ]; then
rm -f /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/build
fi
if [ -L /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/source ]; then
rm -f /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/source
fi
%endif
exit 0
EOF
### Create kernel Postun script on the fly
cat > $kernel_files-postun <<EOF
/sbin/kernel_remove_initrd %{kversion}-$kernel_flavour-%{buildrpmrel}
rm -rf /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel} >/dev/null
if [ -d /var/lib/dkms ]; then
rm -f /var/lib/dkms/*/kernel-%{kversion}-$devel_flavour-%{buildrpmrel}-%{_target_cpu} >/dev/null
rm -rf /var/lib/dkms/*/*/%{kversion}-$devel_flavour-%{buildrpmrel} >/dev/null
rm -f /var/lib/dkms-binary/*/kernel-%{kversion}-$devel_flavour-%{buildrpmrel}-%{_target_cpu} >/dev/null
rm -rf /var/lib/dkms-binary/*/*/%{kversion}-$devel_flavour-%{buildrpmrel} >/dev/null
fi
EOF
}
CreateKernel() {
flavour=$1
PrepareKernel $flavour $flavour-%{buildrpmrel}
BuildKernel %{kversion}-$flavour-%{buildrpmrel}
%if %build_devel
SaveDevel $flavour
%endif
%if %build_debug
SaveDebug $flavour
%endif
CreateFiles $flavour
}
###
# DO it...
###
# Create a simulacro of buildroot
rm -rf %{temp_root}
install -d %{temp_root}
# make sure we are in the directory
cd %src_dir
%ifarch %{ix86}
%if %build_desktop586
CreateKernel desktop586
%endif
%endif
%if %build_desktop
CreateKernel desktop
%endif
%if %build_netbook
CreateKernel netbook
%endif
%if %build_server
CreateKernel server
%endif
%ifarch %{ix86}
%if %build_desktop_pae
CreateKernel desktop-pae
%endif
%endif
%ifarch %{ix86}
%if %build_netbook_pae
CreateKernel netbook-pae
%endif
%endif
%ifarch %{ix86}
%if %build_nrj_desktop586
CreateKernel nrj-desktop586
%endif
%endif
%if %build_nrj_desktop
CreateKernel nrj-desktop
%endif
%if %build_nrj_realtime
CreateKernel nrj-realtime
%endif
%if %build_nrj_server
CreateKernel nrj-server
%endif
%if %build_nrj_laptop
CreateKernel nrj-laptop
%endif
%if %build_nrj_netbook
CreateKernel nrj-netbook
%endif
%ifarch %{ix86}
%if %build_nrj_desktop_pae
CreateKernel nrj-desktop-pae
%endif
%endif
%ifarch %{ix86}
%if %build_nrj_realtime_pae
CreateKernel nrj-realtime-pae
%endif
%endif
%ifarch %{ix86}
%if %build_nrj_laptop_pae
CreateKernel nrj-laptop-pae
%endif
%endif
%ifarch %{ix86}
%if %build_nrj_netbook_pae
CreateKernel nrj-netbook-pae
%endif
%endif
%ifarch %{ix86}
%if %build_nrj_netbook_atom
CreateKernel nrj-netbook-atom
%endif
%endif
%ifarch %{ix86}
%if %build_nrj_netbook_atom_pae
CreateKernel nrj-netbook-atom-pae
%endif
%endif
%ifarch %{ix86}
%if %build_nrj_desktop_core2
CreateKernel nrj-desktop-core2
%endif
%endif
%ifarch %{ix86}
%if %build_nrj_desktop_core2_pae
CreateKernel nrj-desktop-core2-pae
%endif
%endif
%ifarch %{arm}
%if %build_iop32x
CreateKernel iop32x
%endif
%if %build_kirkwood
CreateKernel kirkwood
%endif
%if %build_versatile
CreateKernel versatile
%endif
%endif
# set extraversion to match srpm to get nice version reported by the tools
LC_ALL=C perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{rpmrel}/" Makefile
############################################################
### Linker start3 > Check point to build for omv or rosa ###
############################################################
%if %{build_perf}
%smake -C tools/perf -s HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} all
%smake -C tools/perf -s prefix=%{_prefix} man
%endif
%if %{build_cpupower}
# make sure version-gen.sh is executable.
chmod +x tools/power/cpupower/utils/version-gen.sh
%make -C tools/power/cpupower CPUFREQ_BENCH=false
%endif
############################################################
### Linker end3 > Check point to build for omv or rosa ###
############################################################
# We don't make to repeat the depend code at the install phase
%if %build_source
%ifarch %{arm}
PrepareKernel "kirkwood" %{buildrpmrel}custom
%else
PrepareKernel "" %{buildrpmrel}custom
%endif
%smake -s mrproper
%endif
###
### install
###
%install
install -m 644 %{SOURCE4} .
cd %src_dir
# Directories definition needed for installing
%define target_source %{buildroot}%{_kerneldir}
%define target_boot %{buildroot}%{_bootdir}
%define target_modules %{buildroot}%{_modulesdir}
# We want to be able to test several times the install part
rm -rf %{buildroot}
cp -a %{temp_root} %{buildroot}
# Create directories infastructure
%if %build_source
install -d %{target_source}
tar cf - . | tar xf - -C %{target_source}
chmod -R a+rX %{target_source}
# we remove all the source files that we don't ship
# first architecture files
for i in alpha arc avr32 blackfin c6x cris frv h8300 hexagon ia64 m32r m68k m68knommu metag microblaze \
mips openrisc parisc powerpc s390 score sh sh64 sparc tile unicore32 v850 xtensa mn10300; do
rm -rf %{target_source}/arch/$i
done
%ifnarch %{arm}
rm -rf %{target_source}/include/kvm/arm*
%endif
# other misc files
rm -f %{target_source}/{.config.old,.config.cmd,.gitignore,.lst,.mailmap}
rm -f %{target_source}/{.missing-syscalls.d,arch/.gitignore,firmware/.gitignore}
rm -rf %{target_source}/.tmp_depmod/
#endif %build_source
%endif
# compressing modules
%if %{build_modxz}
find %{target_modules} -name "*.ko" | %kxargs xz -6e
%else
find %{target_modules} -name "*.ko" | %kxargs gzip -9
%endif
# We used to have a copy of PrepareKernel here
# Now, we make sure that the thing in the linux dir is what we want it to be
for i in %{target_modules}/*; do
rm -f $i/build $i/source
done
# sniff, if we compressed all the modules, we change the stamp :(
# we really need the depmod -ae here
pushd %{target_modules}
for i in *; do
/sbin/depmod -ae -b %{buildroot} -F %{target_boot}/System.map-$i $i
echo $?
done
for i in *; do
pushd $i
echo "Creating modules.description for $i"
modules=`find . -name "*.ko.[g,x]z"`
echo $modules | %kxargs /sbin/modinfo \
| perl -lne 'print "$name\t$1" if $name && /^description:\s*(.*)/; $name = $1 if m!^filename:\s*(.*)\.k?o!; $name =~ s!.*/!!' > modules.description
popd
done
popd
# need to set extraversion to match srpm again to avoid rebuild
LC_ALL=C perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{rpmrel}/" Makefile
%if %{build_perf}
# perf tool binary and supporting scripts/binaries
make -C tools/perf -s V=1 DESTDIR=%{buildroot} HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} install
# perf man pages (note: implicit rpm magic compresses them later)
make -C tools/perf -s V=1 DESTDIR=%{buildroot} HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} install-man
%endif
############################################################
### Linker start4 > Check point to build for omv or rosa ###
############################################################
%if %{build_cpupower}
make -C tools/power/cpupower DESTDIR=%{buildroot} libdir=%{_libdir} mandir=%{_mandir} CPUFREQ_BENCH=false install
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
install -m644 %{SOURCE51} %{buildroot}%{_sysconfdir}/sysconfig/cpupower
%endif
############################################################
### Linker start4 > Check point to build for omv or rosa ###
############################################################
###
### clean
###
%clean
rm -rf %{buildroot}
# We don't want to remove this, the whole reason of its existence is to be
# able to do several rpm --short-circuit -bi for testing install
# phase without repeating compilation phase
#rm -rf %{temp_root}
###
### source and doc file lists
###
%if %build_source
%files -n %{kname}-source-%{buildrel}
%dir %{_kerneldir}
%dir %{_kerneldir}/arch
%dir %{_kerneldir}/include
%{_kerneldir}/3rdparty
%{_kerneldir}/Documentation
%{_kerneldir}/arch/Kconfig
%{_kerneldir}/arch/arm
%{_kerneldir}/arch/arm64
%{_kerneldir}/arch/um
%{_kerneldir}/arch/x86
%{_kerneldir}/block
%{_kerneldir}/crypto
%{_kerneldir}/drivers
%{_kerneldir}/firmware
%{_kerneldir}/fs
%{_kerneldir}/include/Kbuild
%{_kerneldir}/include/acpi
%{_kerneldir}/include/asm-generic
%{_kerneldir}/include/clocksource
%{_kerneldir}/include/crypto
%{_kerneldir}/include/drm
%{_kerneldir}/include/dt-bindings
%{_kerneldir}/include/keys
%{_kerneldir}/include/linux
%{_kerneldir}/include/math-emu
%{_kerneldir}/include/media
%{_kerneldir}/include/memory
%{_kerneldir}/include/misc
%{_kerneldir}/include/net
%{_kerneldir}/include/pcmcia
%{_kerneldir}/include/ras
%{_kerneldir}/include/rdma
%{_kerneldir}/include/rxrpc
%{_kerneldir}/include/scsi
%{_kerneldir}/include/sound
%{_kerneldir}/include/target
%{_kerneldir}/include/trace
%{_kerneldir}/include/uapi
%{_kerneldir}/include/video
%{_kerneldir}/include/xen
%{_kerneldir}/init
%{_kerneldir}/ipc
%{_kerneldir}/kernel
%{_kerneldir}/lib
%{_kerneldir}/mm
%{_kerneldir}/net
%{_kerneldir}/virt
%{_kerneldir}/samples
%{_kerneldir}/scripts
%{_kerneldir}/security
%{_kerneldir}/sound
%{_kerneldir}/tools
%{_kerneldir}/usr
%{_kerneldir}/COPYING
%{_kerneldir}/CREDITS
%{_kerneldir}/Kbuild
%{_kerneldir}/Kconfig
%{_kerneldir}/MAINTAINERS
%{_kerneldir}/Makefile
%{_kerneldir}/README
%{_kerneldir}/REPORTING-BUGS
%doc README.kernel-sources
%files -n %{kname}-source-latest
%endif
%if %build_doc
%files -n %{kname}-doc
%doc linux-%{tar_ver}/Documentation/*
%endif
%if %{build_perf}
%files -n perf
%{_bindir}/perf
%{_bindir}/trace
%dir %{_prefix}/libexec/perf-core
%{_libdir}/libperf-gtk.so
%dir %{_libdir}/traceevent
%dir %{_libdir}/traceevent/plugins
%{_libdir}/traceevent/plugins/*
%{_prefix}/libexec/perf-core/*
%{_mandir}/man[1-8]/perf*
%{_sysconfdir}/bash_completion.d/perf
%endif
%if %{build_cpupower}
%files -n cpupower -f cpupower.lang
%{_bindir}/cpupower
%{_libdir}/libcpupower.so.0
%{_libdir}/libcpupower.so.0.0.0
%{_unitdir}/cpupower.service
%{_mandir}/man[1-8]/cpupower*
%config(noreplace) %{_sysconfdir}/sysconfig/cpupower
%files -n cpupower-devel
%{_libdir}/libcpupower.so
%{_includedir}/cpufreq.h
%endif