-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
205 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From f48a0b85a97e90761e1aaf5123533b950e2d4ac6 Mon Sep 17 00:00:00 2001 | ||
From: Matthew Nelson <[email protected]> | ||
Date: Sat, 30 Sep 2023 15:00:34 -0400 | ||
Subject: [PATCH 01/10] Add user/group ids to docker build | ||
Subject: [PATCH 01/11] Add user/group ids to docker build | ||
|
||
--- | ||
Makefile | 17 ++++++++++------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 51801b11c49b000db19291a5a798394be4288af2 Mon Sep 17 00:00:00 2001 | ||
From: Matthew Nelson <[email protected]> | ||
Date: Sat, 30 Sep 2023 15:01:03 -0400 | ||
Subject: [PATCH 02/10] Disable double-quoted strings | ||
Subject: [PATCH 02/11] Disable double-quoted strings | ||
|
||
--- | ||
Makefile | 1 + | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 6bca68bba88e182cac3fe0318d11c0dceee260b0 Mon Sep 17 00:00:00 2001 | ||
From: Matthew Nelson <[email protected]> | ||
Date: Sat, 30 Sep 2023 15:01:51 -0400 | ||
Subject: [PATCH 03/10] Remove JDBC extensions | ||
Subject: [PATCH 03/11] Remove JDBC extensions | ||
|
||
--- | ||
Makefile | 12 +----------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From fc518c327bc5732707f58934d455980c9428d9b3 Mon Sep 17 00:00:00 2001 | ||
From: Matthew Nelson <[email protected]> | ||
Date: Sat, 30 Sep 2023 15:02:15 -0400 | ||
Subject: [PATCH 04/10] Delete native libs | ||
Subject: [PATCH 04/11] Delete native libs | ||
|
||
--- | ||
.../native/FreeBSD/aarch64/libsqlitejdbc.so | Bin 1142104 -> 0 bytes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 7a96e0c2c8dd64fb3a6abf10291eccc7bce2e65e Mon Sep 17 00:00:00 2001 | ||
From: Matthew Nelson <[email protected]> | ||
Date: Sat, 30 Sep 2023 15:02:35 -0400 | ||
Subject: [PATCH 05/10] Add Linux-Musl definitions | ||
Subject: [PATCH 05/11] Add Linux-Musl definitions | ||
|
||
--- | ||
Makefile.common | 23 ++++++++++++++++++++++- | ||
|
2 changes: 1 addition & 1 deletion
2
external/patches/0006-Disable-win-arm-freebsd-targets-for-make-native-all.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From df46ca3834d4a7961c4274c349b838fc5553008b Mon Sep 17 00:00:00 2001 | ||
From: Matthew Nelson <[email protected]> | ||
Date: Sat, 30 Sep 2023 15:03:00 -0400 | ||
Subject: [PATCH 06/10] Disable win-arm/freebsd targets for make:native-all | ||
Subject: [PATCH 06/11] Disable win-arm/freebsd targets for make:native-all | ||
|
||
--- | ||
Makefile | 2 +- | ||
|
2 changes: 1 addition & 1 deletion
2
external/patches/0007-Disable-mac-shared-lib-adhoc-signing.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 1ee4edae69387e544c7e5d8d6c04412635681307 Mon Sep 17 00:00:00 2001 | ||
From: Matthew Nelson <[email protected]> | ||
Date: Sat, 30 Sep 2023 15:03:20 -0400 | ||
Subject: [PATCH 07/10] Disable mac shared lib adhoc signing | ||
Subject: [PATCH 07/11] Disable mac shared lib adhoc signing | ||
|
||
--- | ||
Makefile | 2 +- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 7512d0bac400405b345149c111e5b7564f890694 Mon Sep 17 00:00:00 2001 | ||
From: Matthew Nelson <[email protected]> | ||
Date: Sat, 30 Sep 2023 15:03:40 -0400 | ||
Subject: [PATCH 08/10] Pin dockcross image versions | ||
Subject: [PATCH 08/11] Pin dockcross image versions | ||
|
||
--- | ||
docker/dockcross-android-arm | 2 +- | ||
|
2 changes: 1 addition & 1 deletion
2
external/patches/0009-Use-Ubuntu-16.04-to-build-linux32-64.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From d345ab34a140e2723c17348fcb98cae2be7684da Mon Sep 17 00:00:00 2001 | ||
From: Matthew Nelson <[email protected]> | ||
Date: Sat, 30 Sep 2023 15:04:06 -0400 | ||
Subject: [PATCH 09/10] Use Ubuntu 16.04 to build linux32/64 | ||
Subject: [PATCH 09/11] Use Ubuntu 16.04 to build linux32/64 | ||
|
||
--- | ||
Makefile | 4 ++-- | ||
|
2 changes: 1 addition & 1 deletion
2
external/patches/0010-Configure-build-to-use-SQLite3MultipleCiphers.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From e52914bf7a4c45c891cd67737a418a727ff712c2 Mon Sep 17 00:00:00 2001 | ||
From: Matthew Nelson <[email protected]> | ||
Date: Sat, 30 Sep 2023 15:05:38 -0400 | ||
Subject: [PATCH 10/10] Configure build to use SQLite3MultipleCiphers | ||
Subject: [PATCH 10/11] Configure build to use SQLite3MultipleCiphers | ||
|
||
--- | ||
Makefile | 21 +++++++++-------- | ||
|
79 changes: 79 additions & 0 deletions
79
external/patches/0011-Replace-getentropy-with-SecRandomCopyBytes.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
From fe1b0ba82601a96d8df1bf32594446894e59d6a6 Mon Sep 17 00:00:00 2001 | ||
From: Matthew Nelson <[email protected]> | ||
Date: Sun, 1 Oct 2023 21:37:22 -0400 | ||
Subject: [PATCH 11/11] Replace getentropy with SecRandomCopyBytes | ||
|
||
--- | ||
Makefile | 1 + | ||
Makefile.common | 6 +++--- | ||
sec_random_copy_bytes.sh | 22 ++++++++++++++++++++++ | ||
3 files changed, 26 insertions(+), 3 deletions(-) | ||
create mode 100755 sec_random_copy_bytes.sh | ||
|
||
diff --git a/Makefile b/Makefile | ||
index 8be8f89..23b00d5 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -39,6 +39,7 @@ $(SQLITE_UNPACKED): $(SQLITE_ARCHIVE) | ||
unzip -qo $< -d $(TARGET)/tmp.$(version) | ||
(mv $(TARGET)/tmp.$(version)/$(SQLITE_AMAL_PREFIX) $(TARGET) && rmdir $(TARGET)/tmp.$(version)) || mv $(TARGET)/tmp.$(version)/ $(TARGET)/$(SQLITE_AMAL_PREFIX) | ||
touch $@ | ||
+ $(shell ./sec_random_copy_bytes.sh) | ||
|
||
|
||
$(TARGET)/common-lib/org/sqlite/%.class: src/main/java/org/sqlite/%.java | ||
diff --git a/Makefile.common b/Makefile.common | ||
index e992cb2..9f692d2 100644 | ||
--- a/Makefile.common | ||
+++ b/Makefile.common | ||
@@ -220,8 +220,8 @@ MAC_SDK := /Developer/SDKs/MacOSX10.10.sdk | ||
ifeq ($(wildcard MAC_SDK),) | ||
MAC_SDK := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk | ||
endif | ||
-Mac-x86_64_CCFLAGS := -I$(MAC_SDK)/System/Library/Frameworks/JavaVM.framework/Headers -Ilib/inc_mac -Os -fPIC -mmacosx-version-min=10.6 -fvisibility=hidden -Wno-implicit-function-declaration -msse4.2 -maes | ||
-Mac-x86_64_LINKFLAGS := -dynamiclib | ||
+Mac-x86_64_CCFLAGS := -I$(MAC_SDK)/System/Library/Frameworks/JavaVM.framework/Headers -Ilib/inc_mac -Os -fPIC -mmacosx-version-min=10.7 -fvisibility=hidden -Wno-implicit-function-declaration -msse4.2 -maes | ||
+Mac-x86_64_LINKFLAGS := -dynamiclib -framework Security | ||
Mac-x86_64_LIBNAME := libsqlitejdbc.dylib | ||
Mac-x86_64_SQLITE_FLAGS := | ||
|
||
@@ -231,7 +231,7 @@ Mac-aarch64_CC := $(CROSS_PREFIX)clang | ||
Mac-aarch64_STRIP := $(CROSS_PREFIX)strip -x | ||
MAC_SDK := /usr/osxcross/SDK/MacOSX11.3.sdk | ||
Mac-aarch64_CCFLAGS := -I$(MAC_SDK)/System/Library/Frameworks/JavaVM.framework/Headers -Ilib/inc_mac -Os -fPIC -mmacosx-version-min=10.9 -fvisibility=hidden -Wno-implicit-function-declaration | ||
-Mac-aarch64_LINKFLAGS := -dynamiclib | ||
+Mac-aarch64_LINKFLAGS := -dynamiclib -framework Security | ||
Mac-aarch64_LIBNAME := libsqlitejdbc.dylib | ||
Mac-aarch64_SQLITE_FLAGS := | ||
|
||
diff --git a/sec_random_copy_bytes.sh b/sec_random_copy_bytes.sh | ||
new file mode 100755 | ||
index 0000000..3da9bd6 | ||
--- /dev/null | ||
+++ b/sec_random_copy_bytes.sh | ||
@@ -0,0 +1,22 @@ | ||
+#!/usr/bin/env bash | ||
+ | ||
+# Replaces the implementation of | ||
+# | ||
+# static size_t entropy(void* buf, size_t n) | ||
+# | ||
+# for Darwin with usage of SecRandomCopyBytes | ||
+# | ||
+# See https://github.com/utelle/SQLite3MultipleCiphers/issues/118 | ||
+# See https://github.com/toxicity-io/sqlite-mc/issues/39 | ||
+ | ||
+readonly DIR_SCRIPT=$( cd "$( dirname "$0" )" >/dev/null && pwd ) | ||
+ | ||
+DIR_AMAL= | ||
+for DIR_AMAL in "$DIR_SCRIPT/target/sqlite-amalgamation-"*; do | ||
+ break | ||
+done | ||
+ | ||
+sed -iv 's|#if defined(__APPLE__) && defined(__MAC_10_12) && !defined(__IPHONE_OS_VERSION_MIN_REQUIRED)|#if defined(__APPLE__)|' "$DIR_AMAL/sqlite3mc_amalgamation.c" | ||
+sed -iv 's|#include <sys/random.h>|#include <Security/SecRandom.h>|' "$DIR_AMAL/sqlite3mc_amalgamation.c" | ||
+sed -iv 's|#if defined(__APPLE__) && defined(__MAC_10_12) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_12|#if defined(__APPLE__)|' "$DIR_AMAL/sqlite3mc_amalgamation.c" | ||
+sed -iv 's| if (getentropy(buf, n) == 0)| if (SecRandomCopyBytes(kSecRandomDefault, n, (uint8_t*) buf) == 0)|' "$DIR_AMAL/sqlite3mc_amalgamation.c" | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+96 Bytes
(100%)
...ry/android-unit-test/src/main/resources/org/sqlite/native/Mac/aarch64/libsqlitejdbc.dylib
Binary file not shown.
Binary file modified
BIN
+140 Bytes
(100%)
...ary/android-unit-test/src/main/resources/org/sqlite/native/Mac/x86_64/libsqlitejdbc.dylib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
library/android-unit-test/src/main/resources/org/sqlite/native/Windows/x86/sqlitejdbc.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
library/android-unit-test/src/main/resources/org/sqlite/native/Windows/x86_64/sqlitejdbc.dll
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.