update to v74
This commit is contained in:
parent
dcbf882175
commit
488b181664
@ -1,40 +0,0 @@
|
|||||||
From 6694afe31dd67d186199a58d2252be5ea3472692 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Dan Williams <dan.j.williams@intel.com>
|
|
||||||
Date: Tue, 12 Jan 2021 23:15:09 -0800
|
|
||||||
Subject: [PATCH] ndctl/test: Fix device-dax mremap() test
|
|
||||||
|
|
||||||
The test_dax_remap() test is a regression check for mishandling of mremap()
|
|
||||||
in the presence of pmd_devmap(). My understanding is that it was a fuzzing
|
|
||||||
condition not something an application would want to do in practice.
|
|
||||||
|
|
||||||
On recent kernels with commit 73d5e0629919 ("mremap: check if it's possible
|
|
||||||
to split original vma"), the test fails for device-dax. That seems an
|
|
||||||
equally acceptable result of attempting this remap, so update the test
|
|
||||||
rather than ask the kernel to preserve the old behaviour.
|
|
||||||
|
|
||||||
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|
||||||
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
|
|
||||||
Link: https://lore.kernel.org/r/161052210936.1804207.17896246772670985157.stgit@dwillia2-desk3.amr.corp.intel.com
|
|
||||||
---
|
|
||||||
test/dax-pmd.c | 5 +++++
|
|
||||||
1 file changed, 5 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/test/dax-pmd.c b/test/dax-pmd.c
|
|
||||||
index b1251db..7648e34 100644
|
|
||||||
--- a/test/dax-pmd.c
|
|
||||||
+++ b/test/dax-pmd.c
|
|
||||||
@@ -69,6 +69,11 @@ int test_dax_remap(struct ndctl_test *test, int dax_fd, unsigned long align, voi
|
|
||||||
|
|
||||||
remap = mremap(addr, REMAP_SIZE, REMAP_SIZE, MREMAP_MAYMOVE|MREMAP_FIXED, anon);
|
|
||||||
|
|
||||||
+ if (remap == MAP_FAILED) {
|
|
||||||
+ fprintf(stderr, "%s: mremap failed, that's ok too\n", __func__);
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (remap != anon) {
|
|
||||||
rc = -ENXIO;
|
|
||||||
perror("mremap");
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
Binary file not shown.
BIN
ndctl-74.tar.gz
Normal file
BIN
ndctl-74.tar.gz
Normal file
Binary file not shown.
117
ndctl.spec
117
ndctl.spec
@ -1,18 +1,18 @@
|
|||||||
Name: ndctl
|
Name: ndctl
|
||||||
Version: 71.1
|
Version: 74
|
||||||
Release: 4
|
Release: 1
|
||||||
Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory)
|
Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory)
|
||||||
License: GPL-2, LGPL-2.1, MIT, CC0-1.0
|
License: GPL-2 AND LGPL-2.1 AND MIT AND CC0-1.0
|
||||||
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
|
||||||
|
|
||||||
Patch1: 0001-ndctl-test-Fix-device-dax-mremap-test.patch
|
|
||||||
|
|
||||||
Requires: ndctl-libs%{?_isa} = %{version}-%{release}
|
Requires: ndctl-libs%{?_isa} = %{version}-%{release}
|
||||||
Requires: daxctl-libs%{?_isa} = %{version}-%{release}
|
Requires: daxctl-libs%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: cxl-libs%{?_isa} = %{version}-%{release}
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: rubygem-asciidoctor
|
BuildRequires: rubygem-asciidoctor
|
||||||
|
%define asciidoctor -Dasciidoctor=enabled
|
||||||
BuildRequires: xmlto
|
BuildRequires: xmlto
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
@ -23,7 +23,9 @@ BuildRequires: pkgconfig(uuid)
|
|||||||
BuildRequires: pkgconfig(json-c)
|
BuildRequires: pkgconfig(json-c)
|
||||||
BuildRequires: pkgconfig(bash-completion)
|
BuildRequires: pkgconfig(bash-completion)
|
||||||
BuildRequires: pkgconfig(systemd)
|
BuildRequires: pkgconfig(systemd)
|
||||||
BuildRequires: keyutils-libs-devel
|
BuildRequires: keyutils-libs-devel
|
||||||
|
BuildRequires: iniparser
|
||||||
|
BuildRequires: meson
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Utility library for managing the "libnvdimm" subsystem. The "libnvdimm"
|
Utility library for managing the "libnvdimm" subsystem. The "libnvdimm"
|
||||||
@ -31,6 +33,9 @@ subsystem defines a kernel device model and control message interface for
|
|||||||
platform NVDIMM resources like those defined by the ACPI 6+ NFIT (NVDIMM
|
platform NVDIMM resources like those defined by the ACPI 6+ NFIT (NVDIMM
|
||||||
Firmware Interface Table).
|
Firmware Interface Table).
|
||||||
|
|
||||||
|
%if 0%{?flatpak}
|
||||||
|
%global _udevrulesdir %{_prefix}/lib/udev/rules.d
|
||||||
|
%endif
|
||||||
|
|
||||||
%package -n ndctl-devel
|
%package -n ndctl-devel
|
||||||
Summary: Development files for libndctl
|
Summary: Development files for libndctl
|
||||||
@ -54,6 +59,26 @@ the Linux kernel Device-DAX facility. This facility enables DAX mappings
|
|||||||
of performance / feature differentiated memory without need of a
|
of performance / feature differentiated memory without need of a
|
||||||
filesystem.
|
filesystem.
|
||||||
|
|
||||||
|
%package -n cxl-cli
|
||||||
|
Summary: Manage CXL devices
|
||||||
|
License: GPLv2
|
||||||
|
Group: System Environment/Base
|
||||||
|
Requires: cxl-libs%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n cxl-cli
|
||||||
|
The cxl utility provides enumeration and provisioning commands for
|
||||||
|
the Linux kernel CXL devices.
|
||||||
|
|
||||||
|
%package -n cxl-devel
|
||||||
|
Summary: Development files for libcxl
|
||||||
|
License: LGPLv2
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: cxl-libs%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n cxl-devel
|
||||||
|
This package contains libraries and header files for developing applications
|
||||||
|
that use libcxl, a library for enumerating and communicating with CXL devices.
|
||||||
|
|
||||||
%package -n daxctl-devel
|
%package -n daxctl-devel
|
||||||
Summary: Development files for libdaxctl
|
Summary: Development files for libdaxctl
|
||||||
License: LGPLv2
|
License: LGPLv2
|
||||||
@ -87,22 +112,27 @@ Device DAX is a facility for establishing DAX mappings of performance /
|
|||||||
feature-differentiated memory. daxctl-libs provides an enumeration /
|
feature-differentiated memory. daxctl-libs provides an enumeration /
|
||||||
control API for these devices.
|
control API for these devices.
|
||||||
|
|
||||||
|
%package -n cxl-libs
|
||||||
|
Summary: Management library for CXL devices
|
||||||
|
License: LGPLv2
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
|
||||||
|
%description -n cxl-libs
|
||||||
|
libcxl is a library for enumerating and communicating with CXL devices.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n ndctl-%{version} -p1
|
%autosetup -n ndctl-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
echo %{version} > version
|
%meson %{?asciidoctor} -Dversion-tag=%{version}
|
||||||
./autogen.sh
|
%meson_build
|
||||||
%configure --disable-static --disable-silent-rules
|
|
||||||
make %{?_smp_mflags}
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
%meson_install
|
||||||
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make check
|
%meson_test
|
||||||
|
|
||||||
%post -n ndctl-libs -p /sbin/ldconfig
|
%post -n ndctl-libs -p /sbin/ldconfig
|
||||||
|
|
||||||
@ -112,23 +142,65 @@ make check
|
|||||||
|
|
||||||
%postun -n daxctl-libs -p /sbin/ldconfig
|
%postun -n daxctl-libs -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%post -n cxl-libs -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun -n cxl-libs -p /sbin/ldconfig
|
||||||
|
|
||||||
%define bashcompdir %(pkg-config --variable=completionsdir bash-completion)
|
%define bashcompdir %(pkg-config --variable=completionsdir bash-completion)
|
||||||
|
|
||||||
|
%pre
|
||||||
|
if [ -f %{_sysconfdir}/ndctl/monitor.conf ] ; then
|
||||||
|
if ! [ -f %{_sysconfdir}/ndctl.conf.d/monitor.conf ] ; then
|
||||||
|
cp -a %{_sysconfdir}/ndctl/monitor.conf /var/run/ndctl-monitor.conf-migration
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
%post
|
||||||
|
if [ -f /var/run/ndctl-monitor.conf-migration ] ; then
|
||||||
|
config_found=false
|
||||||
|
while read line ; do
|
||||||
|
[ -n "$line" ] || continue
|
||||||
|
case "$line" in
|
||||||
|
\#*) continue ;;
|
||||||
|
esac
|
||||||
|
config_found=true
|
||||||
|
break
|
||||||
|
done < /var/run/ndctl-monitor.conf-migration
|
||||||
|
if $config_found ; then
|
||||||
|
echo "[monitor]" > %{_sysconfdir}/ndctl.conf.d/monitor.conf
|
||||||
|
cat /var/run/ndctl-monitor.conf-migration >> %{_sysconfdir}/ndctl.conf.d/monitor.conf
|
||||||
|
fi
|
||||||
|
rm /var/run/ndctl-monitor.conf-migration
|
||||||
|
fi
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSES/preferred/GPL-2.0 LICENSES/other/MIT LICENSES/other/CC0-1.0
|
%license LICENSES/preferred/GPL-2.0 LICENSES/other/MIT LICENSES/other/CC0-1.0
|
||||||
%{_bindir}/ndctl
|
%{_bindir}/ndctl
|
||||||
%{_mandir}/man1/ndctl*
|
%{_mandir}/man1/ndctl*
|
||||||
%{bashcompdir}/
|
%{bashcompdir}/ndctl
|
||||||
%config(noreplace) %{_sysconfdir}/ndctl/monitor.conf
|
|
||||||
%{_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
|
||||||
|
%dir %{_sysconfdir}/ndctl.conf.d
|
||||||
|
%config(noreplace) %{_sysconfdir}/ndctl.conf.d/monitor.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/ndctl.conf.d/ndctl.conf
|
||||||
|
|
||||||
%files -n daxctl
|
%files -n daxctl
|
||||||
%license LICENSES/preferred/GPL-2.0 LICENSES/other/MIT LICENSES/other/CC0-1.0
|
%license LICENSES/preferred/GPL-2.0 LICENSES/other/MIT LICENSES/other/CC0-1.0
|
||||||
%{_bindir}/daxctl
|
%{_bindir}/daxctl
|
||||||
%{_mandir}/man1/daxctl*
|
%{_mandir}/man1/daxctl*
|
||||||
%{_datadir}/daxctl/daxctl.conf
|
%{_datadir}/daxctl/daxctl.conf
|
||||||
|
%{bashcompdir}/daxctl
|
||||||
|
%{_unitdir}/daxdev-reconfigure@.service
|
||||||
|
%config %{_udevrulesdir}/90-daxctl-device.rules
|
||||||
|
%dir %{_sysconfdir}/daxctl.conf.d/
|
||||||
|
%config(noreplace) %{_sysconfdir}/daxctl.conf.d/daxctl.example.conf
|
||||||
|
|
||||||
|
%files -n cxl-cli
|
||||||
|
%license LICENSES/preferred/GPL-2.0 LICENSES/other/MIT LICENSES/other/CC0-1.0
|
||||||
|
%{_bindir}/cxl
|
||||||
|
%{_mandir}/man1/cxl*
|
||||||
|
%{bashcompdir}/cxl
|
||||||
|
|
||||||
%files -n ndctl-libs
|
%files -n ndctl-libs
|
||||||
%doc README.md
|
%doc README.md
|
||||||
@ -140,6 +212,11 @@ make check
|
|||||||
%license LICENSES/preferred/LGPL-2.1 LICENSES/other/MIT LICENSES/other/CC0-1.0
|
%license LICENSES/preferred/LGPL-2.1 LICENSES/other/MIT LICENSES/other/CC0-1.0
|
||||||
%{_libdir}/libdaxctl.so.*
|
%{_libdir}/libdaxctl.so.*
|
||||||
|
|
||||||
|
%files -n cxl-libs
|
||||||
|
%doc README.md
|
||||||
|
%license LICENSES/preferred/LGPL-2.1 LICENSES/other/MIT LICENSES/other/CC0-1.0
|
||||||
|
%{_libdir}/libcxl.so.*
|
||||||
|
|
||||||
%files -n ndctl-devel
|
%files -n ndctl-devel
|
||||||
%license LICENSES/preferred/LGPL-2.1
|
%license LICENSES/preferred/LGPL-2.1
|
||||||
%{_includedir}/ndctl/
|
%{_includedir}/ndctl/
|
||||||
@ -152,8 +229,18 @@ make check
|
|||||||
%{_libdir}/libdaxctl.so
|
%{_libdir}/libdaxctl.so
|
||||||
%{_libdir}/pkgconfig/libdaxctl.pc
|
%{_libdir}/pkgconfig/libdaxctl.pc
|
||||||
|
|
||||||
|
%files -n cxl-devel
|
||||||
|
%license LICENSES/preferred/LGPL-2.1
|
||||||
|
%{_includedir}/cxl/
|
||||||
|
%{_libdir}/libcxl.so
|
||||||
|
%{_libdir}/pkgconfig/libcxl.pc
|
||||||
|
%{_mandir}/man3/cxl*
|
||||||
|
%{_mandir}/man3/libcxl.3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Oct 31 2022 liusirui <liusirui@huawei.com> - 74-1
|
||||||
|
- update version 74
|
||||||
|
|
||||||
* Thu Oct 20 2022 liusirui <liusirui@huawei.com> - 71.1-4
|
* Thu Oct 20 2022 liusirui <liusirui@huawei.com> - 71.1-4
|
||||||
- backport patch to fix test case
|
- backport patch to fix test case
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user