11%{! ?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
22%global security_hardening none
3- %global photon_checksum_generator_version 1.1
43%ifarch x86_64
54%define arch x86_64
65%define archdir x86
98Summary: Kernel
109Name: linux-aws
1110Version: 5.9.0
12- Release: 1 %{?kat_build:.kat}%{?dist }
11+ Release: 2 %{?kat_build:.kat}%{?dist }
1312License: GPLv2
1413URL: http://www.kernel.org/
1514Group: System Environment/Kernel
@@ -25,10 +24,6 @@ Source1: config-aws
2524Source2: initramfs.trigger
2625Source3: pre-preun-postun-tasks.inc
2726Source4: check_for_config_applicability.inc
28- # Photon-checksum-generator kernel module
29- Source5: https://github.com/vmware/photon-checksum-generator/releases/photon-checksum-generator-%{photon_checksum_generator_version }.tar.gz
30- %define sha1 photon-checksum-generator= 1d5c2e1855a9d1368cf87ea9a8a5838841752dc3
31- Source6: genhmac.inc
3227
3328# common
3429Patch0: net-Double-tcp_mem-limits.patch
@@ -159,14 +154,6 @@ Requires: python3
159154%description docs
160155The Linux package contains the Linux kernel doc files
161156
162- %package hmacgen
163- Summary: HMAC SHA256/HMAC SHA512 generator
164- Group: System Environment/Kernel
165- Requires: %{name } = %{version }-%{release }
166- Enhances: %{name }
167- %description hmacgen
168- This Linux package contains hmac sha generator kernel module.
169-
170157%ifarch x86_64
171158%package oprofile
172159Summary: Kernel driver for oprofile, a statistical profiler for Linux systems
@@ -179,7 +166,6 @@ Kernel driver for oprofile, a statistical profiler for Linux systems
179166%prep
180167#TODO: remove rcN after 5.9 goes out of rc
181168%setup -q -n linux-%{version }
182- %setup -D -b 5 -n linux-%{version }
183169
184170%patch0 -p1
185171%patch1 -p1
@@ -262,12 +248,6 @@ sed -i 's/CONFIG_LOCALVERSION="-aws"/CONFIG_LOCALVERSION="-%{release}-aws"/' .co
262248
263249make VERBOSE= 1 KBUILD_BUILD_VERSION= "1-photon" KBUILD_BUILD_HOST= "photon" ARCH= %{arch } %{?_smp_mflags }
264250
265- #build photon-checksum-generator module
266- bldroot= `pwd`
267- pushd ../photon-checksum-generator-%{photon_checksum_generator_version }/kernel
268- make -C $bldroot M= `pwd` modules
269- popd
270-
271251%define __modules_install_post \
272252for MODULE in `find %{buildroot }/lib/modules/%{uname_r } -name *.ko` ; do \
273253 ./scripts/sign-file sha512 certs/signing_key.pem certs/signing_key.x509 $MODULE \
@@ -276,16 +256,13 @@ for MODULE in `find %{buildroot}/lib/modules/%{uname_r} -name *.ko` ; do \
276256 done \
277257%{nil }
278258
279- %include %{SOURCE6 }
280-
281259# We want to compress modules after stripping. Extra step is added to
282260# the default __spec_install_post.
283261%define __spec_install_post\
284262 %{?__debug_package:%{__debug_install_post}}\
285263 %{__arch_install_post}\
286264 %{__os_install_post}\
287265 %{__modules_install_post}\
288- %{__modules_gen_hmac}\
289266%{nil }
290267
291268%install
@@ -296,12 +273,6 @@ install -vdm 755 %{buildroot}%{_usrsrc}/%{name}-headers-%{uname_r}
296273install -vdm 755 %{buildroot }/usr/lib/debug/lib/modules/%{uname_r }
297274make INSTALL_MOD_PATH=%{buildroot } modules_install
298275
299- #install photon-checksum-generator module
300- bldroot= `pwd`
301- pushd ../photon-checksum-generator-%{photon_checksum_generator_version }/kernel
302- make -C $bldroot M= `pwd` INSTALL_MOD_PATH= %{buildroot } modules_install
303- popd
304-
305276%ifarch x86_64
306277
307278# Verify for build-id match
@@ -369,9 +340,6 @@ find %{buildroot}/lib/modules -name '*.ko' -print0 | xargs -0 chmod u+x
369340/sbin/depmod -aq %{uname_r }
370341ln -sf %{name }-%{uname_r }.cfg /boot/photon.cfg
371342
372- %post hmacgen
373- /sbin/depmod -a %{uname_r }
374-
375343%post drivers-gpu
376344/sbin/depmod -aq %{uname_r }
377345
@@ -388,16 +356,13 @@ ln -sf %{name}-%{uname_r}.cfg /boot/photon.cfg
388356/boot/System.map-%{uname_r }
389357/boot/config-%{uname_r }
390358/boot/vmlinuz-%{uname_r }
391- /boot/.vmlinuz-%{uname_r }.hmac
392359%config(noreplace) /boot/%{name }-%{uname_r }.cfg
393360%config %{_localstatedir }/lib/initramfs/kernel/%{uname_r }
394361%defattr(0644,root,root)
395362/lib/modules/%{uname_r }/*
396363%exclude /lib/modules/%{uname_r }/build
397364%exclude /lib/modules/%{uname_r }/kernel/drivers/gpu
398365%exclude /lib/modules/%{uname_r }/kernel/sound
399- %exclude /lib/modules/%{uname_r }/extra/hmac_generator.ko.xz
400- %exclude /lib/modules/%{uname_r }/extra/.hmac_generator.ko.xz.hmac
401366%ifarch x86_64
402367%exclude /lib/modules/%{uname_r }/kernel/arch/x86/oprofile/
403368%endif
@@ -416,11 +381,6 @@ ln -sf %{name}-%{uname_r}.cfg /boot/photon.cfg
416381%exclude /lib/modules/%{uname_r }/kernel/drivers/gpu/drm/cirrus/
417382/lib/modules/%{uname_r }/kernel/drivers/gpu
418383
419- %files hmacgen
420- %defattr(-,root,root)
421- /lib/modules/%{uname_r }/extra/hmac_generator.ko.xz
422- /lib/modules/%{uname_r }/extra/.hmac_generator.ko.xz.hmac
423-
424384%files sound
425385%defattr(-,root,root)
426386/lib/modules/%{uname_r }/kernel/sound
@@ -432,6 +392,8 @@ ln -sf %{name}-%{uname_r}.cfg /boot/photon.cfg
432392%endif
433393
434394%changelog
395+ * Tue Nov 03 2020 Srinidhi Rao <srinidhir@vmware.com> 5.9.0-2
396+ - Remove the support of fipsify and hmacgen
435397* Wed Oct 28 2020 Him Kalyan Bordoloi <bordoloih@vmware.com> 5.9.0-1
436398- Update to version 5.9.0
437399* Tue Sep 29 2020 Satya Naga Vasamsetty <svasamsetty@vmware.com> 4.19.127-3
0 commit comments