Name: tcmu-runner Version: 1.2.0 Release: 15%{?dist} Summary: A daemon that supports LIO userspace backends Group: System Environment/Daemons License: ASL 2.0 URL: https://github.com/open-iscsi/tcmu-runner Source0: https://github.com/open-iscsi/${name}/archive/v%{version}/%{name}-v%{version}.tar.gz Patch0001: 0001-tcmu-runner-make-a-cdb-debug-info-to-the-same-line.patch Patch0002: 0002-tcmu-runner-add-possible-12-and-16-bytes-CDB-debugin.patch Patch0003: 0003-tcmu-runner-Fix-the-possible-the-memory-overflow.patch Patch0004: 0004-file_optical-Fix-lba-from-uint32-to-uint64.patch Patch0005: 0005-Restart-tcmu-runner-on-failure.patch Patch0006: 0006-Add-write_verify-support.patch Patch0007: 0007-file-Fixed-incorrect-calculation-of-offset-length.patch Patch0008: 0008-file-Add-synchronize_cache-scsi-operation.patch Patch0009: 0009-verify-fix-ups.patch Patch0010: 0010-Add-nonblock-logger-support.patch Patch0011: 0011-.gitignore-Ignore-.swp-.patch-and-ncscope.patch Patch0012: 0012-runner-call-remove-early-on-in-remove_device.patch Patch0013: 0013-libtcmu-make-tcmulib_command_complete-thread-safe.patch Patch0014: 0014-tcmu-runner-add-ccan-list-submodule-helper.patch Patch0015: 0015-runner-aio-support-hint-by-store-handlers.patch Patch0016: 0016-runner-move-thread-processing-infra-to-libtcmu.patch Patch0017: 0017-runner-worker-threads-to-execute-sync-routines.patch Patch0018: 0018-runner-add-command-passthrough-support-for-generic_h.patch Patch0019: 0019-Update-README-handle_cmd-comments.patch Patch0020: 0020-tcmu-runner-write-verify-fix.patch Patch0021: 0021-libtcmu-free-device-in-remove_device.patch Patch0022: 0022-libtcmu-carve-out-store-calls-into-separate-source.patch Patch0023: 0023-libtcmu-typedef-store-read-write-flush-call-signatur.patch Patch0024: 0024-libtcmu-asynchronous-compound-store-operations.patch Patch0025: 0025-tcmu-runner-async-store-callout-support-in-generic_h.patch Patch0026: 0026-libtcmu-export-routines-that-can-be-used-elsewhere.patch Patch0027: 0027-tcmu-runner-rbd-asynchronous-read-write-flush-callou.patch Patch0028: 0028-sync-tcmur-handler-tcmulib_cmd-and-cdb-naming.patch Patch0029: 0029-Allow-handle_cmd-handlers-to-use-runner-threading.patch Patch0030: 0030-copy-qcow-and-file-s-lba-and-length-checks.patch Patch0031: 0031-pass-length-to-read-write-calls.patch Patch0032: 0032-qcow-use-generic-handler.patch Patch0033: 0033-Prevent-multiple-includes-of-scsi_defs.h.patch Patch0034: 0034-Remove-tcmu_emulate_write_verify.patch Patch0035: 0035-file-example-convert-to-generic-handler.patch Patch0036: 0036-return-0C-00-WRITE-ERROR-instead-of-always-READ-ERRO.patch Patch0037: 0037-file-optical-user-preadv-preadw.patch Patch0038: 0038-Support-for-more-than-1-wq-thread.patch Patch0039: 0039-file-opticial-convert-to-use-runner-s-thread-helpers.patch Patch0040: 0040-file-opticial-add-cancelation-handlers.patch Patch0041: 0041-tcmu-runner-Add-setting-blocksize-and-num_lbas.patch Patch0042: 0042-handlers-remove-file-exmaple-async.patch Patch0043: 0043-update-README-for-handler-changes.patch Patch0044: 0044-cleanup-compound-command-iovec-setup.patch Patch0045: 0045-fix-compound-command-buffer-handling.patch Patch0046: 0046-use-size_t-in-tcmur_cmd_handler.patch Patch0047: 0047-sync-handle_cmd-and-io-callout-return-completion-beh.patch Patch0048: 0048-kill-stub-struct.patch Patch0049: 0049-remove-aio_command_start.patch Patch0050: 0050-make-flush-callout-optional.patch Patch0051: 0051-kill-errno_to_sam_status.patch Patch0052: 0052-Rename-libtcmu_aio-to-tcmur_aio.patch Patch0053: 0053-logger-remove-the-useless-blank-space-line-to-cleanu.patch Patch0054: 0054-logger-add-TCMU_LOG_DEBUG_SCSI_CMD-log-level-support.patch Patch0055: 0055-Check-WRITE_VERIFY-lba-and-length-in-generic-code.patch Patch0056: 0056-tcmu-Fix-a-bug-with-generic-cmd-missing-read_capacit.patch Patch0057: 0057-tcmur-remove-useless-wakeup-parameter.patch Patch0058: 0058-tcmur-add-tcmur_cmd_passthrough_handler-support.patch Patch0059: 0059-Add-tcmu_get_runner_handler-helper.patch Patch0060: 0060-Fix-up-passthrough-comments.patch Patch0061: 0061-tcmu-Add-WRITE_VERIFY_16-command.patch Patch0062: 0062-cleanup-from-tcmur-add-passthrough-handler-support.patch Patch0063: 0063-file_example-Fix-endless-reading-the-file.patch Patch0064: 0064-api-Fix-a-bug-with-parsing-the-6-byte-length-format-.patch Patch0065: 0065-libtcmu-Fix-a-bug-with-getting-variable-type-CDB-len.patch Patch0066: 0066-api-Use-the-group-code-to-do-the-CDB-formats-check.patch Patch0067: 0067-libtcmu-Convert-to-use-tcmu_get_cdb_length-helper.patch Patch0068: 0068-rbd-file_example-Update-debug-info.patch Patch0069: 0069-fix-handle_cmd-check-regression.patch Patch0070: 0070-cleanup-tcmu_get_runner_handler.patch Patch0071: 0071-config-Add-usage-helper-and-clean-up-the-code-style.patch Patch0072: 0072-tcmur-Correct-the-cmd-lba-exceed-check-condition.patch Patch0073: 0073-Move-configfs-functions-to-new-file.patch Patch0074: 0074-Add-configfs-root-dir-define.patch Patch0075: 0075-add-configsfs-helper-for-integer-values.patch Patch0076: 0076-Add-use-defines-for-max-buffer-size-and-path-len.patch Patch0077: 0077-Don-t-fail-short-long-inquirys.patch Patch0078: 0078-Add-ALUA-and-SCSI-port-related-definitions.patch Patch0079: 0079-prepare-for-tcmu-runner-specific-device.patch Patch0080: 0080-runner-move-runner-specific-device-fields.patch Patch0081: 0081-runner-move-cmd-processing-thread-work-back-to-runne.patch Patch0082: 0082-runner-move-tcmu_device-lock-to-tcmur_device.patch Patch0083: 0083-tunner-move-command-io-handler-typedefs.patch Patch0084: 0084-runner-remove-unused-log-helpers.patch Patch0085: 0085-file_optical-remove-unused-mutex.patch Patch0086: 0086-runner-add-possible-repetitive-handler-registerring-.patch Patch0087: 0087-Add-multi-output-support.patch Patch0088: 0088-Add-more-configfs-helpers.patch Patch0089: 0089-move-CFGFS_CORE-to-common-code.patch Patch0090: 0090-Use-configfs-to-setup-ALUA-state.patch Patch0091: 0091-Add-support-for-std-inquiry-TPGS.patch Patch0092: 0092-Add-page-83-target-port-group-and-relative-port-id-s.patch Patch0093: 0093-Add-RTPG-and-STPG-lib-support.patch Patch0094: 0094-runner-hook-into-libtcmu-alua-support.patch Patch0095: 0095-log-add-device-name-prefix-to-messages.patch Patch0096: 0096-tcmur-commands-not-handled-will-report-as-not-suppor.patch Patch0097: 0097-rbd-add-ALUA-based-failover-failback-support.patch Patch0098: 0098-rbd-convert-tcmu_err-to-tcmu_dev_err.patch Patch0099: 0099-rbd-cleanup-from-alua-patches.patch Patch0100: 0100-update-README-for-targetcli-support.patch Patch0101: 0101-rbd-do-not-reopn-image-from-report-callout.patch Patch0102: 0102-config-Convert-to-use-darray-and-prepare-for-dynamic.patch Patch0103: 0103-qcow-Clarify-bad-magic-error-message.patch Patch0104: 0104-tcmu-Add-Format-Unit.patch Patch0105: 0105-runner-move-transition_state-out-of-store-driver.patch Patch0106: 0106-runner-move-report_state-out-of-store-driver.patch Patch0107: 0107-logger-libtcmu-qcow-convert-to-use-logger.patch Patch0108: 0108-only-destroy-rados_ioctx-if-it-has-been-created.patch Patch0109: 0109-api-mode-sense-add-control-page-support.patch Patch0110: 0110-move-alua.c-from-libtcmu-to-runner.patch Patch0111: 0111-runner-make-the-ARRAY_SIZE-min-max-macros-global.patch Patch0112: 0112-api-Enable-COMPARE_AND_WRITE-command.patch Patch0113: 0113-tcmur-Allow-the-handlers-to-handle-the-cmds-through-.patch Patch0114: 0114-size-is-expected-to-be-signed.patch Patch0115: 0115-improve-some-error-logging-in-rbd.c.patch Patch0116: 0116-tcmu_rbd_open-detect-fail-if-block_size-is-zero.patch Patch0117: 0117-detect-fail-if-block_size-is-zero.patch Patch0118: 0118-api-Add-Block-Device-Characteristics-VPD-page-0xb1-s.patch Patch0119: 0119-tcmur-Add-and-convert-to-handle_generic_cbk-to-simpl.patch Patch0120: 0120-README-Update-option-2-about-writting-a-tcmu-runner-.patch Patch0121: 0121-glfs-fix-double-free-of-pointer.patch Patch0122: 0122-load_module-skip-loading-target_core_user-if-already.patch Patch0123: 0123-log-option-to-change-default-logdir.patch Patch0124: 0124-glfs-enable-logging.patch Patch0125: 0125-api-Add-Logical-Block-Provisioning-VPD-page-B2h-supp.patch Patch0126: 0126-glfs-implement-async-read-write-flush-versions.patch Patch0127: 0127-api-Add-Unit-Serial-Number-page-80h-support.patch Patch0128: 0128-security-fix-double-free-in-function-handle_format_u.patch Patch0129: 0129-glfs-fix-heap-use-after-free-in-glfs-cache.patch Patch0130: 0130-tcmu-handle-segfault-on-SIGINT.patch Patch0131: 0131-systemd-change-KillMode-from-default-to-process.patch Patch0132: 0132-systemd-remove-tcmu-runner-restart-behaviour.patch Patch0133: 0133-load_module-defend-on-modules-directory.patch Patch0134: 0134-logging-change-logdir-path-from-default-to-var-log-g.patch Patch0135: 0135-Fix-use-after-free-crash.patch Patch0136: 0136-Add-device-only-after-successful-initialization.patch Patch0137: 0137-Avoid-free-of-uninitialized-ptr.patch Patch0138: 0138-Fix-memory-allocations-in-parse_imagepath.patch Patch0139: 0139-lock-fix-return-value-check-of-pthread_-calls.patch Patch0140: 0140-fixup-fd-leakage-in-libtcmu_config.c.patch Patch0141: 0141-glfs-fix-indentation.patch Patch0142: 0142-glfs-rename-global-variable-cache-glfs_cache.patch Patch0143: 0143-glfs-protect-cache-traffic-from-race.patch Patch0144: 0144-libtcmu-make-add-remove-sync-and-pass-results.patch Patch0145: 0145-libtcmu-runner-add-reconfig-support-v2.patch Patch0146: 0146-libtcmu-cleanup-log-messages-added-changed-in-reconf.patch Patch0147: 0147-libtcmu-fix-mode-sense-handling.patch Patch0148: 0148-libtcmu-return-WCE-based-on-device-support.patch Patch0149: 0149-glfs-set-WCE.patch Patch0150: 0150-glfs-remove-O_SYNC.patch Patch0151: 0151-runner-use-ppoll-instead-of-poll.patch Patch0152: 0152-logger-Set-the-default-log-level-to-_INFO.patch Patch0153: 0153-systemd-add-glusterd-service-as-Requisite.patch Patch0154: 0154-libtcmu-fix-name-check-for-nl-commands.patch Patch0155: 0155-systemd-define-glusterd-precedence.patch Patch0156: 0156-build-add-target_core_user-header.patch Requires: targetcli >= 2.1.fb46-1 Requires: libtcmu = %{version}-%{release} BuildRequires: cmake BuildRequires: glib2-devel BuildRequires: kmod-devel BuildRequires: libnl3-devel BuildRequires: glusterfs-api-devel >= 3.6.0 BuildRequires: systemd-units %description A daemon that handles the complexity of the LIO kernel target's userspace passthrough interface (TCMU). It presents a C plugin API for extension modules that handle SCSI requests in ways not possible or suitable to be handled by LIO's in-kernel backstores. %package -n libtcmu Summary: A library to ease supporting LIO userspace processing Group: System Environment/Libraries %description -n libtcmu libtcmu provides a library for processing SCSI commands exposed by the LIO kernel target's TCM-User backend. %package -n libtcmu-devel Summary: Development headers for libtcmu Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} Requires: libtcmu = %{version}-%{release} %description -n libtcmu-devel Development header(s) for developing against libtcmu. %prep %autosetup -p1 %build %cmake -DSUPPORT_SYSTEMD=ON -Dwith-rbd=false -Dwith-qcow=false . make %{?_smp_mflags} gzip --stdout tcmu-runner.8 > tcmu-runner.8.gz %install make install DESTDIR=%{buildroot} mkdir -p %{buildroot}%{_mandir}/man8/ install -m 644 tcmu-runner.8.gz %{buildroot}%{_mandir}/man8/ %post -p /sbin/ldconfig %files %{_bindir}/tcmu-runner %dir %{_libdir}/tcmu-runner %{_libdir}/tcmu-runner/* %{_sysconfdir}/dbus-1/system.d/tcmu-runner.conf %{_sysconfdir}/tcmu/tcmu.conf %{_datarootdir}/dbus-1/system-services/org.kernel.TCMUService1.service %{_unitdir}/tcmu-runner.service %doc README.md %license LICENSE %{_mandir}/man8/tcmu-runner.8.gz %files -n libtcmu %{_libdir}/*.so.* %files -n libtcmu-devel %{_includedir}/libtcmu.h %{_includedir}/libtcmu_common.h %{_includedir}/tcmu-runner.h %{_libdir}/*.so %changelog * Fri Sep 15 2017 Prasanna Kumar Kalever - 1.2.0-15 - Fix the precedence of systemd units (bz#1491758) * Sat Sep 09 2017 Prasanna Kumar Kalever - 1.2.0-14 - Fix dev name lookup in uio device removal (bz#1473162) * Fri Sep 08 2017 Prasanna Kumar Kalever - 1.2.0-13 - Fix targetcli version check (bz#1489745) * Mon Aug 21 2017 Prasanna Kumar Kalever - 1.2.0-12 - Systemd unit changes needed to make glusterd service as 'Requisite' (bz#1479355) * Wed Aug 02 2017 Prasanna Kumar Kalever - 1.2.0-11 - Avoid poll call reschedules during signal handling (bz#1474188) - Set the default log level to INFO (bz#1477225) * Tue Aug 01 2017 Prasanna Kumar Kalever - 1.2.0-10 - Enable write cache and remove O_SYNC flag (bz#1455992) * Mon Jul 10 2017 Prasanna Kumar Kalever - 1.2.0-9 - Update target_core_user.h to include new cmd's and attr's required by patches in 1.2.0-8 * Mon Jul 10 2017 Prasanna Kumar Kalever - 1.2.0-8 - Perform netlink operations synchronously and add reconfig support (bz#1449245) * Tue Jun 27 2017 Prasanna Kumar Kalever - 1.2.0-7 - Fix typo in 0143*.patch introduced in 1.2.0-5, i.e. s/tcmu_dev/tcmu_err/ * Tue Jun 27 2017 Prasanna Kumar Kalever - 1.2.0-6 - Fix spec file in 1.2.0-5, i.e. libtcmu version and targetcli version * Tue Jun 27 2017 Prasanna Kumar Kalever - 1.2.0-5 - Update spec with 'Requires: libtcmu' (bz#1464501) - Fix PID file descriptor leak (bz#1464419) - Protect glfs objects cache from race (bz#1464421) * Wed Jun 07 2017 Prasanna Kumar Kalever - 1.2.0-4 - Fix crash due to Use after free bugs (bz#145668 bz#1456227 bz#1456226) * Wed May 24 2017 Prasanna Kumar Kalever - 1.2.0-3 - Refix tcmu-runner failing to run in a container, while loading module (bz#1449690) - Remove quotation marks (" ") around logdir path in the systemd unit (bz#1451687) - Remove tcmu-runner restart on failure behavior (bz#1450824) - Fix heap use after free (bz#1452936) - Handle segfault on SIGINT (bz#1452198) - Fix double free (bz#1454831) * Tue May 16 2017 Prasanna Kumar Kalever - 1.2.0-2 - Fix crash while attempting to start tcmu-runner and glusterd not running (bz#1448433) - Fix tcmu-runner failing to run in a container, while load module (bz#1449690) - Cherry-pick various error and crash handling fixes from upstream tcmu-runner (bz#1449627) * Sun Mar 26 2017 Prasanna Kumar Kalever - 1.2.0-1 - Initial import from upstream tcmu-runner master, package tcmu-runner in RHGS (bz#1383116)