commit 91404150090172519addbb37c9a6ef0addc1116b

OBS-URL: https://build.opensuse.org/package/show/Kernel:stable/kernel-source?expand=0&rev=1529
This commit is contained in:
Kernel Bugs 2021-07-07 08:05:52 +00:00 committed by Git OBS Bridge
parent 0f36b0da04
commit e8b7fa428a
44 changed files with 1588 additions and 227 deletions

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Jul 5 18:08:41 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
- patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch
- commit 9510801
-------------------------------------------------------------------
Thu Jul 1 18:44:34 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/ACPI-PM-s2idle-Add-missing-LPS0-functions-for-AMD.patch
- patches.suse/ACPI-processor-idle-Fix-up-C-state-latency-if-not-or.patch
- patches.suse/Bluetooth-btqca-Don-t-modify-firmware-contents-in-pl.patch
- patches.suse/brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
- patches.suse/brcmfmac-Delete-second-brcm-folder-hierarchy.patch
- patches.suse/crypto-ccp-Annotate-SEV-Firmware-file-names.patch
- commit f094788
-------------------------------------------------------------------
Thu Jul 1 16:20:28 CEST 2021 - ptesarik@suse.cz
@ -527,6 +549,22 @@ Fri Jun 18 13:07:21 CEST 2021 - jslaby@suse.cz
- net: ieee802154: fix null deref in parse dev addr (bsc#1012628).
- commit 0e46a2c
-------------------------------------------------------------------
Thu Jun 17 13:31:32 CEST 2021 - ludwig.nussel@suse.de
- UsrMerge the kernel (boo#1184804)
- Move files in /boot to modules dir
The file names in /boot are included as %ghost links. The %post script
creates symlinks for the kernel, sysctl.conf and System.map in
/boot for compatibility. Some tools require adjustments before we
can drop those links. If boot is a separate partition, a copy is
used instead of a link.
The logic for /boot/vmlinuz and /boot/initrd doesn't change with
this patch.
- Use /usr/lib/modules as module dir when usermerge is active in the
target distro.
- commit 6f5ed04
-------------------------------------------------------------------
Wed Jun 16 13:55:58 CEST 2021 - mbrugger@suse.com

View File

@ -31,7 +31,7 @@
Name: dtb-aarch64
Version: 5.13.0
%if 0%{?is_kotd}
Release: <RELEASE>.gaa40472
Release: <RELEASE>.g9140415
%else
Release: 0
%endif

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Jul 5 18:08:41 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
- patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch
- commit 9510801
-------------------------------------------------------------------
Thu Jul 1 18:44:34 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/ACPI-PM-s2idle-Add-missing-LPS0-functions-for-AMD.patch
- patches.suse/ACPI-processor-idle-Fix-up-C-state-latency-if-not-or.patch
- patches.suse/Bluetooth-btqca-Don-t-modify-firmware-contents-in-pl.patch
- patches.suse/brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
- patches.suse/brcmfmac-Delete-second-brcm-folder-hierarchy.patch
- patches.suse/crypto-ccp-Annotate-SEV-Firmware-file-names.patch
- commit f094788
-------------------------------------------------------------------
Thu Jul 1 16:20:28 CEST 2021 - ptesarik@suse.cz
@ -527,6 +549,22 @@ Fri Jun 18 13:07:21 CEST 2021 - jslaby@suse.cz
- net: ieee802154: fix null deref in parse dev addr (bsc#1012628).
- commit 0e46a2c
-------------------------------------------------------------------
Thu Jun 17 13:31:32 CEST 2021 - ludwig.nussel@suse.de
- UsrMerge the kernel (boo#1184804)
- Move files in /boot to modules dir
The file names in /boot are included as %ghost links. The %post script
creates symlinks for the kernel, sysctl.conf and System.map in
/boot for compatibility. Some tools require adjustments before we
can drop those links. If boot is a separate partition, a copy is
used instead of a link.
The logic for /boot/vmlinuz and /boot/initrd doesn't change with
this patch.
- Use /usr/lib/modules as module dir when usermerge is active in the
target distro.
- commit 6f5ed04
-------------------------------------------------------------------
Wed Jun 16 13:55:58 CEST 2021 - mbrugger@suse.com

View File

@ -31,7 +31,7 @@
Name: dtb-armv6l
Version: 5.13.0
%if 0%{?is_kotd}
Release: <RELEASE>.gaa40472
Release: <RELEASE>.g9140415
%else
Release: 0
%endif

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Jul 5 18:08:41 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
- patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch
- commit 9510801
-------------------------------------------------------------------
Thu Jul 1 18:44:34 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/ACPI-PM-s2idle-Add-missing-LPS0-functions-for-AMD.patch
- patches.suse/ACPI-processor-idle-Fix-up-C-state-latency-if-not-or.patch
- patches.suse/Bluetooth-btqca-Don-t-modify-firmware-contents-in-pl.patch
- patches.suse/brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
- patches.suse/brcmfmac-Delete-second-brcm-folder-hierarchy.patch
- patches.suse/crypto-ccp-Annotate-SEV-Firmware-file-names.patch
- commit f094788
-------------------------------------------------------------------
Thu Jul 1 16:20:28 CEST 2021 - ptesarik@suse.cz
@ -527,6 +549,22 @@ Fri Jun 18 13:07:21 CEST 2021 - jslaby@suse.cz
- net: ieee802154: fix null deref in parse dev addr (bsc#1012628).
- commit 0e46a2c
-------------------------------------------------------------------
Thu Jun 17 13:31:32 CEST 2021 - ludwig.nussel@suse.de
- UsrMerge the kernel (boo#1184804)
- Move files in /boot to modules dir
The file names in /boot are included as %ghost links. The %post script
creates symlinks for the kernel, sysctl.conf and System.map in
/boot for compatibility. Some tools require adjustments before we
can drop those links. If boot is a separate partition, a copy is
used instead of a link.
The logic for /boot/vmlinuz and /boot/initrd doesn't change with
this patch.
- Use /usr/lib/modules as module dir when usermerge is active in the
target distro.
- commit 6f5ed04
-------------------------------------------------------------------
Wed Jun 16 13:55:58 CEST 2021 - mbrugger@suse.com

View File

@ -31,7 +31,7 @@
Name: dtb-armv7l
Version: 5.13.0
%if 0%{?is_kotd}
Release: <RELEASE>.gaa40472
Release: <RELEASE>.g9140415
%else
Release: 0
%endif

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Jul 5 18:08:41 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
- patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch
- commit 9510801
-------------------------------------------------------------------
Thu Jul 1 18:44:34 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/ACPI-PM-s2idle-Add-missing-LPS0-functions-for-AMD.patch
- patches.suse/ACPI-processor-idle-Fix-up-C-state-latency-if-not-or.patch
- patches.suse/Bluetooth-btqca-Don-t-modify-firmware-contents-in-pl.patch
- patches.suse/brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
- patches.suse/brcmfmac-Delete-second-brcm-folder-hierarchy.patch
- patches.suse/crypto-ccp-Annotate-SEV-Firmware-file-names.patch
- commit f094788
-------------------------------------------------------------------
Thu Jul 1 16:20:28 CEST 2021 - ptesarik@suse.cz
@ -527,6 +549,22 @@ Fri Jun 18 13:07:21 CEST 2021 - jslaby@suse.cz
- net: ieee802154: fix null deref in parse dev addr (bsc#1012628).
- commit 0e46a2c
-------------------------------------------------------------------
Thu Jun 17 13:31:32 CEST 2021 - ludwig.nussel@suse.de
- UsrMerge the kernel (boo#1184804)
- Move files in /boot to modules dir
The file names in /boot are included as %ghost links. The %post script
creates symlinks for the kernel, sysctl.conf and System.map in
/boot for compatibility. Some tools require adjustments before we
can drop those links. If boot is a separate partition, a copy is
used instead of a link.
The logic for /boot/vmlinuz and /boot/initrd doesn't change with
this patch.
- Use /usr/lib/modules as module dir when usermerge is active in the
target distro.
- commit 6f5ed04
-------------------------------------------------------------------
Wed Jun 16 13:55:58 CEST 2021 - mbrugger@suse.com

View File

@ -31,7 +31,7 @@
Name: dtb-riscv64
Version: 5.13.0
%if 0%{?is_kotd}
Release: <RELEASE>.gaa40472
Release: <RELEASE>.g9140415
%else
Release: 0
%endif

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Jul 5 18:08:41 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
- patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch
- commit 9510801
-------------------------------------------------------------------
Thu Jul 1 18:44:34 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/ACPI-PM-s2idle-Add-missing-LPS0-functions-for-AMD.patch
- patches.suse/ACPI-processor-idle-Fix-up-C-state-latency-if-not-or.patch
- patches.suse/Bluetooth-btqca-Don-t-modify-firmware-contents-in-pl.patch
- patches.suse/brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
- patches.suse/brcmfmac-Delete-second-brcm-folder-hierarchy.patch
- patches.suse/crypto-ccp-Annotate-SEV-Firmware-file-names.patch
- commit f094788
-------------------------------------------------------------------
Thu Jul 1 16:20:28 CEST 2021 - ptesarik@suse.cz
@ -527,6 +549,22 @@ Fri Jun 18 13:07:21 CEST 2021 - jslaby@suse.cz
- net: ieee802154: fix null deref in parse dev addr (bsc#1012628).
- commit 0e46a2c
-------------------------------------------------------------------
Thu Jun 17 13:31:32 CEST 2021 - ludwig.nussel@suse.de
- UsrMerge the kernel (boo#1184804)
- Move files in /boot to modules dir
The file names in /boot are included as %ghost links. The %post script
creates symlinks for the kernel, sysctl.conf and System.map in
/boot for compatibility. Some tools require adjustments before we
can drop those links. If boot is a separate partition, a copy is
used instead of a link.
The logic for /boot/vmlinuz and /boot/initrd doesn't change with
this patch.
- Use /usr/lib/modules as module dir when usermerge is active in the
target distro.
- commit 6f5ed04
-------------------------------------------------------------------
Wed Jun 16 13:55:58 CEST 2021 - mbrugger@suse.com

View File

@ -68,13 +68,27 @@
%define install_vdso 0
%endif
# TW is usrmerged
%if %{undefined usrmerged} && 0%{?suse_version} >= 1550
%define usrmerged 1
%endif
%if 0%{?usrmerged}
%define modules_dir /usr/lib/modules/%kernelrelease-%build_flavor
%define systemmap %{modules_dir}/System.map
%else
%define modules_dir /lib/modules/%kernelrelease-%build_flavor
%define systemmap /boot/System.map-%kernelrelease-%build_flavor
%endif
Name: kernel-64kb
Summary: Kernel with 64kb PAGE_SIZE
License: GPL-2.0
Group: System/Kernel
Version: 5.13.0
%if 0%{?is_kotd}
Release: <RELEASE>.gaa40472
Release: <RELEASE>.g9140415
%else
Release: 0
%endif
@ -185,10 +199,10 @@ Conflicts: hyper-v < 4
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
Provides: kernel-%build_flavor-base-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: kernel-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: kernel-%build_flavor-base-srchash-91404150090172519addbb37c9a6ef0addc1116b
Provides: kernel-srchash-91404150090172519addbb37c9a6ef0addc1116b
# END COMMON DEPS
Provides: %name-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: %name-srchash-91404150090172519addbb37c9a6ef0addc1116b
%obsolete_rebuilds %name
Source0: http://www.kernel.org/pub/linux/kernel/v5.x/linux-%srcversion.tar.xz
Source2: source-post.sh
@ -610,6 +624,14 @@ done
%install
%if 0%{?usrmerged}
# add symlink for usrmerge so install scripts will just follow the
# link and end up placing files in /usr/lib. The link will be
# removed later and is not packaged here.
mkdir -p %{buildroot}/usr/lib
ln -s usr/lib %{buildroot}/lib
%endif
# get rid of /usr/lib/rpm/brp-strip-debug
# strip removes too much from the vmlinux ELF binary
export NO_BRP_STRIP_DEBUG=true
@ -702,11 +724,19 @@ add_vmlinux()
# sign the modules, firmware and possibly the kernel in the buildservice
BRP_PESIGN_FILES=""
%if "%CONFIG_EFI_STUB" == "y"
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%ifarch s390x ppc64 ppc64le
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%if "%CONFIG_MODULE_SIG" == "y"
BRP_PESIGN_FILES="$BRP_PESIGN_FILES *.ko"
%endif
@ -768,6 +798,13 @@ for sub in '' '-extra' \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
-e "s:@MODULESDIR@:%modules_dir:g" \
-e "s:@SYSTEMMAP@:%systemmap:g" \
%if 0%{?usrmerged}
-e "s:^@USRMERGE@::" \
%else
-e "/^@USRMERGE@/d" \
%endif
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
if test "$base_package" -eq 1 -a "${#certs[@]}" -gt 0; then
case "$script" in
@ -976,6 +1013,10 @@ if [ %CONFIG_MODULES = y ]; then
fi
rm -rf %{buildroot}/lib/firmware
%if 0%{?usrmerged}
# remove usrmerge aid
rm %{buildroot}/lib
%endif
add_dirs_to_filelist() {
sed -rn '
@ -988,7 +1029,7 @@ add_dirs_to_filelist() {
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:^%%dir (/boot|/etc|(/usr)?/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
@ -1001,10 +1042,23 @@ fi
shopt -s nullglob dotglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f"
done | add_dirs_to_filelist >%my_builddir/kernel-devel.files
{
echo "%modules_dir/build"
echo "%modules_dir/source"
cd %buildroot
for file in boot/symtypes*; do
%if 0%{?usrmerged}
l="${file##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
mv "$file" "%{buildroot}$l"
ln -s "..$l" $file
echo "$l"
echo "%%ghost /$file"
%else
echo "/$file"
%endif
done
} | add_dirs_to_filelist >%my_builddir/kernel-devel.files
( cd %buildroot ; find .%obj_install_dir/%cpu_arch_flavor -type f ; ) | \
sed -e 's/^[.]//' | grep -v -e '[.]ipa-clones$' -e '/Symbols[.]list$' -e '/ipa-clones[.]list$'| \
add_dirs_to_filelist >> %my_builddir/kernel-devel.files
@ -1013,6 +1067,8 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
echo %ghost /boot/initrd$suffix
cd %buildroot
for f in boot/*; do
l="${f##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
if test -L "$f"; then
echo "%%ghost /$f"
continue
@ -1028,24 +1084,46 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
;;
boot/vmlinux-*)
if $ghost_vmlinux; then
echo "%%ghost /$f"
continue
# fall through to mark next echo as %ghost
echo -n "%%ghost "
fi
;;
%if 0%{?usrmerged}
boot/vmlinuz-*)
echo -n "%%attr(0644, root, root) "
;;
%endif
boot/symtypes*)
%if 0%{?usrmerged}
echo "%exclude $l"
%endif
continue
;;
esac
%if 0%{?usrmerged}
mv "$f" "./$l"
ln -s "..$l" $f
# the find in the CONFIG_MODULES condition below also finds the files
# but there's sort -u later, so this is ok
echo "$l" # note: must be first after case statement above
echo "%%ghost /$f"
%else
echo "%%attr(0644, root, root) /$f"
%endif
done
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
find %{?usrmerged:usr/}lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \
! -path '*/modules.builtin.modinfo' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -type f -printf '/%%p\n'
-o -name '*.ko' -prune \
%if 0%{?usrmerged}
-o \( -type f ! -path '*/symtypes*' ! -path '*/vmlinu*' \) -printf '/%%p\n'
%else
-o -type f -printf '/%%p\n'
%endif
cat %my_builddir/base-modules
fi
if test %CONFIG_MODULE_SIG = "y" -a -d etc/uefi/certs; then
@ -1103,15 +1181,15 @@ for f in %my_builddir/*-kmp-modules; do
done
if [ %CONFIG_MODULES = y ]; then
install -m 644 %_sourcedir/modules.fips %{buildroot}/lib/modules/%kernelrelease-%build_flavor/modules.fips
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-base.files
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-main.files
install -m 644 %_sourcedir/modules.fips %{buildroot}%modules_dir/modules.fips
echo %modules_dir/modules.fips >> %my_builddir/kernel-base.files
echo %modules_dir/modules.fips >> %my_builddir/kernel-main.files
fi
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%fdupes %buildroot%modules_dir
%preun -f preun.sh
@ -1294,7 +1372,7 @@ static, unlike the %{patch_package}-<kernel-version>-flavor package names.
%files %{livepatch}
# rpmlint complains about empty packages, so lets own something
%defattr(-, root, root)
%dir /lib/modules/%kernelrelease-%build_flavor
%dir %modules_dir
%endif
%if 0%{?klp_symbols} && "%livepatch" != ""

View File

@ -68,6 +68,20 @@
%define install_vdso 0
%endif
# TW is usrmerged
%if %{undefined usrmerged} && 0%{?suse_version} >= 1550
%define usrmerged 1
%endif
%if 0%{?usrmerged}
%define modules_dir /usr/lib/modules/%kernelrelease-%build_flavor
%define systemmap %{modules_dir}/System.map
%else
%define modules_dir /lib/modules/%kernelrelease-%build_flavor
%define systemmap /boot/System.map-%kernelrelease-%build_flavor
%endif
Name: kernel-@FLAVOR@
Summary: @SUMMARY@
License: GPL-2.0
@ -465,6 +479,14 @@ done
%install
%if 0%{?usrmerged}
# add symlink for usrmerge so install scripts will just follow the
# link and end up placing files in /usr/lib. The link will be
# removed later and is not packaged here.
mkdir -p %{buildroot}/usr/lib
ln -s usr/lib %{buildroot}/lib
%endif
# get rid of /usr/lib/rpm/brp-strip-debug
# strip removes too much from the vmlinux ELF binary
export NO_BRP_STRIP_DEBUG=true
@ -557,11 +579,19 @@ add_vmlinux()
# sign the modules, firmware and possibly the kernel in the buildservice
BRP_PESIGN_FILES=""
%if "%CONFIG_EFI_STUB" == "y"
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%ifarch s390x ppc64 ppc64le
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%if "%CONFIG_MODULE_SIG" == "y"
BRP_PESIGN_FILES="$BRP_PESIGN_FILES *.ko"
%endif
@ -623,6 +653,13 @@ for sub in '' '-extra' \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
-e "s:@MODULESDIR@:%modules_dir:g" \
-e "s:@SYSTEMMAP@:%systemmap:g" \
%if 0%{?usrmerged}
-e "s:^@USRMERGE@::" \
%else
-e "/^@USRMERGE@/d" \
%endif
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
if test "$base_package" -eq 1 -a "${#certs[@]}" -gt 0; then
case "$script" in
@ -831,6 +868,10 @@ if [ %CONFIG_MODULES = y ]; then
fi
rm -rf %{buildroot}/lib/firmware
%if 0%{?usrmerged}
# remove usrmerge aid
rm %{buildroot}/lib
%endif
add_dirs_to_filelist() {
sed -rn '
@ -843,7 +884,7 @@ add_dirs_to_filelist() {
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:^%%dir (/boot|/etc|(/usr)?/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
@ -856,10 +897,23 @@ fi
shopt -s nullglob dotglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f"
done | add_dirs_to_filelist >%my_builddir/kernel-devel.files
{
echo "%modules_dir/build"
echo "%modules_dir/source"
cd %buildroot
for file in boot/symtypes*; do
%if 0%{?usrmerged}
l="${file##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
mv "$file" "%{buildroot}$l"
ln -s "..$l" $file
echo "$l"
echo "%%ghost /$file"
%else
echo "/$file"
%endif
done
} | add_dirs_to_filelist >%my_builddir/kernel-devel.files
( cd %buildroot ; find .%obj_install_dir/%cpu_arch_flavor -type f ; ) | \
sed -e 's/^[.]//' | grep -v -e '[.]ipa-clones$' -e '/Symbols[.]list$' -e '/ipa-clones[.]list$'| \
add_dirs_to_filelist >> %my_builddir/kernel-devel.files
@ -868,6 +922,8 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
echo %ghost /boot/initrd$suffix
cd %buildroot
for f in boot/*; do
l="${f##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
if test -L "$f"; then
echo "%%ghost /$f"
continue
@ -883,24 +939,46 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
;;
boot/vmlinux-*)
if $ghost_vmlinux; then
echo "%%ghost /$f"
continue
# fall through to mark next echo as %ghost
echo -n "%%ghost "
fi
;;
%if 0%{?usrmerged}
boot/vmlinuz-*)
echo -n "%%attr(0644, root, root) "
;;
%endif
boot/symtypes*)
%if 0%{?usrmerged}
echo "%exclude $l"
%endif
continue
;;
esac
%if 0%{?usrmerged}
mv "$f" "./$l"
ln -s "..$l" $f
# the find in the CONFIG_MODULES condition below also finds the files
# but there's sort -u later, so this is ok
echo "$l" # note: must be first after case statement above
echo "%%ghost /$f"
%else
echo "%%attr(0644, root, root) /$f"
%endif
done
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
find %{?usrmerged:usr/}lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \
! -path '*/modules.builtin.modinfo' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -type f -printf '/%%p\n'
-o -name '*.ko' -prune \
%if 0%{?usrmerged}
-o \( -type f ! -path '*/symtypes*' ! -path '*/vmlinu*' \) -printf '/%%p\n'
%else
-o -type f -printf '/%%p\n'
%endif
cat %my_builddir/base-modules
fi
if test %CONFIG_MODULE_SIG = "y" -a -d etc/uefi/certs; then
@ -958,15 +1036,15 @@ for f in %my_builddir/*-kmp-modules; do
done
if [ %CONFIG_MODULES = y ]; then
install -m 644 %_sourcedir/modules.fips %{buildroot}/lib/modules/%kernelrelease-%build_flavor/modules.fips
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-base.files
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-main.files
install -m 644 %_sourcedir/modules.fips %{buildroot}%modules_dir/modules.fips
echo %modules_dir/modules.fips >> %my_builddir/kernel-base.files
echo %modules_dir/modules.fips >> %my_builddir/kernel-main.files
fi
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%fdupes %buildroot%modules_dir
%preun -f preun.sh
@ -1146,7 +1224,7 @@ static, unlike the %{patch_package}-<kernel-version>-flavor package names.
%files %{livepatch}
# rpmlint complains about empty packages, so lets own something
%defattr(-, root, root)
%dir /lib/modules/%kernelrelease-%build_flavor
%dir %modules_dir
%endif
%if 0%{?klp_symbols} && "%livepatch" != ""

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Jul 5 18:08:41 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
- patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch
- commit 9510801
-------------------------------------------------------------------
Thu Jul 1 18:44:34 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/ACPI-PM-s2idle-Add-missing-LPS0-functions-for-AMD.patch
- patches.suse/ACPI-processor-idle-Fix-up-C-state-latency-if-not-or.patch
- patches.suse/Bluetooth-btqca-Don-t-modify-firmware-contents-in-pl.patch
- patches.suse/brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
- patches.suse/brcmfmac-Delete-second-brcm-folder-hierarchy.patch
- patches.suse/crypto-ccp-Annotate-SEV-Firmware-file-names.patch
- commit f094788
-------------------------------------------------------------------
Thu Jul 1 16:20:28 CEST 2021 - ptesarik@suse.cz
@ -527,6 +549,22 @@ Fri Jun 18 13:07:21 CEST 2021 - jslaby@suse.cz
- net: ieee802154: fix null deref in parse dev addr (bsc#1012628).
- commit 0e46a2c
-------------------------------------------------------------------
Thu Jun 17 13:31:32 CEST 2021 - ludwig.nussel@suse.de
- UsrMerge the kernel (boo#1184804)
- Move files in /boot to modules dir
The file names in /boot are included as %ghost links. The %post script
creates symlinks for the kernel, sysctl.conf and System.map in
/boot for compatibility. Some tools require adjustments before we
can drop those links. If boot is a separate partition, a copy is
used instead of a link.
The logic for /boot/vmlinuz and /boot/initrd doesn't change with
this patch.
- Use /usr/lib/modules as module dir when usermerge is active in the
target distro.
- commit 6f5ed04
-------------------------------------------------------------------
Wed Jun 16 13:55:58 CEST 2021 - mbrugger@suse.com

View File

@ -68,13 +68,27 @@
%define install_vdso 0
%endif
# TW is usrmerged
%if %{undefined usrmerged} && 0%{?suse_version} >= 1550
%define usrmerged 1
%endif
%if 0%{?usrmerged}
%define modules_dir /usr/lib/modules/%kernelrelease-%build_flavor
%define systemmap %{modules_dir}/System.map
%else
%define modules_dir /lib/modules/%kernelrelease-%build_flavor
%define systemmap /boot/System.map-%kernelrelease-%build_flavor
%endif
Name: kernel-debug
Summary: A Debug Version of the Kernel
License: GPL-2.0
Group: System/Kernel
Version: 5.13.0
%if 0%{?is_kotd}
Release: <RELEASE>.gaa40472
Release: <RELEASE>.g9140415
%else
Release: 0
%endif
@ -185,10 +199,10 @@ Conflicts: hyper-v < 4
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
Provides: kernel-%build_flavor-base-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: kernel-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: kernel-%build_flavor-base-srchash-91404150090172519addbb37c9a6ef0addc1116b
Provides: kernel-srchash-91404150090172519addbb37c9a6ef0addc1116b
# END COMMON DEPS
Provides: %name-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: %name-srchash-91404150090172519addbb37c9a6ef0addc1116b
%ifarch ppc64
Provides: kernel-kdump = 2.6.28
Obsoletes: kernel-kdump <= 2.6.28
@ -616,6 +630,14 @@ done
%install
%if 0%{?usrmerged}
# add symlink for usrmerge so install scripts will just follow the
# link and end up placing files in /usr/lib. The link will be
# removed later and is not packaged here.
mkdir -p %{buildroot}/usr/lib
ln -s usr/lib %{buildroot}/lib
%endif
# get rid of /usr/lib/rpm/brp-strip-debug
# strip removes too much from the vmlinux ELF binary
export NO_BRP_STRIP_DEBUG=true
@ -708,11 +730,19 @@ add_vmlinux()
# sign the modules, firmware and possibly the kernel in the buildservice
BRP_PESIGN_FILES=""
%if "%CONFIG_EFI_STUB" == "y"
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%ifarch s390x ppc64 ppc64le
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%if "%CONFIG_MODULE_SIG" == "y"
BRP_PESIGN_FILES="$BRP_PESIGN_FILES *.ko"
%endif
@ -774,6 +804,13 @@ for sub in '' '-extra' \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
-e "s:@MODULESDIR@:%modules_dir:g" \
-e "s:@SYSTEMMAP@:%systemmap:g" \
%if 0%{?usrmerged}
-e "s:^@USRMERGE@::" \
%else
-e "/^@USRMERGE@/d" \
%endif
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
if test "$base_package" -eq 1 -a "${#certs[@]}" -gt 0; then
case "$script" in
@ -982,6 +1019,10 @@ if [ %CONFIG_MODULES = y ]; then
fi
rm -rf %{buildroot}/lib/firmware
%if 0%{?usrmerged}
# remove usrmerge aid
rm %{buildroot}/lib
%endif
add_dirs_to_filelist() {
sed -rn '
@ -994,7 +1035,7 @@ add_dirs_to_filelist() {
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:^%%dir (/boot|/etc|(/usr)?/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
@ -1007,10 +1048,23 @@ fi
shopt -s nullglob dotglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f"
done | add_dirs_to_filelist >%my_builddir/kernel-devel.files
{
echo "%modules_dir/build"
echo "%modules_dir/source"
cd %buildroot
for file in boot/symtypes*; do
%if 0%{?usrmerged}
l="${file##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
mv "$file" "%{buildroot}$l"
ln -s "..$l" $file
echo "$l"
echo "%%ghost /$file"
%else
echo "/$file"
%endif
done
} | add_dirs_to_filelist >%my_builddir/kernel-devel.files
( cd %buildroot ; find .%obj_install_dir/%cpu_arch_flavor -type f ; ) | \
sed -e 's/^[.]//' | grep -v -e '[.]ipa-clones$' -e '/Symbols[.]list$' -e '/ipa-clones[.]list$'| \
add_dirs_to_filelist >> %my_builddir/kernel-devel.files
@ -1019,6 +1073,8 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
echo %ghost /boot/initrd$suffix
cd %buildroot
for f in boot/*; do
l="${f##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
if test -L "$f"; then
echo "%%ghost /$f"
continue
@ -1034,24 +1090,46 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
;;
boot/vmlinux-*)
if $ghost_vmlinux; then
echo "%%ghost /$f"
continue
# fall through to mark next echo as %ghost
echo -n "%%ghost "
fi
;;
%if 0%{?usrmerged}
boot/vmlinuz-*)
echo -n "%%attr(0644, root, root) "
;;
%endif
boot/symtypes*)
%if 0%{?usrmerged}
echo "%exclude $l"
%endif
continue
;;
esac
%if 0%{?usrmerged}
mv "$f" "./$l"
ln -s "..$l" $f
# the find in the CONFIG_MODULES condition below also finds the files
# but there's sort -u later, so this is ok
echo "$l" # note: must be first after case statement above
echo "%%ghost /$f"
%else
echo "%%attr(0644, root, root) /$f"
%endif
done
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
find %{?usrmerged:usr/}lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \
! -path '*/modules.builtin.modinfo' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -type f -printf '/%%p\n'
-o -name '*.ko' -prune \
%if 0%{?usrmerged}
-o \( -type f ! -path '*/symtypes*' ! -path '*/vmlinu*' \) -printf '/%%p\n'
%else
-o -type f -printf '/%%p\n'
%endif
cat %my_builddir/base-modules
fi
if test %CONFIG_MODULE_SIG = "y" -a -d etc/uefi/certs; then
@ -1109,15 +1187,15 @@ for f in %my_builddir/*-kmp-modules; do
done
if [ %CONFIG_MODULES = y ]; then
install -m 644 %_sourcedir/modules.fips %{buildroot}/lib/modules/%kernelrelease-%build_flavor/modules.fips
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-base.files
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-main.files
install -m 644 %_sourcedir/modules.fips %{buildroot}%modules_dir/modules.fips
echo %modules_dir/modules.fips >> %my_builddir/kernel-base.files
echo %modules_dir/modules.fips >> %my_builddir/kernel-main.files
fi
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%fdupes %buildroot%modules_dir
%preun -f preun.sh
@ -1308,7 +1386,7 @@ static, unlike the %{patch_package}-<kernel-version>-flavor package names.
%files %{livepatch}
# rpmlint complains about empty packages, so lets own something
%defattr(-, root, root)
%dir /lib/modules/%kernelrelease-%build_flavor
%dir %modules_dir
%endif
%if 0%{?klp_symbols} && "%livepatch" != ""

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Jul 5 18:08:41 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
- patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch
- commit 9510801
-------------------------------------------------------------------
Thu Jul 1 18:44:34 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/ACPI-PM-s2idle-Add-missing-LPS0-functions-for-AMD.patch
- patches.suse/ACPI-processor-idle-Fix-up-C-state-latency-if-not-or.patch
- patches.suse/Bluetooth-btqca-Don-t-modify-firmware-contents-in-pl.patch
- patches.suse/brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
- patches.suse/brcmfmac-Delete-second-brcm-folder-hierarchy.patch
- patches.suse/crypto-ccp-Annotate-SEV-Firmware-file-names.patch
- commit f094788
-------------------------------------------------------------------
Thu Jul 1 16:20:28 CEST 2021 - ptesarik@suse.cz
@ -527,6 +549,22 @@ Fri Jun 18 13:07:21 CEST 2021 - jslaby@suse.cz
- net: ieee802154: fix null deref in parse dev addr (bsc#1012628).
- commit 0e46a2c
-------------------------------------------------------------------
Thu Jun 17 13:31:32 CEST 2021 - ludwig.nussel@suse.de
- UsrMerge the kernel (boo#1184804)
- Move files in /boot to modules dir
The file names in /boot are included as %ghost links. The %post script
creates symlinks for the kernel, sysctl.conf and System.map in
/boot for compatibility. Some tools require adjustments before we
can drop those links. If boot is a separate partition, a copy is
used instead of a link.
The logic for /boot/vmlinuz and /boot/initrd doesn't change with
this patch.
- Use /usr/lib/modules as module dir when usermerge is active in the
target distro.
- commit 6f5ed04
-------------------------------------------------------------------
Wed Jun 16 13:55:58 CEST 2021 - mbrugger@suse.com

View File

@ -68,13 +68,27 @@
%define install_vdso 0
%endif
# TW is usrmerged
%if %{undefined usrmerged} && 0%{?suse_version} >= 1550
%define usrmerged 1
%endif
%if 0%{?usrmerged}
%define modules_dir /usr/lib/modules/%kernelrelease-%build_flavor
%define systemmap %{modules_dir}/System.map
%else
%define modules_dir /lib/modules/%kernelrelease-%build_flavor
%define systemmap /boot/System.map-%kernelrelease-%build_flavor
%endif
Name: kernel-default
Summary: The Standard Kernel
License: GPL-2.0
Group: System/Kernel
Version: 5.13.0
%if 0%{?is_kotd}
Release: <RELEASE>.gaa40472
Release: <RELEASE>.g9140415
%else
Release: 0
%endif
@ -185,10 +199,10 @@ Conflicts: hyper-v < 4
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
Provides: kernel-%build_flavor-base-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: kernel-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: kernel-%build_flavor-base-srchash-91404150090172519addbb37c9a6ef0addc1116b
Provides: kernel-srchash-91404150090172519addbb37c9a6ef0addc1116b
# END COMMON DEPS
Provides: %name-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: %name-srchash-91404150090172519addbb37c9a6ef0addc1116b
%ifarch %ix86
Provides: kernel-smp = 2.6.17
Obsoletes: kernel-smp <= 2.6.17
@ -659,6 +673,14 @@ done
%install
%if 0%{?usrmerged}
# add symlink for usrmerge so install scripts will just follow the
# link and end up placing files in /usr/lib. The link will be
# removed later and is not packaged here.
mkdir -p %{buildroot}/usr/lib
ln -s usr/lib %{buildroot}/lib
%endif
# get rid of /usr/lib/rpm/brp-strip-debug
# strip removes too much from the vmlinux ELF binary
export NO_BRP_STRIP_DEBUG=true
@ -751,11 +773,19 @@ add_vmlinux()
# sign the modules, firmware and possibly the kernel in the buildservice
BRP_PESIGN_FILES=""
%if "%CONFIG_EFI_STUB" == "y"
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%ifarch s390x ppc64 ppc64le
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%if "%CONFIG_MODULE_SIG" == "y"
BRP_PESIGN_FILES="$BRP_PESIGN_FILES *.ko"
%endif
@ -817,6 +847,13 @@ for sub in '' '-extra' \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
-e "s:@MODULESDIR@:%modules_dir:g" \
-e "s:@SYSTEMMAP@:%systemmap:g" \
%if 0%{?usrmerged}
-e "s:^@USRMERGE@::" \
%else
-e "/^@USRMERGE@/d" \
%endif
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
if test "$base_package" -eq 1 -a "${#certs[@]}" -gt 0; then
case "$script" in
@ -1025,6 +1062,10 @@ if [ %CONFIG_MODULES = y ]; then
fi
rm -rf %{buildroot}/lib/firmware
%if 0%{?usrmerged}
# remove usrmerge aid
rm %{buildroot}/lib
%endif
add_dirs_to_filelist() {
sed -rn '
@ -1037,7 +1078,7 @@ add_dirs_to_filelist() {
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:^%%dir (/boot|/etc|(/usr)?/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
@ -1050,10 +1091,23 @@ fi
shopt -s nullglob dotglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f"
done | add_dirs_to_filelist >%my_builddir/kernel-devel.files
{
echo "%modules_dir/build"
echo "%modules_dir/source"
cd %buildroot
for file in boot/symtypes*; do
%if 0%{?usrmerged}
l="${file##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
mv "$file" "%{buildroot}$l"
ln -s "..$l" $file
echo "$l"
echo "%%ghost /$file"
%else
echo "/$file"
%endif
done
} | add_dirs_to_filelist >%my_builddir/kernel-devel.files
( cd %buildroot ; find .%obj_install_dir/%cpu_arch_flavor -type f ; ) | \
sed -e 's/^[.]//' | grep -v -e '[.]ipa-clones$' -e '/Symbols[.]list$' -e '/ipa-clones[.]list$'| \
add_dirs_to_filelist >> %my_builddir/kernel-devel.files
@ -1062,6 +1116,8 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
echo %ghost /boot/initrd$suffix
cd %buildroot
for f in boot/*; do
l="${f##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
if test -L "$f"; then
echo "%%ghost /$f"
continue
@ -1077,24 +1133,46 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
;;
boot/vmlinux-*)
if $ghost_vmlinux; then
echo "%%ghost /$f"
continue
# fall through to mark next echo as %ghost
echo -n "%%ghost "
fi
;;
%if 0%{?usrmerged}
boot/vmlinuz-*)
echo -n "%%attr(0644, root, root) "
;;
%endif
boot/symtypes*)
%if 0%{?usrmerged}
echo "%exclude $l"
%endif
continue
;;
esac
%if 0%{?usrmerged}
mv "$f" "./$l"
ln -s "..$l" $f
# the find in the CONFIG_MODULES condition below also finds the files
# but there's sort -u later, so this is ok
echo "$l" # note: must be first after case statement above
echo "%%ghost /$f"
%else
echo "%%attr(0644, root, root) /$f"
%endif
done
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
find %{?usrmerged:usr/}lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \
! -path '*/modules.builtin.modinfo' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -type f -printf '/%%p\n'
-o -name '*.ko' -prune \
%if 0%{?usrmerged}
-o \( -type f ! -path '*/symtypes*' ! -path '*/vmlinu*' \) -printf '/%%p\n'
%else
-o -type f -printf '/%%p\n'
%endif
cat %my_builddir/base-modules
fi
if test %CONFIG_MODULE_SIG = "y" -a -d etc/uefi/certs; then
@ -1152,15 +1230,15 @@ for f in %my_builddir/*-kmp-modules; do
done
if [ %CONFIG_MODULES = y ]; then
install -m 644 %_sourcedir/modules.fips %{buildroot}/lib/modules/%kernelrelease-%build_flavor/modules.fips
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-base.files
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-main.files
install -m 644 %_sourcedir/modules.fips %{buildroot}%modules_dir/modules.fips
echo %modules_dir/modules.fips >> %my_builddir/kernel-base.files
echo %modules_dir/modules.fips >> %my_builddir/kernel-main.files
fi
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%fdupes %buildroot%modules_dir
%preun -f preun.sh
@ -1409,7 +1487,7 @@ static, unlike the %{patch_package}-<kernel-version>-flavor package names.
%files %{livepatch}
# rpmlint complains about empty packages, so lets own something
%defattr(-, root, root)
%dir /lib/modules/%kernelrelease-%build_flavor
%dir %modules_dir
%endif
%if 0%{?klp_symbols} && "%livepatch" != ""

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Jul 5 18:08:41 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
- patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch
- commit 9510801
-------------------------------------------------------------------
Thu Jul 1 18:44:34 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/ACPI-PM-s2idle-Add-missing-LPS0-functions-for-AMD.patch
- patches.suse/ACPI-processor-idle-Fix-up-C-state-latency-if-not-or.patch
- patches.suse/Bluetooth-btqca-Don-t-modify-firmware-contents-in-pl.patch
- patches.suse/brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
- patches.suse/brcmfmac-Delete-second-brcm-folder-hierarchy.patch
- patches.suse/crypto-ccp-Annotate-SEV-Firmware-file-names.patch
- commit f094788
-------------------------------------------------------------------
Thu Jul 1 16:20:28 CEST 2021 - ptesarik@suse.cz
@ -527,6 +549,22 @@ Fri Jun 18 13:07:21 CEST 2021 - jslaby@suse.cz
- net: ieee802154: fix null deref in parse dev addr (bsc#1012628).
- commit 0e46a2c
-------------------------------------------------------------------
Thu Jun 17 13:31:32 CEST 2021 - ludwig.nussel@suse.de
- UsrMerge the kernel (boo#1184804)
- Move files in /boot to modules dir
The file names in /boot are included as %ghost links. The %post script
creates symlinks for the kernel, sysctl.conf and System.map in
/boot for compatibility. Some tools require adjustments before we
can drop those links. If boot is a separate partition, a copy is
used instead of a link.
The logic for /boot/vmlinuz and /boot/initrd doesn't change with
this patch.
- Use /usr/lib/modules as module dir when usermerge is active in the
target distro.
- commit 6f5ed04
-------------------------------------------------------------------
Wed Jun 16 13:55:58 CEST 2021 - mbrugger@suse.com

View File

@ -33,7 +33,7 @@ License: GPL-2.0
Group: Documentation/Man
Version: 5.13.0
%if 0%{?is_kotd}
Release: <RELEASE>.gaa40472
Release: <RELEASE>.g9140415
%else
Release: 0
%endif
@ -64,7 +64,7 @@ BuildRequires: texlive-zapfding
%endif
Url: http://www.kernel.org/
Provides: %name = %version-%source_rel
Provides: %name-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: %name-srchash-91404150090172519addbb37c9a6ef0addc1116b
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: http://www.kernel.org/pub/linux/kernel/v5.x/linux-%srcversion.tar.xz

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Jul 5 18:08:41 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
- patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch
- commit 9510801
-------------------------------------------------------------------
Thu Jul 1 18:44:34 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/ACPI-PM-s2idle-Add-missing-LPS0-functions-for-AMD.patch
- patches.suse/ACPI-processor-idle-Fix-up-C-state-latency-if-not-or.patch
- patches.suse/Bluetooth-btqca-Don-t-modify-firmware-contents-in-pl.patch
- patches.suse/brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
- patches.suse/brcmfmac-Delete-second-brcm-folder-hierarchy.patch
- patches.suse/crypto-ccp-Annotate-SEV-Firmware-file-names.patch
- commit f094788
-------------------------------------------------------------------
Thu Jul 1 16:20:28 CEST 2021 - ptesarik@suse.cz
@ -527,6 +549,22 @@ Fri Jun 18 13:07:21 CEST 2021 - jslaby@suse.cz
- net: ieee802154: fix null deref in parse dev addr (bsc#1012628).
- commit 0e46a2c
-------------------------------------------------------------------
Thu Jun 17 13:31:32 CEST 2021 - ludwig.nussel@suse.de
- UsrMerge the kernel (boo#1184804)
- Move files in /boot to modules dir
The file names in /boot are included as %ghost links. The %post script
creates symlinks for the kernel, sysctl.conf and System.map in
/boot for compatibility. Some tools require adjustments before we
can drop those links. If boot is a separate partition, a copy is
used instead of a link.
The logic for /boot/vmlinuz and /boot/initrd doesn't change with
this patch.
- Use /usr/lib/modules as module dir when usermerge is active in the
target distro.
- commit 6f5ed04
-------------------------------------------------------------------
Wed Jun 16 13:55:58 CEST 2021 - mbrugger@suse.com

View File

@ -68,13 +68,27 @@
%define install_vdso 0
%endif
# TW is usrmerged
%if %{undefined usrmerged} && 0%{?suse_version} >= 1550
%define usrmerged 1
%endif
%if 0%{?usrmerged}
%define modules_dir /usr/lib/modules/%kernelrelease-%build_flavor
%define systemmap %{modules_dir}/System.map
%else
%define modules_dir /lib/modules/%kernelrelease-%build_flavor
%define systemmap /boot/System.map-%kernelrelease-%build_flavor
%endif
Name: kernel-kvmsmall
Summary: The Small Developer Kernel for KVM
License: GPL-2.0
Group: System/Kernel
Version: 5.13.0
%if 0%{?is_kotd}
Release: <RELEASE>.gaa40472
Release: <RELEASE>.g9140415
%else
Release: 0
%endif
@ -185,10 +199,10 @@ Conflicts: hyper-v < 4
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
Provides: kernel-%build_flavor-base-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: kernel-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: kernel-%build_flavor-base-srchash-91404150090172519addbb37c9a6ef0addc1116b
Provides: kernel-srchash-91404150090172519addbb37c9a6ef0addc1116b
# END COMMON DEPS
Provides: %name-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: %name-srchash-91404150090172519addbb37c9a6ef0addc1116b
%obsolete_rebuilds %name
Source0: http://www.kernel.org/pub/linux/kernel/v5.x/linux-%srcversion.tar.xz
Source2: source-post.sh
@ -614,6 +628,14 @@ done
%install
%if 0%{?usrmerged}
# add symlink for usrmerge so install scripts will just follow the
# link and end up placing files in /usr/lib. The link will be
# removed later and is not packaged here.
mkdir -p %{buildroot}/usr/lib
ln -s usr/lib %{buildroot}/lib
%endif
# get rid of /usr/lib/rpm/brp-strip-debug
# strip removes too much from the vmlinux ELF binary
export NO_BRP_STRIP_DEBUG=true
@ -706,11 +728,19 @@ add_vmlinux()
# sign the modules, firmware and possibly the kernel in the buildservice
BRP_PESIGN_FILES=""
%if "%CONFIG_EFI_STUB" == "y"
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%ifarch s390x ppc64 ppc64le
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%if "%CONFIG_MODULE_SIG" == "y"
BRP_PESIGN_FILES="$BRP_PESIGN_FILES *.ko"
%endif
@ -772,6 +802,13 @@ for sub in '' '-extra' \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
-e "s:@MODULESDIR@:%modules_dir:g" \
-e "s:@SYSTEMMAP@:%systemmap:g" \
%if 0%{?usrmerged}
-e "s:^@USRMERGE@::" \
%else
-e "/^@USRMERGE@/d" \
%endif
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
if test "$base_package" -eq 1 -a "${#certs[@]}" -gt 0; then
case "$script" in
@ -980,6 +1017,10 @@ if [ %CONFIG_MODULES = y ]; then
fi
rm -rf %{buildroot}/lib/firmware
%if 0%{?usrmerged}
# remove usrmerge aid
rm %{buildroot}/lib
%endif
add_dirs_to_filelist() {
sed -rn '
@ -992,7 +1033,7 @@ add_dirs_to_filelist() {
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:^%%dir (/boot|/etc|(/usr)?/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
@ -1005,10 +1046,23 @@ fi
shopt -s nullglob dotglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f"
done | add_dirs_to_filelist >%my_builddir/kernel-devel.files
{
echo "%modules_dir/build"
echo "%modules_dir/source"
cd %buildroot
for file in boot/symtypes*; do
%if 0%{?usrmerged}
l="${file##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
mv "$file" "%{buildroot}$l"
ln -s "..$l" $file
echo "$l"
echo "%%ghost /$file"
%else
echo "/$file"
%endif
done
} | add_dirs_to_filelist >%my_builddir/kernel-devel.files
( cd %buildroot ; find .%obj_install_dir/%cpu_arch_flavor -type f ; ) | \
sed -e 's/^[.]//' | grep -v -e '[.]ipa-clones$' -e '/Symbols[.]list$' -e '/ipa-clones[.]list$'| \
add_dirs_to_filelist >> %my_builddir/kernel-devel.files
@ -1017,6 +1071,8 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
echo %ghost /boot/initrd$suffix
cd %buildroot
for f in boot/*; do
l="${f##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
if test -L "$f"; then
echo "%%ghost /$f"
continue
@ -1032,24 +1088,46 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
;;
boot/vmlinux-*)
if $ghost_vmlinux; then
echo "%%ghost /$f"
continue
# fall through to mark next echo as %ghost
echo -n "%%ghost "
fi
;;
%if 0%{?usrmerged}
boot/vmlinuz-*)
echo -n "%%attr(0644, root, root) "
;;
%endif
boot/symtypes*)
%if 0%{?usrmerged}
echo "%exclude $l"
%endif
continue
;;
esac
%if 0%{?usrmerged}
mv "$f" "./$l"
ln -s "..$l" $f
# the find in the CONFIG_MODULES condition below also finds the files
# but there's sort -u later, so this is ok
echo "$l" # note: must be first after case statement above
echo "%%ghost /$f"
%else
echo "%%attr(0644, root, root) /$f"
%endif
done
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
find %{?usrmerged:usr/}lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \
! -path '*/modules.builtin.modinfo' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -type f -printf '/%%p\n'
-o -name '*.ko' -prune \
%if 0%{?usrmerged}
-o \( -type f ! -path '*/symtypes*' ! -path '*/vmlinu*' \) -printf '/%%p\n'
%else
-o -type f -printf '/%%p\n'
%endif
cat %my_builddir/base-modules
fi
if test %CONFIG_MODULE_SIG = "y" -a -d etc/uefi/certs; then
@ -1107,15 +1185,15 @@ for f in %my_builddir/*-kmp-modules; do
done
if [ %CONFIG_MODULES = y ]; then
install -m 644 %_sourcedir/modules.fips %{buildroot}/lib/modules/%kernelrelease-%build_flavor/modules.fips
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-base.files
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-main.files
install -m 644 %_sourcedir/modules.fips %{buildroot}%modules_dir/modules.fips
echo %modules_dir/modules.fips >> %my_builddir/kernel-base.files
echo %modules_dir/modules.fips >> %my_builddir/kernel-main.files
fi
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%fdupes %buildroot%modules_dir
%preun -f preun.sh
@ -1306,7 +1384,7 @@ static, unlike the %{patch_package}-<kernel-version>-flavor package names.
%files %{livepatch}
# rpmlint complains about empty packages, so lets own something
%defattr(-, root, root)
%dir /lib/modules/%kernelrelease-%build_flavor
%dir %modules_dir
%endif
%if 0%{?klp_symbols} && "%livepatch" != ""

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Jul 5 18:08:41 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
- patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch
- commit 9510801
-------------------------------------------------------------------
Thu Jul 1 18:44:34 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/ACPI-PM-s2idle-Add-missing-LPS0-functions-for-AMD.patch
- patches.suse/ACPI-processor-idle-Fix-up-C-state-latency-if-not-or.patch
- patches.suse/Bluetooth-btqca-Don-t-modify-firmware-contents-in-pl.patch
- patches.suse/brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
- patches.suse/brcmfmac-Delete-second-brcm-folder-hierarchy.patch
- patches.suse/crypto-ccp-Annotate-SEV-Firmware-file-names.patch
- commit f094788
-------------------------------------------------------------------
Thu Jul 1 16:20:28 CEST 2021 - ptesarik@suse.cz
@ -527,6 +549,22 @@ Fri Jun 18 13:07:21 CEST 2021 - jslaby@suse.cz
- net: ieee802154: fix null deref in parse dev addr (bsc#1012628).
- commit 0e46a2c
-------------------------------------------------------------------
Thu Jun 17 13:31:32 CEST 2021 - ludwig.nussel@suse.de
- UsrMerge the kernel (boo#1184804)
- Move files in /boot to modules dir
The file names in /boot are included as %ghost links. The %post script
creates symlinks for the kernel, sysctl.conf and System.map in
/boot for compatibility. Some tools require adjustments before we
can drop those links. If boot is a separate partition, a copy is
used instead of a link.
The logic for /boot/vmlinuz and /boot/initrd doesn't change with
this patch.
- Use /usr/lib/modules as module dir when usermerge is active in the
target distro.
- commit 6f5ed04
-------------------------------------------------------------------
Wed Jun 16 13:55:58 CEST 2021 - mbrugger@suse.com

View File

@ -68,13 +68,27 @@
%define install_vdso 0
%endif
# TW is usrmerged
%if %{undefined usrmerged} && 0%{?suse_version} >= 1550
%define usrmerged 1
%endif
%if 0%{?usrmerged}
%define modules_dir /usr/lib/modules/%kernelrelease-%build_flavor
%define systemmap %{modules_dir}/System.map
%else
%define modules_dir /lib/modules/%kernelrelease-%build_flavor
%define systemmap /boot/System.map-%kernelrelease-%build_flavor
%endif
Name: kernel-lpae
Summary: Kernel for LPAE enabled systems
License: GPL-2.0
Group: System/Kernel
Version: 5.13.0
%if 0%{?is_kotd}
Release: <RELEASE>.gaa40472
Release: <RELEASE>.g9140415
%else
Release: 0
%endif
@ -185,10 +199,10 @@ Conflicts: hyper-v < 4
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
Provides: kernel-%build_flavor-base-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: kernel-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: kernel-%build_flavor-base-srchash-91404150090172519addbb37c9a6ef0addc1116b
Provides: kernel-srchash-91404150090172519addbb37c9a6ef0addc1116b
# END COMMON DEPS
Provides: %name-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: %name-srchash-91404150090172519addbb37c9a6ef0addc1116b
%obsolete_rebuilds %name
Source0: http://www.kernel.org/pub/linux/kernel/v5.x/linux-%srcversion.tar.xz
Source2: source-post.sh
@ -608,6 +622,14 @@ done
%install
%if 0%{?usrmerged}
# add symlink for usrmerge so install scripts will just follow the
# link and end up placing files in /usr/lib. The link will be
# removed later and is not packaged here.
mkdir -p %{buildroot}/usr/lib
ln -s usr/lib %{buildroot}/lib
%endif
# get rid of /usr/lib/rpm/brp-strip-debug
# strip removes too much from the vmlinux ELF binary
export NO_BRP_STRIP_DEBUG=true
@ -700,11 +722,19 @@ add_vmlinux()
# sign the modules, firmware and possibly the kernel in the buildservice
BRP_PESIGN_FILES=""
%if "%CONFIG_EFI_STUB" == "y"
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%ifarch s390x ppc64 ppc64le
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%if "%CONFIG_MODULE_SIG" == "y"
BRP_PESIGN_FILES="$BRP_PESIGN_FILES *.ko"
%endif
@ -766,6 +796,13 @@ for sub in '' '-extra' \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
-e "s:@MODULESDIR@:%modules_dir:g" \
-e "s:@SYSTEMMAP@:%systemmap:g" \
%if 0%{?usrmerged}
-e "s:^@USRMERGE@::" \
%else
-e "/^@USRMERGE@/d" \
%endif
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
if test "$base_package" -eq 1 -a "${#certs[@]}" -gt 0; then
case "$script" in
@ -974,6 +1011,10 @@ if [ %CONFIG_MODULES = y ]; then
fi
rm -rf %{buildroot}/lib/firmware
%if 0%{?usrmerged}
# remove usrmerge aid
rm %{buildroot}/lib
%endif
add_dirs_to_filelist() {
sed -rn '
@ -986,7 +1027,7 @@ add_dirs_to_filelist() {
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:^%%dir (/boot|/etc|(/usr)?/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
@ -999,10 +1040,23 @@ fi
shopt -s nullglob dotglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f"
done | add_dirs_to_filelist >%my_builddir/kernel-devel.files
{
echo "%modules_dir/build"
echo "%modules_dir/source"
cd %buildroot
for file in boot/symtypes*; do
%if 0%{?usrmerged}
l="${file##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
mv "$file" "%{buildroot}$l"
ln -s "..$l" $file
echo "$l"
echo "%%ghost /$file"
%else
echo "/$file"
%endif
done
} | add_dirs_to_filelist >%my_builddir/kernel-devel.files
( cd %buildroot ; find .%obj_install_dir/%cpu_arch_flavor -type f ; ) | \
sed -e 's/^[.]//' | grep -v -e '[.]ipa-clones$' -e '/Symbols[.]list$' -e '/ipa-clones[.]list$'| \
add_dirs_to_filelist >> %my_builddir/kernel-devel.files
@ -1011,6 +1065,8 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
echo %ghost /boot/initrd$suffix
cd %buildroot
for f in boot/*; do
l="${f##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
if test -L "$f"; then
echo "%%ghost /$f"
continue
@ -1026,24 +1082,46 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
;;
boot/vmlinux-*)
if $ghost_vmlinux; then
echo "%%ghost /$f"
continue
# fall through to mark next echo as %ghost
echo -n "%%ghost "
fi
;;
%if 0%{?usrmerged}
boot/vmlinuz-*)
echo -n "%%attr(0644, root, root) "
;;
%endif
boot/symtypes*)
%if 0%{?usrmerged}
echo "%exclude $l"
%endif
continue
;;
esac
%if 0%{?usrmerged}
mv "$f" "./$l"
ln -s "..$l" $f
# the find in the CONFIG_MODULES condition below also finds the files
# but there's sort -u later, so this is ok
echo "$l" # note: must be first after case statement above
echo "%%ghost /$f"
%else
echo "%%attr(0644, root, root) /$f"
%endif
done
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
find %{?usrmerged:usr/}lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \
! -path '*/modules.builtin.modinfo' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -type f -printf '/%%p\n'
-o -name '*.ko' -prune \
%if 0%{?usrmerged}
-o \( -type f ! -path '*/symtypes*' ! -path '*/vmlinu*' \) -printf '/%%p\n'
%else
-o -type f -printf '/%%p\n'
%endif
cat %my_builddir/base-modules
fi
if test %CONFIG_MODULE_SIG = "y" -a -d etc/uefi/certs; then
@ -1101,15 +1179,15 @@ for f in %my_builddir/*-kmp-modules; do
done
if [ %CONFIG_MODULES = y ]; then
install -m 644 %_sourcedir/modules.fips %{buildroot}/lib/modules/%kernelrelease-%build_flavor/modules.fips
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-base.files
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-main.files
install -m 644 %_sourcedir/modules.fips %{buildroot}%modules_dir/modules.fips
echo %modules_dir/modules.fips >> %my_builddir/kernel-base.files
echo %modules_dir/modules.fips >> %my_builddir/kernel-main.files
fi
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%fdupes %buildroot%modules_dir
%preun -f preun.sh
@ -1288,7 +1366,7 @@ static, unlike the %{patch_package}-<kernel-version>-flavor package names.
%files %{livepatch}
# rpmlint complains about empty packages, so lets own something
%defattr(-, root, root)
%dir /lib/modules/%kernelrelease-%build_flavor
%dir %modules_dir
%endif
%if 0%{?klp_symbols} && "%livepatch" != ""

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Jul 5 18:08:41 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
- patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch
- commit 9510801
-------------------------------------------------------------------
Thu Jul 1 18:44:34 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/ACPI-PM-s2idle-Add-missing-LPS0-functions-for-AMD.patch
- patches.suse/ACPI-processor-idle-Fix-up-C-state-latency-if-not-or.patch
- patches.suse/Bluetooth-btqca-Don-t-modify-firmware-contents-in-pl.patch
- patches.suse/brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
- patches.suse/brcmfmac-Delete-second-brcm-folder-hierarchy.patch
- patches.suse/crypto-ccp-Annotate-SEV-Firmware-file-names.patch
- commit f094788
-------------------------------------------------------------------
Thu Jul 1 16:20:28 CEST 2021 - ptesarik@suse.cz
@ -527,6 +549,22 @@ Fri Jun 18 13:07:21 CEST 2021 - jslaby@suse.cz
- net: ieee802154: fix null deref in parse dev addr (bsc#1012628).
- commit 0e46a2c
-------------------------------------------------------------------
Thu Jun 17 13:31:32 CEST 2021 - ludwig.nussel@suse.de
- UsrMerge the kernel (boo#1184804)
- Move files in /boot to modules dir
The file names in /boot are included as %ghost links. The %post script
creates symlinks for the kernel, sysctl.conf and System.map in
/boot for compatibility. Some tools require adjustments before we
can drop those links. If boot is a separate partition, a copy is
used instead of a link.
The logic for /boot/vmlinuz and /boot/initrd doesn't change with
this patch.
- Use /usr/lib/modules as module dir when usermerge is active in the
target distro.
- commit 6f5ed04
-------------------------------------------------------------------
Wed Jun 16 13:55:58 CEST 2021 - mbrugger@suse.com

View File

@ -45,7 +45,7 @@ BuildRequires: util-linux
%endif
%endif
%endif
BuildRequires: kernel%kernel_flavor-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
BuildRequires: kernel%kernel_flavor-srchash-91404150090172519addbb37c9a6ef0addc1116b
%if 0%{?rhel_version}
BuildRequires: kernel
@ -66,7 +66,7 @@ License: GPL-2.0
Group: SLES
Version: 5.13.0
%if 0%{?is_kotd}
Release: <RELEASE>.gaa40472
Release: <RELEASE>.g9140415
%else
Release: 0
%endif

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Jul 5 18:08:41 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
- patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch
- commit 9510801
-------------------------------------------------------------------
Thu Jul 1 18:44:34 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/ACPI-PM-s2idle-Add-missing-LPS0-functions-for-AMD.patch
- patches.suse/ACPI-processor-idle-Fix-up-C-state-latency-if-not-or.patch
- patches.suse/Bluetooth-btqca-Don-t-modify-firmware-contents-in-pl.patch
- patches.suse/brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
- patches.suse/brcmfmac-Delete-second-brcm-folder-hierarchy.patch
- patches.suse/crypto-ccp-Annotate-SEV-Firmware-file-names.patch
- commit f094788
-------------------------------------------------------------------
Thu Jul 1 16:20:28 CEST 2021 - ptesarik@suse.cz
@ -527,6 +549,22 @@ Fri Jun 18 13:07:21 CEST 2021 - jslaby@suse.cz
- net: ieee802154: fix null deref in parse dev addr (bsc#1012628).
- commit 0e46a2c
-------------------------------------------------------------------
Thu Jun 17 13:31:32 CEST 2021 - ludwig.nussel@suse.de
- UsrMerge the kernel (boo#1184804)
- Move files in /boot to modules dir
The file names in /boot are included as %ghost links. The %post script
creates symlinks for the kernel, sysctl.conf and System.map in
/boot for compatibility. Some tools require adjustments before we
can drop those links. If boot is a separate partition, a copy is
used instead of a link.
The logic for /boot/vmlinuz and /boot/initrd doesn't change with
this patch.
- Use /usr/lib/modules as module dir when usermerge is active in the
target distro.
- commit 6f5ed04
-------------------------------------------------------------------
Wed Jun 16 13:55:58 CEST 2021 - mbrugger@suse.com

View File

@ -38,7 +38,7 @@ License: GPL-2.0
Group: SLES
Version: 5.13.0
%if 0%{?is_kotd}
Release: <RELEASE>.gaa40472
Release: <RELEASE>.g9140415
%else
Release: 0
%endif
@ -60,7 +60,7 @@ projects and runs basic tests.
# and called here.
krel=$(uname -r)
if test ! -d "/lib/modules/$krel/kernel"; then
if test ! -d "/lib/modules/$krel/kernel" && test ! -d "/usr/lib/modules/$krel/kernel"; then
echo "Kernel package for $krel not installed; exiting"
exit 0
fi

View File

@ -60,7 +60,7 @@ projects and runs basic tests.
# and called here.
krel=$(uname -r)
if test ! -d "/lib/modules/$krel/kernel"; then
if test ! -d "/lib/modules/$krel/kernel" && test ! -d "/usr/lib/modules/$krel/kernel"; then
echo "Kernel package for $krel not installed; exiting"
exit 0
fi

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Jul 5 18:08:41 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
- patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch
- commit 9510801
-------------------------------------------------------------------
Thu Jul 1 18:44:34 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/ACPI-PM-s2idle-Add-missing-LPS0-functions-for-AMD.patch
- patches.suse/ACPI-processor-idle-Fix-up-C-state-latency-if-not-or.patch
- patches.suse/Bluetooth-btqca-Don-t-modify-firmware-contents-in-pl.patch
- patches.suse/brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
- patches.suse/brcmfmac-Delete-second-brcm-folder-hierarchy.patch
- patches.suse/crypto-ccp-Annotate-SEV-Firmware-file-names.patch
- commit f094788
-------------------------------------------------------------------
Thu Jul 1 16:20:28 CEST 2021 - ptesarik@suse.cz
@ -527,6 +549,22 @@ Fri Jun 18 13:07:21 CEST 2021 - jslaby@suse.cz
- net: ieee802154: fix null deref in parse dev addr (bsc#1012628).
- commit 0e46a2c
-------------------------------------------------------------------
Thu Jun 17 13:31:32 CEST 2021 - ludwig.nussel@suse.de
- UsrMerge the kernel (boo#1184804)
- Move files in /boot to modules dir
The file names in /boot are included as %ghost links. The %post script
creates symlinks for the kernel, sysctl.conf and System.map in
/boot for compatibility. Some tools require adjustments before we
can drop those links. If boot is a separate partition, a copy is
used instead of a link.
The logic for /boot/vmlinuz and /boot/initrd doesn't change with
this patch.
- Use /usr/lib/modules as module dir when usermerge is active in the
target distro.
- commit 6f5ed04
-------------------------------------------------------------------
Wed Jun 16 13:55:58 CEST 2021 - mbrugger@suse.com

View File

@ -68,13 +68,27 @@
%define install_vdso 0
%endif
# TW is usrmerged
%if %{undefined usrmerged} && 0%{?suse_version} >= 1550
%define usrmerged 1
%endif
%if 0%{?usrmerged}
%define modules_dir /usr/lib/modules/%kernelrelease-%build_flavor
%define systemmap %{modules_dir}/System.map
%else
%define modules_dir /lib/modules/%kernelrelease-%build_flavor
%define systemmap /boot/System.map-%kernelrelease-%build_flavor
%endif
Name: kernel-pae
Summary: Kernel with PAE Support
License: GPL-2.0
Group: System/Kernel
Version: 5.13.0
%if 0%{?is_kotd}
Release: <RELEASE>.gaa40472
Release: <RELEASE>.g9140415
%else
Release: 0
%endif
@ -185,10 +199,10 @@ Conflicts: hyper-v < 4
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
Provides: kernel-%build_flavor-base-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: kernel-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: kernel-%build_flavor-base-srchash-91404150090172519addbb37c9a6ef0addc1116b
Provides: kernel-srchash-91404150090172519addbb37c9a6ef0addc1116b
# END COMMON DEPS
Provides: %name-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: %name-srchash-91404150090172519addbb37c9a6ef0addc1116b
%ifarch %ix86
Provides: kernel-bigsmp = 2.6.17
Obsoletes: kernel-bigsmp <= 2.6.17
@ -636,6 +650,14 @@ done
%install
%if 0%{?usrmerged}
# add symlink for usrmerge so install scripts will just follow the
# link and end up placing files in /usr/lib. The link will be
# removed later and is not packaged here.
mkdir -p %{buildroot}/usr/lib
ln -s usr/lib %{buildroot}/lib
%endif
# get rid of /usr/lib/rpm/brp-strip-debug
# strip removes too much from the vmlinux ELF binary
export NO_BRP_STRIP_DEBUG=true
@ -728,11 +750,19 @@ add_vmlinux()
# sign the modules, firmware and possibly the kernel in the buildservice
BRP_PESIGN_FILES=""
%if "%CONFIG_EFI_STUB" == "y"
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%ifarch s390x ppc64 ppc64le
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%if "%CONFIG_MODULE_SIG" == "y"
BRP_PESIGN_FILES="$BRP_PESIGN_FILES *.ko"
%endif
@ -794,6 +824,13 @@ for sub in '' '-extra' \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
-e "s:@MODULESDIR@:%modules_dir:g" \
-e "s:@SYSTEMMAP@:%systemmap:g" \
%if 0%{?usrmerged}
-e "s:^@USRMERGE@::" \
%else
-e "/^@USRMERGE@/d" \
%endif
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
if test "$base_package" -eq 1 -a "${#certs[@]}" -gt 0; then
case "$script" in
@ -1002,6 +1039,10 @@ if [ %CONFIG_MODULES = y ]; then
fi
rm -rf %{buildroot}/lib/firmware
%if 0%{?usrmerged}
# remove usrmerge aid
rm %{buildroot}/lib
%endif
add_dirs_to_filelist() {
sed -rn '
@ -1014,7 +1055,7 @@ add_dirs_to_filelist() {
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:^%%dir (/boot|/etc|(/usr)?/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
@ -1027,10 +1068,23 @@ fi
shopt -s nullglob dotglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f"
done | add_dirs_to_filelist >%my_builddir/kernel-devel.files
{
echo "%modules_dir/build"
echo "%modules_dir/source"
cd %buildroot
for file in boot/symtypes*; do
%if 0%{?usrmerged}
l="${file##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
mv "$file" "%{buildroot}$l"
ln -s "..$l" $file
echo "$l"
echo "%%ghost /$file"
%else
echo "/$file"
%endif
done
} | add_dirs_to_filelist >%my_builddir/kernel-devel.files
( cd %buildroot ; find .%obj_install_dir/%cpu_arch_flavor -type f ; ) | \
sed -e 's/^[.]//' | grep -v -e '[.]ipa-clones$' -e '/Symbols[.]list$' -e '/ipa-clones[.]list$'| \
add_dirs_to_filelist >> %my_builddir/kernel-devel.files
@ -1039,6 +1093,8 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
echo %ghost /boot/initrd$suffix
cd %buildroot
for f in boot/*; do
l="${f##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
if test -L "$f"; then
echo "%%ghost /$f"
continue
@ -1054,24 +1110,46 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
;;
boot/vmlinux-*)
if $ghost_vmlinux; then
echo "%%ghost /$f"
continue
# fall through to mark next echo as %ghost
echo -n "%%ghost "
fi
;;
%if 0%{?usrmerged}
boot/vmlinuz-*)
echo -n "%%attr(0644, root, root) "
;;
%endif
boot/symtypes*)
%if 0%{?usrmerged}
echo "%exclude $l"
%endif
continue
;;
esac
%if 0%{?usrmerged}
mv "$f" "./$l"
ln -s "..$l" $f
# the find in the CONFIG_MODULES condition below also finds the files
# but there's sort -u later, so this is ok
echo "$l" # note: must be first after case statement above
echo "%%ghost /$f"
%else
echo "%%attr(0644, root, root) /$f"
%endif
done
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
find %{?usrmerged:usr/}lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \
! -path '*/modules.builtin.modinfo' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -type f -printf '/%%p\n'
-o -name '*.ko' -prune \
%if 0%{?usrmerged}
-o \( -type f ! -path '*/symtypes*' ! -path '*/vmlinu*' \) -printf '/%%p\n'
%else
-o -type f -printf '/%%p\n'
%endif
cat %my_builddir/base-modules
fi
if test %CONFIG_MODULE_SIG = "y" -a -d etc/uefi/certs; then
@ -1129,15 +1207,15 @@ for f in %my_builddir/*-kmp-modules; do
done
if [ %CONFIG_MODULES = y ]; then
install -m 644 %_sourcedir/modules.fips %{buildroot}/lib/modules/%kernelrelease-%build_flavor/modules.fips
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-base.files
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-main.files
install -m 644 %_sourcedir/modules.fips %{buildroot}%modules_dir/modules.fips
echo %modules_dir/modules.fips >> %my_builddir/kernel-base.files
echo %modules_dir/modules.fips >> %my_builddir/kernel-main.files
fi
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%fdupes %buildroot%modules_dir
%preun -f preun.sh
@ -1358,7 +1436,7 @@ static, unlike the %{patch_package}-<kernel-version>-flavor package names.
%files %{livepatch}
# rpmlint complains about empty packages, so lets own something
%defattr(-, root, root)
%dir /lib/modules/%kernelrelease-%build_flavor
%dir %modules_dir
%endif
%if 0%{?klp_symbols} && "%livepatch" != ""

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Jul 5 18:08:41 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
- patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch
- commit 9510801
-------------------------------------------------------------------
Thu Jul 1 18:44:34 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/ACPI-PM-s2idle-Add-missing-LPS0-functions-for-AMD.patch
- patches.suse/ACPI-processor-idle-Fix-up-C-state-latency-if-not-or.patch
- patches.suse/Bluetooth-btqca-Don-t-modify-firmware-contents-in-pl.patch
- patches.suse/brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
- patches.suse/brcmfmac-Delete-second-brcm-folder-hierarchy.patch
- patches.suse/crypto-ccp-Annotate-SEV-Firmware-file-names.patch
- commit f094788
-------------------------------------------------------------------
Thu Jul 1 16:20:28 CEST 2021 - ptesarik@suse.cz
@ -527,6 +549,22 @@ Fri Jun 18 13:07:21 CEST 2021 - jslaby@suse.cz
- net: ieee802154: fix null deref in parse dev addr (bsc#1012628).
- commit 0e46a2c
-------------------------------------------------------------------
Thu Jun 17 13:31:32 CEST 2021 - ludwig.nussel@suse.de
- UsrMerge the kernel (boo#1184804)
- Move files in /boot to modules dir
The file names in /boot are included as %ghost links. The %post script
creates symlinks for the kernel, sysctl.conf and System.map in
/boot for compatibility. Some tools require adjustments before we
can drop those links. If boot is a separate partition, a copy is
used instead of a link.
The logic for /boot/vmlinuz and /boot/initrd doesn't change with
this patch.
- Use /usr/lib/modules as module dir when usermerge is active in the
target distro.
- commit 6f5ed04
-------------------------------------------------------------------
Wed Jun 16 13:55:58 CEST 2021 - mbrugger@suse.com

View File

@ -1,10 +1,10 @@
# These zero-length files are correct:
addFilter("zero-length /usr/src/linux-.*-obj/.*/include/config.*h")
# vdsos are special
addFilter("shared-lib-without-dependency-information /lib/modules/[1-9].*/vdso/.*")
addFilter("missing-PT_GNU_STACK-section /lib/modules/[1-9].*/vdso/.*")
addFilter("shared-lib-without-dependency-information .*/lib/modules/[1-9].*/vdso/.*")
addFilter("missing-PT_GNU_STACK-section .*/lib/modules/[1-9].*/vdso/.*")
# This is a stale symlink until the kernel-source package is installed:
addFilter("dangling-symlink /lib/modules/[1-9].*/source")
addFilter("dangling-symlink .*/lib/modules/[1-9].*/source")
# These hidden files are fine:
addFilter("hidden-file-or-dir /usr/src/linux-.*-obj/.*/.config")
addFilter("hidden-file-or-dir /usr/src/linux-.*-obj/.*/.kernel-binary.spec.buildenv")

View File

@ -32,7 +32,7 @@ License: GPL-2.0
Group: Development/Sources
Version: 5.13.0
%if 0%{?is_kotd}
Release: <RELEASE>.gaa40472
Release: <RELEASE>.g9140415
%else
Release: 0
%endif
@ -43,7 +43,7 @@ BuildRequires: fdupes
BuildRequires: sed
Requires(post): coreutils sed
Provides: %name = %version-%source_rel
Provides: %name-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: %name-srchash-91404150090172519addbb37c9a6ef0addc1116b
Provides: linux
Provides: multiversion(kernel)
Source0: http://www.kernel.org/pub/linux/kernel/v5.x/linux-%srcversion.tar.xz

View File

@ -11,7 +11,7 @@ set -o pipefail
install -d -m 0755 $RPM_BUILD_ROOT/boot
$scriptdir/splitflist $kernel_package_name kernel.flist kernel-ghost.flist
echo Missing files:
echo Ghost files:
cat kernel-ghost.flist
rpm -q --qf '%{PREIN}' $kernel_package_name | sed -e "s/$kernel_nvrq/$package_nvr/g" > prein.sh
@ -21,7 +21,8 @@ rpm -q --qf '%{POSTUN}' $kernel_package_name | sed -e "s/$kernel_nvrq/$package_n
[ -z "$(rpm -q --triggers $kernel_package_name)" ] # not handled
KREL=$(cat kernel.flist | grep ^/lib/modules | { sort -r ||: ;} | head -n 1 | sed -e s,^/lib/modules/,, -e 's,/.*,,')
KREL=$(sed -rne '/^(\/usr)?\/lib\/modules\/([^/]+)$/{s,.*/,,;p;q}' < kernel.flist)
grep -q /usr/lib/modules/ kernel.flist && USR=/usr
$scriptdir/mergedep $KREL > modules.dep
@ -29,13 +30,13 @@ $scriptdir/mergedep $KREL > modules.dep
$scriptdir/moddep modules.dep request-modules modules
$scriptdir/modflist kernel.flist modules modules.flist /lib/modules/$KREL/modules.builtin
cat kernel.flist | grep -v ^/lib/modules >> modules.flist
[ -d /lib/modules/$KREL/vdso ] && echo /lib/modules/$KREL/vdso >> modules.flist ||:
echo /lib/modules/$KREL/modules.* | tr ' ' '\n' >> modules.flist
grep -v "^$USR/lib/modules/$KREL\\(\$\\|/kernel\\)" < kernel.flist >> modules.flist || :
tar -C / -cf- -T modules.flist | tar -C $RPM_BUILD_ROOT -xvf-
[ -z "$USR" ] || ln -s usr/lib $RPM_BUILD_ROOT/lib
moderr="$(/usr/sbin/depmod -b $RPM_BUILD_ROOT -e -F /boot/System.map-$KREL $KREL 2>&1 > /dev/null)"
[ -z "$USR" ] || rm $RPM_BUILD_ROOT/lib
if [ "$moderr" ] ; then
echo Picked modules have errors:
@ -44,35 +45,27 @@ exit 1
fi
echo "%defattr(-,root,root)" > subpackage.flist
cat kernel.flist | grep -v ^/lib/modules >> subpackage.flist
echo /lib/modules/$KREL >> subpackage.flist
cat kernel-ghost.flist | sed -e 's/^/%ghost /' >> subpackage.flist
cat kernel-ghost.flist | while read ghost ; do
case $ghost in
/boot/image-%build_flavor | /boot/vmlinux-%build_flavor | /boot/vmlinuz-%build_flavor | \
/boot/Image-%build_flavor | /boot/initrd-%build_flavor)
;;
/boot/vmlinux | /boot/vmlinuz | /boot/zImage | /boot/Image | /boot/image | /boot/initrd)
;;
/boot/vmlinux-$KREL)
[ -f /boot/vmlinux-$KREL.gz ] && touch vmlinux-$KREL
;;
/boot/initrd-$KREL | /boot/initrd-$KREL-kdump)
# Create a dummy initrd with roughly the size the real one will have.
# That way, YaST will know that this package requires some additional
# space in /boot.
dd if=/dev/zero of=$RPM_BUILD_ROOT$ghost \
bs=1024 seek=2047 count=1
chmod 0600 $RPM_BUILD_ROOT$ghost
;;
/lib/modules/$KREL/modules.*)
[ -f $RPM_BUILD_ROOT$ghost ]
;;
*)
echo Missing file "$ghost" not handled.
exit 1;
;;
esac
done
echo "%dir $USR/lib/modules/$KREL" >> subpackage.flist
grep -v "^$USR/lib/modules/$KREL\\(\$\\|/kernel\\)" < kernel.flist >> subpackage.flist || :
echo $USR/lib/modules/$KREL/kernel >> subpackage.flist
while read name rest; do
echo "%ghost $name"
done < kernel-ghost.flist >> subpackage.flist
# recreate ghost files in build root
while read name mode size mtime link; do
t=$(( mode&0170000 ))
p="${mode:0-4:4}"
(( p != 0 )) || p=''
if (( t == 0100000 )); then
install -D -m "${p:-0644}" /dev/null "$RPM_BUILD_ROOT$name"
dd if=/dev/null bs=1 count=0 status=none seek="$size" of="$RPM_BUILD_ROOT$name"
touch -h --date="@$mtime" "$RPM_BUILD_ROOT$name"
elif (( t == 0040000 )); then
install -d -m "${p:-0755}" "$RPM_BUILD_ROOT$name"
touch -h -date="@$mtime" "$RPM_BUILD_ROOT$name"
elif (( t == 0120000 )); then
ln -s "$link" "$RPM_BUILD_ROOT$name"
touch -h --date="@$mtime" "$RPM_BUILD_ROOT$name"
fi
done < kernel-ghost.flist

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Jul 5 18:08:41 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
- patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch
- commit 9510801
-------------------------------------------------------------------
Thu Jul 1 18:44:34 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/ACPI-PM-s2idle-Add-missing-LPS0-functions-for-AMD.patch
- patches.suse/ACPI-processor-idle-Fix-up-C-state-latency-if-not-or.patch
- patches.suse/Bluetooth-btqca-Don-t-modify-firmware-contents-in-pl.patch
- patches.suse/brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
- patches.suse/brcmfmac-Delete-second-brcm-folder-hierarchy.patch
- patches.suse/crypto-ccp-Annotate-SEV-Firmware-file-names.patch
- commit f094788
-------------------------------------------------------------------
Thu Jul 1 16:20:28 CEST 2021 - ptesarik@suse.cz
@ -527,6 +549,22 @@ Fri Jun 18 13:07:21 CEST 2021 - jslaby@suse.cz
- net: ieee802154: fix null deref in parse dev addr (bsc#1012628).
- commit 0e46a2c
-------------------------------------------------------------------
Thu Jun 17 13:31:32 CEST 2021 - ludwig.nussel@suse.de
- UsrMerge the kernel (boo#1184804)
- Move files in /boot to modules dir
The file names in /boot are included as %ghost links. The %post script
creates symlinks for the kernel, sysctl.conf and System.map in
/boot for compatibility. Some tools require adjustments before we
can drop those links. If boot is a separate partition, a copy is
used instead of a link.
The logic for /boot/vmlinuz and /boot/initrd doesn't change with
this patch.
- Use /usr/lib/modules as module dir when usermerge is active in the
target distro.
- commit 6f5ed04
-------------------------------------------------------------------
Wed Jun 16 13:55:58 CEST 2021 - mbrugger@suse.com

View File

@ -27,7 +27,7 @@ Group: Development/Sources
Version: 5.13.0
%if %using_buildservice
%if 0%{?is_kotd}
Release: <RELEASE>.gaa40472
Release: <RELEASE>.g9140415
%else
Release: 0
%endif
@ -52,7 +52,7 @@ Requires: kernel-pae-devel = %version-%source_rel
%endif
Requires: pesign-obs-integration
Provides: %name = %version-%source_rel
Provides: %name-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: %name-srchash-91404150090172519addbb37c9a6ef0addc1116b
Provides: multiversion(kernel)
Source: README.KSYMS
Requires: kernel-devel%variant = %version-%source_rel

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Jul 5 18:08:41 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
- patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch
- commit 9510801
-------------------------------------------------------------------
Thu Jul 1 18:44:34 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/ACPI-PM-s2idle-Add-missing-LPS0-functions-for-AMD.patch
- patches.suse/ACPI-processor-idle-Fix-up-C-state-latency-if-not-or.patch
- patches.suse/Bluetooth-btqca-Don-t-modify-firmware-contents-in-pl.patch
- patches.suse/brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
- patches.suse/brcmfmac-Delete-second-brcm-folder-hierarchy.patch
- patches.suse/crypto-ccp-Annotate-SEV-Firmware-file-names.patch
- commit f094788
-------------------------------------------------------------------
Thu Jul 1 16:20:28 CEST 2021 - ptesarik@suse.cz
@ -527,6 +549,22 @@ Fri Jun 18 13:07:21 CEST 2021 - jslaby@suse.cz
- net: ieee802154: fix null deref in parse dev addr (bsc#1012628).
- commit 0e46a2c
-------------------------------------------------------------------
Thu Jun 17 13:31:32 CEST 2021 - ludwig.nussel@suse.de
- UsrMerge the kernel (boo#1184804)
- Move files in /boot to modules dir
The file names in /boot are included as %ghost links. The %post script
creates symlinks for the kernel, sysctl.conf and System.map in
/boot for compatibility. Some tools require adjustments before we
can drop those links. If boot is a separate partition, a copy is
used instead of a link.
The logic for /boot/vmlinuz and /boot/initrd doesn't change with
this patch.
- Use /usr/lib/modules as module dir when usermerge is active in the
target distro.
- commit 6f5ed04
-------------------------------------------------------------------
Wed Jun 16 13:55:58 CEST 2021 - mbrugger@suse.com

View File

@ -68,13 +68,27 @@
%define install_vdso 0
%endif
# TW is usrmerged
%if %{undefined usrmerged} && 0%{?suse_version} >= 1550
%define usrmerged 1
%endif
%if 0%{?usrmerged}
%define modules_dir /usr/lib/modules/%kernelrelease-%build_flavor
%define systemmap %{modules_dir}/System.map
%else
%define modules_dir /lib/modules/%kernelrelease-%build_flavor
%define systemmap /boot/System.map-%kernelrelease-%build_flavor
%endif
Name: kernel-vanilla
Summary: The Standard Kernel - without any SUSE patches
License: GPL-2.0
Group: System/Kernel
Version: 5.13.0
%if 0%{?is_kotd}
Release: <RELEASE>.gaa40472
Release: <RELEASE>.g9140415
%else
Release: 0
%endif
@ -185,10 +199,10 @@ Conflicts: hyper-v < 4
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
Provides: kernel-%build_flavor-base-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: kernel-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: kernel-%build_flavor-base-srchash-91404150090172519addbb37c9a6ef0addc1116b
Provides: kernel-srchash-91404150090172519addbb37c9a6ef0addc1116b
# END COMMON DEPS
Provides: %name-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: %name-srchash-91404150090172519addbb37c9a6ef0addc1116b
%obsolete_rebuilds %name
Source0: http://www.kernel.org/pub/linux/kernel/v5.x/linux-%srcversion.tar.xz
Source2: source-post.sh
@ -607,6 +621,14 @@ done
%install
%if 0%{?usrmerged}
# add symlink for usrmerge so install scripts will just follow the
# link and end up placing files in /usr/lib. The link will be
# removed later and is not packaged here.
mkdir -p %{buildroot}/usr/lib
ln -s usr/lib %{buildroot}/lib
%endif
# get rid of /usr/lib/rpm/brp-strip-debug
# strip removes too much from the vmlinux ELF binary
export NO_BRP_STRIP_DEBUG=true
@ -699,11 +721,19 @@ add_vmlinux()
# sign the modules, firmware and possibly the kernel in the buildservice
BRP_PESIGN_FILES=""
%if "%CONFIG_EFI_STUB" == "y"
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%ifarch s390x ppc64 ppc64le
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%if "%CONFIG_MODULE_SIG" == "y"
BRP_PESIGN_FILES="$BRP_PESIGN_FILES *.ko"
%endif
@ -765,6 +795,13 @@ for sub in '' '-extra' \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
-e "s:@MODULESDIR@:%modules_dir:g" \
-e "s:@SYSTEMMAP@:%systemmap:g" \
%if 0%{?usrmerged}
-e "s:^@USRMERGE@::" \
%else
-e "/^@USRMERGE@/d" \
%endif
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
if test "$base_package" -eq 1 -a "${#certs[@]}" -gt 0; then
case "$script" in
@ -973,6 +1010,10 @@ if [ %CONFIG_MODULES = y ]; then
fi
rm -rf %{buildroot}/lib/firmware
%if 0%{?usrmerged}
# remove usrmerge aid
rm %{buildroot}/lib
%endif
add_dirs_to_filelist() {
sed -rn '
@ -985,7 +1026,7 @@ add_dirs_to_filelist() {
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:^%%dir (/boot|/etc|(/usr)?/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
@ -998,10 +1039,23 @@ fi
shopt -s nullglob dotglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f"
done | add_dirs_to_filelist >%my_builddir/kernel-devel.files
{
echo "%modules_dir/build"
echo "%modules_dir/source"
cd %buildroot
for file in boot/symtypes*; do
%if 0%{?usrmerged}
l="${file##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
mv "$file" "%{buildroot}$l"
ln -s "..$l" $file
echo "$l"
echo "%%ghost /$file"
%else
echo "/$file"
%endif
done
} | add_dirs_to_filelist >%my_builddir/kernel-devel.files
( cd %buildroot ; find .%obj_install_dir/%cpu_arch_flavor -type f ; ) | \
sed -e 's/^[.]//' | grep -v -e '[.]ipa-clones$' -e '/Symbols[.]list$' -e '/ipa-clones[.]list$'| \
add_dirs_to_filelist >> %my_builddir/kernel-devel.files
@ -1010,6 +1064,8 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
echo %ghost /boot/initrd$suffix
cd %buildroot
for f in boot/*; do
l="${f##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
if test -L "$f"; then
echo "%%ghost /$f"
continue
@ -1025,24 +1081,46 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
;;
boot/vmlinux-*)
if $ghost_vmlinux; then
echo "%%ghost /$f"
continue
# fall through to mark next echo as %ghost
echo -n "%%ghost "
fi
;;
%if 0%{?usrmerged}
boot/vmlinuz-*)
echo -n "%%attr(0644, root, root) "
;;
%endif
boot/symtypes*)
%if 0%{?usrmerged}
echo "%exclude $l"
%endif
continue
;;
esac
%if 0%{?usrmerged}
mv "$f" "./$l"
ln -s "..$l" $f
# the find in the CONFIG_MODULES condition below also finds the files
# but there's sort -u later, so this is ok
echo "$l" # note: must be first after case statement above
echo "%%ghost /$f"
%else
echo "%%attr(0644, root, root) /$f"
%endif
done
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
find %{?usrmerged:usr/}lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \
! -path '*/modules.builtin.modinfo' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -type f -printf '/%%p\n'
-o -name '*.ko' -prune \
%if 0%{?usrmerged}
-o \( -type f ! -path '*/symtypes*' ! -path '*/vmlinu*' \) -printf '/%%p\n'
%else
-o -type f -printf '/%%p\n'
%endif
cat %my_builddir/base-modules
fi
if test %CONFIG_MODULE_SIG = "y" -a -d etc/uefi/certs; then
@ -1100,15 +1178,15 @@ for f in %my_builddir/*-kmp-modules; do
done
if [ %CONFIG_MODULES = y ]; then
install -m 644 %_sourcedir/modules.fips %{buildroot}/lib/modules/%kernelrelease-%build_flavor/modules.fips
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-base.files
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-main.files
install -m 644 %_sourcedir/modules.fips %{buildroot}%modules_dir/modules.fips
echo %modules_dir/modules.fips >> %my_builddir/kernel-base.files
echo %modules_dir/modules.fips >> %my_builddir/kernel-main.files
fi
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%fdupes %buildroot%modules_dir
%preun -f preun.sh
@ -1285,7 +1363,7 @@ static, unlike the %{patch_package}-<kernel-version>-flavor package names.
%files %{livepatch}
# rpmlint complains about empty packages, so lets own something
%defattr(-, root, root)
%dir /lib/modules/%kernelrelease-%build_flavor
%dir %modules_dir
%endif
%if 0%{?klp_symbols} && "%livepatch" != ""

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Jul 5 18:08:41 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/pinctrl-bcm2835-accept-fewer-than-expected-irqs.patch
- patches.suse/proc-Avoid-mixing-integer-types-in-mem_rw.patch
- commit 9510801
-------------------------------------------------------------------
Thu Jul 1 18:44:34 CEST 2021 - mkubecek@suse.cz
- update upstream references
- update upstream references of patches added in 5.14 merge window:
- patches.suse/ACPI-PM-s2idle-Add-missing-LPS0-functions-for-AMD.patch
- patches.suse/ACPI-processor-idle-Fix-up-C-state-latency-if-not-or.patch
- patches.suse/Bluetooth-btqca-Don-t-modify-firmware-contents-in-pl.patch
- patches.suse/brcmfmac-Add-clm_blob-firmware-files-to-modinfo.patch
- patches.suse/brcmfmac-Delete-second-brcm-folder-hierarchy.patch
- patches.suse/crypto-ccp-Annotate-SEV-Firmware-file-names.patch
- commit f094788
-------------------------------------------------------------------
Thu Jul 1 16:20:28 CEST 2021 - ptesarik@suse.cz
@ -527,6 +549,22 @@ Fri Jun 18 13:07:21 CEST 2021 - jslaby@suse.cz
- net: ieee802154: fix null deref in parse dev addr (bsc#1012628).
- commit 0e46a2c
-------------------------------------------------------------------
Thu Jun 17 13:31:32 CEST 2021 - ludwig.nussel@suse.de
- UsrMerge the kernel (boo#1184804)
- Move files in /boot to modules dir
The file names in /boot are included as %ghost links. The %post script
creates symlinks for the kernel, sysctl.conf and System.map in
/boot for compatibility. Some tools require adjustments before we
can drop those links. If boot is a separate partition, a copy is
used instead of a link.
The logic for /boot/vmlinuz and /boot/initrd doesn't change with
this patch.
- Use /usr/lib/modules as module dir when usermerge is active in the
target distro.
- commit 6f5ed04
-------------------------------------------------------------------
Wed Jun 16 13:55:58 CEST 2021 - mbrugger@suse.com

View File

@ -68,13 +68,27 @@
%define install_vdso 0
%endif
# TW is usrmerged
%if %{undefined usrmerged} && 0%{?suse_version} >= 1550
%define usrmerged 1
%endif
%if 0%{?usrmerged}
%define modules_dir /usr/lib/modules/%kernelrelease-%build_flavor
%define systemmap %{modules_dir}/System.map
%else
%define modules_dir /lib/modules/%kernelrelease-%build_flavor
%define systemmap /boot/System.map-%kernelrelease-%build_flavor
%endif
Name: kernel-zfcpdump
Summary: The IBM System Z zfcpdump Kernel
License: GPL-2.0
Group: System/Kernel
Version: 5.13.0
%if 0%{?is_kotd}
Release: <RELEASE>.gaa40472
Release: <RELEASE>.g9140415
%else
Release: 0
%endif
@ -185,10 +199,10 @@ Conflicts: hyper-v < 4
Conflicts: libc.so.6()(64bit)
%endif
Provides: kernel = %version-%source_rel
Provides: kernel-%build_flavor-base-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: kernel-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: kernel-%build_flavor-base-srchash-91404150090172519addbb37c9a6ef0addc1116b
Provides: kernel-srchash-91404150090172519addbb37c9a6ef0addc1116b
# END COMMON DEPS
Provides: %name-srchash-aa40472d585ba618ec8180d4bd70a91f26eb790f
Provides: %name-srchash-91404150090172519addbb37c9a6ef0addc1116b
%obsolete_rebuilds %name
Source0: http://www.kernel.org/pub/linux/kernel/v5.x/linux-%srcversion.tar.xz
Source2: source-post.sh
@ -610,6 +624,14 @@ done
%install
%if 0%{?usrmerged}
# add symlink for usrmerge so install scripts will just follow the
# link and end up placing files in /usr/lib. The link will be
# removed later and is not packaged here.
mkdir -p %{buildroot}/usr/lib
ln -s usr/lib %{buildroot}/lib
%endif
# get rid of /usr/lib/rpm/brp-strip-debug
# strip removes too much from the vmlinux ELF binary
export NO_BRP_STRIP_DEBUG=true
@ -702,11 +724,19 @@ add_vmlinux()
# sign the modules, firmware and possibly the kernel in the buildservice
BRP_PESIGN_FILES=""
%if "%CONFIG_EFI_STUB" == "y"
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%ifarch s390x ppc64 ppc64le
%if 0%{?usrmerged}
BRP_PESIGN_FILES="%modules_dir/$image"
%else
BRP_PESIGN_FILES="/boot/$image-%kernelrelease-%build_flavor"
%endif
%endif
%if "%CONFIG_MODULE_SIG" == "y"
BRP_PESIGN_FILES="$BRP_PESIGN_FILES *.ko"
%endif
@ -768,6 +798,13 @@ for sub in '' '-extra' \
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
-e "s:@SRCVARIANT@:%variant:g" \
-e "s:@MODULESDIR@:%modules_dir:g" \
-e "s:@SYSTEMMAP@:%systemmap:g" \
%if 0%{?usrmerged}
-e "s:^@USRMERGE@::" \
%else
-e "/^@USRMERGE@/d" \
%endif
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
if test "$base_package" -eq 1 -a "${#certs[@]}" -gt 0; then
case "$script" in
@ -976,6 +1013,10 @@ if [ %CONFIG_MODULES = y ]; then
fi
rm -rf %{buildroot}/lib/firmware
%if 0%{?usrmerged}
# remove usrmerge aid
rm %{buildroot}/lib
%endif
add_dirs_to_filelist() {
sed -rn '
@ -988,7 +1029,7 @@ add_dirs_to_filelist() {
# print all parents
:a
# skip directories owned by other packages
s:^%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:^%%dir (/boot|/etc|(/usr)?/lib/(modules|firmware)|/usr/src)/[^/]+$::
s:/[^/]+$::p
ta
' "$@" | sort -u
@ -1001,10 +1042,23 @@ fi
shopt -s nullglob dotglob
> %my_builddir/kernel-devel.files
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
f=${file##%buildroot}
echo "$f"
done | add_dirs_to_filelist >%my_builddir/kernel-devel.files
{
echo "%modules_dir/build"
echo "%modules_dir/source"
cd %buildroot
for file in boot/symtypes*; do
%if 0%{?usrmerged}
l="${file##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
mv "$file" "%{buildroot}$l"
ln -s "..$l" $file
echo "$l"
echo "%%ghost /$file"
%else
echo "/$file"
%endif
done
} | add_dirs_to_filelist >%my_builddir/kernel-devel.files
( cd %buildroot ; find .%obj_install_dir/%cpu_arch_flavor -type f ; ) | \
sed -e 's/^[.]//' | grep -v -e '[.]ipa-clones$' -e '/Symbols[.]list$' -e '/ipa-clones[.]list$'| \
add_dirs_to_filelist >> %my_builddir/kernel-devel.files
@ -1013,6 +1067,8 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
echo %ghost /boot/initrd$suffix
cd %buildroot
for f in boot/*; do
l="${f##*/}"
l="%modules_dir/${l//-%kernelrelease-%build_flavor}"
if test -L "$f"; then
echo "%%ghost /$f"
continue
@ -1028,24 +1084,46 @@ add_dirs_to_filelist >> %my_builddir/kernel-devel.files
;;
boot/vmlinux-*)
if $ghost_vmlinux; then
echo "%%ghost /$f"
continue
# fall through to mark next echo as %ghost
echo -n "%%ghost "
fi
;;
%if 0%{?usrmerged}
boot/vmlinuz-*)
echo -n "%%attr(0644, root, root) "
;;
%endif
boot/symtypes*)
%if 0%{?usrmerged}
echo "%exclude $l"
%endif
continue
;;
esac
%if 0%{?usrmerged}
mv "$f" "./$l"
ln -s "..$l" $f
# the find in the CONFIG_MODULES condition below also finds the files
# but there's sort -u later, so this is ok
echo "$l" # note: must be first after case statement above
echo "%%ghost /$f"
%else
echo "%%attr(0644, root, root) /$f"
%endif
done
if [ %CONFIG_MODULES = y ]; then
find lib/modules/%kernelrelease-%build_flavor \
find %{?usrmerged:usr/}lib/modules/%kernelrelease-%build_flavor \
-type d -o \
\( -path '*/modules.*' ! -path '*/modules.order' \
! -path '*/modules.builtin' \
! -path '*/modules.builtin.modinfo' \) -printf '%%%%ghost /%%p\n' \
-o -name '*.ko' -prune -o -type f -printf '/%%p\n'
-o -name '*.ko' -prune \
%if 0%{?usrmerged}
-o \( -type f ! -path '*/symtypes*' ! -path '*/vmlinu*' \) -printf '/%%p\n'
%else
-o -type f -printf '/%%p\n'
%endif
cat %my_builddir/base-modules
fi
if test %CONFIG_MODULE_SIG = "y" -a -d etc/uefi/certs; then
@ -1103,15 +1181,15 @@ for f in %my_builddir/*-kmp-modules; do
done
if [ %CONFIG_MODULES = y ]; then
install -m 644 %_sourcedir/modules.fips %{buildroot}/lib/modules/%kernelrelease-%build_flavor/modules.fips
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-base.files
echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-main.files
install -m 644 %_sourcedir/modules.fips %{buildroot}%modules_dir/modules.fips
echo %modules_dir/modules.fips >> %my_builddir/kernel-base.files
echo %modules_dir/modules.fips >> %my_builddir/kernel-main.files
fi
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
%fdupes $RPM_BUILD_ROOT/lib
%fdupes %buildroot%modules_dir
%preun -f preun.sh
@ -1294,7 +1372,7 @@ static, unlike the %{patch_package}-<kernel-version>-flavor package names.
%files %{livepatch}
# rpmlint complains about empty packages, so lets own something
%defattr(-, root, root)
%dir /lib/modules/%kernelrelease-%build_flavor
%dir %modules_dir
%endif
%if 0%{?klp_symbols} && "%livepatch" != ""

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:502facb18fb108af40d9ed46e6e90b85a757767d8f3984cb7fb69c82dd7c6af9
size 64879
oid sha256:3442eafc681d097d42543003f45ce6230122d498e38e7a04ce661aa33a1cf64a
size 64755

19
post.sh
View File

@ -10,6 +10,23 @@ for x in /boot/@IMAGE@ /boot/initrd; do
rm -f $x$suffix
ln -s ${x##*/}-@KERNELRELEASE@-@FLAVOR@ $x$suffix
done
@USRMERGE@# compat stuff for /boot.
@USRMERGE@# if /boot is not a speparate partition we can just link the kernel
@USRMERGE@# there to save space. Otherwise copy.
@USRMERGE@if mountpoint -q /boot; then
@USRMERGE@ copy_or_link="cp -a"
@USRMERGE@else
@USRMERGE@ copy_or_link="ln -sf"
@USRMERGE@fi
@USRMERGE@# XXX: need to fix suse-module-tools for sysctl.conf and System.map
@USRMERGE@for x in @IMAGE@ sysctl.conf System.map; do
@USRMERGE@ if [ ! -e /boot/$x-@KERNELRELEASE@-@FLAVOR@ ]; then
@USRMERGE@ $copy_or_link ..@MODULESDIR@/$x /boot/$x-@KERNELRELEASE@-@FLAVOR@
@USRMERGE@ if [ -e @MODULESDIR@/.$x.hmac ]; then
@USRMERGE@ $copy_or_link ..@MODULESDIR@/.$x.hmac /boot/.$x-@KERNELRELEASE@-@FLAVOR@.hmac
@USRMERGE@ fi
@USRMERGE@ fi
@USRMERGE@done
# Add symlinks of compatible modules to /lib/modules/$krel/weak-updates/,
# run depmod and mkinitrd
@ -56,7 +73,7 @@ if [ -f /etc/fstab -a ! -e /.buildenv ] ; then
if [ @FLAVOR@ = rt ]; then
default=force-default
fi
if [ -e /boot/$initrd -o ! -e /lib/modules/@KERNELRELEASE@-@FLAVOR@ ] && \
if [ -e /boot/$initrd -o ! -e @MODULESDIR@ ] && \
run_bootloader ; then
[ -e /boot/$initrd ] || initrd=
if [ -x /usr/lib/bootloader/bootloader_entry ]; then

View File

@ -6,7 +6,7 @@ rm -f /boot/do_purge_kernels
wm2=/usr/lib/module-init-tools/weak-modules2
nvr=@SUBPACKAGE@-@RPM_VERSION_RELEASE@
if [ -e /boot/System.map-@KERNELRELEASE@-@FLAVOR@ ]; then
if [ -e @SYSTEMMAP@ ]; then
# the same package was reinstalled or just rebuilt, otherwise the files
# would have been deleted by now
# do not remove anything in this case (bnc#533766)
@ -21,7 +21,7 @@ if [ @BASE_PACKAGE@ = 0 ]; then
rm -f /var/run/rpm-$nvr-modules
exit 0
fi
# Remove symlinks from /lib/modules/$krel/weak-updates/.
# Remove symlinks from @MODULESDIR@/weak-updates/.
if [ -x $wm2 ]; then
/bin/bash -${-/e/} $wm2 --remove-kernel @KERNELRELEASE@-@FLAVOR@
fi

View File

@ -1,3 +1,3 @@
2021-07-02 05:54:32 +0000
GIT Revision: aa40472d585ba618ec8180d4bd70a91f26eb790f
2021-07-07 05:43:22 +0000
GIT Revision: 91404150090172519addbb37c9a6ef0addc1116b
GIT Branch: stable

View File

@ -77,7 +77,7 @@ while read mod path; do
no)
;;
"")
echo "warning: ${path#/lib/modules/*/kernel/} not listed in supported.conf" >&2
echo "warning: $mod not listed in supported.conf" >&2
;;
*)
echo "error: invalid support flag for $mod: $support" >&2
@ -119,11 +119,13 @@ join -j 1 -o 2.2 "$tmp/base" "$tmp/all" >"$opt_out/base-modules"
# base firmware
kver=$(make $MAKE_ARGS -s -C "$opt_builddir" kernelrelease)
if test -d "$opt_dir/lib/firmware/$kver"; then
fw_dir=/lib/firmware/$kver
test -d $opt_dir/usr$fw_dir && fw_dir=/usr$fw_dir
if test -d "$opt_dir$fw_dir"; then
join <(/sbin/modinfo -F firmware \
$(sed "s:^:$opt_dir:" "$opt_out/base-modules") | sort) \
<(find "$opt_dir/lib/firmware/$kver" -type f -printf '%P\n' | sort)
fi | sed "s:^:/lib/firmware/$kver/:" >"$opt_out/base-firmware"
<(find "$opt_dir$fw_dir" -type f -printf '%P\n' | sort)
fi | sed "s:^:$fw_dir:" >"$opt_out/base-firmware"
# kmps
for f in "$opt_builddir"/Module.*-kmp; do

View File

@ -1,4 +1,4 @@
#!/bin/sh -e
#!/bin/bash -e
package="$1"
present="$2"
@ -10,6 +10,7 @@ rpm -ql --noghost "$package" | while read x ; do
[ -e "$x" -o -L "$x" ] && echo "$x" >> "$present" || echo Missing file "$x"
done
rpm -ql "$package" | while read x ; do
grep "^$x\$" $present >/dev/null || echo "$x" >> $ghost
done
rpm -q --qf '[%{FILEFLAGS} %{FILENAMES} 0%{FILEMODES:octal} %{FILESIZES} %{FILEMTIMES} %{FILELINKTOS}\n]' $package | while read -a line; do
[ $[line[0]&64] = 64 ] || continue
echo "${line[@]:1}"
done > "$ghost"