libremesh / lime-packages

LibreMesh packages configuring OpenWrt for wireless mesh networking
https://libremesh.org/
GNU Affero General Public License v3.0
277 stars 96 forks source link

Maintain compatibility with the Attended Sysupgrade Server, related to issue #1000 #1049

Open a-gave opened 1 year ago

a-gave commented 1 year ago

Using the latest version of asu, the OpenWrt Attended Sysupgrade Server is possibile to build firmware images for LibreMesh. It use the OpenWrt ImageBuilder to cook the firmware image. This basically merge a precompiled kernel and precompiled packages. This process can be considered useful to build a libremesh image quickly, and without having a pre-existent setup of the OpenWrt Buildroot. However this don't come without annoying bugs that maintain preferable having a consistent but slower openwrt buildroot.

Let's start to list these annoying issues:

Example of request to build libremesh using asu:

{
  "packages": [
    "-dnsmasq",
    "-odhcpd_ipv6only",
    "profile-libremesh-suggested-packages"
  ],
  "repository_keys": [
    "RWSnGzyChavSiyQ+vLk3x7F0NqcLa4kKyXCdriThMhO78ldHgxGljM/8"
  ],
  "repositories": {
      "openwrt_core": "https://downloads.openwrt.org/releases/22.03.5/targets/ath79/generic/packages",
      "openwrt_base": "https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/base",
      "openwrt_luci": "https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/luci",
      "openwrt_packages": "https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/packages",
      "openwrt_routing": "https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/routing",
      "openwrt_telephony": "https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/telephony",
      "libremesh": "https://feed.libremesh.org/master",
      "profile": "https://feed.libremesh.org/profiles"
  },
  "profile": "dlink_dir-842-c3",
  "target": "ath79/generic",
  "version": "22.03.5"
}

Example using curl

curl -X 'POST' \
  'https://sysupgrade.antennine.campiinrete.org/api/v1/build' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "packages": [
    "-dnsmasq",
    "-odhcpd_ipv6only",
    "profile-libremesh-suggested-packages"
  ],
  "repository_keys": [
    "RWSnGzyChavSiyQ+vLk3x7F0NqcLa4kKyXCdriThMhO78ldHgxGljM/8"
  ],
  "repositories": {
      "openwrt_core": "https://downloads.openwrt.org/releases/22.03.5/targets/ath79/generic/packages",
      "openwrt_base": "https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/base",
      "openwrt_luci": "https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/luci",
      "openwrt_packages": "https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/packages",
      "openwrt_routing": "https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/routing",
      "openwrt_telephony": "https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/telephony",
      "libremesh": "https://feed.libremesh.org/master",
      "profile": "https://feed.libremesh.org/profiles"
  },
  "profile": "dlink_dir-842-c3",
  "target": "ath79/generic",
  "version": "22.03.5"
}
'
ilario commented 1 year ago

Oooh, this segmentation fault sounds like a big bug! On which version of OpenWrt did you observe this? Is this already reported in OpenWrt issues tracker?

Regarding the general topic, check out also #1000

a-gave commented 1 year ago

Oooh, this segmentation fault sounds like a big bug! On which version of OpenWrt did you observe this? Is this already reported in OpenWrt issues tracker?

It doesn't happen with plain openwrt, only on libremesh. To replicate follow the instructions at https://github.com/libremesh/lime-packages#using-the-imagebuilder-1 Encountered on:

pony1k commented 10 months ago

The segmentation fault happens when there is a package with - as version string. No packages in http://feed.libremesh.org/master/ have version - any more, so it seems like this has been fixed now. I have router with a recent image made with imagebuilder and libremesh and opkg list works fine. For the older ones I had to add Version: unknown to the affected packages in /etc/opkg/status to make it work.