diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-06-17 08:03:23 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-06-17 08:03:23 +0000 |
| commit | ea2f4386f269c7dafe96753c0cfa00bc5258d97e (patch) | |
| tree | ff243084ecbbb0c121b2d4d8222fd22a51021ff6 /dev-db/sqlcipher | |
| parent | c79d048ee4dec7c44485bab210f42aaeef985b12 (diff) | |
| download | baldeagleos-repo-ea2f4386f269c7dafe96753c0cfa00bc5258d97e.tar.gz baldeagleos-repo-ea2f4386f269c7dafe96753c0cfa00bc5258d97e.tar.xz baldeagleos-repo-ea2f4386f269c7dafe96753c0cfa00bc5258d97e.zip | |
Adding metadata
Diffstat (limited to 'dev-db/sqlcipher')
| -rw-r--r-- | dev-db/sqlcipher/Manifest | 2 | ||||
| -rw-r--r-- | dev-db/sqlcipher/files/patch-autosetup_sqlite-config_tcl | 12 | ||||
| -rw-r--r-- | dev-db/sqlcipher/files/patch-src_crypto_openssl_c | 94 | ||||
| -rw-r--r-- | dev-db/sqlcipher/sqlcipher-4.6.0.ebuild | 69 | ||||
| -rw-r--r-- | dev-db/sqlcipher/sqlcipher-4.9.0.ebuild | 83 |
5 files changed, 190 insertions, 70 deletions
diff --git a/dev-db/sqlcipher/Manifest b/dev-db/sqlcipher/Manifest index 4844d99890fb..02533949e88e 100644 --- a/dev-db/sqlcipher/Manifest +++ b/dev-db/sqlcipher/Manifest @@ -1,2 +1,2 @@ -DIST sqlcipher-4.6.0.tar.gz 19017463 BLAKE2B 6f2e390065baa60ab37490959519c9e71d26ae2405332cdb74c4b41f19897928349c9747505bbfdaa45e122c257986356045f56b3573b48352c45f9637fa027d SHA512 1316b6df0400bc0b67c88b3e7fbf9ca689f248a57c7b6a5564a96552313c68df9e4aaeedcd8f71254b8acf34cf830ce8e8a1b198cd1bea32967a4adb0fd73493 DIST sqlcipher-4.6.1.tar.gz 19115004 BLAKE2B 792e3342eba78ed8aee49265fcb9e216edaeb7d4c68fd9a95ac9abe60093a8baeb755e32e736a7af98811921d1bfd93f882418864bf5785952ffc2bbae1fc649 SHA512 023b2fc7248fe38b758ef93dd8436677ff0f5d08b1061e7eab0adb9e38ad92d523e0ab69016ee69bd35c1fd53c10f61e99b01f7a2987a1f1d492e1f7216a0a9c +DIST sqlcipher-4.9.0.tar.gz 19168463 BLAKE2B a60c5f44153d557c318d57c574b023c7a86d5df9e7c5151fc07d05042a170ee32672bade8e60e560c5c80815c249a6ddb8b58a66dde7d76a8c13b2cbe651d394 SHA512 4ab29986b1401f2d3ce64045e1762ec2fad7ac6635fe4847819cd08c46cfd89089bb261c58582849c58191e48c55b8c05a5acddc9c5598a20a60c4e9721ba5dc diff --git a/dev-db/sqlcipher/files/patch-autosetup_sqlite-config_tcl b/dev-db/sqlcipher/files/patch-autosetup_sqlite-config_tcl new file mode 100644 index 000000000000..4b98527fb5ef --- /dev/null +++ b/dev-db/sqlcipher/files/patch-autosetup_sqlite-config_tcl @@ -0,0 +1,12 @@ +Index: autosetup/sqlite-config.tcl +--- autosetup/sqlite-config.tcl.orig ++++ autosetup/sqlite-config.tcl +@@ -792,7 +792,7 @@ proc sqlite-handle-soname {} { + # use it as-is + } else { + # Assume it's a suffix +- set soname "libsqlite3.so.${soname}" ++ set soname "libsqlcipher.so.${soname}" + } + } + } diff --git a/dev-db/sqlcipher/files/patch-src_crypto_openssl_c b/dev-db/sqlcipher/files/patch-src_crypto_openssl_c new file mode 100644 index 000000000000..6745e2d1cf8d --- /dev/null +++ b/dev-db/sqlcipher/files/patch-src_crypto_openssl_c @@ -0,0 +1,94 @@ +LibreSSL does not support the OpenSSL 3 EVP_MAC API + +Partial revert of +https://github.com/sqlcipher/sqlcipher/commit/801b81a8d0c42c13f66de89805c3bfa0d1d450aa + +Index: src/crypto_openssl.c +--- src/crypto_openssl.c.orig ++++ src/crypto_openssl.c +@@ -156,6 +156,76 @@ static int sqlcipher_openssl_hmac( + ) { + int rc = 0; + ++#if (defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x30000000L) ++ unsigned int outlen; ++ HMAC_CTX* hctx = NULL; ++ ++ if(in == NULL) goto error; ++ ++ hctx = HMAC_CTX_new(); ++ if(hctx == NULL) { ++ sqlcipher_log(SQLCIPHER_LOG_ERROR, SQLCIPHER_LOG_PROVIDER, "sqlcipher_openssl_hmac: HMAC_CTX_new() failed"); ++ sqlcipher_openssl_log_errors(); ++ goto error; ++ } ++ ++ switch(algorithm) { ++ case SQLCIPHER_HMAC_SHA1: ++ if(!(rc = HMAC_Init_ex(hctx, hmac_key, key_sz, EVP_sha1(), NULL))) { ++ sqlcipher_log(SQLCIPHER_LOG_ERROR, SQLCIPHER_LOG_PROVIDER, "sqlcipher_openssl_hmac: HMAC_Init_ex() with key size %d and EVP_sha1() returned %d", key_sz, rc); ++ sqlcipher_openssl_log_errors(); ++ goto error; ++ } ++ break; ++ case SQLCIPHER_HMAC_SHA256: ++ if(!(rc = HMAC_Init_ex(hctx, hmac_key, key_sz, EVP_sha256(), NULL))) { ++ sqlcipher_log(SQLCIPHER_LOG_ERROR, SQLCIPHER_LOG_PROVIDER, "sqlcipher_openssl_hmac: HMAC_Init_ex() with key size %d and EVP_sha256() returned %d", key_sz, rc); ++ sqlcipher_openssl_log_errors(); ++ goto error; ++ } ++ break; ++ case SQLCIPHER_HMAC_SHA512: ++ if(!(rc = HMAC_Init_ex(hctx, hmac_key, key_sz, EVP_sha512(), NULL))) { ++ sqlcipher_log(SQLCIPHER_LOG_ERROR, SQLCIPHER_LOG_PROVIDER, "sqlcipher_openssl_hmac: HMAC_Init_ex() with key size %d and EVP_sha512() returned %d", key_sz, rc); ++ sqlcipher_openssl_log_errors(); ++ goto error; ++ } ++ break; ++ default: ++ sqlcipher_log(SQLCIPHER_LOG_ERROR, SQLCIPHER_LOG_PROVIDER, "sqlcipher_openssl_hmac: invalid algorithm %d", algorithm); ++ goto error; ++ } ++ ++ if(!(rc = HMAC_Update(hctx, in, in_sz))) { ++ sqlcipher_log(SQLCIPHER_LOG_ERROR, SQLCIPHER_LOG_PROVIDER, "sqlcipher_openssl_hmac: HMAC_Update() on 1st input buffer of %d bytes using algorithm %d returned %d", in_sz, algorithm, rc); ++ sqlcipher_openssl_log_errors(); ++ goto error; ++ } ++ ++ if(in2 != NULL) { ++ if(!(rc = HMAC_Update(hctx, in2, in2_sz))) { ++ sqlcipher_log(SQLCIPHER_LOG_ERROR, SQLCIPHER_LOG_PROVIDER, "sqlcipher_openssl_hmac: HMAC_Update() on 2nd input buffer of %d bytes using algorithm %d returned %d", in2_sz, algorithm, rc); ++ sqlcipher_openssl_log_errors(); ++ goto error; ++ } ++ } ++ ++ if(!(rc = HMAC_Final(hctx, out, &outlen))) { ++ sqlcipher_log(SQLCIPHER_LOG_ERROR, SQLCIPHER_LOG_PROVIDER, "sqlcipher_openssl_hmac: HMAC_Final() using algorithm %d returned %d", algorithm, rc); ++ sqlcipher_openssl_log_errors(); ++ goto error; ++ } ++ ++ rc = SQLITE_OK; ++ goto cleanup; ++ ++error: ++ rc = SQLITE_ERROR; ++ ++cleanup: ++ if(hctx) HMAC_CTX_free(hctx); ++ ++#else + size_t outlen; + EVP_MAC *mac = NULL; + EVP_MAC_CTX *hctx = NULL; +@@ -241,6 +311,8 @@ error: + cleanup: + if(hctx) EVP_MAC_CTX_free(hctx); + if(mac) EVP_MAC_free(mac); ++ ++#endif + + return rc; + } diff --git a/dev-db/sqlcipher/sqlcipher-4.6.0.ebuild b/dev-db/sqlcipher/sqlcipher-4.6.0.ebuild deleted file mode 100644 index 4567c130f7b4..000000000000 --- a/dev-db/sqlcipher/sqlcipher-4.6.0.ebuild +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 2021-2024 Liguros Authors -# Distributed under the terms of the GNU General Public License v2 -EAPI=8 - -inherit autotools flag-o-matic multilib-minimal - -DESCRIPTION="Full Database Encryption for SQLite" -HOMEPAGE="https://www.zetetic.net/sqlcipher/" -SRC_URI="https://github.com/sqlcipher/sqlcipher/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="amd64 x86" - -IUSE="debug libedit readline libressl static-libs tcl test" - -# Tcl is always needed by buildsystem -RDEPEND=" - libedit? ( dev-libs/libedit[${MULTILIB_USEDEP}] ) - !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) - readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] ) - tcl? ( dev-lang/tcl:=[${MULTILIB_USEDEP}] ) -" -DEPEND="${RDEPEND} - dev-lang/tcl:*" - -# Libedit and readline support are mutually exclusive -# Testsuite requires compilation with TCL, bug #582584 -REQUIRED_USE=" - libedit? ( !readline ) - test? ( tcl ) -" - -DOCS=( README.md ) - -# Testsuite fails, bug #692310 -RESTRICT="test" - -src_prepare() { - # Column metadata added due to bug #670346 - append-cflags -DSQLITE_HAS_CODEC -DSQLITE_ENABLE_COLUMN_METADATA - default_src_prepare - eautoreconf -} - -multilib_src_configure() { - ECONF_SOURCE=${S} \ - econf \ - --enable-fts3 \ - --enable-fts4 \ - --enable-fts5 \ - --enable-geopoly \ - --enable-json1 \ - --enable-memsys5 \ - --enable-rtree \ - --enable-session \ - --enable-tempstore \ - $(use_enable debug) \ - $(use_enable libedit editline) \ - $(use_enable readline) \ - $(use_enable static-libs static) \ - $(use_enable tcl) -} - -multilib_src_install_all() { - find "${D}" -name '*.la' -type f -delete || die - einstalldocs -} diff --git a/dev-db/sqlcipher/sqlcipher-4.9.0.ebuild b/dev-db/sqlcipher/sqlcipher-4.9.0.ebuild new file mode 100644 index 000000000000..16bf95aa2b35 --- /dev/null +++ b/dev-db/sqlcipher/sqlcipher-4.9.0.ebuild @@ -0,0 +1,83 @@ +# Copyright 2021-2025 Liguros Authors +# Distributed under the terms of the GNU General Public License v2 +EAPI=8 + +inherit autotools flag-o-matic + +DESCRIPTION="Full Database Encryption for SQLite" +HOMEPAGE=" + https://www.zetetic.net/sqlcipher/ + https://github.com/sqlcipher/sqlcipher +" +SRC_URI="https://github.com/sqlcipher/sqlcipher/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="debug libedit readline libressl tcl test" +# Testsuite requires compilation with TCL, bug #582584 +REQUIRED_USE=" + ?? ( libedit readline ) + test? ( tcl ) +" +RESTRICT="!test? ( test )" + +RDEPEND=" + !libressl? ( >=dev-libs/openssl-3.0:= ) + libressl? ( dev-libs/libressl:= ) + sys-libs/zlib + libedit? ( dev-libs/libedit ) + readline? ( sys-libs/readline:= ) + tcl? ( dev-lang/tcl:= ) +" +DEPEND="${RDEPEND}" +BDEPEND="dev-lang/tcl" + +src_prepare() { + append-cflags -DSQLITE_HAS_CODEC -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_EXTRA_INIT=sqlcipher_extra_init -DSQLITE_EXTRA_SHUTDOWN=sqlcipher_extra_shutdown -DSQLITE_TEMP_STORE=3 + append-ldflags -lssl -lcrypto + eapply -p0 $FILESDIR/patch-autosetup_sqlite-config_tcl + + if use libressl; then + eapply -p0 $FILESDIR/patch-src_crypto_openssl_c + fi + + default +} + +src_configure() { + local myeconfargs=( + --enable-fts3 + --enable-fts4 + --enable-fts5 + --enable-geopoly + --enable-memsys5 + --enable-rtree + --enable-session + --with-tempstore=yes + $(use_enable debug) + $(use_enable libedit editline) + $(use_enable readline) + $(use_enable tcl) + ) + ECONF_SOURCE=${S} \ + econf "${myeconfargs[@]}" +} + +src_install() { + emake DESTDIR="${D}" install + + # Rename files from sqlite3 to sqlcipher to prevent file collisons + mv ${ED}/usr/bin/{sqlite3,sqlcipher} + mv ${ED}/usr/include/{sqlite3,sqlcipher}.h + mv ${ED}/usr/include/{sqlite3ext,sqlcipherext}.h + mv ${ED}/usr/lib64/lib{sqlite3,sqlcipher}.a + rm ${ED}/usr/lib64/libsqlite3.so{,.0} + mv ${ED}/usr/lib64/libsqlite3.so.* \ + ${ED}/usr/lib64/libsqlcipher.so.${PV} + mv ${ED}/usr/lib64/pkgconfig/{sqlite3,sqlcipher}.pc + mv ${ED}/usr/share/man/man1/{sqlite3,sqlcipher}.1 + sed -i s/-lsqlite3/-lsqlcipher/ ${ED}/usr/lib64/pkgconfig/sqlcipher.pc + einstalldocs + find "${D}" -name '*.la' -type f -delete || die +} |
