Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/ocr/rule.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{
"path": "**/{configure.ac,*.m4,aclocal.m4}",
"merge_system_rule": true,
"rule": "REVIEW DISCIPLINE: Precise, blunt, verify against the diff, tag confidence, no praise. Berkeley DB Autoconf. Edit dist/configure.ac and the dist/aclocal/*.m4 macros -- do NOT hand-edit the generated dist/configure or db_config.h in the same patch (regeneration is a separate maintainer step; a patch that also rewrites generated configure output is suspect). Feature/header/function probes must be portable and not assume a specific OS or compiler. CRITICAL: libdb maintains BOTH Autoconf and Meson -- every configure knob, feature toggle, or header/function probe added here must be mirrored on the Meson side (meson.build / meson/) so the two never drift; a check present in only one build system is a defect. Keep the @DB_VERSION_UNIQUE_NAME@ / uniquename substitution machinery intact when touching symbol/header generation. Do NOT bump the release version (AC_INIT). Minimal diff."
"rule": "REVIEW DISCIPLINE: Precise, blunt, verify against the diff, tag confidence, no praise. Berkeley DB Autoconf. Edit dist/configure.ac and the dist/aclocal/*.m4 macros -- do NOT hand-edit the generated dist/configure or db_config.h in the same patch (regeneration is a separate maintainer step; a patch that also rewrites generated configure output is suspect). Feature/header/function probes must be portable and not assume a specific OS or compiler. CRITICAL: libdb maintains BOTH Autoconf and Meson -- every configure knob, feature toggle, or header/function probe added here must be mirrored on the Meson side (dist/meson.build / dist/meson/) so the two never drift; a check present in only one build system is a defect. Keep the @DB_VERSION_UNIQUE_NAME@ / uniquename substitution machinery intact when touching symbol/header generation. Do NOT bump the release version (AC_INIT). Minimal diff."
},
{
"path": "**/{meson.build,meson_options.txt,meson.options}",
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Android cross-build — core libdb for aarch64-linux-android (bionic libc).
#
# Dedicated workflow (does NOT touch ci.yml). Cross-compiles the core C
# library with the NDK's clang against the existing root meson.build and
# library with the NDK's clang against the root meson.build shim (which drives
# dist/meson.build) and
# asserts that a real ARM aarch64 libdb.so is produced. This is a cross-BUILD
# test: no emulator or device is used or needed.
#
Expand All @@ -25,7 +26,8 @@ on:
- 'src/**'
- 'meson.build'
- 'meson_options.txt'
- 'meson/**'
- 'dist/meson.build'
- 'dist/meson/**'
- 'dist/android/**'
- '.github/workflows/android.yml'
schedule:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-extended.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ jobs:
done
}
extract build_unix/db_config.h > /tmp/auto.flags
extract build-meson/db_config.h > /tmp/meson.flags
extract build-meson/dist/db_config.h > /tmp/meson.flags
echo "=== autoconf | meson ==="
paste -d' ' /tmp/auto.flags /tmp/meson.flags
if diff -u /tmp/auto.flags /tmp/meson.flags > /tmp/flags.diff; then
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ jobs:
int main(void){int a,b,c;char *s=db_version(&a,&b,&c);
printf("libdb %s (%d.%d.%d)\n",s,a,b,c);return 0;}
EOF
cc /tmp/smoke.c -Ibuild-meson -Lbuild-meson -ldb -o /tmp/smoke
if [ "$RUNNER_OS" = "macOS" ]; then export DYLD_LIBRARY_PATH=build-meson; else export LD_LIBRARY_PATH=build-meson; fi
cc /tmp/smoke.c -Ibuild-meson/dist -Lbuild-meson/dist -ldb -o /tmp/smoke
if [ "$RUNNER_OS" = "macOS" ]; then export DYLD_LIBRARY_PATH=build-meson/dist; else export LD_LIBRARY_PATH=build-meson/dist; fi
/tmp/smoke

