It occurred to me after we landed the switch to buster that the old
testing would've been closer to bullseye. I suspect that now that
bullseye has released testing has moved ahead of that and that is what
broke things. Anyway lets use bullseye instead as it is newer and more
up to date.
Change-Id: I2b405c4e3cd6c7d06d79875f540262ebba788336
This is probably what "testing" was the last time we build this
anyway. Current "testing" doesn't work with bindep.
Change-Id: I475f782e6516a5854cb7fc54c07200ef1e20a7fc
We don't need them. We do for building, but the
transitive depend from libcpprest takes care of
it for us. We don't need libboost-system for
runtime at all.
Change-Id: Ife9af152d14da238ef7ce2b72e9ac1d766663da5
We only compile for a single platform, the one inside our container.
Since we do that, we can massively simplify this build.
Change-Id: Ic7d088fd85f2cf88838cb83524aaf1c8b2e858bf
Enable mod_ssl and enable proxying to ssl-terminated endpoints.
In the case where the artifact is not found, return NULL instead
of the bogus "Artifact_not_found" url, otherwise we can end up in
a loop where we continuously append that to the url.
Strip trailing slashes from the returned proxy target. We can't
guarantee that folks won't have a '/' at the end of the artifact
url they return to Zuul (and in fact, it's probably more correct
that they do). But our regex in mod_rewrite guarantees that we
will add a slash to it. One sure way to handle this is just to
strip it from the data returned from Zuul if present.
Add a .dockerignore file with both itself and the Dockerfile
added, so that docker won't rebuild extra layers (like the C++
compile layer) if we just change the Dockerfile.
Change-Id: I00dfd0b6842abedf938702a816698d1c6526974d
So that we can have nice looking names like "Preview Site", find
the artifact by looking up the 'type' field in metadata.
Change-Id: Ia01e95c77f068bd8ab3a515aa023c1f79332fc67
If a rewritemap fails to find a URL, mod_rewrite will nonetheless
continue to attempt to proxy the request; if the request has a
hostname in the URI (as it would if it were being used as a forward
proxy), then it will proxy to that URI. The upshot is that this
was behaving as an open proxy for any URL that it didn't know about.
Correct this by "proxying" to http://localhost/notfound in all cases
where the map program fails, and then cause that URL to always fail
with a 403.
This seems a little Rube Goldberg, but I don't see another way to
deal with map failures in a rewriterule proxy.
Change-Id: I1fdace79b6059c0297dd27b6bc9ce0afa9fe1396
splice inserts an item into one container removing it from another
container. It seems to be what people use for this usecase in STL
LRU implementations.
Change-Id: I038aea2e3aadfce01ca30946c16fea3ce0b17b4f
No code changes, documentation only.
It's unknown what this project is about, so adding a basic example.
I've obtained it only by quickly reverse-engineering main.cc, so please
make sure I've got this correctly(/-ish).
Change-Id: I0976243d363ee6dcb55bd93132b731a65a9734f7
So that we can return the preview URL as the success url, use the
artifact name to look up the forward URL.
Change-Id: I8d67e1527d8f911579779a9a036a3c7f5c79a27f
This adds a job which builds the Dockerfile; it inherits from a
job which uses a buildset registry.
Change-Id: If7789d7bf969b3566dc55343aa1cf0761b96d7b3
Add an apache vhost config file which uses zuul-preview as a
rewritemap.
Remove extraneous output from zuul-preview.
Add an exception handler around the http code.
Remove the mutex (as we are single threaded).
Run apache as the docker CMD.
gets and puts both mutate the underling structures. Put in a mutex
and use a guard to make sure we're not stepping on ourselves.
This almost certainly could be smarter.
c++17 (which our compiler supports) has std::optional<T> that can
be used for thigns that return a value or nothing (like this) Use
that.
add in some consts and pass parameters by const reference.
use std::uint32_t instead of uint. Initialize it with the constructor
initializer list instead of in the body of the constructor, and use
uniform initialization syntax to do so.
Initialize the cache instantiation using uniform initialization.
Use a few more autos so that we don't have to type const as much.
There's a ton of stuff in here that's holdovers from the days of
Drizzle, such as intel c compiler and solaris support, that can
just flat go away. There's also support for being able to turn off
a bunch of various things with m4 parameters that were there to let
us deal with legacy MySQL code. We don't need any of those. We can
also just depend on autoconf archive for more functions and align
with the behavior there rather than carrying local logic.
While we're at it, rename both pandora and zuul prefixed things to
opendev. pandora-build is what we were calling the collection of
autoconf stuff 10 years ago, but is a long-dead project. That said,
none of this is specific to zuul, but might still be useful for
general C++ "I want to build things cleanly and stricly like
Drizzle did". Use opendev for now, with the thought that perhaps
we'll extract these into their own repo to be used by people
should they choose.
Perhaps a better prefix choice would be "DRIZZLE_" - since these
are "build things inspired by Drizzle" - but maybe that implies
a provenance that doesn't exist.
Update copyright for the files that have essentially been rewritten.
For the ones that are still legitimately based on the original code,
add a Red Hat header line.
These can be consumed directly via gnulib and autoconf-archive
packages these days. (yay!) Remove the copies from the tree and
add gnulib and autoconf-archive to bindep.
As part of doing this, switch to using the autoconf-archive version
of debug flag handling, AX_CHECK_ENABLE_DEBUG.
Use AX_CXX_CHECK_LIB from autoconf archive instead of
AC_LIB_HAVE_LINKFLAGS which is from gettext and causes a bunch of
other stuff to need to be copied in.