Debian Codegraph @

debian/patches/0001-Some-changes-specific-to-Debian-packaging.patch

raw symbols SCIP
1 From: "Shih-Yuan Lee (FourDollars)" <[email protected]>
2 Date: Sat, 18 Dec 2021 21:46:19 +0800
3 Subject: Some changes specific to Debian packaging
4
5 Author: Shih-Yuan Lee (FourDollars) <[email protected]>
6 ---
7 Makefile | 8 ++-
8 changelog | 181 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9 kodev/Makefile | 4 ++
10 3 files changed, 191 insertions(+), 2 deletions(-)
11 create mode 100644 changelog
12
13 diff --git a/Makefile b/Makefile
14 index f7ae72a..7ffa19d 100644
15 --- a/Makefile
16 +++ b/Makefile
17 @@ -31,6 +31,8 @@ S_SRC+= src/tls_$(TLS_BACKEND).c
18 FEATURES=
19 FEATURES_INC=
20
21 +CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) -D_FILE_OFFSET_BITS=64
22 +CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
23 CFLAGS+=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
24 CFLAGS+=-Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual
25 CFLAGS+=-Wsign-compare -Iinclude/kore -I$(OBJDIR) -std=c99 -pedantic
26 @@ -84,6 +86,8 @@ else
27 src/route.c src/validator.c src/websocket.c
28 endif
29
30 +LDFLAGS+=$(shell dpkg-buildflags --get LDFLAGS)
31 +
32 ifneq ("$(PGSQL)", "")
33 S_SRC+=src/pgsql.c
34 LDFLAGS+=-L$(shell pg_config --libdir) -lpq
35 @@ -155,7 +159,7 @@ ifeq ("$(OSNAME)", "darwin")
36 endif
37 S_SRC+=src/bsd.c
38 else ifeq ("$(OSNAME)", "linux")
39 - CFLAGS+=-D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
40 + CFLAGS+=-D_GNU_SOURCE=1
41 LDFLAGS+=-ldl
42 S_SRC+=src/linux.c src/seccomp.c
43 else
44 @@ -180,7 +184,7 @@ $(PYTHON_CURLOPT): $(OBJDIR) force
45 @cp $(PYTHON_CURLOPT) $(OBJDIR)
46
47 $(VERSION): $(OBJDIR) force
48 - @if [ -d .git ]; then \
49 + @if [ -d /dev/null ]; then \
50 GIT_REVISION=`git rev-parse --short=8 HEAD`; \
51 GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`; \
52 rm -f $(VERSION); \
53 diff --git a/changelog b/changelog
54 new file mode 100644
55 index 0000000..593c894
56 --- /dev/null
57 +++ b/changelog
58 @@ -0,0 +1,181 @@
59 +# Kore 4.2.3
60 +
61 +## New features
62 +- Ability to add authenticators to filemaps. [73be741b]
63 +- Python: Add support for CRLs in kore.domain(). [52ff37c5]
64 +
65 +## Bug fixes
66 +- The Kore parent process will use the correct exit code if a worker process calls fatalx(). [e2fcedfa]
67 +- Fix a bug in kore.recvmsg() related to the returned length of the ancdata. [f7a76f7e]
68 +- Several bug fixes for concurrency when using Python 3.10.x [f6c54042], [30c86525], [fd94fba]
69 +
70 +## Other changes
71 +- Removed useless debug messages all across the board. [a2d312d0]
72 +- Added more format attributes where useful. [5e21de3a]
73 +- Added KORE_TMPDIR define (default /tmp) for single binary builds. [2211bb8f]
74 +
75 +# Kore 4.2.2
76 +
77 +## Bug fixes
78 +- Fixed incorrect order in kore.connection.x509dict
79 +
80 +# Kore 4.2.1
81 +
82 +## Bug fixes
83 +- Fixed building single apps with PYTHON=1 flavor set.
84 +- Fixed building Kore with CURL=1 and TLS_BACKEND set to none.
85 +- Fixed TLS client authentication, it incorrectly always returned 403.
86 +
87 +# Kore 4.2.0
88 +
89 +## Docker images
90 +- Kore now provides official Docker images on [docker hub](https://hub.docker.com/r/kore/kore).
91 +
92 +## Changes
93 +- New website!
94 +- Removed OpenSSL 1.0.2 support.
95 +- TLS 1.3 is now the default for tls_version.
96 +- Fixed support for Python 3.10 and higher.
97 +- Kore ships with the ffdhe4096 DH parameters.
98 +- Changed the routing configuration context.
99 +- JSON API error handling functions no longer take a kore_json context as parameter.
100 +- Removed stale out-of-date examples.
101 +- Changed the way the workers log to the parent process.
102 +- Changed kore.domain() and kore.server() for Python API, name is now a keyword, if omitted defaults to "default".
103 +- Added new HTTP APIs for obtaining headers as native C types.
104 +- http_state_create() no longer takes an onfree callback.
105 +- Updated log levels in the ACME process.
106 +- New logfile configuration option, allowing all Kore logs to go to the given file instead of stdout.
107 +- New kodev commands: cflags, ldflags and gen.
108 +- New TLS_BACKEND option to compile without TLS.
109 +- New privsep configuration context.
110 +- New @kore.route("url", methods=[]) decorator in Python API.
111 +- New http_response_json() API function.
112 +- New http_response_close() API function.
113 +- New kore_signal_trap() API function.
114 +- New kore_worker_signal() API hook.
115 +- New kore.connection.x509dict in Python API.
116 +- New koreapp.workerstop, koreapp.workerstart hooks for Python.
117 +- New kore.task_id() for Python, returning current coroutine ID.
118 +- New kore.sigtrap() for Python, trapping a given signal.
119 +- New kore.privsep() for Python, for setting up the new privsep configuration.
120 +- New curlopt keyword for kore.httpclient, allowing setting of specific curl options directly into it.
121 +- New TARGET_PLATFORM environment variable for cross building Linux.
122 +- New on_body, on_headers and on_free route handlers.
123 +- New kore_mem_zero() function.
124 +- New http.protocol() for Python API.
125 +- Removed run_as and root configuration options.
126 +- Removed keymgr_runas and keymgr_root configuration options.
127 +- Removed acme_runas and acme_root configuration options.
128 +- Added ability for parent to send messages via the msg framework to workers.
129 +- Added several new system calls to seccomp whitelist filters.
130 +- Added support for overriding previously set headers with http_response_header().
131 +- Added support for 100 in http_response_* APIs.
132 +- Added new "docker" deployment target for Python.
133 +- Updated the pgsql code to understand PGRES_PIPELINE_SYNC and PGRES_PIPELINE_ABORTED.
134 +- Modified Kore child handling code to wait for processes in its worker process group.
135 +- And much more..
136 +
137 +## Bug fixes
138 +- All kore_pool elements are now always properly aligned on a boundary of 8.
139 +- execve() now takes an environment pointer instead of NULL.
140 +- Fixed a problem in kore.socket.recvfrom() Python API.
141 +- Fixed several wrong log messages while parsing configuration.
142 +- Fixed a bug in the kore_http client related to OPTIONS and DELETE methods.
143 +- Fixed potential uninitialised parameter in accesslog.
144 +- Fixed small bugs in several examples.
145 +- Fix bug in several kore_json_create_*() API functions with regards to variadic arguments.
146 +- Fixed dependencies in the Kore Makefile.
147 +- Fixed how Kore obtains paths to openssl on Mac platforms.
148 +
149 +# Kore 4.1.0
150 +This minor release improves on internal APIs and has some minor bug fixes.
151 +
152 +## New tool: kore-serve
153 +This tool makes it easy to spin up static serving webserver quickly. To build it, run make tools-build and make tools-install.
154 +
155 +## JSON API Improvements
156 +- More strict parsing of JSON objects.
157 +- Allow int64_t and uint64_t as JSON numbers.
158 +Additionally the parser has been tested heavily in a security critical product. This work was sponsored by my employer, Tutus Data.
159 +
160 +## ACME improvements
161 +- Added and enabled POST-as-GET.
162 +- Fixed a bug on LibreSSL where multi-domain setup could fail to renew certificates.
163 +
164 +## Python API improvements
165 +- Adds async socket.recvmsg to the Python API.
166 +
167 +## Other changes
168 +- Enabled TLS 1.3 for LibreSSL 3.2.2
169 +- All Kore hooks prototypes now live inside of kore/hooks.h.
170 +- Renamed "foreground" to "kore_foreground".
171 +- Kore will now install its sources under $PREFIX/share/kore, allowing kodev build to build single binaries out of the box.
172 +- kodev source command added (shows the location of the built-in source code).
173 +- Added missing seccomp_tracing to the example configuration.
174 +- Added kore build scripts under misc.
175 +- Linux: added missing seccomp calls for certain platforms.
176 +- Added kore_default_getopt(), which should be called from kore_parent_configure() in single binary builds if you want to retain the argument parsing.
177 +
178 +# Kore 4.0.1
179 +This patch release fixes an issue with the accept lock and pulls in a few patches from NetBSD and OpenBSD ports to make maintainer life a little bit easier.
180 +
181 +## Important changes
182 +- Pull in NetBSD and OpenBSD ports patches [aaf8be40] [f6af4a27] [3bf589c6]
183 +- Only reset accept_avail if we actually grabbed the accept lock [636469f5]
184 +- Fixed building with multiple make jobs if PYTHON=1 was specified. [85b26533]
185 +
186 +## Small changes
187 +- Added BEERS file.
188 +- Fixed a few typos [d9673857]
189 +- Removed lingering x86 seccomp code (Linux) [58247eec]
190 +
191 +# Kore 4.0.0
192 +After more then a year it is finally here. The kore 4.0.0 release. It has been a long time coming but real life kept me preoccupied for a long time. But here it is. Kore4 is actually real and I couldn't be more excited.
193 +
194 +Quick shoutout to Kore its biggest sponsor, my employer Tutus Data AB.
195 +
196 +## Major new features
197 +- Fully priviledge seperated ACME support with Let's Encrypt or any compatible ACME provider.
198 +- A better way of writing Kore Python applications.
199 +- Full seccomp sandboxing for acme, keymgr and worker processes on Linux.
200 +- Ability to mix TLS and non-TLS servers in a single configuration.
201 +- Many improvements to the Python asynchronous runtime.
202 +- Configuration based redirection.
203 +- A complete builtin and easy to use JSON parser.
204 +- Several bug fixes and speed improvements.
205 +
206 +## Automatic HTTPS
207 +If Kore is built with ACME=1 it will compile in the ACME support.
208 +
209 +See the blog post from a while ago for more details.
210 +
211 +Refer to the documentation on how to enable ACME for your domain via the Kore configuration.
212 +
213 +## Python applications
214 +With this release, you are able to launch your Kore Python applications directly as an argument to the kore binary. You can skip the entire configuration file and setup everything you need directly from inside your Kore Python application instead.
215 +
216 +See the blog post from almost a year ago for more details.
217 +
218 +## Python asynchronous runtime changes
219 +- Runtime now under seccomp on Linux.
220 +- Added coroutine tracing debug options.
221 +- Fixed a memory leak in the kore.socket.sendto() routines.
222 +- Fixed a bug where a kore.lock could cause an incorrect coroutine to be woken up.
223 +
224 +## JSON API
225 +The kore 4 release includes its own simple to use JSON parser. The parser was written to be easy to understand and review.
226 +
227 +See the documentation on how to use this.
228 +
229 +## Other
230 +- DEBUG no longer implies NOOPT.
231 +- Removed the NOTLS compile time option.
232 +- Added more examples and updated several others.
233 +- Added a KODEV_MINIMAL option to build without OpenSSL.
234 +- The "static" and "dynamic" keyword have been replaced with "route".
235 +- Moved the libcurl implementation to level triggered i/o to avoid hacks.
236 +- Added a "pretty" HTTP error option.
237 +- Wrapped the size_t for memory allocated in a meminfo structure for the future.
238 +- Fixed a potential stall when reading results from libpq.
239 +- Python objects that can be serialized can now be sent over to other workers.
240 diff --git a/kodev/Makefile b/kodev/Makefile
241 index 8fb6027..e15f310 100644
242 --- a/kodev/Makefile
243 +++ b/kodev/Makefile
244 @@ -9,11 +9,15 @@ INSTALL_DIR=$(PREFIX)/bin
245
246 S_SRC= ../src/cli.c
247
248 +CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) -D_FILE_OFFSET_BITS=64
249 +CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
250 +
251 CFLAGS+=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
252 CFLAGS+=-Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual
253 CFLAGS+=-Wsign-compare -Iincludes -std=c99 -pedantic
254 CFLAGS+=-DPREFIX='"$(PREFIX)"'
255 LDFLAGS=-lcrypto
256 +LDFLAGS+=$(shell dpkg-buildflags --get LDFLAGS)
257
258 ifneq ("$(NOOPT)", "")
259 CFLAGS+=-O0