diff --git a/edgedbpkg/python/patches/python-edgedb__arm64-313.patch b/edgedbpkg/python/patches/python-edgedb__arm64-313.patch new file mode 100644 index 0000000..66416ca --- /dev/null +++ b/edgedbpkg/python/patches/python-edgedb__arm64-313.patch @@ -0,0 +1,45 @@ +From 18a6eea199beef0031dc8a1208e3228fd0abcc9c Mon Sep 17 00:00:00 2001 +From: Elvis Pranskevichus +Date: Wed, 21 Apr 2021 14:59:44 -0700 +Subject: [PATCH 3/4] Add ability to do pure arm64 builds + +--- + configure | 5 +++++ + configure.ac | 5 +++++ + 2 files changed, 10 insertions(+) + +diff --git a/configure b/configure +index 55c3c570e3e..19b39b80a94 100755 +--- a/configure ++++ b/configure +@@ -10232,6 +10232,11 @@ printf "%s\n" "$CC" >&6; } + LIPO_INTEL64_FLAGS="-extract x86_64" + ARCH_RUN_32BIT="true" + ;; ++ arm-64) ++ UNIVERSAL_ARCH_FLAGS="-arch arm64" ++ LIPO_32BIT_FLAGS="" ++ ARCH_RUN_32BIT="true" ++ ;; + intel) + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" + LIPO_32BIT_FLAGS="-extract i386" +diff --git a/configure.ac b/configure.ac +index 1ba455006ea..ddd0b80c991 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2672,6 +2672,11 @@ yes) + LIPO_INTEL64_FLAGS="-extract x86_64" + ARCH_RUN_32BIT="true" + ;; ++ arm-64) ++ UNIVERSAL_ARCH_FLAGS="-arch arm64" ++ LIPO_32BIT_FLAGS="" ++ ARCH_RUN_32BIT="true" ++ ;; + intel) + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" + LIPO_32BIT_FLAGS="-extract i386" +-- +2.45.2 + diff --git a/edgedbpkg/python/patches/python-edgedb__cgi-shebang.patch b/edgedbpkg/python/patches/python-edgedb__cgi-shebang-310.patch similarity index 100% rename from edgedbpkg/python/patches/python-edgedb__cgi-shebang.patch rename to edgedbpkg/python/patches/python-edgedb__cgi-shebang-310.patch diff --git a/edgedbpkg/python/patches/python-edgedb__cgi-shebang-311.patch b/edgedbpkg/python/patches/python-edgedb__cgi-shebang-311.patch new file mode 100644 index 0000000..d483b23 --- /dev/null +++ b/edgedbpkg/python/patches/python-edgedb__cgi-shebang-311.patch @@ -0,0 +1,22 @@ +From 9bcdacb2d31d0d5c39ab12123ee3b028d4087728 Mon Sep 17 00:00:00 2001 +From: Elvis Pranskevichus +Date: Tue, 31 Jul 2018 11:54:15 -0400 +Subject: [PATCH 1/2] Fix cgi.py shebang + +--- + Lib/cgi.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Lib/cgi.py b/Lib/cgi.py +index 1e880e5184..f18affca07 100755 +--- a/Lib/cgi.py ++++ b/Lib/cgi.py +@@ -1,4 +1,4 @@ +-#! /usr/local/bin/python ++#! /usr/bin/env python3 + + # NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is + # intentionally NOT "/usr/bin/env python". On many systems +-- +2.26.2 + diff --git a/edgedbpkg/python/patches/python-edgedb__cgi-shebang-312.patch b/edgedbpkg/python/patches/python-edgedb__cgi-shebang-312.patch new file mode 100644 index 0000000..d483b23 --- /dev/null +++ b/edgedbpkg/python/patches/python-edgedb__cgi-shebang-312.patch @@ -0,0 +1,22 @@ +From 9bcdacb2d31d0d5c39ab12123ee3b028d4087728 Mon Sep 17 00:00:00 2001 +From: Elvis Pranskevichus +Date: Tue, 31 Jul 2018 11:54:15 -0400 +Subject: [PATCH 1/2] Fix cgi.py shebang + +--- + Lib/cgi.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Lib/cgi.py b/Lib/cgi.py +index 1e880e5184..f18affca07 100755 +--- a/Lib/cgi.py ++++ b/Lib/cgi.py +@@ -1,4 +1,4 @@ +-#! /usr/local/bin/python ++#! /usr/bin/env python3 + + # NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is + # intentionally NOT "/usr/bin/env python". On many systems +-- +2.26.2 + diff --git a/edgedbpkg/python/patches/python-edgedb__libuuid-313.patch b/edgedbpkg/python/patches/python-edgedb__libuuid-313.patch new file mode 100644 index 0000000..77c4bbf --- /dev/null +++ b/edgedbpkg/python/patches/python-edgedb__libuuid-313.patch @@ -0,0 +1,240 @@ +From 17c97351489a2295e47cc5b838edf8709b4c2de1 Mon Sep 17 00:00:00 2001 +From: Elvis Pranskevichus +Date: Thu, 8 Jun 2023 00:22:04 -0700 +Subject: [PATCH 4/4] Improve detection of libuuid + +--- + configure | 102 +++++++++++++++++++++------------------------------ + configure.ac | 51 ++++++++++++++------------ + 2 files changed, 70 insertions(+), 83 deletions(-) + +diff --git a/configure b/configure +index 19b39b80a94..cfe131d9a75 100755 +--- a/configure ++++ b/configure +@@ -13456,22 +13456,42 @@ fi + echo "$LIBUUID_PKG_ERRORS" >&5 + + +- save_CFLAGS=$CFLAGS ++ have_uuid=missing ++ ++elif test $pkg_failed = untried; then ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++printf "%s\n" "no" >&6; } ++ ++ have_uuid=missing ++ ++else ++ LIBUUID_CFLAGS=$pkg_cv_LIBUUID_CFLAGS ++ LIBUUID_LIBS=$pkg_cv_LIBUUID_LIBS ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++printf "%s\n" "yes" >&6; } ++ ++ possibly_have_uuid=yes ++ ++fi ++ ++fi ++ ++save_CFLAGS=$CFLAGS + save_CPPFLAGS=$CPPFLAGS + save_LDFLAGS=$LDFLAGS + save_LIBS=$LIBS + + +- CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS" +- LDFLAGS="$LDFLAGS $LIBUUID_LIBS" +- for ac_header in uuid/uuid.h ++ CPPFLAGS="$CFLAGS $LIBUUID_CFLAGS" ++ LDFLAGS="$LDFLAGS $LIBUUID_LIBS" ++ for ac_header in uuid/uuid.h + do : + ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default" + if test "x$ac_cv_header_uuid_uuid_h" = xyes + then : + printf "%s\n" "#define HAVE_UUID_UUID_H 1" >>confdefs.h + +- py_check_lib_save_LIBS=$LIBS ++ py_check_lib_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time in -luuid" >&5 + printf %s "checking for uuid_generate_time in -luuid... " >&6; } + if test ${ac_cv_lib_uuid_uuid_generate_time+y} +@@ -13553,51 +13573,23 @@ printf "%s\n" "$ac_cv_lib_uuid_uuid_generate_time_safe" >&6; } + if test "x$ac_cv_lib_uuid_uuid_generate_time_safe" = xyes + then : + have_uuid=yes +- printf "%s\n" "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h + + fi + + LIBS=$py_check_lib_save_LIBS + +-fi +- +-done +- if test "x$have_uuid" = xyes +-then : +- +- LIBUUID_CFLAGS=${LIBUUID_CFLAGS-""} +- LIBUUID_LIBS=${LIBUUID_LIBS-"-luuid"} +- +-fi +- +-CFLAGS=$save_CFLAGS +-CPPFLAGS=$save_CPPFLAGS +-LDFLAGS=$save_LDFLAGS +-LIBS=$save_LIBS +- +- +- +- +-elif test $pkg_failed = untried; then +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-printf "%s\n" "no" >&6; } +- +- save_CFLAGS=$CFLAGS +-save_CPPFLAGS=$CPPFLAGS +-save_LDFLAGS=$LDFLAGS +-save_LIBS=$LIBS + ++else $as_nop + +- CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS" +- LDFLAGS="$LDFLAGS $LIBUUID_LIBS" +- for ac_header in uuid/uuid.h ++ for ac_header in uuid.h + do : +- ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default" +-if test "x$ac_cv_header_uuid_uuid_h" = xyes ++ ac_fn_c_check_header_compile "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default" ++if test "x$ac_cv_header_uuid_h" = xyes + then : +- printf "%s\n" "#define HAVE_UUID_UUID_H 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_UUID_H 1" >>confdefs.h + +- py_check_lib_save_LIBS=$LIBS ++ py_check_lib_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time in -luuid" >&5 + printf %s "checking for uuid_generate_time in -luuid... " >&6; } + if test ${ac_cv_lib_uuid_uuid_generate_time+y} +@@ -13679,20 +13671,26 @@ printf "%s\n" "$ac_cv_lib_uuid_uuid_generate_time_safe" >&6; } + if test "x$ac_cv_lib_uuid_uuid_generate_time_safe" = xyes + then : + have_uuid=yes +- printf "%s\n" "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h + + fi + + LIBS=$py_check_lib_save_LIBS + ++ + fi + + done +- if test "x$have_uuid" = xyes ++ ++fi ++ ++done ++ ++ if test "x$have_uuid" = xyes + then : + +- LIBUUID_CFLAGS=${LIBUUID_CFLAGS-""} +- LIBUUID_LIBS=${LIBUUID_LIBS-"-luuid"} ++ LIBUUID_CFLAGS=${LIBUUID_CFLAGS-""} ++ LIBUUID_LIBS=${LIBUUID_LIBS-""} + + fi + +@@ -13703,22 +13701,6 @@ LIBS=$save_LIBS + + + +- +-else +- LIBUUID_CFLAGS=$pkg_cv_LIBUUID_CFLAGS +- LIBUUID_LIBS=$pkg_cv_LIBUUID_LIBS +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-printf "%s\n" "yes" >&6; } +- have_uuid=yes +- printf "%s\n" "#define HAVE_UUID_H 1" >>confdefs.h +- +- printf "%s\n" "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h +- +- +-fi +- +-fi +- + if test "x$have_uuid" = xmissing + then : + +diff --git a/configure.ac b/configure.ac +index ddd0b80c991..aa699bd9bf0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3736,29 +3736,34 @@ AC_CHECK_HEADERS([uuid.h], + ]) + + AS_VAR_IF([have_uuid], [missing], [ +- PKG_CHECK_MODULES( +- [LIBUUID], [uuid >= 2.20], +- [dnl linux-util's libuuid has uuid_generate_time_safe() since v2.20 (2011) +- dnl and provides . +- have_uuid=yes +- AC_DEFINE([HAVE_UUID_H], [1]) +- AC_DEFINE([HAVE_UUID_GENERATE_TIME_SAFE], [1]) +- ], [ +- WITH_SAVE_ENV([ +- CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS" +- LDFLAGS="$LDFLAGS $LIBUUID_LIBS" +- AC_CHECK_HEADERS([uuid/uuid.h], [ +- PY_CHECK_LIB([uuid], [uuid_generate_time], [have_uuid=yes]) +- PY_CHECK_LIB([uuid], [uuid_generate_time_safe], +- [have_uuid=yes +- AC_DEFINE([HAVE_UUID_GENERATE_TIME_SAFE], [1]) ]) ]) +- AS_VAR_IF([have_uuid], [yes], [ +- LIBUUID_CFLAGS=${LIBUUID_CFLAGS-""} +- LIBUUID_LIBS=${LIBUUID_LIBS-"-luuid"} +- ]) +- ]) +- ] +- ) ++ PKG_CHECK_MODULES([LIBUUID], [uuid >= 2.20], [ ++ possibly_have_uuid=yes ++ ], [ ++ have_uuid=missing ++ ]) ++]) ++ ++WITH_SAVE_ENV([ ++ CPPFLAGS="$CFLAGS $LIBUUID_CFLAGS" ++ LDFLAGS="$LDFLAGS $LIBUUID_LIBS" ++ AC_CHECK_HEADERS([uuid/uuid.h], [ ++ PY_CHECK_LIB([uuid], [uuid_generate_time], [have_uuid=yes]) ++ PY_CHECK_LIB([uuid], [uuid_generate_time_safe], ++ [have_uuid=yes ++ AC_DEFINE([HAVE_UUID_GENERATE_TIME_SAFE], [1]) ]) ++ ], [ ++ AC_CHECK_HEADERS([uuid.h], [ ++ PY_CHECK_LIB([uuid], [uuid_generate_time], [have_uuid=yes]) ++ PY_CHECK_LIB([uuid], [uuid_generate_time_safe], ++ [have_uuid=yes ++ AC_DEFINE([HAVE_UUID_GENERATE_TIME_SAFE], [1]) ]) ++ ]) ++ ]) ++ ++ AS_VAR_IF([have_uuid], [yes], [ ++ LIBUUID_CFLAGS=${LIBUUID_CFLAGS-""} ++ LIBUUID_LIBS=${LIBUUID_LIBS-""} ++ ]) + ]) + + dnl macOS has uuid/uuid.h but uuid_generate_time is in libc +-- +2.45.2 + diff --git a/edgedbpkg/python/patches/python-edgedb__openssl-rpath-313.patch b/edgedbpkg/python/patches/python-edgedb__openssl-rpath-313.patch new file mode 100644 index 0000000..719011d --- /dev/null +++ b/edgedbpkg/python/patches/python-edgedb__openssl-rpath-313.patch @@ -0,0 +1,58 @@ +From 9444005d1f2e54b6dd272624bad1c4282570b43d Mon Sep 17 00:00:00 2001 +From: Elvis Pranskevichus +Date: Tue, 10 Aug 2021 19:51:36 -0700 +Subject: [PATCH 2/4] Stop eagerly checking for OpenSSL rpath directory + existence + +Also, fix linker flag syntax (should be `rpath,`, not `rpath=`) +--- + configure | 10 ++-------- + configure.ac | 10 +++------- + 2 files changed, 5 insertions(+), 15 deletions(-) + +diff --git a/configure b/configure +index 7cdd386c387..55c3c570e3e 100755 +--- a/configure ++++ b/configure +@@ -28214,15 +28214,9 @@ esac + no) : + OPENSSL_RPATH= ;; #( + *) : +- if test -d "$with_openssl_rpath" +-then : +- +- OPENSSL_RPATH="$with_openssl_rpath" +- OPENSSL_LDFLAGS_RPATH="${rpath_arg}$with_openssl_rpath" + +-else $as_nop +- as_fn_error $? "--with-openssl-rpath \"$with_openssl_rpath\" is not a directory" "$LINENO" 5 +-fi ++ OPENSSL_RPATH="$with_openssl_rpath" ++ OPENSSL_LDFLAGS_RPATH="${rpath_arg}$with_openssl_rpath" + + ;; + esac +diff --git a/configure.ac b/configure.ac +index 24e28a1e2de..1ba455006ea 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -7192,13 +7192,9 @@ AS_CASE([$with_openssl_rpath], + done + ], + [no], [OPENSSL_RPATH=], +- [AS_IF( +- [test -d "$with_openssl_rpath"], +- [ +- OPENSSL_RPATH="$with_openssl_rpath" +- OPENSSL_LDFLAGS_RPATH="${rpath_arg}$with_openssl_rpath" +- ], +- AC_MSG_ERROR([--with-openssl-rpath "$with_openssl_rpath" is not a directory])) ++ [ ++ OPENSSL_RPATH="$with_openssl_rpath" ++ OPENSSL_LDFLAGS_RPATH="${rpath_arg}$with_openssl_rpath" + ] + ) + AC_MSG_RESULT([$OPENSSL_RPATH]) +-- +2.45.2 +