Compare commits

..

26 Commits

Author SHA1 Message Date
Sravan Balaji
a5736426eb PDS Kernel Configuration 2023-01-15 18:59:30 -05:00
Tk-Glitch
17d26874f0 Typo
Fixes 8fa230cc47
2023-01-15 19:10:08 +01:00
Tk-Glitch
8fa230cc47 Don't rewrite _kernel_work_folder_abs and _kernel_source_folder_abs values when they are already available 2023-01-15 18:23:38 +01:00
Tk-Glitch
5c7f413670 cfg: Add tt and bore to the cpu schedulers options comment 2023-01-14 18:17:48 +01:00
Tk-Glitch
430895448e readme: Add TT to the cpu schedulers list 2023-01-14 18:17:09 +01:00
Tk-Glitch
12f4af77d1 linux 6.1.y: misc_additions: Add revert "drm/display/dp_mst: Move all payload info into the atomic state" and netfilter: nft_payload: incorrect arithmetics when fetching VLAN header bits
From Arch's v6.1.6-arch1 - 9c911dbf75

Fixes https://github.com/Frogging-Family/linux-tkg/issues/691
2023-01-14 18:01:15 +01:00
Tk-Glitch
9f4e3a6ab4 CI: Make sure we're using strings for _kernel_work_folder and _kernel_source_folder 2023-01-14 17:50:44 +01:00
Tk-Glitch
b711bc9d4b Always nuke remnant customization.cfg
There is a small windows where the exit cleanup won't be triggered and people then think everything is broken
2023-01-14 17:50:13 +01:00
Tk-Glitch
27a63d3151 Write _kernel_work_folder_abs and _kernel_source_folder_abs to BIG_UGLY_FROGMINER 2023-01-14 17:49:08 +01:00
Tk-Glitch
129d26c332 Get rid of _srcpath 2023-01-14 17:45:58 +01:00
Tk-Glitch
a7110488dd Drop broken Void Linux explicit support. Void Linux users should use the Generic install as a replacement.
Fixes https://github.com/Frogging-Family/linux-tkg/issues/655
2023-01-14 16:26:31 +01:00
Tk-Glitch
8d7c65690a readme: Warn about the disk space requirements to build the kernel
Fixes https://github.com/Frogging-Family/linux-tkg/issues/692
2023-01-14 16:25:38 +01:00
ptr1337
2fb0ab964e README: Add BORE to alternative schedulers (#686)
Signed-off-by: Peter Jung <admin@ptr1337.dev>

Signed-off-by: Peter Jung <admin@ptr1337.dev>
2023-01-11 20:03:32 +01:00
Tk-Glitch
c146fa94b6 linux 6.1.y: Update bcachefs patch for 6.1.4 2023-01-11 18:11:04 +01:00
Tk-Glitch
3d2b09d984 Apply glitched-cfs patch to all the CFS schedulers
I'm pretty sure we used to do that. Oh, well.

Fixes https://github.com/Frogging-Family/linux-tkg/issues/687
2023-01-10 14:01:59 +01:00
Tk-Glitch
d9aa0ce0e6 CI: Use "/tmp" as work and source dir
Following 3a62d00e93
2023-01-09 17:49:11 +01:00
Tk-Glitch
3a62d00e93 Always create a subfolder for source and work directories with hardcoded names (linux-src-git and linux-kernel.git for source and work dirs respectively). If an absolute path is used, create a linux-tkg subdir to contain those. This allows using the same root path for both as well as defaulting to an empty value that mimics our previous behavior. The main motivation for this is to offer more safety as using an existing non-empty dir might result in unwanted behavior.
Fixes https://github.com/Frogging-Family/linux-tkg/issues/685
2023-01-09 17:43:24 +01:00
Tk-Glitch
3cdda62d46 makepkg: Fix not dynamically setting our source symlink, which is needed as of a38ef1643c 2023-01-09 17:26:21 +01:00
Tk-Glitch
2a3ef54e6e linux 6.1.y: misc_additions: Remove patch drm/i915: improve the catch-all evict to handle lock contention
Merged in 6.1.4
2023-01-07 20:55:02 +01:00
Adel Kara Slimane
cce2db1c9f Various fixes for the RPM target (#684)
* prepare: always patch RPM mkspec

Like this we can notice earlier if it doesn't apply any longer
Otherwise I only test RPM when issues get openned

* RPM: fix RPM mkspecp atch, thanks @W3sG for the heads up!

- Only part of the patch was applying
- Fixed also the fact that packages conflict because of
  unneeded build-id files in /usr/lib/.build-id
- Removed all the hardening flags Fedora uses by default
  "we do not do that here"

Fixes: #669 #609

* install.sh: uninstall-help: fix Fedora query for installed TKG packages

* install.sh: RPM: fix typo in variable

Used the non absolute path for the work folder x)
2023-01-07 20:51:15 +01:00
Tk-Glitch
06eb48b3e3 linux 6.1.y: Update prjc to v6.1-r1 (official release) with the pending fix for boot failure - https://gitlab.com/alfredchen/linux-prjc/-/issues/68#note_1226803051
Now we should be back on track !
2023-01-04 19:22:19 +01:00
Adel Kara Slimane
a38ef1643c Improve customization of source and work folders (#672)
* customization.cfg: add new entries for kernel paths

Two choices:
- Where to put git bare repository,
  - Will be implemented as a bare repository, the folder will have only
    compressed blobs and will be around ~400MB. Should be good to have
    even in HDDs
  - This is meant to be in a permanent storage like HDD or SSD.
    But some uses could have it on a tmpfs if the storage is very slow
    when compared to a full git (shallow) clone
- Where to have the work/build folder
  - This will be implemented through a git worktree,
    where the bare repo will be decompressed. This is best on a tmpfs folder
    but needs >=32GB for a full kernel build. Otherwise should be okay with
    modprobed-db

* customization.cfg: remove obsolete entries

the tmpfs related entries can be set with the previously added entries,
i.e. _kernel_work_folder and _kernel_source_folder

* prepare: check if obsoleted vars get set, warn if so and exit

Like this users will get notified about the change and act accordingly

* prepare: remove unused kernel subver patching code

this used to bump from kernel x.y to x.y.z

* prepare: add func to define kernel abs paths

We will use these absolute paths to refer to kernel folders (work and source)

* prepare: rewrite git fetching code

- Rename to "_setup_kernel_work_folder"
- Now we simply fetch directly the "commit hash" / "git tag"
  from the user chosen remote, no branches
- The source folder (the one that is preferably on disk) is only a bare repo
  with a small size (~400MB)
- The work folder is then (re)created / updated (as need) as a git worktree

* prepare: tkg_patcher: embed patch name into the message

Otherwise it doesn't work on the install.sh approach,
which reimplements a simple msg2 function that doesn't support %s
replacement

* PKGBUILD: use new path variable for work folder

* install.sh: use new path variable for work folder

* CI: setup source and build folder in /tmp

* prepare: update diffconfig with new kernel work folder var
2023-01-04 15:27:41 +01:00
Tk-Glitch
86578256b7 linux 5.15.y: Update fsync backport for new futex dir hierarchy
Fixes https://github.com/Frogging-Family/linux-tkg/issues/683
2023-01-04 15:25:18 +01:00
Dmitry Skvortsov
5298957d9b linux 5.15.y: Update compatibility fix for old Fsync ABI (#680)
addition to a6877bd422
2023-01-03 11:43:27 +01:00
ptr1337
8c776ecf64 Remove futex patch, it got merged into upstream 6.1.2 (#677)
Signed-off-by: Peter Jung <admin@ptr1337.dev>

Signed-off-by: Peter Jung <admin@ptr1337.dev>
2023-01-02 13:33:10 +01:00
Dmitry Skvortsov
a6877bd422 linux 5.15.y: futex_waitv fixup (#676)
following https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.86&id=fd8a10d44c11f8f53d640db6b97486045b7e0b81
2023-01-02 13:32:21 +01:00
29 changed files with 3547 additions and 1062 deletions

View File

@@ -10,6 +10,8 @@ env:
_processor_opt: "generic" _processor_opt: "generic"
PKGDEST: "/tmp/linux-tkg" PKGDEST: "/tmp/linux-tkg"
_debugdisable: "true" _debugdisable: "true"
_kernel_work_folder: "/tmp"
_kernel_source_folder: "/tmp"
# _modprobeddb: "true" # _modprobeddb: "true"
# _modprobeddb_db_path: ${{ github.workspace }}/modprobed.db # _modprobeddb_db_path: ${{ github.workspace }}/modprobed.db

View File

@@ -48,8 +48,6 @@ fi
source "$_where"/BIG_UGLY_FROGMINER source "$_where"/BIG_UGLY_FROGMINER
_srcpath="linux-src-git"
if [ -n "$_custom_pkgbase" ]; then if [ -n "$_custom_pkgbase" ]; then
pkgbase="${_custom_pkgbase}" pkgbase="${_custom_pkgbase}"
else else
@@ -81,10 +79,12 @@ export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EP
prepare() { prepare() {
rm -rf $pkgdir # Nuke the entire pkg folder so it'll get regenerated clean on next build rm -rf $pkgdir # Nuke the entire pkg folder so it'll get regenerated clean on next build
ln -s "${_where}/customization.cfg" "${srcdir}" # workaround _define_kernel_abs_paths
ln -s "${_where}/linux-src-git" "${srcdir}" # workaround, this doesn't respect tmpfs choice if [ -e "${srcdir}/customization.cfg" ]; then
msg2 "Nuking remnant customization.cfg symlink" && rm -rf "${srcdir}/customization.cfg"
cd "${srcdir}/${_srcpath}" fi
ln -s "${_where}/customization.cfg" "${srcdir}"
ln -s "${_kernel_work_folder_abs}" "${srcdir}"
source "${_where}/current_env" source "${_where}/current_env"
@@ -92,7 +92,7 @@ prepare() {
} }
build() { build() {
cd "${srcdir}/${_srcpath}" cd "$_kernel_work_folder_abs"
# Use custom compiler paths if defined # Use custom compiler paths if defined
if [ "$_compiler_name" = "-llvm" ] && [ -n "${CUSTOM_LLVM_PATH}" ]; then if [ "$_compiler_name" = "-llvm" ] && [ -n "${CUSTOM_LLVM_PATH}" ]; then
@@ -143,7 +143,8 @@ hackbase() {
fi fi
replaces=(virtualbox-guest-modules-arch wireguard-arch) replaces=(virtualbox-guest-modules-arch wireguard-arch)
cd "${srcdir}/${_srcpath}" _define_kernel_abs_paths
cd "$_kernel_work_folder_abs"
# get kernel version # get kernel version
local _kernver="$(<version)" local _kernver="$(<version)"
@@ -173,9 +174,9 @@ hackbase() {
install -Dm644 "${srcdir}"/customization-full.cfg "${pkgdir}/usr/share/doc/${pkgbase}/customization.cfg" install -Dm644 "${srcdir}"/customization-full.cfg "${pkgdir}/usr/share/doc/${pkgbase}/customization.cfg"
# workaround for missing header with winesync # workaround for missing header with winesync
if [ -e "${srcdir}/${_srcpath}/include/uapi/linux/winesync.h" ]; then if [ -e "${_kernel_work_folder_abs}/include/uapi/linux/winesync.h" ]; then
msg2 "Workaround missing winesync header" msg2 "Workaround missing winesync header"
install -Dm644 "${srcdir}/${_srcpath}"/include/uapi/linux/winesync.h "${pkgdir}/usr/include/linux/winesync.h" install -Dm644 "${_kernel_work_folder_abs}"/include/uapi/linux/winesync.h "${pkgdir}/usr/include/linux/winesync.h"
fi fi
# load winesync module at boot # load winesync module at boot
@@ -202,7 +203,9 @@ hackheaders() {
;; ;;
esac esac
cd "${srcdir}/${_srcpath}" _define_kernel_abs_paths
cd "$_kernel_work_folder_abs"
local builddir="${pkgdir}/usr/lib/modules/$(<version)/build" local builddir="${pkgdir}/usr/lib/modules/$(<version)/build"
msg2 "Installing build files..." msg2 "Installing build files..."

View File

@@ -7,6 +7,7 @@ This repository provides scripts to automatically download, patch and compile th
- **Non-pacman distros support can be considered experimental. You're invited to report issues you might encounter with it.** - **Non-pacman distros support can be considered experimental. You're invited to report issues you might encounter with it.**
- **If your distro isn't using systemd, please set _configfile="running-kernel" in customization.cfg or you might end up with a non-bootable kernel** - **If your distro isn't using systemd, please set _configfile="running-kernel" in customization.cfg or you might end up with a non-bootable kernel**
- Keep in mind building recent linux kernels with GCC will require ~20-25GB of disk space. Using llvm/clang, LTO, ccache and/or enabling more drivers in the defconfig will push that requirement higher, so make sure you have enough free space on the volume you're using to build.
- In `intel_pstate` driver, frequency scaling aggressiveness has been changed with kernel 5.5 which results in stutters and poor performance in low/medium load scenarios (for higher power savings). As a workaround for our gaming needs, we are setting it to passive mode to make use of the `acpi_cpufreq` governor passthrough, keeping full support for turbo frequencies. It's combined with our aggressive ondemand governor by default for good performance on most CPUs while keeping frequency scaling for power savings. In a typical low/medium load scenario (Core i7 9700k, playing Mario Galaxy on Dolphin emulator) intel_pstate in performance mode gives a stuttery 45-50 fps experience, while passive mode + aggressive ondemand offers a locked 60 fps. - In `intel_pstate` driver, frequency scaling aggressiveness has been changed with kernel 5.5 which results in stutters and poor performance in low/medium load scenarios (for higher power savings). As a workaround for our gaming needs, we are setting it to passive mode to make use of the `acpi_cpufreq` governor passthrough, keeping full support for turbo frequencies. It's combined with our aggressive ondemand governor by default for good performance on most CPUs while keeping frequency scaling for power savings. In a typical low/medium load scenario (Core i7 9700k, playing Mario Galaxy on Dolphin emulator) intel_pstate in performance mode gives a stuttery 45-50 fps experience, while passive mode + aggressive ondemand offers a locked 60 fps.
- Nvidia's proprietary drivers might need to be patched if they don't support your chosen kernel OOTB: [Frogging-Family nvidia-all](https://github.com/Frogging-Family/nvidia-all) can do that automatically for you. - Nvidia's proprietary drivers might need to be patched if they don't support your chosen kernel OOTB: [Frogging-Family nvidia-all](https://github.com/Frogging-Family/nvidia-all) can do that automatically for you.
- Note regarding kernels older than 5.9 on Arch Linux: since the switch to `zstd` compressed `initramfs` by default, you will face an `invalid magic at start of compress` error by default. You can workaround the issue by editing `/etc/mkinitcpio.conf` to uncomment the `COMPRESSION="lz4"` (for example, since that's the best option after zstd) line and regenerating `initramfs` for all kernels with `sudo mkinitpcio -P` - Note regarding kernels older than 5.9 on Arch Linux: since the switch to `zstd` compressed `initramfs` by default, you will face an `invalid magic at start of compress` error by default. You can workaround the issue by editing `/etc/mkinitcpio.conf` to uncomment the `COMPRESSION="lz4"` (for example, since that's the best option after zstd) line and regenerating `initramfs` for all kernels with `sudo mkinitpcio -P`
@@ -19,8 +20,10 @@ This repository provides scripts to automatically download, patch and compile th
Alternative schedulers are available to you in linux-tkg: Alternative schedulers are available to you in linux-tkg:
- Project C / PDS & BMQ by Alfred Chen: [blog](http://cchalpha.blogspot.com/ ), [code repository](https://gitlab.com/alfredchen/projectc) - Project C / PDS & BMQ by Alfred Chen: [blog](http://cchalpha.blogspot.com/ ), [code repository](https://gitlab.com/alfredchen/projectc)
- MuQSS by Con Kolivas : [blog](http://ck-hack.blogspot.com/), [code repository](https://github.com/ckolivas/linux) - MuQSS by Con Kolivas : [blog](http://ck-hack.blogspot.com/), [code repository](https://github.com/ckolivas/linux)
- CacULE by Hamad Marri: [code repository](https://github.com/hamadmarri/cacule-cpu-scheduler) - CacULE by Hamad Marri - CFS based : [code repository](https://github.com/hamadmarri/cacule-cpu-scheduler)
- Undead PDS: TkG's port of the pre-Project C "PDS-mq" scheduler by Alfred Chen. While PDS-mq got dropped with kernel 5.1 in favor of its BMQ evolution/rework, it wasn't on par with PDS-mq in gaming. "U" PDS still performs better in some cases than other schedulers, so it's been kept undead. - Task Type (TT) by Hamad Marri - CFS based : [code repository](https://github.com/hamadmarri/TT-CPU-Scheduler)
- BORE (Burst-Oriented Response Enhancer) by Masahito Suzuki - CFS based : [code repository](https://github.com/firelzrd/bore-scheduler)
- Undead PDS : TkG's port of the pre-Project C "PDS-mq" scheduler by Alfred Chen. While PDS-mq got dropped with kernel 5.1 in favor of its BMQ evolution/rework, it wasn't on par with PDS-mq in gaming. "U" PDS still performed better in some cases than other schedulers, so it's been kept undead for a while.
These alternative schedulers can offer a better performance/latency ratio for gaming and desktop use. The availability of each scheduler depends on the chosen Kernel version: the script will display what's available on a per-version basis. These alternative schedulers can offer a better performance/latency ratio for gaming and desktop use. The availability of each scheduler depends on the chosen Kernel version: the script will display what's available on a per-version basis.
#### Default tweaks #### Default tweaks
@@ -119,17 +122,6 @@ cd path/to/linux-tkg
``` ```
The script will use a slightly modified Arch config from the `linux-tkg-config` folder, it can be changed through the `_configfile` variable in `customization.cfg`. The script will use a slightly modified Arch config from the `linux-tkg-config` folder, it can be changed through the `_configfile` variable in `customization.cfg`.
#### Void Linux
```shell
git clone -b tkg https://github.com/Hyper-KVM/void-packages/
cd void-packages
./xbps-src binary-bootstrap
# Optional: edit customization.cfg located in srcpkgs/linux-tkg/files
# Optional: add custom userpatches with the ".mypatch" extension to srcpkgs/linux-tkg/files/mypatches
./xbps-src pkg -j$(nproc) linux-tkg
```
If you have to restart the build for any reason, run `./xbps-src clean linux-tkg` first.
#### Generic install #### Generic install
The interactive `install.sh` script can be used to perform a "Generic" install by choosing `Generic` when prompted. It git clones the kernel tree in the `linux-src-git` folder, patches the code and edits a `.config` file in it. The commands to do are the following: The interactive `install.sh` script can be used to perform a "Generic" install by choosing `Generic` when prompted. It git clones the kernel tree in the `linux-src-git` folder, patches the code and edits a `.config` file in it. The commands to do are the following:
```shell ```shell

View File

@@ -1,6 +1,6 @@
# linux-TkG config file # linux-TkG config file
# Linux distribution you are using, options are "Arch", "Void", "Ubuntu", "Debian", "Fedora", "Suse", "Gentoo", "Generic". # Linux distribution you are using, options are "Arch", "Ubuntu", "Debian", "Fedora", "Suse", "Gentoo", "Generic".
# It is automatically set to "Arch" when using PKGBUILD. # It is automatically set to "Arch" when using PKGBUILD.
# If left empty, the script will prompt # If left empty, the script will prompt
_distro="Arch" _distro="Arch"
@@ -23,6 +23,20 @@ _NUKR="true"
# Git mirror to use to get the kernel sources, possible values are "kernel.org", "googlesource.com", "github.com" and "torvalds" # Git mirror to use to get the kernel sources, possible values are "kernel.org", "googlesource.com", "github.com" and "torvalds"
_git_mirror="kernel.org" _git_mirror="kernel.org"
# Root folder where to checkout the kernel sources (linux-src-git subdir) and build
# Note: - Leave empty to use PKGBUILD's dir
# - Start with a '/' for an absolute path in which `linux-tkg/linux-src-git/` will be created
# - This setting can be used to set the work/build folder to a tmpfs folder
# - Requires >= 32GB ram when building a full kernel, should work with less ram with modprobed-db
_kernel_work_folder=""
# Permanent root folder where to keep the git clone (linux-kernel.git subdir) and fetch new blobs
# Note: - Leave empty to use PKGBUILD's dir
# - Start with a '/' for an absolute path in which `linux-tkg/linux-kernel.git/` will be created
# - If your internet is faster than your storage, it may be wise to put this folder
# in a tmpfs location (although it will reclone after each restart / tmpfs folder cleanup)
_kernel_source_folder=""
# Custom compiler root dirs - Leave empty to use system compilers # Custom compiler root dirs - Leave empty to use system compilers
# Example: CUSTOM_GCC_PATH="/home/frog/PKGBUILDS/mostlyportable-gcc/gcc-mostlyportable-9.2.0" # Example: CUSTOM_GCC_PATH="/home/frog/PKGBUILDS/mostlyportable-gcc/gcc-mostlyportable-9.2.0"
CUSTOM_GCC_PATH="" CUSTOM_GCC_PATH=""
@@ -54,17 +68,6 @@ _diffconfig="false"
# Set to the file name where the generated config fragment should be written to. Only used if _diffconfig is active. # Set to the file name where the generated config fragment should be written to. Only used if _diffconfig is active.
_diffconfig_name="" _diffconfig_name=""
# [install.sh specific] Use tmpfs as a work directory, recommended when RAM >= 32GB to reduce HDD/SSD usage. For more information, see https://wiki.archlinux.org/title/Tmpfs
_use_tmpfs="false"
# Always make a fresh clone of the source in tmpfs to speed up compilation times
# ! This will take ~20GB of RAM by itself, so don't use on <32GB RAM systems !
_source_in_tmpfs="false"
# [install.sh specific] tmpfs folder path, only used when _use_tmpfs="true".
# Creates a linux-tkg work folder within that pathmake sure to have nothing important in "$_tmpfs_path/linux-tkg"
_tmpfs_path="/tmp"
# [install.sh: Generic and Gentoo specific] Dracut options when generating initramfs # [install.sh: Generic and Gentoo specific] Dracut options when generating initramfs
_dracut_options="--lz4" _dracut_options="--lz4"
@@ -93,7 +96,7 @@ _STRIP="true"
# LEAVE AN EMPTY VALUE TO BE PROMPTED ABOUT FOLLOWING OPTIONS AT BUILD TIME # LEAVE AN EMPTY VALUE TO BE PROMPTED ABOUT FOLLOWING OPTIONS AT BUILD TIME
# CPU scheduler - Options are "upds" (TkG's Undead PDS), "pds", "bmq", "muqss", "cacule" or "cfs" (kernel's default) # CPU scheduler - Options are "upds" (TkG's Undead PDS), "pds", "bmq", "muqss", "cacule", "tt", "bore" or "cfs" (kernel's default)
_cpusched="pds" _cpusched="pds"
# Compiler to use - Options are "gcc" or "llvm". # Compiler to use - Options are "gcc" or "llvm".

View File

@@ -83,7 +83,7 @@ _install_dependencies() {
if [ "$1" != "install" ] && [ "$1" != "config" ] && [ "$1" != "uninstall-help" ]; then if [ "$1" != "install" ] && [ "$1" != "config" ] && [ "$1" != "uninstall-help" ]; then
msg2 "Argument not recognised, options are: msg2 "Argument not recognised, options are:
- config : interactive script that shallow clones the linux 5.x.y git tree into the folder linux-src-git, then applies extra patches and prepares the .config file - config : interactive script that shallow clones the linux 5.x.y git tree into the folder \$_kernel_work_folder, then applies extra patches and prepares the .config file
by copying the one from the currently running linux system and updates it. by copying the one from the currently running linux system and updates it.
- install : does the config step, proceeds to compile, then prompts to install - install : does the config step, proceeds to compile, then prompts to install
- 'DEB' distros: it creates .deb packages that will be installed then stored in the DEBS folder. - 'DEB' distros: it creates .deb packages that will be installed then stored in the DEBS folder.
@@ -136,24 +136,9 @@ if [ "$1" = "install" ] || [ "$1" = "config" ]; then
_distro="" _distro=""
fi fi
# cd into the linux-src folder is important before calling _tkg_srcprep
cd "$_where/linux-src-git"
_tkg_srcprep _tkg_srcprep
_build_dir="$_where" _build_dir="$_kernel_work_folder_abs/.."
if [ "$_use_tmpfs" = "true" ]; then
if [ -d "$_tmpfs_path/linux-tkg" ]; then
msg2 "Nuking linux-tkg tmpfs folder $_tmpfs_path/linux-tkg"
rm -rf "$_tmpfs_path/linux-tkg"
fi
mkdir "$_tmpfs_path/linux-tkg"
cp -r "$_where/linux-src-git" "$_tmpfs_path/linux-tkg/linux-src-git"
# cd into the linux-src folder is important before calling _tkg_srcprep
_build_dir="$_tmpfs_path/linux-tkg"
cd "$_tmpfs_path/linux-tkg/linux-src-git"
fi
# Uppercase characters are not allowed in source package name for debian based distros # Uppercase characters are not allowed in source package name for debian based distros
if [[ "$_distro" =~ ^(Debian|Ubuntu)$ && "$_cpusched" = "MuQSS" ]]; then if [[ "$_distro" =~ ^(Debian|Ubuntu)$ && "$_cpusched" = "MuQSS" ]]; then
@@ -221,6 +206,8 @@ if [ "$1" = "install" ]; then
#_runtime=$( time ( schedtool -B -n 1 -e ionice -n 1 "$@" 2>&1 ) 3>&1 1>&2 2>&3 ) || _runtime=$( time ( "$@" 2>&1 ) 3>&1 1>&2 2>&3 ) - Bash 5.2 is broken https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018727 #_runtime=$( time ( schedtool -B -n 1 -e ionice -n 1 "$@" 2>&1 ) 3>&1 1>&2 2>&3 ) || _runtime=$( time ( "$@" 2>&1 ) 3>&1 1>&2 2>&3 ) - Bash 5.2 is broken https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018727
#} #}
cd "$_kernel_work_folder_abs"
if [[ "$_distro" =~ ^(Ubuntu|Debian)$ ]]; then if [[ "$_distro" =~ ^(Ubuntu|Debian)$ ]]; then
msg2 "Building kernel DEB packages" msg2 "Building kernel DEB packages"
@@ -262,10 +249,7 @@ if [ "$1" = "install" ]; then
_extra_ver_str="_${_kernel_flavor}" _extra_ver_str="_${_kernel_flavor}"
fi fi
_fedora_work_dir="${HOME}/.cache/linux-tkg-rpmbuild" _fedora_work_dir="$_kernel_work_folder_abs/linux-tkg-rpmbuild"
if [ "$_use_tmpfs" = "true" ]; then
_fedora_work_dir="$_tmpfs_path/linux-tkg/linux-tkg-rpmbuild"
fi
msg2 "Building kernel RPM packages" msg2 "Building kernel RPM packages"
RPMOPTS="--define '_topdir ${_fedora_work_dir}'" make ${llvm_opt} -j ${_thread_num} rpm-pkg EXTRAVERSION="${_extra_ver_str}" RPMOPTS="--define '_topdir ${_fedora_work_dir}'" make ${llvm_opt} -j ${_thread_num} rpm-pkg EXTRAVERSION="${_extra_ver_str}"
@@ -432,7 +416,7 @@ if [ "$1" = "uninstall-help" ]; then
msg2 "Note: linux-libc-dev packages are no longer created and installed, you can safely remove any remnants." msg2 "Note: linux-libc-dev packages are no longer created and installed, you can safely remove any remnants."
elif [ "$_distro" = "Fedora" ]; then elif [ "$_distro" = "Fedora" ]; then
msg2 "List of installed custom tkg kernels: " msg2 "List of installed custom tkg kernels: "
dnf list --installed kernel* dnf list --installed | grep -i "tkg"
msg2 "To uninstall a version, you should remove the kernel, kernel-headers and kernel-devel associated to it (if installed), with: " msg2 "To uninstall a version, you should remove the kernel, kernel-headers and kernel-devel associated to it (if installed), with: "
msg2 " sudo dnf remove --noautoremove kernel-VERSION kernel-devel-VERSION kernel-headers-VERSION" msg2 " sudo dnf remove --noautoremove kernel-VERSION kernel-devel-VERSION kernel-headers-VERSION"
msg2 " where VERSION is displayed in the second column" msg2 " where VERSION is displayed in the second column"

View File

@@ -283,7 +283,6 @@ _set_cpu_scheduler() {
_avail_cpu_scheds=("cfs" "pds" "bmq" "tt" "bore") _avail_cpu_scheds=("cfs" "pds" "bmq" "tt" "bore")
elif [ "$_kver" = "601" ]; then elif [ "$_kver" = "601" ]; then
_avail_cpu_scheds=("cfs" "pds" "bmq" "tt" "bore") _avail_cpu_scheds=("cfs" "pds" "bmq" "tt" "bore")
_projectc_unoff=1
elif [ "$_kver" = "602" ]; then elif [ "$_kver" = "602" ]; then
_avail_cpu_scheds=("cfs" "tt" "bore") _avail_cpu_scheds=("cfs" "tt" "bore")
else else
@@ -382,8 +381,31 @@ _set_compiler(){
echo -e "_compiler_name='$_compiler_name'\nllvm_opt='$llvm_opt'" >> "$_where"/BIG_UGLY_FROGMINER echo -e "_compiler_name='$_compiler_name'\nllvm_opt='$llvm_opt'" >> "$_where"/BIG_UGLY_FROGMINER
} }
_define_kernel_abs_paths() {
_linux_git_branch_checkout() { source "$_where"/BIG_UGLY_FROGMINER
if [ -z "$_kernel_work_folder_abs" ]; then
_kernel_work_folder_abs="$_where/$_kernel_work_folder/linux-src-git"
if [[ "$_kernel_work_folder" == /* ]]; then
_kernel_work_folder_abs="$_kernel_work_folder/linux-tkg/linux-src-git"
fi
echo -e "_kernel_work_folder_abs=\"$_kernel_work_folder_abs\"" >> "$_where"/BIG_UGLY_FROGMINER
fi
if [ -z "$_kernel_source_folder_abs" ]; then
_kernel_source_folder_abs="$_where/$_kernel_source_folder/linux-kernel.git"
if [[ "$_kernel_source_folder" == /* ]]; then
_kernel_source_folder_abs="$_kernel_source_folder/linux-tkg/linux-kernel.git"
fi
echo -e "_kernel_source_folder_abs=\"$_kernel_source_folder_abs\"" >> "$_where"/BIG_UGLY_FROGMINER
fi
}
_setup_kernel_work_folder() {
_define_kernel_abs_paths
if [ -z "$_kernel_git_tag" ]; then if [ -z "$_kernel_git_tag" ]; then
warning "internal error: kernel version should be chosen before cloning kernel sources" warning "internal error: kernel version should be chosen before cloning kernel sources"
@@ -392,85 +414,44 @@ _linux_git_branch_checkout() {
cd "$_where" cd "$_where"
if ! [ -d linux-src-git ] || ( [ "$_source_in_tmpfs" = "true" ] && ! [ -d /tmp/linux-src-git ] ); then if ! [ -d "$_kernel_source_folder_abs" ]; then
msg2 "First initialization of the linux source code git folder" msg2 "First initialization of the linux source code git folder"
if [ "$_source_in_tmpfs" = "true" ]; then mkdir -p "$_kernel_source_folder_abs"
rm -rf "${_where}/linux-src-git" cd "$_kernel_source_folder_abs"
mkdir "/tmp/linux-src-git" git init --bare
ln -s "/tmp/linux-src-git" "${_where}" fi
else
mkdir linux-src-git
fi
cd linux-src-git
git init
for remote in "${!_kernel_git_remotes[@]}"; do cd "$_kernel_source_folder_abs"
# Add remotes if needed
for remote in "${!_kernel_git_remotes[@]}"; do
if ! git remote -v | grep -w "$remote" ; then
git remote add "$remote" "${_kernel_git_remotes[$remote]}" git remote add "$remote" "${_kernel_git_remotes[$remote]}"
done
else
if [ "$_source_in_tmpfs" = "true" ]; then
rm -rf "${_where}/linux-src-git"
ln -s "/tmp/linux-src-git" "${_where}"
fi fi
done
cd linux-src-git msg2 "Fetching tag: $_kernel_git_tag from mirror $_git_mirror"
git fetch --depth 1 $_git_mirror tag "$_kernel_git_tag"
# Remove "origin" remote if present msg2 "Checking out tag: $_kernel_git_tag"
if git remote -v | grep -w "origin" ; then msg2 " in the work folder: $_kernel_work_folder_abs"
git remote rm origin
fi
for remote in "${!_kernel_git_remotes[@]}"; do # The space ' ' in grep -w "$_kernel_work_folder_abs " is important
if ! git remote -v | grep -w "$remote" ; then # to not match an existing folder with a longer name with the same prefix name
git remote add "$remote" "${_kernel_git_remotes[$remote]}" if [ -d "$_kernel_work_folder_abs" ] && \
fi ( git worktree list | grep -w "$_kernel_work_folder_abs " ) && \
done ( cd "$_kernel_work_folder_abs" && git status > /dev/null 2>&1 ); then
# Worktree folder exists and is a valid worktree
msg2 "Current branch: $(git branch | grep "\*")" cd "$_kernel_work_folder_abs"
msg2 "Reseting files to their original state" git reset --hard
git clean -ffdx
git reset --hard HEAD
git clean -f -d -x
fi
if [[ "$_sub" = rc* ]]; then
msg2 "Switching to master branch for RC Kernel"
if ! git branch --list | grep "master-${_git_mirror}" ; then
msg2 "master branch doesn't locally exist, shallow cloning..."
git remote set-branches --add kernel.org master
git remote set-branches --add googlesource.com master
git remote set-branches --add torvalds master
git fetch --depth=1 $_git_mirror master
git fetch --depth 1 $_git_mirror tag "$_kernel_git_tag"
git checkout -b master-${_git_mirror} ${_git_mirror}/master
else
msg2 "master branch exists locally, updating..."
git checkout master-${_git_mirror}
git fetch --depth 1 $_git_mirror tag "$_kernel_git_tag"
git reset --hard ${_git_mirror}/master
fi
msg2 "Checking out latest RC tag: $_kernel_git_tag"
git checkout "$_kernel_git_tag" git checkout "$_kernel_git_tag"
else else
msg2 "Switching to linux-${_basekernel}.y" # In all other cases, just force create the work tree
if ! git branch --list | grep -w "linux-${_basekernel}-${_git_mirror}" ; then rm -rf "$_kernel_work_folder_abs"
msg2 "${_basekernel}.y branch doesn't locally exist, shallow cloning..." git worktree add -f "$_kernel_work_folder_abs" "$_kernel_git_tag"
git remote set-branches --add kernel.org linux-${_basekernel}.y
git remote set-branches --add googlesource.com linux-${_basekernel}.y
git remote set-branches --add torvalds linux-${_basekernel}.y
git fetch --depth=1 $_git_mirror linux-${_basekernel}.y
git fetch --depth=1 $_git_mirror tag "$_kernel_git_tag"
git checkout -b linux-${_basekernel}-${_git_mirror} ${_git_mirror}/linux-${_basekernel}.y
else
msg2 "${_basekernel}.y branch exists locally, updating..."
git checkout linux-${_basekernel}-${_git_mirror}
git fetch --depth 1 $_git_mirror tag "$_kernel_git_tag"
git reset --hard ${_git_mirror}/linux-${_basekernel}.y
fi
msg2 "Checking out latest release: $_kernel_git_tag"
git checkout "$_kernel_git_tag"
fi fi
} }
@@ -488,6 +469,23 @@ _tkg_initscript() {
exit 1 exit 1
fi fi
typeset -Ag _deprecated_config_var_set
# Check if user is defining deprecated config vars
_deprecated_config_var_set=(
["_use_tmpfs"]=`[ -n "$_use_tmpfs" ]; echo $?`
["_source_in_tmpfs"]=`[ -n "$_source_in_tmpfs" ]; echo $?`
["_tmpfs_path"]=`[ -n "$_tmpfs_path" ]; echo $?`
)
for _deprectated_config_var in "${!_deprecated_config_var_set[@]}"; do
if [ "${_deprecated_config_var_set[$_deprectated_config_var]}" == "0" ]; then
warning "The deprecated config var $_deprectated_config_var has been set"
warning "Please check the latest customization.cfg file to see what replaces it"
exit 1
fi
done
# Default to Arch # Default to Arch
if [ -z "$_distro" ] || [ "$_ispkgbuild" = "true" ]; then if [ -z "$_distro" ] || [ "$_ispkgbuild" = "true" ]; then
msg2 "Defaulting to Archlinux target\n" msg2 "Defaulting to Archlinux target\n"
@@ -495,11 +493,7 @@ _tkg_initscript() {
fi fi
# create build dir early # create build dir early
if [ "$_distro" = "Void" ]; then _path="${_where}"
_path="${XBPS_BUILDDIR}/${wrksrc}"
else
_path="${_where}"
fi
# Clean the logs folder # Clean the logs folder
[ -e "${_where}/logs" ] && rm -rf "${_where}/logs" [ -e "${_where}/logs" ] && rm -rf "${_where}/logs"
@@ -511,13 +505,8 @@ _tkg_initscript() {
# Select CPU scheduler # Select CPU scheduler
_set_cpu_scheduler _set_cpu_scheduler
if [ "$_distro" != "Void" ]; then cp "$_where"/linux-tkg-patches/${_basekernel}/* "$_where" # copy patches inside the PKGBUILD's dir to preserve makepkg sourcing and md5sum checking
cp "$_where"/linux-tkg-patches/${_basekernel}/* "$_where" # copy patches inside the PKGBUILD's dir to preserve makepkg sourcing and md5sum checking cp "$_where"/linux-tkg-config/${_basekernel}/* "$_where" # copy config files and hooks inside the PKGBUILD's dir to preserve makepkg sourcing and md5sum checking
cp "$_where"/linux-tkg-config/${_basekernel}/* "$_where" # copy config files and hooks inside the PKGBUILD's dir to preserve makepkg sourcing and md5sum checking
else
cp "$_where"/linux-tkg-patches/${_basekernel}/* "$_path"
cp "$_where"/linux-tkg-config/${_basekernel}/* "$_path"
fi
# Set compiler # Set compiler
_set_compiler _set_compiler
@@ -526,7 +515,7 @@ _tkg_initscript() {
echo -e "_custom_pkgbase=\"$_custom_pkgbase\"" >> "$_where"/BIG_UGLY_FROGMINER echo -e "_custom_pkgbase=\"$_custom_pkgbase\"" >> "$_where"/BIG_UGLY_FROGMINER
fi fi
_linux_git_branch_checkout _setup_kernel_work_folder
} }
user_patcher() { user_patcher() {
@@ -593,12 +582,16 @@ _tkg_patcher() {
patch -Np1 -i "$tkgpatch" >> "$_where"/logs/prepare.log.txt || error "An error was encountered applying patches. It was logged to the prepare.log.txt file." patch -Np1 -i "$tkgpatch" >> "$_where"/logs/prepare.log.txt || error "An error was encountered applying patches. It was logged to the prepare.log.txt file."
echo -e "\n" >> "$_where"/logs/prepare.log.txt echo -e "\n" >> "$_where"/logs/prepare.log.txt
else else
msg2 "Skipping patch %s...\n (unavailable for this kernel version)" "${tkgpatch##*/}" #" msg2 "Skipping patch ${tkgpatch##*/}...\n (unavailable for this kernel version)"
fi fi
} }
_tkg_srcprep() { _tkg_srcprep() {
_define_kernel_abs_paths
cd "$_kernel_work_folder_abs"
msg2 "Setting version..." msg2 "Setting version..."
scripts/setlocalversion --save-scmversion scripts/setlocalversion --save-scmversion
@@ -607,13 +600,6 @@ _tkg_srcprep() {
echo -e "Version tail set to \"-$pkgrel-tkg-${_cpusched}${_compiler_name}\"\n" > "$_where"/logs/prepare.log.txt echo -e "Version tail set to \"-$pkgrel-tkg-${_cpusched}${_compiler_name}\"\n" > "$_where"/logs/prepare.log.txt
echo "" > localversion.20-pkgname echo "" > localversion.20-pkgname
fi fi
if [ "${_distro}" = "Void" ]; then
pkgver="${version}"
fi
if [ "${_distro}" = "Arch" ] || [ "${_distro}" = "Void" ]; then
tkgpatch="$srcdir/patch-${pkgver}"
_msg="Patching from $_basekernel to $pkgver" && _tkg_patcher
fi
# Hardened Patches # Hardened Patches
if [ "${_configfile}" = "config_hardened.x86_64" ] && [ "${_cpusched}" = "cfs" ]; then if [ "${_configfile}" = "config_hardened.x86_64" ] && [ "${_cpusched}" = "cfs" ]; then
@@ -629,9 +615,6 @@ _tkg_srcprep() {
# graysky's cpu opts - https://github.com/graysky2/kernel_compiler_patch # graysky's cpu opts - https://github.com/graysky2/kernel_compiler_patch
_patch_location="$srcdir" _patch_location="$srcdir"
if [ "${_distro}" = "Void" ]; then
_patch_location="${wrksrc}"
fi
if [ "$_kver" = "504" ]; then if [ "$_kver" = "504" ]; then
_patch_name="more-uarches-for-kernel-4.19-5.4" _patch_name="more-uarches-for-kernel-4.19-5.4"
@@ -697,10 +680,8 @@ _tkg_srcprep() {
_msg="Applying glitched base non-rt additions patch" && _tkg_patcher _msg="Applying glitched base non-rt additions patch" && _tkg_patcher
fi fi
if [[ "$_distro" =~ ^(Fedora|Suse)$ ]]; then tkgpatch="$srcdir/0013-fedora-rpm.patch"
tkgpatch="$srcdir/0013-fedora-rpm.patch" _msg="RPM: fixing spec generator" && _tkg_patcher
_msg="RPM: fixing spec generator" && _tkg_patcher
fi
if [ -z $_misc_adds ]; then if [ -z $_misc_adds ]; then
plain "Enable misc additions ? They may contain temporary fixes pending upstream, or some other changes that can break on non-Arch distros." plain "Enable misc additions ? They may contain temporary fixes pending upstream, or some other changes that can break on non-Arch distros."
@@ -740,6 +721,8 @@ _tkg_srcprep() {
rev=1 rev=1
elif [ "$_kver" = "518" ]; then elif [ "$_kver" = "518" ]; then
rev=2 rev=2
elif [ "$_kver" = "601" ]; then
rev=1
else else
rev=0 rev=0
fi fi
@@ -801,61 +784,38 @@ _tkg_srcprep() {
tkgpatch="$srcdir/0009-glitched-bmq.patch" && _tkg_patcher tkgpatch="$srcdir/0009-glitched-bmq.patch" && _tkg_patcher
elif [ "${_cpusched}" = "cacule" ]; then elif [ "${_cpusched}" = "cacule" ]; then
_msg="Applying cacule patch" _msg="Applying cacule patch"
if [ "${_distro}" = "Void" ]; then if [[ $_kver -lt 515 ]]; then
if [[ $_kver -lt 515 ]]; then wget -P "$srcdir" "https://raw.githubusercontent.com/hamadmarri/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch"
wget -P "$wrksrc" "https://raw.githubusercontent.com/hamadmarri/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch" elif [[ $_kver = 515 ]]; then
elif [[ $_kver = 515 ]]; then wget -P "$srcdir" "https://raw.githubusercontent.com/CachyOS/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch"
wget -P "$wrksrc" "https://raw.githubusercontent.com/CachyOS/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch"
else
wget -P "$wrksrc" "https://raw.githubusercontent.com/CachyOS/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/0001-cacULE-${_basekernel}.patch"
fi
tkgpatch="$wrksrc/cacule-${_basekernel}.patch" && _tkg_patcher
else else
if [[ $_kver -lt 515 ]]; then wget -P "$srcdir" "https://raw.githubusercontent.com/CachyOS/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/0001-cacULE-${_basekernel}.patch"
wget -P "$srcdir" "https://raw.githubusercontent.com/hamadmarri/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch"
elif [[ $_kver = 515 ]]; then
wget -P "$srcdir" "https://raw.githubusercontent.com/CachyOS/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch"
else
wget -P "$srcdir" "https://raw.githubusercontent.com/CachyOS/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/0001-cacULE-${_basekernel}.patch"
fi
tkgpatch="$srcdir/cacule-${_basekernel}.patch" && _tkg_patcher
tkgpatch="$srcdir/0001-cacULE-${_basekernel}.patch" && _tkg_patcher
fi fi
tkgpatch="$srcdir/cacule-${_basekernel}.patch" && _tkg_patcher
tkgpatch="$srcdir/0001-cacULE-${_basekernel}.patch" && _tkg_patcher
elif [ "${_cpusched}" = "tt" ]; then elif [ "${_cpusched}" = "tt" ]; then
_msg="Applying TT patch" _msg="Applying TT patch"
if [ "${_distro}" = "Void" ]; then curl "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/${_basekernel}/sched/0001-tt.patch" > "$srcdir"/tt.patch
curl "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/${_basekernel}/sched/0001-tt.patch" > "$wrksrc"/tt.patch tkgpatch="$srcdir/tt.patch" && _tkg_patcher
tkgpatch="$wrksrc/tt.patch" && _tkg_patcher
else
curl "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/${_basekernel}/sched/0001-tt.patch" > "$srcdir"/tt.patch
tkgpatch="$srcdir/tt.patch" && _tkg_patcher
fi
if [ "$_tt_high_hz" = "true" ] && [ $_kver = 515 ]; then if [ "$_tt_high_hz" = "true" ] && [ $_kver = 515 ]; then
_msg="Applying TT High HZ patch" _msg="Applying TT High HZ patch"
if [ "${_distro}" = "Void" ]; then curl "https://raw.githubusercontent.com/hamadmarri/TT-CPU-Scheduler/master/patches/${_basekernel}/high-hz.patch" > "$srcdir"/tt_high_hz.patch
curl "https://raw.githubusercontent.com/hamadmarri/TT-CPU-Scheduler/master/patches/${_basekernel}/high-hz.patch" > "$wrksrc"/tt_high_hz.patch tkgpatch="$srcdir/tt_high_hz.patch" && _tkg_patcher
tkgpatch="$wrksrc/tt_high_hz.patch" && _tkg_patcher
else
curl "https://raw.githubusercontent.com/hamadmarri/TT-CPU-Scheduler/master/patches/${_basekernel}/high-hz.patch" > "$srcdir"/tt_high_hz.patch
tkgpatch="$srcdir/tt_high_hz.patch" && _tkg_patcher
fi
fi fi
elif [ "${_cpusched}" = "bore" ]; then elif [ "${_cpusched}" = "bore" ]; then
_msg="Applying BORE patch" _msg="Applying BORE patch"
if [ "${_distro}" = "Void" ]; then curl "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/${_basekernel}/sched/0001-bore.patch" > "$srcdir"/0001-bore.patch
curl "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/${_basekernel}/sched/0001-bore.patch" > "$wrksrc"/0001-bore.patch tkgpatch="$srcdir/0001-bore.patch" && _tkg_patcher
tkgpatch="$wrksrc/0001-bore.patch" && _tkg_patcher
else
curl "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/${_basekernel}/sched/0001-bore.patch" > "$srcdir"/0001-bore.patch
tkgpatch="$srcdir/0001-bore.patch" && _tkg_patcher
fi
elif [ "${_cpusched}" = "cfs" ]; then elif [ "${_cpusched}" = "cfs" ]; then
_msg="Applying Glitched CFS patch"
tkgpatch="$srcdir/0003-glitched-cfs.patch" && _tkg_patcher
_msg="Applying Glitched CFS additions patch" _msg="Applying Glitched CFS additions patch"
tkgpatch="$srcdir/0003-glitched-cfs-additions.patch" && _tkg_patcher tkgpatch="$srcdir/0003-glitched-cfs-additions.patch" && _tkg_patcher
fi fi
if [ "${_cpusched}" = "cfs" ] || [ "${_cpusched}" = "cacule" ] || [ "${_cpusched}" = "tt" ] || [ "${_cpusched}" = "bore" ]; then
_msg="Applying Glitched CFS patch"
tkgpatch="$srcdir/0003-glitched-cfs.patch" && _tkg_patcher
fi
fi fi
if [ -z "${_configfile}" ]; then if [ -z "${_configfile}" ]; then
@@ -916,8 +876,7 @@ _tkg_srcprep() {
# ccache fix # ccache fix
if [ "$_noccache" != "true" ]; then if [ "$_noccache" != "true" ]; then
if { [ "$_distro" = "Arch" ] && pacman -Qq ccache &> /dev/null; } || { [ "$_distro" = "Ubuntu" ] && dpkg -l ccache > /dev/null; }\ if { [ "$_distro" = "Arch" ] && pacman -Qq ccache &> /dev/null; } || { [ "$_distro" = "Ubuntu" ] && dpkg -l ccache > /dev/null; }; then
|| { [ "$_distro" = "Void" ] && xbps-query -s ccache > /dev/null; } ; then
_disable "GCC_PLUGINS" _disable "GCC_PLUGINS"
fi fi
fi fi
@@ -1623,7 +1582,7 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\r
# Community patches # Community patches
if [ -n "$_community_patches" ]; then if [ -n "$_community_patches" ]; then
if [ ! -d "$_where/../community-patches" ]; then if [ ! -d "$_where/../community-patches" ]; then
cd "$_where/.." && git clone https://github.com/Frogging-Family/community-patches.git && cd "${srcdir}/${_srcpath}" cd "$_where/.." && git clone https://github.com/Frogging-Family/community-patches.git && cd "${_kernel_work_folder_abs}"
fi fi
_community_patches=($_community_patches) _community_patches=($_community_patches)
mkdir -p "$_where"/linux"$_basever"-tkg-userpatches mkdir -p "$_where"/linux"$_basever"-tkg-userpatches
@@ -1649,7 +1608,7 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\r
rm -f "$_where"/linux"$_basever"-tkg-userpatches/$_p rm -f "$_where"/linux"$_basever"-tkg-userpatches/$_p
done done
if [ "$_distro" = "Arch" ] || [ "$_distro" = "Void" ]; then if [ "$_distro" = "Arch" ]; then
# don't run depmod on 'make install'. We'll do this ourselves in packaging # don't run depmod on 'make install'. We'll do this ourselves in packaging
sed -i '2iexit 0' scripts/depmod.sh sed -i '2iexit 0' scripts/depmod.sh
@@ -1718,17 +1677,12 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\r
fi fi
fi fi
# set _menuconfig early for Void
if [ "$_distro" = "Void" ]; then
_menuconfig="Void"
fi
# rewrite configuration # rewrite configuration
msg2 "Setting config" msg2 "Setting config"
make ${_config_updating} ${llvm_opt} |& tee -a "$_where"/logs/prepare.log.txt make ${_config_updating} ${llvm_opt} |& tee -a "$_where"/logs/prepare.log.txt
# menuconfig / nconfig # menuconfig / nconfig
if [ -z "$_menunconfig" ] && [ "$_distro" != "Void" ]; then if [ -z "$_menunconfig" ]; then
plain "" plain ""
plain "*Optional* For advanced users - Do you want to use make menuconfig or nconfig" plain "*Optional* For advanced users - Do you want to use make menuconfig or nconfig"
plain "to configure the kernel before building it?" plain "to configure the kernel before building it?"
@@ -1770,16 +1724,11 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\r
fi fi
if [ -z "$_diffconfig_name" ]; then if [ -z "$_diffconfig_name" ]; then
echo 'No file name given, not generating config fragment.' echo 'No file name given, not generating config fragment.'
else ( else
if [ "$_distro" = "Arch" ] || [ "$_ispkgbuild" = "true" ]; then pushd "$_kernel_work_folder_abs"
prev_pwd="${PWD:-$(pwd)}/linux-src-git" scripts/diffconfig -m .config.orig .config > "$_where/$_diffconfig_name"
cd "$_where" || exit popd
else fi
prev_pwd="${PWD:-$(pwd)}"
cd "$_where" || exit
fi
"${prev_pwd}/scripts/diffconfig" -m "${prev_pwd}/.config.orig" "${prev_pwd}/.config" > "$_diffconfig_name"
) fi
fi fi
rm .config.orig rm .config.orig
fi fi
@@ -1809,12 +1758,6 @@ exit_cleanup() {
# Remove winesync rules file # Remove winesync rules file
rm -f "$_where"/winesync.rules rm -f "$_where"/winesync.rules
# Remove RPM temporary files left
rm -rf ${HOME}/.cache/linux-tkg-rpmbuild
if [ "$_distro" != "Arch" ] && [ "$_use_tmpfs" = "true" ]; then
rm -rf "$_tmpfs_path/linux-tkg"
fi
# Community patches removal in case of failure # Community patches removal in case of failure
for _p in ${_community_patches[@]}; do for _p in ${_community_patches[@]}; do
rm -f "$_where"/linux"$_basever"-tkg-userpatches/"$_p" rm -f "$_where"/linux"$_basever"-tkg-userpatches/"$_p"
@@ -1902,7 +1845,5 @@ exit_cleanup() {
sed -i 's/\x1b(B//g' "$_where"/logs/shell-output.log.txt sed -i 's/\x1b(B//g' "$_where"/logs/shell-output.log.txt
fi fi
} }
# Void has its own clean function, this breaks it so ignore it
if [ "$_distro" != "Void" ]; then trap exit_cleanup EXIT
trap exit_cleanup EXIT
fi

View File

@@ -1,28 +1,53 @@
# Remove the obsoletes line in kernel-headers
# Add provides for kernel-devel so there's no conflict
# and fix akmod-nvidia
diff --git a/scripts/package/mkspec b/scripts/package/mkspec diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 7c477ca7d..1158f5559 100755 index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec --- a/scripts/package/mkspec
+++ b/scripts/package/mkspec +++ b/scripts/package/mkspec
@@ -25,0 +26 @@ fi @@ -25,7 +25,7 @@ fi
+PROVIDES_DRM="" +PROVIDES_DRM=""
@@ -27 +28 @@ if grep -q CONFIG_DRM=y .config; then if grep -q CONFIG_DRM=y .config; then
- PROVIDES=kernel-drm - PROVIDES=kernel-drm
+ PROVIDES_DRM="Provides: kernel-drm = %{version}" + PROVIDES_DRM="Provides: kernel-drm = %{version}"
@@ -30 +30,0 @@ fi fi
-PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
@@ -51 +51,3 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
@@ -50,3 +50,6 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
$S Source: kernel-$__KERNELRELEASE.tar.gz
- Provides: $PROVIDES - Provides: $PROVIDES
+ $PROVIDES_DRM + $PROVIDES_DRM
+ Provides: kernel = %{version} + Provides: kernel = %{version}
+ Provides: kernel-uname-r = %{version} + Provides: kernel-uname-r = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -61 +63 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz # $UTS_MACHINE as a fallback of _arch in case
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers - Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -72,0 +75,3 @@ $S$M Group: System Environment/Kernel %description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version} +$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version} +$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version} +$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
+$S %undefine _package_note_file
+$S %undefine _auto_set_build_flags
+$S %undefine _include_frame_pointers
+$S %define _build_id_flags -Wl,--build-id=none
+$S %undefine _annotated_build
+$S %undefine _fortify_level
+$S %undefine _hardened_build
+$S %global _lto_cflags %{nil}
+$S %global _configure_gnuconfig_hack 0
+$S %global _configure_libtool_hardening_hack 0
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
+$S %define _build_id_links none
+$S
$S %prep

View File

@@ -1,28 +1,53 @@
# Remove the obsoletes line in kernel-headers
# Add provides for kernel-devel so there's no conflict
# and fix akmod-nvidia
diff --git a/scripts/package/mkspec b/scripts/package/mkspec diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 7c477ca7d..1158f5559 100755 index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec --- a/scripts/package/mkspec
+++ b/scripts/package/mkspec +++ b/scripts/package/mkspec
@@ -25,0 +26 @@ fi @@ -25,7 +25,7 @@ fi
+PROVIDES_DRM="" +PROVIDES_DRM=""
@@ -27 +28 @@ if grep -q CONFIG_DRM=y .config; then if grep -q CONFIG_DRM=y .config; then
- PROVIDES=kernel-drm - PROVIDES=kernel-drm
+ PROVIDES_DRM="Provides: kernel-drm = %{version}" + PROVIDES_DRM="Provides: kernel-drm = %{version}"
@@ -30 +30,0 @@ fi fi
-PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
@@ -51 +51,3 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
@@ -50,3 +50,6 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
$S Source: kernel-$__KERNELRELEASE.tar.gz
- Provides: $PROVIDES - Provides: $PROVIDES
+ $PROVIDES_DRM + $PROVIDES_DRM
+ Provides: kernel = %{version} + Provides: kernel = %{version}
+ Provides: kernel-uname-r = %{version} + Provides: kernel-uname-r = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -61 +63 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz # $UTS_MACHINE as a fallback of _arch in case
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers - Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -72,0 +75,3 @@ $S$M Group: System Environment/Kernel %description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version} +$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version} +$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version} +$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
+$S %undefine _package_note_file
+$S %undefine _auto_set_build_flags
+$S %undefine _include_frame_pointers
+$S %define _build_id_flags -Wl,--build-id=none
+$S %undefine _annotated_build
+$S %undefine _fortify_level
+$S %undefine _hardened_build
+$S %global _lto_cflags %{nil}
+$S %global _configure_gnuconfig_hack 0
+$S %global _configure_libtool_hardening_hack 0
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
+$S %define _build_id_links none
+$S
$S %prep

View File

@@ -1,28 +1,53 @@
# Remove the obsoletes line in kernel-headers
# Add provides for kernel-devel so there's no conflict
# and fix akmod-nvidia
diff --git a/scripts/package/mkspec b/scripts/package/mkspec diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 7c477ca7d..1158f5559 100755 index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec --- a/scripts/package/mkspec
+++ b/scripts/package/mkspec +++ b/scripts/package/mkspec
@@ -25,0 +26 @@ fi @@ -25,7 +25,7 @@ fi
+PROVIDES_DRM="" +PROVIDES_DRM=""
@@ -27 +28 @@ if grep -q CONFIG_DRM=y .config; then if grep -q CONFIG_DRM=y .config; then
- PROVIDES=kernel-drm - PROVIDES=kernel-drm
+ PROVIDES_DRM="Provides: kernel-drm = %{version}" + PROVIDES_DRM="Provides: kernel-drm = %{version}"
@@ -30 +30,0 @@ fi fi
-PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
@@ -51 +51,3 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
@@ -50,3 +50,6 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
$S Source: kernel-$__KERNELRELEASE.tar.gz
- Provides: $PROVIDES - Provides: $PROVIDES
+ $PROVIDES_DRM + $PROVIDES_DRM
+ Provides: kernel = %{version} + Provides: kernel = %{version}
+ Provides: kernel-uname-r = %{version} + Provides: kernel-uname-r = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -61 +63 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz # $UTS_MACHINE as a fallback of _arch in case
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers - Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -72,0 +75,3 @@ $S$M Group: System Environment/Kernel %description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version} +$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version} +$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version} +$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
+$S %undefine _package_note_file
+$S %undefine _auto_set_build_flags
+$S %undefine _include_frame_pointers
+$S %define _build_id_flags -Wl,--build-id=none
+$S %undefine _annotated_build
+$S %undefine _fortify_level
+$S %undefine _hardened_build
+$S %global _lto_cflags %{nil}
+$S %global _configure_gnuconfig_hack 0
+$S %global _configure_libtool_hardening_hack 0
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
+$S %define _build_id_links none
+$S
$S %prep

View File

@@ -1,28 +1,53 @@
# Remove the obsoletes line in kernel-headers
# Add provides for kernel-devel so there's no conflict
# and fix akmod-nvidia
diff --git a/scripts/package/mkspec b/scripts/package/mkspec diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 7c477ca7d..1158f5559 100755 index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec --- a/scripts/package/mkspec
+++ b/scripts/package/mkspec +++ b/scripts/package/mkspec
@@ -25,0 +26 @@ fi @@ -25,7 +25,7 @@ fi
+PROVIDES_DRM="" +PROVIDES_DRM=""
@@ -27 +28 @@ if grep -q CONFIG_DRM=y .config; then if grep -q CONFIG_DRM=y .config; then
- PROVIDES=kernel-drm - PROVIDES=kernel-drm
+ PROVIDES_DRM="Provides: kernel-drm = %{version}" + PROVIDES_DRM="Provides: kernel-drm = %{version}"
@@ -30 +30,0 @@ fi fi
-PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
@@ -51 +51,3 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
@@ -50,3 +50,6 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
$S Source: kernel-$__KERNELRELEASE.tar.gz
- Provides: $PROVIDES - Provides: $PROVIDES
+ $PROVIDES_DRM + $PROVIDES_DRM
+ Provides: kernel = %{version} + Provides: kernel = %{version}
+ Provides: kernel-uname-r = %{version} + Provides: kernel-uname-r = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -61 +63 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz # $UTS_MACHINE as a fallback of _arch in case
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers - Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -72,0 +75,3 @@ $S$M Group: System Environment/Kernel %description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version} +$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version} +$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version} +$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
+$S %undefine _package_note_file
+$S %undefine _auto_set_build_flags
+$S %undefine _include_frame_pointers
+$S %define _build_id_flags -Wl,--build-id=none
+$S %undefine _annotated_build
+$S %undefine _fortify_level
+$S %undefine _hardened_build
+$S %global _lto_cflags %{nil}
+$S %global _configure_gnuconfig_hack 0
+$S %global _configure_libtool_hardening_hack 0
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
+$S %define _build_id_links none
+$S
$S %prep

View File

@@ -1,28 +1,53 @@
# Remove the obsoletes line in kernel-headers
# Add provides for kernel-devel so there's no conflict
# and fix akmod-nvidia
diff --git a/scripts/package/mkspec b/scripts/package/mkspec diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 7c477ca7d..1158f5559 100755 index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec --- a/scripts/package/mkspec
+++ b/scripts/package/mkspec +++ b/scripts/package/mkspec
@@ -25,0 +26 @@ fi @@ -25,7 +25,7 @@ fi
+PROVIDES_DRM="" +PROVIDES_DRM=""
@@ -27 +28 @@ if grep -q CONFIG_DRM=y .config; then if grep -q CONFIG_DRM=y .config; then
- PROVIDES=kernel-drm - PROVIDES=kernel-drm
+ PROVIDES_DRM="Provides: kernel-drm = %{version}" + PROVIDES_DRM="Provides: kernel-drm = %{version}"
@@ -30 +30,0 @@ fi fi
-PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
@@ -51 +51,3 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
@@ -50,3 +50,6 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
$S Source: kernel-$__KERNELRELEASE.tar.gz
- Provides: $PROVIDES - Provides: $PROVIDES
+ $PROVIDES_DRM + $PROVIDES_DRM
+ Provides: kernel = %{version} + Provides: kernel = %{version}
+ Provides: kernel-uname-r = %{version} + Provides: kernel-uname-r = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -61 +63 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz # $UTS_MACHINE as a fallback of _arch in case
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers - Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -72,0 +75,3 @@ $S$M Group: System Environment/Kernel %description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version} +$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version} +$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version} +$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
+$S %undefine _package_note_file
+$S %undefine _auto_set_build_flags
+$S %undefine _include_frame_pointers
+$S %define _build_id_flags -Wl,--build-id=none
+$S %undefine _annotated_build
+$S %undefine _fortify_level
+$S %undefine _hardened_build
+$S %global _lto_cflags %{nil}
+$S %global _configure_gnuconfig_hack 0
+$S %global _configure_libtool_hardening_hack 0
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
+$S %define _build_id_links none
+$S
$S %prep

View File

@@ -68,7 +68,7 @@ Signed-off-by: André Almeida <andrealmeid@collabora.com>
Adjusted for v5.9: Removed `put_futex_key` calls. Adjusted for v5.9: Removed `put_futex_key` calls.
--- ---
include/uapi/linux/futex.h | 20 +++ include/uapi/linux/futex.h | 20 +++
kernel/futex.c | 348 +++++++++++++++++++++++++++++++++++++ kernel/futex/core.c | 348 +++++++++++++++++++++++++++++++++++++
2 files changed, 368 insertions(+) 2 files changed, 368 insertions(+)
diff --git a/include/uapi/linux/futex.h b/include/uapi/linux/futex.h diff --git a/include/uapi/linux/futex.h b/include/uapi/linux/futex.h
@@ -114,10 +114,10 @@ index a89eb0accd5e2e..580001e89c6cae 100644
+}; +};
+ +
#endif /* _UAPI_LINUX_FUTEX_H */ #endif /* _UAPI_LINUX_FUTEX_H */
diff --git a/kernel/futex.c b/kernel/futex.c diff --git a/kernel/futex/core.c b/kernel/futex/core.c
index 408cad5e89680f..c30930a955cece 100644 index 408cad5e89680f..c30930a955cece 100644
--- a/kernel/futex.c --- a/kernel/futex/core.c
+++ b/kernel/futex.c +++ b/kernel/futex/core.c
@@ -197,6 +197,8 @@ struct futex_pi_state { @@ -197,6 +197,8 @@ struct futex_pi_state {
* @bitset: bitset for the optional bitmasked wakeup * @bitset: bitset for the optional bitmasked wakeup
* @requeue_state: State field for futex_requeue_pi() * @requeue_state: State field for futex_requeue_pi()
@@ -536,7 +536,7 @@ Subject: [PATCH] futex: Add Proton compatibility code
--- ---
include/uapi/linux/futex.h | 2 +- include/uapi/linux/futex.h | 2 +-
kernel/futex.c | 3 ++- kernel/futex/core.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-) 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/futex.h b/include/uapi/linux/futex.h diff --git a/include/uapi/linux/futex.h b/include/uapi/linux/futex.h
@@ -552,10 +552,10 @@ index 580001e89c6cae..a3e760886b8e7e 100644
#define FUTEX_PRIVATE_FLAG 128 #define FUTEX_PRIVATE_FLAG 128
#define FUTEX_CLOCK_REALTIME 256 #define FUTEX_CLOCK_REALTIME 256
diff --git a/kernel/futex.c b/kernel/futex.c diff --git a/kernel/futex/core.c b/kernel/futex/core.c
index c30930a955cece..aa33e66df5c9df 100644 index c30930a955cece..aa33e66df5c9df 100644
--- a/kernel/futex.c --- a/kernel/futex/core.c
+++ b/kernel/futex.c +++ b/kernel/futex/core.c
@@ -4002,7 +4002,7 @@ futex_init_timeout(u32 cmd, u32 op, struct timespec64 *ts, ktime_t *t) @@ -4002,7 +4002,7 @@ futex_init_timeout(u32 cmd, u32 op, struct timespec64 *ts, ktime_t *t)
return -EINVAL; return -EINVAL;

View File

@@ -14,7 +14,7 @@ of Proton to still use fsync in new kernel releases.
Signed-off-by: André Almeida <andrealmeid@collabora.com> Signed-off-by: André Almeida <andrealmeid@collabora.com>
--- ---
include/uapi/linux/futex.h | 12 ++++++ include/uapi/linux/futex.h | 12 ++++++
kernel/futex.c | 75 +++++++++++++++++++++++++++++++++++++- kernel/futex/core.c | 75 +++++++++++++++++++++++++++++++++++++-
2 files changed, 86 insertions(+), 1 deletion(-) 2 files changed, 86 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/futex.h b/include/uapi/linux/futex.h diff --git a/include/uapi/linux/futex.h b/include/uapi/linux/futex.h
@@ -47,10 +47,10 @@ index 2a06b99f9803..417c5d89b745 100644
/* /*
* Support for robust futexes: the kernel cleans up held futexes at * Support for robust futexes: the kernel cleans up held futexes at
diff --git a/kernel/futex.c b/kernel/futex.c diff --git a/kernel/futex/core.c b/kernel/futex/core.c
index 4a9e7ce3714a..c3f2e65afab8 100644 index 4a9e7ce3714a..c3f2e65afab8 100644
--- a/kernel/futex.c --- a/kernel/futex/core.c
+++ b/kernel/futex.c +++ b/kernel/futex/core.c
@@ -4012,6 +4012,7 @@ static __always_inline bool futex_cmd_has_timeout(u32 cmd) @@ -4012,6 +4012,7 @@ static __always_inline bool futex_cmd_has_timeout(u32 cmd)
case FUTEX_LOCK_PI2: case FUTEX_LOCK_PI2:
case FUTEX_WAIT_BITSET: case FUTEX_WAIT_BITSET:

View File

@@ -43,7 +43,7 @@ Link: https://lore.kernel.org/r/20210923171111.300673-17-andrealmeid@collabora.c
include/linux/syscalls.h | 6 + include/linux/syscalls.h | 6 +
include/uapi/asm-generic/unistd.h | 5 +- include/uapi/asm-generic/unistd.h | 5 +-
include/uapi/linux/futex.h | 26 +++ include/uapi/linux/futex.h | 26 +++
kernel/futex.c | 334 ++++++++++++++++++++++++++++++ kernel/futex/core.c | 334 ++++++++++++++++++++++++++++++
kernel/sys_ni.c | 1 + kernel/sys_ni.c | 1 +
5 files changed, 371 insertions(+), 1 deletion(-) 5 files changed, 371 insertions(+), 1 deletion(-)
@@ -125,10 +125,10 @@ index a89eb0accd5e..1666f5e4b837 100644
/* /*
* Support for robust futexes: the kernel cleans up held futexes at * Support for robust futexes: the kernel cleans up held futexes at
* thread exit time. * thread exit time.
diff --git a/kernel/futex.c b/kernel/futex.c diff --git a/kernel/futex/core.c b/kernel/futex/core.c
index 408cad5e8968..d7dc0bd9379c 100644 index 408cad5e8968..d7dc0bd9379c 100644
--- a/kernel/futex.c --- a/kernel/futex/core.c
+++ b/kernel/futex.c +++ b/kernel/futex/core.c
@@ -285,6 +285,18 @@ static const struct futex_q futex_q_init = { @@ -285,6 +285,18 @@ static const struct futex_q futex_q_init = {
.requeue_state = ATOMIC_INIT(Q_REQUEUE_PI_NONE), .requeue_state = ATOMIC_INIT(Q_REQUEUE_PI_NONE),
}; };

View File

@@ -1,28 +1,53 @@
# Remove the obsoletes line in kernel-headers
# Add provides for kernel-devel so there's no conflict
# and fix akmod-nvidia
diff --git a/scripts/package/mkspec b/scripts/package/mkspec diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 7c477ca7d..1158f5559 100755 index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec --- a/scripts/package/mkspec
+++ b/scripts/package/mkspec +++ b/scripts/package/mkspec
@@ -25,0 +26 @@ fi @@ -25,7 +25,7 @@ fi
+PROVIDES_DRM="" +PROVIDES_DRM=""
@@ -27 +28 @@ if grep -q CONFIG_DRM=y .config; then if grep -q CONFIG_DRM=y .config; then
- PROVIDES=kernel-drm - PROVIDES=kernel-drm
+ PROVIDES_DRM="Provides: kernel-drm = %{version}" + PROVIDES_DRM="Provides: kernel-drm = %{version}"
@@ -30 +30,0 @@ fi fi
-PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
@@ -51 +51,3 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
@@ -50,3 +50,6 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
$S Source: kernel-$__KERNELRELEASE.tar.gz
- Provides: $PROVIDES - Provides: $PROVIDES
+ $PROVIDES_DRM + $PROVIDES_DRM
+ Provides: kernel = %{version} + Provides: kernel = %{version}
+ Provides: kernel-uname-r = %{version} + Provides: kernel-uname-r = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -61 +63 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz # $UTS_MACHINE as a fallback of _arch in case
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers - Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -72,0 +75,3 @@ $S$M Group: System Environment/Kernel %description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version} +$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version} +$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version} +$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
+$S %undefine _package_note_file
+$S %undefine _auto_set_build_flags
+$S %undefine _include_frame_pointers
+$S %define _build_id_flags -Wl,--build-id=none
+$S %undefine _annotated_build
+$S %undefine _fortify_level
+$S %undefine _hardened_build
+$S %global _lto_cflags %{nil}
+$S %global _configure_gnuconfig_hack 0
+$S %global _configure_libtool_hardening_hack 0
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
+$S %define _build_id_links none
+$S
$S %prep

View File

@@ -1,28 +1,53 @@
# Remove the obsoletes line in kernel-headers
# Add provides for kernel-devel so there's no conflict
# and fix akmod-nvidia
diff --git a/scripts/package/mkspec b/scripts/package/mkspec diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 7c477ca7d..1158f5559 100755 index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec --- a/scripts/package/mkspec
+++ b/scripts/package/mkspec +++ b/scripts/package/mkspec
@@ -25,0 +26 @@ fi @@ -25,7 +25,7 @@ fi
+PROVIDES_DRM="" +PROVIDES_DRM=""
@@ -27 +28 @@ if grep -q CONFIG_DRM=y .config; then if grep -q CONFIG_DRM=y .config; then
- PROVIDES=kernel-drm - PROVIDES=kernel-drm
+ PROVIDES_DRM="Provides: kernel-drm = %{version}" + PROVIDES_DRM="Provides: kernel-drm = %{version}"
@@ -30 +30,0 @@ fi fi
-PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
@@ -51 +51,3 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
@@ -50,3 +50,6 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
$S Source: kernel-$__KERNELRELEASE.tar.gz
- Provides: $PROVIDES - Provides: $PROVIDES
+ $PROVIDES_DRM + $PROVIDES_DRM
+ Provides: kernel = %{version} + Provides: kernel = %{version}
+ Provides: kernel-uname-r = %{version} + Provides: kernel-uname-r = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -61 +63 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz # $UTS_MACHINE as a fallback of _arch in case
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers - Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -72,0 +75,3 @@ $S$M Group: System Environment/Kernel %description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version} +$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version} +$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version} +$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
+$S %undefine _package_note_file
+$S %undefine _auto_set_build_flags
+$S %undefine _include_frame_pointers
+$S %define _build_id_flags -Wl,--build-id=none
+$S %undefine _annotated_build
+$S %undefine _fortify_level
+$S %undefine _hardened_build
+$S %global _lto_cflags %{nil}
+$S %global _configure_gnuconfig_hack 0
+$S %global _configure_libtool_hardening_hack 0
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
+$S %define _build_id_links none
+$S
$S %prep

View File

@@ -1,28 +1,53 @@
# Remove the obsoletes line in kernel-headers
# Add provides for kernel-devel so there's no conflict
# and fix akmod-nvidia
diff --git a/scripts/package/mkspec b/scripts/package/mkspec diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 7c477ca7d..1158f5559 100755 index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec --- a/scripts/package/mkspec
+++ b/scripts/package/mkspec +++ b/scripts/package/mkspec
@@ -25,0 +26 @@ fi @@ -25,7 +25,7 @@ fi
+PROVIDES_DRM="" +PROVIDES_DRM=""
@@ -27 +28 @@ if grep -q CONFIG_DRM=y .config; then if grep -q CONFIG_DRM=y .config; then
- PROVIDES=kernel-drm - PROVIDES=kernel-drm
+ PROVIDES_DRM="Provides: kernel-drm = %{version}" + PROVIDES_DRM="Provides: kernel-drm = %{version}"
@@ -30 +30,0 @@ fi fi
-PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
@@ -51 +51,3 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
@@ -50,3 +50,6 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
$S Source: kernel-$__KERNELRELEASE.tar.gz
- Provides: $PROVIDES - Provides: $PROVIDES
+ $PROVIDES_DRM + $PROVIDES_DRM
+ Provides: kernel = %{version} + Provides: kernel = %{version}
+ Provides: kernel-uname-r = %{version} + Provides: kernel-uname-r = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -61 +63 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz # $UTS_MACHINE as a fallback of _arch in case
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers - Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -72,0 +75,3 @@ $S$M Group: System Environment/Kernel %description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version} +$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version} +$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version} +$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
+$S %undefine _package_note_file
+$S %undefine _auto_set_build_flags
+$S %undefine _include_frame_pointers
+$S %define _build_id_flags -Wl,--build-id=none
+$S %undefine _annotated_build
+$S %undefine _fortify_level
+$S %undefine _hardened_build
+$S %global _lto_cflags %{nil}
+$S %global _configure_gnuconfig_hack 0
+$S %global _configure_libtool_hardening_hack 0
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
+$S %define _build_id_links none
+$S
$S %prep

View File

@@ -1,27 +1,53 @@
# Remove the obsoletes line in kernel-headers
# Add provides for kernel-devel so there's no conflict
diff --git a/scripts/package/mkspec b/scripts/package/mkspec diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 7c477ca7d..1158f5559 100755 index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec --- a/scripts/package/mkspec
+++ b/scripts/package/mkspec +++ b/scripts/package/mkspec
@@ -25,0 +26 @@ fi @@ -25,7 +25,7 @@ fi
+PROVIDES_DRM="" +PROVIDES_DRM=""
@@ -27 +28 @@ if grep -q CONFIG_DRM=y .config; then if grep -q CONFIG_DRM=y .config; then
- PROVIDES=kernel-drm - PROVIDES=kernel-drm
+ PROVIDES_DRM="Provides: kernel-drm = %{version}" + PROVIDES_DRM="Provides: kernel-drm = %{version}"
@@ -30 +30,0 @@ fi fi
-PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
@@ -51 +51,3 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
@@ -50,3 +50,6 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
$S Source: kernel-$__KERNELRELEASE.tar.gz
- Provides: $PROVIDES - Provides: $PROVIDES
+ $PROVIDES_DRM + $PROVIDES_DRM
+ Provides: kernel = %{version} + Provides: kernel = %{version}
+ Provides: kernel-uname-r = %{version} + Provides: kernel-uname-r = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -61 +63 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz # $UTS_MACHINE as a fallback of _arch in case
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers - Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -72,0 +75,3 @@ $S$M Group: System Environment/Kernel %description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version} +$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version} +$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version} +$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
+$S %undefine _package_note_file
+$S %undefine _auto_set_build_flags
+$S %undefine _include_frame_pointers
+$S %define _build_id_flags -Wl,--build-id=none
+$S %undefine _annotated_build
+$S %undefine _fortify_level
+$S %undefine _hardened_build
+$S %global _lto_cflags %{nil}
+$S %global _configure_gnuconfig_hack 0
+$S %global _configure_libtool_hardening_hack 0
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
+$S %define _build_id_links none
+$S
$S %prep

View File

@@ -1,27 +1,53 @@
# Remove the obsoletes line in kernel-headers
# Add provides for kernel-devel so there's no conflict
diff --git a/scripts/package/mkspec b/scripts/package/mkspec diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 7c477ca7d..1158f5559 100755 index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec --- a/scripts/package/mkspec
+++ b/scripts/package/mkspec +++ b/scripts/package/mkspec
@@ -25,0 +26 @@ fi @@ -25,7 +25,7 @@ fi
+PROVIDES_DRM="" +PROVIDES_DRM=""
@@ -27 +28 @@ if grep -q CONFIG_DRM=y .config; then if grep -q CONFIG_DRM=y .config; then
- PROVIDES=kernel-drm - PROVIDES=kernel-drm
+ PROVIDES_DRM="Provides: kernel-drm = %{version}" + PROVIDES_DRM="Provides: kernel-drm = %{version}"
@@ -30 +30,0 @@ fi fi
-PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
@@ -51 +51,3 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
@@ -50,3 +50,6 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
$S Source: kernel-$__KERNELRELEASE.tar.gz
- Provides: $PROVIDES - Provides: $PROVIDES
+ $PROVIDES_DRM + $PROVIDES_DRM
+ Provides: kernel = %{version} + Provides: kernel = %{version}
+ Provides: kernel-uname-r = %{version} + Provides: kernel-uname-r = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -61 +63 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz # $UTS_MACHINE as a fallback of _arch in case
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers - Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -72,0 +75,3 @@ $S$M Group: System Environment/Kernel %description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version} +$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version} +$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version} +$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
+$S %undefine _package_note_file
+$S %undefine _auto_set_build_flags
+$S %undefine _include_frame_pointers
+$S %define _build_id_flags -Wl,--build-id=none
+$S %undefine _annotated_build
+$S %undefine _fortify_level
+$S %undefine _hardened_build
+$S %global _lto_cflags %{nil}
+$S %global _configure_gnuconfig_hack 0
+$S %global _configure_libtool_hardening_hack 0
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
+$S %define _build_id_links none
+$S
$S %prep

View File

@@ -1,28 +1,53 @@
# Remove the obsoletes line in kernel-headers
# Add provides for kernel-devel so there's no conflict
# and fix akmod-nvidia
diff --git a/scripts/package/mkspec b/scripts/package/mkspec diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 7c477ca7d..1158f5559 100755 index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec --- a/scripts/package/mkspec
+++ b/scripts/package/mkspec +++ b/scripts/package/mkspec
@@ -25,0 +26 @@ fi @@ -25,7 +25,7 @@ fi
+PROVIDES_DRM="" +PROVIDES_DRM=""
@@ -27 +28 @@ if grep -q CONFIG_DRM=y .config; then if grep -q CONFIG_DRM=y .config; then
- PROVIDES=kernel-drm - PROVIDES=kernel-drm
+ PROVIDES_DRM="Provides: kernel-drm = %{version}" + PROVIDES_DRM="Provides: kernel-drm = %{version}"
@@ -30 +30,0 @@ fi fi
-PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
@@ -51 +51,3 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
@@ -50,3 +50,6 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
$S Source: kernel-$__KERNELRELEASE.tar.gz
- Provides: $PROVIDES - Provides: $PROVIDES
+ $PROVIDES_DRM + $PROVIDES_DRM
+ Provides: kernel = %{version} + Provides: kernel = %{version}
+ Provides: kernel-uname-r = %{version} + Provides: kernel-uname-r = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -61 +63 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz # $UTS_MACHINE as a fallback of _arch in case
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers - Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -72,0 +75,3 @@ $S$M Group: System Environment/Kernel %description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version} +$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version} +$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version} +$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
+$S %undefine _package_note_file
+$S %undefine _auto_set_build_flags
+$S %undefine _include_frame_pointers
+$S %define _build_id_flags -Wl,--build-id=none
+$S %undefine _annotated_build
+$S %undefine _fortify_level
+$S %undefine _hardened_build
+$S %global _lto_cflags %{nil}
+$S %global _configure_gnuconfig_hack 0
+$S %global _configure_libtool_hardening_hack 0
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
+$S %define _build_id_links none
+$S
$S %prep

View File

@@ -1,28 +1,53 @@
# Remove the obsoletes line in kernel-headers
# Add provides for kernel-devel so there's no conflict
# and fix akmod-nvidia
diff --git a/scripts/package/mkspec b/scripts/package/mkspec diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 7c477ca7d..1158f5559 100755 index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec --- a/scripts/package/mkspec
+++ b/scripts/package/mkspec +++ b/scripts/package/mkspec
@@ -25,0 +26 @@ fi @@ -25,7 +25,7 @@ fi
+PROVIDES_DRM="" +PROVIDES_DRM=""
@@ -27 +28 @@ if grep -q CONFIG_DRM=y .config; then if grep -q CONFIG_DRM=y .config; then
- PROVIDES=kernel-drm - PROVIDES=kernel-drm
+ PROVIDES_DRM="Provides: kernel-drm = %{version}" + PROVIDES_DRM="Provides: kernel-drm = %{version}"
@@ -30 +30,0 @@ fi fi
-PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
@@ -51 +51,3 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
@@ -50,3 +50,6 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
$S Source: kernel-$__KERNELRELEASE.tar.gz
- Provides: $PROVIDES - Provides: $PROVIDES
+ $PROVIDES_DRM + $PROVIDES_DRM
+ Provides: kernel = %{version} + Provides: kernel = %{version}
+ Provides: kernel-uname-r = %{version} + Provides: kernel-uname-r = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -61 +63 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz # $UTS_MACHINE as a fallback of _arch in case
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers - Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -72,0 +75,3 @@ $S$M Group: System Environment/Kernel %description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version} +$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version} +$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version} +$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
+$S %undefine _package_note_file
+$S %undefine _auto_set_build_flags
+$S %undefine _include_frame_pointers
+$S %define _build_id_flags -Wl,--build-id=none
+$S %undefine _annotated_build
+$S %undefine _fortify_level
+$S %undefine _hardened_build
+$S %global _lto_cflags %{nil}
+$S %global _configure_gnuconfig_hack 0
+$S %global _configure_libtool_hardening_hack 0
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
+$S %define _build_id_links none
+$S
$S %prep

View File

@@ -1,28 +1,53 @@
# Remove the obsoletes line in kernel-headers
# Add provides for kernel-devel so there's no conflict
# and fix akmod-nvidia
diff --git a/scripts/package/mkspec b/scripts/package/mkspec diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 7c477ca7d..1158f5559 100755 index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec --- a/scripts/package/mkspec
+++ b/scripts/package/mkspec +++ b/scripts/package/mkspec
@@ -25,0 +26 @@ fi @@ -25,7 +25,7 @@ fi
+PROVIDES_DRM="" +PROVIDES_DRM=""
@@ -27 +28 @@ if grep -q CONFIG_DRM=y .config; then if grep -q CONFIG_DRM=y .config; then
- PROVIDES=kernel-drm - PROVIDES=kernel-drm
+ PROVIDES_DRM="Provides: kernel-drm = %{version}" + PROVIDES_DRM="Provides: kernel-drm = %{version}"
@@ -30 +30,0 @@ fi fi
-PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
@@ -51 +51,3 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
@@ -50,3 +50,6 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
$S Source: kernel-$__KERNELRELEASE.tar.gz
- Provides: $PROVIDES - Provides: $PROVIDES
+ $PROVIDES_DRM + $PROVIDES_DRM
+ Provides: kernel = %{version} + Provides: kernel = %{version}
+ Provides: kernel-uname-r = %{version} + Provides: kernel-uname-r = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -61 +63 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz # $UTS_MACHINE as a fallback of _arch in case
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers - Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -72,0 +75,3 @@ $S$M Group: System Environment/Kernel %description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version} +$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version} +$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version} +$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
+$S %undefine _package_note_file
+$S %undefine _auto_set_build_flags
+$S %undefine _include_frame_pointers
+$S %define _build_id_flags -Wl,--build-id=none
+$S %undefine _annotated_build
+$S %undefine _fortify_level
+$S %undefine _hardened_build
+$S %global _lto_cflags %{nil}
+$S %global _configure_gnuconfig_hack 0
+$S %global _configure_libtool_hardening_hack 0
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
+$S %define _build_id_links none
+$S
$S %prep

View File

@@ -1,28 +1,53 @@
# Remove the obsoletes line in kernel-headers
# Add provides for kernel-devel so there's no conflict
# and fix akmod-nvidia
diff --git a/scripts/package/mkspec b/scripts/package/mkspec diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 7c477ca7d..1158f5559 100755 index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec --- a/scripts/package/mkspec
+++ b/scripts/package/mkspec +++ b/scripts/package/mkspec
@@ -25,0 +26 @@ fi @@ -25,7 +25,7 @@ fi
+PROVIDES_DRM="" +PROVIDES_DRM=""
@@ -27 +28 @@ if grep -q CONFIG_DRM=y .config; then if grep -q CONFIG_DRM=y .config; then
- PROVIDES=kernel-drm - PROVIDES=kernel-drm
+ PROVIDES_DRM="Provides: kernel-drm = %{version}" + PROVIDES_DRM="Provides: kernel-drm = %{version}"
@@ -30 +30,0 @@ fi fi
-PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
@@ -51 +51,3 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
@@ -50,3 +50,6 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
$S Source: kernel-$__KERNELRELEASE.tar.gz
- Provides: $PROVIDES - Provides: $PROVIDES
+ $PROVIDES_DRM + $PROVIDES_DRM
+ Provides: kernel = %{version} + Provides: kernel = %{version}
+ Provides: kernel-uname-r = %{version} + Provides: kernel-uname-r = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -61 +63 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz # $UTS_MACHINE as a fallback of _arch in case
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers - Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -72,0 +75,3 @@ $S$M Group: System Environment/Kernel %description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version} +$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version} +$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version} +$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
+$S %undefine _package_note_file
+$S %undefine _auto_set_build_flags
+$S %undefine _include_frame_pointers
+$S %define _build_id_flags -Wl,--build-id=none
+$S %undefine _annotated_build
+$S %undefine _fortify_level
+$S %undefine _hardened_build
+$S %global _lto_cflags %{nil}
+$S %global _configure_gnuconfig_hack 0
+$S %global _configure_libtool_hardening_hack 0
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
+$S %define _build_id_links none
+$S
$S %prep

View File

@@ -1,27 +1,53 @@
# Remove the obsoletes line in kernel-headers
# Add provides for kernel-devel so there's no conflict
diff --git a/scripts/package/mkspec b/scripts/package/mkspec diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 7c477ca7d..1158f5559 100755 index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec --- a/scripts/package/mkspec
+++ b/scripts/package/mkspec +++ b/scripts/package/mkspec
@@ -25,0 +26 @@ fi @@ -25,7 +25,7 @@ fi
+PROVIDES_DRM="" +PROVIDES_DRM=""
@@ -27 +28 @@ if grep -q CONFIG_DRM=y .config; then if grep -q CONFIG_DRM=y .config; then
- PROVIDES=kernel-drm - PROVIDES=kernel-drm
+ PROVIDES_DRM="Provides: kernel-drm = %{version}" + PROVIDES_DRM="Provides: kernel-drm = %{version}"
@@ -30 +30,0 @@ fi fi
-PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
@@ -51 +51,3 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
@@ -50,3 +50,6 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
$S Source: kernel-$__KERNELRELEASE.tar.gz
- Provides: $PROVIDES - Provides: $PROVIDES
+ $PROVIDES_DRM + $PROVIDES_DRM
+ Provides: kernel = %{version} + Provides: kernel = %{version}
+ Provides: kernel-uname-r = %{version} + Provides: kernel-uname-r = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -61 +63 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz # $UTS_MACHINE as a fallback of _arch in case
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers - Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -72,0 +75,3 @@ $S$M Group: System Environment/Kernel %description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version} +$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version} +$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version} +$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
+$S %undefine _package_note_file
+$S %undefine _auto_set_build_flags
+$S %undefine _include_frame_pointers
+$S %define _build_id_flags -Wl,--build-id=none
+$S %undefine _annotated_build
+$S %undefine _fortify_level
+$S %undefine _hardened_build
+$S %global _lto_cflags %{nil}
+$S %global _configure_gnuconfig_hack 0
+$S %global _configure_libtool_hardening_hack 0
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
+$S %define _build_id_links none
+$S
$S %prep

View File

@@ -90612,7 +90612,7 @@ index 5cfc95a52bc3..be075882450a 100644
} }
static DEFINE_STATIC_KEY_FALSE(trace_no_verify); static DEFINE_STATIC_KEY_FALSE(trace_no_verify);
@@ -6792,12 +6788,12 @@ tracing_read_pipe(struct file *filp, char __user *ubuf, @@ -6793,7 +6789,7 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
trace_access_lock(iter->cpu_file); trace_access_lock(iter->cpu_file);
while (trace_find_next_entry_inc(iter) != NULL) { while (trace_find_next_entry_inc(iter) != NULL) {
enum print_line_t ret; enum print_line_t ret;
@@ -90621,7 +90621,19 @@ index 5cfc95a52bc3..be075882450a 100644
ret = print_trace_line(iter); ret = print_trace_line(iter);
if (ret == TRACE_TYPE_PARTIAL_LINE) { if (ret == TRACE_TYPE_PARTIAL_LINE) {
/* don't print partial lines */ @@ -6803,7 +6799,7 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
* In this case, we need to consume it, otherwise, loop will peek
* this event next time, resulting in an infinite loop.
*/
- if (save_len == 0) {
+ if (save_pos == 0) {
iter->seq.full = 0;
trace_seq_puts(&iter->seq, "[LINE TOO BIG]\n");
trace_consume(iter);
@@ -6811,7 +6807,7 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
}
/* In other cases, don't print partial lines */
- iter->seq.seq.len = save_len; - iter->seq.seq.len = save_len;
+ iter->seq.seq.pos = save_pos; + iter->seq.seq.pos = save_pos;
break; break;

File diff suppressed because it is too large Load Diff

View File

@@ -1,27 +1,53 @@
# Remove the obsoletes line in kernel-headers
# Add provides for kernel-devel so there's no conflict
diff --git a/scripts/package/mkspec b/scripts/package/mkspec diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 7c477ca7d..1158f5559 100755 index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec --- a/scripts/package/mkspec
+++ b/scripts/package/mkspec +++ b/scripts/package/mkspec
@@ -25,0 +26 @@ fi @@ -25,7 +25,7 @@ fi
+PROVIDES_DRM="" +PROVIDES_DRM=""
@@ -27 +28 @@ if grep -q CONFIG_DRM=y .config; then if grep -q CONFIG_DRM=y .config; then
- PROVIDES=kernel-drm - PROVIDES=kernel-drm
+ PROVIDES_DRM="Provides: kernel-drm = %{version}" + PROVIDES_DRM="Provides: kernel-drm = %{version}"
@@ -30 +30,0 @@ fi fi
-PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
@@ -51 +51,3 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
@@ -50,3 +50,6 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
$S Source: kernel-$__KERNELRELEASE.tar.gz
- Provides: $PROVIDES - Provides: $PROVIDES
+ $PROVIDES_DRM + $PROVIDES_DRM
+ Provides: kernel = %{version} + Provides: kernel = %{version}
+ Provides: kernel-uname-r = %{version} + Provides: kernel-uname-r = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -61 +63 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz # $UTS_MACHINE as a fallback of _arch in case
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers - Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -72,0 +75,3 @@ $S$M Group: System Environment/Kernel %description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version} +$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version} +$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version} +$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
+$S %undefine _package_note_file
+$S %undefine _auto_set_build_flags
+$S %undefine _include_frame_pointers
+$S %define _build_id_flags -Wl,--build-id=none
+$S %undefine _annotated_build
+$S %undefine _fortify_level
+$S %undefine _hardened_build
+$S %global _lto_cflags %{nil}
+$S %global _configure_gnuconfig_hack 0
+$S %global _configure_libtool_hardening_hack 0
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
+$S %define _build_id_links none
+$S
$S %prep

View File

@@ -1,27 +1,53 @@
# Remove the obsoletes line in kernel-headers
# Add provides for kernel-devel so there's no conflict
diff --git a/scripts/package/mkspec b/scripts/package/mkspec diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 7c477ca7d..1158f5559 100755 index 70392fd2f..34f98648f 100755
--- a/scripts/package/mkspec --- a/scripts/package/mkspec
+++ b/scripts/package/mkspec +++ b/scripts/package/mkspec
@@ -25,0 +26 @@ fi @@ -25,7 +25,7 @@ fi
+PROVIDES_DRM="" +PROVIDES_DRM=""
@@ -27 +28 @@ if grep -q CONFIG_DRM=y .config; then if grep -q CONFIG_DRM=y .config; then
- PROVIDES=kernel-drm - PROVIDES=kernel-drm
+ PROVIDES_DRM="Provides: kernel-drm = %{version}" + PROVIDES_DRM="Provides: kernel-drm = %{version}"
@@ -30 +30,0 @@ fi fi
-PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
@@ -51 +51,3 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
@@ -50,3 +50,6 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
$S Source: kernel-$__KERNELRELEASE.tar.gz
- Provides: $PROVIDES - Provides: $PROVIDES
+ $PROVIDES_DRM + $PROVIDES_DRM
+ Provides: kernel = %{version} + Provides: kernel = %{version}
+ Provides: kernel-uname-r = %{version} + Provides: kernel-uname-r = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -61 +63 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz # $UTS_MACHINE as a fallback of _arch in case
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
Group: Development/System
- Obsoletes: kernel-headers - Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version} + Provides: installonlypkg(kernel) = %{version}
@@ -72,0 +75,3 @@ $S$M Group: System Environment/Kernel %description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
$S$M Group: System Environment/Kernel
+$S$M Provides: kernel-devel = %{version} +$S$M Provides: kernel-devel = %{version}
+$S$M Provides: kernel-devel-uname-r = %{version} +$S$M Provides: kernel-devel-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version} +$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
$S$M
+$S # Opt out of a lot of Fedora hardening flags etc...
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
+$S %undefine _package_note_file
+$S %undefine _auto_set_build_flags
+$S %undefine _include_frame_pointers
+$S %define _build_id_flags -Wl,--build-id=none
+$S %undefine _annotated_build
+$S %undefine _fortify_level
+$S %undefine _hardened_build
+$S %global _lto_cflags %{nil}
+$S %global _configure_gnuconfig_hack 0
+$S %global _configure_libtool_hardening_hack 0
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
+$S %define _build_id_links none
+$S
$S %prep