Skip to content

Commit c3b6efd

Browse files
author
Maxim Kurbatov
committed
fix(ci): fix openwrt 25 build
1 parent 252c6d9 commit c3b6efd

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

.github/workflows/ci-packages.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ jobs:
100100
architecture: "aarch64_cortex-a53"
101101
- openwrt_version: "25.12.2"
102102
architecture: "aarch64_cortex-a53"
103+
- openwrt_version: "25.12.2"
104+
architecture: "x86_64"
103105
uses: ./.github/workflows/reusable-openwrt-packages.yml
104106
with:
105107
openwrt_version: ${{ matrix.build.openwrt_version }}

build_scripts/collect-openwrt.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# collect-openwrt.sh — Rename compiled OpenWrt packages and generate repository indexes.
2+
# collect-openwrt.sh — Collect compiled OpenWrt packages and generate repository indexes.
33
#
44
# Usage: scripts/collect-openwrt.sh \
55
# <workspace-dir> <sdk-dir> <release-dir> \
@@ -28,7 +28,7 @@ DEBUG_DEST_ROOT="$RELEASE_DIR/openwrt-debug/${TAG}"
2828
mkdir -p "$RELEASE_DIR"
2929
mkdir -p "$DEBUG_DEST_ROOT"
3030

31-
# ── Copy and rename packages ──────────────────────────────────────────────────
31+
# ── Copy packages ──────────────────────────────────────────────────────────────
3232

3333
_copy_pkg() {
3434
local name_prefix="$1" # "keen-pbr" or "keen-pbr-headless"
@@ -46,7 +46,11 @@ _copy_pkg() {
4646
ARCH_DIR_NAME="${PKG_ARCH}"
4747
DEST_DIR="$RELEASE_DIR/openwrt/${TAG}/${ARCH_DIR_NAME}"
4848
mkdir -p "$DEST_DIR"
49-
cp "$f" "$DEST_DIR/${name_prefix}_${VERSION_RELEASE}_openwrt_${TAG}_${ARCHITECTURE}.${EXT}"
49+
if [ "$EXT" = "apk" ]; then
50+
cp "$f" "$DEST_DIR/$(basename "$f")"
51+
else
52+
cp "$f" "$DEST_DIR/${name_prefix}_${VERSION_RELEASE}_openwrt_${TAG}_${ARCHITECTURE}.${EXT}"
53+
fi
5054
done
5155
}
5256

@@ -126,13 +130,13 @@ if [ ! -x "$APK_BIN" ]; then
126130
fi
127131

128132
if [ -n "$APK_BIN" ] && find "$RELEASE_DIR/openwrt/${TAG}" -type f \
129-
-name "keen-pbr*_openwrt_${TAG}_${ARCHITECTURE}.apk" 2>/dev/null | grep -q .; then
133+
-name "keen-pbr*.apk" 2>/dev/null | grep -q .; then
130134
rm -f "$APK_SIGNING_MARKER"
131135
for ARCH_DIR in $(find "$RELEASE_DIR/openwrt/${TAG}" -mindepth 1 -maxdepth 1 -type d | sort); do
132136
ARCH_DIR_NAME=$(basename "$ARCH_DIR")
133137
PKG_ARCH="${ARCH_DIR_NAME}"
134138
mapfile -t ARCH_APKS < <(find "$ARCH_DIR" -maxdepth 1 -type f \
135-
-name "keen-pbr*_openwrt_${TAG}_${ARCHITECTURE}.apk" -printf '%f\n' | sort)
139+
-name "keen-pbr*.apk" -printf '%f\n' | sort)
136140
if [ "${#ARCH_APKS[@]}" -gt 0 ]; then
137141
tmp_dir="$(mktemp -d)"
138142
for apk_file in "${ARCH_APKS[@]}"; do

docs/content/docs/getting-started/installation/openwrt.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ The repository page automatically shows the correct flow for your target:
1818

1919
Install `dnsmasq-full` before installing keen-pbr:
2020

21-
{{< callout type="info" >}}
22-
OpenWrt 25.x and newer also need `dnsmasq-full` instead of the default `dnsmasq`.
23-
I do not have an `apk`-based router to test the exact replacement steps yet. If you know the correct procedure, please send a PR to improve these docs.
24-
{{< /callout >}}
25-
2621
```bash {filename="bash"}
2722
# OpenWrt 25.x and newer
2823
apk --update-cache add dnsmasq-full

0 commit comments

Comments
 (0)