Sync from SUSE:SLFO:Main ndctl revision 850091efddaecc289b6ba75d2fad58b6

This commit is contained in:
Adrian Schröter 2024-05-03 16:56:44 +02:00
commit 168f5831be
6 changed files with 1247 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,44 @@
Index: ndctl-76/ndctl/ndctl-monitor.service
===================================================================
--- ndctl-76.orig/ndctl/ndctl-monitor.service
+++ ndctl-76/ndctl/ndctl-monitor.service
@@ -2,6 +2,17 @@
Description=Ndctl Monitor Daemon
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+ProtectHome=true
+ProtectHostname=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
Type=simple
ExecStart=/usr/bin/ndctl monitor
Index: ndctl-76/cxl/cxl-monitor.service
===================================================================
--- ndctl-76.orig/cxl/cxl-monitor.service
+++ ndctl-76/cxl/cxl-monitor.service
@@ -2,6 +2,17 @@
Description=CXL Monitor Daemon
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+ProtectHome=true
+ProtectHostname=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
Type=simple
ExecStart=/usr/bin/cxl monitor

BIN
ndctl-78.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

6
ndctl-rpmlintrc Normal file
View File

@ -0,0 +1,6 @@
# This line is mandatory to access the configuration functions
from Config import *
# libraries shipped together with libndctl, no separate versioning
addFilter("shlib-policy-name-error .* libcxl.so")
addFilter("shlib-policy-name-error .* libdaxctl.so")

953
ndctl.changes Normal file
View File

