Commit graph

36 commits

Author SHA1 Message Date
lrnselfreliance
ad56134851
install.sh installs on Debian 13 (#830)
install.sh only accepted Debian 12, which cannot run this version, and
rejected Debian 13.  It now requires Debian 13 or newer on both PCs and
Raspberry Pis.  The install scripts point to the drive wizard instead of
manual mounting.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:51:40 -06:00
Roland
36f84941db
install: always install serve; resolve it via PATH in wrolpi-app
wrolpi-app crash-loops with 203/EXEC when /usr/local/bin/serve is missing.
Two independent causes, both fixed here:

1. The `single-file --version ||` guard in the install scripts only installed
   serve (and readability) when single-file was ABSENT. On a machine that
   already has single-file (a prior install or a baked image), serve was
   skipped, and re-running install.sh could never repair it. Install each npm
   global independently based on its own presence.

2. The service hardcoded /usr/local/bin/serve, which breaks when npm's global
   prefix puts serve in /usr/bin (depends on how node was installed). Resolve
   serve via PATH with `/usr/bin/env serve`.

Verified on a fresh Raspberry Pi OS Trixie install (10.0.0.8): wrolpi-app is
active with 0 restarts and serves 200 with the PATH-resolved ExecStart.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-23 18:21:58 -06:00
Roland
f3a9a9f67c
install: run install in a neutral C.UTF-8 locale
Fresh installs (and SSH sessions that forward LC_* variables from the client)
can reference an ungenerated locale, causing apt/perl/python to emit
"Cannot set LC_CTYPE to default locale" warnings throughout the install log.

Export LC_ALL=C.UTF-8 for the install run. C.UTF-8 is built into glibc, always
present, and locale-neutral, so it silences the warnings without generating a
locale, without adding a dependency, and without changing the user's configured
locale (e.g. an en_GB.UTF-8 system stays en_GB.UTF-8).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 18:55:06 -06:00
Roland
ec2b584429 install: create Controller venv during fresh install
The Controller venv (/opt/wrolpi/controller/venv) was only ever created by
upgrade.sh and reset_virtual_environments.sh, neither of which runs during a
fresh install. install_raspberrypios.sh and install_debian_12.sh created only
the main API venv, so on a clean machine wrolpi-controller crash-looped with
203/EXEC ("Unable to locate executable /opt/wrolpi/controller/venv/bin/python")
because repair.sh unconditionally starts the service.

Create the Controller venv inline right after the main venv, mirroring how the
main venv is already built in these scripts. Verified on a fresh Raspberry Pi OS
Trixie install (10.0.0.8): wrolpi-controller comes up active with 0 restarts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 18:55:00 -06:00
Roland
02eb8d70e4
Caddy install: run gpg --dearmor with --batch --yes.
If the caddy keyring file already exists (left by a prior partial
install), gpg prompts to overwrite via /dev/tty, which fails under the
tty-less wrolpi-upgrade.service ("cannot open '/dev/tty'") and aborts
the upgrade. --batch --yes overwrites silently, making the caddy
install idempotent in all four scripts that share this pattern.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 13:03:11 -06:00
lrnselfreliance
1acb148c90
Single file deno (#478)
* Singlefile runs under Deno 2.8.3; browser leftovers are reaped.

single-file-cli is designed for Deno.  Under node 18 (Debian 12/RPi OS) it
cannot reach the browser CDP on IPv6-enabled hosts ("localhost" resolves to
::1 first with no IPv4 fallback) and it never exits after a successful save,
blocking the download worker forever.

The native path and the Archive docker container now run single-file with
"deno run".  Deno is pinned at v2.8.3 everywhere because yt-dlp 2026.06.09
requires at least 2.3.0 (our node is Debian's v18, below yt-dlp's v22
minimum).  Deno >= 2.3 kills the browser single-file spawns (piped stderr
that single-file never reads), so the browser is run through
singlefile_browser_wrapper.sh which discards its stderr.

Commands are run in their own process group which is killed when they
finish, reaping the browser single-file leaves behind.  The Archive
downloader now has a ten minute timeout.  Install scripts install Deno
(previously only upgrade.sh and the image builds did).

* Singlefile writes to a file instead of dumping to stdout.

Deno >= 2.3 truncates large --dump-content output at exit; compressed
(SingleFileZ) singlefiles of large pages lost their ZIP tail, failed the
compression check in write_archive_files, and were destroyed by the HTML
prettifier (blank white archives).  single-file now writes its result to a
temporary file which WROLPi reads back.

As insurance, a singlefile marked compressed (<html data-sfz) whose ZIP is
unreadable is now stored verbatim instead of being prettified.

* Compressed Archive screenshots and readability images are no longer broken.

The index.html inside a compressed (SingleFileZ) singlefile references its
resources by relative ZIP paths.  Screenshots are now taken from the fully
extracted ZIP so those references resolve.  Readability images are inlined
as data URIs read from the ZIP (readability-extractor absolutizes relative
srcs against the page URL, so both forms are matched).

* Compressed Archives are created by converting the uncompressed capture.

The page is always captured uncompressed; readability, screenshot, and
title come from that canonical page (its images are inline data URIs, so
no ZIP extraction or image inlining is needed).  When compress_singlefile
is set, a second single-file run converts the captured file into a
compressed (SingleFileZ) self-extracting file.  The conversion is a local
file:// operation - the page is not fetched again, and single-file
preserves the original URL header when re-saving its own pages.  If the
conversion fails, the uncompressed singlefile is stored instead.

* Consolidating duplicate compressed-singlefile tests.

The write_archive_files tests (verbatim write, title fallback, broken-ZIP
guard, readability inlining) are combined into one test; the helper probes
and the setting-plumbing tests are each merged into one.  The do_singlefile
compression-failure scenario and the timeout constant are folded into the
main do_singlefile test, which shared their setup.

* Addressing review comments: removeprefix, PermissionError when killing.

* Bumping version to 0.24.1-beta.

* Install scripts assert the deno.zip hash to avoid malicious or invalid files.

The hashes are the official sha256sum assets of the Deno v2.8.3 release,
per architecture.

* Archive Dockerfile asserts the deno.zip hash to avoid malicious or invalid files.

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 17:07:28 -06:00
Roland
f555855b15
Updating raspberry pi package list file name.
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
2026-04-14 16:52:33 -06:00
Roland
b8a532c8d9
Key changes:
- Add MapLibre GL JS viewer with light/dark themes, terrain layer,
  and embedded static map page for coordinate sharing
- Add map pin support with persistent map_pins.yaml config
- Add map region subscriptions and downloader with progress tracking,
  sourcing pre-extracted PMTiles from a cold CDN
- Add map export to PNG and GPS coordinate copy via context menu
- Add MapViewer React component alongside reworked Map page
- Add map catalog and region-building script (build_map_regions.py)
- Remove OSM import/render scripts, leaflet files, Apache configs,
  renderd service, and osm-map-dumper Docker container
- Update Caddyfile to serve PMTiles and map static assets
- Update build/install/repair scripts for Protomaps dependencies
- Drop map_file table, add/drop map_subscription table (alembic)
- Adding button to skip primary drive mounting during onboarding.
2026-04-04 13:48:19 -06:00
Roland
fbb71e012d Replace nginx with Caddy for TLS termination and reverse proxying.
- Replace nginx with Caddy as the web server for both Docker and native
  (RPi/Debian) deployments. Caddy handles HTTPS termination, reverse
  proxying to all services (API, React app, Controller, Kiwix, Help, Map),
  and serves the media/download file browsers.
- Generate a Root CA and signed leaf certificates for HTTPS. The Root CA
  uses Name Constraints to restrict signing to local addresses only
  (.local, localhost, and RFC 1918 private IP ranges), mitigating MITM
  risk if the CA key is compromised.
- Add an HTTP landing page that guides users through one-time CA
  certificate installation on iOS, Android, macOS, Windows, Linux, and
  Firefox, with auto-redirect when the cert is already trusted.
- Add trailing-slash redirects for /controller, /docs, /media, and
  /download so bare paths don't fall through to the React catch-all.
- Add a Root CA download link on the Settings page under Configs.
- Update help.sh diagnostics for IPv6 listener detection and HTTP/2
  status codes.
- Remove all nginx config files and the https_proxy Docker container.
- Bump wrolpi-help submodule with certificate documentation.
2026-03-07 18:48:44 -07:00
Roland
531ec3d65e
Creating new /api/archive/upload which accepts a file from the SingleFile browser extension and converts it to an Archive. 2025-01-30 18:41:32 -07:00
Roland
af5d4dfd51
Disabling JIT for map database as recommended by mod_tile because of excess memory usgae. 2025-01-11 11:06:01 -07:00
Roland
8e4d173791
Converting map blob to use "custom" postgres dump format so restore can use multiple threads. Renaming map db blob from gis-map.dump.gz to map-db-gis.dump. 2025-01-02 12:04:03 -07:00
Roland
218fb3e760
Replacing Tag names with escaped tag names to avoid errors in Tags Directory. 2024-10-16 18:56:10 -06:00
Roland
86355b664d
Using older version of single-file-cli to avoid error. 2024-05-14 20:29:57 -06:00
Roland
2924867f55
Bumping single-file-cli version for all systems. 2024-05-02 09:09:21 -06:00
Roland
6c87c25e07
Adding openstreetmap-carto to git safe directory list. 2023-11-25 13:02:55 -07:00
Roland
a7805745ab
Combining help service install into a script. 2023-11-23 15:49:01 -07:00
Roland
844bc9468c
Installing help during image build. Using wrolpi.local hostname for all links. 2023-11-22 15:08:29 -07:00
Roland
57262442bd
Installing WROLPi help environment for RPi and Debian. 2023-11-22 11:21:49 -07:00
Roland
7fd8a8527a
Reworking Debian install with real system. 2023-10-03 19:21:12 -06:00
Roland
6e0f9a999c
Combining install scripts into a new repair script. Removing create_db script in favor of repair script. 2023-10-03 12:15:29 -06:00
Roland
3f5a8e79a0
Fixing sudoers file permissions. 2023-08-19 13:28:14 -06:00
Roland
4cc00a9cb1
Delaying reboot/shutdown with asyncio sleep to give API time to shut down. 2023-08-18 11:55:14 -06:00
Roland
5ffb8bee8d
Waiting for poweroff/reboot processes. Using full poweroff/reboot paths for sudoers files. 2023-08-18 11:32:12 -06:00
Roland
2537017039
Creating shutdown and restart buttons. 2023-08-17 20:07:02 -06:00
Roland
6791e88baf
Stopping/starting renderd during map import. Moving tile cache clearing to import script. 2023-08-17 11:49:19 -06:00
Roland
1e0e72fa24
Using clear_map_cache.sh script to handle clearing cache and restarting renderd after map import. 2023-08-16 14:34:20 -06:00
Roland
e8e5b5727f
Creating Video.validated which is used by find_corrupt_videos.py to search. 2023-08-08 13:42:55 -06:00
Roland
36083200e6
Creating Video.ffprobe_json column which stores ffprobe information about the video file. Creating find_corrupt_videos.py script which automatically re-downloads videos which do not have both video and audio streams. 2023-08-03 21:40:25 -06:00
Roland
7bba6555ca
Matching install scripts. 2023-07-11 16:54:46 -06:00
Roland
1fff928d4e
Installing Kiwix packages and service in Raspberry Pi and Debian installer scripts. 2023-07-11 16:52:18 -06:00
Roland
03a2df217d
Zim/Kiwix (Wikipedia) feature
* A new zim module has been added, this module allows several things to interact with Zim files.
  * Allow searching of Zim files using libzim.
  * Allow downloading of Kiwix projects (wikipedia, wikibooks, etc) on a schedule which replaces the outdated files.
  * Creation of a new zim docker container which allows viewing of the Zim file contents.

* This commit also adds move/rename/mkdir features in the File Browser.
  * File tags are preserved when moving/renaming.
2023-07-10 21:30:40 -06:00
Roland
2b7f667699
Searching for wrolpi with colon to avoid catching non-wrolpi user. 2023-02-25 19:08:46 -07:00
Roland
6312a7eab1
Adding pgpass for wrolpi user. 2023-02-25 18:46:27 -07:00
Roland
eadc0a7537
Granting superuser to wrolpi during install so they can import maps. 2023-02-25 18:43:40 -07:00
Roland
abb0b49315
Checking for icesheet table as current user.
Importing maps as wrolpi user, then changing ownership to _renderd.

Changing ownership of /opt/wrolpi as well.

Creating pgpass for wrolpi user in debian 11.

Install specific version of serve.

Not echoing the echo.

Updating cache directory in create_db.sh.

Use python binary to run db upgrade.

Install renderd.conf to /etc on RPi OS.

Fetching DC map from wrolpi.org to avoid broken daily PBFs.

Only get latest dc map if it doesn't exist.

carto switched again??

Changing mod_tile directory to /var/cache/renderd/tiles for RPi OS.

Copying renderd configs for RPi OS.

Installing postgres 13 for RPi OS map.

Changing title of feature matrix.

Moving download link up in readme.

Changing mod_tile to _renderd.

Using unix socket rather than host connection.

Getting openstreetmap-carto as _renderd user.

Assigning ownership of gis db to _renderd in reset_map.sh.

Creating _renderd db user.

Using _renderd to run renderd on debian 11.

Installing python modules that map requires globally.

Upgrading db using venv.

Installing nodejs which installs npm.

Install npm/node after other dependencies.

Updating apt so nodejs can be installed.

Upgrading PyYAML in new venv.

Installing pip via apt.

Including bash binary for portability.

Moving images link out of list.

Moving download up on Readme.

Removing map installation from readme.

Installing specific version of carto.

Creating venv for wrolpi project.  Using venv to install requirements and run wrolpi's main.py.

Logging upgrade script.

Including upgrade script in Upgrade readme.

Moving upgrade logic into separate script.  This is necessary so and repo update will take immediate effect on the upgrade.

Modifying and unifying Debian installation with RPi OS installation.
2023-02-24 16:16:13 -07:00
Renamed from scripts/install_ubuntu_20.04.sh (Browse further)