Skip to content

Commit d98e681

Browse files
srinidhira0suezzelur
authored andcommitted
fipsify: Remove fipsify & photon-checksum-generator
- As Linux kernel crypto modules are going to be canisterized, We do not need fipsify package, dracut fipsify module and photon-checksum-generator package to verify the integrity of the kernel crypto canister. Change-Id: Iec858091dfd1a19e4369c042fead7b3cc4c4be5a Signed-off-by: srinidhira0 <srinidhir@vmware.com> Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/11350 Reviewed-by: Keerthana K <keerthanak@vmware.com> Tested-by: Anish Swaminathan <anishs@vmware.com>
1 parent 431c8a1 commit d98e681

12 files changed

Lines changed: 22 additions & 293 deletions

File tree

SPECS/dracut/dracut.spec

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Summary: dracut to create initramfs
55
Name: dracut
66
Version: 050
7-
Release: 4%{?dist}
7+
Release: 5%{?dist}
88
Group: System Environment/Base
99
# The entire source code is GPLv2+
1010
# except install/* which is LGPLv2+
@@ -19,8 +19,7 @@ Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
1919
Patch0: disable-xattr.patch
2020
Patch1: fix-initrd-naming-for-photon.patch
2121
Patch2: lvm-no-read-only-locking.patch
22-
Patch3: fips-changes.patch
23-
Patch4: fix-hostonly.patch
22+
Patch3: fix-hostonly.patch
2423

2524
BuildRequires: bash git
2625
BuildRequires: pkg-config
@@ -68,6 +67,7 @@ make %{?_smp_mflags} install \
6867

6968
echo "DRACUT_VERSION=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut-version.sh
7069

70+
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/01fips
7171
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/02fips-aesni
7272

7373
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00bootchart
@@ -156,6 +156,8 @@ rm -rf -- $RPM_BUILD_ROOT
156156
%dir /var/lib/dracut/overlay
157157

158158
%changelog
159+
* Tue Nov 03 2020 Srinidhi Rao <srinidhir@vmware.com> 050-5
160+
- Remove fipsify support
159161
* Fri Oct 09 2020 Shreenidhi Shedi <sshedi@vmware.com> 050-4
160162
- Fixed hostonly setting logic to generate initrd properly
161163
* Mon Oct 05 2020 Susant Sahani <ssahani@vmware.com> 050-3

SPECS/fipsify/fips.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

SPECS/fipsify/fipsify.spec

Lines changed: 0 additions & 42 deletions
This file was deleted.

SPECS/fipsify/modules.fips

Lines changed: 0 additions & 26 deletions
This file was deleted.

SPECS/initramfs/initramfs.spec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: initramfs
22
Name: initramfs
33
Version: 2.0
4-
Release: 5%{?dist}
4+
Release: 6%{?dist}
55
Source0: fscks.conf
66
License: Apache License
77
Group: System Environment/Base
@@ -19,7 +19,7 @@ install -D -m644 %{SOURCE0} %{buildroot}%{_sysconfdir}/dracut.conf.d/
1919
install -d -m755 %{buildroot}%{_localstatedir}/lib/initramfs/kernel
2020

2121
%define watched_path %{_sbindir} %{_libdir}/udev/rules.d %{_libdir}/systemd/system /lib/modules %{_sysconfdir}/dracut.conf.d
22-
%define watched_pkgs e2fsprogs, systemd, kpartx, device-mapper-multipath fipsify
22+
%define watched_pkgs e2fsprogs, systemd, kpartx, device-mapper-multipath
2323

2424
%define removal_action() rm -rf %{_localstatedir}/lib/rpm-state/initramfs
2525

@@ -111,6 +111,8 @@ echo "initramfs" %{version}-%{release} "postun" >&2
111111
%dir %{_localstatedir}/lib/initramfs/kernel
112112

113113
%changelog
114+
* Tue Nov 03 2020 Srinidhi Rao <srinidhir@vmware.com> 2.0-6
115+
- Remove the trigger for fipsify
114116
* Tue Mar 17 2020 Vikash Bansal <bvikas@vmware.com> 2.0-5
115117
- Added trigger for fipsify
116118
* Mon Aug 27 2018 Dheeraj Shetty <dheerajs@vmware.com> 2.0-4

SPECS/linux/genhmac.inc

Lines changed: 0 additions & 15 deletions
This file was deleted.

SPECS/linux/linux-aws.spec

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
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
@@ -9,7 +8,7 @@
98
Summary: Kernel
109
Name: linux-aws
1110
Version: 5.9.0
12-
Release: 1%{?kat_build:.kat}%{?dist}
11+
Release: 2%{?kat_build:.kat}%{?dist}
1312
License: GPLv2
1413
URL: http://www.kernel.org/
1514
Group: System Environment/Kernel
@@ -25,10 +24,6 @@ Source1: config-aws
2524
Source2: initramfs.trigger
2625
Source3: pre-preun-postun-tasks.inc
2726
Source4: 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
3429
Patch0: net-Double-tcp_mem-limits.patch
@@ -159,14 +154,6 @@ Requires: python3
159154
%description docs
160155
The 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
172159
Summary: 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

263249
make 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 \
272252
for 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}
296273
install -vdm 755 %{buildroot}/usr/lib/debug/lib/modules/%{uname_r}
297274
make 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}
370341
ln -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

Comments
 (0)