linkding — local Store release candidate

Save, tag and search bookmarks in your own local library. This package keeps the
upstream linkding 1.47.0 interface and authentication. Snapshot capture is not
included: the bundled runtime has no SingleFile/browser snapshot service.

Requirements and installation
Linux x86_64, Node.js >=22, glibc and these native libraries: libcrypt.so.1,
libz.so.1, libpcre2-8.so.0, libuuid.so.1 and libexpat.so.1 (plus normal glibc
libraries). CPython 3.13.11, Django, uWSGI, Huey and compiled static assets are
bundled. No Node dependencies or install-time build/download are needed.
The Store installer may run npm install --omit=dev --no-audit --no-fund.
Start from the package root with npm start, or node launch.mjs.

Ports and state
With neither PORT nor CLAWBOX_PORT set, the public listener is
http://127.0.0.1:4433/apps/linkding-clawbox/. Either variable alone is accepted.
When both are set they must be identical decimal integers. Use an unprivileged
spare port or 0 for automatic allocation. Port 3005 is rejected even when
inherited; unset both variables or explicitly set both to an agreed spare port.
An occupied requested public port fails without touching that service.

For an isolated extracted-package check, create a NEW external state directory
and run from the extraction root (never use an existing owner's state):
  PORT=0 CLAWBOX_PORT=0 CLAWBOX_DATA_DIR="$CLAWBOX_TEST_STATE" node launch.mjs
CLAWBOX_TEST_STATE must be an absolute path outside the extraction. A fixed spare
port can replace both zeros. STORE_READY is followed by JSON containing port,
url, localURL, backendURL, dataDir and pid. url/localURL are public addresses.
The private backend binds its own automatic port; all its Python children get
that same port in PORT and CLAWBOX_PORT. local-port.json records the last private
port for diagnostics; it is never trusted as a reservation on the next start.

State defaults to $XDG_DATA_HOME/linkding-clawbox or
$HOME/.local/share/linkding-clawbox. CLAWBOX_DATA_DIR must be absolute and outside
the replaceable package, including after resolving symlinks. Back up the entire
state directory. SQLite, the task queue, assets, secret key and initial-password
live there. Transient sockets live in its .runtime directory and are removed on
normal shutdown. Send SIGTERM or SIGINT to the launcher and wait for it to exit;
it stops and reaps the backend and worker. Replacing the package does not reset
accounts, passwords, sessions or bookmarks.

First use
On an empty database, initialization creates admin with a unique random password
stored in the state directory's owner-readable initial-password file. Read that
file locally, sign in through the original login form, then use Settings → Change
password. Existing users are never recreated and their passwords are never
reset. initial-password remains the first password; after changing it, it is
not the current password. No password is bundled or printed in startup logs.
The separate setup page is closed once any user exists; normal first start
therefore uses login, not a second account-creation screen.

Browser access and the external Store dependency
Both listeners bind only to loopback. Open the emitted public URL in a normal
browser on this same device. The landing page continues to the upstream UI when
browser storage is available. Authentication, CSRF, host/origin checks, cookie
paths and upstream protections remain enabled; no foreign/opaque origin is
rewritten into a trusted request. No remote access is configured here.
A sandboxed Store document cannot grant itself normal browser privileges. The
landing page shows the local address for manual use, but this does not prove
the real Store launch handoff. Shared-launch repair run-8yq91w19 is reported
complete but UNDEPLOYED. The host owner must deploy that shared repair through
the supported host workflow and t3 must verify a real Store sandbox-to-normal-
browser launch. This app adds no speculative manifest fields or sandbox bypass.

Reproducible package
After staging all intended release files, from a Git checkout run:
  node scripts/clawbox/package.mjs --out "$CLAWBOX_RUN_ARTIFACTS_DIR/package"
The output directory must not already contain linkding.tar.gz or its report.
The builder reads Git-listed working-tree bytes, including staged additions,
not gitignore results. The archive contains files at its root with no outer
folder. GNU tar headers have time/owner/group zero; gzip has no timestamp.
Executable permissions are checked against Git. Symlinks must resolve to an
included file within the package. Native loaders must use relative search paths
and all native libraries must resolve on the checking host. The report includes
per-file hashes, modes, native library requirements and icon provenance.

Excluded components (case sensitive): node_modules, .git, .next, dist, build,
.clawbox, .env*, *.pem, *.key. A component named .clawbox-python is INCLUDED.
The certificate bundle already uses ca-bundle.crt to survive *.pem exclusion.
Limits are 50 MiB gzip, 256 MiB uncompressed tar (including headers), 10000 file
entries. No runtime, license or source file is trimmed to meet those limits.
The exact live publisher implementation was not supplied and the protected host
installation was not inspected. Component semantics implement the task's stated
rules; exact publisher parity remains a gate for t2/t3 and the publishing owner.
See scripts/clawbox/CONTRACT.md for the machine interface and required gates.

Artwork and public icon deployment (instructions only)
favicon.png is byte-identical to the official 512x512 RGBA logo in the supplied
application source archive (bookmarks/static/logo-512.png) and static/logo-512.png.
Its SHA-256 is d4c399a3dec56b0aa45e6c260800266b73421bd7f719881aebe7cdbbe8939d13.
After approval, the publishing owner should upload these exact favicon.png bytes
through the supported Store icon publishing workflow for slug linkding-clawbox,
verify the served public icon's hash, MIME type image/png and RGBA encoding, and
retest the Store listing and downloaded installation. No icon deployment, Store
publication, registry edit or host change is performed by this package.

Source and release status
Application source, frontend/Python lockfiles and upstream build recipes remain
in corresponding-source.tar.gz. Current launcher/adaptation source is readable
in this package; distribute both together. Existing license files and notices
are retained. notices/python-sources.tar.xz holds the complete original tar
streams of all 27 pinned Python source distributions, including uWSGI 2.0.31
and its GPL license/build scripts. Only gzip wrappers were replaced by shared
XZ compression. PYTHON-SOURCES.json records original and retained hashes.
Extract the XZ bundle into a new source-work directory, then extract the desired
NAME-VERSION.tar. Obtaining these retained sources requires no network access.

notices/berkeley-db-source.tar.xz retains Berkeley DB 6.0.19 source, build scripts,
tests and license, omitting prebuilt manuals/images/indexes but retaining their
source examples and scripts. The pinned standalone
Python build recipes and native license texts are also retained in notices/.
See notices/RELEASE-PROVENANCE.txt and notices/NATIVE-SOURCES.json for exact scope.
Run python3 scripts/clawbox/audit-sources.py with Python >=3.11 to verify all
retained source hashes, lockfile pins and native notices offline. The package
builder runs this audit using bundled CPython. retain-sources.py and
retain-native-notices.py document retrieval; neither runs on app startup.

To avoid shipping CPython's engine twice, bin/python3.13 is a small entry point
into the existing bundled libpython3.13.so.1.0. Initialization and uWSGI use that
same library. All standard-library/runtime files remain present.
Non-runtime static symbols/relocations were removed from that library; its code
sections and dynamic exports are verified unchanged in notices/RUNTIME-LAYOUT.json.
Source and compiler invocation: scripts/clawbox/python-main.c and
scripts/clawbox/build-python-entry.mjs. Rebuilding requires a C compiler;
installing/starting the package does not. compact-runtime.py records and checks
the native-library compaction using GNU objcopy/readelf.

Independent acceptance, exact publisher parity and real public-download/Store
integration remain t2/t3 and owner gates. publicationReady therefore stays false.
No public release has been uploaded or changed by this task.
