Files
small-packages/luci-theme-footstrap/owfeed.yml
T
2026-09-20 01:22:33 +08:00

176 lines
9.5 KiB
YAML

# How the released packages are built — see https://github.com/owfeed/owfeed
#
# ./tools/stage.sh # produce dist/root, the tree owfeed packages
# owfeed build # dist/noarch/*.apk (25.12) + dist/all/*.ipk (24.10)
#
# Why this replaced the SDK: the theme is noarch — CSS, templates and browser JS, not one compiled
# byte — and the SDK build spent ~5 minutes per format downloading and verifying a cross toolchain to
# run `cp`, twice, because 24.10's opkg and 25.12's apk are different containers. What the SDK
# contributed was three things owfeed also does: the .lmo catalogues (byte-identical to po2lmo), the
# conffiles/scripts sidecars package-pack.mk emits, and the default_postinst wrapper that makes
# /etc/uci-defaults/* run at all.
#
# The SDK verification did not go away with it: owfeed fetches the host `apk` out of a release SDK
# and holds it to the same ed25519 signature over sha256sums, with the key pinned from another host.
#
# luci-theme-footstrap/Makefile stays, and is not a second source of truth: tools/stage.sh reads the
# lifecycle scripts out of it, and CI keeps the gates that protect an SDK build (scan-marker, jsmin
# equivalence). Anyone can still build this theme in an OpenWrt SDK; nothing we release comes from
# one.
version: 1
feed:
name: footstrap
# This repository publishes RELEASE ASSETS, not a feed of its own: an installed key is a trust
# anchor for every package name, which is more authority than one theme should ask for. The feed
# that carries this package is owfeed-packages, which pins our released .apk by sha256 and adds its
# own signature — so this URL is where a subscriber's apk really fetches it from, and `build` is
# the only stage this file drives.
url: https://repo.owfeed.org
title: Footstrap
maintainer: "Ivan Kvashonkin <vizzlef@gmail.com>"
license: Apache-2.0
homepage: https://github.com/VizzleTF/luci-theme-footstrap
# Both lines, from one staged tree. 25.12+ is apk, 24.10 is opkg, and the difference is not only the
# container: opkg calls an architecture-independent package `all` where apk requires `noarch` and
# rejects `all`. owfeed emits each under the name its manager understands, which keeps
# `luci-theme-footstrap_<v>_all.ipk` byte-for-byte the asset name a fielded self-update script
# matches on.
releases:
- line: "25.12"
default: true
format: apk
- line: "24.10"
format: ipk
# NO `signing:` BLOCK, and its absence is the point. Those keys sign a feed's INDEX — usign for opkg,
# EC for apk — and this repository never builds one: it publishes release assets, and the feed that
# carries them signs its index with its own key at the far end. What vouches for our bytes is
# `owfeed release`, whose usign signatures over the packages and the manifest are made in the release
# job, where the secret is reachable and the build job cannot see it.
#
# Declaring it here does not work: up to 0.11.6 it named two environment variables nothing read,
# because owfeed <= v0.1.2 demanded an index key at config-load time for any ipk line. Fixed in
# v0.1.3, where the requirement moved to `owfeed index`.
#
# If a feed is ever published from here: FOOTSTRAP_USIGN_KEY is the BASE64 of usign's two-line
# secret-key file (one canonical form, so a copy-paste cannot mangle the newlines) and owfeed wants
# the file itself, so decode it into place.
# Required by the schema and unused here: `publish` hands a built feed to a host, and this repository
# stops after `build`. Named github-pages because that is where the Pages workflow already serves the
# release mirror from, and Pages allows a single artifact per site.
publish:
- target: github-pages
packages:
- name: luci-theme-footstrap
build: mkpkg
# Never "all" here: apk rejects `all` as uninstallable, which is why OpenWrt's package-pack.mk
# rewrites LUCI_PKGARCH:=all into arch:noarch on the way to mkpkg. The ipk leg gets `all` from
# owfeed, not from this line.
arch: noarch
# Written by tools/stage.sh from the tag (CI) or the newest tag (a working tree), with the -r1
# that PKG_RELEASE:=1 puts on every asset name.
version-from: file:./dist/VERSION
files: ./dist/root
description: "A modern, fast LuCI theme."
# +luci-base is the WHOLE list, and it is the Makefile's LUCI_DEPENDS verbatim. Nothing may pull
# curl onto an 8 MB device for one fetch — uclient-fetch is already in the base image.
depends: [luci-base]
# Apache-2.0 alone, as the Makefile's PKG_LICENSE says. No OFL-1.1: the theme ships no Font
# Software, so declaring it would be false.
license: Apache-2.0
url: https://github.com/VizzleTF/luci-theme-footstrap
maintainer: "Ivan Kvashonkin <vizzlef@gmail.com>"
# Which commit produced these bytes, recorded in the package itself. env: because the value
# changes with every commit and belongs in CI, not in a committed file.
repo-commit: env:GITHUB_SHA
# /etc/config/footstrap ships as a stub and is WRITTEN AT RUNTIME by Appearance -> "Save as
# default". Undeclared, the package manager owns it as an ordinary file and replaces it on
# upgrade, so the theme's own one-click Update wipes the admin's saved defaults and reports
# success. Any future root/etc/config/* goes here too (tools/conffiles.mjs holds this list to
# the tree).
conffiles: ["/etc/config/footstrap"]
# Extracted from the Makefile's own defines by tools/stage.sh, so the SDK path and this one
# cannot disagree about what happens at install time. owfeed adds the default_postinst /
# default_prerm wrapper around them, exactly as package-pack.mk does.
#
# For the 24.10 leg: owfeed's ipk container emits postinst and prerm only, so post-deinstall
# reaches apk but not opkg today. On 24.10 that loses the removal cleanup (unregistering the
# theme, putting mediaurlbase back) — a real removal only, never an upgrade, which the script's
# own `case "$1" in *upgrade*` guard already exits on.
scripts:
post-install: ./dist/scripts/post-install
post-deinstall: ./dist/scripts/post-deinstall
# ---- one package per language ----
#
# The catalogues used to ship inside the theme. They cost 10,992 B on flash and 4,821 B of the .apk,
# and every router paid it — including the ones reading English, which is most of them. Split out,
# a Russian router installs luci-i18n-footstrap-ru and nobody else carries a byte.
#
# The reason they were bundled is in git and half of it has expired: "several assets in one release
# made the fielded self-update script install the 6 KB catalogue instead of the theme (issue #6)" —
# that script is retired, and the Makefile says so. What remains is that two packages can drift, an
# `_()` the older catalogue lacks rendering in English with nothing reporting it. That is the same
# trade every luci-app-* in the tree makes, and `update-po.sh --check` already fails a build whose
# catalogues are behind the source.
#
# NAMES AND PATHS ARE luci.mk's, not ours: `luci-i18n-$(LUCI_BASENAME)-<lang>` with LUCI_BASENAME
# `footstrap`, and the catalogue basename `footstrap`, so `po2lmo` in an SDK build and owfeed here
# produce the same file in the same package for the same router. That also puts these packages back
# on the name a v0.8.4 router already has installed, so the file it owns is upgraded rather than
# fought over — bundling them was what forced the `footstrap-theme` basename in the first place.
#
# The per-language staging directories come from tools/stage.sh (it also writes the uci-defaults
# line that puts the language in LuCI's menu); tools/i18n-packages.mjs holds po/, that script and
# this list to each other, so adding a language cannot half-land.
- name: luci-i18n-footstrap-ru
build: mkpkg
arch: noarch
version-from: file:./dist/VERSION
files: ./dist/i18n-ru
description: "Footstrap theme - Russian translation"
depends: [luci-theme-footstrap]
license: Apache-2.0
url: https://github.com/VizzleTF/luci-theme-footstrap
maintainer: "Ivan Kvashonkin <vizzlef@gmail.com>"
i18n:
from: ./dist/po-ru
basename: footstrap
# WHAT MAKES THE SPLIT SURVIVE AN UPGRADE NOBODY SUPERVISES. `depends` points from the
# catalogue to the theme, so installing or upgrading the THEME never pulls a catalogue in:
# measured on a stand, a Russian router on 0.14.3 taking 0.14.4 through the feed lost every
# `.lmo` with the old package and gained no new one — the theme went back to English and
# nothing said why (issue #41). `install-if` is apk's answer: install this by yourself once
# both are true. The pin re-fires the rule on every upgrade of the theme; `luci-i18n-base-ru`
# is what "this router is Russian" looks like to a package manager, which cannot read
# `uci luci.main.lang`.
#
# opkg has no conditional form of this — `Recommends:` is executed but unconditional, and would
# put Russian on every 24.10 router — so that leg is covered by install.sh instead.
install-if: [ "luci-theme-footstrap={version}", "luci-i18n-base-ru" ]
- name: luci-i18n-footstrap-es
build: mkpkg
arch: noarch
version-from: file:./dist/VERSION
files: ./dist/i18n-es
description: "Footstrap theme - Spanish translation"
depends: [luci-theme-footstrap]
license: Apache-2.0
url: https://github.com/VizzleTF/luci-theme-footstrap
maintainer: "Ivan Kvashonkin <vizzlef@gmail.com>"
i18n:
from: ./dist/po-es
basename: footstrap
# see luci-i18n-footstrap-ru above
install-if: [ "luci-theme-footstrap={version}", "luci-i18n-base-es" ]