# ----------------------------------------------------------------------------
Expand Down
44 changes: 23 additions & 21 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Documentation validation.
#
# Builds the modernized docs (docs-src/build.py: Markdown -> HTML + man + PDF)
# Builds the modernized docs (docs_src/build.py: Markdown -> HTML + man + PDF)
# and runs the validators that lock in the reverse-DocBook migration's
# guarantees. Modeled on ci.yml/fuzz.yml conventions: hard gates block PRs,
# advisory tiers are continue-on-error, and heavy work (PDF/TeX-free but slow,
Expand All @@ -11,7 +11,7 @@
# exactly -- pandoc, weasyprint, poppler-utils, mandoc, codespell, lychee and
# write-good are all pinned there.
#
# HARD gates (fail the PR): build (HTML+man), no-loss, completeness, spelling,
# HARD gates (fail the PR): build (HTML+man), completeness, spelling,
# internal link-check, man-lint.
# ADVISORY (continue-on-error): prose (write-good), external link-check.
# BEST-EFFORT (scheduled / continue-on-error): PDF build + validation (slow).
Expand All @@ -23,7 +23,7 @@ on:
branches: [master]
pull_request:
paths:
- 'docs-src/**'
- 'docs_src/**'
- '.github/workflows/docs.yml'
- 'flake.nix'
- 'dist/RELEASE'
Expand All @@ -47,7 +47,7 @@ jobs:
# `pdf` job) so a PR isn't gated on the ~4-minute weasyprint pass.
# ----------------------------------------------------------------------------
build:
name: build + gates (html, man, no-loss, completeness, spelling, links, man-lint)
name: build + gates (html, man, completeness, spelling, links, man-lint)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -61,37 +61,39 @@ jobs:
# 1. BUILD (hard): HTML + man with 0 errors. --no-pdf keeps the PR fast;
# the PDF path is exercised by the `pdf` job (scheduled/best-effort).
- name: Build HTML + man
run: nix develop --command bash -c 'cd docs-src && python3 build.py --no-pdf'
run: nix develop --command bash -c 'cd docs_src && python3 build.py --no-pdf'

# build.py self-check guards the md->man reshape, PDF book discovery, and
# the .md->.html link rewrite (unit-level, no external tools).
- name: build.py self-check
run: nix develop --command bash -c 'cd docs-src && python3 build.py --selfcheck'
run: nix develop --command bash -c 'cd docs_src && python3 build.py --selfcheck'

# 2. NO-LOSS GATE (hard): every migrated tree still retains its source
# content (word-multiset retention + no code/section drop). Locks the
# "nothing lost" guarantee against future edits.
- name: No-loss gate (all trees)
run: nix develop --command bash -c 'python3 docs-src/_migrate/verify_all.py'
# 2. (RETIRED) The no-loss gate compared the OLD scraped-DocBook docs/
# tree against docs_src/ to prove the reverse migration dropped
# nothing. It did its job (PRs #119/#120, ~100% retention) and the
# docs/ source has since been removed from master (it lives on the
# gh-pages historical archive). With no source tree to diff against
# the gate can't run, so it is retired. verify_all.py/verify.py stay
# in docs_src/_migrate/ for reference against that archive.

# 3. COMPLETENESS GATE (hard): every public db.h function is documented
# (28/28), and every uncovered method is on the frozen allowlist -- a
# NEW undocumented API fails.
- name: Completeness gate (API coverage)
run: nix develop --command bash -c 'python3 docs-src/_migrate/man_coverage.py --ci'
run: nix develop --command bash -c 'python3 docs_src/_migrate/man_coverage.py --ci'

# 4. SPELLING (hard on NEW typos): codespell, baselined against the legacy
# typo backlog so only newly-introduced typos fail.
- name: Spelling gate (codespell, baselined)
run: nix develop --command bash -c 'python3 docs-src/_migrate/spellcheck.py'
run: nix develop --command bash -c 'python3 docs_src/_migrate/spellcheck.py'

