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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ jobs:
run: LD_LIBRARY_PATH="$HOME/hostroot/lib" tests/test-power.sh "$HOME/hostroot/bin"
- name: Printers (shareos-printer with a fake /sys, ipp-usb and p910nd)
run: LD_LIBRARY_PATH="$HOME/hostroot/lib" tests/test-printer.sh "$HOME/hostroot/bin"
- name: UPS (shareos-ups with fake NUT programs)
run: LD_LIBRARY_PATH="$HOME/hostroot/lib" tests/test-ups.sh "$HOME/hostroot/bin"
- name: Dynamic DNS (shareos-ddns, all providers with a fake curl)
run: LD_LIBRARY_PATH="$HOME/hostroot/lib" tests/test-ddns.sh "$HOME/hostroot/bin"
- name: Zabbix agent controller (settings, disk/RAID items)
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ pre-releases for test devices only.
- *Current printers and multifunction devices* that speak IPP over USB (most since about 2015, e.g. HP Smart Tank, OfficeJet, Canon PIXMA, Epson EcoTank) print **without a driver**: Windows 10/11, macOS, iPhone/iPad and Android find them by themselves (IPP Everywhere, AirPrint, Mopria) – and their **scanner** works over the network as well (eSCL). ipp-usb (OpenPrinting) does the work; ShareOS's avahi-daemon has no D-Bus, so a patch makes ipp-usb announce the devices through static avahi service files. The port of each device stays the same (kept on the flash).
- *Older printers* (usblp, `/dev/usb/lpN`): p910nd on port 9100 + N, announced as `_pdl-datastream`; the computer uses the maker's driver ("Standard TCP/IP port" in Windows, AppSocket/JetDirect). *Testseite* sends a plain-text/PCL page.
- Printers are followed when plugged in or pulled (mdev rule for `lp*`, ipp-usb watches USB itself). Mode *Immer Port 9100* for printers whose driverless printing misbehaves. `shareos-printer`, rpcd `shareos.printer`, `tests/test-printer.sh` (14 checks with a fake /sys).
- **UPS over USB** (Dienste → USV, new system app **"nut"** in the store: Network UPS Tools 2.8.5 with the drivers usbhid-ups, nutdrv_qx and blazer_usb – APC, Eaton, CyberPower, most Megatec/Q1 boxes; 0.7 MB, kept on the flash so it works when a disk fails).
- Charge, runtime, load and model of the UPS; a power failure, the power coming back, a low or worn battery and a lost connection become messages (e-mail/push as set up) and are listed under *Ereignisse*.
- The box shuts down cleanly while on battery – when the UPS reports a low battery, below a charge of your choice or after some minutes on battery – and only then; if the power comes back first, nothing happens. Afterwards the UPS switches its output off and on again when the power is back, so the box starts by itself (can be switched off).
- Other computers can read the UPS over the network (NUT, port 3493, user `monitor` with a password) and shut down before the box.
- NUT without OpenSSL (`external.mk`: 4.4 MB of libraries less). `shareos-ups`, rpcd `shareos.ups`, the last step of the shutdown in `S05board`, `tests/test-ups.sh` (20 checks with fake NUT programs).
- **DynDNS, own certificate authority and Let's Encrypt** (System → Netzwerk).
- *DynDNS*: DuckDNS, dynv6, Cloudflare, No-IP or any dyndns2 address (Strato, IONOS, …), IPv4 and/or IPv6 (for lines without their own IPv4 address: DS-Lite, fibre, mobile). The box reports its public address every 5 minutes when it changed, otherwise once a day; a failure becomes a message. Token and password go to curl through stdin, not the command line, and are never sent back to the browser. `shareos-ddns`, `tests/test-ddns.sh` (24 checks with a fake curl).
- *Own CA*: a certificate authority on the box (EC P-256, 10 years) issues certificates for the box and other devices in the home network (825 days, server authentication, wildcards like `*.home.lan`, IP addresses); its root certificate is installed once on PCs and phones, after that there are no certificate warnings. The box's own certificate follows name and IP address and is renewed 30 days before it runs out. The CA is part of the settings backup. `shareos-ca` (mbedtls of the firmware), `tests/test-ca.sh` (18 checks, in CI with the firmware's programs in qemu).
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- Tags/releases are created by Jan; prepare the release text and the `CHANGELOG.md` section.
- **Every release updates the docs** – see `docs/RELEASE.md` (CHANGELOG, README status/features, TESTEN/TESTING, ENTWICKLUNG/DEVELOPMENT).
- Photos for the docs: strip EXIF/GPS and blur serial-number stickers before committing.
- Tests: `tests/` (host: test-update, test-net, test-flash-bin, test-boards, test-raid-wait, test-smart, test-bootlog, test-power, test-notify, test-zabbix-items, test-printer, test-ddns, test-ca (mbedtls/uci of the firmware through qemu-arm-static, see build.yml), check-acl.py, check-i18n.py; ARM emulator with sudo: run-stack-qemu --check, test-users, test-storage, test-cloud-paperless, test-apps, test-firstinstall, test-transmission, test-media, test-dlna, test-vpn, test-tailscale, test-autobrr, test-zabbix – these seven need `make sysapps-pack`, test-snapshots, test-sysperms). UI work: `tests/mock-ubus.py`; app SDK in Chromium: `node tests/sdk-storage.js` (Playwright). ucode plugin: `tests/check-ucode-order.py` (no hoisting in ucode).
- Tests: `tests/` (host: test-update, test-net, test-flash-bin, test-boards, test-raid-wait, test-smart, test-bootlog, test-power, test-notify, test-zabbix-items, test-printer, test-ups, test-ddns, test-ca (mbedtls/uci of the firmware through qemu-arm-static, see build.yml), check-acl.py, check-i18n.py; ARM emulator with sudo: run-stack-qemu --check, test-users, test-storage, test-cloud-paperless, test-apps, test-firstinstall, test-transmission, test-media, test-dlna, test-vpn, test-tailscale, test-autobrr, test-zabbix – these seven need `make sysapps-pack`, test-snapshots, test-sysperms). UI work: `tests/mock-ubus.py`; app SDK in Chromium: `node tests/sdk-storage.js` (Playwright). ucode plugin: `tests/check-ucode-order.py` (no hoisting in ucode).
- Never `rm -rf` a chroot that still has mounts below it (it would delete the host's /dev).
- Apps live in the separate repository UniqueDroid/ShareOS-Apps.
- New UI texts: add them to `i18n/en.json` and to every `tools/i18n/<code>.tsv` (new numbers at the end), then `tools/i18n/build-lang.py`; `tests/check-i18n.py` must pass.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Version in brackets = first release with the feature.

**Shares, users, files**
- USB printers in the network: current printers without a driver (IPP over USB: AirPrint, Mopria, Windows), scanning over the network (eSCL), older printers over port 9100 (system app "printer", 0.2.0-beta.18)
- UPS over USB: charge and runtime, messages on a power failure, clean shutdown on battery (low battery, a percentage or minutes), other computers over the network (system app "nut", 0.2.0-beta.18)
- SMB 2/3 (ksmbd) and NFS v4 shares with read/write permissions per user and group, guest access optional; the crypto engine of the SoC computes the SMB 3 signatures (about three times as fast, 0.2.0-beta.17); compatibility mode up to SMB 2.1 for difficult clients (0.2.0-beta.17)
- Users and groups; one account for shares, web interface and apps; storage limit per user (ext4); import of Alt-F users with their passwords
- "My ShareOS": users with web access manage their own password, look, shares, storage, cloud and Paperless
Expand Down
3 changes: 3 additions & 0 deletions board/dlink/dns320l/rootfs-overlay/etc/init.d/S05board
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ stop() {
rm -f "$BUTTONDDPID"
start-stop-daemon -K -q -p "$PIDFILE" 2>/dev/null
sleep 1
# shut down on UPS battery: the UPS switches its output off now and on
# again when the power is back – and the box starts with it
[ -f /tmp/.poweroff ] && [ -x /usr/sbin/shareos-ups ] && /usr/sbin/shareos-ups killpower
if [ -f /tmp/.poweroff ] && [ "$BOARD_CONTROL" = mcu ]; then
# ask the MCU to cut power 3 seconds from now (other boxes: gpio-poweroff in the kernel)
sync
Expand Down
5 changes: 5 additions & 0 deletions configs/shareos_sysapps_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ BR2_PACKAGE_SHAREOS_ZABBIX_AGENT=y
# package/shareos-ipp-usb
BR2_PACKAGE_SHAREOS_IPP_USB=y
BR2_PACKAGE_P910ND=y
# UPS (system app "nut"): Network UPS Tools with the USB drivers of most
# UPSs (usbhid-ups: APC, Eaton, CyberPower …; nutdrv_qx/blazer_usb: Megatec)
BR2_PACKAGE_LIBUSB=y
BR2_PACKAGE_NUT=y
BR2_PACKAGE_NUT_DRIVERS="usbhid-ups,nutdrv_qx,blazer_usb"
BR2_PACKAGE_HTOP=y
BR2_PACKAGE_STRACE=y
BR2_PACKAGE_IPERF3=y
Expand Down
5 changes: 5 additions & 0 deletions external.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@ LIBEVENT_CONF_OPTS += --disable-openssl
# (post-build.sh); rsync only uses them for faster checksums
RSYNC_CONF_OPTS += --disable-openssl
RSYNC_DEPENDENCIES := $(filter-out openssl,$(RSYNC_DEPENDENCIES))

# Network UPS Tools (system app "nut") without OpenSSL: upsd only talks to
# upsmon on the box and plain NUT clients – 4.4 MB of libraries less
NUT_CONF_OPTS += --without-ssl
NUT_DEPENDENCIES := $(filter-out openssl,$(NUT_DEPENDENCIES))
2 changes: 2 additions & 0 deletions package/shareos-core/shareos-core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ define SHAREOS_CORE_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-dlna $(TARGET_DIR)/usr/sbin/shareos-dlna
$(INSTALL) -D -m 0644 $(@D)/etc/config/dlna $(TARGET_DIR)/etc/config/dlna
$(INSTALL) -D -m 0644 $(@D)/etc/config/printer $(TARGET_DIR)/etc/config/printer
$(INSTALL) -D -m 0644 $(@D)/etc/config/ups $(TARGET_DIR)/etc/config/ups
$(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-zabbix $(TARGET_DIR)/usr/sbin/shareos-zabbix
$(INSTALL) -D -m 0644 $(@D)/etc/config/zabbix $(TARGET_DIR)/etc/config/zabbix
$(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-reset-access $(TARGET_DIR)/usr/sbin/shareos-reset-access
Expand All @@ -91,6 +92,7 @@ define SHAREOS_CORE_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-bootlog $(TARGET_DIR)/usr/sbin/shareos-bootlog
$(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-power $(TARGET_DIR)/usr/sbin/shareos-power
$(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-printer $(TARGET_DIR)/usr/sbin/shareos-printer
$(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-ups $(TARGET_DIR)/usr/sbin/shareos-ups
$(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-ddns $(TARGET_DIR)/usr/sbin/shareos-ddns
$(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-ca $(TARGET_DIR)/usr/sbin/shareos-ca
$(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-acme $(TARGET_DIR)/usr/sbin/shareos-acme
Expand Down
17 changes: 17 additions & 0 deletions src/shareos-core/etc/config/ups
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# UPS over USB (system app "nut": Network UPS Tools) – managed by
# shareos-ups (web interface: Services -> UPS).
#
# option shutdown 'low' # low | percent | minutes
# option percent '30' # shutdown percent: below this charge
# option minutes '5' # shutdown minutes: after this long on battery
# option killpower '1' # switch the UPS output off afterwards
# option server '0' # other computers may read it (user monitor)

config ups 'main'
option enabled '0'
option driver 'auto'
option shutdown 'low'
option percent '30'
option minutes '5'
option killpower '1'
option server '0'
Loading
Loading