Skip to content

Commit 72ada77

Browse files
authored
Merge pull request #2396 from tempesta-tech/rb-2038-deb-packeges
rework the preparation of release packages.
2 parents d043032 + 81b2c15 commit 72ada77

File tree

11 files changed

+59
-514
lines changed

11 files changed

+59
-514
lines changed

pkg/README.md

Lines changed: 30 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,34 @@
11
## Packaging Tempesta
22

3-
TempestaFW packaging is plain and simple. First of all it is build as DKMS
4-
module rather than a binary Linux kernel module. This approach allows:
5-
6-
- Build single package for all supported CPUs. Since user will build the module
7-
on the target server, build system will be aware of all supported x86
8-
extensions, such as AVX2.
9-
10-
- Have a weak dependency between kernel image and the module. End user can
11-
use the module with the custom kernel.
12-
13-
14-
### Dependencies between Tempesta and Kernel
15-
16-
TempestaFW requires patched kernel, and it has minimum required version. Thus
17-
variable `BUILD_EXCLUSIVE_KERNEL` in `pkg/debian/tempesta-fw-dkms.dkms` gives
18-
regexp to match supported versions.
19-
20-
Every time a new module is added or removed in Tempesta sources, `BUILT_MODULE_*`
21-
modules list must be udated.
22-
23-
24-
### Workflow
25-
26-
To simplify the build, TempestaFW is built as native Debian module using
27-
`git-buildpackage` tool set. The tool set does not honor builds from any
28-
branches except `master` or builds with dirty index, so warning will appear
29-
and build will fail. But the tool set does not track ignored files, so unneeded
30-
files may appear in package. Clone the repo to a new directory or remove
31-
untracked files with:
32-
```sh
33-
git clean -fd
3+
TempestaFW packaging is plain and simple. It is build as a binary Linux package.
4+
5+
### Structure
6+
```text
7+
├── debian
8+
│ ├── changelog
9+
│ ├── compat
10+
│ ├── control
11+
│ ├── copyright
12+
│ ├── dirs
13+
│ ├── rules
14+
│ ├── tempesta-fw.service
3415
```
3516

36-
Packaging require to hame `debian` directory in repo root, create symlink:
37-
```sh
38-
ln -s pkg/debian debian
39-
```
40-
41-
Update packet changelog with `dch` command. See manpages for more info.
42-
Although `git-buildpackage` has a pretty `gbp dch` tool, which can update
43-
changelog using git history, it is not suitable in our case, git history doesn't
44-
hold information valuable for end user.
45-
46-
Finally, build the package using command:
47-
```sh
48-
gbp buildpackage --git-tag -us -uc
49-
```
50-
`--git-tag` option will add git tag, formatted as `debian/0.1-2`, where `0.1-2`
51-
- debian version, stated in the log. Push the tag to upstream to indicate
52-
exact commit used for packaging.
53-
54-
`-us -uc` options are similar to `dpkg-buildpackage`. If stated, source package
55-
and `.changes` files will remain unsigned.
56-
57-
58-
### TODO
59-
60-
Add dependencies into `debian/control` to allow dependency tracking via package
61-
manager.
17+
- changelog - contains a log of changes made to the package in each version.
18+
It follows a specific format and is important for users to understand what
19+
has been added, changed, or fixed in each release. It is also used by package
20+
management tools to display version history.
21+
- compat - specifies the debhelper compatibility level that should be used when
22+
building the package. It indicates which features of debhelper are available
23+
for use in the rules file.
24+
- control - contains essential metadata about the package, such as its name,
25+
version, architecture, description, maintainer information and dependencies.
26+
Must contain the necessary kernel patch in dependencies.
27+
For example: `linux-headers-5.10.35.tfw-39c65d3, linux-image-5.10.35.tfw-39c65d3`.
28+
- copyright - provides information about the licensing of the package and its components.
29+
- dirs - lists of directories that need to be created during the installation process.
30+
- rules - is a makefile that defines how the package is built and installed.
31+
It contains instructions on how to install files and other tasks necessary to
32+
create a Debian package.
33+
- tempesta-fw.service - defines a systemd service unit for TempestaFW. It specifies
34+
virtual variables in the system.

pkg/debian/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tempesta-fw-dkms/
1+
tempesta-fw/
22
debhelper-build-stamp
33
files
44
*.debhelper.log

pkg/debian/README.source

Lines changed: 0 additions & 10 deletions
This file was deleted.

pkg/debian/changelog

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tempesta-fw-dkms (0.8.0) focal; urgency=medium
1+
tempesta-fw (0.8.0) focal; urgency=medium
22

33
* Add `Expect: 100-continue` support
44
* Add `cache_use_stale` directive
@@ -55,7 +55,7 @@ tempesta-fw-dkms (0.8.0) focal; urgency=medium
5555

5656
-- Tempesta Technologies, Inc. <info@tempesta-tech.com> Thu, 13 Mar 2025 16:13:47 +0400
5757

58-
tempesta-fw-dkms (0.7.1) focal; urgency=medium
58+
tempesta-fw (0.7.1) focal; urgency=medium
5959

6060
* Frang: Changed default settings to more strict
6161
* Implement `max_concurrent_streams` limitation
@@ -73,7 +73,7 @@ tempesta-fw-dkms (0.7.1) focal; urgency=medium
7373
* Fix incorrect server connection reference counter
7474
* Hide "Te" header from HTTP/1.x backend when proxying response over HTTP/2.
7575

76-
tempesta-fw-dkms (0.7.0) focal; urgency=medium
76+
tempesta-fw (0.7.0) focal; urgency=medium
7777

7878
* Fix corrupted header location on H2 sticky cookie redirect
7979
* Fix crash during tempesta reconfiguration
@@ -119,7 +119,7 @@ tempesta-fw-dkms (0.7.0) focal; urgency=medium
119119

120120
-- Tempesta Technologies, Inc. <info@tempesta-tech.com> Wed, 3 Mar 2022 20:13:43 +0500
121121

122-
tempesta-fw-dkms (0.6.8) focal; urgency=medium
122+
tempesta-fw (0.6.8) focal; urgency=medium
123123

124124
* Fix parsing of an empty extension if it comes last in ClientHello.
125125
* Fix cached data corruption during encryption.
@@ -131,7 +131,7 @@ tempesta-fw-dkms (0.6.8) focal; urgency=medium
131131

132132
-- Tempesta Technologies, Inc. <info@tempesta-tech.com> Wed, 3 Mar 2022 20:13:43 +0500
133133

134-
tempesta-fw-dkms (0.5.0) stretch; urgency=medium
134+
tempesta-fw (0.5.0) stretch; urgency=medium
135135

136136
* Add HTTP health monitoring
137137
* Performance optiomistation and fixes for the On-the-fly reconfiguration
@@ -145,7 +145,7 @@ tempesta-fw-dkms (0.5.0) stretch; urgency=medium
145145

146146
-- Tempesta Technologies, Inc. <info@tempesta-tech.com> Wed, 21 Mar 2018 14:48:56 +0500
147147

148-
tempesta-fw-dkms (0.5.0pre8) stretch; urgency=medium
148+
tempesta-fw (0.5.0pre8) stretch; urgency=medium
149149

150150
* Update supported Linux kernel to 4.9.35
151151
* Fix memory leaks under high load
@@ -155,7 +155,7 @@ tempesta-fw-dkms (0.5.0pre8) stretch; urgency=medium
155155

156156
-- Tempeststa Technologies, Inc. <info@tempesta-tech.com> Tue, 23 Jan 2018 08:58:30 +0500
157157

158-
tempesta-fw-dkms (0.5.0) stretch; urgency=medium
158+
tempesta-fw (0.5.0) stretch; urgency=medium
159159

160160
* Initial release
161161

pkg/debian/control

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1-
Source: tempesta-fw-dkms
1+
Source: tempesta-fw
22
Section: web
33
Priority: optional
44
Maintainer: Tempeststa Technologies, Inc. <info@tempesta-tech.com>
5-
Build-Depends: debhelper (>= 9.20160709~), dkms
6-
Standards-Version: 3.9.8
5+
Build-Depends: debhelper (>= 9)
6+
Standards-Version: 4.5.0
77
Homepage: http://tempesta-tech.com
88
Vcs-Git: https://github.com/tempesta-tech/tempesta.git
99
Vcs-Browser: https://github.com/tempesta-tech/tempesta.git
1010

11-
Package: tempesta-fw-dkms
11+
Package: tempesta-fw
1212
Architecture: amd64
13-
Depends: dkms (>= 1.95),
14-
libboost-dev,
13+
Depends: libboost-dev,
1514
libboost-program-options-dev,
1615
kdump-tools,
1716
libfmt-dev,
1817
libspdlog-dev,
18+
linux-headers-5.10.35.tfw-39c65d3,
19+
linux-image-5.10.35.tfw-39c65d3,
1920
${misc:Depends}
2021
Description: Open-source high-speed application delivery controller.
2122
Tempesta FW is an open-source application delivery controller (ADC) built

pkg/debian/copyright

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ Source: http://tempesta-tech.com
44

55
Files: *
66
Copyright: 2014 NatSys Lab
7-
2015-2018 Tempesta Technologies, Inc.
7+
2015-2025 Tempesta Technologies, Inc.
88
License: GPL-2.0+
99

1010
Files: debian/*
11-
Copyright: 2017 Tempeststa Technologies, Inc. <info@tempesta-tech.com>
11+
Copyright: 2017-2025 Tempeststa Technologies, Inc. <info@tempesta-tech.com>
1212
License: GPL-2.0+
1313

1414
License: GPL-2.0+

pkg/debian/rules

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,21 @@
44
# Uncomment this to turn on verbose mode.
55
export DH_VERBOSE=1
66

7-
NAME=tempesta-fw
8-
DEB_NAME=$(NAME)-dkms
9-
VERSION=$(shell dpkg-parsechangelog |grep ^Version:|cut -d ' ' -f 2)
7+
DEB_NAME=tempesta-fw
108

119
%:
12-
dh $@ --with dkms --with systemd
10+
dh $@ --with systemd
1311

1412
override_dh_auto_install:
15-
dh_install fw usr/src/$(NAME)-$(VERSION)
16-
dh_install db usr/src/$(NAME)-$(VERSION)
17-
dh_install tls usr/src/$(NAME)-$(VERSION)
18-
dh_install lib usr/src/$(NAME)-$(VERSION)
19-
dh_install Makefile usr/src/$(NAME)-$(VERSION)
13+
dh_install fw usr/src/tempesta
14+
dh_install db usr/src/tempesta
15+
dh_install tls usr/src/tempesta
16+
dh_install lib usr/src/tempesta
17+
dh_install Makefile usr/src/tempesta
2018
dh_install etc/* /etc/tempesta
2119
dh_install scripts /lib/tempesta
2220
dh_install utils /lib/tempesta
23-
find "debian/$(DEB_NAME)/usr/src/$(NAME)-$(VERSION)" -name '.git*' -exec rm {} \;
24-
25-
override_dh_dkms:
26-
dh_dkms -V $(VERSION)
21+
find "debian/$(DEB_NAME)/usr/src/tempesta" -name '.git*' -exec rm {} \;
2722

2823
override_dh_installinit:
2924
dh_installinit --no-start --no-restart-on-upgrade --noscripts --name=tempesta-fw

pkg/debian/tempesta-fw-dkms.dkms

Lines changed: 0 additions & 31 deletions
This file was deleted.

pkg/debian/tempesta-fw-docs.docs

Lines changed: 0 additions & 1 deletion
This file was deleted.

pkg/debian/tempesta-fw.service

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ After=network.target
55

66
[Service]
77
Type=oneshot
8-
Environment="TFW_PATH=/lib/modules/%v/updates/dkms"
9-
Environment="TDB_PATH=/lib/modules/%v/updates/dkms"
10-
Environment="TLS_PATH=/lib/modules/%v/updates/dkms"
11-
Environment="LIB_PATH=/lib/modules/%v/updates/dkms"
8+
Environment="TFW_PATH=/usr/src/tempesta/fw"
9+
Environment="TDB_PATH=/usr/src/tempesta/db/core"
10+
Environment="TLS_PATH=/usr/src/tempesta/tls"
11+
Environment="LIB_PATH=/usr/src/tempesta/lib"
1212
Environment=TFW_CFG_PATH=/etc/tempesta/tempesta_fw.conf
1313
Environment="TFW_SYSTEMD=1"
1414
RemainAfterExit=yes

0 commit comments

Comments
 (0)