Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable _dbm extension module #1

Merged
merged 3 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
416 changes: 0 additions & 416 deletions .github/workflows/linux.yml

Large diffs are not rendered by default.

126 changes: 0 additions & 126 deletions LICENSE.bdb.txt

This file was deleted.

4 changes: 0 additions & 4 deletions cpython-unix/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ AUTOCONF_DEPENDS = \
$(OUTDIR)/autoconf-$(AUTOCONF_VERSION)-$(PACKAGE_SUFFIX).tar: $(AUTOCONF_DEPENDS)
$(RUN_BUILD) --docker-image $(DOCKER_IMAGE_BUILD) autoconf

$(OUTDIR)/bdb-$(BDB_VERSION)-$(PACKAGE_SUFFIX).tar: $(PYTHON_DEP_DEPENDS) $(HERE)/build-bdb.sh
$(RUN_BUILD) --docker-image $(DOCKER_IMAGE_BUILD) bdb

$(OUTDIR)/bzip2-$(BZIP2_VERSION)-$(PACKAGE_SUFFIX).tar: $(PYTHON_DEP_DEPENDS) $(HERE)/build-bzip2.sh
$(RUN_BUILD) --docker-image $(DOCKER_IMAGE_BUILD) bzip2

Expand Down Expand Up @@ -277,7 +274,6 @@ PYTHON_DEPENDS := \
$(OUTDIR)/versions/VERSION.setuptools \
$(OUTDIR)/cpython-$(PYBUILD_PYTHON_MAJOR_VERSION)-$(PYBUILD_PYTHON_VERSION)-$(HOST_PLATFORM).tar \
$(if $(NEED_AUTOCONF),$(OUTDIR)/autoconf-$(AUTOCONF_VERSION)-$(PACKAGE_SUFFIX).tar) \
$(if $(NEED_BDB),$(OUTDIR)/bdb-$(BDB_VERSION)-$(PACKAGE_SUFFIX).tar) \
$(if $(NEED_BZIP2),$(OUTDIR)/bzip2-$(BZIP2_VERSION)-$(PACKAGE_SUFFIX).tar) \
$(if $(NEED_EXPAT),$(OUTDIR)/expat-$(EXPAT_VERSION)-$(PACKAGE_SUFFIX).tar) \
$(if $(NEED_LIBEDIT),$(OUTDIR)/libedit-$(LIBEDIT_VERSION)-$(PACKAGE_SUFFIX).tar) \
Expand Down
38 changes: 0 additions & 38 deletions cpython-unix/build-bdb.sh

This file was deleted.

8 changes: 2 additions & 6 deletions cpython-unix/build-cpython.sh
Original file line number Diff line number Diff line change
Expand Up @@ -426,12 +426,8 @@ if [ "${PYBUILD_PLATFORM}" = "macos" ]; then
export MACOSX_DEPLOYMENT_TARGET="${APPLE_MIN_DEPLOYMENT_TARGET}"
fi

# We use ndbm on macOS and BerkeleyDB elsewhere.
if [ "${PYBUILD_PLATFORM}" = "macos" ]; then
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-dbmliborder=ndbm"
else
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-dbmliborder=bdb"
fi
# Disable _dbm everywhere.
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-dbmliborder="

if [ -n "${CROSS_COMPILING}" ]; then
# configure doesn't like a handful of scenarios when cross-compiling.
Expand Down
1 change: 0 additions & 1 deletion cpython-unix/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,6 @@ def main():
)