# 6. INTERNAL LINK CHECK (hard): every link into migrated content must
# resolve. Deferred-tree + un-migrated-asset links are excluded (see
# docs-src/_migrate/lychee.toml). External links are the advisory job.
# docs_src/_migrate/lychee.toml). External links are the advisory job.
- name: Internal link check (lychee, offline)
run: |
nix develop --command bash -c \
'shopt -s globstar; lychee --offline --config docs-src/_migrate/lychee.toml --no-progress "docs-build/html/**/*.html"'
'shopt -s globstar; lychee --offline --config docs_src/_migrate/lychee.toml --no-progress "docs-build/html/**/*.html"'

# 7. MAN-LINT (hard): 0 ERRORS from mandoc across every generated .3
# (STYLE/WARNING are fine).
Expand Down Expand Up @@ -128,13 +130,13 @@ jobs:
nix develop --command bash -c '
shopt -s globstar
total=0
for d in docs-src/api/* docs-src/guides/*; do
for d in docs_src/api/* docs_src/guides/*; do
[ -d "$d" ] || continue
n=$(write-good "$d"/**/*.md 2>/dev/null | grep -c "on line" || true)
printf "%-40s %5s suggestions\n" "$d" "$n"
total=$((total+n))
done
echo "::notice title=Prose (write-good)::$total advisory suggestion(s) across docs-src"'
echo "::notice title=Prose (write-good)::$total advisory suggestion(s) across docs_src"'

# ----------------------------------------------------------------------------
# PDF (best-effort / scheduled): weasyprint renders one PDF per book (~4 min
Expand All @@ -155,9 +157,9 @@ jobs:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Build all outputs (incl. PDF)
run: nix develop --command bash -c 'cd docs-src && timeout 900 python3 build.py'
run: nix develop --command bash -c 'cd docs_src && timeout 900 python3 build.py'
- name: Validate PDFs (non-empty, page count, title-page version)
run: nix develop --command bash -c 'python3 docs-src/_migrate/validate_pdf.py'
run: nix develop --command bash -c 'python3 docs_src/_migrate/validate_pdf.py'
- name: Upload PDFs
if: always()
uses: actions/upload-artifact@v4
Expand All @@ -184,7 +186,7 @@ jobs:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Build HTML
run: nix develop --command bash -c 'cd docs-src && python3 build.py --no-pdf'
run: nix develop --command bash -c 'cd docs_src && python3 build.py --no-pdf'
- name: Check external links (network, advisory)
run: |
nix develop --command bash -c '
Expand Down Expand Up @@ -214,7 +216,7 @@ jobs:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Build the full site (HTML + PDF + man)
run: nix develop --command bash -c 'cd docs-src && python3 build.py'
run: nix develop --command bash -c 'cd docs_src && python3 build.py'
- name: Deploy /reference/ to gh-pages
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pbt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
- 'test/pbt/**'
- 'meson.build'
- 'meson_options.txt'
- 'dist/meson.build'
- 'dist/meson/**'
- 'src/**'
- '.github/workflows/pbt.yml'
workflow_dispatch:
Expand Down
22 changes: 11 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ build-android.cross.txt
.agent/

# prototype build artifact
lab/lsm/test_adaptive
rfc/0001/test_adaptive

# benchmark driver binaries (built from lab/bench/*.c)
lab/bench/scale_bench
lab/bench/scale_iso
lab/bench/lock_bench
lab/bench/tproc_c
lab/bench/tproc_b
lab/bench/tproc_h
lab/bench/ssi_abort_bench
# benchmark driver binaries (built from test/bench/*.c)
test/bench/scale_bench
test/bench/scale_iso
test/bench/lock_bench
test/bench/tproc_c
test/bench/tproc_b
test/bench/tproc_h
test/bench/ssi_abort_bench

# Generated documentation (docs-src/build.py output)
# Generated documentation (docs_src/build.py output)
docs-build/
docs-src/**/__pycache__/
docs_src/**/__pycache__/
rfc/0001/test_adaptive
test_adaptive
28 changes: 28 additions & 0 deletions LICENSES/ASM.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
ASM: a very small and fast Java bytecode manipulation framework
Copyright (c) 2000-2005 INRIA, France Telecom
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holders nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 changes: 27 additions & 0 deletions LICENSES/BSD.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 1990, 1993, 1994, 1995
The Regents of the University of California. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the University nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading
Loading