Skip to content

Commit fff4647

Browse files
committed
Add basic DEB packaging
1 parent f0dfb2a commit fff4647

File tree

12 files changed

+152
-5
lines changed

12 files changed

+152
-5
lines changed

demo/tinykvm.vcl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ backend default none;
66
sub vcl_init {
77
# Download and activate a Varnish-provided library of compute programs.
88
# A full list of programs and how they can be used would be on the docs site.
9-
tinykvm.library("https://filebin.varnish-software.com/tinykvm_programs/compute.json");
9+
tinykvm.library("https://filebin.varnish-software.com/4wbvu68xy1epbuzv/compute.json");
1010

1111
# Tell VMOD compute how to contact Varnish (Unix Socket *ONLY*)
1212
tinykvm.init_self_requests("/tmp/tinykvm.sock");
@@ -58,7 +58,7 @@ sub vcl_backend_fetch {
5858
set bereq.backend = tinykvm.program("avif");
5959
}
6060
else if (bereq.url == "/avif/image") {
61-
set bereq.backend = tinykvm.program("fetch", "https://filebin.varnish-software.com/tinykvm_programs/rose.jpg",
61+
set bereq.backend = tinykvm.program("fetch", "https://filebin.varnish-software.com/4wbvu68xy1epbuzv/rose.jpg",
6262
"""{
6363
"headers": ["Host: filebin.varnish-software.com"]
6464
}""");
@@ -100,7 +100,7 @@ sub vcl_backend_fetch {
100100
}
101101
else if (bereq.url == "/zstd") {
102102
# Compress data using zstandard
103-
tinykvm.chain("zstd", "https://filebin.varnish-software.com/tinykvm_programs/waterfall.avif",
103+
tinykvm.chain("zstd", "https://filebin.varnish-software.com/4wbvu68xy1epbuzv/waterfall.avif",
104104
"""{
105105
"action": "compress",
106106
"level": 6,
@@ -127,13 +127,13 @@ sub vcl_backend_fetch {
127127
"""{ "json": "value" }""");
128128
}
129129
else if (bereq.url == "/minify.json") {
130-
set bereq.backend = tinykvm.program("fetch", "https://filebin.varnish-software.com/tinykvm_programs/compute.json",
130+
set bereq.backend = tinykvm.program("fetch", "https://filebin.varnish-software.com/4wbvu68xy1epbuzv/compute.json",
131131
"""{
132132
"headers": ["Host: filebin.varnish-software.com"]
133133
}""");
134134
}
135135
else if (bereq.url == "/chain") {
136-
set bereq.backend = tinykvm.program("fetch", "https://filebin.varnish-software.com/tinykvm_programs/723-1200x1200.jpg",
136+
set bereq.backend = tinykvm.program("fetch", "https://filebin.varnish-software.com/4wbvu68xy1epbuzv/723-1200x1200.jpg",
137137
"""{
138138
"headers": ["Host: filebin.varnish-software.com"]
139139
}""");

packaging/.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
**/usr
2+
**/debian/varnish-lambda*
3+
**/debian/.debhelper/
4+
*.buildinfo
5+
*.changes
6+
*.dsc
7+
*.deb
8+
*.udeb
9+
*.tar.xz
10+
*.tar.gz
11+
debhelper-build-stamp

packaging/mkcompute.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
set -e
2+
3+
# Ubuntu 24.04:
4+
pushd varnish-lambda
5+
mkdir -p usr/lib/varnish-plus
6+
pushd usr/lib/varnish-plus
7+
ln -fs ../../../../../.build .
8+
rm -f vmods
9+
mv .build vmods
10+
popd
11+
dpkg-buildpackage -nc -i
12+
popd
13+
mv varnish-lambda0_1.0-1_amd64.deb varnish-lambda0_1.0-1_amd64-24.04.deb

packaging/patch_rpath.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
patchelf --set-rpath /usr/lib:/usr/lib/varnish-plus $1
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
varnish-compute for Debian
2+
-------------------------
3+
4+
<possible notes regarding this package - if none, delete this file>
5+
6+
-- Gonzo <[email protected]> Mon, 17 Nov 2025 21:52:19 +0200
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
varnish-compute for Debian
2+
-------------------------
3+
4+
<this file describes information about the source package, see Debian policy
5+
manual section 4.14. You WILL either need to modify or delete this file>
6+
7+
8+
9+
-- Gonzo <[email protected]> Mon, 17 Nov 2025 21:52:19 +0200
10+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
varnish-lambda (1.0-1) UNRELEASED; urgency=medium
2+
3+
* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
4+
5+
-- Gonzo <gonzo@unknown> Wed, 05 Oct 2022 21:52:19 +0200
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Source: varnish-lambda
2+
Priority: optional
3+
Maintainer: Gonzo <[email protected]>
4+
Build-Depends: debhelper-compat (= 12)
5+
Standards-Version: 4.6.0
6+
Section: libs
7+
Homepage: docs.varnish-software.com
8+
#Vcs-Browser: https://salsa.debian.org/debian/varnish-lambda
9+
#Vcs-Git: https://salsa.debian.org/debian/varnish-lambda.git
10+
Rules-Requires-Root: no
11+
12+
#Package: varnish-lambda-dev
13+
#Section: libdevel
14+
#Architecture: any
15+
#Multi-Arch: same
16+
#Depends: varnish-lambda0 (= ${binary:Version}), ${misc:Depends}
17+
#Description: Lambda VMOD for Varnish Plus
18+
# <insert long description, indented with spaces>
19+
20+
Package: varnish-lambda0
21+
Architecture: amd64
22+
Multi-Arch: same
23+
#Depends: ${shlibs:Depends}, ${misc:Depends}
24+
Description: Lambda VMOD for Varnish Plus
25+
<insert long description, indented with spaces>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: varnish-lambda
3+
Upstream-Contact: Alf-Andre Walla, [email protected]
4+
Source: <url://example.com>
5+
6+
Files: *
7+
Copyright: 2025 Varnish Software AS
8+
License: <special license>
9+
<Put the license of the package here indented by 1 space>
10+
<This follows the format of Description: lines in control file>
11+
.
12+
<Including paragraphs>
13+
14+
# If you want to use GPL v2 or later for the /debian/* files use
15+
# the following clauses, or change it to suit. Delete these two lines
16+
Files: debian/*
17+
Copyright: 2025 Gonzo <[email protected]>
18+
License: GPL-2+
19+
This package is free software; you can redistribute it and/or modify
20+
it under the terms of the GNU General Public License as published by
21+
the Free Software Foundation; either version 2 of the License, or
22+
(at your option) any later version.
23+
.
24+
This package is distributed in the hope that it will be useful,
25+
but WITHOUT ANY WARRANTY; without even the implied warranty of
26+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27+
GNU General Public License for more details.
28+
.
29+
You should have received a copy of the GNU General Public License
30+
along with this program. If not, see <https://www.gnu.org/licenses/>
31+
.
32+
On Debian systems, the complete text of the GNU General
33+
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
34+
35+
# Please also look if there are files or directories which have a
36+
# different copyright/license attached and list them here.
37+
# Please avoid picking licenses with terms that are more restrictive than the
38+
# packaged work, as it may make Debian's contributions unacceptable upstream.
39+
#
40+
# If you need, there are some extra license texts available in two places:
41+
# /usr/share/debhelper/dh_make/licenses/
42+
# /usr/share/common-licenses/
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
varnish-lambda0_1.0-1_amd64.deb libs optional
2+
varnish-lambda_1.0-1_amd64.buildinfo libs optional

0 commit comments

Comments
 (0)