ndctl/ndctl.spec
lihaoxiang 687b01f367 fix ndctl delete namespace exception
Signed-off-by: lihaoxiang <lihaoxiang9@huawei.com>
(cherry picked from commit 9e7c11ffd754f778171f5cda14840fe4e1324547)
2023-01-06 14:28:29 +08:00

181 lines
5.1 KiB
RPMSpec

Name: ndctl
Version: 68
Release: 4
Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory)
License: GPL-2.0-only and LGPL-2.1-only and MIT and CC0-1.0
Group: System Environment/Base
Url: https://github.com/pmem/ndctl
Source0: https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: dracut-nvdimm-security.conf
Patch1: 0001-zero_info_block-skip-seed-devices.patch
Requires: ndctl-libs%{?_isa} = %{version}-%{release}
Requires: daxctl-libs%{?_isa} = %{version}-%{release}
BuildRequires: autoconf
BuildRequires: rubygem-asciidoctor
BuildRequires: xmlto
BuildRequires: automake
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libkmod)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(json-c)
BuildRequires: pkgconfig(bash-completion)
BuildRequires: pkgconfig(systemd)
BuildRequires: keyutils-libs-devel
%description
Utility library for managing the "libnvdimm" subsystem. The "libnvdimm"
subsystem defines a kernel device model and control message interface for
platform NVDIMM resources like those defined by the ACPI 6+ NFIT (NVDIMM
Firmware Interface Table).
%package -n ndctl-devel
Summary: Development files for libndctl
License: LGPLv2
Group: Development/Libraries
Requires: ndctl-libs%{?_isa} = %{version}-%{release}
%description -n ndctl-devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package -n daxctl
Summary: Manage Device-DAX instances
License: GPLv2
Group: System Environment/Base
Requires: daxctl-libs%{?_isa} = %{version}-%{release}
%description -n daxctl
The daxctl utility provides enumeration and provisioning commands for
the Linux kernel Device-DAX facility. This facility enables DAX mappings
of performance / feature differentiated memory without need of a
filesystem.
%package -n daxctl-devel
Summary: Development files for libdaxctl
License: LGPLv2
Group: Development/Libraries
Requires: daxctl-libs%{?_isa} = %{version}-%{release}
%description -n daxctl-devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}, a library for enumerating
"Device DAX" devices. Device DAX is a facility for establishing DAX
mappings of performance / feature-differentiated memory.
%package -n ndctl-libs
Summary: Management library for "libnvdimm" subsystem devices (Non-volatile Memory)
License: LGPLv2
Group: System Environment/Libraries
Requires: daxctl-libs%{?_isa} = %{version}-%{release}
%description -n ndctl-libs
Libraries for %{name}.
%package -n daxctl-libs
Summary: Management library for "Device DAX" devices
License: LGPLv2
Group: System Environment/Libraries
%description -n daxctl-libs
Device DAX is a facility for establishing DAX mappings of performance /
feature-differentiated memory. daxctl-libs provides an enumeration /
control API for these devices.
%prep
%autosetup -n ndctl-%{version} -p1
%build
echo %{version} > version
./autogen.sh
%configure --disable-static --disable-silent-rules
make %{?_smp_mflags}
%install
%make_install
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
make check
%post -n ndctl-libs -p /sbin/ldconfig
%postun -n ndctl-libs -p /sbin/ldconfig
%post -n daxctl-libs -p /sbin/ldconfig
%postun -n daxctl-libs -p /sbin/ldconfig
%define bashcompdir %(pkg-config --variable=completionsdir bash-completion)
%files
%license util/COPYING licenses/BSD-MIT licenses/CC0
%{_bindir}/ndctl
%{_mandir}/man1/ndctl*
%{bashcompdir}/
%config(noreplace) %{_sysconfdir}/ndctl/monitor.conf
%{_unitdir}/ndctl-monitor.service
%{_sysconfdir}/ndctl/keys/keys.readme
%{_sysconfdir}/modprobe.d/nvdimm-security.conf
%{_sysconfdir}/dracut.conf.d/nvdimm-security.conf
%files -n daxctl
%license util/COPYING licenses/BSD-MIT licenses/CC0
%{_bindir}/daxctl
%{_mandir}/man1/daxctl*
%{_datadir}/daxctl/daxctl.conf
%files -n ndctl-libs
%doc README.md
%license COPYING licenses/BSD-MIT licenses/CC0
%{_libdir}/libndctl.so.*
%files -n daxctl-libs
%doc README.md
%license COPYING licenses/BSD-MIT licenses/CC0
%{_libdir}/libdaxctl.so.*
%files -n ndctl-devel
%license COPYING
%{_includedir}/ndctl/
%{_libdir}/libndctl.so
%{_libdir}/pkgconfig/libndctl.pc
%files -n daxctl-devel
%license COPYING
%{_includedir}/daxctl/
%{_libdir}/libdaxctl.so
%{_libdir}/pkgconfig/libdaxctl.pc
%changelog
* Fri Jan 6 2023 lihaoxiang <lihaoxiang9@huawei.com> - 68-4
- fix ndctl delete namespace exception
* Wed Jul 13 2022 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 68-3
- correct License: add LGPLv2.1, MIT, CC0-1.0
* 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
- update version 68
* Wed Oct 16 2019 ted.zhang <ted.zhang@huawei.com> - 63-2
- generate spec file from source code
* Fri May 27 2016 Dan Williams <dan.j.williams@intel.com> - 53-1
- add daxctl-libs + daxctl-devel packages
- add bash completion
* Mon Apr 04 2016 Dan Williams <dan.j.williams@intel.com> - 52-1
- Initial rpm submission to Fedora