Commit Graph

125 Commits

Author SHA1 Message Date
Gleb Chesnokov
707554a310 scst: Revert semantic kernel version change
Partially revert the earlier commit which limited SCST_KVER to a semantic
version only. Restore usage of the full kernel version string for improved
clarity in build metadata.

Fixes: ac1e7f82b7 ("scst: Fix SCST_KVER to use semantic version only")
2025-05-21 11:34:29 +03:00
Gleb Chesnokov
ac1e7f82b7 scst: Fix SCST_KVER to use semantic version only
Previously, SCST_KVER included the full kernel release string. This patch
limits it to the semantic version (e.g. "6.9.0") for cleaner and more
consistent output in dmesg, sysfs, and modinfo.

Fixes: 6782003bfc ("scst: Extend build metadata passed to the SCST")
2025-05-16 17:33:33 +03:00
Gleb Chesnokov
6782003bfc scst: Extend build metadata passed to the SCST
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.
2025-05-16 16:37:43 +03:00
Gleb Chesnokov
d8db7deb2b Makefile: Actualise help target
Sync the `help` target with the actual Makefile rules:

- Include missing targets (tags, cov-build, docs, scstadm, scstadm-rpm)
- Reorder and align target groups
- Update `.PHONY` list
2025-04-21 14:22:43 +03:00
Gleb Chesnokov
85e8086a7e Makefile: Implement several improvements to SCST Makefiles
1. Correct a typo, changing `make release` to `make 2release`.
2. Add information about package-related targets to the help section.
3. Remove `dev_handler` directory during the uninstall process.
4. Eliminate the non-existent `tgt` target from the PHONY targets.
5. Introduce SCST_MOD_DIR and SCST_DH_MOD_DIR as helper variables.
2023-06-14 16:49:36 +03:00
Gleb Chesnokov
a86e5c55ea Makefile, scst: Add revision to SCST version macro
Add SCST revision to SCST_VERSION_STRING macro. This might be useful
for issues reporting/investigation.
2023-01-29 16:31:20 +03:00
Gleb Chesnokov
a7665a4535 Makefile: Delete the source code archive after building the scst-dkms-rpm packages 2023-01-10 13:52:51 +03:00
Gleb Chesnokov
7b0a2f8e69 Makefile, scstadmin/Makefile: Use git sha1 as the SCST revision
git sha1 is a more convenient way to generate a revision than the number
of commits. Also, remove svn repository support.
2023-01-10 13:52:51 +03:00
Gleb Chesnokov
3d1dd5c90a Makefile, scst[-dkms].spec.in: Add support for PKG_BUILD_MODE
See also commit 95c9bdc0f7 ("pass through `DEBUG_MODE_LEVEL` to
`dpkg` make target").
2023-01-10 13:52:51 +03:00
Gleb Chesnokov
baa8a58833 Makefile, debian: Rename the DEBUG_MODE_LEVEL variable into PKG_BUILD_MODE
The latter name reflects better the role of this variable.
2023-01-10 13:52:51 +03:00
S.Katyshev
95c9bdc0f7 pass through DEBUG_MODE_LEVEL to dpkg make target
It's quite strange but we can't run `make dpkg` with other
debug mode level.
2023-01-09 13:05:45 +03:00
Gleb Chesnokov
5c7fa24031 Makefile: Introduce the 'make cov-build'
Introduce a new helper target to build the SCST for the Coverity scan.
2022-07-25 14:41:32 +03:00
Bart Van Assche
ff09b47b1a Makefile: Include the debian directory in the source code archive 2022-01-02 20:27:28 -08:00
Chesnokov Gleb
e9c9cc8b6a Makefile: Introduce the 'make rpm-dkms'
For convenience, there is a lack of opportunity to build
the SCST dkms and scstadmin packages in a one command.

Introduce the 'make rpm-dkms' command that in similar way to 'make rpm'
builds SCST dkms rpm packages and then builds scstadmin rpm packages.
2021-12-21 14:23:06 +03:00
Bart Van Assche
d5cee6ebf4 Makefile: Make sure that $(KVER) and $(KDIR) are set
These variables are needed for building Debian packages.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9496 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-08-27 17:58:27 +00:00
Bart Van Assche
27a74601a5 Makefile, dpkg: Show $(KVER) and $(KDIR) while building a Debian package
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9495 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-08-27 17:57:47 +00:00
Bart Van Assche
ce4afb414a Makefile: Fix the scst-dkms-rpm build
Fixes: 1cfa1e7f87 ("Makefile: switch to qla-32gbit by default")



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9447 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-06-21 03:28:58 +00:00
Bart Van Assche
b7fc83cbdd nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9446 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-06-21 03:26:58 +00:00
Bart Van Assche
7aade0a109 Makefile: Make the qla2x00t-32gbit driver the default QLogic FC driver
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9438 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-31 02:59:52 +00:00
Bart Van Assche
aa3f402314 Makefile: Conditionally regenerate the source code archives
Only regenerate the source code archives if one of the included source files
has been modified.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9428 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-23 20:41:30 +00:00
Bart Van Assche
bbc5c25445 debian: make sure CC variable is passed through to the build
See also https://github.com/bvanassche/scst/pull/37.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9426 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-20 04:02:37 +00:00
Bart Van Assche
2de5765c9c debian: make sure depmod uses the correct version
By default it uses the currently running kernel, which is not necessary
the kernel the package was built for. Fix this by generating the path on
package creation stage.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9425 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-20 04:02:06 +00:00
Bart Van Assche
fc2135c345 debian: fix wrong kernel version used in preinst
This script is used in the non-dkms scst package. The purpose of package
is to determine kernel location at compile-time, as opposed to the
package installation time. However, calling `uname -r` in package
installation time violates that idea because it would get some random
kernel that was running on the machine. This problem is particularly
seen in containers, because in those `uname` shows the kernel running on
the host, rather than the one running inside container.

Fix this by determining the kernel location in `preinst` script at
compile time as well.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9424 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-20 04:01:46 +00:00
Bart Van Assche
143ea7b546 debian: make sure KVER and KDIR are visible to dpkg build
The debuild clears up the environment, thus the essential SCST variables
KVER and KDIR are cleared out. This patch fixes it.

Note: technically, `debild` supports `--preserve-env` option. But in
reality making use of it makes no difference, variables still do not
appear. Work around it by using DEB_foo_SET from `man dpkg-buildflags`


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9423 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-20 04:01:24 +00:00
Bart Van Assche
ffad8bd07a Makefile: remove an always false condition
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9422 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-20 04:01:00 +00:00
Bart Van Assche
613e7583c2 Debian: Various package building improvements
Use a two digit revision number instead of a single digit revision number to
fix a lintian warning. Exclude .gitignore files from the source archive.
Copy the debhelper major version number into debian/compat instead of
hardcoding the compatibility level because the highest compatibility level
supported by Ubuntu 16.04 is 9 and because compatibility level 9 is considered
deprecated by Ubuntu 20.04.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9333 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-10 01:21:44 +00:00
Bart Van Assche
e0e4dcba2c dpkg: Use defaults if DEBEMAIL or DEBFULLNAME have not been set
This makes it easier to build a Debian package.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9332 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-10 01:18:07 +00:00
Bart Van Assche
20e1827d54 Makefile: Add a target for building a single release archive
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9241 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-23 02:36:20 +00:00
Bart Van Assche
5ddb45d914 Simplify the top-level Makefile
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9015 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-13 16:57:19 +00:00
Bart Van Assche
474af4d174 Makefile: Remove references to the mpt and mvsas_tgt drivers
This patch is a follow-up for r8622.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8946 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-20 01:04:08 +00:00
Bart Van Assche
d5c638ca1d rpm build: Make the RPM build directory configurable
Signed-off-by: Daniel Ahlin <dah@pdc.kth.se>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8658 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-16 04:22:03 +00:00
Bart Van Assche
5de1135f8e scst: Remove all references to the QLogic git tree
Since the driver in the qla2x00t-32gbit directory supersedes the driver from
the QLogic git tree, remove all references to the latter.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8620 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-10-15 04:15:49 +00:00
Bart Van Assche
06ee7ca41d Makefile: Unbreak the RPM build process
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8595 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-09-29 22:10:46 +00:00
Bart Van Assche
22f1132073 Makefiles: Rework build mode switching
Move the build_mode file from the top level into the scst directory. Write
build mode defines into scst/include/build_mode.h and include that file
directly or indirectly in all source files that depend on these #defines.
This approach has the advantage that "make clean" does no longer has to
be run when switching between build modes because the kernel build system
recognizes build_mode.h as a dependency and triggers a rebuild of all
source files that directly or indirectly include the build_mode.h header
file.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8347 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-05 18:19:38 +00:00
Bart Van Assche
ef99fe40be fcst, srpt: Move the build_mode file to the top level
Additionally, rename BUILDMODE into BUILD_MODE and FCST/SRPTFLAGS into
BUILD_MODE_CFLAGS_.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8073 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 19:46:24 +00:00
Bart Van Assche
1587638134 Remove support for "make enable_proc" and "make disable_proc"
Since RHEL 5 and kernel versions before 2.6.26 rely on procfs support,
this patch removes support for RHEL 5.x and also for kernel versions
before 2.6.26.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7829 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-22 22:13:40 +00:00
Bart Van Assche
7c0540c556 Merge r7814:7819 from the 3.3.x branch
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7820 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-19 04:25:36 +00:00
Bart Van Assche
ca512bf87c dpkg: Add support for debian.tar.gz archives
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7796 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-04 22:02:37 +00:00
Bart Van Assche
75fe332ef1 dpkg: Add support for debian.tar.gz archives
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7795 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-04 21:29:58 +00:00
Bart Van Assche
4cd532a987 Multiple files: Remove trailing whitespace
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7504 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 03:55:02 +00:00
Bart Van Assche
91f9113cd9 Makefile: Add a missing -q option to a grep command
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7401 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-05-05 08:42:44 +00:00
Vladislav Bolkhovitin
f549829482 Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7396 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-04-12 03:49:10 +00:00
Vladislav Bolkhovitin
dae3ec0e83 Updates to support new QLogic git driver
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7391 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-03-31 03:49:15 +00:00
Bart Van Assche
1bcb712213 scst.spec: Fix depmod path
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7389 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-03-08 06:01:49 +00:00
Bart Van Assche
1f7fdf5cbc Makefile, rpm: Pass ${KDIR} to scst.spec
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7377 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-03-04 19:35:38 +00:00
Bart Van Assche
39d9ce2bb5 Debian: Add support for older versions on which dpkg-buildpackage neither supports -ui nor -jauto
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7369 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-08 05:43:15 +00:00
Bart Van Assche
47b9268d4f dpkg: Enable stripping of binary and compression of manual pages
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7365 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-06 03:26:03 +00:00
Bart Van Assche
41473b3e66 Add support for generating Debian packages
Debian packages can be generated by running "make dpkg". Running that command
will produce e.g. the following output:
[ ... ]
Output files:
total 8444
-rw-r--r-- 1 bart bart  185150 Jan 31 20:11 iscsi-scst_3.4.0.6003-1_amd64.deb
-rw-r--r-- 1 bart bart   53174 Jan 31 20:11 scst-dev_3.4.0.6003-1_all.deb
-rw-r--r-- 1 bart bart  878030 Jan 31 20:11 scst-dkms_3.4.0.6003-1_all.deb
-rw-r--r-- 1 bart bart    7388 Jan 31 20:09 scst_3.4.0.6003-1.debian.tar.xz
-rw-r--r-- 1 bart bart    1046 Jan 31 20:09 scst_3.4.0.6003-1.dsc
-rw-r--r-- 1 bart bart   95348 Jan 31 20:11 scst_3.4.0.6003-1_amd64.build
-rw-r--r-- 1 bart bart    6526 Jan 31 20:11 scst_3.4.0.6003-1_amd64.buildinfo
-rw-r--r-- 1 bart bart    3054 Jan 31 20:11 scst_3.4.0.6003-1_amd64.changes
-rw-r--r-- 1 bart bart 4892014 Jan 31 20:11 scst_3.4.0.6003-1_amd64.deb
-rw-rw-r-- 1 bart bart 2458224 Jan 31 20:09 scst_3.4.0.6003.orig.tar.xz
-rw-r--r-- 1 bart bart   43616 Jan 31 20:11 scstadmin_3.4.0.6003-1_amd64.deb

These packages can be installed with the dpkg command. An example:

cd dpkg && sudo dpkg -i scst_*.deb iscsi-scst_*.deb scstadmin_*.deb


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7350 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-01 04:21:29 +00:00
Bart Van Assche
9ec73e101a Makefile: Rework the code for generation of a source code distribution archive
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7348 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-01 04:17:00 +00:00
Bart Van Assche
6c61863bf9 Makefile: Evaluate $(VERSION) once
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7347 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-01 04:14:57 +00:00