Commit Graph

12 Commits

Author SHA1 Message Date
Konstantin Kharlamov
2fa40456f7 debian: make sure CC variable is passed through to the build 2021-05-19 16:09:34 +03:00
Konstantin Kharlamov
93d07f966e 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.
2021-05-19 16:09:34 +03:00
Konstantin Kharlamov
bd2cfd4bb2 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.
2021-05-19 16:09:34 +03:00
Konstantin Kharlamov
65ef5e0627 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`
2021-05-19 16:09:28 +03: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
5d630c2514 Revert "debian/rules: Also clean the scstadmin/scstadmin soft link"
Since the soft link scstadmin/scstadmin is under source control, do not
remove it while removing build artefacts. See also commit b3435fbdda
("debian/rules: Also clean the scstadmin/scstadmin soft link").



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9330 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-10 01:16:26 +00:00
Bart Van Assche
d7dd927a07 Make Debian packaging also work for older Debian versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7368 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-08 00:21:20 +00:00
Bart Van Assche
1aa2453add dpkg: Build in release mode
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7366 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-06 03:26:33 +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
b3435fbdda debian/rules: Also clean the scstadmin/scstadmin soft link
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7353 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-01 04:45:01 +00:00
Bart Van Assche
24568c1482 debian/rules: Make executable
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7351 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-01 04:26:50 +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