DEV Community

Alexey Melezhik
Alexey Melezhik

Posted on

raku-sparrow6 - swiss army knife for alpine linux

Sparrow is a Rakulang based framework that allows to automate routine tasks, the beauty of it - one can use prepacked plugins available from public Sparrow repository - https://sparrowhub.io

Install Sparrow framework

Sparrow is installed as native Alpine package:

sudo apk add \
--no-cache --wait 120 -u \
--repository=http://dl-cdn.alpinelinux.org/alpine/edge/community \
raku-sparrow6
Enter fullscreen mode Exit fullscreen mode

Set up plugins repository

export SP6_REPO=http://sparrowhub.io/repo
s6 --index-update
Enter fullscreen mode Exit fullscreen mode

Search alpine plugins

Sparrowhub has a lot of plugins, to limit search to Alpine related plugins:

s6 --search alpine
Enter fullscreen mode Exit fullscreen mode

There are now not too many of them for Alpine, eventually I am going to add more, put in comments what sort of plugins one would like to see

Run plugin

To run plugin, use Sparrow cli, you can also pass parameters to a plugin. For example, to validate APKBUILD file one can use apkbuild-strict plugin:

s6 --plg-run apkbuild-strict@path=/path/to/apkbuild/file
Enter fullscreen mode Exit fullscreen mode

That way Sparrow plugins could be run from terminal or get inlined into shell scripts

Conclusion

It'd be great to hear feedback from (Alpine) users, what sort of tasks could be implemented by Sparrow

Credits

Kudos to Celeste - Alpine maintainer for raku-sparrow6 Alpine package creation

Top comments (0)