Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
d6b3076b
Commit
d6b3076b
authored
Sep 03, 2018
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the vmod->file_id a hash over the .vcc file.
I belive this makes our builds reproducible. Fixes: #2436
parent
61dc72e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
vrt.h
include/vrt.h
+1
-1
vmodtool.py
lib/libvcc/vmodtool.py
+3
-8
No files found.
include/vrt.h
View file @
d6b3076b
...
...
@@ -59,7 +59,7 @@
* VRT_STRANDS_string() removed from vrt.h (never implemented)
* VRT_Healthy() changed prototype
* VRT_Vmod_Init signature changed
*
VRT_Vmod_Fini changed to VRT_Vmod_Unload
* VRT_Vmod_Fini changed to VRT_Vmod_Unload
* 7.0 (2018-03-15)
* lots of stuff moved from cache.h to cache_varnishd.h
* (ie: from "$Abi vrt" to "$Abi strict")
...
...
lib/libvcc/vmodtool.py
View file @
d6b3076b
...
...
@@ -44,6 +44,7 @@ import unittest
import
random
import
copy
import
json
import
hashlib
AMBOILERPLATE
=
'''
# Boilerplate generated by vmodtool.py - changes will be overwritten
...
...
@@ -858,6 +859,7 @@ class vcc(object):
def
parse
(
self
):
global
inputline
a
=
"
\n
"
+
open
(
self
.
inputfile
,
"r"
)
.
read
()
self
.
file_id
=
hashlib
.
sha256
(
a
)
.
hexdigest
()
s
=
a
.
split
(
"
\n
$"
)
self
.
copyright
=
s
.
pop
(
0
)
.
strip
()
while
s
:
...
...
@@ -983,14 +985,7 @@ class vcc(object):
fo
.
write
(
'
\t
.proto =
\t
Vmod_Proto,
\n
'
)
fo
.
write
(
'
\t
.json =
\t\t
Vmod_Json,
\n
'
)
fo
.
write
(
'
\t
.abi =
\t\t
VMOD_ABI_Version,
\n
'
)
# NB: Sort of hackish:
# Fill file_id with random stuff, so we can tell if
# VCC and VRT_Vmod_Init() dlopens the same file
#
fo
.
write
(
"
\t
.file_id =
\t\"
"
)
for
i
in
range
(
32
):
fo
.
write
(
"
%
c"
%
random
.
randint
(
0x40
,
0x5a
))
fo
.
write
(
"
\"
,
\n
"
)
fo
.
write
(
"
\t
.file_id =
\t\"
%
s
\"
,
\n
"
%
self
.
file_id
)
fo
.
write
(
"};
\n
"
)
def
cfile
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment