Skip to content

Commit

Permalink
Various fixes (Frogging-Family#788)
Browse files Browse the repository at this point in the history
* install.sh: RPM: add install deps

* install.sh: Fedora: remove fedora 32 code path

too old by now

* DEB: add dependencies

* install.sh: do not install libc-dev package

I don't remember why I had to keep it, but I just tried installing only
the image and headers and nvidia-dkms installed just fine

Closes: Frogging-Family#772 Frogging-Family#732

* prepare: disable CONFIG_LOCALVERSION_AUTO

Closes: Frogging-Family#729

* install.sh: gentoo: do not do initramfs and booloader config

it's done directly by the kernel-install script called by make install,
which gets changed in gentoo to do what needs to be done

* patches: fix RPM patches for 6.4 and 6.5
  • Loading branch information
AdelKS authored Aug 15, 2023
1 parent eff2fa5 commit 1ac2ea0
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 21 deletions.
24 changes: 11 additions & 13 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,13 @@ _install_dependencies() {
fi
if [ "$_distro" = "Debian" -o "$_distro" = "Ubuntu" ]; then
msg2 "Installing dependencies"
sudo apt install bc bison build-essential ccache cpio fakeroot flex git kmod libelf-dev libncurses5-dev libssl-dev lz4 qtbase5-dev rsync schedtool wget zstd ${clang_deps} -y
sudo apt install bc bison build-essential ccache cpio fakeroot flex git kmod libelf-dev libncurses5-dev libssl-dev lz4 qtbase5-dev rsync schedtool wget zstd debhelper ${clang_deps} -y
elif [ "$_distro" = "Fedora" ]; then
msg2 "Installing dependencies"
if [ $(rpm -E %fedora) = "32" ]; then
sudo dnf install bison ccache dwarves elfutils-libelf-devel fedora-packager fedpkg flex gcc-c++ git grubby libXi-devel lz4 ncurses-devel openssl-devel pesign qt5-devel rpm-build rpmdevtools schedtool zstd ${clang_deps} -y
else
sudo dnf install perl bison ccache dwarves elfutils-devel elfutils-libelf-devel fedora-packager fedpkg flex gcc-c++ git grubby libXi-devel lz4 make ncurses-devel openssl openssl-devel perl-devel perl-generators pesign python3-devel qt5-qtbase-devel rpm-build rpmdevtools schedtool zstd -y ${clang_deps} -y
fi
sudo dnf install perl bison ccache dwarves elfutils-devel elfutils-libelf-devel fedora-packager fedpkg flex gcc-c++ git grubby libXi-devel lz4 make ncurses-devel openssl openssl-devel perl-devel perl-generators pesign python3-devel qt5-qtbase-devel rpm-build rpmdevtools schedtool zstd bc rsync -y ${clang_deps} -y
elif [ "$_distro" = "Suse" ]; then
msg2 "Installing dependencies"
sudo zypper install -y bc bison ccache dwarves elfutils flex gcc-c++ git libXi-devel libelf-devel libqt5-qtbase-common-devel libqt5-qtbase-devel lz4 make ncurses-devel openssl-devel patch pesign rpm-build rpmdevtools schedtool ${clang_deps}
sudo zypper install -y bc bison ccache dwarves elfutils flex gcc-c++ git libXi-devel libelf-devel libqt5-qtbase-common-devel libqt5-qtbase-devel lz4 make ncurses-devel openssl-devel patch pesign rpm-build rpmdevtools schedtool python3 rsync zstd ${clang_deps}
fi
}

Expand Down Expand Up @@ -231,10 +227,9 @@ if [ "$1" = "install" ]; then
fi
_headers_deb="linux-headers-${_kernelname}*.deb"
_image_deb="linux-image-${_kernelname}_*.deb"
_kernel_devel_deb="linux-libc-dev_${_kernelname}*.deb"

cd DEBS
sudo dpkg -i $_headers_deb $_image_deb $_kernel_devel_deb
sudo dpkg -i $_headers_deb $_image_deb
fi

elif [[ "$_distro" =~ ^(Fedora|Suse)$ ]]; then
Expand Down Expand Up @@ -375,10 +370,6 @@ if [ "$1" = "install" ]; then

msg2 "Installing kernel"
sudo make install
msg2 "Creating initramfs"
sudo dracut --force --hostonly ${_dracut_options} --kver $_kernelname
msg2 "Updating GRUB"
sudo grub-mkconfig -o /boot/grub/grub.cfg

if [ "$_distro" = "Gentoo" ]; then

Expand All @@ -396,6 +387,13 @@ if [ "$1" = "install" ]; then
sudo emerge @module-rebuild --keep-going
fi

else

msg2 "Creating initramfs"
sudo dracut --force --hostonly ${_dracut_options} --kver $_kernelname
msg2 "Updating GRUB"
sudo grub-mkconfig -o /boot/grub/grub.cfg

fi

fi
Expand Down
2 changes: 2 additions & 0 deletions linux-tkg-config/prepare
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,8 @@ _tkg_srcprep() {
if [ "${_distro}" = "Arch" ]; then
# Reset local version string if ever it's in the .config file
scripts/config --set-str localversion ""
else
_disable "LOCALVERSION_AUTO"
fi

if [ -z $_debug ]; then
Expand Down
12 changes: 8 additions & 4 deletions linux-tkg-patches/6.4/0013-fedora-rpm.patch
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 70392fd2f..34f98648f 100755
index 8049f0e2c..de170760d 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
@@ -53,2 +53,3 @@ $S Source2: diff.patch
Provides: kernel-$KERNELRELEASE
+ Provides: kernel-uname-r = %{version}
$S BuildRequires: bc binutils bison dwarves
@@ -69,4 +70,4 @@ $S BuildRequires: gcc make openssl openssl-devel perl python3 rsync
Group: Development/System
- Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version}
%description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
@@ -81,2 +82,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-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
@@ -86,2 +90,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
Expand Down
12 changes: 8 additions & 4 deletions linux-tkg-patches/6.5/0013-fedora-rpm.patch
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 70392fd2f..34f98648f 100755
index 8049f0e2c..de170760d 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -63,4 +66,4 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz
@@ -53,2 +53,3 @@ $S Source2: diff.patch
Provides: kernel-$KERNELRELEASE
+ Provides: kernel-uname-r = %{version}
$S BuildRequires: bc binutils bison dwarves
@@ -69,4 +70,4 @@ $S BuildRequires: gcc make openssl openssl-devel perl python3 rsync
Group: Development/System
- Obsoletes: kernel-headers
Provides: kernel-headers = %{version}
+ Provides: installonlypkg(kernel) = %{version}
%description headers
@@ -75,2 +78,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
@@ -81,2 +82,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-uname-r = %{version}
+$S$M Provides: installonlypkg(kernel) = %{version}
$S$M AutoReqProv: no
@@ -80,2 +86,18 @@ $S$M against the $__KERNELRELEASE kernel package.
@@ -86,2 +90,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
Expand Down

0 comments on commit 1ac2ea0

Please sign in to comment.