@ -0,0 +1,953 @@
-------------------------------------------------------------------
Tue Nov 7 09:50:43 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>
- Fix build with RPM 4.19: unnumbered patches are no longer
supported.
-------------------------------------------------------------------
Mon Aug 14 09:50:13 UTC 2023 - Michal Suchanek <msuchanek@suse.com>
- Update to version 78
* Improved CXL support (jsc#PED-5804, jsc#PED-6162)
- Remove upstreamed patches
- cxl-monitor-fix-include-paths-for-tracefs-and-tracee.patch
- cxl-event-trace-use-the-wrapped-util_json_new_u64.patch
-------------------------------------------------------------------
Thu Feb 23 09:40:09 UTC 2023 - Michal Suchanek <msuchanek@suse.com>
- Update to version 76
* daxctl-online-memory: fix a memblock enumeration off-by-one
* daxctl-online-memory: tolerate non-memblock sysfs attrs that start with 'memory_'
* cxl-monitor: new command to monitor CXL events
* Refresh harden_ndctl-monitor.service.patch: Apply to cxl-monitor as well
- Remove upstreamed patches
- daxctl-Fix-memblock-enumeration-off-by-one.patch
- daxctl-Skip-over-memory-failure-node-status.patch
- meson.build-fix-version-for-v75.patch
- libndctl-msft-Remove-NDN_MSFT_SMART_-_VALID-defines.patch
- libndctl-msft-Replace-nonsense-NDN_MSFT_CMD_SMART-co.patch
- libndctl-msft-Add-custom-cmd_is_supported-method.patch
- libndctl-msft-Improve-smart-state-reporting.patch
- Add build fixes for TW and Leap
+ cxl-monitor-fix-include-paths-for-tracefs-and-tracee.patch
+ cxl-event-trace-use-the-wrapped-util_json_new_u64.patch
-------------------------------------------------------------------
Wed Feb 22 14:09:11 UTC 2023 - Michal Suchanek <msuchanek@suse.com>
- Merge fixes since v75
+ daxctl-Fix-memblock-enumeration-off-by-one.patch
+ daxctl-Skip-over-memory-failure-node-status.patch
+ meson.build-fix-version-for-v75.patch
+ libndctl-msft-Remove-NDN_MSFT_SMART_-_VALID-defines.patch
+ libndctl-msft-Replace-nonsense-NDN_MSFT_CMD_SMART-co.patch
+ libndctl-msft-Add-custom-cmd_is_supported-method.patch
+ libndctl-msft-Improve-smart-state-reporting.patch
-------------------------------------------------------------------
Fri Jan 13 11:54:13 UTC 2023 - Michal Suchanek <msuchanek@suse.com>
- Update to version 75 (jsc#PED-1080):
* CXL fixes and improvements
* Add master-passphrase removal support
* some oob memory access fixes
-------------------------------------------------------------------
Wed Aug 24 07:57:14 UTC 2022 - Michal Suchanek <msuchanek@suse.com>
- Update to version 74
* Many CXL fixes
* Some build system fixes
* monitor: Fix the monitor config file parsing
* ndctl/bus: Handle missing scrub commands more gracefully
* ndctl/dimm: Flush invalidated labels after overwrite
- Remove upstreamed patch
- ndctl-build-Fix-systemd-unit-directory-detection.patch
- ndctl-meson-make-modprobedatadir-an-option.patch
-------------------------------------------------------------------
Sun Apr 10 11:46:05 UTC 2022 - Michal Suchanek <msuchanek@suse.com>
- Provide compatibility symlink for libdaxctl.h in the old location
-------------------------------------------------------------------
Tue Mar 8 12:57:40 UTC 2022 - Michal Suchanek <msuchanek@suse.com>
- Update to version 73:
* Many CXL fixes
* Fix shipped monitor.conf (bsc#1194696 https://github.com/pmem/ndctl/pull/189)
* inject-smart: Add support for papr
* Switch to meson build system
+ ndctl-build-Fix-systemd-unit-directory-detection.patch
+ ndctl-meson-make-modprobedatadir-an-option.patch
- Add monitor.conf migration as upstream has (bsc#1194696)
- Use %%config(noreplace) for files in /etc as upstream does.
- Update to version 72.1
* Add support for CXL interface
* Configuration file rework
* Add service for automatic reconfiguration
* Drop upstreamed patches
- ndctl-namespace-skip-zero-namespaces-when-processing.patch
- ndctl-namespace-Suppress-ENXIO-when-processing-all-n.patch
- 0001-ndctl-namespace-Fix-disable-namespace-accounting-rel.patch
- 0002-Expose-ndctl_bus_nfit_translate_spa-as-a-public-func.patch
- 0003-libndctl-Unify-adding-dimms-for-papr-and-nfit-famili.patch
- 0004-daxctl-fail-reconfigure-device-based-on-kernel-onlin.patch
- 0005-libdaxctl-add-an-API-to-check-if-a-device-is-active.patch
- 0006-libndctl-check-for-active-system-ram-before-disablin.patch
- 0007-daxctl-emit-counts-of-total-and-online-memblocks.patch
- 0008-ndctl-Update-nvdimm-mailing-list-address.patch
- 0009-libndctl-papr-Fix-probe-for-papr-scm-compatible-nvdi.patch
- 0010-ndctl-scrub-Stop-translating-return-values.patch
- 0011-ndctl-scrub-Reread-scrub-engine-status-at-start.patch
- 0012-ndctl-dimm-Fix-label-index-block-calculations.patch
- 0013-daxctl-Add-Soft-Reservation-theory-of-operation.patch
- 0014-Documentation-ndctl-fix-self-reference-of-ndctl-disa.patch
- 0015-ndctl-docs-Clarify-update-firwmware-activation-overf.patch
- 0016-libndctl-papr-Add-support-for-reporting-shutdown-cou.patch
- Add rpmlinrc filter for libcxl and libdaxctl (boo#1191773).
- Fix asciidoctor conditional
-------------------------------------------------------------------
Mon Mar 7 20:54:26 UTC 2022 - Michal Suchanek <msuchanek@suse.com>
- Add support for reporting dirty shutdown count (jsc#SLE-18196).
+ 0016-libndctl-papr-Add-support-for-reporting-shutdown-cou.patch
+ 0009-libndctl-papr-Fix-probe-for-papr-scm-compatible-nvdi.patch
+ 0003-libndctl-Unify-adding-dimms-for-papr-and-nfit-famili.patch
- Merge fixes that went into v72 and v73
- Documentation updates
+ 0015-ndctl-docs-Clarify-update-firwmware-activation-overf.patch
+ 0014-Documentation-ndctl-fix-self-reference-of-ndctl-disa.patch
+ 0013-daxctl-Add-Soft-Reservation-theory-of-operation.patch
+ 0008-ndctl-Update-nvdimm-mailing-list-address.patch
- Label index block calculation fix
+ 0012-ndctl-dimm-Fix-label-index-block-calculations.patch
+ 0002-Expose-ndctl_bus_nfit_translate_spa-as-a-public-func.patch
- Scrub fix
+ 0011-ndctl-scrub-Reread-scrub-engine-status-at-start.patch
+ 0010-ndctl-scrub-Stop-translating-return-values.patch
- Add memblock count to JSON
+ 0007-daxctl-emit-counts-of-total-and-online-memblocks.patch
- DAX disable fix
+ 0006-libndctl-check-for-active-system-ram-before-disablin.patch
+ 0005-libdaxctl-add-an-API-to-check-if-a-device-is-active.patch
+ 0001-ndctl-namespace-Fix-disable-namespace-accounting-rel.patch
- DAX reconfigure fix
+ 0004-daxctl-fail-reconfigure-device-based-on-kernel-onlin.patch
-------------------------------------------------------------------
Fri Mar 4 13:08:55 UTC 2022 - Martin Wilck <mwilck@suse.com>
- Install modprobe.conf file to %_modprobedir (bsc#1196275, jsc#SLE-20639)
-------------------------------------------------------------------
Wed Oct 13 07:15:59 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
- Added hardening to systemd service(s) (bsc#1181400). Added patch(es):
* harden_ndctl-monitor.service.patch
-------------------------------------------------------------------
Fri Jan 22 09:24:52 UTC 2021 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Enable aarch64 build (bsc#1188502).
-------------------------------------------------------------------
Wed Jan 6 18:31:45 UTC 2021 - Dirk Müller <dmueller@suse.com>
- update to 71.1:
* ndctl/dimm: Attempt an abort upon firmware-update-busy status
* ndctl/dimm: Fix submit_abort_firmware()
-------------------------------------------------------------------
Thu Dec 31 14:00:54 UTC 2020 - Michal Suchanek <msuchanek@suse.de>
- Update to upstream v71 (jsc#SLE-14344, bsc#1170384).
- support for the new device-dax subdivision functionality added in Linux in
v5.10, including ways to create smaller devdax devices using
daxctl/libdaxctl, as well as creating, listing, and restoring from a config
dump, 'mappings' on these devices.
- miscellaneous bugfixes
- Fix documentation and license packaging
-------------------------------------------------------------------
Wed Oct 21 07:27:20 UTC 2020 - Michal Suchanek <msuchanek@suse.com>
- Update to upstream v70.1 (jsc#SLE-13338).
Adds firmware activation support.
-------------------------------------------------------------------
Fri Aug 28 08:27:10 UTC 2020 - Michal Suchanek <msuchanek@suse.de>
- Suppress ENXIO when processing all namespaces (jsc#SLE-13321, bsc#1175851, ltc#187867).
+ ndctl-namespace-Suppress-ENXIO-when-processing-all-n.patch
-------------------------------------------------------------------
Mon Aug 10 09:25:52 UTC 2020 - Michal Suchanek <msuchanek@suse.de>
- Update to v69 (jsc#SLE-13824, jsc#SLE-12770, jsc#SLE-15065, jsc#SLE-15484,
jsc#SLE-15485, bsc#1175052, ltc#186863, bsc#1174969, ltc#185845):
* infoblock: Set the default alignment to the platform alignment
* libndctl/papr_scm: Add support for reporting "life_used_percentage" metric
* Skip region filtering if numa_node attribute is not present
* libndctl,papr_scm: Implement support for PAPR_PDSM_HEALTH
* miscellaneous bugfixes
- Removed ndctl-Documentation-use-includes-in-more-ndctl-command-pag.patch
-------------------------------------------------------------------
Tue Jul 14 08:24:42 UTC 2020 - Michal Suchanek <msuchanek@suse.de>
- Clarify documentation about filtering options (bsc#1173861)
+ ndctl-Documentation-use-includes-in-more-ndctl-command-pag.patch
-------------------------------------------------------------------
Fri May 15 12:21:34 UTC 2020 - Paolo Stivanin <info@paolostivanin.com>
- Update to v68:
* zero-labels: display an error if regions are active
* destroy-namespace: fix seed namespace accounting
* list: drop named list objects from verbose listing
* *-namespace: emit better errors on failure
* read-infoblock: new command to read an infoblock
* write-infoblock: new command to create and write an infoblock
* create-namespace: add --continue option
* daxctl-reconfigure-device: add --no-movable option
* daxctl-reconfigure-device: display movable state in listings
* daxctl-reconfigure-device: detect races in memory onlining
* security: support for 'security frozen' attribute
* daxctl-reconfigure-device: new command for device mode management
* daxctl-{on,off}line-memory: new commands for devices in system-ram mode
* monitor: logging improvements, allow sending to background
* inject-error: refuse to operate on activew BTT namespaces
* *-labels: improvements to minimize data transfer
* create-namespace: usability improvements around region search
- Removed ndctl-Use-the-same-align-value-as-original-namespace-on-reconfigure.patch
- Removed ndctl-dimm-Fix-init-labels-success-reporting.patch
- Removed ndctl-list-Introduce-region-capability-objects.patch
- Removed ndctl-namespace-Fix-enable-namespace-error-for-seed-.patch
- Removed ndctl-namespace-Handle-create-namespace-in-label-less-mode.patch
- Removed ndctl-ndctl-lib-Fix-duplicate-bus-detection.patch
- Removed ndctl-test-Relax-dax_pmem_compat-requirement.patch
- Removed ndctl_check_Ensure_mmap_of_BTT_sections_work_with_64K_page-sizes.patch
-------------------------------------------------------------------
Fri Apr 3 17:48:20 UTC 2020 - Michal Suchanek <msuchanek@suse.de>
- ndctl/namespace: Skip zero namespaces when processing all namespaces
(bsc#1167861, bsc#1165509, ltc#182068).
+ ndctl-namespace-skip-zero-namespaces-when-processing.patch
- Refresh patch to upstream version:
ndctl-test-Relax-dax_pmem_compat-requirement.patch
-------------------------------------------------------------------
Tue Mar 3 13:43:42 UTC 2020 - Michal Suchanek <msuchanek@suse.de>
- ndctl/test: Relax dax_pmem_compat requirement (bsc#1159523)
+ ndctl-test-Relax-dax_pmem_compat-requirement.patch
- Add -fcommon flag on Tumbleweed (boo#1160286).
- Fix 'ndctl enable-namespace all' fails trying to enable idle namespaces
(bsc#1165509 ltc#182068).
+ ndctl-namespace-Fix-enable-namespace-error-for-seed-.patch
-------------------------------------------------------------------
Fri Nov 8 14:42:49 UTC 2019 - Michal Suchanek <msuchanek@suse.de>
- ndctl/dimm: Fix init-labels success reporting (bsc#1156308 ltc#181441).
+ ndctl-dimm-Fix-init-labels-success-reporting.patch
- Refresh patches with upstream status:
ndctl-Use-the-same-align-value-as-original-namespace-on-reconfigure.patch
ndctl-ndctl-lib-Fix-duplicate-bus-detection.patch
-------------------------------------------------------------------
Fri Oct 18 13:14:35 UTC 2019 - Michal Suchanek <msuchanek@suse.de>
- Refresh patches with upstream status:
ndctl-Use-the-same-align-value-as-original-namespace-on-reconfigure.patch
ndctl-ndctl-lib-Fix-duplicate-bus-detection.patch
-------------------------------------------------------------------
Wed Aug 21 18:15:16 UTC 2019 - Michal Suchanek <msuchanek@suse.de>
- Refresh patches with upstream status:
ndctl_check_Ensure_mmap_of_BTT_sections_work_with_64K_page-sizes.patch
ndctl-namespace-Handle-create-namespace-in-label-less-mode.patch
ndctl-list-Introduce-region-capability-objects.patch
-------------------------------------------------------------------
Mon Aug 19 13:19:55 UTC 2019 - Michal Suchanek <msuchanek@suse.de>
- ndctl/namespace: Handle 'create-namespace' in label-less mode (bsc#1145471 ltc#179886).
+ ndctl-namespace-Handle-create-namespace-in-label-less-mode.patch
-------------------------------------------------------------------
Mon Aug 19 11:27:59 UTC 2019 - Michal Suchanek <msuchanek@suse.com>
- ndctl: Use the same align value as original namespace on reconfigure (bsc#1145577 ltc#178224).
+ ndctl-Use-the-same-align-value-as-original-namespace-on-reconfigure.patch
- ndctl/lib: Fix duplicate bus detection (bsc#1145573 ltc#180249).
+ ndctl-ndctl-lib-Fix-duplicate-bus-detection.patch
-------------------------------------------------------------------
Fri Aug 16 14:31:46 UTC 2019 - Michal Suchanek <msuchanek@suse.com>
- ndctl/list: Introduce region capability objects (bsc#1145772 ltc#178159).
+ ndctl-list-Introduce-region-capability-objects.patch
-------------------------------------------------------------------
Tue Aug 13 12:56:24 UTC 2019 - Michal Suchanek <msuchanek@suse.de>
- ndctl, check: Ensure mmap of BTT sections work with 64K page-sizes (bsc#1145421 ltc#176079).
+ ndctl_check_Ensure_mmap_of_BTT_sections_work_with_64K_page-sizes.patch
-------------------------------------------------------------------
Tue Mar 05 09:15:45 UTC 2019 - jthumshirn@suse.de
- Update to version 64.1 (bsc#1127799):
* ndctl: release v64.1
* ndctl: fix ndctl linking with libkeyutils
* ndctl: Fix building in the absence of keyutils
-------------------------------------------------------------------
Mon Feb 04 10:19:27 UTC 2019 - jthumshirn@suse.de
- Update to version 64 (bsc#1123024):
* ndctl: release v64
* ndctl, load-keys: fix a resource leak in load_dimm_keys()
* libndctl: fix a couple of theoretical buffer overruns
* ndctl, keys: fix a resource leak in verify_kek()
* ndctl, keys: fix a memory leak in dimm_create_key()
* ndctl, rpmbuild: Add a dummy readme file to ndctl_keysdir
* ndctl, bash-completion: add helpers for security commands
* ndctl: allow for a 'secure erase' using the master passphrase
* ndctl: master phassphrase management support
* ndctl: add a wait-overwrite command
* ndctl: add an overwrite option to 'sanitize-dimm'
* ndctl: add a load-keys command and a modprobe config
* ndctl: add a unit test to exercise security operations
* ndctl: add a sanitize-dimm command
* ndctl: add a freeze-security command
* ndctl: add passphrase management commands
* ndctl: add a Theory of Operation document for security commands
* ndctl: add support for displaying the security state
* ndctl.spec.in: remove obsolete Group tag
* ndctl.spec.in: remove obsolete ldconfig scriptlets
* libndctl: fix bb iterator leak in namespaces
* ndctl: Add supported_alignments to the JSON output
* ndctl/namespace: Make the create-namespace JSON output non-verbose
* ndctl: Add alignment to the namespace JSON output
* ndctl/namespace: Validate alignment from the {pfn|dax} seed
* ndctl/namespace: Use seed alignment as the default
* ndctl/namespace: Check for seed namespaces earlier
* libndctl: Use the supported_alignment attribute
* libndctl: Fix the failure interpretation for status translations
* daxctl: Add bash-completion
* ndctl, Documentation: Allow for Makefile variables in Documentation
* Documentation: Update copyright
* daxctl: Opt-in to /sys/bus/dax ABI
* daxctl: Support the /sys/bus/dax ABI
* ndctl/build: Fix config.h dependency
* ndctl, rpm: Mark monitor.conf as a configuration file
* ndctl: Introduce ndctl/config.h
* ndctl/init-labels: Fix label slot accounting per UEFI 2.7
* ndctl: clean up usage of ndctl_cmd_submit
* ndctl, monitor: switch to ndctl_cmd_submit_xlat
* ndctl, inject-smart: switch to ndctl_cmd_submit_xlat
* libndctl, intel: Add infrastructure for firmware_status translation
* libndctl: ignore ENXIO in ndctl_namespace_delete
* ndctl, monitor: use type=simple instead of type=forking
* ndctl/monitor: Kill usage of ndctl/lib/private.h
* ndctl/monitor: Drop vasprintf usage
* ndctl/monitor: Fix / cleanup log_file()
* ndctl/monitor: Unify definition of default monitor configfile path
* ndctl/monitor: Drop 'struct ndctl_ctx *' casts
* ndctl, daxctl: Add type-safety to command harness
* ndctl, daxctl: Split builtin.h per-command
* ndctl: recover from failed namespace creation
* ndctl, build: Define HAVE_UUID
* ndctl: fix zero-labels to handle firmware error properly
* test, dsm-fail: Cleanup leftover debug
* test, device-dax: Fix intermittent poison handling failures
* Drop upstreamed patch:
- 0001-ndctl-monitor-use-type-simple-instead-of-type-forkin.patch
-------------------------------------------------------------------
Tue Jan 8 09:18:04 UTC 2019 - jthumshirn@suse.com
- Use Type=simple instead of Type=forking for service (bsc#1120931)
+ 0001-ndctl-monitor-use-type-simple-instead-of-type-forkin.patch
-------------------------------------------------------------------
Thu Dec 13 10:21:14 UTC 2018 - jthumshirn@suse.com
- Enable ppc64le build (FATE#326817)
-------------------------------------------------------------------
Thu Nov 8 15:30:30 UTC 2018 - rw@suse.com
- Fix rpmbuild failure on SLE12 SP4
-------------------------------------------------------------------
Mon Oct 08 08:33:17 UTC 2018 - jthumshirn@suse.com
- Update to version 63 (FATE#326198):
* ndctl: release v63
* ndctl, monitor: in daemon mode, exit successfully if no DIMMs are found
* ndctl, monitor: fix the severity of "daemon started" message
* libndctl: set errno for routines that don't return an error status
* ndctl, check-labels: correct check-labels message wording
* ndctl: Revert "ndctl: Create ndctl udev rules for dirty shutdown"
* ndctl: Revert "ndctl, intel: Fallback to smart cached shutdown_count"
* ndctl, lib: Add dirty-shutdown-count retrieval helper
* util/json: add a util_namespace_badblocks_to_json() helper
* util/json: Add comments around re-checking the UTIL_JSON_MEDIA_ERRORS flag
* util/json: fix an error check for region resource
* ndctl, lib: add APIs for retrieving namespace badblocks
* ndctl, lib: refactor badblocks retrieval routines
* ndctl, test: add a new unit test pfn metadata error clearing
* ndctl, spec: Use pkgconfig for systemd
* ndctl, build: Introduce --with-{bash,systemd}
* ndctl: Suppress command errors if fallback exists
* ndctl, namespace: rework namespace action accounting
* ndctl, destroy-namespace: check for an already-zeroed info block
* ndctl, test: add UUID_LIBS for list_smart_dimm
* ndctl, docs: Use asciidoctor by default
* ndctl, list: fix the verbosity level formatting in the man page
* ndctl, monitor: Fix formatting for --log in the man page
* ndctl, autoconf: include sys/mman.h for MAP_SYNC
-------------------------------------------------------------------
Thu Oct 4 08:03:03 UTC 2018 - jthumshirn@suse.com
- Revert to version 61.2 (bsc#1110425)
-------------------------------------------------------------------
Thu Aug 23 13:00:23 UTC 2018 - jthumshirn@suse.com
- Update to version 62 (FATE#326529):
* ndctl: release v62
* ndctl: Work around kernel memory corruption
* ndctl, udev: fix a resource leak in save_unsafe_shutdown_count
* ndctl: fix potential null dereference in the smart error handler
* ndctl, prepare-release.sh: fix revision update checks
* ndctl: Add 'list' verbose options
* ndctl, test: fix a resource leak in check_smart_threshold
* ndctl, test: fix a potential null pointer dereference in 'ndctl test'
* libndctl: fix a resource leak in ndctl_dimm_get_{{event_}flags, health}
* ndctl: fix a resource leak in submit_get_firmware_info
* ndctl, inject: fix a resource leak in ndctl_namespace_get_clear_unit
* ndctl, monitor: add [Install] Section to systemd unit file of ndctl-monitor
* ndctl, monitor: add timestamp and pid to log messages in log_file()
* ndctl, monitor: set default log destination to syslog if "--daemon" is specified
* ndctl, monitor: fix the lack of detection of invalid path of log file
* ndctl, intel: Fallback to smart cached shutdown_count
* ndctl: Create ndctl udev rules for dirty shutdown
* ndctl, list: add alarm_enable_<field> to list
* ndctl, test: add a new unit test for max_available_extent namespace
* ndctl, documentation: Clarify the dimm id for ndctl list d option
* ndctl, tests: add a new unit test for inject-smart
* ndctl, inject-smart: continue in spite of errors for uninject-all
* ndctl, monitor: add [--verbose] option to emit extra debug messages
* ndctl, monitor: Fix duplicate prefix in monitor.log
* ndctl, inject-smart: add an interface to inject ctrl-temperature
* ndctl: Use max_available_extent for namespace
* ndctl, test/monitor: fix inject-smart field in test_filter_dimmevent
* ndctl, test: remove the firmware image file before the test end
* ndctl inject-smart: add an option to uninject smart fields
* ndctl, inject-smart: Fix man page to match the current behavior
* ndctl: deprecate undocumented short-options
* ndctl, documentation: document the label-version option for init-labels
* ndctl, monitor: fix a resource leak in parse_monitor_event
* Documentation, create-namespace: clarify fsdax wording
* ndctl, monitor: improve error reporting throughout monitor.c
* ndctl, monitor: Fix memory leak in monitor_event
* ndctl, monitor: fix memory leak in read_config_file
* ndctl, monitor: Add a config-file section to the man page
* ndctl, monitor: fix the lack of detection of invalid dimm-events
* ndctl, bash-completion: add completion for ndctl-monitor
* ndctl, test: add a new unit test for monitor
* ndctl, documentation: add man page for monitor
* ndctl, monitor: add the unit file of systemd for ndctl-monitor service
* ndctl, monitor: add main ndctl monitor configuration file
* ndctl, monitor: add a new command - monitor
* ndctl, test: convert remaining tests to use test/common
* ndctl, test: fix tests for the array vs object listing fix
* ndctl list: always output array without --human
* ndctl: simplify JSON print flag handling
* ndctl: add an API to check support for smart injection
* contrib/do_abidiff: make the build more robust
* ndctl: Remove dependency on linker garbage collection
* ndctl, test: fix timeouts in device-dax
* ndctl, test: Fix dax.sh return code
* libndctl: fix the uninject-error API actually injecting errors
* ndctl, test: add start/wait scrub to injection tests
* ndctl: Add CONTRIBUTING.md
* Documentation: add a newline in namespace Theory of Operations
* util/strbuf.h: include sys/types.h for ssize_t definition.
* ndctl, test: check availability of MAP_SYNC for poison test
* ndctl: release v61
* ndctl, list: add controller temperature threshold and alarm
* ndctl, test: remove an unused variable assignment
* ndctl, Documentation: Add namespace 'theory of operation'
* ndctl: add a test file to .gitignore
* ndctl, test: cleanup test scripts
* ndctl, test: Add NFIT_TEST_BUS[01] variable and some helper funtions to common
* ndctl, test: Update tests for capacity vs namespace-label locking
* ndctl, test: Disable poison tests for now
* ndctl, test: Update libndctl test for controller temperature valid
* ndctl, contrib: Add helper scripts for new release
* ndctl, list: Add controller temperature
* ndctl: Update README.md for code blocks
* ndctl, test: cleanup test scripts
* ndctl, test: add common helper functions for test scripts
* ndctl: autoconf detect BUS_MCEERR_AR
* test: Add device-dax MADV_HWPOISON test
* ndctl, util: add OPTION_FILENAME to parse_opt_type
* ndctl: add an api for getting the ars_status overflow flag
* ndctl, ars: don't invalidate the user-provided command
* ndctl: refactor validation of the ars_status command
* ndctl, list: display the 'map' location in listings
* ndctl, test: fix sector-mode.sh to work with label support
* test: add a MADV_HWPOISON test
* ndctl: hide null uuids
* ndctl: fix libtool versioning
* ndctl: warn on variables declared after statement
* ndctl: remove warnings when -O0 is used with -D_FORTIFY_SOURCE=2
* configure: add -Wunused-result and -D_FORTIFY_SOURCE=2 to cflags
* libndctl, test: fix a couple of unchecked returns
* libndctl: improve debug prints in wait_for_scrub_completion
* libndctl: fix potential buffer overflow in write_cache APIs
* ndctl, filter: fix "keyword 'all' is ignored" in util_<obj>_filter()
* ndctl, inject-error: add a --saturate option
* libndctl, inject: add 'v2' APIs for inject and uninject
* libndctl, inject: inject fewer bytes per block by default
* libndctl, ars: add an API to retrieve clear_err_unit
* Documentation: add asciidoctor-extensions.rb to .gitignore
* Documentation: Add the support for asciidoctor
* Documentation: fix title and section markers
* ndctl: fix ABI breakage due to rename of fw_info_get_updated_version
* ndctl, filter: refacor util_<obj>_filter() to support multiple space-seperated arguments
* ndctl, documentation: add inject-smart to the Makefile
-------------------------------------------------------------------
Fri Jun 22 09:43:14 UTC 2018 - rw@suse.com
- Drop 'v' from pkgconfig-version (breaks 'ipmctl') (FATE#325527)
-------------------------------------------------------------------
Wed May 02 08:41:29 UTC 2018 - opensuse-packaging@opensuse.org
- Update to version 60.1 (FATE#322885):
* ndctl: release v60.1
* ndctl: fix ABI breakage due to rename of fw_info_get_updated_version
* ndctl, documentation: add inject-smart to the Makefile
* ndctl: release v60
* ndctl, bash-completion: add completion for {start,wait}-scrub commands
* ndctl, util: add a raw_uuid field to namespace listings
* ndctl: fix ordering of closing vs invalidating flush_fd
* ndctl: fix libdaxctl memory leak
* ndctl: add support in libndctl to provide deep flush
* ndctl, test: fix pmem-errors.sh vs new ARS rework
* ndctl, scrub: add {wait,start}-scrub helper utilities
* ndctl: add new START and WAIT actions
* ndctl, scrub: add ndctl_bus_start_scrub()
* ndctl, scrub: report the bus scrub state in 'ndctl list'
* ndctl, scrub: fix ndctl_bus_wait_for_scrub_completion()
* ndctl: complete move to "fsdax" and "devdax"
* ndctl, read-labels: fix json reference counting
* ndctl: export ndctl.h
* ndctl, test: add write_cache testing to libndctl
* libndctl: Add APIs for query and control of write_cache
* ndctl: fix ndctl_persistence_domain declaration
* ndctl, rescan-partitions.sh: fix skipping for missing modules
* ndctl: replace direct errno prints with strerror strings
* ndctl, inject-smart: fix usage of strerror(errno)
* ndctl, check: fix a few error returns
* ndctl: Add support for get bus and region persistence domain
* ndctl: fail NUMA filtering when unsupported
* ndctl, documentation: update copyright
* ndctl: complete removal of daxctl io
* ndctl: fix input/output size for Intel firmware update DSM
* ndctl, sysfs: null terminate buffer on error
* ndctl, list: fix namespace json object parenting
* ndctl. test: fix module-taint sanity-check
* ndctl, documentation: remove '...' from label-options.txt
* ndctl, docs: cleanup the man page for create-namespace
* ndctl: removing daxctl io
* libndctl.sym: move new interfaces since v59 to a new section
* ndctl, list: fix sector_size listing
* ndctl: merge firmware-update into dimm.c as another dimm operation
* ndctl: add check for update firmware supported
* ndctl, bash-completion: add completion for --numa-node
* ndctl: add filtering based on numa node
* ndctl: add numa_node support for regions
* ndctl: don't print erroneous namespace numa_nodes
* ndctl, tests: firmware-update.sh post-test cleanup
* ndctl, test: add a unit test for partition rescanning
* ndctl, create-namespace: fix minimum alignment detection
* ndctl, list: refactor core topology walking into util_filter_walk()
* ndctl, firmware-update: kill usage of flock() in verify_fw_file()
* ndctl, test: kill usage of fallocate in firmware-update.sh
* ndctl, test: skip btt-pad compat test on pre-4K capable kernels
* ndctl, test: fix dpa-alloc for kernels with 4M min size
* ndctl, log: add support for LOG_NOTICE messages
* ndctl, test: explicitly request namespace size
* ndctl, test: fix stale json in btt-pad-compat.sh
* ndctl, test: fix tests that use error injection on older kernels
* ndctl: add test files to .gitignore
* ndctl: tests must use local ndctl
* ndctl, update: remove the check for !cmd when dereferencing it
* ndctl, update: fix uninitialized variable warnings
* ndctl, inject-smart: cleanup uninitialized variable warnings
* ndctl, configure: add -Wmaybe-uninitialized to cflags
* ndctl: add option to list firmware information for a DIMM
* ndctl: adding unit test for enable ack shutdown count
* ndctl: add support for acknolwedge shutdown count enable
* ndctl, smart: fix threshold temperature helper
-------------------------------------------------------------------
Mon Feb 12 15:44:56 UTC 2018 - jthumshirn@suse.com
- Update to version v59.2 (FATE#322885):
* ndctl: add ndctl_encode_smart_temperature()
* ndctl: add a new command - inject-smart
* ndctl, bash-completion: Add bash completion for inject-smart
* ndctl: Add CONFIG_DEV_DAX_PMEM=m to README.md
* ndctl: add info about CONFIG_X86_PMEM_LEGACY to README.md
* ndctl: release v59
* ndctl: fallback to sysconf for PAGE_SIZE
* ndctl: release v59.1
* ndctl, hugetlb: skip, don't fail
* ndctl, firmware: fix kernel version check
-------------------------------------------------------------------
Tue Jul 25 14:21:31 UTC 2017 - jthumshirn@suse.com
- Upstream version v57.1 (FATE#322885)
- libndctl-add-support-for-the-msft-family-of-dsm-functions.patch
This release incorporates the capabilities of the 4.12 kernel. Major
highlights include the new 'ndctl check-namespace' utility to check and
repair btt instances, new option to 'ndctl list' to enumerate device
relative error offsets, and support for the "JEDEC Byte-Addressable
Energy-Backed Interface NVDIMM" SMART health format.
Commands:
ndctl check-namespace: check and repair a btt instance
ndctl list: new '--media-errors' option
ndctl list: add acpi 6.1 dimm health state flags
ndctl write-labels: new command to deploy data to dimm label areas
Tests:
blk-exhaust: validate aliased pmem vs blk capacity accounting
daxdev-errors: error injection and clearing for device-dax
device-dax-fio: i/o traffic sanity check for device-dax
label-compat: regression test for interleave-set-cookie compatibility
Apis:
ndctl_dimm_has_notifications: acpi 6.1 health-state notification flag
ndctl_dimm_failed_map: acpi 6.1 map failure flag
ndctl_region_get_resource: region resource base address
ndctl_region_get_{first,next}_badblock: media error enumeration
ndctl_namespace_disable_safe: check for busy block device before disable
ndctl_namespace_is_active: check if namespace is enabled or claimed
-------------------------------------------------------------------
Mon May 22 13:22:31 UTC 2017 - jthumshirn@suse.com
- Add support for MSFT family DSM functions (bsc#1040158)
+ libndctl-add-support-for-the-msft-family-of-dsm-functions.patch
-------------------------------------------------------------------
Wed Mar 1 13:36:55 UTC 2017 - rw@suse.com
- Upstream version v56 (fate#321506)
This release incorporates the capabilities of the 4.10 kernel. Major
highlights include the new 'daxctl' utility and its 'list' command, as
well as several usability tweaks and cleanups to 'ndctl
create-namespace' and 'ndctl list'.
Commands:
ndctl list: add support for filtering by namespace mode
daxctl list: generically list device-dax instances in a platform
ndctl create-namespace: reconcile namespace size against interleave-width
Tests:
test: sanity check the unit test kernel modules befor running tests
device-dax: extend it to test 4K and 1G alignments in addition to 2M
multi-pmem: check namespace deletion cleanup
Apis:
ndctl_{pfn,dax}_has_align: detect kernels that lack the align attribute
ndctl_{set,get}_private_data: attach private data to a library context
daxctl_region_get_size: retrieve the total dax region size
daxctl_region_get_align: retrieve the physical alignment of the region
daxctl_region_get_{first,next}: enable listing of device-dax regions
-------------------------------------------------------------------
Sun Oct 23 14:48:49 UTC 2016 - jthumshirn@suse.com
- Upstream version v55
This release incorporates the capabilities of the 4.9 kernel. Major
highlights include support for retrieving the health status of HPE
NVDIMMs, and new label manipulation / validation commands.
Commands:
list: add HPE NVDIMM health reporting
init-labels: initialize a namespace-label index-block
check-labels: validate a namespace-label index-block
create-namespace: fix crash when target region disabled
bash-completion: add {en,dis}able-dimm and {check,init}-labels support
Tests:
dsm-fail: check that namespaces stay disabled when label DSMs fail
multi-pmem: validate pmem-region sub-division support
libndctl: add btt-size check
libndctl: test health event notification support
device-dax: validate "invalidate on shutdown" behavior of dax devices
device-dax: validate direct-i/o to device-dax mappings
device-dax: check kernel fix for file offset to phys offset translation
device-dax: check kernel fix for crash when reading /proc/<pid>/smaps
clear: check kernel fix for making cleared badblocks stay cleared
Apis:
daxctl_region_get_available_size: new, in support of dax sub-division
daxctl_region_get_devname: new, in support of dax sub-division
daxctl_region_get_dev_seed: new, in support of dax sub-division
ndctl_dimm_get_health_eventfd: new, fires upon firmware health event notification
ndctl_cmd_cfg_read_get_size: new, simplifies label manipulation routines
ndctl_dimm_get_available_labels: fix error return value to be ULONG_MAX
ndctl_region_get_available_size: fix error return value to be ULLONG_MAX
ndctl_dimm_cmd_new_cfg_{read,write}: fix to not overflow label area size
-------------------------------------------------------------------
Mon Aug 15 11:29:45 UTC 2016 - jthumshirn@suse.com
- Update to v54
This release incorporates the capabilities of the 4.8 kernel. Updates
to the unit tests make up the bulk of this release to account for kernel
commit 1ee6667cd8d1 "libnvdimm, pfn, dax: fix initialization vs
autodetect for mode + alignment".
Commands:
list: add device-dax information
list: add btt size information
create-namespace: fix handling of invalid sector sizes
create-namespace: static analysis fixes
bash-completion: namespace completion enhancements
Tests:
libndctl: updates for pfn and dax autodetect changes
libndctl: new gates for running against older kernels
device-dax: new
pcommit: remove, the pcommit instruction has been deprecated
Apis:
ndctl_dimm_get_manufacturing_date: new
ndctl_dimm_get_manufacturing_location: new
ndctl_btt_get_size: new
ndctl_cmd_unref: fix, accepts NULL input
-------------------------------------------------------------------
Tue Jun 21 09:22:36 UTC 2016 - jthumshirn@suse.com
- Fix rpmbuild failure on factory
-------------------------------------------------------------------
Mon May 30 06:58:28 UTC 2016 - jthumshirn@suse.com
- Update to v53.1 (FATE#319859)
This release incorporates the capabilities of the 4.7-rc1 kernel (most
prominently in that kernel 'Device DAX', DAX error handling, and
third-party DSM support). The ndctl updates include:
New commands / options:
bash completion for ndctl commands
DIMM SMART data retrieval (ndctl list --dimms --health)
ndctl destroy-namespace
ndctl read-labels
New tests:
DAX error handling unit test (dax-errors.sh)
Command fixes:
ndctl list
ndctl create-namespace
New apis:
ndctl_cmd_smart_get_alarm_flags
ndctl_cmd_smart_get_flags
ndctl_cmd_smart_get_health
ndctl_cmd_smart_get_life_used
ndctl_cmd_smart_get_shutdown_state
ndctl_cmd_smart_get_spares
ndctl_cmd_smart_get_temperature
ndctl_cmd_smart_get_vendor_data
ndctl_cmd_smart_get_vendor_size
ndctl_cmd_smart_threshold_get_alarm_control
ndctl_cmd_smart_threshold_get_spares
ndctl_cmd_smart_threshold_get_temperature
ndctl_dax_delete
ndctl_dax_enable
ndctl_dax_get_align
ndctl_dax_get_bus
ndctl_dax_get_ctx
ndctl_dax_get_daxctl_region
ndctl_dax_get_devname
ndctl_dax_get_first
ndctl_dax_get_id
ndctl_dax_get_location
ndctl_dax_get_namespace
ndctl_dax_get_next
ndctl_dax_get_region
ndctl_dax_get_resource
ndctl_dax_get_size
ndctl_dax_get_uuid
ndctl_dax_is_configured
ndctl_dax_is_enabled
ndctl_dax_is_valid
ndctl_dax_set_align
ndctl_dax_set_location
ndctl_dax_set_namespace
ndctl_dax_set_uuid
ndctl_dimm_cmd_new_smart
ndctl_dimm_cmd_new_smart_threshold
ndctl_dimm_get_formatN
ndctl_dimm_get_formats
ndctl_dimm_get_subsystem_device
ndctl_dimm_get_subsystem_revision
ndctl_dimm_get_subsystem_vendor
ndctl_dimm_get_unique_id
ndctl_get_daxctl_ctx
ndctl_namespace_get_dax
ndctl_namespace_get_dax
ndctl_region_get_dax_seed
daxctl_dev_get_devname
daxctl_dev_get_first
daxctl_dev_get_id
daxctl_dev_get_major
daxctl_dev_get_minor
daxctl_dev_get_next
daxctl_dev_get_region
daxctl_dev_get_size
daxctl_get_log_priority
daxctl_get_userdata
daxctl_new
daxctl_new_region
daxctl_ref
daxctl_region_get_ctx
daxctl_region_get_id
daxctl_region_get_uuid
daxctl_region_ref
daxctl_region_unref
daxctl_region_unref
daxctl_set_log_fn
daxctl_set_log_priority
daxctl_set_userdata
daxctl_unref
-------------------------------------------------------------------
Wed Apr 27 11:47:49 UTC 2016 - jthumshirn@suse.com
- NVDIMM is not defined for any CPU architecture other than x86_64 at the
moment.
-------------------------------------------------------------------
Sun Apr 24 06:43:26 UTC 2016 - jengelh@inai.de
- RPM group and description update
-------------------------------------------------------------------
Wed Mar 30 08:33:54 UTC 2016 - jthumshirn@suse.com
- Update to v52
This release incorporates the capabilities of the 4.6 kernel (most
prominently 'clear poison' support), and adds the below features and
fixes:
New apis:
ndctl_invalidate
ndctl_cmd_ars_cap_get_range
ndctl_bus_cmd_new_clear_error
ndctl_cmd_clear_error_get_cleared
ndctl_namespace_get_resource
ndctl_pfn_get_size
ndctl_pfn_get_resource
Api fixes:
ndctl_bus_cmd_new_ars_status - output buffer sizing fix
ndctl_bus_cmd_new_ars_status - input validation
ndctl_cmd_ars_in_progress - invalidate state after checking
-------------------------------------------------------------------
Wed Mar 2 13:32:01 UTC 2016 - jthumshirn@suse.com
- Update to v51
This release reworks spec file generation to use automated tarballs
generated by github for each annotated tag. It also includes a couple of
minor fixes.
-------------------------------------------------------------------
Wed Feb 3 09:30:54 UTC 2016 - kkaempf@suse.com
- Update to v50
This release incorporates the capabilities of the 4.5 kernel,
and adds the below features and fixes:
New apis:
ndctl_bus_get_ctx
ndctl_namespace_get_pfn
ndctl_namespace_get_mode
ndctl_namespace_get_numa_node
ndctl_region_get_pfn_seed
ndctl_pfn_get_first
ndctl_pfn_get_next
ndctl_pfn_get_id
ndctl_pfn_get_namespace
ndctl_pfn_get_uuid
ndctl_pfn_set_uuid
ndctl_pfn_get_location
ndctl_pfn_set_location
ndctl_pfn_get_align
ndctl_pfn_set_align
ndctl_pfn_set_namespace
ndctl_pfn_get_bus
ndctl_pfn_get_ctx
ndctl_pfn_get_devname
ndctl_pfn_get_block_device
ndctl_pfn_is_valid
ndctl_pfn_is_enabled
ndctl_pfn_get_region
ndctl_pfn_enable
ndctl_pfn_delete
ndctl_pfn_is_configured
New utility commands:
list
help (man pages)
create-namespace
Api fixes:
ndctl_{namespace|btt}_foreach crash fix
ndctl_namespace_delete no longer errors on "io" namespaces
miscellaneous static analysis fixes
Utility command fixes:
{en|dis}able-{namespace|region} return code
-------------------------------------------------------------------
Thu Sep 10 22:45:55 UTC 2015 - dan.j.williams@intel.com
- updates for the new versioning scheme introduced with v47
- synchronized the spec file with the one produced by contrib/genspec
-------------------------------------------------------------------
Wed Aug 5 15:30:44 UTC 2015 - meissner@suse.com
- cleaned up spec file. added licenses. added make check
-------------------------------------------------------------------
Wed Aug 5 15:26:42 UTC 2015 - dan.j.williams@intel.com
- Management library for "libnvdimm" subsystem devices (Non-volatile Memory)

218
ndctl.spec Normal file
View File

@ -0,0 +1,218 @@
#
# spec file for package ndctl
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2015 Intel Corporation
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150300
# systemd-rpm-macros is wrong in 15.3 and below
%define _modprobedir /lib/modprobe.d
%endif
%global modprobe_d_files nvdimm-security.conf
%define lname libndctl6
%define dname libndctl-devel
Name: ndctl
Version: 78
Release: 0
Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory)
License: GPL-2.0-only
Group: Hardware/Other
URL: https://github.com/pmem/ndctl
Source0: https://github.com/pmem/ndctl/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: ndctl-rpmlintrc
Patch0: harden_ndctl-monitor.service.patch
BuildRequires: keyutils-devel
BuildRequires: libiniparser-devel
BuildRequires: libtool
BuildRequires: meson
BuildRequires: pkgconfig
BuildRequires: systemd-rpm-macros
BuildRequires: xmlto
BuildRequires: pkgconfig(bash-completion)
BuildRequires: pkgconfig(json)
BuildRequires: pkgconfig(json-c)
BuildRequires: pkgconfig(libkmod)
BuildRequires: pkgconfig(libtraceevent)
BuildRequires: pkgconfig(libtracefs)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(udev)
BuildRequires: pkgconfig(uuid)
ExclusiveArch: x86_64 aarch64 ppc64le
%{?systemd_requires}
# required for documentation
%if 0%{?suse_version} >= 1330
BuildRequires: rubygem(asciidoctor)
%define asciidoc -Dasciidoctor=enabled
%else
BuildRequires: asciidoc
BuildRequires: libxslt-tools
%define asciidoc -Dasciidoctor=disabled
%endif
%description
Utility library for managing the "libnvdimm" subsystem, used for
platform NVDIMM resources like those defined by the ACPI 6.0 NFIT
(NVDIMM Firmware Interface Table).
%package -n %{dname}
Summary: Development files for libndctl
License: LGPL-2.1-only
Group: Development/Libraries/C and C++
Requires: %{lname} = %{version}-%{release}
%description -n %{dname}
Utility library for managing the "libnvdimm" subsystem, which defines
a kernel device model and control message interface for platform
NVDIMM resources like those defined by the ACPI 6.0 NFIT (NVDIMM
Firmware Interface Table).
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package -n %{lname}
Summary: Management library for "libnvdimm" subsystem devices (Non-volatile Memory)
License: LGPL-2.1-only
Group: System/Libraries
%description -n %{lname}
Utility library for managing the "libnvdimm" subsystem, which defines
a kernel device model and control message interface for platform
NVDIMM resources like those defined by the ACPI 6.0 NFIT (NVDIMM
Firmware Interface Table).
%prep
%setup -q
%autopatch -p1
%build
%if 0%{?suse_version} > 1500
export CFLAGS="%optflags -fcommon"
%endif
%meson %{?asciidoc} -Dversion-tag=%{version} -Dmodprobedatadir=%{_modprobedir}
%meson_build
%install
%if 0%{?suse_version} > 1500
export CFLAGS="%optflags -fcommon"
%endif
%meson_install
find %{buildroot} -type f -name "*.la" -delete -print
mkdir -p %{buildroot}%{_sbindir}
ln -sf service %{buildroot}%{_sbindir}/rcndctl-monitor
# libdaxctl.h has moved breaking users of libdaxctl, provide a compatibility symlink
ln -s ../daxctl/libdaxctl.h %{buildroot}%{_includedir}/ndctl
%post -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig
%pre
%service_add_pre ndctl-monitor.service
# Avoid restoring outdated stuff in posttrans
for _f in %{?modprobe_d_files}; do
[ ! -f "/etc/modprobe.d/${_f}.rpmsave" ] || \
mv -f "/etc/modprobe.d/${_f}.rpmsave" "/etc/modprobe.d/${_f}.rpmsave.old" || :
done
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
%service_add_post ndctl-monitor.service
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
%preun
%service_del_preun ndctl-monitor.service cxl-monitor.service
%postun
%service_del_postun ndctl-monitor.service cxl-monitor.service
%posttrans
# Migration of modprobe.conf files to _modprobedir
for _f in %{?modprobe_d_files}; do
[ ! -f "/etc/modprobe.d/${_f}.rpmsave" ] || \
mv -fv "/etc/modprobe.d/${_f}.rpmsave" "/etc/modprobe.d/${_f}" || :
done
%files
%license COPYING LICENSES/*/*
%doc README.md CONTRIBUTING.md
%{_bindir}/cxl
%{_bindir}/daxctl
%{_bindir}/ndctl
%{_sbindir}/rcndctl-monitor
%{_unitdir}/daxdev-reconfigure@.service
%{_udevrulesdir}/90-daxctl-device.rules
%{_mandir}/man1/*
%dir %{_sysconfdir}/daxctl.conf.d
%config(noreplace) %{_sysconfdir}/daxctl.conf.d/daxctl.example.conf
%dir %{_sysconfdir}/ndctl
%dir %{_sysconfdir}/ndctl.conf.d
%dir %{_sysconfdir}/ndctl/keys
%{_sysconfdir}/ndctl/keys/keys.readme
%config(noreplace) %{_sysconfdir}/ndctl.conf.d/monitor.conf
%config(noreplace) %{_sysconfdir}/ndctl.conf.d/ndctl.conf
%dir %{_modprobedir}
%{_modprobedir}/nvdimm-security.conf
%{_unitdir}/cxl-monitor.service
%{_unitdir}/ndctl-monitor.service
%dir %{_datadir}/bash-completion/
%dir %{_datadir}/bash-completion/completions/
%{_datadir}/bash-completion/completions/cxl
%{_datadir}/bash-completion/completions/daxctl
%{_datadir}/bash-completion/completions/ndctl
%dir %{_datadir}/daxctl
%{_datadir}/daxctl/daxctl.conf
%files -n %{lname}
%license COPYING LICENSES/*/*
%doc README.md CONTRIBUTING.md
%{_libdir}/libcxl.so.*
%{_libdir}/libdaxctl.so.*
%{_libdir}/libndctl.so.*
%files -n %{dname}
%license COPYING LICENSES/*/*
%doc README.md CONTRIBUTING.md
%{_includedir}/cxl/
%{_libdir}/libcxl.so
%{_libdir}/pkgconfig/libcxl.pc
%{_includedir}/daxctl/
%{_libdir}/libdaxctl.so
%{_libdir}/pkgconfig/libdaxctl.pc
%{_includedir}/ndctl/
%{_libdir}/libndctl.so
%{_libdir}/pkgconfig/libndctl.pc
%{_mandir}/man3/*
%changelog