!10 在dracut.conf.d目录添加dracut-nvdimm-security.conf文件,以保证在加载libnvdimm.ko时,initramfs 中有ndctl命令
From: @markeryang Reviewed-by: @volcanodragon Signed-off-by: @louhongxiang
This commit is contained in:
commit
9bf4a1b46a
3
dracut-nvdimm-security.conf
Normal file
3
dracut-nvdimm-security.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Make sure libnvdimm is loaded and ndctl is available in the initramfs
|
||||||
|
install_items+="/bin/ndctl"
|
||||||
|
add_drivers+=" libnvdimm "
|
||||||
@ -1,11 +1,12 @@
|
|||||||
Name: ndctl
|
Name: ndctl
|
||||||
Version: 68
|
Version: 68
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory)
|
Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory)
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Url: https://github.com/pmem/ndctl
|
Url: https://github.com/pmem/ndctl
|
||||||
Source0: https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
Source1: dracut-nvdimm-security.conf
|
||||||
|
|
||||||
Requires: ndctl-libs%{?_isa} = %{version}-%{release}
|
Requires: ndctl-libs%{?_isa} = %{version}-%{release}
|
||||||
Requires: daxctl-libs%{?_isa} = %{version}-%{release}
|
Requires: daxctl-libs%{?_isa} = %{version}-%{release}
|
||||||
@ -98,6 +99,7 @@ make %{?_smp_mflags}
|
|||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
||||||
|
install -Dp -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/dracut.conf.d/nvdimm-security.conf
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make check
|
make check
|
||||||
@ -121,6 +123,7 @@ make check
|
|||||||
%{_unitdir}/ndctl-monitor.service
|
%{_unitdir}/ndctl-monitor.service
|
||||||
%{_sysconfdir}/ndctl/keys/keys.readme
|
%{_sysconfdir}/ndctl/keys/keys.readme
|
||||||
%{_sysconfdir}/modprobe.d/nvdimm-security.conf
|
%{_sysconfdir}/modprobe.d/nvdimm-security.conf
|
||||||
|
%{_sysconfdir}/dracut.conf.d/nvdimm-security.conf
|
||||||
|
|
||||||
%files -n daxctl
|
%files -n daxctl
|
||||||
%license util/COPYING licenses/BSD-MIT licenses/CC0
|
%license util/COPYING licenses/BSD-MIT licenses/CC0
|
||||||
@ -152,6 +155,9 @@ make check
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 7 2021 yanglongkang <yanglongkang@huawei.com> - 68-2
|
||||||
|
- Fix initramfs creating by forcing installation of libnvdimm.ko
|
||||||
|
|
||||||
* Thu Aug 20 2020 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 68-1
|
* Thu Aug 20 2020 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 68-1
|
||||||
- update version 68
|
- update version 68
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user