summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--0001-arch-dynamically-link-libpsl.patch21
-rw-r--r--0002-pkgconfig-builtin-glib-int-conversion.patch160
-rw-r--r--PKGBUILD47
4 files changed, 231 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f4ce3a737e86..43ed20a50c3e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,28 @@
pkgbase = envoyproxy
pkgdesc = A high performance, open source, general RPC framework that puts mobile and HTTP/2 first.
- pkgver = 1.14.4
+ pkgver = 1.30.1
pkgrel = 1
url = https://envoyproxy.io
arch = i686
arch = x86_64
license = Apache2
- makedepends = bazel
makedepends = cmake
+ makedepends = clang
makedepends = git
+ makedepends = libc++
+ makedepends = lld
makedepends = go
makedepends = java-environment-openjdk
makedepends = ninja
+ makedepends = llvm
makedepends = perl
makedepends = python
- source = https://github.com/envoyproxy/envoy/archive/v1.14.4.tar.gz
- sha512sums = ddec1df1ed09fee3c9299c6d7b8cfb34fb415e9a79b60005761d5a1672fa8ee679d46364ae8de82814c9bda3d76c3b5037f41a413aff051f7198fc8cee8dd977
+ makedepends = libxcrypt-compat
+ source = https://github.com/envoyproxy/envoy/archive/v1.30.1.tar.gz
+ source = 0001-arch-dynamically-link-libpsl.patch
+ source = 0002-pkgconfig-builtin-glib-int-conversion.patch
+ sha512sums = a1fec2eecf8da64f2cd11ad8fca825d436fe88b10b61d170d87d07dae56699da5aed7f8246aa43f6fd8f7c9644426f4a3b71578f4bb77bf6dd60229d03eb11c0
+ sha512sums = 2b83157f8e8976e12c5e09c13aafe0da1ce478c448b07a070890a95d77fa9b396314d5886babf81e5c6fbf77338a49b45e2484a01f4ed0bb8868b45e425e7062
+ sha512sums = d90b9cbebc2a5d0d6a47e3f7cb88561d7233e5d7fb1d6a0cbe52a75b403f12f5083cc7c6ef94e8846a75b53fbcc350e7309477a495701c6a3e4fd1c3b49f7a7f
pkgname = envoyproxy
-
diff --git a/0001-arch-dynamically-link-libpsl.patch b/0001-arch-dynamically-link-libpsl.patch
new file mode 100644
index 000000000000..863095a8b9f6
--- /dev/null
+++ b/0001-arch-dynamically-link-libpsl.patch
@@ -0,0 +1,21 @@
+diff -Naur a/.bazelrc b/.bazelrc
+--- a/.bazelrc 2024-04-18 19:43:45.000000000 -0400
++++ b/.bazelrc 2024-05-03 14:38:18.334989983 -0400
+@@ -70,7 +70,7 @@
+ build:linux --fission=dbg,opt
+ build:linux --features=per_object_debug_info
+ build:linux --action_env=BAZEL_LINKLIBS=-l%:libstdc++.a
+-build:linux --action_env=BAZEL_LINKOPTS=-lm
++build:linux --action_env=BAZEL_LINKOPTS=-lm:-lpsl
+
+ # We already have absl in the build, define absl=1 to tell googletest to use absl for backtrace.
+ build --define absl=1
+@@ -199,7 +199,7 @@
+ build:libc++ --action_env=LDFLAGS=-stdlib=libc++
+ build:libc++ --action_env=BAZEL_CXXOPTS=-stdlib=libc++
+ build:libc++ --action_env=BAZEL_LINKLIBS=-l%:libc++.a:-l%:libc++abi.a
+-build:libc++ --action_env=BAZEL_LINKOPTS=-lm:-pthread
++build:libc++ --action_env=BAZEL_LINKOPTS=-lm:-pthread:-lpsl
+ build:libc++ --define force_libcpp=enabled
+ build:clang-libc++ --config=libc++
+
diff --git a/0002-pkgconfig-builtin-glib-int-conversion.patch b/0002-pkgconfig-builtin-glib-int-conversion.patch
new file mode 100644
index 000000000000..4a3fbf65bb09
--- /dev/null
+++ b/0002-pkgconfig-builtin-glib-int-conversion.patch
@@ -0,0 +1,160 @@
+diff -Naur a/bazel/foreign_cc/pkgconfig-builtin-glib-int-conversion.patch b/bazel/foreign_cc/pkgconfig-builtin-glib-int-conversion.patch
+--- a/bazel/foreign_cc/pkgconfig-builtin-glib-int-conversion.patch 1970-01-01 00:00:00.000000000 +0000
++++ b/bazel/foreign_cc/pkgconfig-builtin-glib-int-conversion.patch 2024-05-03 18:19:07.490119872 +0000
+@@ -0,0 +1,140 @@
++diff -Naur a/toolchains/built_toolchains.bzl b/toolchains/built_toolchains.bzl
++--- a/toolchains/built_toolchains.bzl 2023-10-25 21:46:56.000000000 +0000
+++++ b/toolchains/built_toolchains.bzl 2024-05-03 18:09:51.799114777 +0000
++@@ -275,6 +275,9 @@
++
++ # This patch is required as rules_foreign_cc runs in MSYS2 on Windows and MSYS2's "mkdir" is used
++ Label("//toolchains:pkgconfig-makefile-vc.patch"),
+++
+++ # This patch fixes explicit integer conversion which causes errors in clang >= 15 and gcc >= 14
+++ Label("//toolchains:pkgconfig-builtin-glib-int-conversion.patch")
++ ],
++ urls = [
++ "https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz",
++diff -Naur a/toolchains/pkgconfig-builtin-glib-int-conversion.patch b/toolchains/pkgconfig-builtin-glib-int-conversion.patch
++--- a/toolchains/pkgconfig-builtin-glib-int-conversion.patch 1970-01-01 00:00:00.000000000 +0000
+++++ b/toolchains/pkgconfig-builtin-glib-int-conversion.patch 2024-05-03 18:18:26.705978705 +0000
++@@ -0,0 +1,123 @@
+++diff -Naur glib/glib/gatomic.c glib/glib/gatomic.c
+++--- glib/glib/gatomic.c 2016-04-11 21:39:26.000000000 +0000
++++++ glib/glib/gatomic.c 2024-05-03 18:15:37.295886468 +0000
+++@@ -385,7 +385,7 @@
+++ *
+++ * Since: 2.30
+++ **/
+++-gssize
++++gintptr
+++ (g_atomic_pointer_add) (volatile void *atomic,
+++ gssize val)
+++ {
+++@@ -409,11 +409,11 @@
+++ *
+++ * Since: 2.30
+++ **/
+++-gsize
++++guintptr
+++ (g_atomic_pointer_and) (volatile void *atomic,
+++ gsize val)
+++ {
+++- return g_atomic_pointer_and ((volatile gpointer *) atomic, val);
++++ return g_atomic_pointer_and ((gpointer *) atomic, val);
+++ }
+++
+++ /**
+++@@ -433,11 +433,11 @@
+++ *
+++ * Since: 2.30
+++ **/
+++-gsize
++++guintptr
+++ (g_atomic_pointer_or) (volatile void *atomic,
+++ gsize val)
+++ {
+++- return g_atomic_pointer_or ((volatile gpointer *) atomic, val);
++++ return g_atomic_pointer_or ((gpointer *) atomic, val);
+++ }
+++
+++ /**
+++@@ -457,11 +457,11 @@
+++ *
+++ * Since: 2.30
+++ **/
+++-gsize
++++guintptr
+++ (g_atomic_pointer_xor) (volatile void *atomic,
+++ gsize val)
+++ {
+++- return g_atomic_pointer_xor ((volatile gpointer *) atomic, val);
++++ return g_atomic_pointer_xor ((gpointer *) atomic, val);
+++ }
+++
+++ #elif defined (G_PLATFORM_WIN32)
+++diff -Naur glib/glib/gatomic.h glib/glib/gatomic.h
+++--- glib/glib/gatomic.h 2016-04-11 21:39:26.000000000 +0000
++++++ glib/glib/gatomic.h 2024-05-03 18:15:37.295886468 +0000
+++@@ -66,16 +66,16 @@
+++ gpointer oldval,
+++ gpointer newval);
+++ GLIB_AVAILABLE_IN_ALL
+++-gssize g_atomic_pointer_add (volatile void *atomic,
++++gintptr g_atomic_pointer_add (volatile void *atomic,
+++ gssize val);
+++ GLIB_AVAILABLE_IN_2_30
+++-gsize g_atomic_pointer_and (volatile void *atomic,
++++guintptr g_atomic_pointer_and (volatile void *atomic,
+++ gsize val);
+++ GLIB_AVAILABLE_IN_2_30
+++-gsize g_atomic_pointer_or (volatile void *atomic,
++++guintptr g_atomic_pointer_or (volatile void *atomic,
+++ gsize val);
+++ GLIB_AVAILABLE_IN_ALL
+++-gsize g_atomic_pointer_xor (volatile void *atomic,
++++guintptr g_atomic_pointer_xor (volatile void *atomic,
+++ gsize val);
+++
+++ GLIB_DEPRECATED_IN_2_30_FOR(g_atomic_add)
+++@@ -167,28 +167,34 @@
+++ G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \
+++ (void) (0 ? (gpointer) *(atomic) : 0); \
+++ (void) (0 ? (val) ^ (val) : 0); \
+++- (gssize) __sync_fetch_and_add ((atomic), (val)); \
++++ (guintptr) __atomic_fetch_add ((atomic), (val), __ATOMIC_SEQ_CST); \
+++ }))
+++ #define g_atomic_pointer_and(atomic, val) \
+++ (G_GNUC_EXTENSION ({ \
++++ guintptr *gapa_atomic = (guintptr *) atomic; \
+++ G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \
+++- (void) (0 ? (gpointer) *(atomic) : 0); \
+++- (void) (0 ? (val) ^ (val) : 0); \
+++- (gsize) __sync_fetch_and_and ((atomic), (val)); \
++++ G_STATIC_ASSERT (sizeof *(atomic) == sizeof (guintptr)); \
++++ (void) (0 ? (gpointer) *(atomic) : NULL); \
++++ (void) (0 ? (val) ^ (val) : 1); \
++++ (guintptr) __atomic_fetch_and (gapa_atomic, (val), __ATOMIC_SEQ_CST); \
+++ }))
+++ #define g_atomic_pointer_or(atomic, val) \
+++ (G_GNUC_EXTENSION ({ \
++++ guintptr *gapa_atomic = (guintptr *) atomic; \
+++ G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \
+++- (void) (0 ? (gpointer) *(atomic) : 0); \
+++- (void) (0 ? (val) ^ (val) : 0); \
+++- (gsize) __sync_fetch_and_or ((atomic), (val)); \
++++ G_STATIC_ASSERT (sizeof *(atomic) == sizeof (guintptr)); \
++++ (void) (0 ? (gpointer) *(atomic) : NULL); \
++++ (void) (0 ? (val) ^ (val) : 1); \
++++ (guintptr) __atomic_fetch_or (gapa_atomic, (val), __ATOMIC_SEQ_CST); \
+++ }))
+++ #define g_atomic_pointer_xor(atomic, val) \
+++ (G_GNUC_EXTENSION ({ \
++++ guintptr *gapa_atomic = (guintptr *) atomic; \
+++ G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \
+++- (void) (0 ? (gpointer) *(atomic) : 0); \
+++- (void) (0 ? (val) ^ (val) : 0); \
+++- (gsize) __sync_fetch_and_xor ((atomic), (val)); \
++++ G_STATIC_ASSERT (sizeof *(atomic) == sizeof (guintptr)); \
++++ (void) (0 ? (gpointer) *(atomic) : NULL); \
++++ (void) (0 ? (val) ^ (val) : 1); \
++++ (guintptr) __atomic_fetch_xor (gapa_atomic, (val), __ATOMIC_SEQ_CST); \
+++ }))
+++
+++ #else /* defined(G_ATOMIC_LOCK_FREE) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) */
+diff -Naur a/bazel/repositories.bzl b/bazel/repositories.bzl
+--- a/bazel/repositories.bzl 2024-04-18 23:43:45.000000000 +0000
++++ b/bazel/repositories.bzl 2024-05-03 18:11:00.983659410 +0000
+@@ -1464,7 +1464,11 @@
+ external_http_archive("rules_ruby")
+
+ def _foreign_cc_dependencies():
+- external_http_archive("rules_foreign_cc")
++ external_http_archive(
++ name = "rules_foreign_cc",
++ patch_args = ["-p1"],
++ patches = ["@envoy//bazel/foreign_cc:pkgconfig-builtin-glib-int-conversion.patch"],
++ )
+
+ def _com_github_maxmind_libmaxminddb():
+ external_http_archive(
diff --git a/PKGBUILD b/PKGBUILD
index 6144ec4d6486..9b5cccc74ac9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,41 +1,70 @@
+# vim: set sts=2 sw=2 et:
# Maintainer: blacktea <blackteahamburger@outlook.com>
# Contributor: kXuan <kxuanobj@gmail.com>
+# Contributor: Dan Fuhry <dan@fuhry.com>
pkgname=envoyproxy
-pkgver=1.14.4
+pkgver=1.30.1
pkgrel=1
pkgdesc="A high performance, open source, general RPC framework that puts mobile and HTTP/2 first."
arch=('i686' 'x86_64')
url='https://envoyproxy.io'
license=('Apache2')
makedepends=(
- 'bazel'
'cmake'
+ 'clang'
'git'
+ 'libc++'
+ 'lld'
'go'
'java-environment-openjdk'
'ninja'
+ 'llvm'
'perl'
'python'
+ 'libxcrypt-compat'
)
source=(
"https://github.com/$pkgname/envoy/archive/v$pkgver.tar.gz"
+ 0001-arch-dynamically-link-libpsl.patch
+ 0002-pkgconfig-builtin-glib-int-conversion.patch
)
-sha512sums=('ddec1df1ed09fee3c9299c6d7b8cfb34fb415e9a79b60005761d5a1672fa8ee679d46364ae8de82814c9bda3d76c3b5037f41a413aff051f7198fc8cee8dd977'
-)
+sha512sums=('a1fec2eecf8da64f2cd11ad8fca825d436fe88b10b61d170d87d07dae56699da5aed7f8246aa43f6fd8f7c9644426f4a3b71578f4bb77bf6dd60229d03eb11c0'
+ '2b83157f8e8976e12c5e09c13aafe0da1ce478c448b07a070890a95d77fa9b396314d5886babf81e5c6fbf77338a49b45e2484a01f4ed0bb8868b45e425e7062'
+ 'd90b9cbebc2a5d0d6a47e3f7cb88561d7233e5d7fb1d6a0cbe52a75b403f12f5083cc7c6ef94e8846a75b53fbcc350e7309477a495701c6a3e4fd1c3b49f7a7f')
prepare() {
cd "envoy-$pkgver"
- go get github.com/bazelbuild/buildtools/buildifier
- bazel --version | cut -d\ -f2 > .bazelversion
- # The commit id of $pkgver
- echo "923c4111bb48405ac96ef050c4f59ebbad3d7761" > SOURCE_VERSION
+
+ for f in ${source[@]}; do
+ # test that "$f" ends in ".patch"
+ if [ "${f%.patch}" != "$f" ]; then
+ msg "Applying patch: $f"
+ patch -Np1 -i "../$f"
+ fi
+ done
+
+ export GOPATH="$srcdir"/go
+
+ msg "Building bazelisk"
+ go install github.com/bazelbuild/bazelisk@latest
+ export BAZELISK="$GOPATH/bin/bazelisk"
+
+ msg "Setting SOURCE_VERSION"
+ # https://github.com/envoyproxy/envoy/blob/main/bazel/get_workspace_status
+ echo "65a0228c93d2b7ca20c2ec56940735e5b6d76a38" > SOURCE_VERSION
+
+ msg "Setting build environment for Clang"
+ ./bazel/setup_clang.sh
}
build() {
cd "envoy-$pkgver"
- bazel build --verbose_failures --workspace_status_command bazel/get_workspace_status -c opt //source/exe:envoy-static
+ $BAZELISK build \
+ --workspace_status_command bazel/get_workspace_status \
+ --config=libc++ --verbose_failures -c opt \
+ //source/exe:envoy-static
}
package() {