elif action in (
"bdb",
"bzip2",
"expat",
"inputproto",
Expand Down
37 changes: 3 additions & 34 deletions cpython-unix/extension-modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,40 +181,9 @@ _datetime:
- _datetimemodule.c

_dbm:
sources:
- _dbmmodule.c
defines-conditional:
- define: HAVE_BERKDB_H
maximum-python-version: "3.10"
targets:
- .*-unknown-linux-.*
- define: DB_DBM_HSEARCH
maximum-python-version: "3.10"
targets:
- .*-unknown-linux-.*
- define: HAVE_NDBM_H
maximum-python-version: "3.10"
targets:
- .*-apple-.*

# It looks like CPython commit 0a9f69539be27acf1cddf1b58d02a88d02e5008d didn't
# fully implement BDB support in configure. So we add a missing define.
- define: USE_BERKDB
minimum-python-version: "3.11"
targets:
- .*-unknown-linux-.*
- define: USE_NDBM
minimum-python-version: "3.11"
targets:
- .*-apple-.*
includes-deps:
- include
links-conditional:
# macOS ships with an ndbm implementation in libSystem. CPython's setup.py will
# use it unless an ndbm or gdbm_compat library is present.
- name: db
targets:
- .*-unknown-linux-.*
# Disable DBM everywhere because Berkeley DB license is Sleepycat.
disabled-targets:
- .*

_decimal:
sources:
Expand Down
16 changes: 0 additions & 16 deletions cpython-unix/targets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ aarch64-unknown-linux-gnu:
target_cc: /usr/bin/aarch64-linux-gnu-gcc
needs:
- autoconf
- bdb
- binutils
- bzip2
- expat
Expand Down Expand Up @@ -237,7 +236,6 @@ armv7-unknown-linux-gnueabi:
target_cc: /usr/bin/arm-linux-gnueabi-gcc
needs:
- autoconf
- bdb
- binutils
- bzip2
- expat
Expand Down Expand Up @@ -275,7 +273,6 @@ armv7-unknown-linux-gnueabihf:
target_cc: /usr/bin/arm-linux-gnueabihf-gcc
needs:
- autoconf
- bdb
- binutils
- bzip2
- expat
Expand Down Expand Up @@ -319,7 +316,6 @@ i686-unknown-linux-gnu:
- '-m32'
needs:
- autoconf
- bdb
- binutils
- bzip2
- expat
Expand Down Expand Up @@ -357,7 +353,6 @@ mips-unknown-linux-gnu:
target_cc: /usr/bin/mips-linux-gnu-gcc
needs:
- autoconf
- bdb
- binutils
- bzip2
- expat
Expand Down Expand Up @@ -395,7 +390,6 @@ mipsel-unknown-linux-gnu:
target_cc: /usr/bin/mipsel-linux-gnu-gcc
needs:
- autoconf
- bdb
- binutils
- bzip2
- expat
Expand Down Expand Up @@ -433,7 +427,6 @@ ppc64le-unknown-linux-gnu:
target_cc: /usr/bin/powerpc64le-linux-gnu-gcc
needs:
- autoconf
- bdb
- binutils
- bzip2
- expat
Expand Down Expand Up @@ -471,7 +464,6 @@ s390x-unknown-linux-gnu:
target_cc: /usr/bin/s390x-linux-gnu-gcc
needs:
- autoconf
- bdb
- binutils
- bzip2
- expat
Expand Down Expand Up @@ -727,7 +719,6 @@ x86_64-unknown-linux-gnu:
- '-fdebug-default-version=4'
needs:
- autoconf
- bdb
- binutils
- bzip2
- expat
Expand Down Expand Up @@ -772,7 +763,6 @@ x86_64_v2-unknown-linux-gnu:
- '-fdebug-default-version=4'
needs:
- autoconf
- bdb
- binutils
- bzip2
- expat
Expand Down Expand Up @@ -817,7 +807,6 @@ x86_64_v3-unknown-linux-gnu:
- '-fdebug-default-version=4'
needs:
- autoconf
- bdb
- binutils
- bzip2
- expat
Expand Down Expand Up @@ -862,7 +851,6 @@ x86_64_v4-unknown-linux-gnu:
- '-fdebug-default-version=4'
needs:
- autoconf
- bdb
- binutils
- bzip2
- expat
Expand Down Expand Up @@ -904,7 +892,6 @@ x86_64-unknown-linux-musl:
- '-fvisibility=hidden'
needs:
- autoconf
- bdb
- binutils
- bzip2
- expat
Expand Down Expand Up @@ -947,7 +934,6 @@ x86_64_v2-unknown-linux-musl:
- '-fvisibility=hidden'
needs:
- autoconf
- bdb
- binutils
- bzip2
- expat
Expand Down Expand Up @@ -990,7 +976,6 @@ x86_64_v3-unknown-linux-musl:
- '-fvisibility=hidden'
needs:
- autoconf
- bdb
- binutils
- bzip2
- expat
Expand Down Expand Up @@ -1033,7 +1018,6 @@ x86_64_v4-unknown-linux-musl:
- '-fvisibility=hidden'
needs:
- autoconf
- bdb
- binutils
- bzip2
- expat
Expand Down
10 changes: 0 additions & 10 deletions pythonbuild/downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@
"sha256": "431075ad0bf529ef13cb41e9042c542381103e80015686222b8a9d4abef42a1c",
"version": "2.71",
},
# 6.0.19 is the last version licensed under the Sleepycat license.
"bdb": {
"url": "https://ftp.osuosl.org/pub/blfs/conglomeration/db/db-6.0.19.tar.gz",
"size": 36541923,
"sha256": "2917c28f60903908c2ca4587ded1363b812c4e830a5326aaa77c9879d13ae18e",
"version": "6.0.19",
"library_names": ["db"],
"licenses": ["Sleepycat"],
"license_file": "LICENSE.bdb.txt",
},
"binutils": {
"url": "https://ftp.gnu.org/gnu/binutils/binutils-2.42.tar.xz",
"size": 27567160,
Expand Down
Loading
Loading