The symlink-based %files conditional was added when scstadmin supported
a procfs variant. Procfs support is legacy now, so drop the conditional
and always package the man pages.
Fix Perl precedence warnings:
Possible precedence problem between ! and numeric gt (>) at SCST.pm line 980.
Possible precedence problem between ! and numeric gt (>) at SCST.pm line 1223.
Possible precedence problem between ! and numeric gt (>) at SCST.pm line 3847.
Add systemd service file when packaging for Debian. Current
systemd will automatically generate one, but this functionality
will be removed in a future version of systemd.
scstadmin's version check assumed scstVersion() returns a bare "X.Y.Z".
After changing the sysfs attribute it may return strings like
"SCST version: 3.10.0-pre", which triggered a numeric warning and a
false failure:
Argument "SCST version: 3" isn't numeric in numeric gt (...)
Parse the version number from the raw string and ignore any
prefix/suffix. If no version can be parsed, keep the existing
failure path.
Fixes: https://github.com/SCST-project/scst/issues/296
When attempting to manage iscsi-scstd using a systemd service file,
systemd warns:
PIDFile= references a path below legacy directory /var/run/, [...]
Change the pidfile path to be under /run instead.
/run has been in use as a replacement for /var/run for many years now
(the original Debian proposal is from 2011). Most distributions symlink
/var/run to /run, which means that this change should not have any
adverse side effects for the vast majority of users.
Previously, only the revision string was passed from the build system
into the SCST kernel module. This patch extends that by passing additional
build metadata: kernel version, build date, Git commit hash, build number,
and architecture type.
These values are now consistently exposed in the kernel log, sysfs,
and via modinfo, providing a unified and reliable way to identify the
exact build in use.
Fedora 42 maps %{_sbindir} to /usr/bin. Export SBINDIR=%{_sbindir} in
the spec files and let the iscsi-scst/scstadmin Makefiles honour that
variable.
Fixes "File not found: .../iscsi-scst-adm" on unified-/usr systems while
keeping older distros unchanged.
Using scstadmin to reload a configuration with fewer targets can result
in a "Use of uninitialized value in numeric ne" error. Rectify by adding
a check for the undefined value and handling the situation (by disabling
the target in question, unless the driver is copy_manager).
The scstadmin.spec.in file contained a custom Requires line that
generated dependencies based on the full paths of the killall and rm
commands. This approach is unconventional and could cause issues with
dependency resolution.
This patch replaces the custom Requires line with the package names
providing the required commands, namely 'psmisc' for killall and
'coreutils' for rm. This change ensures proper dependency resolution
and adheres to recommended practices for specifying dependencies in
spec files.
Fixes: https://github.com/SCST-project/scst/issues/152
This patch fixes RPM build errors caused by incorrect file paths:
RPM build errors:
File must begin with "/": %{perl_vendorlib}/SCST
File must begin with "/": %{perl_vendorarch}/auto/SCST_SCST
For some reasons, the perl_vendorlib and perl_vendorarch variables may
not be defined by default on newer RHEL systems.
Therefore, assign the variables explicitly to avoid these errors.
Since cluster_mode relies upon the t10_dev_id to generate a namespace, once
cluster_mode is set the t10_dev_id can no longer be changed.
However, because cluster_mode is listed as one of the various add_dev_params,
this meant that it would be set earlier than t10_dev_id when scstadmin
processes scst.conf
Rectify by adding t10_dev_id to fileio_add_dev_params, etc and modifying the
SCST.pm openDevice so that cluster_mode is set last.
Support for the ib_srpt_target_<n> target port names was removed in 2015.
Update the documentation that still uses this target port name format.
Remove all references to the obsolete ib_srpt kernel module parameters
use_port_guid_in_session_name and use_node_guid_in_target_name. Remove
the references from srpt/README to target port name formats that are no
longer supported.
Most targets of this Makefile require a underlying Makefile to be
created before they are called. Otherwise you will get an error like
this:
make -C scst-1.0.0 clean
make[3]: Entering directory '/.../scst/scstadmin/scstadmin.sysfs/scst-1.0.0'
make[3]: *** No rule to make target 'clean'. Stop.
Hence add a target that creates a underlying Makefile and add it as a
dependency for all required targets.
Remove the invocation of the 'which' command since that command has been
deprecated in Debian 11 and since I am not aware of any other portable
approach for querying the path of a command.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9494 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Since `make_path` is called in pretty much any interaction with sysfs,
speed degradation in it has visible impact when plenty of resources
being managed. So much that it reaches the same great execution time as
calls to filesystem, such as `-d`.
Reported-by: Dyadyushkin Aleksandr <dyadyushkin.a@raidix.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9485 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Validate the $value argument of set functions with defined() instead of
length(). Append a newline to the end of $value before writing it into
a sysfs attribute to make sure something gets written if $value eq "".
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9158 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Report "Failed to set a SCST attribute" instead of "SCST attribute specified
is static" if modifying of an attribute fails.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9155 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The scstadmin output for the ib_srpt driver depends on whether or not an
RDMA HCA is present and also on the port GUIDs. Hence filter out the
ib_srpt data.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9153 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch fixes a bug by making it again possible to use "0" as e.g. the
name of an SCST device group. See also commit 858f50e4d3 ("scstadmin:
Improve robustness").
Reported-by: Pavel Klevtsov
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9152 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Around 2011 a sysfs-tree-changes branch was created in the SourceForge
repository because Greg KH asked to rework the SCST sysfs interface. That
interface is called the "new" sysfs interface. The current and only used
API is called the "old" sysfs interface. Since the "new" sysfs interface
never had any users other than myself, remove support for that interface.
See also commit a66cbc4115 ("scstadmin: Add support for the sysfs
interface provided by the code on the sysfs-tree-changes branch").
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9151 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Also unload SCST kernel modules that have been loaded manually or that are
no longer referenced by /etc/scst.conf.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8951 d57e44dd-8a1f-0410-8b47-8ef2f437770f