Skip to content

Commit

Permalink
images/openwrt: Use apk as package manager (#359)
Browse files Browse the repository at this point in the history
Recently, openWRT changed their package manager from "opkg" to "apk"
(Alpine Linux package manager).

Post from openWRT forum:
https://forum.openwrt.org/t/the-future-is-now-opkg-vs-apk/201164

Passing build:
https://github.com/MusicDin/lxd-ci/actions/runs/11940145394/job/33282183927
  • Loading branch information
simondeziel authored Nov 20, 2024
2 parents 05e600d + 8d42501 commit 8e22920
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/image-openwrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,15 @@ jobs:
[ "${ARCH}" = "amd64" ] && IMAGE_ARCH="x86_64"
[ "${ARCH}" = "arm64" ] && IMAGE_ARCH="aarch64"
EXTRA_ARGS=""
if [ "${{ matrix.release }}" = "23.05" ]; then
EXTRA_ARGS="-o packages.manager=opkg"
fi
./bin/build-distro "${YAML}" "${ARCH}" "${TYPE}" "${TIMEOUT}" "${{ env.target }}" \
-o image.architecture="${IMAGE_ARCH}" \
-o image.release=${{ matrix.release }}
-o image.release=${{ matrix.release }} \
${EXTRA_ARGS}
- name: Print build artifacts
run: ls -lah "${{ env.target }}"
Expand Down
8 changes: 4 additions & 4 deletions images/openwrt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,16 @@ files:
option proto 'dhcpv6'
packages:
manager: opkg
# Note: Older releases of OpenWrt use "opkg" package manager.
manager: apk
update: false
cleanup: true
sets:
- packages:
- sudo
action: install
releases:
- 23.05

actions:
- trigger: post-unpack
Expand All @@ -231,6 +234,3 @@ actions:
sed -i 's/procd_add_jail/: \0/g' /etc/init.d/dnsmasq
# Disable conflicting sysntpd service to avoid crash loop
rm -f /etc/rc.d/*sysntpd
releases:
- snapshot
- 23.05

0 comments on commit 8e22920

Please sign in to comment.