Hello!!
I use Crowdsec as IPS solution in my home LAN, the last versio is the 1.5.2. I've seen that package is available on Openwrt 22.03. However, for Openwrt 21.02 the only is 1.3.0.
As the title says, I would like to know if it's possible to install packages for Openwrt 22.03 in 21.02.
Hello!!
Yes, that should be the obvious option. However, GL-iNet routers have a customized skin on top OpenWRT, I'm tied to their development pace... And I don't know when they will upgrade my device to the new version.
Frollic and hnyman are correct, upgrading is always preferable, and different musl versions can be an issue. That said, in this case, I think it might work. The musl library is the same major version, and there are no other library dependencies for the package.
What I would do, is download the package, expand it manually, and try the binaries. All OpenWrt .ipk packages are actually gzipped tarballs in disguise. They contain the following:
control.tar.gz - dependency info files, and a list of config files to add to the OpenWrt config file list
data.tar.gz - the actual program and config files
debian-binary - a marker for the package (the package format was taken from Debian .deb files)
Download your package, create a temp folder and cd into it. Untar the package, then untar both control.tar.gz and data.tar.gz. You can then cd into the created usr/bin and try running the crowdsec binary. Unless there are some ABI changes in musl (which doesn't happen often), chances are it will work fine.
Once you verify it works, you can move the files to where they are supposed to go.
If you want to, it's probably still doable. The package takes about 4.5MiB installed. If you use a ramdisk (create a folder under /tmp) for the initial untarring and testing, you should have enough room on your system to do the final install.